dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
[gcc.git] / gcc / ChangeLog
1 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
2
3 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
4
5 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
6
7 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
8 TARGET_ELF.
9
10 2018-06-08 Martin Liska <mliska@suse.cz>
11
12 * tree-cfg.h (debug_function): Fix argument type to match
13 implementation.
14
15 2018-06-08 Martin Liska <mliska@suse.cz>
16
17 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
18 Remove usage of MPX-related (and removed) fields.
19 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
20
21 2018-06-08 David Malcolm <dmalcolm@redhat.com>
22
23 * cfg.c (debug): Use TDF_NONE rather than 0.
24 * cfghooks.c (debug): Likewise.
25 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
26 (struct dump_option_value_info): Convert to...
27 (struct kv_pair): ...this template type.
28 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
29 rather than 0.
30 (optinfo_verbosity_options): Likewise.
31 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
32 OPTGROUP_NONE.
33 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
34 than int for "optgroup_flags" param.
35 (dump_generic_expr_loc): Use dump_flags_t rather than int for
36 "dump_kind" param.
37 (dump_dec): Likewise.
38 (dump_finish): Use TDF_NONE rather than 0.
39 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
40 rather than int for "optgroup_flags" param. Use TDF_NONE rather
41 than 0. Update for change to option_ptr.
42 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
43 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
44 0. Update for changes to optinfo_verbosity_options and
45 optgroup_options.
46 (opt_info_switch_p): Convert optgroup_flags from int to
47 optgroup_flags_t.
48 (dump_basic_block): Use dump_flags_t rather than int
49 for "dump_kind" param.
50 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
51 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
52 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
53 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
54 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
55 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
56 TDF_NONE): Convert from macros to...
57 (enum dump_flag): ...this new enum.
58 (dump_flags_t): Update to use enum.
59 (operator|, operator&, operator~, operator|=, operator&=):
60 Implement for dump_flags_t.
61 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
62 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
63 Convert from macros to...
64 (enum optgroup_flag): ...this new enum.
65 (optgroup_flags_t): New typedef.
66 (operator|, operator|=): Implement for optgroup_flags_t.
67 (struct dump_file_info): Convert field "alt_flags" to
68 dump_flags_t. Convert field "optgroup_flags" to
69 optgroup_flags_t.
70 (dump_basic_block): Use dump_flags_t rather than int for param.
71 (dump_generic_expr_loc): Likewise.
72 (dump_dec): Likewise.
73 (dump_register): Convert param "optgroup_flags" to
74 optgroup_flags_t.
75 (opt_info_enable_passes): Likewise.
76 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
77 than 0.
78 * gimple-pretty-print.c (debug): Likewise.
79 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
80 (merged_store_group::apply_stores): Likewise.
81 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
82 * gimple.c (verify_gimple_pp): Likewise.
83 * graphite-poly.c (print_pbb_body): Likewise.
84 * passes.c (pass_manager::register_one_dump_file): Convert
85 local "optgroup_flags" to optgroup_flags_t.
86 * print-tree.c (print_node): Use TDF_NONE rather than 0.
87 (debug): Likewise.
88 (debug_body): Likewise.
89 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
90 to optgroup_flags_t.
91 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
92 than 0.
93 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
94 (convert_mult_to_fma): Likewise.
95 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
96 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
97 * tree-vect-data-refs.c (dump_lower_bound): Convert param
98 "dump_kind" to dump_flags_t.
99
100 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
101
102 * config/rs6000/rs6000.c (min, max): Delete.
103
104 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
105
106 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
107 -mabi=spe and -mabi=no-spe.
108
109 2018-06-08 Martin Liska <mliska@suse.cz>
110
111 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
112 where we expect an existing summary.
113
114 2018-06-08 Martin Liska <mliska@suse.cz>
115
116 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
117 * ipa-inline.h (estimate_edge_growth): Likewise.
118
119 2018-06-08 Martin Liska <mliska@suse.cz>
120
121 * cgraph.c (function_version_hasher::hash): Use
122 cgraph_node::get_uid ().
123 (function_version_hasher::equal):
124 * cgraph.h (cgraph_node::get_uid): New method.
125 * ipa-inline.c (update_caller_keys): Use
126 cgraph_node::get_uid ().
127 (update_callee_keys): Likewise.
128 * ipa-utils.c (searchc): Likewise.
129 (ipa_reduced_postorder): Likewise.
130 * lto-cgraph.c (input_node): Likewise.
131 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
132 * symbol-summary.h (symtab_insertion): Likewise.
133 (symtab_removal): Likewise.
134 (symtab_duplication): Likewise.
135 * tree-pretty-print.c (dump_function_header): Likewise.
136 * tree-sra.c (convert_callers_for_node): Likewise.
137
138 2018-06-08 Martin Liska <mliska@suse.cz>
139
140 * cgraph.c (symbol_table::create_edge): Always assign a new
141 unique number.
142 (symbol_table::free_edge): Do not recycle numbers.
143 * cgraph.h (cgraph_edge::get): New method.
144 * symbol-summary.h (symtab_removal): Use it.
145 (symtab_duplication): Likewise.
146 (call_summary::hashable_uid): Remove.
147
148 2018-06-08 Martin Liska <mliska@suse.cz>
149
150 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
151 (initialize_growth_caches): Remove.
152 (free_growth_caches): Likewise.
153 (do_estimate_edge_time): Use edge_growth_cache.
154 (do_estimate_edge_size): Likewise.
155 (do_estimate_edge_hints): Likewise.
156 * ipa-inline.c (reset_edge_caches): Likewise.
157 (recursive_inlining): Likewise.
158 (inline_small_functions): Likewise.
159 * ipa-inline.h (initialize_growth_caches): Remove.
160 (estimate_edge_size): Likewise.
161 (estimate_edge_time): Likewise.
162 (estimate_edge_hints): Likewise.
163 (reset_edge_growth_cache): Likewise.
164 * symbol-summary.h (call_summary::remove): New method.
165
166 2018-06-08 Martin Liska <mliska@suse.cz>
167
168 * ipa-cp.c (class edge_clone_summary): New summary.
169 (grow_edge_clone_vectors): Remove.
170 (ipcp_edge_duplication_hook): Remove.
171 (class edge_clone_summary_t): New call_summary class.
172 (ipcp_edge_removal_hook): Remove.
173 (edge_clone_summary_t::duplicate): New function.
174 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
175 (create_specialized_node): Likewise.
176 (ipcp_driver): Initialize edge_clone_summaries and do not
177 register hooks.
178
179 2018-06-08 Martin Liska <mliska@suse.cz>
180
181 * symbol-summary.h (get): New function.
182 (call_summary::m_initialize_when_cloning): New class member.
183
184 2018-06-08 Martin Liska <mliska@suse.cz>
185
186 * cgraph.c (cgraph_node::remove): Do not recycle uid.
187 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
188 (symbol_table::allocate_cgraph_symbol): Do not set uid.
189 * passes.c (uid_hash_t): Record removed_nodes by their uids.
190 (remove_cgraph_node_from_order): Use the removed_nodes set.
191 (do_per_function_toporder): Likwise.
192 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
193 instead of summary_uid.
194 (symtab_removal): Likewise.
195 (symtab_duplication): Likewise.
196
197 2018-06-08 Martin Liska <mliska@suse.cz>
198
199 * ipa-cp.c (ipcp_store_bits_results): Use
200 ipcp_transformation_sum.
201 (ipcp_store_vr_results): Likewise.
202 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
203 to ...
204 (ipcp_transformation_initialize): ... this.
205 (ipa_set_node_agg_value_chain):
206 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
207 (write_ipcp_transformation_info): Likewise.
208 (read_ipcp_transformation_info): Likewise.
209 (ipcp_update_bits): Likewise.
210 (ipcp_update_vr): Likewise.
211 (ipcp_transform_function): Likewise.
212 * ipa-prop.h: Rename ipcp_transformation_summary to
213 ipcp_transformation.
214 (class ipcp_transformation_t): New function summary.
215 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
216 (ipa_get_agg_replacements_for_node): Likewise.
217
218 2018-06-08 Martin Liska <mliska@suse.cz>
219
220 * ipa-pure-const.c (struct funct_state_d): Do it class instead
221 of struct.
222 (class funct_state_summary_t): New function_summary class.
223 (has_function_state): Remove.
224 (get_function_state): Likewise.
225 (set_function_state): Likewise.
226 (add_new_function): Likewise.
227 (funct_state_summary_t::insert): New function.
228 (duplicate_node_data): Remove.
229 (remove_node_data): Remove.
230 (funct_state_summary_t::duplicate): New function.
231 (register_hooks): Create new funct_state_summaries.
232 (pure_const_generate_summary): Use it.
233 (pure_const_write_summary): Likewise.
234 (pure_const_read_summary): Likewise.
235 (propagate_pure_const): Likewise.
236 (propagate_nothrow): Likewise.
237 (dump_malloc_lattice): Likewise.
238 (propagate_malloc): Likewise.
239 (execute): Do not register hooks, just remove summary
240 instead.
241 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
242 constructor.
243
244 2018-06-08 Martin Liska <mliska@suse.cz>
245
246 * ipa-reference.c (remove_node_data): Remove.
247 (duplicate_node_data): Likewise.
248 (class ipa_ref_var_info_summary_t): New class.
249 (class ipa_ref_opt_summary_t): Likewise.
250 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
251 (get_reference_optimization_summary): Use
252 ipa_ref_opt_sum_summaries.
253 (set_reference_vars_info): Remove.
254 (set_reference_optimization_summary): Likewise.
255 (ipa_init): Create summaries.
256 (init_function_info): Use function summary.
257 (ipa_ref_opt_summary_t::duplicate): New function.
258 (ipa_ref_opt_summary_t::remove): New function.
259 (get_read_write_all_from_node): Fix GNU coding style.
260 (propagate): Use function summary.
261 (write_node_summary_p): Fix GNU coding style.
262 (stream_out_bitmap): Likewise.
263 (ipa_reference_read_optimization_summary): Use function summary.
264 (ipa_reference_c_finalize): Do not release hooks.
265
266 2018-06-08 Martin Liska <mliska@suse.cz>
267
268 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
269 (analyze_function_body): Extract multiple calls of get_create.
270 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
271 * ipa-inline.c (recursive_inlining): Use ::get method.
272 * ipa-inline.h (estimate_edge_growth): Likewise.
273
274 2018-06-08 Martin Liska <mliska@suse.cz>
275
276 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
277 HSA_INVALID.
278 (hsa_function_summary::hsa_function_summary): Use the new enum
279 value.
280 (hsa_gpu_implementation_p): Use hsa_summaries::get.
281 * hsa-gen.c (hsa_get_host_function): Likewise.
282 (get_brig_function_name): Likewise.
283 * ipa-hsa.c (process_hsa_functions): Likewise.
284 (ipa_hsa_write_summary): Likewise.
285 * symbol-summary.h (symtab_duplication): Use ::get function/
286 (get): New function.
287
288 2018-06-08 Martin Liska <mliska@suse.cz>
289
290 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
291 of get.
292 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
293 (hsa_register_kernel): Likewise.
294 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
295 * hsa-gen.c (hsa_get_host_function): Likewise.
296 (get_brig_function_name): Likewise.
297 (generate_hsa): Likewise.
298 (pass_gen_hsail::execute): Likewise.
299 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
300 (devirtualization_time_bonus): Likewise.
301 (ipcp_propagate_stage): Likewise.
302 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
303 (edge_set_predicate): Likewise.
304 (evaluate_conditions_for_known_args): Likewise.
305 (evaluate_properties_for_edge): Likewise.
306 (ipa_fn_summary::reset): Likewise.
307 (ipa_fn_summary_t::duplicate): Likewise.
308 (dump_ipa_call_summary): Likewise.
309 (ipa_dump_fn_summary): Likewise.
310 (analyze_function_body): Likewise.
311 (compute_fn_summary): Likewise.
312 (estimate_edge_devirt_benefit): Likewise.
313 (estimate_edge_size_and_time): Likewise.
314 (estimate_calls_size_and_time): Likewise.
315 (estimate_node_size_and_time): Likewise.
316 (inline_update_callee_summaries): Likewise.
317 (remap_edge_change_prob): Likewise.
318 (remap_edge_summaries): Likewise.
319 (ipa_merge_fn_summary_after_inlining): Likewise.
320 (ipa_update_overall_fn_summary): Likewise.
321 (read_ipa_call_summary): Likewise.
322 (inline_read_section): Likewise.
323 (write_ipa_call_summary): Likewise.
324 (ipa_fn_summary_write): Likewise.
325 (ipa_free_fn_summary): Likewise.
326 * ipa-hsa.c (process_hsa_functions): Likewise.
327 (ipa_hsa_write_summary): Likewise.
328 (ipa_hsa_read_section): Likewise.
329 * ipa-icf.c (sem_function::merge): Likewise.
330 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
331 (do_estimate_edge_time): Likewise.
332 (estimate_size_after_inlining): Likewise.
333 (estimate_growth): Likewise.
334 (growth_likely_positive): Likewise.
335 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
336 (inline_call): Likewise.
337 * ipa-inline.c (caller_growth_limits): Likewise.
338 (can_inline_edge_p): Likewise.
339 (can_inline_edge_by_limits_p): Likewise.
340 (compute_uninlined_call_time): Likewise.
341 (compute_inlined_call_time): Likewise.
342 (want_inline_small_function_p): Likewise.
343 (edge_badness): Likewise.
344 (update_caller_keys): Likewise.
345 (update_callee_keys): Likewise.
346 (recursive_inlining): Likewise.
347 (inline_small_functions): Likewise.
348 (inline_to_all_callers_1): Likewise.
349 (dump_overall_stats): Likewise.
350 (early_inline_small_functions): Likewise.
351 (early_inliner): Likewise.
352 * ipa-inline.h (estimate_edge_growth): Likewise.
353 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
354 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
355 * ipa-prop.h (IPA_NODE_REF): Likewise.
356 (IPA_EDGE_REF): Likewise.
357 * ipa-pure-const.c (malloc_candidate_p): Likewise.
358 (propagate_malloc): Likewise.
359 * ipa-split.c (execute_split_functions): Likewise.
360 * symbol-summary.h: Rename get to get_create.
361 (get): Likewise.
362 (get_create): Likewise.
363 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
364
365 2018-06-08 Martin Liska <mliska@suse.cz>
366
367 * symbol-summary.h (release): Move definition out of class
368 declaration.
369 (symtab_removal): Likewise.
370 (symtab_duplication): Likewise.
371
372 2018-06-08 Martin Liska <mliska@suse.cz>
373
374 * symbol-summary.h (function_summary): Move constructor
375 implementation out of class declaration.
376 (release): Likewise.
377 (symtab_insertion): Likewise.
378 (symtab_removal): Likewise.
379 (symtab_duplication): Likewise.
380 (get): Likewise.
381
382 2018-06-08 Martin Liska <mliska@suse.cz>
383
384 * Makefile.in: Remove support for MPX (macros, related functions,
385 fields in cgraph_node, ...).
386 * builtin-types.def (BT_BND): Likewise.
387 (BT_FN_BND_CONST_PTR): Likewise.
388 (BT_FN_CONST_PTR_BND): Likewise.
389 (BT_FN_VOID_PTR_BND): Likewise.
390 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
391 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
392 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
393 (expand_builtin_mempcpy_with_bounds): Likewise.
394 (expand_builtin_memset_with_bounds): Likewise.
395 (expand_builtin_memset_args): Likewise.
396 (std_expand_builtin_va_start): Likewise.
397 (expand_builtin): Likewise.
398 (expand_builtin_with_bounds): Likewise.
399 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
400 (DEF_LIB_BUILTIN_CHKP): Likewise.
401 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
402 (DEF_CHKP_BUILTIN): Likewise.
403 (BUILT_IN_MEMCPY): Likewise.
404 (BUILT_IN_MEMMOVE): Likewise.
405 (BUILT_IN_MEMPCPY): Likewise.
406 (BUILT_IN_MEMSET): Likewise.
407 (BUILT_IN_STPCPY): Likewise.
408 (BUILT_IN_STRCAT): Likewise.
409 (BUILT_IN_STRCHR): Likewise.
410 (BUILT_IN_STRCPY): Likewise.
411 (BUILT_IN_STRLEN): Likewise.
412 (BUILT_IN_MEMCPY_CHK): Likewise.
413 (BUILT_IN_MEMMOVE_CHK): Likewise.
414 (BUILT_IN_MEMPCPY_CHK): Likewise.
415 (BUILT_IN_MEMSET_CHK): Likewise.
416 (BUILT_IN_STPCPY_CHK): Likewise.
417 (BUILT_IN_STRCAT_CHK): Likewise.
418 (BUILT_IN_STRCPY_CHK): Likewise.
419 * calls.c (store_bounds): Likewise.
420 (emit_call_1): Likewise.
421 (special_function_p): Likewise.
422 (maybe_warn_nonstring_arg): Likewise.
423 (initialize_argument_information): Likewise.
424 (finalize_must_preallocate): Likewise.
425 (compute_argument_addresses): Likewise.
426 (expand_call): Likewise.
427 * cfgexpand.c (expand_call_stmt): Likewise.
428 (expand_return): Likewise.
429 (expand_gimple_stmt_1): Likewise.
430 (pass_expand::execute): Likewise.
431 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
432 (cgraph_node::remove): Likewise.
433 (cgraph_node::dump): Likewise.
434 (cgraph_node::verify_node): Likewise.
435 * cgraph.h (chkp_function_instrumented_p): Likewise.
436 (symtab_node::get_alias_target): Likewise.
437 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
438 (cgraph_local_p): Likewise.
439 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
440 (cgraph_edge::rebuild_references): Likewise.
441 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
442 (walk_polymorphic_call_targets): Likewise.
443 (cgraph_node::expand_thunk): Likewise.
444 (symbol_table::output_weakrefs): Likewise.
445 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
446 (ix86_handle_option): Likewise.
447 * config/i386/constraints.md: Likewise.
448 * config/i386/i386-builtin-types.def (BND): Likewise.
449 (VOID): Likewise.
450 (PVOID): Likewise.
451 (ULONG): Likewise.
452 * config/i386/i386-builtin.def (BDESC_END): Likewise.
453 (BDESC_FIRST): Likewise.
454 (BDESC): Likewise.
455 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
456 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
457 * config/i386/i386.c (enum reg_class): Likewise.
458 (ix86_target_string): Likewise.
459 (ix86_option_override_internal): Likewise.
460 (ix86_conditional_register_usage): Likewise.
461 (ix86_valid_target_attribute_inner_p): Likewise.
462 (ix86_set_indirect_branch_type): Likewise.
463 (ix86_set_current_function): Likewise.
464 (ix86_function_arg_regno_p): Likewise.
465 (init_cumulative_args): Likewise.
466 (ix86_function_arg_advance): Likewise.
467 (ix86_function_arg): Likewise.
468 (ix86_pass_by_reference): Likewise.
469 (ix86_function_value_regno_p): Likewise.
470 (ix86_function_value_1): Likewise.
471 (ix86_function_value_bounds): Likewise.
472 (ix86_return_in_memory): Likewise.
473 (ix86_setup_incoming_vararg_bounds): Likewise.
474 (ix86_va_start): Likewise.
475 (indirect_thunk_need_prefix): Likewise.
476 (print_reg): Likewise.
477 (ix86_print_operand): Likewise.
478 (ix86_expand_call): Likewise.
479 (ix86_output_function_return): Likewise.
480 (reg_encoded_number): Likewise.
481 (BDESC_VERIFYS): Likewise.
482 (ix86_init_mpx_builtins): Likewise.
483 (ix86_init_builtins): Likewise.
484 (ix86_emit_cmove): Likewise.
485 (ix86_emit_move_max): Likewise.
486 (ix86_expand_builtin): Likewise.
487 (ix86_builtin_mpx_function): Likewise.
488 (ix86_get_arg_address_for_bt): Likewise.
489 (ix86_load_bounds): Likewise.
490 (ix86_store_bounds): Likewise.
491 (ix86_load_returned_bounds): Likewise.
492 (ix86_store_returned_bounds): Likewise.
493 (ix86_class_likely_spilled_p): Likewise.
494 (ix86_hard_regno_mode_ok): Likewise.
495 (x86_order_regs_for_local_alloc): Likewise.
496 (ix86_mitigate_rop): Likewise.
497 (ix86_bnd_prefixed_insn_p): Likewise.
498 (ix86_mpx_bound_mode): Likewise.
499 (ix86_make_bounds_constant): Likewise.
500 (ix86_initialize_bounds): Likewise.
501 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
502 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
503 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
504 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
505 (TARGET_CHKP_BOUND_MODE): Likewise.
506 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
507 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
508 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
509 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
510 * config/i386/i386.h (TARGET_MPX): Likewise.
511 (TARGET_MPX_P): Likewise.
512 (VALID_BND_REG_MODE): Likewise.
513 (FIRST_BND_REG): Likewise.
514 (LAST_BND_REG): Likewise.
515 (enum reg_class): Likewise.
516 (BND_REG_P): Likewise.
517 (BND_REGNO_P): Likewise.
518 (BNDmode): Likewise.
519 (ADJUST_INSN_LENGTH): Likewise.
520 * config/i386/i386.md: Likewise.
521 * config/i386/i386.opt: Likewise.
522 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
523 (defined): Likewise.
524 (LINK_MPX): Likewise.
525 (MPX_SPEC): Likewise.
526 (LIBMPX_SPEC): Likewise.
527 (LIBMPXWRAPPERS_SPEC): Likewise.
528 (CHKP_SPEC): Likewise.
529 * config/i386/predicates.md: Likewise.
530 * dbxout.c (dbxout_type): Likewise.
531 * doc/extend.texi: Likewise.
532 * doc/invoke.texi: Likewise.
533 * doc/md.texi: Likewise.
534 * doc/tm.texi: Likewise.
535 * doc/tm.texi.in: Likewise.
536 * dwarf2out.c (is_base_type): Likewise.
537 (gen_formal_types_die): Likewise.
538 (gen_subprogram_die): Likewise.
539 (gen_type_die_with_usage): Likewise.
540 (gen_decl_die): Likewise.
541 (dwarf2out_late_global_decl): Likewise.
542 * expr.c (expand_assignment): Likewise.
543 (emit_storent_insn): Likewise.
544 (store_expr_with_bounds): Likewise.
545 (store_expr): Likewise.
546 (expand_expr_real_1): Likewise.
547 * expr.h (store_expr_with_bounds): Likewise.
548 * function.c (use_register_for_decl): Likewise.
549 (struct bounds_parm_data): Likewise.
550 (assign_parms_augmented_arg_list): Likewise.
551 (assign_parm_find_entry_rtl): Likewise.
552 (assign_parm_is_stack_parm): Likewise.
553 (assign_parm_load_bounds): Likewise.
554 (assign_bounds): Likewise.
555 (assign_parms): Likewise.
556 (expand_function_start): Likewise.
557 * gcc.c (CHKP_SPEC): Likewise.
558 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
559 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
560 (wrestrict_dom_walker::check_call): Likewise.
561 * gimple.c (gimple_build_call_from_tree): Likewise.
562 * gimple.h (enum gf_mask): Likewise.
563 (gimple_call_with_bounds_p): Likewise.
564 (gimple_call_set_with_bounds): Likewise.
565 * gimplify.c (gimplify_init_constructor): Likewise.
566 * ipa-cp.c (initialize_node_lattices): Likewise.
567 (propagate_constants_across_call): Likewise.
568 (find_more_scalar_values_for_callers_subset): Likewise.
569 * ipa-hsa.c (process_hsa_functions): Likewise.
570 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
571 * ipa-icf.c (sem_function::merge): Likewise.
572 * ipa-inline.c (early_inliner): Likewise.
573 * ipa-pure-const.c (warn_function_noreturn): Likewise.
574 (warn_function_cold): Likewise.
575 (propagate_pure_const): Likewise.
576 * ipa-ref.h (enum GTY): Likewise.
577 * ipa-split.c (find_retbnd): Likewise.
578 (consider_split): Likewise.
579 (split_function): Likewise.
580 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
581 * ipa.c (walk_polymorphic_call_targets): Likewise.
582 (symbol_table::remove_unreachable_nodes): Likewise.
583 (process_references): Likewise.
584 (cgraph_build_static_cdtor_1): Likewise.
585 * lto-cgraph.c (lto_output_node): Likewise.
586 (output_refs): Likewise.
587 (compute_ltrans_boundary): Likewise.
588 (input_overwrite_node): Likewise.
589 (input_node): Likewise.
590 (input_cgraph_1): Likewise.
591 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
592 * passes.c (pass_manager::execute_early_local_passes): Likewise.
593 (class pass_chkp_instrumentation_passes): Likewise.
594 (make_pass_chkp_instrumentation_passes): Likewise.
595 * passes.def: Likewise.
596 * rtl.h (struct GTY): Likewise.
597 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
598 * stor-layout.c (layout_type): Likewise.
599 * symtab.c: Likewise.
600 * target.def: Likewise.
601 * targhooks.c (default_chkp_bound_type): Likewise.
602 (default_chkp_bound_mode): Likewise.
603 (default_builtin_chkp_function): Likewise.
604 (default_chkp_function_value_bounds): Likewise.
605 (default_chkp_make_bounds_constant): Likewise.
606 (default_chkp_initialize_bounds): Likewise.
607 * targhooks.h (default_chkp_bound_type): Likewise.
608 (default_chkp_bound_mode): Likewise.
609 (default_builtin_chkp_function): Likewise.
610 (default_chkp_function_value_bounds): Likewise.
611 (default_chkp_make_bounds_constant): Likewise.
612 (default_chkp_initialize_bounds): Likewise.
613 * toplev.c (compile_file): Likewise.
614 (process_options): Likewise.
615 * tree-core.h (DEF_BUILTIN): Likewise.
616 (DEF_BUILTIN_CHKP): Likewise.
617 * tree-inline.c (declare_return_variable): Likewise.
618 (remap_gimple_stmt): Likewise.
619 (copy_bb): Likewise.
620 (initialize_inlined_parameters): Likewise.
621 (expand_call_inline): Likewise.
622 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
623 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
624 (make_pass_ipa_chkp_produce_thunks): Likewise.
625 (make_pass_chkp): Likewise.
626 (make_pass_chkp_opt): Likewise.
627 (make_pass_chkp_instrumentation_passes): Likewise.
628 * tree-pretty-print.c (dump_generic_node): Likewise.
629 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
630 * tree-ssa-dce.c (propagate_necessity): Likewise.
631 (eliminate_unnecessary_stmts): Likewise.
632 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
633 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
634 * tree-ssa-sccvn.h: Likewise.
635 * tree-ssa-strlen.c (get_string_length): Likewise.
636 (valid_builtin_call): Likewise.
637 (adjust_last_stmt): Likewise.
638 (handle_builtin_strchr): Likewise.
639 (handle_builtin_strcpy): Likewise.
640 (handle_builtin_stxncpy): Likewise.
641 (handle_builtin_memcpy): Likewise.
642 (handle_builtin_strcat): Likewise.
643 (strlen_check_and_optimize_stmt): Likewise.
644 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
645 * tree-streamer-in.c: Likewise.
646 * tree-streamer.c (record_common_node): Likewise.
647 * tree.c (tree_code_size): Likewise.
648 (wide_int_to_tree_1): Likewise.
649 (type_contains_placeholder_1): Likewise.
650 (build_common_tree_nodes): Likewise.
651 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
652 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
653 (POINTER_BOUNDS_P): Likewise.
654 (BOUNDED_TYPE_P): Likewise.
655 (BOUNDED_P): Likewise.
656 (CALL_WITH_BOUNDS_P): Likewise.
657 (pointer_bounds_type_node): Likewise.
658 * value-prof.c (gimple_ic): Likewise.
659 * var-tracking.c (vt_add_function_parameters): Likewise.
660 * varasm.c (make_decl_rtl): Likewise.
661 (assemble_start_function): Likewise.
662 (output_constant): Likewise.
663 (maybe_assemble_visibility): Likewise.
664 * varpool.c (ctor_for_folding): Likewise.
665 * chkp-builtins.def: Remove.
666 * ipa-chkp.c: Remove.
667 * ipa-chkp.h: Remove.
668 * rtl-chkp.c: Remove.
669 * rtl-chkp.h: Remove.
670 * tree-chkp-opt.c: Remove.
671 * tree-chkp.c: Remove.
672 * tree-chkp.h: Remove.
673
674 2018-06-07 Carl Love <cel@us.ibm.com>
675
676 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
677 vextract_fp_from_shortl): Add BE support.
678
679 2018-06-07 Paul Koning <ni1d@arrl.net>
680
681 * compare-elim.c (try_merge_compare): Don't merge compare if
682 address contains a side effect.
683 (try_eliminate_compare): Likewise.
684
685 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
686
687 * config.gcc: Support "tremont".
688 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
689 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
690 PROCESSOR_TREMONT.
691 * config/i386/i386.c (m_TREMONT): Define.
692 (processor_target_table): Add "tremont".
693 (PTA_TREMONT): Define.
694 (ix86_lea_outperforms): Add TARGET_TREMONT.
695 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
696 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
697 and M_INTEL_GOLDMONT_PLUS.
698 (fold_builtin_cpu): Add "tremont".
699 (ix86_add_stmt_cost): Add TARGET_TREMONT.
700 (ix86_option_override_internal): Add "tremont".
701 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
702 (processor_type): Add PROCESSOR_TREMONT.
703 * config/i386/x86-tune.def: Add m_TREMONT.
704 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
705
706 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
707
708 * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
709 symbol defined for msp430i* devices to be lower case.
710
711 gcc/testsuite/gcc.target/msp430/
712 * msp430i-device-symbol.c: New test.
713 * msp430f-device-symbol.c: New test.
714 * msp430.h: New test header file.
715
716 2018-06-07 Richard Biener <rguenther@suse.de>
717
718 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
719 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
720 Properly wrap signed arithmetic if overflow wraps.
721
722 2018-06-07 Jakub Jelinek <jakub@redhat.com>
723
724 PR tree-optimization/69615
725 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
726 of a cast from a same precision integral SSA_NAME in a bb dominated
727 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
728 cast to utype if rhs2 has already a compatible type.
729
730 2018-06-07 Richard Biener <rguenther@suse.de>
731
732 PR tree-optimization/85935
733 * graphite-scop-detection.c (find_params_in_bb): Analyze
734 condition operands with respect to the correct loop. Assert
735 the analysis doesn't fail.
736
737 2018-06-04 Carl Love <cel@us.ibm.com>
738
739 * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
740 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
741 as it is slightly cheaper.
742 (first_match_or_eos_index_<mode>):
743 Calculate index using natural element order.
744 (first_match_index_<mode>):
745 Calculate index using natural element order.
746 (first_match_or_eos_index_<mode>):
747 Calculate index using natural order.
748 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
749 for BE and LE modes.
750 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
751 P9V_BUILTIN_VCLZLSBB_V16QI.
752 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
753 specific.
754
755 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
756
757 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
758 indentation and line wrap for many prototypes. Add missing
759 @smallexample directives around block of prototypes for vec_xl and
760 vec_xst.
761
762 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
763
764 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
765 track if we pass or return IEEE 128-bit floating point.
766 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
767 C++ mangling that is compatible with GCC 8.1.
768 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
769 (init_cumulative_args): Note if we pass or return IEEE 128-bit
770 floating point types.
771 (rs6000_function_arg_advance_1): Likewise.
772 (rs6000_mangle_type): Optionally generate mangled names that match
773 what GCC 8.1 generated for IEEE 128-bit floating point types.
774 (rs6000_globalize_decl_name): If we have an external function that
775 passes or returns IEEE 128-bit types, generate a weak reference
776 from the mangled name used in GCC 8.1 to the current mangled
777 name.
778 (rs6000_init_builtins): Make __ibm128 use the long double type if
779 long double is IBM extended double. Make __float128 use the long
780 double type if long double is IEEE 128-bit.
781
782 PR target/85657
783 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
784 macro for __ibm128 built-in functions.
785 (PACK_IF): Add __ibm128 pack/unpack functions.
786 (UNPACK_IF): Likewise.
787 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
788 enable long double built-in functions if long double is IEEE
789 128-bit floating point.
790 (rs6000_invalid_builtin): Update long double built-in function
791 error message.
792 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
793 functions, adjust the built-in function to use the long double
794 built-in function if __ibm128 and long double are the same type.
795 * doc/extend.texi (PowerPC builtins): Update documention for
796 __builtin_{,un}pack_longdouble. Add documentation for
797 __builtin_{,un}pack_ibm128.
798
799 2018-06-06 Jim Wilson <jimw@sifive.com>
800
801 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
802 (struct machine_function): New field interrupt_mode.
803 (riscv_handle_type_attribute): New function. Add forward declaration.
804 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
805 (riscv_expand_epilogue): Check interrupt_mode field.
806 (riscv_set_current_function): Check interrupt attribute args and
807 set interrupt_mode field.
808 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
809 (riscv_sret, riscv_uret): New.
810 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
811 new arguments to interrupt attribute.
812
813 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
814
815 PR target/63177
816 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
817 Don't handle -mcpu=power8 if -mpower9-vector is also used.
818
819 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
820
821 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
822 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
823 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
824 several redundant entries.
825
826 2018-06-06 David Malcolm <dmalcolm@redhat.com>
827
828 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
829 type from "rtx" to "rtx_insn *".
830 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
831 for local "call_insn", removing cast.
832 (ix86_expand_call): Likewise, introducing a "call_insn" local.
833
834 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
835
836 PR tree-optimization/86066
837 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
838 for BIT_INSERT_EXPR stores.
839
840 2018-06-06 Richard Biener <rguenther@suse.de>
841
842 PR tree-optimization/86062
843 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
844 component refs ontop
845 of to be offsetted base.
846
847 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
848
849 * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
850 to be static and remove check on interrupt attribute name.
851
852 gcc/testsuite/gcc.target/msp430/
853 * function-attributes-4.c: New test.
854 * static-interrupts.c: New test.
855
856 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
857
858 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
859 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
860
861 2018-06-05 Steve Ellcey <sellcey@cavium.com>
862
863 PR target/79924
864 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
865 second argument.
866 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
867 Remove second argument, change how error is called.
868 (aarch64_layout_arg): Remove second argument from
869 aarch64_err_no_fpadvsimd call.
870 (aarch64_init_cumulative_args): Ditto.
871 (aarch64_gimplify_va_arg_expr): Ditto.
872 * config/aarch64/aarch64.md (mov<mode>): Ditto.
873
874 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
875
876 * config/i386/i386.md (simple_return_indirect_internal): New expander.
877 (*simple_return_indirect_internal<mode>): Rename from
878 simple_return_indirect_internal. Use W mode iterator.
879 (rstorssp): New expander.
880 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
881 (clrssbsy): New expander.
882 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
883
884 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
885
886 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
887 __typeof__.
888 (cmse_check_pointed_object): Likewise.
889
890 2018-06-05 Martin Liska <mliska@suse.cz>
891
892 PR gcov-profile/47618
893 * doc/invoke.texi: Document how -fprofile-dir format
894 is extended.
895
896 2018-06-05 Richard Biener <rguenther@suse.de>
897
898 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
899 removal pretend DOM info isn't available so we do not update
900 it and only remove edges, not dominated blocks. Actually free
901 DOM info in case we removed something. Remove unreachable blocks.
902 (mfb_keep_latches): Work with either DOM info or marked backedges.
903 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
904 first. Mark backedges if DOM info isn't available.
905 (Re-)compute DOM info after cleanup_control_flow_pre.
906
907 2018-06-05 Richard Biener <rguenther@suse.de>
908
909 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
910 (locus_discrim_hasher::hash): Adjust.
911 (locus_discrim_hasher::equal): Likewise.
912 (next_discriminator_for_locus): Work on line directly.
913 (same_line_p): Pass in expanded locus1 as well.
914 (assign_discriminators): Avoid redundant location expansions.
915
916 2018-06-05 Richard Biener <rguenther@suse.de>
917
918 PR tree-optimization/86046
919 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
920 if required after clearing TREE_ADDRESSABLE.
921
922 2018-06-05 Richard Biener <rguenther@suse.de>
923
924 PR tree-optimization/86047
925 * tree-ssa-loop.c (for_each_index): Glob handling of all
926 decls and constants and really handle all of them.
927
928 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
929
930 PR target/81497
931 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
932 qualifier_void_pointer and qualifier_const_void_pointer.
933 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
934 (arm_init_builtins): Handle the above.
935 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
936 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
937 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
938 void intrinsics.
939
940 2018-06-05 Martin Liska <mliska@suse.cz>
941
942 * auto-profile.c (read_autofdo_file): Do not use
943 gcov_ctr_summary struct.
944 (afdo_callsite_hot_enough_for_early_inline): Likewise.
945 * coverage.c (struct counts_entry): Likewise.
946 (read_counts_file): Read just single summary entry.
947 (get_coverage_counts): Use gcov_summary struct.
948 * coverage.h (get_coverage_counts): Likewise.
949 * gcov-dump.c (dump_working_sets): Likewise.
950 (tag_summary): Dump just single summary.
951 * gcov-io.c (gcov_write_summary): Write just histogram
952 summary.
953 (gcov_read_summary): Read just single summary.
954 (compute_working_sets): Use gcov_summary struct.
955 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
956 of GCOV_COUNTERS_SUMMABLE.
957 (GCOV_COUNTERS_SUMMABLE): Remove.
958 (GCOV_FIRST_VALUE_COUNTER): Replace with
959 GCOV_COUNTER_V_INTERVAL.
960 (struct gcov_ctr_summary): Remove.
961 (struct gcov_summary): Directly use fields of former
962 gcov_ctr_summary.
963 (compute_working_sets): Use gcov_summary struct.
964 * gcov.c (read_count_file): Do not use ctrs fields.
965 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
966 struct.
967 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
968 struct.
969 * profile.c: Likewise.
970 * profile.h: Likewise.
971
972 2018-06-05 Martin Liska <mliska@suse.cz>
973
974 PR gcov-profile/84846
975 * gcov.c (output_lines): Print working directory only
976 in intermediate format.
977
978 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
979
980 * config/s390/s390-builtin-types.def: Add void function type.
981 * config/s390/s390-builtins.def: Use the function type for the
982 tbeginc builtin.
983
984 2018-06-04 Jim Wilson <jimw@sifive.com>
985
986 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
987 to int.
988 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
989 and maybe_eh_return. Change regno to unsigned int. Use new args to
990 handle EH_RETURN_DATA_REGNO registers properly.
991 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
992 (riscv_expand_epilogue): Update comment. Change argument name and
993 type. Update code to use new name and type. Pass new args to
994 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
995 EXCEPTION_RETURN.
996 * config/riscv/riscv.md (NORMAL_RETURN): New.
997 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
998 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
999 (eh_return): Call gen_eh_return_internal and emit barrier.
1000 (eh_return_internal): Call riscv_expand_epilogue.
1001
1002 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
1003
1004 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
1005 bit_insertion field and declare can_be_merged_into method.
1006 (merged_store_group::can_be_merged_into): New method.
1007 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
1008 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
1009 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
1010
1011 2018-06-04 Richard Biener <rguenther@suse.de>
1012
1013 PR tree-optimization/85955
1014 * builtins.c (fold_builtin_sincos): Convert pointers to
1015 destination to appropriate type before dereferencing.
1016
1017 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
1018
1019 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
1020
1021 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
1022
1023 * expr.c (expand_expr_real_1): Force the operand into memory if
1024 its TYPE_MODE is BLKmode and if there is no integer mode for
1025 the number of bits being extracted.
1026
1027 2018-06-04 Jakub Jelinek <jakub@redhat.com>
1028
1029 PR target/85832
1030 PR target/86036
1031 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
1032 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
1033
1034 2018-06-04 Richard Biener <rguenther@suse.de>
1035
1036 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
1037 (cleanup_tree_cfg_noloop): ... single caller. Do
1038 start_recording_case_labels later.
1039
1040 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
1041
1042 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
1043 to _IMMINTRIN_H_INCLUDED.
1044 * config/i386/pconfigintrin.h: Ditto.
1045 * config/i386/waitpkgintrin.h: Ditto.
1046 * config/i386/immintrin.h: Add includes for sgxintrin.h,
1047 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
1048 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
1049 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
1050 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
1051 waitpkgintrin.h and cldemoteintrin.h.
1052
1053 2018-06-04 Richard Biener <rguenther@suse.de>
1054
1055 PR tree-optimization/86038
1056 * tracer.c (find_best_successor): Check probability for
1057 being initialized, bail out if not.
1058
1059 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
1060
1061 PR target/86003
1062 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
1063 of bits to ignore when comparing architectures.
1064
1065 2018-06-04 Jakub Jelinek <jakub@redhat.com>
1066
1067 PR tree-optimization/69615
1068 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
1069 maximum or minimum of the type, try to merge it also as if
1070 range1 is + [-, x - 1] or + [x + 1, -].
1071
1072 PR c++/86025
1073 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
1074
1075 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
1076
1077 PR tree-optimization/86034
1078 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
1079 the unsigned bitfield type in a bit insertion sequence if it does not
1080 have a larger precision than the bitfield size.
1081 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
1082
1083 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
1084
1085 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
1086
1087 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
1088
1089 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
1090 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
1091 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
1092 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
1093
1094 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
1095
1096 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
1097 Disable -fdelete-null-pointer-checks for ELF toolchain.
1098
1099 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
1100 Kito Cheng <kito.cheng@gmail.com>
1101
1102 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
1103 (nds32le-*-*, nds32be-*-*): Integrate checking process.
1104 (nds32*-*-*): Add glibc and uclibc conditions.
1105 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
1106 (TARGET_EXCEPT_UNWIND_INFO): Define.
1107 * config/nds32/elf.h: New file.
1108 * config/nds32/linux.h: New file.
1109 * config/nds32/nds32-elf.opt: New file.
1110 * config/nds32/nds32-linux.opt: New file.
1111 * config/nds32/nds32-fp-as-gp.c
1112 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
1113 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
1114 TARGET_LINUX_ABI.
1115 (nds32_asm_file_end): Ditto.
1116 (nds32_print_operand): Ditto.
1117 (nds32_insert_attributes): Ditto.
1118 (nds32_init_libfuncs): New function.
1119 (TARGET_HAVE_TLS): Define.
1120 (TARGET_INIT_LIBFUNCS): Define.
1121 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
1122 spec content.
1123 (TARGET_ELF): Apply different mcmodel setting.
1124 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
1125 been migrated into elf.h and linux.h files.
1126 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
1127 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
1128 (mcmodel): The content has been migrated into nds32-elf.opt and
1129 nds32-linux.opt files.
1130 * config/nds32/t-elf: New file.
1131 * config/nds32/t-linux: New file.
1132
1133 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
1134 Shiva Chen <shiva0217@gmail.com>
1135
1136 * config/nds32/constants.md (unspec_volatile_element): Add
1137 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
1138 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
1139 optimization.
1140 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
1141 (make_pass_nds32_fp_as_gp): Declare.
1142 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
1143 optmization pass.
1144 (nds32_asm_function_end_prologue): Remove unused asm output.
1145 (nds32_asm_function_begin_epilogue): Remove unused asm output.
1146 (nds32_asm_file_start): Output necessary fp_as_gp information.
1147 (nds32_option_override): Adjust register usage.
1148 (nds32_expand_prologue): Consider fp_as_gp situation.
1149 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
1150 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
1151 (epilogue): Ditto.
1152 (return): Ditto.
1153 (simple_return): Ditto.
1154 (omit_fp_begin): Output special directive for fp_as_gp.
1155 (omit_fp_end): Output special directive for fp_as_gp.
1156 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
1157 mforbid-fp-as-gp): New options.
1158
1159 2018-06-01 Mark Wielaard <mark@klomp.org>
1160
1161 * dwarf2out.c (dwarf2out_finish): Remove generation of
1162 DW_AT_loclists_base.
1163
1164 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
1165
1166 * gimple-ssa-store-merging.c: Include gimple-fold.h.
1167 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
1168 (struct merged_store_group): Add bit_insertion field.
1169 (dump_char_array): Use standard hexadecimal format.
1170 (merged_store_group::merged_store_group): Set bit_insertion to false.
1171 (merged_store_group::apply_stores): Use optimal buffer size. Deal
1172 with BIT_INSERT_EXPR stores. Move up code updating the mask and
1173 also print the mask in the dump file.
1174 (pass_store_merging::gate): Minor tweak.
1175 (imm_store_chain_info::coalesce_immediate): Fix wrong association
1176 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
1177 stores with INTEGER_CST stores.
1178 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
1179 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
1180 and use it throughout. Generate bit insertion sequences if need be.
1181 (pass_store_merging::process_store): Remove redundant condition.
1182 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
1183
1184 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
1185
1186 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
1187 the 128-bit floating point types. Fix function comment.
1188
1189 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1190
1191 * config/aarch64/aarch64-simd.md
1192 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
1193 mnemonics.
1194 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
1195 mnemonics.
1196
1197 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
1198
1199 PR tree-optimization/85989
1200 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
1201 variable.
1202 (backprop::intersect_uses): Check it when deciding whether this
1203 is a backedge reference.
1204 (backprop::process_block): Add each phi to m_visited_phis
1205 after visiting it, then clear it at the end.
1206
1207 2018-06-01 Richard Biener <rguenther@suse.de>
1208
1209 * tree-vectorizer.h (vect_dr_stmt): New function.
1210 (vect_get_load_cost): Adjust.
1211 (vect_get_store_cost): Likewise.
1212 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
1213 Use vect_dr_stmt instead of DR_SMTT.
1214 (vect_record_base_alignments): Likewise.
1215 (vect_calculate_target_alignment): Likewise.
1216 (vect_compute_data_ref_alignment): Likewise and make static.
1217 (vect_update_misalignment_for_peel): Likewise.
1218 (vect_verify_datarefs_alignment): Likewise.
1219 (vector_alignment_reachable_p): Likewise.
1220 (vect_get_data_access_cost): Likewise. Pass down
1221 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
1222 (vect_get_peeling_costs_all_drs): Likewise.
1223 (vect_peeling_hash_get_lowest_cost): Likewise.
1224 (vect_enhance_data_refs_alignment): Likewise.
1225 (vect_find_same_alignment_drs): Likewise.
1226 (vect_analyze_data_refs_alignment): Likewise.
1227 (vect_analyze_group_access_1): Likewise.
1228 (vect_analyze_group_access): Likewise.
1229 (vect_analyze_data_ref_access): Likewise.
1230 (vect_analyze_data_ref_accesses): Likewise.
1231 (vect_vfa_segment_size): Likewise.
1232 (vect_small_gap_p): Likewise.
1233 (vectorizable_with_step_bound_p): Likewise.
1234 (vect_prune_runtime_alias_test_list): Likewise.
1235 (vect_analyze_data_refs): Likewise.
1236 (vect_supportable_dr_alignment): Likewise.
1237 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1238 (vect_gen_prolog_loop_niters): Likewise.
1239 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1240 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
1241 modify DR_STMT.
1242 (vect_recog_mask_conversion_pattern): Likewise.
1243 (vect_try_gather_scatter_pattern): Likewise.
1244 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
1245 to vect_get_store_cost.
1246 (vect_get_store_cost): Get stmt_info instead of DR.
1247 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
1248 (vect_get_load_cost): Get stmt_info instead of DR.
1249
1250 2018-06-01 Richard Biener <rguenther@suse.de>
1251
1252 PR middle-end/86017
1253 * gimple-fold.c (var_decl_component_p): Also allow offsetted
1254 vars wrapped in MEM_REFs.
1255
1256 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
1257
1258 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
1259 Fix subreg tests so that we only return a choice between
1260 GENERAL_REGS and FP_REGS if the original classes included both.
1261
1262 2018-06-01 Richard Biener <rguenther@suse.de>
1263
1264 PR ipa/85960
1265 * tree-ssa-structalias.c (get_function_part_constraint):
1266 Handle NULL fi->decl.
1267 (find_func_aliases_for_call): Properly handle indirect
1268 fi from direct call.
1269 (find_func_clobbers): Likewise.
1270 (ipa_pta_execute): Likewise.
1271 (create_variable_info_for): For functions that are ifunc_resolver
1272 resolve to a varinfo that contains the result of the resolver call.
1273 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
1274 aliases.
1275
1276 2018-05-31 Michael Collison <michael.collison@arm.com>
1277
1278 * config/aarch64/aarch64.md:
1279 (*fix_to_zero_extenddfdi2): New pattern.
1280 * gcc.target/aarch64/fix_extend1.c: New testcase.
1281
1282 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
1283
1284 PR middle-end/78809
1285 PR middle-end/83026
1286 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
1287 and BUILT_IN_STRNCMP_EQ.
1288 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
1289 BUILT_IN_STRNCMP_EQ.
1290 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
1291 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
1292 (gimple_fold_builtin): Likewise.
1293 * tree-ssa-strlen.c (compute_string_length): New function.
1294 (determine_min_obsize): New function.
1295 (handle_builtin_string_cmp): New function to handle calls to
1296 string compare functions.
1297 (strlen_optimize_stmt): Add handling to builtin string compare
1298 calls.
1299 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
1300 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
1301 * tree.c (build_common_builtin_nodes): Add new defines of
1302 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
1303
1304 2018-05-31 Jakub Jelinek <jakub@redhat.com>
1305
1306 PR target/85984
1307 * bb-reorder.c (pass_partition_blocks::gate): Return false for
1308 functions with naked attribute.
1309
1310 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
1311
1312 * config/i386/sse.md (avx_vec_concat<mode>):
1313 Substitute concat_tg_mode mode attribute with xtg_mode.
1314 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
1315 (concat_tg_mode): Remove mode attribute.
1316
1317 2018-05-31 Martin Sebor <msebor@redhat.com>
1318
1319 PR c/82063
1320 * calls.c (alloc_max_size): Correct a logic error/typo.
1321 Treat excessive arguments as infinite. Warn for invalid arguments.
1322 * doc/invoke.texi (-Walloc-size-larger-than): Update.
1323
1324 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
1325
1326 PR target/85829
1327 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
1328 and movx for Haswell.
1329
1330 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
1331 Cesar Philippidis <cesar@codesourcery.com>
1332
1333 PR middle-end/85879
1334 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
1335 when emitting error on private/firstprivate reductions.
1336 * omp-low.c (lower_omp_target): Avoid reference-type processing
1337 on pointers for firstprivate clause.
1338
1339 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
1340
1341 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
1342 (st1x2): Likewise.
1343 (st1x3): Likewise.
1344 * config/aarch64/aarch64-simd.md
1345 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
1346 (aarch64_ld1_x3_<mode>): Likewise
1347 (aarch64_st1x2<VALLDIF:mode>): Likewise
1348 (aarch64_st1_x2_<mode>): Likewise
1349 (aarch64_st1x3<VALLDIF:mode>): Likewise
1350 (aarch64_st1_x3_<mode>): Likewise
1351 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
1352 (vld1_s8_x3): Likewise.
1353 (vld1_u16_x3): Likewise.
1354 (vld1_s16_x3): Likewise.
1355 (vld1_u32_x3): Likewise.
1356 (vld1_s32_x3): Likewise.
1357 (vld1_u64_x3): Likewise.
1358 (vld1_s64_x3): Likewise.
1359 (vld1_f16_x3): Likewise.
1360 (vld1_f32_x3): Likewise.
1361 (vld1_f64_x3): Likewise.
1362 (vld1_p8_x3): Likewise.
1363 (vld1_p16_x3): Likewise.
1364 (vld1_p64_x3): Likewise.
1365 (vld1q_u8_x3): Likewise.
1366 (vld1q_s8_x3): Likewise.
1367 (vld1q_u16_x3): Likewise.
1368 (vld1q_s16_x3): Likewise.
1369 (vld1q_u32_x3): Likewise.
1370 (vld1q_s32_x3): Likewise.
1371 (vld1q_u64_x3): Likewise.
1372 (vld1q_s64_x3): Likewise.
1373 (vld1q_f16_x3): Likewise.
1374 (vld1q_f32_x3): Likewise.
1375 (vld1q_f64_x3): Likewise.
1376 (vld1q_p8_x3): Likewise.
1377 (vld1q_p16_x3): Likewise.
1378 (vld1q_p64_x3): Likewise.
1379 (vst1_s64_x2): Likewise.
1380 (vst1_u64_x2): Likewise.
1381 (vst1_f64_x2): Likewise.
1382 (vst1_s8_x2): Likewise.
1383 (vst1_p8_x2): Likewise.
1384 (vst1_s16_x2): Likewise.
1385 (vst1_p16_x2): Likewise.
1386 (vst1_s32_x2): Likewise.
1387 (vst1_u8_x2): Likewise.
1388 (vst1_u16_x2): Likewise.
1389 (vst1_u32_x2): Likewise.
1390 (vst1_f16_x2): Likewise.
1391 (vst1_f32_x2): Likewise.
1392 (vst1_p64_x2): Likewise.
1393 (vst1q_s8_x2): Likewise.
1394 (vst1q_p8_x2): Likewise.
1395 (vst1q_s16_x2): Likewise.
1396 (vst1q_p16_x2): Likewise.
1397 (vst1q_s32_x2): Likewise.
1398 (vst1q_s64_x2): Likewise.
1399 (vst1q_u8_x2): Likewise.
1400 (vst1q_u16_x2): Likewise.
1401 (vst1q_u32_x2): Likewise.
1402 (vst1q_u64_x2): Likewise.
1403 (vst1q_f16_x2): Likewise.
1404 (vst1q_f32_x2): Likewise.
1405 (vst1q_f64_x2): Likewise.
1406 (vst1q_p64_x2): Likewise.
1407 (vst1_s64_x3): Likewise.
1408 (vst1_u64_x3): Likewise.
1409 (vst1_f64_x3): Likewise.
1410 (vst1_s8_x3): Likewise.
1411 (vst1_p8_x3): Likewise.
1412 (vst1_s16_x3): Likewise.
1413 (vst1_p16_x3): Likewise.
1414 (vst1_s32_x3): Likewise.
1415 (vst1_u8_x3): Likewise.
1416 (vst1_u16_x3): Likewise.
1417 (vst1_u32_x3): Likewise.
1418 (vst1_f16_x3): Likewise.
1419 (vst1_f32_x3): Likewise.
1420 (vst1_p64_x3): Likewise.
1421 (vst1q_s8_x3): Likewise.
1422 (vst1q_p8_x3): Likewise.
1423 (vst1q_s16_x3): Likewise.
1424 (vst1q_p16_x3): Likewise.
1425 (vst1q_s32_x3): Likewise.
1426 (vst1q_s64_x3): Likewise.
1427 (vst1q_u8_x3): Likewise.
1428 (vst1q_u16_x3): Likewise.
1429 (vst1q_u32_x3): Likewise.
1430 (vst1q_u64_x3): Likewise.
1431 (vst1q_f16_x3): Likewise.
1432 (vst1q_f32_x3): Likewise.
1433 (vst1q_f64_x3): Likewise.
1434 (vst1q_p64_x3): Likewise.
1435
1436 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1437
1438 * config/msp430/msp430.c (msp430_output_labelref): Prepend
1439 user_label_prefix to name.
1440
1441 * tree-core.h: Update comment about the format of NAME string
1442 passed to handler in attribute_spec.
1443
1444 * config/msp430/msp430.md: Remove erroneous subreg expression from
1445 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
1446 zero_extend{q,h}isi2.
1447
1448 2018-05-30 Borislav Petkov <bp@suse.de>
1449
1450 * doc/extend.texi: Document some architecture specific
1451 constraints and sort entries.
1452
1453 2018-05-30 Martin Sebor <msebor@redhat.com>
1454
1455 PR middle-end/85369
1456 * builtins.c (expand_builtin_stpcpy_1): New function.
1457 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
1458 only if the former succeeds.
1459
1460 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
1461
1462 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
1463 in saphira.
1464
1465 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
1466
1467 * doc/invoke.texi (-flinker-output): Document
1468
1469 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
1470
1471 * passes.c (ipa_write_summaries): Only modify statements if body
1472 is in memory.
1473 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
1474 incrementally linking.
1475 (ipa_passes): Likewise.
1476 * lto-cgraph.c (lto_output_node): When incrementally linking do not
1477 pass down resolution info.
1478 * common.opt (flag_incremental_link): Update info.
1479 * gcc.c (plugin specs): Turn flinker-output=* to
1480 -plugin-opt=-linker-output-known
1481 * toplev.c (compile_file): Also cut compilation when doing incremental
1482 link.
1483 * flag-types. (enum lto_partition_model): Add
1484 LTO_LINKER_OUTPUT_NOLTOREL.
1485 (invoke.texi): Add -flinker-output docs.
1486 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
1487 link same way as WPA; do not stream in dead initializers.
1488
1489 * dwarf2out.c (dwarf2out_die_ref_for_decl,
1490 darf2out_register_external_decl): Support incremental link.
1491
1492 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
1493
1494 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
1495
1496 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
1497
1498 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
1499 it down to simple_object_copy_lto_debug_sections.
1500 (run_gcc): Determine incremental LTO link time and configure
1501 lto1 into non-wpa mode, disable renaming of debug sections.
1502
1503 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
1504
1505 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
1506 descriptions of various incorrectly documented functions.
1507
1508 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
1509
1510 Revert:
1511 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1512 address check not strict.
1513
1514 2018-05-30 Richard Biener <rguenther@suse.de>
1515
1516 PR tree-optimization/85964
1517 * tracer.c (better_p): Drop initialized count check, we only
1518 call the function with initialized counts now.
1519 (find_best_successor): Do find a best edge if one
1520 has uninitialized count.
1521 (find_best_predecessor): Likewise. Do BB frequency check only
1522 if count is initialized.
1523
1524 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
1525
1526 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
1527 (aarch64_ldrstr_offset_compare): New.
1528 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
1529 load/store orderings.
1530 (aarch64_gen_adjusted_ldpstp): Likewise.
1531
1532 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
1533
1534 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
1535 Check for subset of GENERAL_REGS and FP_REGS.
1536 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
1537 r=w alternative.
1538
1539 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
1540
1541 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
1542 and wi::to_poly_offset. Add the current offset and then check
1543 whether the sum fits, rather than using an unchecked addition of
1544 a checked term. Check for a shwi rather than a uhwi.
1545 * expr.c (get_bit_range): Use tree_to_poly_uint64.
1546 (store_constructor): Use poly_int_tree_p.
1547 (expand_expr_real_1): Likewise.
1548 * function.c (assign_temp): Likewise.
1549 * fold-const.c (const_binop): Use poly_int_tree_p and
1550 wi::to_poly_offset.
1551 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
1552 division.
1553 * ipa-icf-gimple.c (func_checker::compare_operand): Use
1554 to_poly_offset for MEM offsets.
1555 * ipa-icf.c (sem_variable::equals): Likewise.
1556 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
1557 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
1558 wi::to_poly_offset for BIT_FIELD_REF offsets.
1559 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
1560 wi::to_poly_offset.
1561 * var-tracking.c (emit_note_insn_var_location): Use
1562 tree_to_poly_uint64.
1563
1564 2018-05-29 Jim Wilson <jimw@sifive.com>
1565
1566 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
1567
1568 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
1569
1570 PR target/85950
1571 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
1572 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
1573 sequence.
1574 (sse4_1_round<mode>2): Use nonimmediate_operand
1575 for operand 1 predicate.
1576
1577 2018-05-29 Martin Sebor <msebor@redhat.com>
1578 Richard Biener <rguenther@suse.de>
1579
1580 PR testsuite/85888
1581 * calls.c (get_size_range): Call determine_value_range instead
1582 of get_value_range..
1583 * tree-vrp.h (determine_value_range): Declared new function.
1584 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
1585
1586 2018-05-29 Richard Biener <rguenther@suse.de>
1587
1588 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
1589 sure to use non-pattern stmts for get_earlier_stmt arguments.
1590 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
1591 called on pattern stmts.
1592 (get_later_stmt): Likewise.
1593
1594 2018-05-29 Martin Liska <mliska@suse.cz>
1595
1596 PR gcov-profile/85759
1597 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
1598 env variables.
1599
1600 2018-05-29 Jakub Jelinek <jakub@redhat.com>
1601
1602 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
1603 VEC_UNPACK_*_EXPR.
1604 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
1605 VEC_PACK_*_EXPR.
1606
1607 PR target/85918
1608 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
1609 VEC_PACK_FLOAT_EXPR): New tree codes.
1610 * tree-pretty-print.c (op_code_prio): Handle
1611 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
1612 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
1613 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
1614 * tree-inline.c (estimate_operator_cost): Likewise.
1615 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
1616 * fold-const.c (const_binop): Likewise.
1617 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
1618 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
1619 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
1620 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
1621 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
1622 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
1623 * expr.c (expand_expr_real_2): Likewise.
1624 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
1625 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
1626 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
1627 optabs.
1628 * optabs.c (expand_widen_pattern_expr): For
1629 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
1630 sign from result type rather than operand's type.
1631 (expand_binop_directly): For vec_packu_float_optab and
1632 vec_packs_float_optab allow result type to be different from operand's
1633 type.
1634 * optabs-tree.c (optab_for_tree_code): Handle
1635 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
1636 VEC_PACK_FLOAT_EXPR. Formatting fixes.
1637 * tree-vect-generic.c (expand_vector_operations_1): Handle
1638 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
1639 VEC_PACK_FLOAT_EXPR.
1640 * tree-vect-stmts.c (supportable_widening_operation): Handle
1641 FIX_TRUNC_EXPR.
1642 (supportable_narrowing_operation): Handle FLOAT_EXPR.
1643 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
1644 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
1645 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
1646 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
1647 mode attributes.
1648 (vec_pack<floatprefix>_float_<mode>): New expander.
1649 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
1650 attributes.
1651 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
1652 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
1653 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
1654 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
1655 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
1656 Document.
1657 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
1658 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
1659 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
1660 VEC_PACK_FLOAT_EXPR): Document.
1661
1662 2018-05-29 Richard Biener <rguenther@suse.de>
1663
1664 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
1665 member.
1666 (stmt_vec_info_vec): Make pointer.
1667 (init_stmt_vec_info_vec): Remove.
1668 (free_stmt_vec_info_vec): Likewise.
1669 (set_stmt_vec_info_vec): New function.
1670 (free_stmt_vec_infos): Likewise.
1671 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
1672 (set_vinfo_for_stmt): Likewise.
1673 (get_earlier_stmt): Likewise.
1674 (get_later_stmt): Likewise.
1675 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
1676 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
1677 (vec_info::~vec_info): Free stmt_vec_infos.
1678 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
1679 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
1680 (pass_slp_vectorize::execute): Likewise.
1681 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
1682 (free_stmt_vec_info_vec): Likewise.
1683 (set_stmt_vec_info_vec): New function.
1684 (free_stmt_vec_infos): Likewise.
1685 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
1686 the global stmt_vec_info_vec.
1687 * tree-parloops.c (gather_scalar_reductions): Use
1688 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
1689 vector.
1690
1691 2018-05-29 Richard Biener <rguenther@suse.de>
1692
1693 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
1694
1695 2018-05-29 Martin Liska <mliska@suse.cz>
1696 David Malcolm <dmalcolm@redhat.com>
1697
1698 * vec.c (test_reverse): New.
1699 (vec_c_tests): Add new test.
1700 * vec.h (vl_ptr>::reverse): New function.
1701
1702 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
1703
1704 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
1705
1706 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
1707 and later.
1708
1709 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1710
1711 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
1712
1713 2018-05-28 Richard Biener <rguenther@suse.de>
1714
1715 PR tree-optimization/85933
1716 * tree-vect-data-refs.c (vect_record_base_alignments): Only
1717 look at stmts marked as vectorizable.
1718
1719 2018-05-28 Richard Biener <rguenther@suse.de>
1720
1721 PR tree-optimization/85934
1722 * tree-vect-generic.c (expand_vector_operations_1): Hoist
1723 vector boolean check before scalar optimization.
1724
1725 2018-05-28 Jakub Jelinek <jakub@redhat.com>
1726
1727 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
1728 for armv5te.
1729
1730 2018-05-28 Mark Wielaard <mark@klomp.org>
1731
1732 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
1733 if it is an expression containing a minus sign.
1734
1735 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
1736
1737 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
1738
1739 2018-05-27 Paul Koning <ni1d@arrl.net>
1740
1741 * config/pdp11/pdp11.md (truncsihi2): Remove.
1742
1743 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
1744 Chung-Ju Wu <jasonwucj@gmail.com>
1745
1746 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
1747 implementation.
1748 (unaligned_store_dw): Ditto.
1749 * config/nds32/nds32-memory-manipulation.c
1750 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
1751 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
1752 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
1753 (emit_setmem_word_loop): Rename to ...
1754 (emit_setmem_doubleword_loop): ... this.
1755 (nds32_gen_dup_4_byte_to_word_value): New function.
1756 (nds32_gen_dup_8_byte_to_double_word_value): New function.
1757 (nds32_expand_setmem_loop): Refine implementation.
1758 (nds32_expand_setmem_loop_v3m): Ditto.
1759 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
1760 pattern.
1761
1762 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
1763
1764 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
1765
1766 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
1767
1768 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
1769 (nds32_init_machine_status): Initialize machine->attr_naked_p and
1770 machine->attr_no_prologue_p.
1771 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
1772 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
1773 (nds32_expand_epilogue): Consider attr_naked_p.
1774 (nds32_expand_epilogue_v3pop): Likewise.
1775 (nds32_can_use_return_insn): Likewise.
1776 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
1777 attr_no_prologue_p fields.
1778 * config/nds32/nds32.opt (mret-in-naked-func): New option.
1779
1780 2018-05-27 Jakub Jelinek <jakub@redhat.com>
1781
1782 PR target/85918
1783 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
1784 attributes.
1785 * config/i386/sse.md
1786 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
1787 Rename to ...
1788 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
1789 ... this.
1790 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
1791 Rename to ...
1792 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
1793 ... this.
1794 (*<floatsuffix>floatv2div2sf2): Rename to ...
1795 (*float<floatunssuffix>v2div2sf2): ... this.
1796 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
1797 (float<floatunssuffix>v2div2sf2_mask): ... this.
1798 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
1799 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
1800 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
1801 to ...
1802 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
1803 ... this.
1804 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
1805 Rename to ...
1806 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
1807 ... this.
1808 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
1809 Rename to ...
1810 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
1811 ... this.
1812 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
1813 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
1814 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
1815 gen_ufix_truncv8dfv8si2.
1816 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
1817 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
1818 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
1819 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
1820 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
1821 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
1822 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
1823 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
1824
1825 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
1826
1827 PR target/85900
1828 PR target/85345
1829 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
1830
1831 2018-05-25 Jim Wilson <jimw@sifive.com>
1832
1833 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
1834 * config/riscv/riscv.c (struct machine_function): Add
1835 interrupt_handler_p and attribute_checked_p fields.
1836 (riscv_attribute_table): Add interrupt.
1837 (riscv_interrupt_type_p): New.
1838 (riscv_save_reg_p): Save extra regs for interrupt handler.
1839 (riscv_use_save_libcall): Return false for interrupt handler.
1840 (riscv_first_stack_step): Add forward declaration.
1841 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
1842 for interrupt handler with large frame. Use it for saved reg list.
1843 (riscv_expand_prologue): Move flag_stack_usage_info support to
1844 eliminate duplication.
1845 (riscv_expand_epilogue): Generate mret for interrupt handler.
1846 (riscv_epilogue_uses): New.
1847 (riscv_can_use_return_insn): Return false for interrupt handler.
1848 (riscv_function_ok_for_sibcall): Likewise.
1849 (riscv_set_current_function): Add interrupt handler support.
1850 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
1851 * config/riscv/riscv.md (UNSPECV_MRET): New.
1852 (GP_REGNUM): New.
1853 (riscv_frflags, riscv_fsflags): Use tab after opcode.
1854 (riscv_mret): New.
1855 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
1856
1857 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
1858
1859 PR tree-optimization/85712
1860 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
1861 this candidate has already been replaced in-situ by a copy.
1862
1863 2018-05-25 Jason Merrill <jason@redhat.com>
1864
1865 PR c++/80485 - inline function non-zero address.
1866 * symtab.c (nonzero_address): Check DECL_COMDAT.
1867
1868 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
1869
1870 PR target/83628
1871 * config/alpha/alpha.md (ashlsi3): New insn pattern.
1872 (*ashlsi_se): Rename from *ashldi_se. Define as sign
1873 extension of SImode operation. Use const123_operand predicate.
1874 (*saddsi_1): Remove.
1875 (*saddl_se_1): Ditto.
1876 (*ssubsi_1): Ditto.
1877 (*ssubl_se_1): Ditto.
1878 * config/alpha/predicates.md (const123_operand): New predicate.
1879 * config/alpha/constraints.md (P): Use IN_RANGE.
1880
1881 2018-05-25 Richard Biener <rguenther@suse.de>
1882
1883 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
1884 defaulted to true.
1885 (ref_maybe_used_by_stmt_p): Likewise.
1886 (stmt_may_clobber_ref_p): Likewise.
1887 (stmt_may_clobber_ref_p_1): Likewise.
1888 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
1889 and pass it along.
1890 (ref_maybe_used_by_stmt_p): Likewise.
1891 (stmt_may_clobber_ref_p): Likewise.
1892 (stmt_may_clobber_ref_p_1): Likewise.
1893 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
1894 the alias oracle to disambiguate DRs with stmts DR analysis
1895 couldn't handle.
1896 (vect_analyze_data_refs): Do not give up on not analyzable
1897 DRs for BB vectorization. Remove code truncating the dataref
1898 vector.
1899
1900 2018-05-25 Jakub Jelinek <jakub@redhat.com>
1901
1902 PR target/85832
1903 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
1904 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
1905 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
1906
1907 2018-05-25 Richard Biener <rguenther@suse.de>
1908
1909 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
1910 function, combining stmt data ref gathering and fatal analysis
1911 parts.
1912 (vect_analyze_data_refs): Remove now redudnant code and simplify.
1913 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
1914 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
1915 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
1916 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
1917
1918 2018-05-25 Bin Cheng <bin.cheng@arm.com>
1919
1920 PR tree-optimization/85720
1921 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
1922 SCC if all partitions are builtins.
1923 (version_loop_by_alias_check): New parameter. Generate cancelable
1924 runtime alias check if all partitions are builtins.
1925 (distribute_loop): Update call to above function.
1926
1927 2018-05-25 Bin Cheng <bin.cheng@arm.com>
1928
1929 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
1930 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
1931 (parm_default_def_partition_arg): Ditto.
1932 (set_parm_default_def_partition): Ditto.
1933 (get_parm_default_def_partitions): Ditto and make it static.
1934 (get_undefined_value_partitions): Ditto and make it static.
1935 (remove_ssa_form): Refactor call to init_var_map here.
1936 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
1937 computation for loop region.
1938 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
1939 (register_default_def): Delete.
1940 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
1941 (parm_default_def_partition_arg): Ditto.
1942 (set_parm_default_def_partition): Ditto.
1943 (get_parm_default_def_partitions): Ditto and make it static.
1944 (get_undefined_value_partitions): Ditto and make it static.
1945 (coalesce_with_default, coalesce_with_default): Update comment.
1946 (create_coalesce_list_for_region): New func factored out from
1947 create_outofssa_var_map.
1948 (populate_coalesce_list_for_outofssa): New func factored out from
1949 create_outofssa_var_map and coalesce_ssa_name.
1950 (create_outofssa_var_map): Delete.
1951 (coalesce_ssa_name): Refactor to support live range computation.
1952 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
1953 (get_parm_default_def_partitions): Delete.
1954 (get_undefined_value_partitions): Ditto.
1955 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
1956 computation for loop region.
1957 (new_tree_live_info, loe_visit_block): Ditto.
1958 (live_worklist, set_var_live_on_entry): Ditto.
1959 (calculate_live_on_exit, verify_live_on_entry): Ditto.
1960 * tree-ssa-live.h (struct _var_map): New fields.
1961 (init_var_map): Change decl.
1962 (region_contains_p): New.
1963
1964 2018-05-25 Bin Cheng <bin.cheng@arm.com>
1965
1966 * tree-ssa-live.h (live_merge_and_clear): Delete.
1967
1968 2018-05-25 Richard Biener <rguenther@suse.de>
1969
1970 PR c++/85912
1971 * tree-dump.c (dequeue_and_dump): Remove access to removed
1972 operand 2 of a SWITCH_EXPR.
1973
1974 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
1975
1976 * doc/sourcebuild.texi (vect_double_cond_arith): Include
1977 multiplication and division.
1978 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
1979 (cond_udiv@var{m}, cond_umod@var{m}): Document.
1980 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
1981 (cond_udiv_optab, cond_umod_optab): New optabs.
1982 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
1983 (IFN_COND_RDIV): New internal functions.
1984 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
1985 TRUNC_MOD_EXPR and RDIV_EXPR.
1986 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
1987 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
1988 New unspecs.
1989 (SVE_INT_BINARY): Include mult.
1990 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
1991 (optab, sve_int_op): Handle mult.
1992 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
1993 UNSPEC_COND_DIV.
1994 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
1995 for SVE_INT_BINARY_SD.
1996
1997 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
1998
1999 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
2000 (optab, sve_int_op): Handle div and udiv.
2001 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
2002 for SVE_INT_BINARY_SD.
2003 (*<optab><mode>3): New insn for the same.
2004
2005 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
2006
2007 * tree-vect-patterns.c: Include predict.h.
2008 (vect_recog_divmod_pattern): Restrict check for division support
2009 to when optimizing for size.
2010
2011 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
2012
2013 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
2014 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
2015 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
2016 (gimple_match_op::set_op): Likewise.
2017 (gimple_resimplify4): Declare.
2018 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
2019 (expr::gen_transform): Likewise.
2020 (decision_tree::gen): Generate a simplification routine for 4 operands.
2021 * gimple-match-head.c (gimple_simplify): Add an overload for
2022 4 operands. In the top-level function, handle up to 4 call
2023 arguments and call gimple_resimplify4.
2024 (gimple_resimplify4): New function.
2025 (build_call_internal): Pass a fourth operand.
2026 (maybe_push_to_seq): Likewise.
2027 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
2028 Fold VEC_COND_EXPRs of an operation and a default value into
2029 an IFN_COND_* function if possible.
2030 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
2031 New unspecs.
2032 (SVE_COND_FP_BINARY): Include them.
2033 (optab, sve_fp_op): Handle them.
2034 (SVE_INT_BINARY_REV): New code iterator.
2035 (SVE_COND_FP_BINARY_REV): New int iterator.
2036 (commutative): New int attribute.
2037 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
2038 Declare.
2039 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
2040 function.
2041 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
2042 (*cond_<optab><mode>): New patterns for reversed operands.
2043
2044 2018-05-25 Richard Biener <rguenther@suse.de>
2045
2046 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
2047 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
2048 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
2049 (STMT_VINFO_GROUPED_ACCESS): Adjust.
2050 * tree-vect-data-refs.c (everywhere): Adjust users.
2051 * tree-vect-loop.c (everywhere): Likewise.
2052 * tree-vect-slp.c (everywhere): Likewise.
2053 * tree-vect-stmts.c (everywhere): Likewise.
2054 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2055
2056 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2057
2058 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
2059 Rename to...
2060 (gcc_cv_as_section_exclude): ... this.
2061 Try Solaris as #exclude syntax.
2062 * configure: Regenerate.
2063 * config.in: Regenerate.
2064 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
2065 SECTION_EXCLUDE.
2066 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
2067 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
2068
2069 * varasm.c (default_elf_asm_named_section): Don't check if
2070 HAVE_GAS_SECTION_EXCLUDE is defined.
2071
2072 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
2073
2074 * doc/md.texi: Update the documentation of the cond_* optabs
2075 to mention the new final operand. Fix GET_MODE_NUNITS call.
2076 Describe the scalar case too.
2077 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
2078 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
2079 instead of 2.
2080 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
2081 (get_conditional_internal_fn): Update comment.
2082 * tree-vect-loop.c (vectorizable_reduction): Pass the original
2083 accumulator value as a final argument to conditional functions.
2084 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
2085 a define_expand and add an "else" operand. Assert for now that
2086 the else operand is equal to operand 2. Use SVE_INT_BINARY and
2087 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
2088 (*cond_<optab><mode>): New patterns.
2089 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
2090 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
2091 (UNSPEC_COND_EOR): Delete.
2092 (optab): Remove associated mappings.
2093 (SVE_INT_BINARY): New code iterator.
2094 (sve_int_op): Remove int attribute and add "minus" to the code
2095 attribute.
2096 (SVE_COND_INT_OP): Delete.
2097 (SVE_COND_FP_OP): Rename to...
2098 (SVE_COND_FP_BINARY): ...this.
2099
2100 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
2101
2102 * optabs.c (can_reuse_operands_p): New function.
2103 (maybe_legitimize_operands): Try to reuse the results for
2104 earlier operands.
2105
2106 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
2107
2108 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
2109 Add {q} suffix to insn mnemonic.
2110
2111 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2112
2113 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
2114 (msp430_warn_func_return): New.
2115
2116 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
2117
2118 * fold-const.c (tree_nonzero_bits): New function.
2119 * fold-const.h (tree_nonzero_bits): Likewise.
2120 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
2121 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
2122
2123 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
2124
2125 PR target/85900
2126 PR target/85345
2127 * varasm.c (assemble_alias): Check ifunc_resolver only on
2128 FUNCTION_DECL.
2129
2130 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
2131
2132 PR target/85903
2133 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
2134 when memory input operand is handled.
2135
2136 2018-05-24 Luis Machado <luis.machado@linaro.org>
2137
2138 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
2139 global.
2140 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
2141
2142 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
2143
2144 * match.pd: Delay FMA folds until after vectorization.
2145
2146 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
2147
2148 PR target/83009
2149 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2150 address check not strict.
2151
2152 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
2153
2154 * gimple-match.h (gimple_match_op): New class.
2155 (mprts_hook): Replace parameters with a gimple_match_op *.
2156 (maybe_build_generic_op): Likewise.
2157 (gimple_simplified_result_is_gimple_val): Replace parameters with
2158 a const gimple_match_op *.
2159 (gimple_simplify): Replace code_helper * and tree * parameters with
2160 a gimple_match_op * parameter.
2161 (gimple_resimplify1): Replace code_helper *, tree and tree *
2162 parameters with a gimple_match_op * parameter.
2163 (gimple_resimplify2): Likewise.
2164 (gimple_resimplify3): Likewise.
2165 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
2166 parameters with a gimple_match_op * parameter.
2167 * gimple-match-head.c (gimple_simplify): Change prototypes of
2168 auto-generated functions to take a gimple_match_op * instead of
2169 separate code_helper * and tree * parameters. Make the same
2170 change in the top-level overload and update calls to the
2171 gimple_resimplify routines. Update calls to the auto-generated
2172 functions and to maybe_push_res_to_seq in the publicly-facing
2173 operation-specific gimple_simplify overloads.
2174 (gimple_match_op::MAX_NUM_OPS): Define.
2175 (gimple_resimplify1): Replace rcode and ops with a single res_op
2176 parameter. Update call to gimple_simplify.
2177 (gimple_resimplify2): Likewise.
2178 (gimple_resimplify3): Likewise.
2179 (mprts_hook): Replace parameters with a gimple_match_op *.
2180 (maybe_build_generic_op): Likewise.
2181 (build_call_internal): Replace type, nargs and ops with
2182 a gimple_match_op *.
2183 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
2184 with a single gimple_match_op *. Update calls to mprts_hook,
2185 build_call_internal and gimple_simplified_result_is_gimple_val.
2186 Factor out code that is common to the tree_code and combined_fn cases.
2187 * genmatch.c (expr::gen_transform): Replace tem_code and
2188 tem_ops with a gimple_match_op called tem_op. Update calls
2189 to the gimple_resimplify functions and maybe_push_res_to_seq.
2190 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
2191 res_ops. Update call to the gimple_resimplify functions.
2192 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
2193 (decision_tree::gen): Make the functions take a gimple_match_op *
2194 called res_op instead of separate res_code and res_ops parameters.
2195 Update call accordingly.
2196 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
2197 and ops with a single res_op parameter. Update calls to
2198 maybe_build_generic_op and maybe_push_res_to_seq.
2199 (fold_stmt_1): Update calls to gimple_simplify and
2200 replace_stmt_with_simplification.
2201 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
2202 and gimple_simplified_result_is_gimple_val.
2203 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
2204 gimple_simplify.
2205 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
2206 with a gimple_match_op *.
2207 (vn_nary_build_or_lookup): Likewise. Update call to
2208 vn_nary_build_or_lookup_1.
2209 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
2210 gimple_match_op *. Update calls to the gimple_resimplify routines
2211 and to gimple_simplified_result_is_gimple_val.
2212 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
2213 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
2214 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
2215 (visit_nary_op): Likewise.
2216 (visit_reference_op_load): Likewise.
2217
2218 2018-05-23 Luis Machado <luis.machado@linaro.org>
2219
2220 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
2221 modifier for printing the step amount.
2222
2223 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
2224
2225 PR target/78849
2226 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
2227 types.
2228
2229 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
2230
2231 * doc/sourcebuild.texi (Endianness): New subsubsection.
2232
2233 2018-05-23 Luis Machado <luis.machado@linaro.org>
2234
2235 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2236 <prefetch_dynamic_strides>: New const bool field.
2237 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2238 prefetch_dynamic_strides.
2239 (exynosm1_prefetch_tune): Likewise.
2240 (thunderxt88_prefetch_tune): Likewise.
2241 (thunderx_prefetch_tune): Likewise.
2242 (thunderx2t99_prefetch_tune): Likewise.
2243 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
2244 false.
2245 (aarch64_override_options_internal): Update to set
2246 PARAM_PREFETCH_DYNAMIC_STRIDES.
2247 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2248 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2249 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2250 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2251 prefetch-dynamic-strides setting.
2252
2253 2018-05-23 Luis Machado <luis.machado@linaro.org>
2254
2255 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2256 <minimum_stride>: New const int field.
2257 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2258 minimum_stride field defaulting to -1.
2259 (exynosm1_prefetch_tune): Likewise.
2260 (thunderxt88_prefetch_tune): Likewise.
2261 (thunderx_prefetch_tune): Likewise.
2262 (thunderx2t99_prefetch_tune): Likewise.
2263 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
2264 <default_opt_level>: Set to 3.
2265 (aarch64_override_options_internal): Update to set
2266 PARAM_PREFETCH_MINIMUM_STRIDE.
2267 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2268 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2269 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2270 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2271 stride is constant and is below the minimum stride threshold.
2272
2273 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2274
2275 * config/arm/arm-cpus.in (mode26): Delete.
2276 (armv4): Delete mode26 reference.
2277 * config/arm/arm.c (arm_configure_build_target): Delete use of
2278 isa_bit_mode26.
2279
2280 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
2281
2282 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
2283 New insn pattern.
2284 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
2285 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
2286 for non-SSE modes.
2287 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
2288 (floatunsdidf2): Ditto.
2289
2290 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
2291
2292 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
2293 (fixuns_trunc<mode>si2_avx512f): Ditto.
2294 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
2295 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
2296 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
2297
2298 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
2299
2300 PR rtl-optimization/79985
2301 * df-scan.c (df_insn_refs_collect): Remove special case for
2302 global registers and asm statements.
2303
2304 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
2305
2306 * extend.texi (Global Register Variables): Rewrite the bullet list.
2307 Note that the register is available for allocation. Note that access
2308 via inline asm must use constraints. Add note about async-signal
2309 handlers. Remove paragraph about automagic register selection.
2310
2311 2018-05-23 Richard Biener <rguenther@suse.de>
2312
2313 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
2314 of fixed offset from memset VN.
2315
2316 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
2317
2318 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
2319 first_interp field.
2320 (alloc_cand_and_find_basis): Initialize first_interp field.
2321 (slsr_process_mul): Modify first_interp field.
2322 (slsr_process_add): Likewise.
2323 (slsr_process_cast): Modify first_interp field for each new
2324 interpretation.
2325 (slsr_process_copy): Likewise.
2326 (dump_candidate): Dump first_interp field.
2327 (replace_mult_candidate): Process all interpretations, not just
2328 subsequent ones.
2329 (replace_rhs_if_not_dup): Likewise.
2330 (replace_one_candidate): Likewise.
2331
2332 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
2333
2334 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
2335 Add new boolean.
2336 (aarch64_needs_frame_chain): New function.
2337 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
2338
2339 2018-05-23 Sudakshina Das <sudi.das@arm.com>
2340
2341 PR target/84882
2342 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
2343 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
2344 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
2345 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
2346 as true for strict-align.
2347 (aarch64_can_inline_p): Perform checks even when callee has no
2348 attributes to check for strict alignment.
2349 * doc/extend.texi (AArch64 Function Attributes): Document
2350 no-strict-align.
2351 * doc/invoke.texi: (AArch64 Options): Likewise.
2352
2353 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
2354
2355 PR tree-optimization/85853
2356 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
2357 the handling of the root of the node to...
2358 (vect_slp_analyze_node_operations_1): ...this new function,
2359 and run the whole thing with the child nodes' def types
2360 set according to their SLP node's def type.
2361
2362 2018-05-23 Richard Biener <rguenther@suse.de>
2363
2364 PR middle-end/85874
2365 * tree-data-ref.c (create_runtime_alias_checks): Defer
2366 and ignore overflow warnings.
2367
2368 2018-05-23 Yury Gribov <tetra2005@gmail.com>
2369
2370 PR tree-optimization/85822
2371 * tree-vrp.c (is_masked_range_test): Fix handling of negative
2372 constants.
2373
2374 2018-05-23 Richard Biener <rguenther@suse.de>
2375
2376 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
2377 memset constants via native_interpret_expr.
2378
2379 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
2380
2381 PR target/85345
2382 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
2383 attribute.
2384 (cgraph_node::create_alias): Likewise.
2385 (cgraph_node::get_availability): Check ifunc_resolver instead
2386 of looking up ifunc attribute.
2387 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
2388 * varasm.c (do_assemble_alias): Likewise.
2389 (assemble_alias): Likewise.
2390 (default_binds_local_p_3): Likewise.
2391 * cgraph.h (cgraph_node): Add ifunc_resolver.
2392 (cgraph_node::only_called_directly_or_aliased_p): Return false
2393 for IFUNC resolver.
2394 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
2395 attribute.
2396 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
2397 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
2398 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
2399 instead of looking up ifunc attribute.
2400
2401 2018-05-22 Luis Machado <luis.machado@linaro.org>
2402
2403 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
2404
2405 2018-05-22 Martin Sebor <msebor@redhat.com>
2406
2407 PR middle-end/85359
2408 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
2409 only when expasion succeeds.
2410 (expand_builtin_strcmp): Same.
2411 (expand_builtin_strncmp): Same.
2412
2413 2018-05-22 Martin Sebor <msebor@redhat.com>
2414
2415 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
2416
2417 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
2418 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2419
2420 * config/aarch64/aarch64-ldpstp.md: Replace uses of
2421 aarch64_mem_pair_operand with memory_operand and delete operand swapping
2422 code.
2423 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
2424 Add check for legitimate_address.
2425 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
2426 (aarch64_swap_ldrstr_operands): New.
2427 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
2428 Define prototype.
2429
2430 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
2431 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2432
2433 * config/aarch64/aarch64.md: New patterns to generate stp
2434 and ldp.
2435 (store_pair_sw, store_pair_dw): New patterns to generate stp for
2436 single words and double words.
2437 (load_pair_sw, load_pair_dw): Likewise.
2438 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
2439 Delete.
2440 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
2441 Delete.
2442 * config/aarch64/aarch64-ldpstp.md: Modify peephole
2443 for different mode ldpstp and add peephole for merged zero stores.
2444 Likewise for loads.
2445 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
2446 Add size check.
2447 (aarch64_gen_store_pair): Rename calls to match new patterns.
2448 (aarch64_gen_load_pair): Rename calls to match new patterns.
2449 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
2450 (load_pair<DREG:mode><DREG2:mode>): ... This.
2451 (store_pair<mode>): Rename to...
2452 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
2453 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
2454 New mode iterators.
2455 (V_INT_EQUIV): Handle SImode.
2456 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
2457 New predicate.
2458
2459 2018-05-22 Martin Sebor <msebor@redhat.com>
2460
2461 PR c/85623
2462 * calls.c (maybe_warn_nonstring_arg): Use string length to set
2463 or ajust the presumed bound on an operation to avoid unnecessary
2464 warnings.
2465
2466 2018-05-22 Martin Sebor <msebor@redhat.com>
2467
2468 PR tree-optimization/85826
2469 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
2470 assuming that a DECL necesarily has a constant size.
2471
2472 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
2473
2474 PR middle-end/85862
2475 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
2476
2477 2018-05-22 Richard Biener <rguenther@suse.de>
2478
2479 PR tree-optimization/85834
2480 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
2481 non-constant and non-zero memset arguments.
2482
2483 2018-05-22 Martin Liska <mliska@suse.cz>
2484
2485 PR ipa/85607
2486 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
2487
2488 2018-05-22 Richard Biener <rguenther@suse.de>
2489
2490 PR tree-optimization/85863
2491 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
2492 comparisons when vectype is specified.
2493 (vectorizable_condition): Do not specify vectype for
2494 vect_is_simple_cond when SLP vectorizing.
2495
2496 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
2497
2498 PR target/85657
2499 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
2500 define __ibm128 as long double.
2501 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
2502 as a distinct type when IEEE 128-bit support is enabled.
2503 (init_float128_ieee): Fix up conversions between IFmode and IEEE
2504 128-bit types to use the correct functions.
2505 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
2506 convert between 128-bit floating point types that have different
2507 modes but the same representation, instead of using gen_lowpart to
2508 makean alias.
2509 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
2510 KFmode.
2511 (IFKF_reg): New attributes to give the register constraints for
2512 IFmode and KFmode.
2513 (extend<mode>tf2_internal): New insns to mark an explicit
2514 conversion between 128-bit floating point types that have a
2515 different mode but share the same representation.
2516
2517 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
2518
2519 PR tree-optimization/85814
2520 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
2521 a null return from get_strinfo when unsharing the next
2522 strinfo in the chain.
2523
2524 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
2525
2526 PR gcc/84923
2527 * varasm.c (weak_finish): Clean up weak_decls.
2528
2529 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2530
2531 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
2532 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
2533 UNSPEC_UADALP values.
2534 * config/aarch64/iterators.md (ABAL): New int iterator.
2535 (ABDL2): Likewise.
2536 (ADALP): Likewise.
2537 (sur): Add mappings for the above.
2538 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
2539 New define_insn.
2540 (aarch64_<sur>abal<mode>_4): Likewise.
2541 (aarch64_<sur>adalp<mode>_3): Likewise.
2542 (<sur>sadv16qi): New define_expand.
2543
2544 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
2545
2546 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
2547 (*movdf_internal): Ditto.
2548 (*rcpsf2_sse): Ditto.
2549 (*rsqrtsf2_sse): Ditto.
2550 (*sqrt<mode>2_sse): Ditto.
2551
2552 2018-05-21 Tamar Christina <tamar.christina@arm.com>
2553
2554 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
2555 eor3q<mode>4.
2556 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
2557 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
2558 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
2559 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
2560 vbcaxq_s64): New.
2561 * config/aarch64/arm_neon.h: Likewise.
2562 * config/aarch64/iterators.md (VQ_I): New.
2563
2564 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
2565
2566 * config.gcc: Add arc/t-multilib-linux to tmake_file for
2567 arc*-*-linux*.
2568 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
2569 MULTILIB_DIRNAMES
2570
2571 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
2572
2573 * config/nds32/constraints.md (S): New constraint.
2574 * config/nds32/nds32.md (call_internal): Use constraint S.
2575 (call_value_internal): Likewise.
2576 (sibcall_internal): Likewise.
2577 (sibcall_value_internal): Likewise.
2578
2579 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
2580 Chung-Ju Wu <jasonwucj@gmail.com>
2581
2582 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
2583 into consideration.
2584
2585 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
2586 Chung-Ju Wu <jasonwucj@gmail.com>
2587
2588 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
2589 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
2590 (nds32_rtx_costs_impl): Simplify.
2591 (nds32_address_cost_impl): Simplify.
2592 (nds32_init_rtx_costs): New function.
2593 (nds32_rtx_costs_speed_prefer): Likewise.
2594 (nds32_rtx_costs_size_prefer): Likewise.
2595 (nds32_address_cost_speed_prefer): Likewise.
2596 (nds32_address_cost_speed_fwprop): Likewise.
2597 (nds32_address_cost_size_prefer): Likewise.
2598 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
2599 * config/nds32/nds32.c (nds32_option_override): Use
2600 nds32_init_rtx_costs function.
2601
2602 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
2603
2604 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
2605 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
2606 (TARGET_PIPELINE_N8): Likewise.
2607 (TARGET_PIPELINE_N10): Likewise.
2608 (TARGET_PIPELINE_N13): Likewise.
2609 (TARGET_PIPELINE_GRAYWOLF): Likewise.
2610
2611 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
2612
2613 * config/nds32/nds32-fpu.md: Update copyright year.
2614
2615 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
2616
2617 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
2618
2619 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
2620
2621 * config/nds32/nds32.c
2622 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
2623 * config/nds32/nds32.opt (minline-asm-r15): New option.
2624
2625 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
2626
2627 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
2628 MASK_HW_ABS.
2629 * config/nds32/nds32.md (abssi2): New pattern.
2630
2631 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
2632
2633 * config/i386/i386.md (rex64namesuffix): New mode attribute.
2634 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
2635 Merge insn pattern from sse_cvtsi2ss<round_name> and
2636 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
2637 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
2638 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
2639 using SWI48 mode iterator.
2640 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
2641 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
2642 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
2643 pattern from sse_cvttss2si<round_saeonly_name>
2644 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
2645 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
2646 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
2647 using SWI48 mode iterator.
2648 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
2649 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
2650 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
2651 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
2652 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
2653 using SWI48 mode iterator.
2654 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
2655 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
2656 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
2657 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
2658 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
2659 SWI48 mode iterator.
2660 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
2661 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
2662 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
2663 pattern from sse_cvttsd2si<round_saeonly_name>
2664 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
2665
2666 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
2667
2668 * config/nds32/nds32-md-auxiliary.c
2669 (nds32_valid_smw_lwm_base_p): Refine.
2670 (nds32_output_smw_single_word): Refine.
2671 (nds32_output_smw_double_word): New.
2672 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
2673
2674 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
2675
2676 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
2677 (nds32_output_stack_pop): Refine.
2678 (nds32_expand_unaligned_load): Refine.
2679 (nds32_expand_unaligned_store): Refine.
2680
2681 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2682 Chung-Ju Wu <jasonwucj@gmail.com>
2683
2684 * config/nds32/constants.md: Add TP_REGNUM constant.
2685 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
2686 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
2687 UNSPEC_ADD32.
2688 * config/nds32/nds32-doubleword.md: Consider flag_pic.
2689 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
2690 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
2691 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
2692 and PIC code generation.
2693 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
2694 code generation.
2695 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
2696 optimization.
2697 * config/nds32/nds32.md: Support TLS and PIC.
2698 * config/nds32/nds32.c: Support TLS and PIC.
2699 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
2700 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
2701 predicate.
2702
2703 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
2704
2705 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
2706 mode with E_ prefix.
2707
2708 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2709 Chung-Ju Wu <jasonwucj@gmail.com>
2710
2711 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
2712 * config/nds32/nds32-md-auxiliary.c
2713 (symbolic_reference_mentioned_p): New.
2714 (nds32_legitimize_ict_address): New.
2715 (nds32_expand_ict_move): New.
2716 (nds32_indirect_call_referenced_p): New.
2717 (nds32_symbol_binds_local_p): Delete.
2718 (nds32_long_call_p): Modify.
2719 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
2720 * config/nds32/nds32-protos.h
2721 (symbolic_reference_mentioned_p): Declare.
2722 (nds32_legitimize_ict_address): Declare.
2723 (nds32_expand_ict_move): Declare.
2724 (nds32_indirect_call_referenced_p): Declare.
2725 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
2726 (nds32_relax_group): Use nds32_ict_const_p as condition.
2727 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
2728 (nds32_asm_file_start): Output ict_model directive in asm code.
2729 (nds32_legitimate_address_p): Consider indirect call.
2730 (nds32_print_operand): Consider indirect call.
2731 (nds32_print_operand_address): Consider indirect call.
2732 (nds32_insert_attributes): Handle "indirect_call" attribute.
2733 (TARGET_LEGITIMATE_ADDRESS_P): Define.
2734 (TARGET_LEGITIMATE_CONSTANT_P): Define.
2735 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
2736 (TARGET_DELEGITIMIZE_ADDRESS): Define.
2737 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
2738 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
2739 (TARGET_ICT_MODEL_SMALL): Define.
2740 (TARGET_ICT_MODEL_LARGE): Define.
2741 * config/nds32/nds32.md (movsi): Consider ict model.
2742 (call, call_value): Consider ict model.
2743 (sibcall, sibcall_value): Consider ict model.
2744 * config/nds32/nds32.opt (mict-model): New option.
2745 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
2746 model.
2747
2748 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
2749 Monk Chiang <sh.chiang04@gmail.com>
2750 Jim Wilson <jimw@sifive.com>
2751
2752 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
2753 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
2754 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
2755 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
2756 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
2757 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
2758 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
2759 compute save_libcall_adjustment properly.
2760 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
2761 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
2762 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
2763 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
2764 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
2765 (ABI_SPEC): Handle mabi=ilp32e.
2766 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
2767 (RVE): Add RVE mask.
2768 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
2769 <-march>: Add rv32e as an example.
2770
2771 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
2772
2773 PR c++/82899
2774 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
2775 (intra_create_variable_infos): Handle C++ constructors.
2776
2777 2018-05-18 Martin Liska <mliska@suse.cz>
2778
2779 * passes.def: Remove a redundant pass.
2780
2781 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
2782
2783 PR bootstrap/85838
2784 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
2785
2786 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2787
2788 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
2789 (ARMv4): Update.
2790 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
2791 (ARMv6m): Update.
2792 (armv2, armv2a, armv3, armv3m): Delete architectures.
2793 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
2794 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
2795 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
2796 Delete cpus.
2797 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
2798 (*mulsidi3adddi): Likewise.
2799 (mulsidi3): Likewise.
2800 (*mulsidi3_nov6): Likewise.
2801 (umulsidi3): Likewise.
2802 (umulsidi3_nov6): Likewise.
2803 (umaddsidi4): Likewise.
2804 (*umulsidi3adddi): Likewise.
2805 (smulsi3_highpart): Likewise.
2806 (*smulsi3_highpart_nov6): Likewise.
2807 (umulsi3_highpart): Likewise.
2808 (*umulsi3_highpart_nov6): Likewise.
2809 * config/arm/arm.h (arm_arch3m): Delete.
2810 * config/arm/arm.c (arm_arch3m): Delete.
2811 (arm_option_override_internal): Update armv3-related comment.
2812 (arm_configure_build_target): Delete use of isa_bit_mode32.
2813 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
2814 (arm_rtx_costs_internal): Delete check of arm_arch3m.
2815 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
2816 (mulsa3): Likewise.
2817 (mulusa3): Likewise.
2818 * config/arm/arm-protos.h (arm_arch3m): Delete.
2819 * config/arm/arm-tables.opt: Regenerate.
2820 * config/arm/arm-tune.md: Likewise.
2821 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
2822 deleted architectures.
2823
2824 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2825
2826 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
2827 (armv5t, armv5te): New features.
2828 (ARMv5, ARMv5e): Delete fgroups.
2829 (ARMv5t, ARMv5te): Adjust for above changes.
2830 (ARMv6m): Likewise.
2831 (armv5, armv5e): Delete arches.
2832 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
2833 arm_arch5.
2834 (*call_reg_arm): Likewise.
2835 (*call_value_reg_armv5): Likewise.
2836 (*call_value_reg_arm): Likewise.
2837 (*call_symbol): Likewise.
2838 (*call_value_symbol): Likewise.
2839 (*sibcall_insn): Likewise.
2840 (*sibcall_value_insn): Likewise.
2841 (clzsi2): Likewise.
2842 (prefetch): Likewise.
2843 (define_split and define_peephole2 dependent on arm_arch5):
2844 Likewise.
2845 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
2846 arm_arch5e.
2847 (TARGET_ARM_QBIT): Likewise.
2848 (TARGET_DSP_MULTIPLY): Likewise.
2849 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
2850 (arm_arch5, arm_arch5e): Delete.
2851 (arm_arch5t, arm_arch5te): Declare.
2852 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
2853 (arm_arch5t): Declare.
2854 (arm_option_reconfigure_globals): Update for the above.
2855 (arm_options_perform_arch_sanity_checks): Update comment, replace
2856 use of arm_arch5 with arm_arch5t.
2857 (use_return_insn): Likewise.
2858 (arm_emit_call_insn): Likewise.
2859 (output_return_instruction): Likewise.
2860 (arm_final_prescan_insn): Likewise.
2861 (arm_coproc_builtin_available): Likewise.
2862 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
2863 arm_arch5e with arm_arch5t and arm_arch5te.
2864 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
2865 (arm_arch5t, arm_arch5te): Declare.
2866 * config/arm/arm-tables.opt: Regenerate.
2867 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
2868 * config/arm/t-multilib: Likewise.
2869 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
2870 instead of arm_arch5.
2871 (*call_reg_thumb1): Likewise.
2872 (*call_value_reg_thumb1_v5): Likewise.
2873 (*call_value_reg_thumb1): Likewise.
2874 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
2875 unreachable path.
2876 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
2877
2878 2018-05-18 Martin Liska <mliska@suse.cz>
2879
2880 PR gcov-profile/84846
2881 * doc/gcov.texi: Document -t option of gcov tool.
2882
2883 2018-05-18 Martin Liska <mliska@suse.cz>
2884
2885 PR gcov-profile/84846
2886 * gcov.c (print_usage): Add new -t option.
2887 (process_args): Handle the option.
2888 (generate_results): Use stdout as output when requested by
2889 the option.
2890
2891 2018-05-18 Martin Liska <mliska@suse.cz>
2892
2893 PR gcov-profile/84846
2894 * coverage.c (coverage_init): Write PWD to .gcno file.
2895 * doc/gcov.texi: Document how working directory is printed.
2896 * gcov-dump.c (dump_gcov_file): Print PWD.
2897 * gcov.c (output_intermediate_file): Likewise.
2898 (read_graph_file): Read PWD string.
2899 (output_lines): Print PWD.
2900
2901 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2902
2903 PR middle-end/85817
2904 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
2905 for retval and return false if all args to phi are zero.
2906
2907 2018-05-18 Richard Biener <rguenther@suse.de>
2908
2909 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
2910 method.
2911 (evrp_dom_walker::before_dom_children): Call it.
2912
2913 2018-05-18 Richard Biener <rguenther@suse.de>
2914
2915 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
2916 results when processing array refs with variable index.
2917
2918 2018-05-18 Toon Moene <toon@moene.org>
2919
2920 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
2921 directly after that of -floop-interchange. Indicate that both
2922 options are enabled by default when specifying -O3.
2923
2924 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2925
2926 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
2927 iterator. Delete separate integer-mode vec_set<mode> expander.
2928 (aarch64_simd_vec_setv2di): Delete.
2929 (vec_setv2di): Delete.
2930 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
2931 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
2932 the "w, r" alternative.
2933
2934 2018-05-18 Martin Liska <mliska@suse.cz>
2935
2936 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
2937 * tree-pass.h (make_pass_lower_switch_O0): New function.
2938 * tree-switch-conversion.c (node_has_low_bound): Remove.
2939 (node_has_high_bound): Likewise.
2940 (node_is_bounded): Likewise.
2941 (class pass_lower_switch): Make it a template type and create
2942 two instances.
2943 (pass_lower_switch::execute): Add template argument.
2944 (make_pass_lower_switch): New function.
2945 (make_pass_lower_switch_O0): New function.
2946 (do_jump_if_equal): Remove.
2947 (emit_case_nodes): Simplify to just handle all 3 cases and leave
2948 all the hard work to tree optimization passes.
2949
2950 2018-05-18 Martin Liska <mliska@suse.cz>
2951
2952 * dbgcnt.c (limit_low): Renamed from limit.
2953 (limit_high): New variable.
2954 (dbg_cnt_is_enabled): Check for upper limit.
2955 (dbg_cnt): Adjust dumping.
2956 (dbg_cnt_set_limit_by_index): Add new argument for high
2957 value.
2958 (dbg_cnt_set_limit_by_name): Likewise.
2959 (dbg_cnt_process_single_pair): Parse new format.
2960 (dbg_cnt_process_opt): Use strtok.
2961 (dbg_cnt_list_all_counters): Remove 'value' and add
2962 'limit_high'.
2963 * doc/invoke.texi: Document changes.
2964
2965 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2966
2967 * doc/sourcebuild.texi (scalar_all_fma): Document.
2968 * tree.def (FMA_EXPR): Delete.
2969 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
2970 * internal-fn.c (ternary_direct): New macro.
2971 (expand_ternary_optab_fn): Likewise.
2972 (direct_ternary_optab_supported_p): Likewise.
2973 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
2974 * builtins.c (fold_builtin_fma): Delete.
2975 (fold_builtin_3): Don't call it.
2976 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
2977 * expr.c (expand_expr_real_2): Likewise.
2978 * fold-const.c (operand_equal_p): Likewise.
2979 (fold_ternary_loc): Likewise.
2980 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
2981 * gimple.c (DEFTREECODE): Likewise.
2982 * gimplify.c (gimplify_expr): Likewise.
2983 * optabs-tree.c (optab_for_tree_code): Likewise.
2984 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
2985 * tree-eh.c (operation_could_trap_p): Likewise.
2986 (stmt_could_throw_1_p): Likewise.
2987 * tree-inline.c (estimate_operator_cost): Likewise.
2988 * tree-pretty-print.c (dump_generic_node): Likewise.
2989 (op_code_prio): Likewise.
2990 * tree-ssa-loop-im.c (stmt_cost): Likewise.
2991 * tree-ssa-operands.c (get_expr_operands): Likewise.
2992 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
2993 * fold-const-call.h (fold_fma): Delete.
2994 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
2995 CFN_FNMA and CFN_FNMS.
2996 (fold_fma): Delete.
2997 * genmatch.c (combined_fn): New enum.
2998 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
2999 (commutative_op): New function.
3000 (commutate): Use it. Handle more than 2 operands.
3001 (dt_operand::gen_gimple_expr): Use commutative_op.
3002 (parser::parse_expr): Allow :c to be used with non-binary
3003 operators if the commutative operand is known.
3004 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
3005 CFN_FMS, CFN_FNMA and CFN_FNMS.
3006 (backprop::process_assign_use): Remove FMA_EXPR handling.
3007 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
3008 (gen_hsa_fma): New function.
3009 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
3010 IFN_FNMA and IFN_FNMS.
3011 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
3012 * gimple-fold.h (follow_all_ssa_edges): Declare.
3013 * gimple-fold.c (follow_all_ssa_edges): New function.
3014 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
3015 gimple_build interface and use follow_all_ssa_edges to fold the result.
3016 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
3017 instead of checking for optabs directly.
3018 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
3019 rather than FMA_EXPRs.
3020 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
3021 call to IFN_FMA instead of an FMA_EXPR.
3022
3023 2018-05-17 Jim Wilson <jimw@sifive.com>
3024
3025 * expr.c (do_tablejump): When converting index to Pmode, if we have a
3026 sign extended promoted subreg, and the range does not have the sign bit
3027 set, then do a sign extend.
3028
3029 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
3030 test, check for sign extended subreg and/or constant operands, and
3031 do a sign extend in that case.
3032
3033 2018-05-17 Steve Ellcey <sellcey@cavium.com>
3034
3035 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
3036 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
3037 Add untyped.
3038 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
3039 Change logics_shift_reg to logics_shift_imm.
3040 (thunderx2t99_fp_loadpair_basic): Delete.
3041 (thunderx2t99_fp_storepair_basic): Delete.
3042 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
3043 (thunderx2t99_asimd_polynomial): Delete.
3044 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
3045 and neon_fp_mul_d_scalar_q.
3046 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
3047 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
3048 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
3049 (thunderx2t99_asimd_lut): Add missing tbl types.
3050 (thunderx2t99_asimd_ext): Delete.
3051 (thunderx2t99_asimd_load1_1_mult): Delete.
3052 (thunderx2t99_asimd_load1_2_mult): Delete.
3053 (thunderx2t99_asimd_load1_ldp): New.
3054 (thunderx2t99_asimd_load1): New.
3055 (thunderx2t99_asimd_load2): Add missing *load2* types.
3056 (thunderx2t99_asimd_load3): New.
3057 (thunderx2t99_asimd_load4): New.
3058 (thunderx2t99_asimd_store1_1_mult): Delete.
3059 (thunderx2t99_asimd_store1_2_mult): Delete.
3060 (thunderx2t99_asimd_store2_mult): Delete.
3061 (thunderx2t99_asimd_store2_onelane): Delete.
3062 (thunderx2t99_asimd_store_stp): New.
3063 (thunderx2t99_asimd_store1): New.
3064 (thunderx2t99_asimd_store2): New.
3065 (thunderx2t99_asimd_store3): New.
3066 (thunderx2t99_asimd_store4): New.
3067
3068 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
3069
3070 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
3071 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
3072
3073 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
3074 Segher Boessenkool <segher@kernel.crashing.org>
3075
3076 PR target/85698
3077 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
3078 operand.
3079
3080 2018-05-17 Richard Biener <rguenther@suse.de>
3081
3082 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
3083 for pruning loop and prune defs feeding only already visited PHIs.
3084
3085 2018-05-17 Richard Biener <rguenther@suse.de>
3086
3087 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
3088
3089 2018-05-17 Bin Cheng <bin.cheng@arm.com>
3090 Richard Biener <rguenther@suse.de>
3091
3092 PR tree-optimization/85793
3093 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
3094 for VMAT_ELEMENTWISE.
3095
3096 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3097
3098 * internal-fn.h (lookup_internal_fn): Declare
3099 * internal-fn.c (lookup_internal_fn): New function.
3100 * gimple.c (gimple_build_call_from_tree): Handle calls to
3101 internal functions.
3102 * gimple-pretty-print.c (dump_gimple_call): Print "." before
3103 internal function names.
3104 * tree-pretty-print.c (dump_generic_node): Likewise.
3105 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
3106
3107 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3108
3109 * gimple-fold.h (gimple_build): Make the function forms take
3110 combined_fn rather than built_in_function.
3111 (gimple_simplify): Likewise.
3112 * gimple-match-head.c (gimple_simplify): Likewise.
3113 * gimple-fold.c (gimple_build): Likewise.
3114 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
3115 rather than gimple_build_call_internal.
3116 (get_initial_defs_for_reduction): Likewise.
3117 (vect_create_epilog_for_reduction): Likewise.
3118 (vectorizable_live_operation): Likewise.
3119
3120 2018-05-17 Martin Liska <mliska@suse.cz>
3121
3122 * gimple-ssa-sprintf.c (format_directive): Do not use
3123 space in between 'G_' and '('.
3124
3125 2018-05-17 Jakub Jelinek <jakub@redhat.com>
3126
3127 PR target/85323
3128 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
3129 even if the mask is not all ones.
3130
3131 PR target/85323
3132 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
3133 vector.
3134 (ix86_gimple_fold_builtin): Likewise.
3135
3136 PR target/85323
3137 * config/i386/i386.c: Include tree-vector-builder.h.
3138 (ix86_vector_shift_count): New function.
3139 (ix86_fold_builtin): Fold shift builtins by scalar count.
3140 (ix86_gimple_fold_builtin): Likewise.
3141
3142 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
3143 _mm512_setzero): New intrinsics.
3144
3145 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3146 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3147
3148 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
3149 code generation for cases where splatting a value is not useful.
3150 * simplify-rtx.c (simplify_ternary_operation): Simplify
3151 vec_merge across a vec_duplicate and a paradoxical subreg forming
3152 a vector mode to a vec_concat.
3153
3154 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
3155
3156 * config.gcc: Support "goldmont-plus".
3157 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
3158 "goldmont-plus".
3159 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3160 PROCESSOR_GOLDMONT_PLUS.
3161 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
3162 (processor_target_table): Add "goldmont-plus".
3163 (PTA_GOLDMONT_PLUS): Define.
3164 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
3165 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
3166 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
3167 (fold_builtin_cpu): Add "goldmont-plus".
3168 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
3169 (ix86_option_override_internal): Add "goldmont-plus".
3170 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
3171 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
3172 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
3173 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
3174
3175 2018-05-17 Richard Biener <rguenther@suse.de>
3176
3177 PR tree-optimization/85757
3178 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
3179 remove defs that only feed that PHI from further processing.
3180
3181 2018-05-16 Jim Wilson <jimw@sifive.com>
3182
3183 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
3184 asterisk to name.
3185 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
3186
3187 2018-05-16 Mark Wielaard <mark@klomp.org>
3188
3189 * dwarf2out.c (count_index_strings): New function.
3190 (output_indirect_strings): Call count_index_strings and generate
3191 header for dwarf_version >= 5.
3192
3193 2018-05-16 Mark Wielaard <mark@klomp.org>
3194
3195 * dwarf2out.c (dwarf_FORM): New function.
3196 (set_indirect_string): Use dwarf_FORM.
3197 (reset_indirect_string): Likewise.
3198 (size_of_die): Likewise.
3199 (value_format): Likewise.
3200 (output_die): Likewise.
3201 (add_skeleton_AT_string): Likewise.
3202 (output_macinfo_op): Likewise.
3203 (index_string): Likewise.
3204 (output_index_string_offset): Likewise.
3205 (output_index_string): Likewise.
3206 (count_index_strings): Likewise.
3207
3208 2018-05-16 Carl Love <cel@us.ibm.com>
3209
3210 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
3211 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
3212
3213 2018-05-16 Martin Jambor <mjambor@suse.cz>
3214
3215 * ipa-prop.c (ipa_free_all_edge_args): Remove.
3216 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
3217
3218 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
3219
3220 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
3221 (fnma<mode>4): Likewise.
3222 (fms<mode>4): Likewise.
3223 (fnms<mode>4): Likewise.
3224 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
3225 (aarch64_fnma<mode>4): Likewise.
3226 (aarch64_fms<mode>4): Likewise.
3227 (aarch64_fnms<mode>4): Likewise.
3228 (aarch64_fnmadd<mode>4): Likewise.
3229
3230 2018-05-16 Jason Merrill <jason@redhat.com>
3231
3232 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
3233
3234 2018-05-16 Richard Biener <rguenther@suse.de>
3235
3236 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
3237 (dump_stmt_cost): Declare.
3238 (add_stmt_cost): Dump cost we add.
3239 (add_stmt_costs): New function.
3240 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
3241 No longer exported.
3242 (vect_analyze_stmt): Adjust prototype.
3243 (vectorizable_condition): Likewise.
3244 (vectorizable_live_operation): Likewise.
3245 (vectorizable_reduction): Likewise.
3246 (vectorizable_induction): Likewise.
3247 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
3248 cost vector to pass to vectorizable_ and record afterwards.
3249 (vect_model_reduction_cost): Take cost vector argument and adjust.
3250 (vect_model_induction_cost): Likewise.
3251 (vectorizable_reduction): Likewise.
3252 (vectorizable_induction): Likewise.
3253 (vectorizable_live_operation): Likewise.
3254 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
3255 SLP_TREE_NUMBER_OF_VEC_STMTS.
3256 (vect_analyze_slp_cost_1): Remove.
3257 (vect_analyze_slp_cost): Likewise.
3258 (vect_slp_analyze_node_operations): Take visited args and
3259 a target cost vector. Avoid processing already visited stmt sets.
3260 (vect_slp_analyze_operations): Use a local cost vector to gather
3261 costs and register those of non-discarded instances.
3262 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
3263 (vect_schedule_slp_instance): Remove copying of
3264 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
3265 zero.
3266 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
3267 adding cost. Record cost entry location.
3268 (vect_prologue_cost_for_slp_op): Function to compute cost of
3269 a constant or invariant generated for SLP vect in the prologue,
3270 split out from vect_analyze_slp_cost_1.
3271 (vect_model_simple_cost): Make static. Adjust for SLP costing.
3272 (vect_model_promotion_demotion_cost): Likewise.
3273 (vect_model_store_cost): Likewise, make static.
3274 (vect_model_load_cost): Likewise.
3275 (vectorizable_bswap): Add cost vector arg and adjust.
3276 (vectorizable_call): Likewise.
3277 (vectorizable_simd_clone_call): Likewise.
3278 (vectorizable_conversion): Likewise.
3279 (vectorizable_assignment): Likewise.
3280 (vectorizable_shift): Likewise.
3281 (vectorizable_operation): Likewise.
3282 (vectorizable_store): Likewise.
3283 (vectorizable_load): Likewise.
3284 (vectorizable_condition): Likewise.
3285 (vectorizable_comparison): Likewise.
3286 (can_vectorize_live_stmts): Likewise.
3287 (vect_analyze_stmt): Likewise.
3288 (vect_transform_stmt): Adjust calls to vectorizable_*.
3289 * tree-vectorizer.c: Include gimple-pretty-print.h.
3290 (dump_stmt_cost): New function.
3291
3292 2018-05-16 Richard Biener <rguenther@suse.de>
3293
3294 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
3295 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
3296 * tree-ssa-dse.c: Include tree-ssa-loop.h.
3297 (check_name): New callback.
3298 (dse_classify_store): Track cycles via a visited bitmap of PHI
3299 defs and simplify handling of in-loop and across loop dead stores
3300 and properly fail for loop-variant refs. Handle byte-tracking with
3301 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
3302 limiting the walk.
3303
3304 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
3305
3306 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
3307 (vect_get_mask_type_for_stmt): Likewise.
3308 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
3309 split out from...
3310 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
3311 to determine the statement's vector type and the vector type that
3312 should be used for calculating nunits. Deal with cases in which
3313 the type has to be deferred.
3314 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
3315 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
3316 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
3317 (vect_determine_vf_for_stmt): New functions, split out from...
3318 (vect_determine_vectorization_factor): ...here.
3319 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
3320 (vect_get_mask_type_for_stmt): New functions, split out from
3321 vect_determine_vectorization_factor.
3322
3323 2018-05-16 Richard Biener <rguenther@suse.de>
3324
3325 * tree-cfg.c (verify_gimple_assign_ternary): Properly
3326 verify the [VEC_]COND_EXPR embedded comparison.
3327
3328 2018-05-15 Martin Sebor <msebor@redhat.com>
3329
3330 PR tree-optimization/85753
3331 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
3332 RECORD_TYPE in addition to ARRAY_TYPE.
3333
3334 2018-05-15 Martin Sebor <msebor@redhat.com>
3335
3336 PR middle-end/85643
3337 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
3338
3339 2018-05-15 Richard Biener <rguenther@suse.de>
3340
3341 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
3342 add by_clobber_p one. Change algorithm to collect all defs
3343 representing uses we need to walk and try reducing them to
3344 a single one before failing.
3345 (dse_dom_walker::dse_optimize_stmt): Adjust.
3346
3347 2018-05-13 Mark Wielaard <mark@klomp.org>
3348
3349 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
3350 (size_of_loc_descr): Likewise.
3351 (output_loc_operands): Likewise.
3352 (output_loc_operands_raw): Likewise.
3353 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
3354 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
3355 (hash_loc_operands): Likewise.
3356 (compare_loc_operands): Likewise.
3357
3358 2018-05-14 Mark Wielaard <mark@klomp.org>
3359
3360 * dwarf2out.c (count_index_addrs): New function.
3361 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
3362
3363 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3364
3365 PR tree-optimization/83648
3366 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
3367 return value as malloc candidate.
3368
3369 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3370
3371 PR ipa/85734
3372 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
3373 param as true in call to suggest_attribute.
3374
3375 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
3376
3377 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
3378 -mreadonly-in-sdata.
3379
3380 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3381
3382 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
3383 New pattern.
3384 (aarch64_crypto_aesd_fused): Likewise.
3385
3386 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
3387
3388 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
3389 (movsi_aarch64): Likewise.
3390 (load_pairsi): Likewise.
3391 (load_pairdi): Likewise.
3392 (store_pairsi): Likewise.
3393 (store_pairdi): Likewise.
3394 (load_pairsf): Likewise.
3395 (load_pairdf): Likewise.
3396 (store_pairsf): Likewise.
3397 (store_pairdf): Likewise.
3398 (zero_extend): Likewise.
3399 (trunc): Swap alternatives.
3400 (fcvt_target): Add '?' to prefer w over r.
3401
3402 2018-05-14 Jakub Jelinek <jakub@redhat.com>
3403
3404 PR target/85756
3405 * config/i386/i386.md: Disallow non-commutative arithmetics in
3406 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
3407 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
3408 in the peephole2 before it.
3409
3410 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
3411
3412 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
3413 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
3414 (ix86_handle_option): Handle -mcldemote.
3415 * config.gcc: New header.
3416 * config/i386/cldemoteintrin.h: New file.
3417 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
3418 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
3419 -mcldemote.
3420 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3421 OPTION_MASK_ISA_CLDEMOTE.
3422 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
3423 (ix86_valid_target_attribute_inner_p): Ditto.
3424 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
3425 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
3426 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
3427 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
3428 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
3429 (cldemote): New.
3430 * config/i386/i386.opt: Add -mcldemote.
3431 * config/i386/x86intrin.h: New header.
3432 * doc/invoke.texi: Add -mcldemote.
3433
3434 2018-05-14 Richard Biener <rguenther@suse.de>
3435
3436 * doc/match-and-simplify.texi: Adjust :s documentation.
3437
3438 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
3439
3440 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
3441 intended memcpy size.
3442 (REORDER_45): Likewise.
3443
3444 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
3445
3446 * sort.cc: New file.
3447 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
3448 * vec.c (qsort_chk): Use gcc_qsort.
3449 * Makefile.in (OBJS-libcommon): Add sort.o.
3450 (build/sort.o): New target. Use it...
3451 (BUILD_RTL): ... here, and...
3452 (build/gencfn-macros): ... here, and...
3453 (build/genmatch): ... here.
3454
3455 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
3456 Chung-Ju Wu <jasonwucj@gmail.com>
3457
3458 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
3459 * config/nds32/nds32-graywolf.md: New file.
3460 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
3461 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
3462 pipeline.
3463 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
3464 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
3465 * config/nds32/nds32.md (pipeline_model): Add graywolf.
3466 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
3467 * config/nds32/pipelines.md: Include n15 settings.
3468
3469 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
3470 Chung-Ju Wu <jasonwucj@gmail.com>
3471
3472 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
3473 * config/nds32/nds32-n13.md: New file.
3474 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
3475 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
3476 pipeline.
3477 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
3478 * config/nds32/nds32.md (pipeline_model): Add n13.
3479 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
3480 * config/nds32/pipelines.md: Include n13 settings.
3481
3482 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
3483 Chung-Ju Wu <jasonwucj@gmail.com>
3484
3485 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
3486 * config/nds32/nds32-n10.md: New file.
3487 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
3488 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
3489 pipeline.
3490 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
3491 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
3492 * config/nds32/nds32.md (pipeline_model): Add n10.
3493 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
3494 * config/nds32/pipelines.md: Include n10 settings.
3495
3496 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
3497 Kito Cheng <kito.cheng@gmail.com>
3498 Chung-Ju Wu <jasonwucj@gmail.com>
3499
3500 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
3501 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
3502 Add enum values for DSP extension instructions.
3503 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
3504 New constraints.
3505 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
3506 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
3507 New code iterators.
3508 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
3509 * config/nds32/nds32-dspext.md: New file for DSP implementation.
3510 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
3511 * config/nds32/nds32-intrinsic.md: Likewise.
3512 * config/nds32/nds32_intrinsic.h: Likewise.
3513 * config/nds32/nds32-md-auxiliary.c: Likewise.
3514 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
3515 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
3516 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
3517 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
3518 * config/nds32/nds32-protos.h: New declarations for DSP extension.
3519 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
3520 TYPE_DMAC in switch statement.
3521 * config/nds32/nds32.c: New checking and implementation for DSP
3522 extension instructions.
3523 * config/nds32/nds32.h: Likewise.
3524 * config/nds32/nds32.md: Likewise.
3525 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
3526 * config/nds32/predicates.md: Implement new predicates for DSP
3527 extension.
3528
3529 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
3530
3531 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
3532 Reformat alternatives and attributes so it is easier to identify
3533 which constraints/attributes go with which instruction.
3534 (mov<mode>_hardfloat32, FMOVE64): Likewise.
3535 (mov<mode>_softfloat32, FMOVE64): Likewise.
3536 (mov<mode>_hardfloat64, FMOVE64): Likewise.
3537 (mov<mode>_softfloat64, FMOVE64): Likewise.
3538
3539 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
3540
3541 * doc/extend.texi (PowerPC Built-in Functions): Rename this
3542 subsection.
3543 (Basic PowerPC Built-in Functions): The new name of the
3544 subsection previously known as "PowerPC Built-in Functions".
3545 (Basic PowerPC Built-in Functions Available on all Configurations):
3546 New subsubsection.
3547 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
3548 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
3549 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
3550 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
3551
3552 2018-05-11 Martin Jambor <mjambor@suse.cz>
3553
3554 PR ipa/85655
3555 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
3556 single const.
3557
3558 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
3559
3560 PR target/85733
3561 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
3562
3563 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
3564
3565 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
3566 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
3567 (ix86_handle_option): Handle -mwaitpkg.
3568 * config.gcc: New header.
3569 * config/i386/cpuid.h (bit_WAITPKG): New bit.
3570 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
3571 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
3572 function type.
3573 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3574 OPTION_MASK_ISA_WAITPKG.
3575 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
3576 (ix86_option_override_internal): Add PTA_WAITPKG.
3577 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
3578 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
3579 IX86_BUILTIN_TPAUSE.
3580 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
3581 __builtin_ia32_umwait and __builtin_ia32_tpause.
3582 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
3583 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
3584 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
3585 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
3586 UNSPECV_TPAUSE): New.
3587 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
3588 * config/i386/i386.opt: Add -mwaitpkg.
3589 * config/i386/waitpkgintrin.h: New file.
3590 * config/i386/x86intrin.h: New header.
3591 * doc/invoke.texi: Add -mwaitpkg.
3592
3593 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
3594
3595 PR target/85606
3596 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
3597 equivalent.
3598 (cortex-m0): Use armv6s-m isa.
3599 (cortex-m0plus): Likewise.
3600 (cortex-m1): Likewise.
3601 (cortex-m0.small-multiply): Likewise.
3602 (cortex-m0plus.small-multiply): Likewise.
3603 (cortex-m1.small-multiply): Likewise.
3604
3605 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
3606 Jakub Jelinek <jakub@redhat.com>
3607
3608 PR tree-optimization/85692
3609 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
3610 source permute as well.
3611
3612 2018-05-11 Martin Liska <mliska@suse.cz>
3613
3614 PR sanitizer/85556
3615 * doc/extend.texi: Document LLVM style format for no_sanitize
3616 attribute.
3617
3618 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
3619
3620 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
3621 mode_supports_vsx_dform_quad to mode_supports_dq_form.
3622 (mode_supports_vsx_dform_quad): Likewise.
3623 (mode_supports_vmx_dform): Move these functions to be next to the
3624 other mode_supports functions.
3625 (mode_supports_dq_form): Likewise.
3626 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
3627 mode_supports_dq_form.
3628 (reg_offset_addressing_ok_p): Likewise.
3629 (offsettable_ok_by_alignment): Likewise.
3630 (rs6000_legitimate_offset_address_p): Likewise.
3631 (legitimate_lo_sum_address_p): Likewise.
3632 (rs6000_legitimize_address): Likewise.
3633 (rs6000_legitimize_reload_address): Likewise.
3634 (rs6000_secondary_reload_inner): Likewise.
3635 (rs6000_preferred_reload_class): Likewise.
3636 (rs6000_output_move_128bit): Likewise.
3637
3638 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
3639
3640 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
3641 Generate SImode target register for null target.
3642 <case IX86_BUILTIN_XGETBV>: Ditto.
3643 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
3644 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
3645
3646 2018-05-10 Carl Love <cel@us.ibm.com>
3647
3648 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
3649 dcbtt and dcbtstt if operands[2] is 0.
3650
3651 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
3652
3653 PR target/85693
3654 * config/i386/sse.md (usadv64qi): New expander.
3655
3656 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
3657
3658 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
3659 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
3660 -maltivec=be support.
3661 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
3662 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
3663 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
3664 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
3665 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
3666 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
3667 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
3668 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
3669 altivec_vsumsws): Adjust.
3670 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
3671 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
3672 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
3673 support.
3674 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
3675 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
3676 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
3677 (altivec_lve<VI_char>x): Delete expand.
3678 (*altivec_lve<VI_char>x_internal): Rename to...
3679 (altivec_lve<VI_char>x): ... this.
3680 (altivec_lvxl_<mode>): Delete expand.
3681 (*altivec_lvxl_<mode>_internal): Rename to ...
3682 (altivec_lvxl_<mode>): ... this.
3683 (altivec_stvxl_<mode>): Delete expand.
3684 (*altivec_stvxl_<mode>_internal): Rename to ...
3685 (altivec_stvxl_<mode>): ... this.
3686 (altivec_stve<VI_char>x): Delete expand.
3687 (*altivec_stve<VI_char>x_internal): Rename to ...
3688 (altivec_stve<VI_char>x): ... this.
3689 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
3690 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
3691 reduc_plus_scal_<mode>): Adjust.
3692 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
3693 comment.
3694 (rs6000_cpu_cpp_builtins): Adjust.
3695 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
3696 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
3697 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
3698 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
3699 -maltivec=be support.
3700 (rs6000_split_vec_extract_var): Adjust.
3701 (rs6000_split_v4si_init): Adjust.
3702 (swap_selector_for_mode): Delete.
3703 (altivec_expand_lvx_be, altivec_expand_stvx_be,
3704 altivec_expand_stvex_be): Delete.
3705 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
3706 -maltivec=be support.
3707 (rs6000_gimple_fold_builtin): Ditto.
3708 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
3709 Adjust.
3710 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
3711 (TARGET_DIRECT_MOVE_64BIT): Adjust.
3712 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
3713 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
3714 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
3715 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
3716 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
3717 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
3718 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
3719 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
3720 anonymous split): Adjust.
3721 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
3722 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
3723
3724 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
3725
3726 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
3727 when --with-gxx-include-dir is also specified.
3728 * configure: Regenerate.
3729
3730 2018-05-09 Jim Wilson <jimw@sifive.com>
3731
3732 PR target/84797
3733 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
3734 * config/riscv/t-withmultilib: New.
3735 * config/riscv/withmultilib.h: New.
3736 * doc/install.texi: Document RISC-V --with-multilib-list support.
3737
3738 2018-05-09 Richard Biener <rguenther@suse.de>
3739
3740 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
3741 vector.
3742 (vect_bb_vectorization_profitable_p): Adjust. Compute
3743 actual scalar cost using the cost vector and the add_stmt_cost
3744 machinery.
3745
3746 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
3747
3748 PR rtl-optimization/85645
3749 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
3750 in the REG_CFA_REGISTER note for LR, don't leave it empty.
3751
3752 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
3753
3754 PR rtl-optimization/85645
3755 * shrink-wrap.c (spread_components): Return a boolean saying if
3756 anything was changed.
3757 (try_shrink_wrapping_separate): Iterate spread_components until
3758 nothing changes anymore.
3759
3760 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
3761
3762 PR rtl-optimization/85645
3763 * regrename.c (build_def_use): Also kill the chains that include the
3764 destination of a REG_CFA_REGISTER note.
3765
3766 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
3767
3768 PR rtl-optimization/85645
3769 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
3770 insn that has a REG_CFA_REGISTER note.
3771
3772 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
3773
3774 * cfgexpand.c (expand_clobber): New function.
3775 (expand_gimple_stmt_1): Use it.
3776 * tree-vect-stmts.c (vect_clobber_variable): New function,
3777 split out from...
3778 (vectorizable_simd_clone_call): ...here.
3779 (vectorizable_store): Emit a clobber either side of an
3780 IFN_STORE_LANES sequence.
3781 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
3782
3783 2018-05-09 Tom de Vries <tom@codesourcery.com>
3784
3785 PR target/85626
3786 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
3787 (define_insn "trap_if_false"): Add exit after trap.
3788
3789 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
3790
3791 PR rtl-optimization/85638
3792 * bb-reorder.c: Include common/common-target.h.
3793 (create_forwarder_block): New function extracted from...
3794 (fix_up_crossing_landing_pad): ...here. Rename into...
3795 (dw2_fix_up_crossing_landing_pad): ...this.
3796 (sjlj_fix_up_crossing_landing_pad): New function.
3797 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
3798 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
3799 from both partitions and exit the loop after one iteration.
3800
3801 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
3802
3803 Revert:
3804 * doc/extend.texi (PowerPC Built-in Functions): Rename this
3805 subsection.
3806 (Basic PowerPC Built-in Functions): The new name of the
3807 subsection previously known as "PowerPC Built-in Functions".
3808 (Basic PowerPC Built-in Functions Available on all Configurations):
3809 New subsubsection.
3810 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
3811 subsubsection.
3812 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
3813 subsubsection.
3814 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
3815 subsubsection.
3816 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
3817 subsubsection.
3818
3819 2018-05-08 Jim Wilson <jimw@sifive.com>
3820
3821 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
3822 (LD_EMUL_SUFFIX): New.
3823 (LINK_SPEC): Use it.
3824
3825 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
3826
3827 * doc/extend.texi (PowerPC Built-in Functions): Rename this
3828 subsection.
3829 (Basic PowerPC Built-in Functions): The new name of the
3830 subsection previously known as "PowerPC Built-in Functions".
3831 (Basic PowerPC Built-in Functions Available on all Configurations):
3832 New subsubsection.
3833 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
3834 subsubsection.
3835 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
3836 subsubsection.
3837 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
3838 subsubsection.
3839 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
3840 subsubsection.
3841
3842 2018-05-08 Jakub Jelinek <jakub@redhat.com>
3843
3844 PR target/85683
3845 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
3846 after cmpelim optimization.
3847
3848 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
3849
3850 * config.gcc: Support "goldmont".
3851 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
3852 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3853 PROCESSOR_GOLDMONT.
3854 * config/i386/i386.c (m_GOLDMONT): Define.
3855 (processor_target_table): Add "goldmont".
3856 (PTA_GOLDMONT): Define.
3857 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
3858 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
3859 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
3860 (fold_builtin_cpu): Add "goldmont".
3861 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
3862 (ix86_option_override_internal): Add "goldmont".
3863 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
3864 (processor_type): Add PROCESSOR_GOLDMONT.
3865 * config/i386/i386.md: Add CPU "glm".
3866 * config/i386/glm.md: New file.
3867 * config/i386/x86-tune.def: Add m_GOLDMONT.
3868 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
3869
3870 2018-05-08 Jakub Jelinek <jakub@redhat.com>
3871
3872 PR target/85572
3873 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
3874 E_V4DImode.
3875 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
3876 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
3877 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
3878
3879 PR target/85317
3880 * config/i386/i386.c (ix86_fold_builtin): Handle
3881 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
3882
3883 PR target/85480
3884 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
3885 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
3886
3887 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
3888
3889 PR target/85658
3890 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
3891 (check_arch): Likewise.
3892 (check_fpu): Return the result rather than printing it.
3893 (end arch): Fix operator precedence.
3894 (end cpu): Likewise.
3895 (END): Print the result from check_fpu.
3896
3897 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
3898 Alan Hayward <alan.hayward@arm.com>
3899 David Sherwood <david.sherwood@arm.com>
3900
3901 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
3902 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
3903 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
3904 (*fcmuo<mode>_and): New patterns.
3905
3906 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
3907
3908 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
3909 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
3910 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
3911 (cmp_op, sve_imm_con): New code attributes.
3912 (SVE_COND_INT_CMP, imm_con): Delete.
3913 (cmp_op): Remove above unspecs from int attribute.
3914 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
3915 to...
3916 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
3917 comparison-specific unspecs.
3918 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
3919 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
3920 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
3921 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
3922 (*vec_fcm<cmp_op><mode>): Rename to...
3923 (*fcm<cmp_op><mode>): ...this and adjust likewise.
3924 (*vec_fcmuo<mode>): Rename to...
3925 (*fcmuo<mode>): ...this and adjust likewise.
3926 (*pred_fcm<cmp_op><mode>): New pattern.
3927 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
3928 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
3929 functions.
3930 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
3931 and UNORDERED.
3932 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
3933 (aarch64_emit_sve_predicated_cond): New function.
3934 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
3935 (aarch64_emit_unspec_cond_or): Replace with...
3936 (aarch64_emit_sve_or_conds): ...this new function. Use
3937 aarch64_emit_sve_ptrue_op for the individual comparisons and
3938 aarch64_emit_binop to OR them together.
3939 (aarch64_emit_inverted_unspec_cond): Replace with...
3940 (aarch64_emit_sve_inverted_cond): ...this new function. Use
3941 aarch64_emit_sve_ptrue_op for the comparison and
3942 aarch64_emit_unop to invert the result.
3943 (aarch64_expand_sve_vec_cmp_float): Update after the above
3944 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
3945
3946 2018-05-07 Nathan Sidwell <nathan@acm.org>
3947
3948 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
3949 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
3950 (Backwards Compatibility): Likewise.
3951
3952 2018-05-07 Luis Machado <luis.machado@linaro.org>
3953
3954 PR bootstrap/85681
3955 Revert:
3956 2018-05-07 Luis Machado <luis.machado@linaro.org>
3957
3958 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3959 <prefetch_dynamic_strides>: New const bool field.
3960 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3961 prefetch_dynamic_strides.
3962 (exynosm1_prefetch_tune): Likewise.
3963 (thunderxt88_prefetch_tune): Likewise.
3964 (thunderx_prefetch_tune): Likewise.
3965 (thunderx2t99_prefetch_tune): Likewise.
3966 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
3967 to false.
3968 (aarch64_override_options_internal): Update to set
3969 PARAM_PREFETCH_DYNAMIC_STRIDES.
3970 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
3971 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
3972 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
3973 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
3974 prefetch-dynamic-strides setting.
3975
3976 2018-05-07 Luis Machado <luis.machado@linaro.org>
3977
3978 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3979 <minimum_stride>: New const int field.
3980 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3981 minimum_stride field.
3982 (exynosm1_prefetch_tune): Likewise.
3983 (thunderxt88_prefetch_tune): Likewise.
3984 (thunderx_prefetch_tune): Likewise.
3985 (thunderx2t99_prefetch_tune): Likewise.
3986 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
3987 (aarch64_override_options_internal): Update to set
3988 PARAM_PREFETCH_MINIMUM_STRIDE.
3989 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
3990 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
3991 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
3992 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
3993 stride is constant and is below the minimum stride threshold.
3994
3995 2018-05-07 Luis Machado <luis.machado@linaro.org>
3996
3997 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
3998 to 512.
3999
4000 2018-05-07 Luis Machado <luis.machado@linaro.org>
4001
4002 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
4003 <prefetch_dynamic_strides>: New const bool field.
4004 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
4005 prefetch_dynamic_strides.
4006 (exynosm1_prefetch_tune): Likewise.
4007 (thunderxt88_prefetch_tune): Likewise.
4008 (thunderx_prefetch_tune): Likewise.
4009 (thunderx2t99_prefetch_tune): Likewise.
4010 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
4011 to false.
4012 (aarch64_override_options_internal): Update to set
4013 PARAM_PREFETCH_DYNAMIC_STRIDES.
4014 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
4015 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
4016 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
4017 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
4018 prefetch-dynamic-strides setting.
4019
4020 2018-05-07 Luis Machado <luis.machado@linaro.org>
4021
4022 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
4023 <minimum_stride>: New const int field.
4024 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
4025 minimum_stride field.
4026 (exynosm1_prefetch_tune): Likewise.
4027 (thunderxt88_prefetch_tune): Likewise.
4028 (thunderx_prefetch_tune): Likewise.
4029 (thunderx2t99_prefetch_tune): Likewise.
4030 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
4031 (aarch64_override_options_internal): Update to set
4032 PARAM_PREFETCH_MINIMUM_STRIDE.
4033 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
4034 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
4035 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
4036 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
4037 stride is constant and is below the minimum stride threshold.
4038
4039 2018-05-06 Jakub Jelinek <jakub@redhat.com>
4040
4041 PR c++/85659
4042 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
4043 the type is addressable. Don't force op into register if it has
4044 BLKmode.
4045
4046 2018-05-05 Roland McGrath <mcgrathr@google.com>
4047
4048 PR other/77609
4049 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
4050 any section for which we don't know a specific type it should have,
4051 regardless of name. Previously this was done only for the exact
4052 names ".init_array", ".fini_array", and ".preinit_array".
4053 (default_elf_asm_named_section): Add comment about
4054 relationship with default_section_type_flags and SECTION_NOTYPE.
4055 (get_section): Don't consider it a type conflict if one side has
4056 SECTION_NOTYPE and the other doesn't, as long as neither has the
4057 SECTION_BSS et al used in the default_section_type_flags logic.
4058
4059 2018-05-05 Tom de Vries <tom@codesourcery.com>
4060
4061 PR target/85653
4062 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
4063 (workaround_barsyncs): New function.
4064 (nvptx_reorg): Use workaround_barsyncs.
4065 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
4066 (define_expand "nvptx_membar_cta"): New define_expand.
4067 (define_insn "*nvptx_membar_cta"): New insn.
4068
4069 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
4070
4071 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
4072 To improve optimization opportunities.
4073 * builtin-types.def: The new needed builtin types for the above.
4074
4075 2018-05-04 Richard Biener <rguenther@suse.de>
4076
4077 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
4078 * gimple-ssa-store-merging.c
4079 (imm_store_chain_info::output_merged_store): Remove redundant create,
4080 release split_store vector contents on failure.
4081 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
4082 scalar stmt vector on cache hit.
4083
4084 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
4085
4086 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
4087 Xilinx FP support.
4088 * config.gcc (powerpc-xilinx-eabi*): Remove.
4089 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
4090 support.
4091 (fusion_addis_mem_combo_load): Ditto.
4092 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
4093 FP support.
4094 (rs6000_cpu_cpp_builtins): Ditto.
4095 * config/rs6000/rs6000-linux.c
4096 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
4097 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
4098 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
4099 support.
4100 (rs6000_setup_reg_addr_masks): Ditto.
4101 (rs6000_init_hard_regno_mode_ok): Ditto.
4102 (rs6000_option_override_internal): Ditto.
4103 (legitimate_lo_sum_address_p): Ditto.
4104 (rs6000_legitimize_address): Ditto.
4105 (rs6000_legitimize_reload_address): Ditto.
4106 (rs6000_legitimate_address_p): Ditto.
4107 (abi_v4_pass_in_fpr): Ditto.
4108 (setup_incoming_varargs): Ditto.
4109 (rs6000_gimplify_va_arg): Ditto.
4110 (rs6000_split_multireg_move): Ditto.
4111 (rs6000_savres_strategy): Ditto.
4112 (rs6000_emit_prologue_components): Ditto.
4113 (rs6000_emit_epilogue_components): Ditto.
4114 (rs6000_emit_prologue): Ditto.
4115 (rs6000_emit_epilogue): Ditto.
4116 (rs6000_elf_file_end): Ditto.
4117 (rs6000_function_value): Ditto.
4118 (rs6000_libcall_value): Ditto.
4119 * config/rs6000/rs6000.h: Ditto.
4120 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
4121 (TARGET_MINMAX): ... this. New.
4122 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
4123 * config/rs6000/rs6000.md: Remove Xilinx FP support.
4124 (*movsi_internal1_single): Delete.
4125 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
4126 mfpu=, mxilinx-fpu): Delete.
4127 * config/rs6000/singlefp.h: Delete.
4128 * config/rs6000/sysv4.h: Remove Xilinx FP support.
4129 * config/rs6000/t-rs6000: Ditto.
4130 * config/rs6000/t-xilinx: Delete.
4131 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
4132 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
4133 (VStype_simple): Delete.
4134 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
4135 * config/rs6000/xfpu.h: Delete.
4136 * config/rs6000/xfpu.md: Delete.
4137 * config/rs6000/xilinx.h: Delete.
4138 * config/rs6000/xilinx.opt: Delete.
4139 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
4140 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
4141
4142 2018-05-04 Tom de Vries <tom@codesourcery.com>
4143
4144 PR libgomp/85639
4145 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
4146 if ignore == 0.
4147
4148 2018-05-04 Richard Biener <rguenther@suse.de>
4149
4150 PR middle-end/85627
4151 * tree-complex.c (update_complex_assignment): We are always in SSA form.
4152 (expand_complex_div_wide): Likewise.
4153 (expand_complex_operations_1): Likewise.
4154 (expand_complex_libcall): Preserve EH info of the original stmt.
4155 (tree_lower_complex): Handle removed blocks.
4156 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
4157 on complex multiplication and division libcall builtins.
4158
4159 2018-05-04 Richard Biener <rguenther@suse.de>
4160
4161 PR middle-end/85574
4162 * fold-const.c (negate_expr_p): Restrict negation of operand
4163 zero of a division to when we know that can happen without
4164 overflow.
4165 (fold_negate_expr_1): Likewise.
4166
4167 2018-05-04 Jakub Jelinek <jakub@redhat.com>
4168
4169 PR libstdc++/85466
4170 * real.h (real_nextafter): Declare.
4171 * real.c (real_nextafter): New function.
4172 * fold-const-call.c (fold_const_nextafter): New function.
4173 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
4174 CASE_CFN_NEXTTOWARD.
4175 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
4176 even when arg1_mode is different from arg0_mode.
4177
4178 2018-05-03 Nathan Sidwell <nathan@acm.org>
4179
4180 * doc/extend.texi (Deprecated Features): Remove
4181 -ffriend-injection.
4182 (Backwards Compatibility): Likewise.
4183 * doc/invoke.texi (C++ Language Options): Likewise.
4184 (C++ Dialect Options): Likewise.
4185
4186 2018-05-03 Jakub Jelinek <jakub@redhat.com>
4187
4188 PR target/85530
4189 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
4190 _mm512_mask_mullox_epi64): New intrinsics.
4191
4192 2018-05-03 Tom de Vries <tom@codesourcery.com>
4193
4194 PR testsuite/85106
4195 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
4196 dump files): Add offload-tree.
4197
4198 2018-05-03 Richard Biener <rguenther@suse.de>
4199
4200 PR tree-optimization/85615
4201 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
4202 to loops not nested in BBs loop father to avoid creating multi-entry
4203 loops.
4204
4205 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4206
4207 PR tree-optimization/70291
4208 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
4209 arguments. Change return type to tree. Emit libcall as a new
4210 statement rather than replacing existing one when inplace_p is true.
4211 (expand_complex_multiplication_components): New function.
4212 (expand_complex_multiplication): Expand floating-point complex
4213 multiplication using the above.
4214 (expand_complex_division): Rename inner_type parameter to type.
4215 Update expand_complex_libcall call-site.
4216 (expand_complex_operations_1): Update expand_complex_multiplication
4217 and expand_complex_division call-sites.
4218
4219 2018-05-02 Jakub Jelinek <jakub@redhat.com>
4220
4221 PR target/85582
4222 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
4223 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
4224 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
4225 the highest significant bit of the shift count mask is clear. In
4226 check whether and[sq]i3 is needed verify that all significant bits
4227 of the shift count other than the highest are set.
4228
4229 2018-05-02 Tom de Vries <tom@codesourcery.com>
4230
4231 PR libgomp/82428
4232 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
4233 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
4234 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
4235 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
4236 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
4237 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
4238 __builtin_goacc_parlevel_size.
4239
4240 2018-05-02 Richard Biener <rguenther@suse.de>
4241
4242 PR tree-optimization/85597
4243 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
4244 do not use split vect_get_vec_defs call but call vect_get_slp_defs
4245 directly.
4246
4247 2018-05-02 Tom de Vries <tom@codesourcery.com>
4248
4249 PR testsuite/85106
4250 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
4251 dump files): Add ltrans-tree.
4252
4253 2018-05-02 Tom de Vries <tom@codesourcery.com>
4254
4255 PR testsuite/85106
4256 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
4257 dump files): Add wpa-ipa.
4258
4259 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
4260
4261 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
4262 powerpc*-*-linux*paired* target.
4263 * config/rs6000/750cl.h: Delete.
4264 * config/rs6000/paired.h: Delete.
4265 * config/rs6000/paired.md: Delete.
4266 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
4267 float support.
4268 * config/rs6000/rs6000-builtin.def: Remove paired float support.
4269 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
4270 comment. Remove paired float support.
4271 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
4272 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
4273 VECTOR_PAIRED.
4274 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
4275 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
4276 declarations.
4277 * config/rs6000/rs6000.c: Remove paired float support.
4278 (paired_expand_vector_init, paired_expand_vector_move,
4279 paired_emit_vector_compare, paired_emit_vector_cond_expr,
4280 (paired_expand_lv_builtin, paired_expand_stv_builtin,
4281 paired_expand_builtin, paired_expand_predicate_builtin,
4282 paired_init_builtins): Delete.
4283 * config/rs6000/rs6000.h: Remove paired float support.
4284 * config/rs6000/rs6000.md: Remove paired float support.
4285 (move_from_CR_ov_bit): Delete.
4286 * config/rs6000/rs6000.opt (mpaired): Delete.
4287 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
4288 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
4289
4290 2018-05-02 Richard Biener <rguenther@suse.de>
4291
4292 PR middle-end/85567
4293 * gimplify.c (gimplify_save_expr): When in SSA form allow
4294 SAVE_EXPRs to compute to SSA vars.
4295
4296 2018-05-02 Jakub Jelinek <jakub@redhat.com>
4297
4298 PR target/85582
4299 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
4300 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
4301 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
4302 clobber operands[2], instead use a new pseudo. Formatting fixes.
4303
4304 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
4305
4306 PR tree-optimization/85586
4307 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
4308 exit early for statements in the same group if the accesses are
4309 not strided.
4310
4311 2018-05-02 Tom de Vries <tom@codesourcery.com>
4312
4313 PR lto/85451
4314 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
4315 error message.
4316
4317 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
4318
4319 PR tree-optimization/85143
4320 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
4321
4322 2018-05-01 Tom de Vries <tom@codesourcery.com>
4323
4324 PR lto/85451
4325 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
4326 not found" error message.
4327
4328 2018-05-01 Tom de Vries <tom@codesourcery.com>
4329
4330 PR other/83786
4331 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
4332 * vec.c (test_ordered_remove_if): New function.
4333 (vec_c_tests): Call test_ordered_remove_if.
4334 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
4335 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
4336 * tree-vect-patterns.c (vect_pattern_recog_1): Use
4337 VEC_ORDERED_REMOVE_IF.
4338
4339 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4340
4341 PR tree-optimization/82665
4342 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
4343 pointer subtraction where arguments come from a memchr call.
4344
4345 2018-05-01 Jakub Jelinek <jakub@redhat.com>
4346
4347 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
4348 --push-state --as-needed and --pop-state instead of --as-needed and
4349 --no-as-needed if ld supports it.
4350 * configure: Regenerated.
4351
4352 PR web/85578
4353 * doc/install.texi2html: Replace _002d with - and _002a with * in
4354 generated html files using sed.
4355
4356 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4357
4358 PR c++/85523
4359 * gcc-rich-location.c (blank_line_before_p): New function.
4360 (use_new_line): New function.
4361 (gcc_rich_location::add_fixit_insert_formatted): New function.
4362 * gcc-rich-location.h
4363 (gcc_rich_location::add_fixit_insert_formatted): New function.
4364
4365 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4366
4367 * selftest.c (assert_streq): Rename "expected" and "actual" to
4368 "val1" and "val2". Extend NULL-handling to cover both inputs
4369 symmetrically, while still requiring both to be non-NULL for a pass.
4370 * selftest.h (assert_streq): Rename "expected" and "actual" to
4371 "val1" and "val2".
4372 (ASSERT_EQ): Likewise.
4373 (ASSERT_EQ_AT): Likewise.
4374 (ASSERT_KNOWN_EQ): Likewise.
4375 (ASSERT_KNOWN_EQ_AT): Likewise.
4376 (ASSERT_NE): Likewise.
4377 (ASSERT_MAYBE_NE): Likewise.
4378 (ASSERT_MAYBE_NE_AT): Likewise.
4379 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
4380 the assertion to pass.
4381 (ASSERT_STREQ_AT): Likewise.
4382
4383 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
4384
4385 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
4386 interaction with -pie.
4387
4388 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4389
4390 * selftest.h: Fix alphabetization of per-source-file selftest
4391 declarations.
4392
4393 2018-04-30 Jason Merrill <jason@redhat.com>
4394
4395 PR c++/61982 - dead stores to destroyed objects.
4396 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
4397 of clobber.
4398
4399 2018-04-30 Jason Merrill <jason@redhat.com>
4400
4401 * tree.c (build_clobber): New.
4402 * tree.h: Declare it.
4403 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
4404
4405 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4406
4407 * diagnostic-show-locus.c (layout::layout): Update for
4408 location_get_source_line returning a char_span.
4409 (struct char_span): Move to input.h.
4410 (struct correction): Update for fields in char_span becoming
4411 private.
4412 (struct source_line): Update for location_get_source_line
4413 returning a char_span.
4414 (layout::print_line): Likewise.
4415 * edit-context.c (edited_file::print_content): Likewise.
4416 (edited_file::print_diff_hunk): Likewise.
4417 (edited_file::print_run_of_changed_lines): Likewise.
4418 (edited_file::get_num_lines): Likewise.
4419 (edited_line::edited_line): Likewise.
4420 * final.c (asm_show_source): Likewise.
4421 * input.c (location_get_source_line): Convert return type
4422 from const char * to char_span, losing the final "line_len"
4423 param.
4424 (dump_location_info): Update for the above.
4425 (get_substring_ranges_for_loc): Likewise. Use a char_span
4426 when handling the literal within the line.
4427 (test_reading_source_line): Update for location_get_source_line
4428 returning a char_span.
4429 * input.h (class char_span): Move here from
4430 diagnostic-show-locus.c, converting from a struct to a class.
4431 Make data members private.
4432 (char_span::operator bool): New.
4433 (char_span::length): New.
4434 (char_span::get_buffer): New.
4435 (char_span::operator[]): New.
4436 (char_span::subspan): Make const.
4437 (char_span::xstrdup): New.
4438 (location_get_source_line): Convert return type from const char *
4439 to char_span, losing the final "line_size" param.
4440
4441 2018-04-30 Jan Hubicka <jh@suse.cz>
4442
4443 * lto-wrapper.c (ltrans_priorities): New static var.
4444 (cmp_priority): New.
4445 (run_gcc): Read priorities and if doing parallel build order
4446 the Makefile by them.
4447
4448 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4449
4450 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
4451
4452 2018-04-30 Richard Biener <rguenther@suse.de>
4453
4454 * tree-cfg.c (verify_address): Remove base argument, add
4455 flag whether to check TREE_ADDRESSABLE and do that.
4456 (verify_expr): Remove.
4457 (verify_types_in_gimple_reference): Add pieces from verify_expr.
4458 (verify_gimple_assign_single): Likewise.
4459 (verify_gimple_switch): Likewise.
4460 (verify_expr_location_1): Dereference tp once. Add (disabled)
4461 piece from verify_expr.
4462 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
4463
4464 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
4465
4466 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
4467
4468 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
4469
4470 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
4471 (small_data_pattern): Likewise.
4472 (arc_rewrite_small_data): Likewise.
4473 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
4474 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
4475 (get_symbol_alignment): New function.
4476 (legitimate_small_data_address_p): Likewise.
4477 (legitimate_scaled_address): Update, call
4478 legitimate_small_data_address_p.
4479 (output_sdata): New static variable.
4480 (arc_print_operand): Update how we handle small data operands.
4481 (arc_print_operand_address): Likewise.
4482 (arc_legitimate_address_p): Update, use
4483 legitimate_small_data_address_p.
4484 (arc_rewrite_small_data_p): Remove.
4485 (arc_rewrite_small_data_1): Likewise.
4486 (arc_rewrite_small_data): Likewise.
4487 (small_data_pattern): Likewise.
4488 (compact_sda_memory_operand): Update to use
4489 legitimate_small_data_address_p and get_symbol_alignment.
4490 (prepare_move_operands): Don't rewite sdata pattern.
4491 (prepare_extend_operands): Remove.
4492 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
4493 pattern.
4494 (zero_extendqisi2): Likewise.
4495 (zero_extendhisi2): Likewise.
4496 (extendqihi2): Likewise.
4497 (extendqisi2): Likewise.
4498 (extendhisi2): Likewise.
4499 (addsi3): Likewise.
4500 (subsi3): Likewise.
4501 (andsi3): Likewise.
4502 * config/arc/constraints.md (Usd): Change it to memory constraint.
4503
4504 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
4505
4506 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
4507 as source of std instructions.
4508 * config/arc/arc.md (movsi_insn): Update pattern predicate to
4509 allow 6-bit constants as source for store instructions.
4510 (movdi_insn): Update instruction pattern to allow 6-bit constants
4511 as source for store instructions.
4512
4513 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
4514
4515 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
4516
4517 2018-04-30 Nathan Sidwell <nathan@acm.org>
4518 Sandra Loosemore <sandra@codesourcery.com>
4519
4520 * dumpfile.c (dump_open): Allow '-' for stdout.
4521 * doc/invoke.texi (Developer Options): Document dump filename
4522 determination early. Document stdin/stdout selection.
4523
4524 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
4525
4526 Microblaze Target: PIC data text relative
4527
4528 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
4529 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
4530 Add declaration.
4531 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
4532 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
4533 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
4534 New addressing mode for data-text relative position indepenedent code.
4535 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
4536 'ADDRESS_SYMBOLIC_TXT_REL'.
4537 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
4538 (microblaze_legitimate_pic_operand): Exclude function calls from
4539 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
4540 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
4541 addresses cases.
4542 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
4543 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
4544 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
4545 for 'address + offset'.
4546 (microblaze_expand_prologue): Add new function prologue call for
4547 'r20' assignation.
4548 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
4549 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
4550 table in case of TARGET_PIC_DATA_TEXT_REL.
4551 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
4552 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
4553 Add new macros 'UNSPEC_TEXT',
4554 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
4555 + exclude function calls from 'UNSPEC_PLT' in case of data text
4556 relative mode.
4557 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
4558 new target hook for generating address diff vector tables in case of
4559 flag_pic.
4560 * doc/tm.texi : Regenerate.
4561 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
4562 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
4563 of addr diff vector generation.
4564 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
4565 target hook definition.
4566 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
4567 Add default function for generate_pic_addr_diff_vec -> flag_pic.
4568 * doc/invoke.texi (Add new pic option): Add new microblaze pic
4569 option for data text relative.
4570
4571 2018-04-30 Richard Biener <rguenther@suse.de>
4572
4573 * tree-chrec.h (evolution_function_is_constant_p): Remove
4574 redundant check.
4575 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
4576
4577 2018-04-30 Richard Biener <rguenther@suse.de>
4578
4579 PR bootstrap/85571
4580 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
4581
4582 2018-04-30 Richard Biener <rguenther@suse.de>
4583
4584 PR tree-optimization/28364
4585 PR tree-optimization/85275
4586 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
4587 copying first exit test.
4588
4589 2018-04-28 Mark Wielaard <mark@klomp.org>
4590
4591 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
4592 dwarf_version >= 5.
4593 (dwarf_AT): Handle DW_AT_addr_base.
4594 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
4595
4596 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
4597
4598 PR target/84431
4599 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
4600 (*ashl<dwi>3_doubleword_mask_1): Ditto.
4601 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
4602 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
4603
4604 2018-04-28 Richard Biener <rguenther@suse.de>
4605
4606 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
4607 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
4608 to reflect use. Only add interesting stmts.
4609
4610 2018-04-27 Martin Jambor <mjambor@suse.cz>
4611
4612 PR ipa/85549
4613 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
4614 the jump function allows for passing through aggregate values.
4615
4616 2018-04-27 David Malcolm <dmalcolm@redhat.com>
4617
4618 * input.h (in_system_header_at): Convert from macro to inline
4619 function.
4620 (from_macro_expansion_at): Likewise.
4621 (from_macro_definition_at): Likewise.
4622
4623 2018-04-27 Jeff Law <law@redhat.com>
4624
4625 * config.gcc: Mark tile* targets as deprecated/obsolete.
4626
4627 2018-04-27 Richard Biener <rguenther@suse.de>
4628
4629 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
4630 fix for ILP32.
4631
4632 2018-04-27 Richard Biener <rguenther@suse.de>
4633
4634 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
4635
4636 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
4637
4638 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
4639 with Yd constraint. Set "preferred_for_speed" attribute from
4640 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
4641 with Yd constraint.
4642 (*movdi_internal): Ditto.
4643 (movti_interunit splitters): Remove
4644 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
4645 (movdi_interunit splitters): Ditto.
4646 * config/i386/constraints.md (Ye): Remove.
4647 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
4648
4649 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4650
4651 PR target/85512
4652 * config/aarch64/constraints.md (Usg): Limit to 31.
4653 (Usj): Limit to 63.
4654
4655 2018-04-27 Jakub Jelinek <jakub@redhat.com>
4656
4657 PR tree-optimization/85529
4658 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
4659 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
4660 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
4661 zero extension or masking of the MSB bit.
4662 (optimize_range_tests): Add FIRST_BB argument, pass it through
4663 to optimize_range_tests_var_bound.
4664 (maybe_optimize_range_tests, reassociate_bb): Adjust
4665 optimize_range_tests callers.
4666
4667 2018-04-26 Richard Biener <rguenther@suse.de>
4668 Jakub Jelinek <jakub@redhat.com>
4669
4670 * cgraph.h (symbol_table): Just declare debug method here.
4671 * symtab.c (symbol_table::debug): Define.
4672
4673 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
4674
4675 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
4676
4677 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
4678
4679 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
4680 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
4681 (*movdi_internal): Substitute Yi and Yj constraint with x
4682 and Ym and Yn constraint with y constraint. Update "isa"
4683 attribute and set "preferred_for_speed" attribute from
4684 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
4685 (*movsi_internal): Ditto.
4686 (*movdf_internal): Ditto.
4687 (*movsf_internal): Ditto.
4688 (*zero_extendsidi2): Ditto.
4689 * config/i386/sse.md (vec_set<mode>_0): Ditto.
4690 (sse2_loadld): Ditto.
4691 (*vec_extract<ssevecmodelower>_0): Ditto.
4692 (*vec_extractv4si_0_zext_sse4): Ditto.
4693 (vec_concatv2di): Ditto.
4694 (*vec_dup<mode>): Ditto.
4695 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
4696 * config/i386/constraints.md (Yi): Remove.
4697 (Yj): Remove.
4698 (Ym): Remove.
4699 (Yn): Remove.
4700
4701 2018-04-26 Nathan Sidwell <nathan@acm.org>
4702
4703 * dumpfile.c (dump_open): New.
4704 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
4705 (dump_finish): Detect stdio/stderr by value not name.
4706
4707 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
4708
4709 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
4710
4711 2018-04-26 Tom de Vries <tom@codesourcery.com>
4712
4713 PR target/84952
4714 * config/nvptx/nvptx.c (verify_neutering_jumps)
4715 (verify_neutering_labels): New function
4716 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
4717
4718 2018-04-26 Tom de Vries <tom@codesourcery.com>
4719
4720 PR target/84025
4721 * config/nvptx/nvptx.c (needs_neutering_p): New function.
4722 (nvptx_single): Use needs_neutering_p to skip over insns that do not
4723 need neutering.
4724
4725 2018-04-26 Richard Biener <rguenther@suse.de>
4726 Tom de Vries <tom@codesourcery.com>
4727
4728 PR lto/85422
4729 * lto-streamer-out.c (output_function): Fixup loops if required to match
4730 discovery done in the reader.
4731
4732 2018-04-26 Richard Biener <rguenther@suse.de>
4733
4734 PR tree-optimization/85116
4735 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
4736 have a loop exit from the single latch predecessor. Remove
4737 case of header with just condition.
4738 (ch_base::copy_headers): Exclude infinite loops from any
4739 processing.
4740 (pass_ch::execute): Record exits.
4741
4742 2018-04-26 Richard Biener <rguenther@suse.de>
4743
4744 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
4745 prologue cost vector and pass it to vect_get_load_cost.
4746 (vect_get_peeling_costs_all_drs): Likewise.
4747 (vect_peeling_hash_get_lowest_cost): Likewise.
4748 (vect_enhance_data_refs_alignment): Likewise.
4749
4750 2018-04-26 Richard Biener <rguenther@suse.de>
4751
4752 PR middle-end/85450
4753 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
4754 checking of integer<->pointer conversions.
4755 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
4756 sign-/zero-extending pointer types.
4757 (expand_omp_for_static_chunk): Likewise.
4758
4759 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
4760 Jean Lee <xiaoyur347@gmail.com>
4761
4762 * config/mips/mips.c (mips_asan_shadow_offset): New function.
4763 (TARGET_ASAN_SHADOW_OFFSET): Define.
4764 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
4765 true for -fsanitize=address.
4766
4767 2018-04-25 Mark Wielaard <mark@klomp.org>
4768
4769 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
4770 shorter ones.
4771
4772 2018-04-25 Jakub Jelinek <jakub@redhat.com>
4773
4774 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
4775 than "alu", remove explicit "memory" and "imm_disp" attributes.
4776 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
4777
4778 PR middle-end/85414
4779 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
4780 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
4781 gen_lowpart_no_emit.
4782
4783 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
4784
4785 PR target/85473
4786 * config/i386/i386.c (ix86_expand_builtin): Change memory
4787 operand to XI, extend p0 to Pmode.
4788 * config/i386/i386.md: Change unspec volatile and operand
4789 1 mode to XI, change operand 0 mode to P.
4790
4791 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4792
4793 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
4794 GET_MODE_MASK before any checking.
4795 (nds32_can_use_bset_p): Likewise.
4796 (nds32_can_use_btgl_p): Likewise.
4797
4798 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4799
4800 * config/nds32/nds32-doubleword.md: New define_split pattern for
4801 illegal register number.
4802
4803 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4804
4805 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
4806
4807 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4808
4809 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
4810
4811 2018-04-25 Richard Biener <rguenther@suse.de>
4812
4813 * lto-streamer.h (LTO_major_version): Bump to 8.
4814
4815 2018-04-25 Jakub Jelinek <jakub@redhat.com>
4816
4817 * BASE-VER: Set to 9.0.0.
4818
4819 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
4820
4821 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
4822 in __abskf2 and __powikf2.
4823
4824 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4825
4826 PR target/85512
4827 * config/aarch64/constraints.md (Usg, Usj): New constraints.
4828 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
4829 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
4830 Use the above on operand 2. Reindent.
4831 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
4832
4833 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
4834
4835 PR target/85485
4836 * common/config/i386/i386-common.c (ix86_handle_option): Don't
4837 handle OPT_mcet.
4838 * config/i386/i386.opt (mcet): Removed.
4839 * doc/install.texi: Remove -mcet documentation.
4840 * doc/invoke.texi: Likewise.
4841
4842 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
4843
4844 PR target/85485
4845 * doc/install.texi: Remove -mcet from bootstrap-cet.
4846
4847 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4848
4849 PR target/85511
4850 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
4851 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
4852 if TARGET_64BIT.
4853
4854 PR target/85503
4855 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
4856 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
4857 containing a CONST_VECTOR.
4858
4859 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
4860
4861 * doc/install.texi: Update newlib dependency for nvptx.
4862
4863 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4864
4865 PR target/85508
4866 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
4867 instead of INTVAL when shifting x left.
4868
4869 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
4870
4871 PR tree-optimization/85478
4872 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
4873 vect_grouped_store_supported for single element vectors.
4874
4875 2018-04-24 Richard Biener <rguenther@suse.de>
4876
4877 PR target/85491
4878 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
4879 load cost increase to the case of non-constant step.
4880
4881 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4882
4883 PR target/84828
4884 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
4885 destination if any_malformed_asm.
4886
4887 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
4888
4889 PR middle-end/85496
4890 * expr.c (store_field): In the bitfield case, if the value comes from
4891 a function call and is returned in registers by means of a PARALLEL,
4892 do not change the mode of the temporary unless BLKmode and VOIDmode.
4893
4894 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
4895
4896 PR rtl-optimization/85423
4897 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
4898 dependencies to debug insns when the previous insn is non-debug.
4899
4900 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
4901
4902 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
4903 enums into a single definition.
4904 (fls): Fix predicates and printing.
4905 (seti): Likewise.
4906
4907 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
4908
4909 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
4910 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
4911 and short u6 immediate.
4912 (check_if_valid_sleep_operand): Remove.
4913 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
4914
4915 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4916
4917 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
4918 flag_always_save_lp condition.
4919 * config/nds32/nds32.opt (malways-save-lp): New option.
4920
4921 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4922
4923 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
4924 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
4925 * config/nds32/nds32.h
4926 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
4927 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
4928
4929 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4930
4931 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
4932 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
4933
4934 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4935 Chung-Ju Wu <jasonwucj@gmail.com>
4936
4937 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
4938 Declare.
4939 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
4940 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
4941
4942 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4943
4944 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
4945
4946 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4947
4948 * config/nds32/nds32-protos.h (nds32_data_alignment,
4949 nds32_local_alignment): Declare.
4950 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
4951 nds32_local_alignment): New functions.
4952 (TARGET_CONSTANT_ALIGNMENT): Define.
4953 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
4954
4955 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4956
4957 * config/nds32/nds32.c
4958 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
4959 (TARGET_MODES_TIEABLE_P): Likewise.
4960
4961 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4962
4963 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
4964 level Ofast and Og.
4965
4966 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
4967 Chung-Ju Wu <jasonwucj@gmail.com>
4968
4969 * config/nds32/constants.md (unspec_volatile_element): Add enum values
4970 for unaligned access.
4971 * config/nds32/nds32-intrinsic.c: Implementation of expanding
4972 unaligned access.
4973 * config/nds32/nds32-intrinsic.md: Likewise.
4974 * config/nds32/nds32_intrinsic.h: Likewise.
4975 * config/nds32/nds32.h (nds32_builtins): Likewise.
4976 * config/nds32/nds32.opt (munaligned-access): New option.
4977 * config/nds32/nds32.c (nds32_asm_file_start): Display
4978 flag_unaligned_access status.
4979
4980 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
4981
4982 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
4983 -mno-relax is present.
4984 * config/riscv/linux.h (LINK_SPEC): Ditto.
4985
4986 2018-04-20 Martin Sebor <msebor@redhat.com>
4987
4988 PR c/85365
4989 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
4990 for null pointers.
4991 (gimple_fold_builtin_stxcpy_chk): Same.
4992 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
4993
4994 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
4995
4996 PR target/85456
4997 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
4998 __powikf2 when long double is IEEE 128-bit.
4999
5000 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
5001
5002 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
5003 step to make sure stack always aligned.
5004
5005 2018-04-20 Carl Love <cel@us.ibm.com>
5006
5007 PR target/83402
5008 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
5009 size check for arg0.
5010
5011 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
5012 Tom de Vries <tom@codesourcery.com>
5013
5014 PR target/85445
5015 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
5016 Emit insns for calls too.
5017 (nvptx_find_par): Always look for worker-level predecessor insn.
5018 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
5019 calls.
5020 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
5021 (nvptx_process_pars): Propagate frames for calls.
5022
5023 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
5024
5025 PR target/85469
5026 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
5027 Removed.
5028 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
5029 (ix86_handle_option): Don't handle OPT_mibt.
5030 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
5031 __SHSTK__.
5032 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
5033 has_ibt and ibt.
5034 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
5035 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
5036 (ix86_target_macros): Define __CET__ with flag_cf_protection
5037 for -fcf-protection.
5038 * config/i386/i386.c (isa2_opts): Remove -mibt.
5039 * config/i386/i386.h (TARGET_IBT): Removed.
5040 (TARGET_IBT_P): Likewise.
5041 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
5042 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
5043 * config/i386/i386.opt (mcet): Update help message.
5044 (mshstk): Likewise.
5045 (mibt): Removed.
5046 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
5047 -mcet as an alias for -mshstk.
5048
5049 2018-04-20 Richard Biener <rguenther@suse.de>
5050
5051 PR middle-end/85475
5052 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
5053 complexity by forcing a single use of the multiply operand.
5054
5055 2018-04-20 Martin Jambor <mjambor@suse.cz>
5056
5057 ipa/85449
5058 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
5059 recursion dependency to only apply to non-clones.
5060
5061 2018-04-20 Martin Jambor <mjambor@suse.cz>
5062
5063 ipa/85447
5064 * ipa-cp.c (create_specialized_node): Check that clones of
5065 self-recursive edges exist during IPA-CP.
5066
5067 2018-04-19 Toon Moene <toon@moene.org>
5068
5069 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
5070 by -O3.
5071
5072 2018-04-19 Jakub Jelinek <jakub@redhat.com>
5073
5074 PR tree-optimization/85467
5075 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
5076 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
5077 VECTOR_CST element to type.
5078
5079 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
5080
5081 PR target/85397
5082 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
5083 * config/i386/i386.md (builtin_setjmp_setup): Removed.
5084 (builtin_longjmp): Likewise.
5085 (save_stack_nonlocal): New pattern.
5086 (restore_stack_nonlocal): Likewise.
5087
5088 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
5089
5090 PR target/85404
5091 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
5092 Replace ASM_OUTPUT_LABEL with fprintf.
5093
5094 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
5095
5096 PR target/85417
5097 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
5098 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
5099 * config/i386/i386-c.c (ix86_target_macros_internal): Also
5100 define __IBT__ and __SHSTK__ for -fcf-protection.
5101 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
5102 TARGET_IBT.
5103 (ix86_trampoline_init): Likewise.
5104 (x86_output_mi_thunk): Likewise.
5105 (ix86_notrack_prefixed_insn_p): Likewise.
5106 (ix86_option_override_internal): Don't disallow -fcf-protection.
5107 * config/i386/i386.md (rdssp<mode>): Also enable for
5108 -fcf-protection.
5109 (incssp<mode>): Likewise.
5110 (nop_endbr): Likewise.
5111 * config/i386/i386.opt (mcet): Change help message to built-in
5112 functions only.
5113 (mibt): Likewise.
5114 (mshstk): Likewise.
5115 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
5116 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
5117 enable CET built-in functions.
5118
5119 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
5120
5121 * common/config/i386/i386-common.c
5122 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
5123 OPTION_MASK_ISA_MOVDIRI_UNSET,
5124 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
5125 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
5126 * config.gcc (movdirintrin.h): New header.
5127 * config/i386/cpuid.h (bit_MOVDIRI,
5128 bit_MOVDIR64B): New bits.
5129 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
5130 and -mmvodir64b.
5131 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
5132 (VOID, PVOID, PCVOID)): New function types.
5133 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
5134 __builtin_ia32_directstoreu_u64,
5135 __builtin_ia32_movdir64b): New builtins.
5136 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
5137 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
5138 and -mmovdiri.
5139 (ix86_valid_target_attribute_inner_p): Ditto.
5140 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
5141 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
5142 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
5143 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
5144 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
5145 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
5146 (movdiri<mode>, movdir64b_<mode>): New.
5147 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
5148 * config/i386/immintrin.h: Include movdirintrin.h.
5149 * config/i386/movdirintrin.h: New file.
5150 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
5151
5152 2018-04-19 Richard Biener <rguenther@suse.de>
5153
5154 PR middle-end/85455
5155 * cfg.c (clear_bb_flags): When loop state says we have
5156 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
5157
5158 2018-04-19 Richard Biener <rguenther@suse.de>
5159
5160 PR tree-optimization/84737
5161 * tree-vect-data-refs.c (vect_copy_ref_info): New function
5162 copying restrict info.
5163 (vect_setup_realignment): Use it.
5164 * tree-vectorizer.h (vect_copy_ref_info): Declare.
5165 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
5166 the first DR to all generated stores.
5167 (vectorizable_load): Likewise for loads.
5168
5169 2018-04-19 Jakub Jelinek <jakub@redhat.com>
5170
5171 PR tree-optimization/85446
5172 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
5173 the integral and pointer types to have the same precision.
5174
5175 * doc/install.texi: Document --disable-cet being the default and
5176 --enable-cet=auto.
5177
5178 2018-04-18 Martin Liska <mliska@suse.cz>
5179
5180 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
5181 style.
5182
5183 2018-04-18 Martin Liska <mliska@suse.cz>
5184
5185 Revert
5186 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
5187
5188 PR ipa/83983
5189 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
5190 arguments if they are comparable.
5191
5192 2018-04-18 Martin Liska <mliska@suse.cz>
5193
5194 Revert
5195 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
5196
5197 PR lto/84805
5198 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
5199 incomplete types.
5200
5201 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
5202
5203 PR target/85388
5204 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
5205 ENDBR after calling __morestack.
5206
5207 2018-04-18 David Malcolm <dmalcolm@redhat.com>
5208
5209 PR jit/85384
5210 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
5211 by using gcc_base_ver to generate a gcc_driver_version, and use
5212 it when generating GCC_DRIVER_NAME.
5213 * configure: Regenerate.
5214
5215 2018-04-18 Jakub Jelinek <jakub@redhat.com>
5216
5217 PR target/81084
5218 * config.gcc: Obsolete powerpc*-*-*spe*.
5219
5220 2018-04-17 Jakub Jelinek <jakub@redhat.com>
5221
5222 PR debug/84637
5223 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
5224 (stabstr_D): Change type of unum from unsigned int to
5225 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
5226 type.
5227
5228 2018-04-17 Jim Wilson <jimw@sifive.com>
5229
5230 PR 84856
5231 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
5232 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
5233 Set arg_pointer_offset after using pretend_args_size.
5234
5235 2018-04-17 Jakub Jelinek <jakub@redhat.com>
5236
5237 PR rtl-optimization/85431
5238 * dse.c (record_store): Ignore zero width stores.
5239
5240 PR sanitizer/85230
5241 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
5242 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
5243 __builtin_stack_restore rather than after it.
5244 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
5245 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
5246 argument instead of virtual_dynamic_stack_rtx.
5247
5248 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
5249
5250 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
5251 New prototype.
5252 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
5253 Add note to error message to explain internal mapping of overloaded
5254 built-in function name to non-overloaded built-in function name.
5255 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
5256 function.
5257
5258 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
5259
5260 PR target/85424
5261 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
5262 where the inputs overlap with the output.
5263
5264 2018-04-17 Jakub Jelinek <jakub@redhat.com>
5265
5266 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
5267 (=v, v) alternative and explicit "memory" attribute.
5268 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
5269 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
5270 attributes.
5271 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
5272 "sselog1" type instead of "sselog".
5273 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
5274 "sselog". Remove explicit "memory" attribute.
5275 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
5276 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
5277 attributes.
5278 (vec_extract_hi_v32hi): Merge all alternatives into one, use
5279 "sselog1" type instead of "sselog". Remove explicit "memory"
5280 attribute.
5281 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
5282 use "sselog1" type instead of "sselog". Remove explicit "memory"
5283 attribute.
5284 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
5285 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
5286 attributes.
5287 (vec_extract_hi_v64qi): Merge all alternatives into one, use
5288 "sselog1" type instead of "sselog". Remove explicit "memory"
5289 attribute.
5290 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
5291 use "sselog1" type instead of "sselog". Remove explicit "memory"
5292 attribute.
5293
5294 PR target/85430
5295 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
5296
5297 PR middle-end/85414
5298 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
5299 on a SUBREG.
5300
5301 2018-04-17 Martin Jambor <mjambor@suse.cz>
5302
5303 PR ipa/85421
5304 * ipa-cp.c (create_specialized_node): Call
5305 expand_all_artificial_thunks if necessary.
5306
5307 2018-04-17 Martin Liska <mliska@suse.cz>
5308
5309 PR lto/85405
5310 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
5311 in message, remote space in between '_G' and '('.
5312
5313 2018-04-17 Jakub Jelinek <jakub@redhat.com>
5314
5315 PR target/85281
5316 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
5317 avx512f_vmcmp<mode>3<round_saeonly_name>,
5318 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
5319 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
5320 avx512f_rndscale<mode><round_saeonly_name>,
5321 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
5322 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
5323 Use %<iptr>2 instead of %2 for -masm=intel.
5324 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
5325 avx512f_vcvttss2usi<round_saeonly_name>,
5326 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
5327 -masm=intel.
5328 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
5329 avx512f_vcvttsd2usi<round_saeonly_name>,
5330 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
5331 Use %q1 instead of %1 for -masm=intel.
5332 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
5333 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
5334 of %3 for -masm=intel.
5335 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
5336 -masm=intel.
5337 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
5338 -masm=intel.
5339 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
5340 -masm=intel.
5341 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
5342 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
5343 %g1.
5344 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
5345 -masm=intel.
5346 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
5347 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
5348 %g1 and one with %0 and %1.
5349 (avx512er_vmrcp28<mode><round_saeonly_name>,
5350 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
5351 %1 for -masm=intel.
5352 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
5353 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
5354 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
5355 of %0 and %{%4%} for -masm=intel.
5356 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
5357 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
5358 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
5359 order of %0 and %{%5%}%{z%} for -masm=intel.
5360
5361 2018-04-17 Jan Hubicka <jh@suse.cz>
5362
5363 PR lto/85405
5364 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
5365
5366 2018-04-17 Martin Liska <mliska@suse.cz>
5367
5368 PR ipa/85329
5369 * multiple_target.c (create_dispatcher_calls): Set apostrophes
5370 for target_clone error message. Make default implementation
5371 clone to be a local declaration.
5372 (separate_attrs): Add new argument and check for an empty
5373 string.
5374 (expand_target_clones): Handle it.
5375 (ipa_target_clone): Make redirection just for target_clones
5376 functions.
5377
5378 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
5379 Tom de Vries <tom@codesourcery.com>
5380
5381 PR middle-end/84955
5382 * omp-expand.c (expand_oacc_for): Add dummy false branch for
5383 tiled basic blocks without omp continue statements.
5384
5385 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
5386
5387 PR target/83660
5388 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
5389 vec_extract expression as having side effects to make sure it gets
5390 a cleanup point.
5391
5392 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
5393
5394 PR target/85403
5395 * config/i386/i386.c (get_builtin_code_for_version): Check
5396 error_mark_node.
5397
5398 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
5399
5400 PR target/84331
5401 * gcc/config.gcc: Support "skylake".
5402 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
5403 PROCESSOR_SKYLAKE.
5404 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
5405 (processor_target_table): Add "skylake".
5406 (ix86_option_override_internal): Add "skylake".
5407 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
5408 PROCESSOR_CANNONLAKE.
5409 (get_builtin_code_for_version): Fix priority for
5410 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
5411 PROCESSOR_SKYLAKE-AVX512.
5412 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
5413 (processor_type): Add PROCESSOR_SKYLAKE.
5414
5415 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
5416 Jason Merrill <jason@redhat.com>
5417
5418 PR c++/85112
5419 * convert.c (convert_to_integer_1): Use direct recursion for
5420 enumeral types and types with a precision less than the number
5421 of bits in their mode.
5422
5423 2018-04-16 Julia Koval <julia.koval@intel.com>
5424
5425 PR target/84413
5426 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
5427 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
5428
5429 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
5430
5431 PR target/85293
5432 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
5433 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
5434 and -mno-direct-move.
5435
5436 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
5437
5438 PR target/83402
5439 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
5440 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
5441 Ensure negative shifts result in {0}.
5442
5443 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
5444
5445 PR rtl-optimization/79916
5446 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
5447 regs (if any) to define how to gnerate SD moves when LRA is in
5448 progress.
5449
5450 2018-04-13 Jakub Jelinek <jakub@redhat.com>
5451
5452 PR rtl-optimization/85393
5453 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
5454 * except.c (expand_dw2_landing_pad_for_region): Make static.
5455 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
5456 a label and unconditional jump to old_bb, rather than
5457 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
5458 basic block.
5459
5460 PR rtl-optimization/85376
5461 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
5462 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
5463 instead of a specific value.
5464
5465 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
5466 Bin Cheng <bin.cheng@arm.com>
5467
5468 PR tree-optimization/82965
5469 PR tree-optimization/83991
5470 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
5471 by_profile_only parameter.
5472 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
5473 information if the loop was predicted to iterate too many times.
5474 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
5475
5476 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
5477
5478 PR lto/71991
5479 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
5480 always inline.
5481
5482 2018-04-13 Martin Liska <mliska@suse.cz>
5483 Jakub Jelinek <jakub@redhat.com>
5484
5485 PR middle-end/81657
5486 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
5487 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
5488 * builtins.c (expand_builtin_memory_copy_args): Use
5489 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
5490 handle dest_addr == pc_rtx.
5491
5492 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
5493
5494 PR target/85291
5495 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
5496 asked to not generate direct moves.
5497 (fix_trunc<mode>si2_stfiwx): Similar.
5498 (fix_trunc<mode>si2_internal): Similar.
5499
5500 2018-04-12 Jakub Jelinek <jakub@redhat.com>
5501
5502 PR debug/83157
5503 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
5504 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
5505 lookup if dest in some wider mode is known to be const0_rtx and
5506 if so, record permanent equivalence for it to be ZERO_EXTEND of
5507 the narrower mode destination.
5508
5509 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
5510
5511 * lto-streamer-out.c (output_function): Revert 259346.
5512 * omp-expand.c (expand_oacc_for): Likewise.
5513
5514 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
5515
5516 PR rtl-optimization/85354
5517 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
5518 * sel-sched.c (sel_global_init): ... here.
5519
5520 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
5521
5522 PR target/85238
5523 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
5524 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
5525 mode for PE-COFF targets.
5526 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
5527 (i386_pe_asm_lto_end): Likewise.
5528 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
5529 (TARGET_ASM_LTO_END): Likewise.
5530 * config/i386/winnt.c (saved_debug_info_level): New static variable.
5531 (i386_pe_asm_lto_start): New function.
5532 (i386_pe_asm_lto_end): Likewise.
5533
5534 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
5535 Richard Biener <rguenther@suse.de>
5536
5537 PR middle-end/84955
5538 * lto-streamer-out.c (output_function): Fix CFG loop state before
5539 streaming out.
5540 * omp-expand.c (expand_oacc_for): Handle calls to internal
5541 functions like regular functions.
5542
5543 2018-04-12 Richard Biener <rguenther@suse.de>
5544
5545 PR lto/85371
5546 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
5547 for the early LTO debug to properly generate references to it
5548 during DIE emission. Do not re-use that for the skeleton for
5549 split-dwarf.
5550 (dwarf2out_early_finish): Likewise.
5551
5552 2018-04-12 Jakub Jelinek <jakub@redhat.com>
5553
5554 PR target/85328
5555 * config/i386/sse.md
5556 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
5557 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
5558 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
5559 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
5560 and output is a reg, avoid creating invalid lowpart subreg, but
5561 instead split into a 512-bit move. Don't split if not AVX512VL,
5562 input is xmm16+ reg and output is a mem.
5563 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
5564 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
5565 xmm16+ reg and output is a mem.
5566
5567 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
5568
5569 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
5570 also for flag_dwarf2_cfi_asm.
5571
5572 2018-04-12 Jakub Jelinek <jakub@redhat.com>
5573
5574 PR rtl-optimization/85342
5575 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
5576 a bool scalar var inside of the loop instead. Don't try to update
5577 recog_data.operand after failed apply_change_group.
5578
5579 2018-04-12 Tom de Vries <tom@codesourcery.com>
5580
5581 PR target/85296
5582 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
5583 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
5584 array with flexible array member as array without given dimension.
5585 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
5586 argument for undefined param to true.
5587
5588 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
5589
5590 PR target/85321
5591 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
5592 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
5593 from PowerPC section.
5594 * config/rs6000/sysv4.opt (mcall-): Improve help text.
5595 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
5596 help text that is too long.
5597 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
5598 help text that is too long.
5599 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
5600 help text that is too long.
5601
5602 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
5603
5604 * config/alpha/alpha.md (stack_probe_internal): Rename
5605 from "probe_stack". Update all callers.
5606
5607 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
5608
5609 PR rtl-optimization/84566
5610 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
5611 sched_macro_fuse_insns.
5612
5613 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
5614
5615 PR target/84301
5616 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
5617 (compute_block_dependences): ... from here.
5618
5619 2018-04-11 Jakub Jelinek <jakub@redhat.com>
5620
5621 PR tree-optimization/85331
5622 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
5623 from int to HOST_WIDE_INT.
5624
5625 2018-04-11 Martin Jambor <mjambor@suse.cz>
5626
5627 PR ipa/84149
5628 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
5629 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
5630 not the same as the source val.
5631 (cgraph_edge_brings_value_p): New parameter.
5632 (gather_edges_for_value): Pass destination value to
5633 cgraph_edge_brings_value_p.
5634 (perhaps_add_new_callers): Likewise.
5635 (get_info_about_necessary_edges): Likewise and exclude values brought
5636 only by self-recursive edges.
5637 (create_specialized_node): Redirect only clones of self-calling edges.
5638 (+self_recursive_pass_through_p): New function.
5639 (find_more_scalar_values_for_callers_subset): Use it.
5640 (find_aggregate_values_for_callers_subset): Likewise.
5641 (known_aggs_to_agg_replacement_list): Removed.
5642 (decide_whether_version_node): Re-calculate known constants for all
5643 remaining context clones.
5644
5645 2018-04-11 Richard Biener <rguenther@suse.de>
5646
5647 PR lto/85339
5648 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
5649 from early DWARF output.
5650 (dwarf2out_early_finish): Output line info unconditionally into
5651 early DWARF and add reference to it.
5652
5653 2018-04-11 Jakub Jelinek <jakub@redhat.com>
5654
5655 PR target/85281
5656 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
5657 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
5658 other than V2DFmode using iptr mode attribute.
5659 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
5660
5661 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
5662
5663 PR rtl-optimization/84659
5664 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
5665
5666 2018-04-11 Jakub Jelinek <jakub@redhat.com>
5667
5668 PR debug/85302
5669 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
5670 SIZEP is NULL.
5671 (output_loc_list): Pass address of a dummy size variable even in the
5672 locview handling loop.
5673 (index_location_lists): Add comment on why skip_loc_list_entry can't
5674 call size_of_locs.
5675
5676 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
5677
5678 PR target/85261
5679 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
5680 into register.
5681
5682 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
5683
5684 PR target/85321
5685 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
5686 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
5687 and -mstring-compare-inline-limit.
5688
5689 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
5690
5691 PR target/85287
5692 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
5693 for stack clash protection in a register whenever we need it to be in
5694 a register.
5695
5696 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
5697
5698 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
5699 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
5700
5701 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
5702
5703 PR target/85321
5704 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
5705 the help text.
5706 (mlong-double-): Ditto.
5707 * config/rs6000/sysv4.opt (msdata=): Ditto.
5708 (mtls-size=): Ditto.
5709
5710 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
5711
5712 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5713 erroneous entries for
5714 "vector int vec_ldl (int, long int *)", and
5715 "vector unsigned int vec_ldl (int, unsigned long int *)".
5716 Add comments and entries for
5717 "vector bool char vec_ldl (int, bool char *)",
5718 "vector bool short vec_ldl (int, bool short *)",
5719 "vector bool int vec_ldl (int, bool int *)",
5720 "vector bool long long vec_ldl (int, bool long long *)",
5721 "vector pixel vec_ldl (int, pixel *)",
5722 "vector long long vec_ldl (int, long long *)",
5723 "vector unsigned long long vec_ldl (int, unsigned long long *)".
5724 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
5725 type tree bool_long_long_type_node and correct definition of
5726 bool_V2DI_type_node to make reference to this new type tree.
5727 (rs6000_mangle_type): Replace erroneous reference to
5728 bool_long_type_node with bool_long_long_type_node.
5729 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
5730 comments to emphasize sign distinctions for char and int types and
5731 replace RS6000_BTI_bool_long constant with
5732 RS6000_BTI_bool_long_long constant. Also add comment to restrict
5733 use of RS6000_BTI_pixel.
5734 (bool_long_type_node): Remove this macro definition.
5735 (bool_long_long_type_node): New macro definition
5736
5737 2018-04-10 Jakub Jelinek <jakub@redhat.com>
5738
5739 PR rtl-optimization/85300
5740 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
5741 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
5742 simplify_unary_operation fails.
5743
5744 2018-04-10 Martin Liska <mliska@suse.cz>
5745
5746 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
5747 cgraph_edge and ipa_ref.
5748
5749 2018-04-10 Jakub Jelinek <jakub@redhat.com>
5750
5751 PR target/85177
5752 PR target/85255
5753 * config/i386/sse.md
5754 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
5755 computation of the VEC_MERGE selector from mask.
5756 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
5757 Fix decoding of the VEC_MERGE selector into mask.
5758
5759 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
5760
5761 PR tree-optimization/85286
5762 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
5763
5764 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
5765
5766 * final.c (final_1): Set insn_last_address as well as
5767 insn_current_address.
5768
5769 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5770
5771 PR target/85173
5772 * explow.c (emit_stack_probe): Call validize_mem on memory location
5773 before passing it to gen_probe_stack. Create address operand and
5774 legitimize it for the probe_stack_address case.
5775
5776 2018-04-09 Jan Hubicka <jh@suse.cz>
5777
5778 PR lto/85078
5779 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
5780 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
5781 * tree.c (free_lang_data_in_type): Fix handling of binfos;
5782 walk basetypes.
5783 (free_lang_data): Rebuild type inheritance graph.
5784
5785 2018-04-09 Martin Sebor <msebor@redhat.com>
5786
5787 * invoke.texi (-finline-small-functions): Mention other optimization
5788 options.
5789 (-findirect-inlining, -fpartial-inlining): Same.
5790 (-finline-functions-called-once): Same.
5791 (-freorder-blocks-and-partition): Same.
5792
5793 2018-04-09 Jan Hubicka <jh@suse.cz>
5794
5795 PR rtl/84058
5796 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
5797 jumps; choose last target that matches the criteria (i.e.
5798 no partition changes for non-crossing jumps).
5799 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
5800 support for redirecting crossing jumps to non-crossing.
5801
5802 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
5803
5804 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
5805 also for naked functions.
5806
5807 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
5808
5809 * config/arc/arc.md (add_shift): New pattern.
5810 (add_shift2): Likewise.
5811 (sub_shift): Likewise.
5812 (sub_shift_cmp0_noout): Likewise.
5813 (compare_si_ashiftsi): Likewise.
5814 (xbfu_cmp0_noout): New combine pattern.
5815 (xbfu_cmp0"): Likewise.
5816 (movsi_set_cc_insn): Place the predicable variant first.
5817 (commutative_binary_cmp0_noout): Remove clobber.
5818 (commutative_binary_cmp0): New pattern.
5819 (noncommutative_binary_cmp0): Likewise.
5820 (noncommutative_binary_cmp0_noout): Likewise.
5821 (noncommutative_binary_comparison_result_used): Removed.
5822 (rsub_cmp0): New pattern.
5823 (rsub_cmp0_noout): Likewise.
5824 (extzvsi): Changed, keep only meaningful variants.
5825 (SQH, SEZ): New iterators.
5826 (SQH_postfix): New mode attribute.
5827 (SEZ_prefix): New code attribute.
5828 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
5829 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
5830 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
5831 of numerical value.
5832 (noncommutative_operator): Check the availability of barrel
5833 shifter option.
5834
5835 2018-04-09 Richard Biener <rguenther@suse.de>
5836
5837 PR tree-optimization/85284
5838 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
5839 Only use the niter constraining form of simple_iv when the exit
5840 is always executed.
5841
5842 2018-04-09 Tom de Vries <tom@codesourcery.com>
5843
5844 PR target/84041
5845 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
5846 (define_expand "*memory_barrier"): New define_expand.
5847 (define_insn "memory_barrier"): New insn.
5848
5849 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5850
5851 PR rtl-optimization/80463
5852 PR rtl-optimization/83972
5853 PR rtl-optimization/83480
5854
5855 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
5856 correct producer for the insn.
5857 (tidy_control_flow): Fixup seqnos in case of debug insns.
5858
5859 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5860
5861 PR rtl-optimization/83913
5862
5863 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
5864 different sched-times when merging exprs.
5865
5866 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5867
5868 PR rtl-optimization/83962
5869
5870 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
5871 tidy_fallthru_edge and tidy_control_flow.
5872
5873 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5874
5875 PR rtl-optimization/83530
5876
5877 * sel-sched.c (force_next_insn): New global variable.
5878 (remove_insn_for_debug): When force_next_insn is true, also leave only
5879 next insn in the ready list.
5880 (sel_sched_region): When the region wasn't scheduled, make another pass
5881 over it with force_next_insn set to 1.
5882
5883 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
5884
5885 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
5886 into tm_file.
5887 * config/nds32/constants.md (unspec_volatile_element): Add enum values
5888 for interrupt control.
5889 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
5890 functions for interrupt control.
5891 * config/nds32/nds32-intrinsic.md: Likewise.
5892 * config/nds32/nds32_intrinsic.h: Likewise.
5893 * config/nds32/nds32.h (nds32_builtins): Likewise.
5894
5895 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
5896
5897 * config/nds32/nds32.c (nds32_init_machine_status,
5898 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
5899 strict_aligned_p field.
5900 (nds32_expand_to_rtl_hook): New function.
5901 (TARGET_EXPAND_TO_RTL_HOOK): Define.
5902 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
5903
5904 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5905 Chung-Ju Wu <jasonwucj@gmail.com>
5906
5907 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
5908 * config/nds32/nds32-n7.md: New file.
5909 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
5910 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
5911 pipeline.
5912 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
5913 * config/nds32/nds32.md (pipeline_model): Add n7.
5914 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
5915 * config/nds32/pipelines.md: Include n7 settings.
5916
5917 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5918 Chung-Ju Wu <jasonwucj@gmail.com>
5919
5920 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
5921 * config/nds32/nds32-e8.md: New file.
5922 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
5923 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
5924 pipeline.
5925 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
5926 * config/nds32/nds32.md (pipeline_model): Add e8.
5927 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
5928 * config/nds32/pipelines.md: Include e8 settings.
5929
5930 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5931 Chung-Ju Wu <jasonwucj@gmail.com>
5932
5933 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
5934 * config/nds32/nds32-n8.md: New file.
5935 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
5936 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
5937 pipeline.
5938 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
5939 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
5940 * config/nds32/nds32.md (pipeline_model): Add n8.
5941 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
5942 * config/nds32/pipelines.md: Include n8 settings.
5943
5944 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5945 Chung-Ju Wu <jasonwucj@gmail.com>
5946
5947 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
5948 * config/nds32/nds32-n9-2r1w.md: New file.
5949 * config/nds32/nds32-n9-3r2w.md: New file.
5950 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
5951 nds32_register_ports): New or modify for cpu n9.
5952 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
5953 pipeline.
5954 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
5955 * config/nds32/nds32-utils.c: New file.
5956 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
5957 TARGET_MUL_SLOW): Define.
5958 * config/nds32/nds32.md (pipeline_model): New attribute.
5959 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
5960 New options that support cpu n9.
5961 * config/nds32/pipelines.md: Include n9 settings.
5962 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
5963
5964 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
5965
5966 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
5967 information if necessary.
5968 (output_cond_branch_compare_zero): Likewise.
5969 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
5970 (nds32_target_alignment): Refine for alignment.
5971 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
5972 (FUNCTION_BOUNDARY): Modify.
5973 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
5974 align case.
5975 * config/nds32/nds32.opt (malways-align, malign-functions): New.
5976
5977 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
5978
5979 * config/nds32/constants.md (unspec_volatile_element): Add values for
5980 TLB operation and data prefetch.
5981 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
5982 functions for TLB operation and data prefetch.
5983 * config/nds32/nds32-intrinsic.md: Likewise.
5984 * config/nds32/nds32_intrinsic.h: Likewise.
5985 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
5986 (nds32_print_operand): Likewise.
5987 * config/nds32/nds32.h (nds32_builtins): Likewise.
5988
5989 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
5990 Andrew Pinski <pinsika@gcc.gnu.org>
5991
5992 PR middle-end/82976
5993 * match.pd: Use constant_boolean_node of correct type instead of
5994 boolean_true_node or boolean_false_node for simplifying
5995 pointer comparisons to zero.
5996
5997 2018-04-07 Jakub Jelinek <jakub@redhat.com>
5998
5999 PR tree-optimization/80021
6000 * tree.c (verify_type_variant): Make error call in verify_variant_match
6001 translatable and remove final full stop.
6002
6003 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
6004
6005 * config/nds32/constants.md (unspec_volatile_element): Add
6006 UNSPEC_VOLATILE_EH_RETURN.
6007 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
6008 nds32_output_stack_pop): Support dwarf exception handling process.
6009 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
6010 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
6011 exception handling process.
6012 (nds32_compute_stack_frame): Likewise.
6013 (nds32_return_addr_rtx): Likewise.
6014 (nds32_initial_elimination_offset): Likewise.
6015 (nds32_expand_prologue): Likewise.
6016 (nds32_expand_epilogue): Likewise.
6017 (nds32_dynamic_chain_address): New function.
6018 * config/nds32/nds32.h (machine_function): Add fields for dwarf
6019 exception handling.
6020 (DYNAMIC_CHAIN_ADDRESS): Define.
6021 (EH_RETURN_DATA_REGNO): Define.
6022 (EH_RETURN_STACKADJ_RTX): Define.
6023 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
6024 patterns for dwarf exception handling.
6025
6026 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
6027
6028 * config/nds32/nds32.h: Clean up obsolete macros.
6029
6030 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
6031
6032 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
6033 Add enum values for particular instructions.
6034 * config/nds32/nds32-intrinsic.c: Implementation of expanding
6035 particular intrinsic functions.
6036 * config/nds32/nds32-intrinsic.md: Likewise.
6037 * config/nds32/nds32_intrinsic.h: Likewise.
6038 * config/nds32/nds32.h (nds32_builtins): Likewise.
6039 * config/nds32/nds32.md (type): Add pbsad and pbsada.
6040 (btst, ave): New patterns for particular instructions.
6041
6042 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
6043
6044 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
6045 Add enum values for atomic load/store and memory sync.
6046 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
6047 and memory sync.
6048 * config/nds32/nds32-intrinsic.md: Likewise.
6049 * config/nds32/nds32_intrinsic.h: Likewise.
6050 * config/nds32/nds32.h (nds32_builtins): Likewise.
6051
6052 2018-04-07 Jakub Jelinek <jakub@redhat.com>
6053
6054 PR tree-optimization/85257
6055 * fold-const.c (native_encode_vector): If not all elts could fit
6056 and off is -1, return 0 rather than offset.
6057 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
6058 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
6059 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
6060 adjust buffer in native_interpret_expr call.
6061
6062 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
6063
6064 * config/nds32/constants.md (unspec_volatile_element): Add cache
6065 control enum values.
6066 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
6067 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
6068 * config/nds32/nds32.c (nds32_cctl_names): New.
6069 (nds32_print_operand): Handle cache control register names.
6070 * config/nds32/nds32.h (nds32_builtins): New enum values.
6071 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
6072 macros.
6073 * config/nds32/nds32.md (type): Add mmu.
6074 * config/nds32/pipelines.md (simple_insn): Add mmu.
6075
6076 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
6077
6078 * config/nds32/nds32.md (type): Remove call.
6079 * config/nds32/pipelines.md (simple_insn): Likewise.
6080
6081 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
6082
6083 * config/nds32/constants.md (unspec_volatile_element): Add
6084 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
6085 UNSPEC_VOLATILE_FMFCFG.
6086 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
6087 description for fmfcfg and fmfcsr.
6088 (bdesc_1arg): Add fmtcsr.
6089 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
6090 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
6091 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
6092 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
6093 unspec_fmfcfg): New patterns.
6094 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
6095 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
6096 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
6097 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
6098 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
6099 __nds32__fmfcfg): Define.
6100
6101 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
6102
6103 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
6104 intrinsic register names.
6105 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
6106 intrinsic register enum values and macros.
6107
6108 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
6109
6110 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
6111 for load/store addressing form.
6112 (nds32_print_operand_address): Likewise.
6113
6114 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
6115
6116 PR target/85196
6117 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
6118 based on LABEL_REF. Remove useless assertion.
6119 (pic_address_needs_scratch): Fix formatting.
6120 (sparc_legitimize_pic_address): Minor tweaks.
6121 (sparc_delegitimize_address): Adjust assertion accordingly.
6122 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
6123 into symbolic_operand.
6124 (movsi_high_pic_label_ref): Likewise.
6125 (movsi_lo_sum_pic_label_ref): Likewise.
6126 (movdi_pic_label_ref): Likewise.
6127 (movdi_high_pic_label_ref): Likewise.
6128 (movdi_lo_sum_pic_label_ref): Likewise.
6129
6130 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
6131
6132 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
6133 custom LIB_SPEC setup.
6134
6135 2018-04-06 Ruslan Bukin <br@bsdpad.com>
6136 Kito Cheng <kito.cheng@gmail.com>
6137
6138 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
6139 * config/riscv/freebsd.h: New.
6140
6141 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
6142
6143 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
6144 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
6145 file.
6146
6147 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
6148 Kito Cheng <kito.cheng@gmail.com>
6149
6150 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
6151 nds32_output_call, nds32_symbol_binds_local_p): New functions.
6152 * config/nds32/nds32-protos.h (nds32_output_call,
6153 nds32_output_return): Declare.
6154 * config/nds32/nds32.md: Refine all the call and return patterns.
6155
6156 2018-04-06 Jakub Jelinek <jakub@redhat.com>
6157
6158 PR debug/85252
6159 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
6160 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
6161
6162 PR rtl-optimization/84872
6163 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
6164 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
6165 EDGE_CROSSING edge.
6166
6167 2018-04-06 Tamar Christina <tamar.christina@arm.com>
6168
6169 * expr.c (copy_blkmode_to_reg): Revert 254862.
6170 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
6171
6172 2018-04-06 Richard Biener <rguenther@suse.de>
6173
6174 PR middle-end/85244
6175 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
6176 after seeing a component reference with an adjacent field. Treat
6177 refs to arrays at struct end of external decls similar to
6178 refs to unconstrained commons.
6179
6180 2018-04-06 Jakub Jelinek <jakub@redhat.com>
6181
6182 PR sanitizer/85213
6183 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
6184 look through SAVE_EXPRs with non-side-effects argument. Adjust
6185 recursive calls.
6186 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
6187 save_p here.
6188
6189 2018-04-06 Richard Biener <rguenther@suse.de>
6190
6191 PR middle-end/85180
6192 * alias.c (find_base_term): New wrapper around find_base_term
6193 unwinding CSELIB_VAL_PTR changes.
6194 (find_base_term): Do not restore CSELIB_VAL_PTR during the
6195 recursion.
6196
6197 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
6198
6199 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
6200 instructions.
6201 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
6202 constant definitions.
6203 ("nop"): lr 0,0 -> nopr r0
6204 ("nop_lr0", "nop_lr1"): New insn definitions.
6205
6206 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
6207
6208 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
6209 NDS32_V3PUSH_AVAILABLE_P macro.
6210
6211 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
6212 Chung-Ju Wu <jasonwucj@gmail.com>
6213
6214 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
6215 (nds32*-*-*): Add float and fpu_config into supported_defaults.
6216 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
6217 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
6218 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
6219 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
6220 * config/nds32/constraints.md: New constraints and checking for hard
6221 float configuration.
6222 * config/nds32/iterators.md: New mode iterator and attribute for hard
6223 float configuration.
6224 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
6225 patterns.
6226 * config/nds32/nds32-fpu.md: New file.
6227 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
6228 deal with hard float code generation.
6229 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
6230 ARCH_V3S.
6231 (abi_type, float_reg_number): New enum type.
6232 * config/nds32/nds32-predicates.c: New predicates for hard float.
6233 * config/nds32/nds32-protos.h: Declare functions for hard float.
6234 * config/nds32/nds32.c: Implementation for hard float configuration.
6235 * config/nds32/nds32.h: Definitions for hard float configuration.
6236 * config/nds32/nds32.md: Include hard float machine description and
6237 modify patterns for hard float configuration.
6238 * config/nds32/nds32.opt: New options for hard float configuration.
6239 * config/nds32/predicates.md: New predicates for hard float
6240 configuration.
6241
6242 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6243
6244 * common/config/nds32/nds32-common.c
6245 (nds32_option_optimization_table): Enable -mreleax-hint by default.
6246
6247 2018-04-05 Jakub Jelinek <jakub@redhat.com>
6248
6249 PR middle-end/85195
6250 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
6251 CONSTRUCTOR_ELT (ctor, ...)->value.
6252
6253 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
6254
6255 PR target/85193
6256 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
6257
6258 2018-04-05 Tom de Vries <tom@codesourcery.com>
6259
6260 PR target/85204
6261 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
6262 cond jump.
6263
6264 2018-04-05 Shiva Chen <shiva0217@gmail.com>
6265 Kito Cheng <kito.cheng@gmail.com>
6266
6267 * config/nds32/constraints.md (U33): Fine-tune checking condition.
6268 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
6269 * config/nds32/nds32.h (nds32_16bit_address_type): Add
6270 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
6271
6272 2018-04-05 Shiva Chen <shiva0217@gmail.com>
6273 Kito Cheng <kito.cheng@gmail.com>
6274
6275 * config/nds32/constraints.md (Ufe): New memory constraint.
6276 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
6277 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
6278 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
6279 operands.
6280 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
6281 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
6282
6283 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6284
6285 * config/nds32/nds32.md: Use optimize_size in the condition for
6286 alu-shift instructions.
6287
6288 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6289
6290 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
6291
6292 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6293
6294 * config/nds32/nds32.md (negsi2): Refine pattern.
6295
6296 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
6297 Chung-Ju Wu <jasonwucj@gmail.com>
6298
6299 * config/nds32/iterators.md (shift_rotate): New code iterator.
6300 (shift): New code attribute.
6301 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
6302 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
6303 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
6304 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
6305 bit-wise operations.
6306 (andsi3, *andsi3): Ditto.
6307 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
6308 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
6309 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
6310 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
6311 nds32_ior_operand, nds32_xor_operand): New predicates.
6312
6313 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6314
6315 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
6316 (addsi3, subsi3): ... this.
6317
6318 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6319
6320 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
6321
6322 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6323
6324 * config/nds32/nds32.md: Adjust indention.
6325
6326 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
6327
6328 * config/nds32/nds32.md (feature): New attribute.
6329
6330 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6331
6332 * config/nds32/nds32.md (subtype): New attribute.
6333
6334 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
6335
6336 PR target/85203
6337 * config/arm/arm-builtins.c (arm_expand_builtin): Change
6338 expansion to perform a bitwise AND of the argument followed by a
6339 boolean negation of the result.
6340
6341 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
6342
6343 PR rtl-optimization/84878
6344 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
6345 the basic block. Assert the use reference is not artificial and that
6346 it has an associated insn.
6347
6348 2018-04-04 Michael Matz <matz@suse.de>
6349
6350 * builtins.c (compute_objsize): Pass correct operand
6351 to array_at_struct_end_p.
6352
6353 2018-04-04 Richard Biener <rguenther@suse.de>
6354
6355 PR lto/85176
6356 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
6357 from contexts for DINFO_LEVEL_TERSE and below.
6358
6359 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
6360
6361 * config/nds32/nds32-doubleword.md (move_<mode>): Require
6362 resiter_operand condition.
6363 * config/nds32/nds32.md (*move<mode>): Ditto.
6364
6365 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
6366 Monk Chiang <sh.chiang04@gmail.com>
6367
6368 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
6369
6370 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6371
6372 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
6373
6374 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6375 Kito Cheng <kito.cheng@gmail.com>
6376
6377 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
6378 nds32_cond_code_str, output_cond_branch,
6379 output_cond_branch_compare_zero, nds32_expand_cbranch,
6380 nds32_expand_cstore, nds32_expand_movcc,
6381 nds32_output_cbranchsi4_equality_zero,
6382 nds32_output_cbranchsi4_equality_reg,
6383 nds32_output_cbranchsi4_equality_reg_or_const_int,
6384 nds32_output_cbranchsi4_greater_less_zero: New functions.
6385 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
6386 nds32_expand_cstore, nds32_expand_movcc,
6387 nds32_output_cbranchsi4_equality_zero,
6388 nds32_output_cbranchsi4_equality_reg,
6389 nds32_output_cbranchsi4_equality_reg_or_const_int,
6390 nds32_output_cbranchsi4_greater_less_zero): Declare.
6391 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
6392 nds32_rimm11s_operand): New predicates.
6393 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
6394 * config/nds32/nds32.md: Rewrite all the branch and conditional move
6395 patterns.
6396
6397 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
6398
6399 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
6400 * config/nds32/nds32.md: Ditto.
6401 * config/nds32/pipelines.md: Ditto.
6402
6403 2018-04-04 Richard Biener <rguenther@suse.de>
6404
6405 PR tree-optimization/85168
6406 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
6407 propagating abnormals.
6408
6409 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6410
6411 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
6412
6413 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6414 Kito Cheng <kito.cheng@gmail.com>
6415
6416 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
6417 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
6418 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
6419 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
6420 * config/nds32/nds32.md (sibcall_internal): New.
6421 (sibcall_register): Remove.
6422 (sibcall_immediate): Remove.
6423 (sibcall_value_internal): New.
6424 (sibcall_value_register): Remove.
6425 (sibcall_value_immediate): Remove.
6426 * config/nds32/predicates.md (nds32_general_register_operand): New.
6427 (nds32_call_address_operand): New.
6428
6429 2018-04-03 Jakub Jelinek <jakub@redhat.com>
6430
6431 PR rtl-optimization/85167
6432 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
6433 bb_defs if *split_p, instead preinitialize it to NULL.
6434
6435 PR tree-optimization/85156
6436 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
6437 evaluating the argument multiple times.
6438
6439 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
6440
6441 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
6442 than vector.
6443 (_mm_cvtpd_ps): Likewise.
6444 (_mm_cvttpd_epi32): Likewise.
6445 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
6446 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
6447 vector, pixel, and bool following altivec.h include.
6448
6449 2018-04-03 Martin Sebor <msebor@redhat.com>
6450
6451 * doc/extend.texi (Common Function Attributes): Clarify.
6452 (const attribute): Likewise.
6453 (pure attribute): Likewise.
6454
6455 2018-04-03 Jakub Jelinek <jakub@redhat.com>
6456
6457 PR target/85169
6458 * config/i386/i386.c (ix86_expand_vector_set): Use
6459 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
6460
6461 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
6462
6463 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
6464 instructions when changing rounding bits to preserve precision bits
6465 in the x87 control word.
6466
6467 2018-04-03 Martin Liska <mliska@suse.cz>
6468
6469 PR tree-optimization/82491
6470 * rtl.h (strip_offset_and_add): Replace += suboffset with
6471 poly_uint64 () + suboffset.
6472
6473 2018-03-29 Martin Liska <mliska@suse.cz>
6474 Martin Jambor <mjambor@suse.cz>
6475
6476 PR ipa/84947
6477 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
6478 param_type is not an integral or pointer type.
6479
6480 2018-04-03 Richard Biener <rguenther@suse.de>
6481
6482 * sese.h (recompute_all_dominators): Remove.
6483
6484 2018-04-02 Martin Sebor <msebor@redhat.com>
6485
6486 * doc/invoke.texi (-Wrestrict): Fix typos.
6487
6488 2018-04-02 Jim Wilson <jimw@sifive.com>
6489
6490 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
6491 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
6492 (<optab>di3, <optab>si3_extend): Likewise.
6493 (<optab>si3_mask, <optab>si3_mask_1): New.
6494 (<optab>di3_mask, <optab>di3_mask_1): New.
6495 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
6496 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
6497 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
6498
6499 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
6500
6501 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
6502 example.
6503
6504 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
6505
6506 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
6507 (nds32_canonicalize_comparison): New function.
6508
6509 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
6510 Kito Cheng <kito.cheng@gmail.com>
6511 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6512
6513 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
6514 * config/nds32/constants.md (unspec_volatile_element): Add
6515 UNSPEC_VOLATILE_RELAX_GROUP.
6516 * config/nds32/nds32-relax-opt.c: New file.
6517 * config/nds32/nds32-predicates.c
6518 (nds32_symbol_load_store_p): New function.
6519 * config/nds32/nds32-protos.h
6520 (nds32_symbol_load_store_p): Declare function.
6521 (make_pass_nds32_relax_opt): Declare new rtl pass function.
6522 * config/nds32/nds32.c
6523 (nds32_register_pass): New function to register pass.
6524 (nds32_register_passes): New function to register passes.
6525 * config/nds32/nds32.md (relax_group): New pattern.
6526 * config/nds32/nds32.opt (mrelax-hint): New option.
6527 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
6528
6529 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
6530
6531 * config/nds32/t-nds32: Modify files dependency.
6532
6533 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
6534
6535 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
6536 (PROFILE_HOOK): Define its implementation.
6537
6538 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
6539
6540 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
6541 type and 32-bit size.
6542
6543 2018-04-01 Jakub Jelinek <jakub@redhat.com>
6544
6545 PR middle-end/85090
6546 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
6547 (V_128_256): New mode iterator.
6548 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
6549 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
6550 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
6551 of V.
6552 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
6553 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
6554
6555 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
6556
6557 PR target/83315
6558 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
6559 NaN inputs correctly.
6560
6561 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
6562
6563 PR target/80546
6564 * config/rs6000/vsx.md (??r): New mode attribute.
6565 (*vsx_mov<mode>_64bit): Use it.
6566 (*vsx_mov<mode>_32bit): Likewise.
6567
6568 2018-03-30 Martin Sebor <msebor@redhat.com>
6569
6570 PR tree-optimization/84818
6571 * builtins.c (check_access): Use warning_n.
6572
6573 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
6574
6575 PR target/83822
6576 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
6577 condition.
6578 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
6579 condition.
6580
6581 2018-03-30 Julia Koval <julia.koval@intel.com>
6582
6583 PR target/84413
6584 * x86-tune.def (movx, partial_reg_dependency): Enable for
6585 m_SKYLAKE_AVX512.
6586
6587 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
6588
6589 PR inline-asm/84985
6590 * lra-constraints.c (process_alt_operands): Move setting
6591 this_alternative_matches below.
6592
6593 2018-03-29 Martin Liska <mliska@suse.cz>
6594
6595 PR lto/84995.
6596 * doc/invoke.texi: Document how LTO works with debug info.
6597 Describe auto-load support of binutils. Mention 'x86-64'
6598 as valid option value of -march option.
6599
6600 2018-03-29 Jakub Jelinek <jakub@redhat.com>
6601
6602 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
6603
6604 PR c/85094
6605 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
6606 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
6607 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
6608 checking.
6609
6610 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
6611
6612 PR target/84912
6613 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
6614 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
6615 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
6616 for RS6000_BTM_POWERPC64.
6617 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
6618 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
6619 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
6620 definition.
6621 (DIVDE): Use it.
6622 (DIVDEU): Likewise.
6623
6624 2018-03-28 Carl Love <cel@us.ibm.com>
6625
6626 Revert
6627 2017-09-27 Carl Love <cel@us.ibm.com>
6628
6629 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
6630 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
6631 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
6632 fctiw instruction.
6633
6634 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6635
6636 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
6637 instead of __vector bool.
6638 (_mm_max_pu8): Likewise.
6639 (_mm_min_pi16): Likewise.
6640
6641 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
6642
6643 PR target/84912
6644 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
6645 (DIVWEUO): Likewise.
6646 (DIVDEO): Likewise.
6647 (DIVDEUO): Likewise.
6648 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
6649 DIVWEUO and DIVDEUO.
6650 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
6651 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
6652 (div_extend): Likewise.
6653 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
6654 builtin function.
6655 (__builtin_divweuo): Likewise.
6656 (__builtin_divdeo): Likewise.
6657 (__builtin_divdeuo): Likewise.
6658
6659 2018-03-28 Jakub Jelinek <jakub@redhat.com>
6660
6661 PR target/85095
6662 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
6663 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
6664
6665 PR tree-optimization/82004
6666 * gimple-match-head.c (optimize_pow_to_exp): New function.
6667 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
6668 Don't fold to exp if optimize_pow_to_exp is false.
6669
6670 2018-03-28 Martin Liska <mliska@suse.cz>
6671
6672 PR other/84819
6673 * calls.c (initialize_argument_information): Fix trailing space.
6674 * common.opt: Fix typo and provide better explanation for
6675 -fsanitize-coverage option.
6676 * config/i386/i386.opt: Fix typo.
6677
6678 2018-03-28 Jakub Jelinek <jakub@redhat.com>
6679 Martin Liska <mliska@suse.cz>
6680
6681 PR sanitizer/85081
6682 * gimplify.c (asan_poison_variable): Don't do the check for
6683 gimplify_omp_ctxp here.
6684 (gimplify_decl_expr): Do it here.
6685 (gimplify_target_expr): Likewise.
6686
6687 2018-03-28 Martin Liska <mliska@suse.cz>
6688
6689 PR target/84988
6690 * config/i386/i386.c (ix86_function_arg_advance): Do not call
6691 chkp_type_bounds_count if MPX is not enabled.
6692
6693 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
6694
6695 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
6696
6697 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
6698
6699 PR target/84914
6700 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
6701 function to create the function decl for complex long double
6702 multiply and divide for -mabi=ieeelongdouble.
6703 (init_float128_ieee): Call it.
6704
6705 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
6706
6707 PR target/85044
6708 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
6709 -fcf-protection=branch -mibt.
6710 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
6711
6712 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6713
6714 PR target/81863
6715 * config/arm/arm.c (arm_valid_symbolic_address): Handle
6716 arm_word_relocations.
6717
6718 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
6719
6720 PR target/85056
6721 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
6722 extern array declarations.
6723
6724 2018-03-27 Richard Biener <rguenther@suse.de>
6725
6726 PR middle-end/84067
6727 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
6728 explicit single_use checks.
6729
6730 2018-03-27 Richard Biener <rguenther@suse.de>
6731
6732 PR tree-optimization/85082
6733 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
6734 Valueize the VUSE.
6735
6736 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6737
6738 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
6739 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
6740 Turn on fasynchronous-unwind-tables and funwind-tables.
6741
6742 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
6743
6744 PR target/85073
6745 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
6746 (*bmi_blsr_<mode>_ccz): Ditto.
6747
6748 2018-03-26 Tom de Vries <tom@codesourcery.com>
6749
6750 PR tree-optimization/85063
6751 * omp-general.c (offloading_function_p): New function. Factor out
6752 of ...
6753 * omp-offload.c (pass_omp_target_link::gate): ... here.
6754 * omp-general.h (offloading_function_p): Declare.
6755 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
6756 with attribute omp declare target for offloading functions.
6757
6758 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
6759
6760 PR tree-optimization/84005
6761 * tree-data-ref.h (get_base_for_alignment): Declare.
6762 * tree-data-ref.c (get_base_for_alignment_1): New function.
6763 (get_base_for_alignment): Likewise.
6764 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
6765 get_base_for_alignment to find a suitable base object, instead
6766 of always using drb->base_address.
6767
6768 2018-03-23 Jakub Jelinek <jakub@redhat.com>
6769
6770 PR inline-asm/85022
6771 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
6772 known size by default.
6773
6774 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
6775
6776 PR inline-asm/85030
6777 * lra-constraints.c (process_alt_operands): Don't match BLKmode
6778 and non BLKmode operands.
6779
6780 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6781
6782 PR target/85026
6783 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
6784 Clean up attributes.
6785
6786 2018-03-23 Richard Biener <rguenther@suse.de>
6787
6788 PR debug/85020
6789 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
6790 we are going to emit early debug for LTO.
6791
6792 2018-03-23 Jakub Jelinek <jakub@redhat.com>
6793
6794 PR inline-asm/85034
6795 * function.c (match_asm_constraints_1): Don't optimize if input
6796 doesn't satisfy general_operand predicate for output's mode.
6797
6798 PR inline-asm/85022
6799 * alias.c (write_dependence_p): Don't require for x_canonicalized
6800 non-VOIDmode if x has VOIDmode.
6801
6802 PR sanitizer/85029
6803 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
6804 just don't try to optimize it rather than assert it never happens.
6805
6806 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6807
6808 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
6809 macro expansions for definition of ST_INTERNAL_<mode> and
6810 LD_INTERNAL_<mode> builtins.
6811 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
6812 Remove prototype.
6813 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
6814 function.
6815 (altivec_expand_st_builtin): Likewise.
6816 (altivec_expand_builtin): Remove calls to deleted functions.
6817 (rs6000_address_for_altivec): Delete this function.
6818 * config/rs6000/vector.md: Remove expands for
6819 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
6820
6821 2018-03-22 Sudakshina Das <sudi.das@arm.com>
6822
6823 PR target/84826
6824 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
6825 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
6826 re-computing once computed.
6827 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
6828 (arm_init_machine_status): Initialize
6829 machine->static_chain_stack_bytes.
6830
6831 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6832
6833 PR target/84760
6834 * doc/extend.texi: Add four new prototypes for vec_ld.
6835 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
6836 definitions for more logical presentation.
6837 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
6838 entries for V1TI variants of __builtin_altivec_ld builtin.
6839 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
6840 handling of V1TI variant of LVX icode pattern.
6841 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
6842 (rs6000_gimple_fold_builtin): Likewise.
6843 (altivec_init_builtins): Add code to define
6844 __builtin_altivec_lvx_v1ti function.
6845
6846 2018-03-22 Jakub Jelinek <jakub@redhat.com>
6847
6848 PR inline-asm/84941
6849 * function.c (match_asm_constraints_1): Don't do the optimization
6850 if input isn't a REG, SUBREG, MEM or constant.
6851
6852 2018-03-22 Tom de Vries <tom@codesourcery.com>
6853
6854 PR tree-optimization/84956
6855 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
6856 bb_has_abnormal_pred.
6857
6858 2018-03-22 Jakub Jelinek <jakub@redhat.com>
6859
6860 PR sanitizer/85018
6861 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
6862 DECL_INITIAL (decl) to decl at the end.
6863 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
6864 adjust the comment.
6865
6866 2018-03-21 Joseph Myers <joseph@codesourcery.com>
6867
6868 * doc/extend.texi (__builtin_tgmath): Document when complex
6869 integer types are treated as _Complex _Float64.
6870
6871 2018-03-21 Tom de Vries <tom@codesourcery.com>
6872
6873 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
6874
6875 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6876
6877 PR tree-optimization/84960
6878 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
6879 if it is ENTRY block, move them into single succ of ENTRY in that case.
6880
6881 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
6882
6883 PR tree-optimization/84811
6884 * poly-int.h (poly_span_traits): Remove the T3 parameter and
6885 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
6886 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
6887 (known_subrange_p): Update accordingly. Cast each value involved
6888 in the size comparison, rather than casting the result of the
6889 subtraction.
6890
6891 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6892
6893 PR tree-optimization/84982
6894 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
6895 by flipping the least significant bit rather than all bits from
6896 bitpos to bitpos + bitsize - 1.
6897
6898 2018-03-21 Nathan Sidwell <nathan@acm.org>
6899
6900 * doc/extend.texi (Deprecated Features): Remove mention of
6901 long-deleted deprecations.
6902
6903 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6904
6905 PR jit/84288
6906 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
6907 * configure: Regenerate.
6908
6909 2018-03-21 Tom de Vries <tom@codesourcery.com>
6910
6911 PR tree-optimization/83126
6912 * tree-parloops.c (num_phis): New function.
6913 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
6914
6915 2018-03-21 Nathan Sidwell <nathan@acm.org>
6916
6917 * doc/extend.texi (Deprecated Features): Update deprecated flags,
6918 mention anon-struct/union members and trailing attributes.
6919
6920 2018-03-21 Bin Cheng <bin.cheng@arm.com>
6921
6922 PR tree-optimization/84969
6923 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
6924 builtin memset partitions if they set different rhs values.
6925
6926 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6927
6928 PR rtl-optimization/84989
6929 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
6930 VEC_DUPLICATE with scalar result mode.
6931
6932 2018-03-21 Martin Liska <mliska@suse.cz>
6933
6934 PR ipa/84963
6935 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
6936 not intended return statement.
6937
6938 2018-03-21 Martin Liska <mliska@suse.cz>
6939
6940 PR target/84988
6941 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
6942 (chkp_find_bound_slots_1): Limit number of iterations.
6943
6944 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
6945
6946 PR target/84838
6947 * Minor grammar fixes for x86 options.
6948
6949 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6950
6951 PR debug/84875
6952 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
6953 holding REG_CFA_RESTORE notes, instead turn them into a USE.
6954
6955 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
6956
6957 PR target/83789
6958 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
6959 (altivec_lvx_<mode>_1op): Likewise.
6960 (altivec_stvx_<mode>_2op): Likewise.
6961 (altivec_stvx_<mode>_1op): Likewise.
6962 (altivec_lvx_<VM2:mode>): New define_expand.
6963 (altivec_stvx_<VM2:mode>): Likewise.
6964 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
6965 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
6966 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
6967 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
6968 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
6969 (rs6000_gen_lvx): Likewise.
6970 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
6971 (altivec_expand_stv_builtin): Likewise.
6972 (altivec_expand_builtin): Likewise.
6973 * config/rs6000/vector.md: Likewise.
6974
6975 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6976
6977 PR target/82518
6978 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
6979 BYTES_BIG_ENDIAN.
6980
6981 2018-03-20 Richard Biener <rguenther@suse.de>
6982
6983 PR target/84986
6984 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
6985 sign-conversions as zero, fall back to standard scalar_stmt
6986 cost for the rest.
6987
6988 2018-03-20 Martin Liska <mliska@suse.cz>
6989
6990 PR ipa/84825
6991 * predict.c (rebuild_frequencies): Handle case when we have
6992 PROFILE_ABSENT, but flag_guess_branch_prob is false.
6993
6994 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6995
6996 PR target/84990
6997 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
6998 flag_section_anchors.
6999 * varasm.c (use_blocks_for_decl_p): Remove hack for
7000 dw2_force_const_mem.
7001
7002 PR target/84845
7003 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
7004 to ...
7005 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
7006 be created, use lowpart_subreg of operands[0] rather than operands[0]
7007 itself.
7008 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
7009 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
7010 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
7011 and n constraint instead of aarch64_shift_imm_di and Usd.
7012 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
7013 (*aarch64_<optab>_reg_minus<mode>3): ... this.
7014
7015 2018-03-20 Sudakshina Das <sudi.das@arm.com>
7016
7017 PR target/82989
7018 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
7019 to favor GPR over NEON registers.
7020 (<shift>di3_neon): Likewise.
7021
7022 2018-03-20 Tom de Vries <tom@codesourcery.com>
7023
7024 PR target/84952
7025 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
7026 (nvptx_process_pars): Emit bar.sync asap and alap.
7027
7028 2018-03-20 Tom de Vries <tom@codesourcery.com>
7029
7030 PR target/84954
7031 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
7032 seen_label if seen_label is already set.
7033
7034 2018-03-20 Jakub Jelinek <jakub@redhat.com>
7035
7036 PR target/84945
7037 * config/i386/i386.c (fold_builtin_cpu): For features above 31
7038 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
7039 Use 1U instead of 1. Formatting fixes.
7040
7041 PR c/84953
7042 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
7043 instead of TREE_TYPE (s1) for the return value.
7044
7045 2018-03-19 Jakub Jelinek <jakub@redhat.com>
7046
7047 PR tree-optimization/84946
7048 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
7049 bitsize + bitsize in poly_uint64 rather than poly_int64.
7050
7051 PR sanitizer/78651
7052 * dwarf2asm.c: Include fold-const.c.
7053 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
7054 of decl rather than decl itself.
7055
7056 PR rtl-optimization/84643
7057 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
7058
7059 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
7060
7061 PR sanitizer/78651
7062 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
7063 calling assemble_variable.
7064
7065 2018-03-19 Sudakshina Das <sudi.das@arm.com>
7066
7067 PR target/81647
7068 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
7069 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
7070
7071 2018-03-19 Jim Wilson <jimw@sifive.com>
7072
7073 PR bootstrap/84856
7074 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
7075 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
7076 (riscv_first_stack_step): Likewise.
7077 (riscv_option_override): Use STACK_BOUNDARY instead of
7078 MIN_STACK_BOUNDARY.
7079 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
7080 MIN_STACK_BOUNDARY.
7081 (BIGGEST_ALIGNMENT): Set to 128.
7082 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
7083 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
7084 STACK_BOUNDARY.
7085
7086 2018-03-19 Richard Biener <rguenther@suse.de>
7087
7088 PR tree-optimization/84933
7089 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
7090 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
7091
7092 2018-03-19 Richard Biener <rguenther@suse.de>
7093
7094 PR tree-optimization/84859
7095 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
7096 (cond_if_else_store_replacement): Perform sinking operation on
7097 single-store BBs regardless of MAX_STORES_TO_SINK setting.
7098 Generalize what a BB with a single eligible store is.
7099
7100 2018-03-19 Richard Biener <rguenther@suse.de>
7101
7102 PR tree-optimization/84929
7103 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
7104 chrec_is_positive against non-chrec arg.
7105
7106 2018-03-19 Tamar Christina <tamar.christina@arm.com>
7107
7108 PR target/84711
7109 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
7110
7111 2018-03-18 Martin Liska <mliska@suse.cz>
7112
7113 PR rtl-optimization/84635
7114 * regrename.c (build_def_use): Use matches_mode only when
7115 matches >= 0.
7116
7117 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
7118
7119 PR tree-optimization/84913
7120 * tree-vect-loop.c (vectorizable_reduction): Don't try to
7121 vectorize chains of COND_EXPRs.
7122
7123 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
7124
7125 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
7126
7127 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
7128
7129 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
7130
7131 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
7132
7133 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
7134
7135 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
7136 Kito Cheng <kito.cheng@gmail.com>
7137
7138 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
7139 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
7140 (nds32_adjust_reg_alloc_order): New function.
7141 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
7142
7143 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
7144
7145 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
7146 nds32_print_operand, nds32_print_operand_address): Use
7147 HOST_WIDE_INT_PRINT_DEC instead.
7148
7149 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
7150
7151 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
7152
7153 2018-03-17 Jakub Jelinek <jakub@redhat.com>
7154
7155 PR target/84902
7156 * config/i386/i386.c (initial_ix86_tune_features,
7157 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
7158 unsigned long long.
7159 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
7160 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
7161 rather than 1u << ix86_tune. Formatting fix.
7162 (ix86_option_override_internal): Change ix86_arch_mask from
7163 unsigned int to unsigned HOST_WIDE_INT, initialize to
7164 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
7165 (ix86_function_specific_restore): Likewise.
7166
7167 2018-03-16 Jakub Jelinek <jakub@redhat.com>
7168
7169 PR target/84899
7170 * postreload.c (reload_combine_recognize_pattern): Perform
7171 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
7172 truncate_int_for_mode the result for the destination's mode.
7173
7174 PR c/84909
7175 * hsa-gen.c (mem_type_for_type): Fix comment typo.
7176 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
7177 Likewise.
7178 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
7179 Likewise.
7180
7181 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
7182
7183 PR target/84876
7184 * lra-assigns.c (lra_split_hard_reg_for): Don't use
7185 regno_allocno_class_array and sorted_pseudos.
7186 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
7187 insns where regno is used.
7188
7189 2018-03-16 Martin Liska <mliska@suse.cz>
7190
7191 PR ipa/84833
7192 * multiple_target.c (create_dispatcher_calls): Redirect
7193 reference in the symbol table.
7194
7195 2018-03-16 Martin Liska <mliska@suse.cz>
7196
7197 PR ipa/84722
7198 * multiple_target.c (create_dispatcher_calls): Redirect also
7199 an alias.
7200
7201 2018-03-16 Jakub Jelinek <jakub@redhat.com>
7202
7203 PR c++/79937
7204 PR c++/82410
7205 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
7206 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
7207 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
7208
7209 2018-03-16 Julia Koval <julia.koval@intel.com>
7210
7211 * doc/invoke.texi (Skylake Server): Add CLWB.
7212 Cannonlake): Remove CLWB.
7213
7214 2018-03-16 Jakub Jelinek <jakub@redhat.com>
7215
7216 PR tree-optimization/84841
7217 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
7218 1 << 3.
7219 (FLOAT_ONE_CONST_TYPE): Define.
7220 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
7221 (sort_by_operand_rank): Put entries with higher constant_type last
7222 rather than first to match comments.
7223
7224 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
7225
7226 * config/nios2/nios2.md (movsi_internal): Fix thinko in
7227 split predicate.
7228
7229 2018-03-15 Jakub Jelinek <jakub@redhat.com>
7230
7231 PR c++/79085
7232 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
7233 check and use address of target always.
7234
7235 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
7236
7237 PR target/84574
7238 * config/i386/i386.c (indirect_thunk_needed): Update comments.
7239 (indirect_thunk_bnd_needed): Likewise.
7240 (indirect_thunks_used): Likewise.
7241 (indirect_thunks_bnd_used): Likewise.
7242 (indirect_return_needed): New.
7243 (indirect_return_bnd_needed): Likewise.
7244 (output_indirect_thunk_function): Add a bool argument for
7245 function return.
7246 (output_indirect_thunk_function): Don't generate alias for
7247 function return thunk.
7248 (ix86_code_end): Call output_indirect_thunk_function to generate
7249 function return thunks.
7250 (ix86_output_function_return): Set indirect_return_bnd_needed
7251 and indirect_return_needed instead of indirect_thunk_bnd_needed
7252 and indirect_thunk_needed.
7253
7254 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
7255
7256 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
7257 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
7258 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
7259
7260 2018-03-15 David Malcolm <dmalcolm@redhat.com>
7261 Paul Hua <paul.hua.gm@gmail.com>
7262
7263 PR c/84852
7264 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
7265
7266 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
7267
7268 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
7269 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
7270 resp. SFmode cases.
7271
7272 2018-03-15 Tamar Christina <tamar.christina@arm.com>
7273
7274 PR target/84711
7275 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
7276 instead of GET_MODE_SIZE when comparing Units.
7277
7278 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
7279
7280 PR target/68256
7281 * varasm.c (hash_section): Return an unchangeble hash value
7282 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
7283 Return !aarch64_can_use_per_function_literal_pools_p ().
7284
7285 2018-03-15 Jakub Jelinek <jakub@redhat.com>
7286
7287 PR target/84860
7288 * optabs.c (emit_conditional_move): Pass address of cmode's copy
7289 rather than address of cmode as last argument to prepare_cmp_insn.
7290
7291 2018-03-15 Julia Koval <julia.koval@intel.com>
7292
7293 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
7294 F_AVX512VNNI, F_AVX512BITALG): New.
7295
7296 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
7297
7298 PR target/83451
7299 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
7300 insn for floating-point loads and stores.
7301
7302 2018-03-14 Carl Love <cel@us.ibm.com>
7303
7304 * config/rs6000/rs6000-c.c: Add macro definitions for
7305 ALTIVEC_BUILTIN_VEC_PERMXOR.
7306 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
7307 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
7308 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
7309 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
7310 UNSPEC_VPERMXOR.
7311 * config/doc/extend.texi: Add prototypes for vec_permxor.
7312
7313 2018-03-14 David Malcolm <dmalcolm@redhat.com>
7314
7315 PR c/84852
7316 * diagnostic-show-locus.c (class layout_point): Convert m_line
7317 from int to linenum_type.
7318 (line_span::comparator): Use linenum "compare" function when
7319 comparing line numbers.
7320 (test_line_span): New function.
7321 (layout_range::contains_point): Convert param "row" from int to
7322 linenum_type.
7323 (layout_range::intersects_line_p): Likewise.
7324 (layout::will_show_line_p): Likewise.
7325 (layout::print_source_line): Likewise.
7326 (layout::should_print_annotation_line_p): Likewise.
7327 (layout::print_annotation_line): Likewise.
7328 (layout::print_leading_fixits): Likewise.
7329 (layout::annotation_line_showed_range_p): Likewise.
7330 (struct line_corrections): Likewise for field m_row.
7331 (line_corrections::line_corrections): Likewise for param "row".
7332 (layout::print_trailing_fixits): Likewise.
7333 (layout::get_state_at_point): Likewise.
7334 (layout::get_x_bound_for_row): Likewise.
7335 (layout::print_line): Likewise.
7336 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
7337 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
7338 * input.c (selftest::test_linenum_comparisons): New function.
7339 (selftest::input_c_tests): Call it.
7340 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
7341 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
7342 * selftest.h (ASSERT_GT): New macro.
7343 (ASSERT_GT_AT): New macro.
7344 (ASSERT_LT): New macro.
7345 (ASSERT_LT_AT): New macro.
7346
7347 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
7348
7349 PR rtl-optimization/84780
7350 * combine.c (distribute_links): Don't make a link based on pc_rtx.
7351
7352 2018-03-14 Martin Liska <mliska@suse.cz>
7353
7354 * tree.c (record_node_allocation_statistics): Use
7355 get_stats_node_kind.
7356 (get_stats_node_kind): New function extracted from
7357 record_node_allocation_statistics.
7358 (free_node): Use get_stats_node_kind.
7359
7360 2018-03-14 Richard Biener <rguenther@suse.de>
7361
7362 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
7363 that the value-set of ANTIC_IN doesn't grow.
7364
7365 Revert
7366 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
7367 member.
7368 (BB_VISITED_WITH_VISITED_SUCCS): New define.
7369 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
7370
7371 2018-03-14 Julia Koval <julia.koval@intel.com>
7372
7373 * config.gcc (icelake-client, icelake-server): New.
7374 (icelake): Remove.
7375 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
7376 (initial_ix86_arch_features): Ditto.
7377 (PTA_SKYLAKE): Add SGX.
7378 (PTA_ICELAKE): Remove.
7379 (PTA_ICELAKE_CLIENT): New.
7380 (PTA_ICELAKE_SERVER): New.
7381 (ix86_option_override_internal): Split up icelake on icelake client and
7382 icelake server.
7383 (get_builtin_code_for_version): Ditto.
7384 (fold_builtin_cpu): Ditto.
7385 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
7386 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
7387 * config/i386/i386.h (processor_type): Ditto.
7388 * doc/invoke.texi: Ditto.
7389
7390 2018-03-14 Jakub Jelinek <jakub@redhat.com>
7391
7392 PR sanitizer/83392
7393 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
7394 INTEGER_CST offset, add it together with bitpos / 8 and
7395 sign extend based on POINTER_SIZE.
7396
7397 PR target/84844
7398 Revert
7399 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
7400
7401 PR target/78090
7402 * config/i386/constraints.md (Yc): New register constraint.
7403 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
7404 Use Yc constraint for alternative 2 of operand 0. Remove
7405 preferred_for_speed attribute.
7406
7407 2018-03-14 Richard Biener <rguenther@suse.de>
7408
7409 PR tree-optimization/84830
7410 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
7411 with the old one to avoid oscillations.
7412
7413 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
7414
7415 PR target/83712
7416 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
7417 pseudos.
7418 (assign_by_spills): Return a flag of reload assignment failure.
7419 Do not process the reload assignment failures. Do not spill other
7420 reload pseudos if they has the same reg class. Update n if
7421 necessary.
7422 (lra_assign): Add a return arg. Set up from the result of
7423 assign_by_spills call.
7424 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7425 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
7426 usage_insns if it is not NULL.
7427 (spill_hard_reg_in_range): New function.
7428 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7429 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7430 function prototypes.
7431 (lra_assign): Change prototype.
7432 * lra.c (lra): Add code to deal with fails by splitting hard reg
7433 live ranges.
7434
7435 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
7436
7437 * config/riscv/riscv.opt (mrelax): New option.
7438 * config/riscv/riscv.c (riscv_file_start): Emit ".option
7439 "norelax" when riscv_mrelax is disabled.
7440 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
7441
7442 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
7443
7444 PR target/84743
7445 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
7446 reassociation for int modes.
7447
7448 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
7449
7450 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
7451 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
7452 for big-endian.
7453 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
7454 * config/aarch64/aarch64-sve.md
7455 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
7456 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
7457 (*extend<mode><Vwide>2): Rename to...
7458 (aarch64_sve_extend<mode><Vwide>2): ...this.
7459 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
7460 renaming the old pattern to...
7461 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
7462 unsigned packs.
7463 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
7464 define_expand, renaming the old pattern to...
7465 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
7466 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
7467 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
7468 account when deciding which SVE instruction the optab should use.
7469 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
7470
7471 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
7472
7473 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
7474 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
7475 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
7476 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
7477 (tlsdesc_small_<mode>): Turn a define_expand and use
7478 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
7479 (tlsdesc_small_advsimd_<mode>): ...this.
7480 (tlsdesc_small_sve_<mode>): New pattern.
7481
7482 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
7483
7484 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
7485 (UNSPEC_UMUL_HIGHPART): New constants.
7486 (MUL_HIGHPART): New int iteraor.
7487 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
7488 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
7489 define_expand.
7490 (*<su>mul<mode>3_highpart): New define_insn.
7491
7492 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
7493
7494 PR lto/84805
7495 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
7496 incomplete types.
7497
7498 2018-03-13 Martin Liska <mliska@suse.cz>
7499
7500 PR ipa/84658.
7501 * (sem_item_optimizer::sem_item_optimizer): Initialize new
7502 vector.
7503 (sem_item_optimizer::~sem_item_optimizer): Release it.
7504 (sem_item_optimizer::merge_classes): Register variable aliases.
7505 (sem_item_optimizer::fixup_pt_set): New function.
7506 (sem_item_optimizer::fixup_points_to_sets): Likewise.
7507 * ipa-icf.h: Declare new variables and functions.
7508
7509 2018-03-13 Jakub Jelinek <jakub@redhat.com>
7510
7511 PR middle-end/84834
7512 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
7513 integer_pow2p@2 and test integer_pow2p in condition.
7514 (A < 0 ? C : 0): Similarly for @1.
7515
7516 PR middle-end/84831
7517 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
7518 characters starting at p contain '\0' character, don't look beyond
7519 that.
7520
7521 PR target/84827
7522 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
7523 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
7524
7525 PR target/84828
7526 * reg-stack.c (change_stack): Change update_end var from int to
7527 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
7528 also call set_block_for_insn on the newly added insns and rescan.
7529
7530 PR target/84786
7531 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
7532 on the last operand.
7533
7534 PR c++/84704
7535 * tree.c (stabilize_reference_1): Return save_expr (e) for
7536 STATEMENT_LIST even if it doesn't have side-effects.
7537
7538 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
7539
7540 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
7541
7542 2018-03-12 Renlin Li <renlin.li@arm.com>
7543
7544 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
7545 aarch64_output_scalar_simd_mov_immediate.
7546
7547 2018-03-12 Martin Sebor <msebor@redhat.com>
7548
7549 PR tree-optimization/83456
7550 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
7551 for perfectly overlapping calls to memcpy.
7552 (gimple_fold_builtin_memory_chk): Same.
7553 (gimple_fold_builtin_strcpy): Handle no-warning.
7554 (gimple_fold_builtin_stxcpy_chk): Same.
7555 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
7556
7557 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
7558
7559 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
7560 parameter. Use it for SFmode.
7561 (rs6000_function_arg_advance_1): Adjust.
7562 (rs6000_function_arg): Adjust.
7563 (rs6000_gimplify_va_arg): Pass false for that new parameter.
7564
7565 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
7566
7567 PR rtl-optimization/84169
7568 PR rtl-optimization/84780
7569 * combine.c (can_combine_p): Check for a 2-insn combination whether
7570 the destination register is used between the two insns, too.
7571
7572 2018-03-12 Richard Biener <rguenther@suse.de>
7573
7574 PR tree-optimization/84803
7575 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
7576 for refs DR analysis didn't process.
7577
7578 2018-03-12 Richard Biener <rguenther@suse.de>
7579
7580 PR tree-optimization/84777
7581 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
7582 force-vectorize loops ignore whether we are optimizing for size.
7583
7584 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
7585
7586 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
7587 (TARGET_MD_ASM_ADJUST): Define.
7588
7589 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
7590 Kito Cheng <kito.cheng@gmail.com>
7591 Chung-Ju Wu <jasonwucj@gmail.com>
7592
7593 * config/nds32/nds32.c (nds32_compute_stack_frame,
7594 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
7595 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
7596 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
7597 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
7598 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
7599 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
7600 * config/nds32/nds32.md (prologue, epilogue): Use macro
7601 NDS32_V3PUSH_AVAILABLE_P to do checking.
7602
7603 2018-03-11 Jakub Jelinek <jakub@redhat.com>
7604
7605 PR debug/58150
7606 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
7607 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
7608 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
7609 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
7610 addition of most attributes on !orig_type_die or the attribute not
7611 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
7612
7613 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
7614 Chung-Ju Wu <jasonwucj@gmail.com>
7615
7616 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
7617 __NDS32_VH__ macro.
7618 * config/nds32/nds32.opt (mvh): New option.
7619
7620 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
7621 Chung-Ju Wu <jasonwucj@gmail.com>
7622
7623 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
7624 function.
7625 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
7626 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
7627 definition.
7628
7629 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
7630 Chung-Ju Wu <jasonwucj@gmail.com>
7631
7632 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
7633 function.
7634 * config/nds32/nds32-multiple.md (strlensi): New pattern.
7635 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
7636
7637 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
7638 Kito Cheng <kito.cheng@gmail.com>
7639 Chung-Ju Wu <jasonwucj@gmail.com>
7640
7641 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
7642 UNSPEC_FFMISM and UNSPEC_FLMISM.
7643 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
7644 for ffb, ffmism and flmism.
7645 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
7646 (unspec_ffmism): Ditto.
7647 (unspec_flmism): Ditto.
7648 (nds32_expand_builtin_impl): Check if string extension is available.
7649 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
7650 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
7651
7652 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
7653
7654 Reverting patch:
7655 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
7656
7657 PR target/83712
7658 * lra-assigns.c (assign_by_spills): Return a flag of reload
7659 assignment failure. Do not process the reload assignment
7660 failures. Do not spill other reload pseudos if they has the same
7661 reg class.
7662 (lra_assign): Add a return arg. Set up from the result of
7663 assign_by_spills call.
7664 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7665 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
7666 usage_insns if it is not NULL.
7667 (spill_hard_reg_in_range): New function.
7668 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7669 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7670 function prototypes.
7671 (lra_assign): Change prototype.
7672 * lra.c (lra): Add code to deal with fails by splitting hard reg
7673 live ranges.
7674
7675 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
7676
7677 PR target/84807
7678 * config/i386/i386.opt: Replace Enforcment with Enforcement.
7679
7680 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
7681
7682 PR debug/84620
7683 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
7684 (dw_val_node): Add val_symbolic_view.
7685 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
7686 (symview_upper_bound): New.
7687 (new_line_info_table): Initialize symviews_since_reset.
7688 (dwarf2out_source_line): Count symviews_since_reset and set
7689 symview_upper_bound.
7690 (dw_val_equal_p): Handle symview.
7691 (add_AT_symview): New.
7692 (print_dw_val): Handle symview.
7693 (attr_checksum, attr_checksum_ordered): Likewise.
7694 (same_dw_val_p, size_of_die): Likewise.
7695 (value_format, output_die): Likewise.
7696 (add_high_low_attributes): Use add_AT_symview for entry_view.
7697 (dwarf2out_finish): Reset symview_upper_bound, clear
7698 zero_view_p.
7699
7700 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
7701
7702 PR target/83969
7703 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
7704 Add strict argument and use it.
7705 (rs6000_split_multireg_move): Update for new strict argument.
7706 (mem_operand_gpr): Disallow all non-offsettable addresses.
7707 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
7708
7709 2018-03-09 Jakub Jelinek <jakub@redhat.com>
7710
7711 PR target/84772
7712 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
7713 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
7714 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
7715
7716 PR c++/84767
7717 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
7718 decl, use remap_type if we want to use the type.
7719
7720 2018-03-09 Martin Sebor <msebor@redhat.com>
7721
7722 PR tree-optimization/84526
7723 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
7724 Remove dead code.
7725 (builtin_access::generic_overlap): Be prepared to handle non-array
7726 base objects.
7727
7728 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
7729
7730 PR rtl-optimization/84682
7731 * lra-constraints.c (process_address_1): Check is_address flag
7732 for address constraints.
7733 (process_alt_operands): Likewise.
7734 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
7735 preprocess_constraints.
7736 * recog.h (preprocess_constraints): Add oploc parameter.
7737 Adjust callers.
7738 * recog.c (preprocess_constraints): Test address_operand for
7739 CT_ADDRESS constraints.
7740
7741 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
7742
7743 PR target/83712
7744 * lra-assigns.c (assign_by_spills): Return a flag of reload
7745 assignment failure. Do not process the reload assignment
7746 failures. Do not spill other reload pseudos if they has the same
7747 reg class.
7748 (lra_assign): Add a return arg. Set up from the result of
7749 assign_by_spills call.
7750 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7751 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
7752 usage_insns if it is not NULL.
7753 (spill_hard_reg_in_range): New function.
7754 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7755 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7756 function prototypes.
7757 (lra_assign): Change prototype.
7758 * lra.c (lra): Add code to deal with fails by splitting hard reg
7759 live ranges.
7760
7761 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7762
7763 PR target/83193
7764 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
7765 Accept complain bool parameter. Only emit errors if it is true.
7766 (arm_parse_cpu_option_name): Likewise.
7767 (arm_target_thumb_only): Adjust callers of the above.
7768 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
7769 prototype to take a default true bool parameter.
7770 (arm_parse_arch_option_name): Likewise.
7771
7772 2018-03-09 David Malcolm <dmalcolm@redhat.com>
7773 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7774
7775 PR jit/64089
7776 PR jit/84288
7777 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
7778 * configure: Regenerate.
7779 * configure.ac ("linker --version-script option"): New.
7780 ("linker soname option"): New.
7781
7782 2018-03-09 Richard Biener <rguenther@suse.de>
7783
7784 PR tree-optimization/84775
7785 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
7786 immediate uses of predicate stmts and mark them modified.
7787
7788 Revert
7789 PR tree-optimization/84178
7790 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
7791 to caller.
7792 (version_loop_for_if_conversion): Delay update_ssa call.
7793 (tree_if_conversion): Delay update_ssa until after predicate
7794 insertion.
7795
7796 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
7797
7798 PR target/84763
7799 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
7800 when the function accesses prior frames.
7801
7802 2018-03-08 Jakub Jelinek <jakub@redhat.com>
7803
7804 PR debug/84456
7805 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
7806 gen_llsym, otherwise call maybe_gen_llsym.
7807
7808 PR inline-asm/84742
7809 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
7810 has ',' character inside of it.
7811
7812 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7813
7814 PR target/84748
7815 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
7816 as clobbering CC_REGNUM.
7817
7818 2018-03-08 Richard Biener <rguenther@suse.de>
7819
7820 PR middle-end/84552
7821 * tree-scalar-evolution.c: Include tree-into-ssa.h.
7822 (follow_copies_to_constant): Do not follow SSA names registered
7823 for update.
7824
7825 2018-03-08 Richard Biener <rguenther@suse.de>
7826
7827 PR tree-optimization/84178
7828 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
7829 to caller.
7830 (version_loop_for_if_conversion): Delay update_ssa call.
7831 (tree_if_conversion): Delay update_ssa until after predicate
7832 insertion.
7833
7834 2018-03-08 David Malcolm <dmalcolm@redhat.com>
7835
7836 PR tree-optimization/84178
7837 * tree-if-conv.c (release_bb_predicate): Remove the
7838 the assertion that the stmts have NULL use_ops.
7839 Discard the statements, asserting that they haven't
7840 yet been added to a BB.
7841
7842 2018-03-08 Richard Biener <rguenther@suse.de>
7843
7844 PR tree-optimization/84746
7845 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
7846 (phi_translate): Pass in destination ANTIC_OUT set.
7847 (phi_translate_1): Likewise. For a simplified result lookup
7848 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
7849 (phi_translate_set): Adjust.
7850 (do_pre_regular_insertion): Likewise.
7851 (do_pre_partial_partial_insertion): Likewise.
7852
7853 2018-03-08 Martin Liska <mliska@suse.cz>
7854
7855 PR gcov-profile/84735
7856 * doc/gcov.texi: Document usage of profile files.
7857 * gcov-io.h: Document changes in the format.
7858
7859 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
7860
7861 PR debug/84404
7862 PR debug/84408
7863 * dwarf2out.c (struct dw_line_info_table): Update comments for
7864 view == -1.
7865 (FORCE_RESET_NEXT_VIEW): New.
7866 (FORCE_RESETTING_VIEW_P): New.
7867 (RESETTING_VIEW_P): Check for -1 too.
7868 (ZERO_VIEW_P): Likewise.
7869 (new_line_info_table): Force-reset next view.
7870 (dwarf2out_begin_function): Likewise.
7871 (dwarf2out_source_line): Simplify zero_view_p initialization.
7872 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
7873 view directly. Omit view when omitting .loc at line 0.
7874
7875 2018-03-08 Jakub Jelinek <jakub@redhat.com>
7876
7877 PR tree-optimization/84740
7878 * tree-switch-conversion.c (process_switch): Call build_constructors
7879 only if info.phi_count is non-zero.
7880
7881 PR tree-optimization/84739
7882 * tree-tailcall.c (find_tail_calls): Check call arguments against
7883 DECL_ARGUMENTS (current_function_decl) rather than
7884 DECL_ARGUMENTS (func) when checking for tail recursion.
7885
7886 2018-03-07 Jakub Jelinek <jakub@redhat.com>
7887
7888 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
7889 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
7890 Volker Reichelt's entry and add entries for people that perform
7891 GCC fuzzy testing and report numerous bugs.
7892
7893 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
7894
7895 PR target/82411
7896 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
7897 readonly data in sdata, if that is disabled.
7898 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
7899 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
7900 -mreadonly-in-sdata option.
7901
7902 2018-03-07 Martin Sebor <msebor@redhat.com>
7903
7904 PR tree-optimization/84468
7905 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
7906 basic block when looking for nul assignment.
7907
7908 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
7909
7910 PR target/84277
7911 * except.h (output_function_exception_table): Adjust prototype.
7912 * except.c (output_function_exception_table): Remove FNNAME parameter
7913 and add SECTION parameter. Ouput one part of the table at a time.
7914 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
7915 the first part of the exception table and emit unwind directives.
7916 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
7917 (i386_pe_seh_cold_init): Likewise.
7918 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
7919 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
7920 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
7921 (ix86_output_call_insn): Emit a nop in one more case for SEH.
7922 * config/i386/winnt.c: Include except.h.
7923 (struct seh_frame_state): Add reg_offset, after_prologue and
7924 in_cold_section fields.
7925 (i386_pe_seh_end_prologue): Set seh->after_prologue.
7926 (i386_pe_seh_cold_init): New function.
7927 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
7928 to seh->in_cold_section.
7929 (seh_emit_push): Record the offset of the push.
7930 (seh_emit_save): Record the offet of the save.
7931 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
7932 Test seh->after_prologue to disregard the epilogue.
7933 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
7934 (i386_pe_end_cold_function): New function.
7935
7936 2018-03-07 Jakub Jelinek <jakub@redhat.com>
7937
7938 PR fortran/84565
7939 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
7940 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
7941
7942 PR c++/84704
7943 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
7944 on tmp_var.
7945 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
7946 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
7947
7948 PR middle-end/84723
7949 * multiple_target.c: Include tree-inline.h and intl.h.
7950 (expand_target_clones): Diagnose and fail if node->definition and
7951 !tree_versionable_function_p (node->decl).
7952
7953 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
7954
7955 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
7956 sprint_ul.
7957 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
7958 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
7959 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
7960
7961 2018-03-06 Jakub Jelinek <jakub@redhat.com>
7962
7963 PR target/84710
7964 * combine.c (try_combine): Use reg_or_subregno instead of handling
7965 just paradoxical SUBREGs and REGs.
7966
7967 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
7968
7969 * config/arc/arc.c (arc_finalize_pic): Remove function.
7970 (arc_must_save_register): We use single base PIC register, remove
7971 checks to save/restore the PIC register.
7972 (arc_expand_prologue): Likewise.
7973 * config/arc/arc-protos.h (arc_set_default_type_attributes):
7974 Remove.
7975 (arc_verify_short): Likewise.
7976 (arc_attr_type): Likewise.
7977 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
7978 (walk_stores): Likewise.
7979 (arc_address_cost): Make it static.
7980 (arc_verify_short): Likewise.
7981 (branch_dest): Likewise.
7982 (arc_attr_type): Likewise.
7983 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
7984 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
7985 (arc_final_prescan_insn): Remove inserting the nops due to
7986 hardware hazards. It is done in reorg step.
7987 (insn_length_variant_t): Remove.
7988 (insn_length_parameters_t): Likewise.
7989 (arc_insn_length_parameters): Likewise.
7990 (arc_get_insn_variants): Likewise.
7991 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
7992
7993 2018-03-06 Jakub Jelinek <jakub@redhat.com>
7994
7995 PR inline-asm/84683
7996 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
7997 assertion failure.
7998
7999 PR tree-optimization/84687
8000 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
8001 on new_node->decl.
8002 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
8003
8004 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8005
8006 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
8007 Rename to ppc_speculation_barrier.
8008 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
8009 __builtin_ppc_speculation_barrier.
8010
8011 2018-03-05 Jakub Jelinek <jakub@redhat.com>
8012
8013 PR target/84700
8014 * combine.c (combine_simplify_rtx): Don't try to simplify if
8015 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
8016 are equal to x.
8017
8018 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
8019
8020 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
8021 to 32 bytes when compiling for POWER9.
8022
8023 2018-03-05 Jakub Jelinek <jakub@redhat.com>
8024
8025 PR target/84564
8026 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
8027 regparm >= 3 with no arg reg available also for calls with
8028 flag_force_indirect_call. Pass decl to ix86_function_regparm.
8029
8030 PR target/84524
8031 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
8032 orig,vex.
8033 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
8034
8035 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
8036
8037 PR target/84264
8038 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
8039
8040 2018-03-05 Richard Biener <rguenther@suse.de>
8041
8042 PR tree-optimization/84486
8043 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
8044 When inserting a __builtin_assume_aligned call set the LHS
8045 SSA name alignment info accordingly.
8046
8047 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
8048
8049 PR tree-optimization/84114
8050 * config/aarch64/aarch64.c (aarch64_reassociation_width)
8051 Avoid reassociation of FLOAT_MODE addition.
8052
8053 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
8054
8055 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
8056 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
8057 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
8058 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
8059 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
8060 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
8061 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
8062 and -mwbnoinvd.
8063 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
8064 __builtin_ia32_wbinvd): New builtins.
8065 (SPECIAL_ARGS2): New.
8066 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
8067 (SPECIAL_ARGS2): New.
8068 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
8069 (ix86_valid_target_attribute_inner_p): Ditto.
8070 (ix86_init_mmx_sse_builtins): Add special_args2.
8071 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
8072 TARGET_WBNOINVD_P): New.
8073 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
8074 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
8075 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
8076 * config/i386/immintrin.h (_wbinvd): New intrinsic.
8077 * config/i386/pconfigintrin.h: New file.
8078 * config/i386/wbnoinvdintrin.h: Ditto.
8079 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
8080 wbnoinvdintrin.h.
8081 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
8082
8083 2018-03-05 Richard Biener <rguenther@suse.de>
8084
8085 PR tree-optimization/84670
8086 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
8087 member.
8088 (BB_VISITED_WITH_VISITED_SUCCS): New define.
8089 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
8090 (compute_antic_aux): Only assert the number of values in ANTIC_IN
8091 doesn't grow if all successors (recursively) were visited at least
8092 once.
8093
8094 2018-03-05 Richard Biener <rguenther@suse.de>
8095
8096 PR tree-optimization/84650
8097 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
8098 if executed in the loop pipeline.
8099
8100 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
8101
8102 * doc/configfiles.texi (Configuration Files): Move info about
8103 conditionalizing $target-protos.h to...
8104 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
8105 differs from $target-protos.h.
8106
8107 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
8108 Chung-Ju Wu <jasonwucj@gmail.com>
8109
8110 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
8111 * config/nds32/nds32-multiple.md (setmemsi): Define.
8112 * config/nds32/nds32-memory-manipulation.c
8113 (nds32_gen_dup_4_byte_to_word_value): New.
8114 (emit_setmem_word_loop): New.
8115 (emit_setmem_byte_loop): New.
8116 (nds32_expand_setmem_loop): New.
8117 (nds32_expand_setmem_loop_v3m): New.
8118 (nds32_expand_setmem_unroll): New.
8119 (nds32_expand_setmem): New.
8120
8121 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
8122 Chung-Ju Wu <jasonwucj@gmail.com>
8123
8124 * config/nds32/nds32-memory-manipulation.c
8125 (nds32_emit_load_store): New.
8126 (nds32_emit_post_inc_load_store): New.
8127 (nds32_emit_mem_move): New.
8128 (nds32_emit_mem_move_block): New.
8129 (nds32_expand_movmemsi_loop_unknown_size): New.
8130 (nds32_expand_movmemsi_loop_known_size): New.
8131 (nds32_expand_movmemsi_loop): New.
8132 (nds32_expand_movmemsi_unroll): New.
8133 (nds32_expand_movmemqi): Rename ...
8134 (nds32_expand_movmemsi): ... to this.
8135 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
8136 (movmemsi): ... to this.
8137 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
8138 (nds32_expand_movmemsi): ... to this.
8139
8140 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
8141 Monk Chiang <sh.chiang04@gmail.com>
8142 Chung-Ju Wu <jasonwucj@gmail.com>
8143
8144 * config/nds32/nds32-protos.h
8145 (nds32_expand_load_multiple): New arguments.
8146 (nds32_expand_store_multiple): Ditto.
8147 (nds32_valid_multiple_load_store): Rename ...
8148 (nds32_valid_multiple_load_store_p): ... to this.
8149 * config/nds32/nds32-memory-manipulation.c
8150 (nds32_expand_load_multiple): Refine implementation.
8151 (nds32_expand_store_multiple): Ditto.
8152 * config/nds32/nds32-multiple.md
8153 (load_multiple): Update nds32_expand_load_multiple interface.
8154 (store_multiple): Update nds32_expand_store_multiple interface.
8155 * config/nds32/nds32-predicates.c
8156 (nds32_valid_multiple_load_store): Rename ...
8157 (nds32_valid_multiple_load_store_p): ... to this and refine
8158 implementation.
8159 * config/nds32/predicates.md
8160 (nds32_load_multiple_and_update_address_operation): New predicate.
8161 (nds32_store_multiple_and_update_address_operation): New predicate.
8162
8163 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
8164 Chung-Ju Wu <jasonwucj@gmail.com>
8165
8166 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
8167 (combo): New attribute.
8168 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
8169
8170 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
8171
8172 * config/nds32/nds32.opt: Change -mcmodel= default value.
8173
8174 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
8175 Monk Chiang <sh.chiang04@gmail.com>
8176 Chung-Ju Wu <jasonwucj@gmail.com>
8177
8178 * config/nds32/constants.md (unspec_element): New enum.
8179 * config/nds32/constraints.md (Umw): New constraint.
8180 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
8181 * config/nds32/nds32-intrinsic.md: Likewise.
8182 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
8183 (nds32_valid_smw_lwm_base_p): New.
8184 (nds32_output_smw_single_word): New.
8185 (nds32_output_lmw_single_word): New.
8186 (nds32_expand_unaligned_load): New.
8187 (nds32_expand_unaligned_store): New.
8188 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
8189 (nds32_output_smw_single_word): Declare.
8190 (nds32_output_lmw_single_word): Declare.
8191 (nds32_expand_unaligned_load): Declare.
8192 (nds32_expand_unaligned_store): Declare.
8193 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
8194 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
8195 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
8196 NDS32_BUILTIN_UASTORE_DW.
8197 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
8198 predicate.
8199
8200 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
8201 Kito Cheng <kito.cheng@gmail.com>
8202 Chung-Ju Wu <jasonwucj@gmail.com>
8203
8204 * config/nds32/nds32-intrinsic.c
8205 (nds32_expand_builtin_null_ftype_reg): Delete.
8206 (nds32_expand_builtin_reg_ftype_imm): Ditto.
8207 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
8208 (nds32_read_argument): New.
8209 (nds32_legitimize_target): Ditto.
8210 (nds32_legitimize_argument): Ditto.
8211 (nds32_check_constant_argument): Ditto.
8212 (nds32_expand_unop_builtin): Ditto.
8213 (nds32_expand_unopimm_builtin): Ditto.
8214 (nds32_expand_binop_builtin): Ditto.
8215 (nds32_builtin_decl_impl): Ditto.
8216 (builtin_description): Ditto.
8217 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
8218 (nds32_init_builtins_impl): Ditto.
8219 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
8220 (nds32_builtin_decl): New.
8221 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
8222 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
8223
8224 2018-03-02 Jeff Law <law@redhat.com>
8225
8226 * reorg.c (stop_search_p): Handle DEBUG_INSN.
8227 (redundant_insn, fill_simple_delay_slots): Likewise.
8228 (fill_slots_from_thread): Likewise.
8229 * resource.c (mark_referenced_resources): Likewise.
8230 (mark_set_resources, find_dead_or_set_registers): Likewise.
8231
8232 2018-03-02 Jakub Jelinek <jakub@redhat.com>
8233
8234 * substring-locations.h (format_warning_va): Formatting fix for
8235 ATTRIBUTE_GCC_DIAG.
8236 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
8237 argument.
8238 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
8239 * substring-locations.c: Include intl.h.
8240 (format_warning_va): Turned into small wrapper around
8241 format_warning_n_va, renamed to ...
8242 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
8243 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
8244 use ngettext.
8245 (format_warning_at_substring_n): New function.
8246 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
8247 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
8248 format_warning_at_substring with just a shorter name instead of
8249 const function pointer.
8250 (fmtwarn_n): New function.
8251 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
8252 appropriate, get rid of all the fmtstr temporaries, move conditionals
8253 with G_() wrapped string literals directly into fmtwarn arguments,
8254 cast dir.len to (int), formatting fixes.
8255
8256 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
8257
8258 * doc/invoke.texi: Remove "Cilk Plus" references.
8259
8260 2018-03-02 Jakub Jelinek <jakub@redhat.com>
8261 Richard Biener <rguenther@suse.de>
8262
8263 PR ipa/84628
8264 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
8265 for error or warning attributes if CALL_FROM_THUNK_P is set.
8266 Formatting fixes.
8267
8268 2018-03-02 Jakub Jelinek <jakub@redhat.com>
8269
8270 PR target/56540
8271 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
8272 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
8273
8274 PR target/56540
8275 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
8276 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
8277
8278 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
8279 instead of -1U in last predictors element's probability member.
8280
8281 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
8282
8283 PR ipa/83983
8284 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
8285 arguments if they are comparable.
8286
8287 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
8288
8289 PR tree-optimization/84634
8290 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
8291 masks and masked_loop_p with a single loop_masks, making sure it's
8292 null for bb vectorization.
8293
8294 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
8295
8296 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8297 (vect_analyze_data_ref_access): Use loop->safe_len rather than
8298 loop->force_vectorize to check whether there is no alias.
8299
8300 2018-03-02 Jakub Jelinek <jakub@redhat.com>
8301
8302 PR target/84614
8303 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
8304 prototypes.
8305 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
8306 comments.
8307 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
8308 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
8309 instead of a loop around prev_real_insn.
8310 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
8311 prev_real_insn.
8312
8313 PR inline-asm/84625
8314 * config/i386/i386.c (ix86_print_operand): Use conditional
8315 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
8316 zero vector.
8317
8318 2018-03-02 Richard Biener <rguenther@suse.de>
8319
8320 PR tree-optimization/84427
8321 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
8322 (bitmap_set_subtract_values): Rewrite to handle multiple
8323 exprs per value.
8324 (clean): Likewise.
8325 (prune_clobbered_mems): Likewise.
8326 (phi_translate): Take edge instead of pred/phiblock.
8327 (phi_translate_1): Likewise.
8328 (phi_translate_set): Likewise. Insert all translated
8329 exprs for a value into the set, keeping possibly multiple
8330 expressions per value.
8331 (compute_antic_aux): Adjust for phi_translate changes.
8332 When intersecting union the expressions and prune those
8333 not in the final value set, keeping possibly multiple
8334 expressions per value. Do not use value-insertion
8335 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
8336 all expressions. Add verification that the value-sets
8337 only shrink during iteration.
8338 (compute_partial_antic_aux): Adjust for the phi_translate changes.
8339 (do_pre_regular_insertion): Likewise.
8340 (do_pre_partial_partial_insertion): Likewise.
8341
8342 2018-03-02 Richard Biener <rguenther@suse.de>
8343
8344 PR target/82005
8345 * config/darwin.c (saved_debug_info_level): New static global.
8346 (darwin_asm_lto_start): Disable debug info generation for LTO out.
8347 (darwin_asm_lto_end): Restore debug info generation settings.
8348
8349 2018-03-01 Martin Liska <mliska@suse.cz>
8350
8351 PR sanitizer/82484
8352 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
8353 volatile arguments.
8354
8355 2018-03-01 Richard Biener <rguenther@suse.de>
8356
8357 PR debug/84645
8358 * dwarf2out.c (gen_variable_die): Properly handle late VLA
8359 type annotation with LTO when debug was disabled at compile-time.
8360
8361 2018-03-01 Matthew Fortune <mfortune@gmail.com>
8362
8363 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
8364 XINT with INTVAL.
8365 (mips_final_postscan_insn): Likewise.
8366
8367 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
8368
8369 PR rtl-optimization/84528
8370 * alias.c (init_alias_target): Add commentary.
8371 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
8372 a unique base value if the frame pointer is not eliminated
8373 to the stack pointer.
8374
8375 2018-03-01 Tom de Vries <tom@codesourcery.com>
8376
8377 PR rtl-optimization/83327
8378 * lra-int.h (hard_regs_spilled_into): Declare.
8379 * lra.c (hard_regs_spilled_into): Define.
8380 (init_reg_info): Init hard_regs_spilled_into.
8381 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
8382 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
8383 (process_bb_lives): Handle hard_regs_spilled_into.
8384 (lra_create_live_ranges_1): Before doing liveness propagation, clear
8385 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
8386
8387 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
8388
8389 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
8390 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
8391 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
8392 * config/rs6000/aix72.h: New file.
8393
8394 2018-02-28 Jakub Jelinek <jakub@redhat.com>
8395
8396 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
8397 instead of warning_at with conditional singular and plural messages
8398 where possible.
8399
8400 PR target/52991
8401 * stor-layout.c (update_alignment_for_field): For
8402 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
8403 && !DECL_PACKED (field), do the alignment update, just use
8404 only desired_align instead of MAX (type_align, desired_align)
8405 as the alignment.
8406 (place_field): Don't do known_align < desired_align handling
8407 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
8408 is non-NULL, instead do it after rli->prev_field handling and
8409 only if not within a bitfield word. For DECL_PACKED (field)
8410 use type_align of BITS_PER_UNIT.
8411
8412 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
8413
8414 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
8415 superfluous parentheses and trailing spaces.
8416
8417 2018-02-28 Richard Biener <rguenther@suse.de>
8418
8419 PR tree-optimization/84584
8420 * graphite-scop-detection.c (scop_detection::add_scop): Discard
8421 SCoPs with fake exit edge.
8422
8423 2018-02-28 Martin Liska <mliska@suse.cz>
8424
8425 PR testsuite/84597
8426 * timevar.c (timer::print): Fix format to properly print 100%
8427 values.
8428
8429 2018-02-28 Richard Biener <rguenther@suse.de>
8430
8431 PR middle-end/84607
8432 * genmatch.c (capture_info::walk_match): Do not mark
8433 captured expressions without operands as expr_p given
8434 they act more like predicates and should be subject to
8435 "lost tail" side-effect preserving.
8436
8437 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
8438
8439 PR rtl-optimization/81611
8440 * auto-inc-dec.c (attempt_change): Move dead note from
8441 mem_insn if it's the next use of regno
8442 (find_address): Take address use of reg holding
8443 non-incremented value. Add parm to limit search to the named
8444 reg only.
8445 (merge_in_block): Attempt to use a mem insn that is the next
8446 use of the original regno.
8447
8448 2018-02-27 Martin Sebor <msebor@redhat.com>
8449
8450 PR c++/83871
8451 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
8452 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
8453
8454 2018-02-27 Martin Sebor <msebor@redhat.com>
8455
8456 PR translation/84207
8457 * diagnostic-core.h (warning_n, error_n, inform_n): Change
8458 n argument to unsigned HOST_WIDE_INT.
8459 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
8460 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
8461 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
8462 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
8463
8464 2018-02-27 Richard Biener <rguenther@suse.de>
8465
8466 PR tree-optimization/84512
8467 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
8468 Do not use the estimate returned from record_stmt_cost for
8469 the scalar iteration cost but sum properly using add_stmt_cost.
8470
8471 2018-02-27 Richard Biener <rguenther@suse.de>
8472
8473 PR tree-optimization/84466
8474 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
8475 Adjust last change to less strictly validate use operands.
8476
8477 2018-02-27 Martin Liska <mliska@suse.cz>
8478
8479 PR gcov-profile/84548
8480 * gcov.c (process_file): Allow partial overlap and consider it
8481 also as group functions.
8482 (output_lines): Properly calculate range of lines for a group.
8483
8484 2018-02-27 Martin Liska <mliska@suse.cz>
8485
8486 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
8487 'ggc' suffixes. Change first column width.
8488 (timer::print): Fix formatting of the column.
8489
8490 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
8491
8492 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
8493 preserve inline entry blocks for the sake of debug inline
8494 entry point markers alone.
8495 (remove_unused_locals): Suggest in comments a better place to
8496 force the preservation of inline entry blocks that are
8497 otherwise unused, but do not preserve them.
8498
8499 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
8500
8501 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
8502
8503 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
8504
8505 PR target/84039
8506 * config/i386/constraints.md (Bs): Replace
8507 ix86_indirect_branch_register with
8508 TARGET_INDIRECT_BRANCH_REGISTER.
8509 (Bw): Likewise.
8510 * config/i386/i386.md (indirect_jump): Likewise.
8511 (tablejump): Likewise.
8512 (*sibcall_memory): Likewise.
8513 (*sibcall_value_memory): Likewise.
8514 Peepholes of indirect call and jump via memory: Likewise.
8515 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
8516 (*sibcall_value_GOT_32): Likewise.
8517 * config/i386/predicates.md (indirect_branch_operand): Likewise.
8518 (GOT_memory_operand): Likewise.
8519 (call_insn_operand): Likewise.
8520 (sibcall_insn_operand): Likewise.
8521 (GOT32_symbol_operand): Likewise.
8522 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
8523
8524 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
8525
8526 PR rtl-optimization/83496
8527 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
8528 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
8529 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
8530 redundant insn, if any.
8531 (relax_delay_slots): Likewise.
8532 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
8533
8534 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
8535
8536 PR tree-optimization/83965
8537 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
8538 that grouped statements are part of a reduction chain. Return
8539 true if the statement is not marked as a reduction itself but
8540 is part of a group.
8541 (vect_recog_dot_prod_pattern): Don't check whether the statement
8542 is part of a group here.
8543 (vect_recog_sad_pattern): Likewise.
8544 (vect_recog_widen_sum_pattern): Likewise.
8545
8546 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
8547
8548 PR debug/84545
8549 * final.c (rest_of_clean_state): Also look for calls inside sequences.
8550
8551 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
8552
8553 PR target/84530
8554 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
8555 the bool argument.
8556 (ix86_output_indirect_function_return): New prototype.
8557 (ix86_split_simple_return_pop_internal): Likewise.
8558 * config/i386/i386.c (indirect_return_via_cx): New.
8559 (indirect_return_via_cx_bnd): Likewise.
8560 (indirect_thunk_name): Handle return va CX_REG.
8561 (output_indirect_thunk_function): Create alias for
8562 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
8563 (ix86_output_indirect_jmp): Remove the bool argument.
8564 (ix86_output_indirect_function_return): New function.
8565 (ix86_split_simple_return_pop_internal): Likewise.
8566 * config/i386/i386.md (*indirect_jump): Don't pass false
8567 to ix86_output_indirect_jmp.
8568 (*tablejump_1): Likewise.
8569 (simple_return_pop_internal): Change it to define_insn_and_split.
8570 Call ix86_split_simple_return_pop_internal to split it for
8571 -mfunction-return=.
8572 (simple_return_indirect_internal): Call
8573 ix86_output_indirect_function_return instead of
8574 ix86_output_indirect_jmp.
8575
8576 2018-02-26 Jakub Jelinek <jakub@redhat.com>
8577
8578 PR bootstrap/84405
8579 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
8580 memset and value initialization afterwards.
8581
8582 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
8583
8584 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
8585
8586 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8587
8588 PR target/84521
8589 * common/config/aarch64/aarch64-common.c
8590 (aarch_option_optimization_table[]): Switch
8591 off fomit-frame-pointer
8592
8593 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
8594 Chung-Ju Wu <jasonwucj@gmail.com>
8595
8596 * config/nds32/nds32-multiple.md (load_multiple): Disallow
8597 volatile memory.
8598 (store_multiple): Ditto.
8599
8600 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
8601
8602 * config.gcc: Add --with-cpu support for nds32 target.
8603 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
8604 * config/nds32/nds32.opt: Add -mcpu= option.
8605
8606 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
8607
8608 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
8609 isel=yes): Warn for these deprecated options.
8610
8611 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
8612
8613 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
8614 ISA_2_5_MASKS_EMBEDDED.
8615
8616 2018-02-23 Jakub Jelinek <jakub@redhat.com>
8617
8618 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
8619 p->max as pointers rather than using iterative_hash_expr.
8620
8621 2018-02-23 Carl Love <cel@us.ibm.com>
8622
8623 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
8624 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
8625 BU_P8V_OVERLOAD_2.
8626 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
8627 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
8628 P8V_BUILTIN_VEC_VUNSIGNED2.
8629
8630 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
8631
8632 PR target/81572
8633 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
8634 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
8635 LRA_UNKNOWN_ALT.
8636 * lra-constraints.c (curr_insn_transform): Set up
8637 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
8638 LRA_UNKNOWN_ALT.
8639 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
8640 * lra-eliminations.c (spill_pseudos): Ditto.
8641 (process_insn_for_elimination): Ditto.
8642 * lra-lives.c (reg_early_clobber_p): Use the new macros.
8643 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
8644 LRA_NON_CLOBBERED_ALT.
8645
8646 2018-02-22 Martin Sebor <msebor@redhat.com>
8647
8648 PR tree-optimization/84480
8649 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
8650 to maybe_diag_stxncpy_trunc. Call it.
8651 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
8652 from gimple_fold_builtin_strcpy. Print inlining stack.
8653 (handle_builtin_stxncpy): Print inlining stack.
8654 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
8655
8656 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
8657
8658 PR target/84176
8659 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
8660 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
8661 and -fcheck-pointer-bounds are used together.
8662 (indirect_thunk_prefix): New enum.
8663 (indirect_thunk_need_prefix): New function.
8664 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
8665 "_nt" instead of "_bnd" for NOTRACK prefix.
8666 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
8667 (output_indirect_thunk_function): Likewise.
8668 (): Likewise.
8669 (ix86_code_end): Update output_indirect_thunk_function calls.
8670 (ix86_output_indirect_branch_via_reg): Replace
8671 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
8672 (ix86_output_indirect_branch_via_push): Likewise.
8673 (ix86_output_function_return): Likewise.
8674 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
8675 incompatible with -fcf-protection=branch and
8676 -fcheck-pointer-bounds.
8677
8678 2018-02-22 Steve Ellcey <sellcey@cavium.com>
8679
8680 PR target/83335
8681 * config/aarch64/aarch64.c (aarch64_print_address_internal):
8682 Change gcc_assert call to output_operand_lossage.
8683
8684 2018-02-22 Steve Ellcey <sellcey@cavium.com>
8685
8686 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
8687
8688 2018-02-22 DJ Delorie <dj@redhat.com>
8689 Sebastian Perta <sebastian.perta@renesas.com>
8690 Oleg Endo <olegendo@gcc.gnu.org>
8691
8692 * config/rx/rx.c (rx_rtx_costs): New function.
8693 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
8694
8695 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
8696
8697 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
8698
8699 2018-02-22 Martin Liska <mliska@suse.cz>
8700
8701 PR driver/83193
8702 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
8703 Add "native" as a possible value.
8704
8705 2018-02-22 Martin Liska <mliska@suse.cz>
8706
8707 PR driver/83193
8708 * config/i386/i386.c (ix86_option_override_internal):
8709 Add "native" as a possible value for -march and -mtune.
8710
8711 2018-02-22 Jakub Jelinek <jakub@redhat.com>
8712
8713 PR target/84502
8714 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
8715 to all type variants.
8716
8717 PR tree-optimization/84503
8718 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
8719 width as info->bitpos + info->bitsize - start.
8720 (merged_store_group::merge_overlapping): Simplify width computation.
8721 (check_no_overlap): New function.
8722 (imm_store_chain_info::try_coalesce_bswap): Compute expected
8723 start + width and last_order of the group, fail if check_no_overlap
8724 fails.
8725 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
8726 to group if check_no_overlap fails.
8727
8728 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
8729
8730 * config/rs6000/altivec.md: Delete contraint arguments to
8731 define_expand, define_split, and define_peephole2, and in
8732 define_insn_and_split if always unused.
8733 * config/rs6000/darwin.md: Ditto.
8734 * config/rs6000/dfp.md: Ditto.
8735 * config/rs6000/rs6000.md: Ditto.
8736 * config/rs6000/sync.md: Ditto.
8737 * config/rs6000/vector.md: Ditto.
8738 * config/rs6000/vsx.md: Ditto.
8739
8740 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
8741
8742 * config/rs6000/altivec.md: Write output control strings as braced
8743 blocks instead of double-quoted strings.
8744 * config/rs6000/darwin.md: Ditto.
8745 * config/rs6000/rs6000.md: Ditto.
8746 * config/rs6000/vector.md: Ditto.
8747 * config/rs6000/vsx.md: Ditto.
8748
8749 2018-02-21 Jason Merrill <jason@redhat.com>
8750
8751 PR c++/84314 - ICE with templates and fastcall attribute.
8752 * attribs.c (build_type_attribute_qual_variant): Remove assert.
8753
8754 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
8755
8756 * ipa-cp.c (determine_versionability): Fix comment typos.
8757
8758 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
8759
8760 PR c/84229
8761 * ipa-cp.c (determine_versionability): Do not version functions caling
8762 va_arg_pack.
8763
8764 2018-02-21 Martin Liska <mliska@suse.cz>
8765
8766 PR driver/83193
8767 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
8768 Add "native" as a possible value.
8769 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
8770 the macro when native cpu detection is available.
8771
8772 2018-02-21 Martin Liska <mliska@suse.cz>
8773
8774 PR driver/83193
8775 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
8776 Add "native" as a possible value.
8777 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
8778 when native cpu detection is available.
8779
8780 2018-02-21 Jakub Jelinek <jakub@redhat.com>
8781 Martin Sebor <msebor@redhat.com>
8782
8783 PR tree-optimization/84478
8784 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
8785 false.
8786 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
8787 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
8788 support which is conservatively correct, for 2 only stay conservative
8789 for maxlen. Formatting and comment capitalization fixes. Add STRICT
8790 argument to the 2 argument get_range_strlen, adjust 6 arg
8791 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
8792 false.
8793 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
8794 (gimple_fold_builtin_strlen): Pass true as last argument to
8795 get_range_strlen.
8796
8797 2018-02-20 Martin Sebor <msebor@redhat.com>
8798
8799 PR middle-end/84095
8800 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
8801 (builtin_memref::set_base_and_offset): Same. Handle inner references.
8802 (builtin_memref::builtin_memref): Factor out parts into
8803 set_base_and_offset and call it.
8804
8805 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
8806
8807 PR middle-end/84406
8808 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
8809 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
8810 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
8811 search at the associated MODE_INT.
8812
8813 2018-02-20 Jeff Law <law@redhat.com>
8814
8815 PR middle-end/82123
8816 PR tree-optimization/81592
8817 PR middle-end/79257
8818 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
8819 for range data rather than using global data.
8820 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
8821 range data rather than using global data.
8822 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
8823 pass it to children as needed.
8824 (struct directive::fmtresult): Similarly.
8825 (struct directive::set_width): Similarly.
8826 (struct directive::set_precision): Similarly.
8827 (format_integer, format_directive, parse_directive): Similarly.
8828 (format_none): Accept unnamed vr_values parameter.
8829 (format_percent, format_floating, format_character): Similarly.
8830 (format_string, format_plain): Similarly.
8831 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
8832 the EVRP range analyzer for range data rather than using global data.
8833 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
8834 gimple-ssa-evrp-analyze.h
8835 (class sprintf_dom_walker): Add after_dom_children member function.
8836 Add evrp_range_analyzer member.
8837 (sprintf_dom_walker::before_dom_children): Call into the EVRP
8838 range analyzer as needed.
8839 (sprintf_dom_walker::after_dom_children): New member function.
8840 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
8841 if not optimizing.
8842 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
8843 (evrp_range_analyzer::pop_to_marker): Likewise.
8844
8845 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
8846
8847 PR tree-optimization/84419
8848 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
8849 with the required type if its current type is compatible but
8850 different.
8851
8852 2018-02-20 Jakub Jelinek <jakub@redhat.com>
8853
8854 PR middle-end/82004
8855 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
8856 after vectorization.
8857
8858 2018-02-20 Martin Liska <mliska@suse.cz>
8859
8860 PR driver/83193
8861 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
8862 possible values if we don't have a hint.
8863
8864 2018-02-20 Martin Liska <mliska@suse.cz>
8865
8866 PR c/84310
8867 PR target/79747
8868 * final.c (shorten_branches): Build align_tab array with one
8869 more element.
8870 * opts.c (finish_options): Add alignment option limit check.
8871 (MAX_CODE_ALIGN): Likewise.
8872 (MAX_CODE_ALIGN_VALUE): Likewise.
8873 * doc/invoke.texi: Document maximum allowed option value for
8874 all -falign-* options.
8875
8876 2018-02-19 Jakub Jelinek <jakub@redhat.com>
8877
8878 PR target/84146
8879 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
8880 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
8881 * var-tracking.c (emit_note_insn_var_location): Remove all references
8882 to NOTE_INSN_CALL_ARG_LOCATION.
8883 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
8884 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
8885 Use copy_rtx_if_shared.
8886 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
8887 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
8888 (dwarf2out_var_location): Remove handling of
8889 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
8890 on call_insn.
8891 * final.c (final_scan_insn): Remove all references to
8892 NOTE_INSN_CALL_ARG_LOCATION.
8893 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
8894 before dumping final insns.
8895 * except.c (emit_note_eh_region_end): Remove all references to
8896 NOTE_INSN_CALL_ARG_LOCATION.
8897 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
8898 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
8899 * config/arc/arc.c (hwloop_optimize): Likewise.
8900 * config/arm/arm.c (create_fix_barrier): Likewise.
8901 * config/s390/s390.c (s390_chunkify_start): Likewise.
8902 * config/sh/sh.c (find_barrier): Likewise.
8903 * config/i386/i386.c (rest_of_insert_endbranch,
8904 ix86_seh_fixup_eh_fallthru): Likewise.
8905 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
8906 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
8907 * config/frv/frv.c (frv_function_prologue): Likewise.
8908 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
8909 reg note.
8910 (note_outside_basic_block_p): Remove all references to
8911 NOTE_INSN_CALL_ARG_LOCATION.
8912 * gengtype.c (adjust_field_rtx_def): Likewise.
8913 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
8914 Likewise.
8915 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
8916 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
8917
8918 PR c++/84444
8919 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
8920 is ADDR_EXPR.
8921
8922 PR tree-optimization/84452
8923 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
8924 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
8925 is NULL.
8926
8927 2018-02-19 Martin Liska <mliska@suse.cz>
8928
8929 PR sanitizer/82183
8930 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
8931
8932 2018-02-19 Martin Liska <mliska@suse.cz>
8933 Richard Sandiford <richard.sandiford@linaro.org>
8934
8935 PR tree-optimization/82491
8936 * gimple-fold.c (get_base_constructor): Make earlier bail out
8937 to prevent ubsan.
8938
8939 2018-02-19 Carl Love <cel@us.ibm.com>
8940
8941 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
8942 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
8943 BU_P8V_OVERLOAD_1.
8944 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
8945 P8V_BUILTIN_VEC_NEG.
8946
8947 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
8948
8949 * config/rl78/rl78.md (movdf): New define expand.
8950
8951 2018-02-19 Martin Liska <mliska@suse.cz>
8952
8953 PR other/80589
8954 * doc/invoke.texi: Fix typo.
8955 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
8956
8957 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
8958
8959 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
8960 handle rs6000_single_float and rs6000_double_float specially for
8961 e500 family CPUs.
8962
8963 2018-02-16 Jeff Law <law@redhat.com>
8964
8965 * config/rx/rx.c (add_pop_cfi_notes): New function.;
8966 (pop_regs): Use it.
8967
8968 2018-02-16 Jakub Jelinek <jakub@redhat.com>
8969
8970 PR ipa/84425
8971 * ipa-inline.c (inline_small_functions): Fix a typo.
8972
8973 2018-02-16 Nathan Sidwell <nathan@acm.org>
8974
8975 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
8976
8977 2018-02-16 Carl Love <cel@us.ibm.com>
8978
8979 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
8980 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
8981 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
8982 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
8983 expansion to P8V_BUILTIN_VEC_FLOAT2.
8984
8985 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
8986
8987 PR rtl-optimization/70023
8988 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
8989 src_regno into account.
8990
8991 2018-02-16 Carl Love <cel@us.ibm.com>
8992
8993 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
8994 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
8995 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
8996 * config/rs6000/rs6000.c: Remove case statements for
8997 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
8998 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
8999 and P9V_BUILTIN_VEC_VINSERT4B.
9000 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
9001 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
9002 * config/rs6000/vsx.md:
9003 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
9004 vec_insert4b.
9005
9006 2018-02-16 Carl Love <cel@us.ibm.com>
9007
9008 * config/rs6000/altivec.h: Add builtin names vec_extract4b
9009 vec_insert4b.
9010 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
9011 definitions.
9012 * config/rs6000/rs6000-c.c: Add the definitions for
9013 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
9014 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
9015 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
9016 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
9017 definition for insert4b and define insn *insert3b_internal.
9018 * doc/extend.texi: Add documentation for vec_extract4b.
9019
9020 2018-02-16 Nathan Sidwell <nathan@acm.org>
9021
9022 * doc/extend.texi (Backwards Compatibility): Mention friend
9023 injection. Note for-scope is deprecated.
9024 * doc/invoke.texi (-ffriend-injection): Deprecate.
9025
9026 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
9027
9028 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
9029 that moved to I2, also allow destinations that are a paradoxical
9030 subreg (instead of a normal reg).
9031
9032 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
9033
9034 PR target/83831
9035 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
9036 to QImode.
9037
9038 2018-02-16 Richard Biener <rguenther@suse.de>
9039
9040 PR tree-optimization/84037
9041 PR tree-optimization/84016
9042 PR target/82862
9043 * config/i386/i386.c (ix86_builtin_vectorization_cost):
9044 Adjust vec_construct for the fact we need additional higher latency
9045 128bit inserts for AVX256 and AVX512 vector builds.
9046 (ix86_add_stmt_cost): Scale vector construction cost for
9047 elementwise loads.
9048
9049 2018-02-16 Richard Biener <rguenther@suse.de>
9050
9051 PR tree-optimization/84417
9052 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
9053 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
9054 (non_rewritable_lvalue_p): Likewise, use poly-ints.
9055
9056 2018-02-16 Martin Liska <mliska@suse.cz>
9057
9058 PR sanitizer/84307
9059 * internal-fn.def (ASAN_CHECK): Set proper flags.
9060 (ASAN_MARK): Likewise.
9061
9062 2018-02-16 Julia Koval <julia.koval@intel.com>
9063
9064 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
9065 from PTA_CANNONLAKE.
9066
9067 2018-02-16 Jakub Jelinek <jakub@redhat.com>
9068
9069 PR target/84272
9070 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
9071 Use ++iter rather than iter++ for std::list iterators.
9072 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
9073 defer deleting them until all nodes in the forest are processed. Do
9074 free even leaf nodes. Change to_process into auto_vec.
9075
9076 PR bootstrap/84405
9077 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
9078 * vec.h (vec_default_construct): Use memset instead of placement new
9079 if BROKEN_VALUE_INITIALIZATION is defined.
9080 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
9081 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
9082 is defined.
9083
9084 PR rtl-optimization/83723
9085 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
9086 * lra.c (lra_substitute_pseudo): Likewise. If true, use
9087 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
9088 recursive calls.
9089 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
9090 callers.
9091 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
9092
9093 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
9094
9095 PR rtl-optimization/81443
9096 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
9097 from inner REGs to paradoxical SUBREGs.
9098
9099 2018-02-16 Richard Biener <rguenther@suse.de>
9100
9101 PR tree-optimization/84399
9102 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
9103 For operands we can analyze at their definition make sure we can
9104 analyze them at each use as well.
9105
9106 2018-02-16 Richard Biener <rguenther@suse.de>
9107
9108 PR tree-optimization/84190
9109 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
9110 volatile accesses if the decl isn't volatile.
9111
9112 2018-02-15 Jason Merrill <jason@redhat.com>
9113
9114 PR c++/84314 - ICE with templates and fastcall attribute.
9115 * attribs.c (build_type_attribute_qual_variant): Don't clobber
9116 TYPE_CANONICAL on an existing type.
9117
9118 2018-02-15 Jakub Jelinek <jakub@redhat.com>
9119
9120 PR tree-optimization/84383
9121 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
9122 dstoff nor call operand_equal_p if dstbase is NULL.
9123
9124 PR tree-optimization/84334
9125 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
9126 also a CONSTANT_CLASS_P, punt.
9127
9128 2018-02-14 Jim Wilson <jimw@sifive.com>
9129
9130 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
9131 first SMALL_OPERAND check. New local min_second_step. Move assert
9132 to where locals are set. Add TARGET_RVC support.
9133 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
9134
9135 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
9136
9137 * doc/invoke.texi: Correct -Wformat-overflow code sample.
9138
9139 2018-02-14 Martin Sebor <msebor@redhat.com>
9140
9141 PR tree-optimization/83698
9142 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
9143 arrays constrain the offset range to their bounds.
9144 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
9145 (builtin_access::overlap): Avoid setting the size of overlap if it's
9146 already been set.
9147 (maybe_diag_overlap): Also consider arrays when deciding what values
9148 of offsets to include in diagnostics.
9149
9150 2018-02-14 Martin Sebor <msebor@redhat.com>
9151
9152 PR c/84108
9153 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
9154 that correspond to the kind of a declaration.
9155
9156 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
9157
9158 PR target/83984
9159 * config/pa/pa.md: Load address of PIC label using the linkage table
9160 if the label is nonlocal.
9161
9162 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
9163
9164 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
9165 warning message if user requests -maltivec=be.
9166 * doc/invoke.texi: Document deprecation of -maltivec=be.
9167
9168 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
9169
9170 PR target/84220
9171 * config/rs6000/rs6000-c.c: Update definitions for
9172 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
9173 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
9174
9175 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
9176
9177 PR target/84239
9178 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
9179 add _get_ssp intrinsics. Remove argument from
9180 __builtin_ia32_rdssp[d|q].
9181 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
9182 * config/i386/i386-builtin.def: Remove argument from
9183 __builtin_ia32_rdssp[d|q].
9184 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
9185 ix86_expand_special_args_builtin for _rdssp[d|q].
9186 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
9187 Clear register before usage.
9188 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
9189 Add documentation for new _get_ssp and _inc_ssp intrinsics.
9190
9191 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
9192
9193 PR tree-optimization/84357
9194 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
9195 operand 1 of an ARRAY_REF too.
9196
9197 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
9198
9199 PR target/83831
9200 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
9201 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
9202 declarations.
9203 (set_of_reg): New struct.
9204 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
9205 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
9206 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
9207 functions.
9208 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
9209 Split into bitclr, bitset, bitinvert patterns if appropriate.
9210 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
9211 use rx_fuse_in_memory_bitop.
9212 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
9213 to named insn, correct maximum insn length.
9214
9215 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
9216
9217 PR target/79242
9218 * machmode.def: Define a complex mode for PARTIAL_INT.
9219 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
9220 MODE_PARTIAL_INT.
9221 * doc/rtl.texi: Document CSPImode.
9222 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
9223 handling.
9224 (msp430_hard_regno_nregs_with_padding): Likewise.
9225
9226 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
9227
9228 PR target/84279
9229 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
9230
9231 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
9232
9233 PR rtl-optimization/84169
9234 * combine.c (try_combine): New variable split_i2i3. Set it to true if
9235 we generated a parallel as new i3 and we split that to new i2 and i3
9236 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
9237 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
9238 those to i2, not i1. Partially rewrite this scan code.
9239
9240 2018-02-13 Jakub Jelinek <jakub@redhat.com>
9241
9242 PR c/82210
9243 * stor-layout.c (place_field): For variable length fields, adjust
9244 offset_align afterwards not just based on the field's alignment,
9245 but also on the size.
9246
9247 PR middle-end/84309
9248 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
9249 of exps and logs in the use_exp2 case.
9250
9251 2018-02-13 Jeff Law <law@redhat.com>
9252
9253 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
9254 entry for "vector".
9255
9256 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
9257 ARGS as unused.
9258
9259 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
9260
9261 PR debug/84342
9262 PR debug/84319
9263 * common.opt (gas-loc-support, gas-locview-support): New.
9264 (ginline-points, ginternal-reset-location-views): New.
9265 * doc/invoke.texi: Document them. Use @itemx where intended.
9266 (gvariable-location-views): Adjust.
9267 * target.def (reset_location_view): New.
9268 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
9269 (TARGET_RESET_LOCATION_VIEW): New.
9270 * doc/tm.texi: Rebuilt.
9271 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
9272 (dwarf2out_default_as_locview_support): New.
9273 (output_asm_line_debug_info): Use option variables.
9274 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
9275 (output_loc_list): Likewise.
9276 (add_high_low_attributes): Check option variables.
9277 Don't output entry view attribute in strict mode.
9278 (gen_inlined_subroutine_die): Check option variables.
9279 (dwarf2out_inline_entry): Likewise.
9280 (init_sections_and_labels): Likewise.
9281 (dwarf2out_early_finish): Likewise.
9282 (maybe_reset_location_view): New, from...
9283 (dwarf2out_var_location): ... here. Call it.
9284 * debug.h (dwarf2out_default_as_loc_support): Declare.
9285 (dwarf2out_default_as_locview_support): Declare.
9286 * hooks.c (hook_int_rtx_insn_0): New.
9287 * hooks.h (hook_int_rtx_insn_0): Declare.
9288 * toplev.c (process_options): Take -gas-loc-support and
9289 -gas-locview-support from dwarf2out. Enable
9290 -gvariable-location-views by default only with locview
9291 assembler support. Enable -ginternal-reset-location-views by
9292 default only if the target defines the corresponding hook.
9293 Enable -ginline-points by default if location views are
9294 enabled; force it disabled if statement frontiers are
9295 disabled.
9296 * tree-inline.c (expand_call_inline): Check option variables.
9297 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
9298
9299 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
9300
9301 PR tree-optimization/84321
9302 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
9303 handling. Also check whether the anti-range contains any values
9304 that satisfy the mask; switch to a VR_RANGE if not.
9305
9306 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
9307
9308 PR sanitizer/84340
9309 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
9310
9311 2018-02-13 Martin Jambor <mjambor@suse.cz>
9312
9313 PR c++/83990
9314 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
9315 of call statements, also set location of a load to a temporary.
9316
9317 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
9318
9319 * config/rl78/rl78.c (add_vector_labels): New function.
9320 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
9321 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
9322 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
9323 which checks that no arguments are passed.
9324 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
9325 * doc/extend.texi: Documentation for the new attribute.
9326
9327 2018-02-13 Andreas Schwab <schwab@suse.de>
9328
9329 * config/riscv/linux.h (CPP_SPEC): Define.
9330
9331 2018-02-13 Jakub Jelinek <jakub@redhat.com>
9332
9333 PR target/84335
9334 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
9335 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
9336 OPTION_MASK_ISA_AES as first argument to def_builtin_const
9337 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
9338 instead of OPTION_MASK_ISA_PCLMUL as first argument to
9339 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
9340 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
9341 temporarily for AES and PCLMUL builtins.
9342
9343 PR tree-optimization/84339
9344 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
9345 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
9346 Formatting fixes.
9347
9348 PR middle-end/84309
9349 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
9350 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
9351 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
9352 inline function.
9353 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
9354 inline function.
9355 * omp-simd-clone.h: New file.
9356 * omp-simd-clone.c: Include omp-simd-clone.h.
9357 (expand_simd_clones): No longer static.
9358 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
9359 cgraph.h and omp-simd-clone.h.
9360 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
9361 (vect_recog_widen_shift_pattern): Formatting fix.
9362 (vect_pattern_recog_1): Don't check optab for calls.
9363
9364 PR target/84336
9365 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
9366 operands[2] into a REG before using gen_lowpart on it.
9367
9368 2018-02-12 Jeff Law <law@redhat.com>
9369
9370 PR target/83760
9371 * config/sh/sh.c (find_barrier): Consider a sibling call
9372 a barrier as well.
9373
9374 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
9375 successfully back substituting a reg.
9376
9377 2018-02-12 Richard Biener <rguenther@suse.de>
9378
9379 PR tree-optimization/84037
9380 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
9381 parameter, move visited init to caller.
9382 (vect_slp_analyze_operations): Separate cost from validity
9383 check, initialize visited once for all instances.
9384 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
9385 for all instances.
9386 * tree-vect-stmts.c (vect_model_simple_cost): Make early
9387 out an assert.
9388 (vect_model_promotion_demotion_cost): Likewise.
9389 (vectorizable_bswap): Guard cost modeling with !slp_node
9390 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
9391 SLP stmts.
9392 (vectorizable_call): Likewise.
9393 (vectorizable_conversion): Likewise.
9394 (vectorizable_assignment): Likewise.
9395 (vectorizable_shift): Likewise.
9396 (vectorizable_operation): Likewise.
9397 (vectorizable_store): Likewise.
9398 (vectorizable_load): Likewise.
9399 (vectorizable_condition): Likewise.
9400 (vectorizable_comparison): Likewise.
9401
9402 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
9403
9404 PR sanitizer/84307
9405 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
9406 (ASAN_MARK): Fix fnspec to account for return value, change pointer
9407 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
9408
9409 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
9410
9411 PR middle-end/83665
9412 * params.def (inline-min-speedup): Increase from 8 to 15.
9413 (max-inline-insns-auto): Decrease from 40 to 30.
9414 * ipa-split.c (consider_split): Add some buffer for function to
9415 be considered inlining candidate.
9416 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
9417 default values.
9418
9419 2018-02-12 Richard Biener <rguenther@suse.de>
9420
9421 PR tree-optimization/84037
9422 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
9423 matched stmts if we cannot swap the non-matched ones.
9424
9425 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
9426
9427 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
9428 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
9429 _mm_maskz_scalef_round_ss): New intrinsics.
9430 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
9431 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
9432 __builtin_ia32_scalefss_round): Remove.
9433 (__builtin_ia32_scalefsd_mask_round,
9434 __builtin_ia32_scalefss_mask_round): New intrinsics.
9435 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
9436 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
9437 ((match_operand:VF_128 2 "<round_nimm_predicate>"
9438 "<round_constraint>")): Changed to ...
9439 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
9440 "<round_scalar_constraint>")): ... this.
9441 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
9442 %0, %1, %2<round_op3>}"): Changed to ...
9443 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
9444 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
9445 %2<round_scalar_mask_op3>}"): ... this.
9446 * config/i386/subst.md (round_scalar_nimm_predicate): New.
9447
9448 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
9449
9450 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
9451 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
9452 (_mm_maskz_sqrt_round_ss): New intrinsics.
9453 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
9454 (__builtin_ia32_sqrtsd_mask_round)
9455 (__builtin_ia32_sqrtss_mask_round): New builtins.
9456 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
9457 (__builtin_ia32_sqrtss_round): Remove.
9458 (__builtin_ia32_sqrtsd_mask_round)
9459 (__builtin_ia32_sqrtss_mask_round): New builtins.
9460 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
9461 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
9462 ((match_operand:VF_128 1 "vector_operand"
9463 "xBm,<round_constraint>")): Changed to ...
9464 ((match_operand:VF_128 1 "vector_operand"
9465 "xBm,<round_scalar_constraint>")): ... this.
9466 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
9467 %0, %2, %<iptr>1<round_op3>}): Changed to ...
9468 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
9469 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
9470 %<iptr>1<round_scalar_mask_op3>}): ... this.
9471 ((set_attr "prefix" "<round_prefix>")): Changed to ...
9472 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
9473
9474 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
9475
9476 PR target/84266
9477 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
9478 Cast vec_cmpeq result to correct type.
9479 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
9480 Cast vec_cmpgt result to correct type.
9481
9482 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
9483
9484 * final.c (final_scan_insn_1): Renamed from...
9485 (final_scan_insn): ... this. New wrapper, to recover
9486 seen from the outermost call in recursive ones.
9487 * config/sparc/sparc.c (output_return): Drop seen from call.
9488 (output_sibcall): Likewise.
9489 * config/visium/visium.c (output_branch): Likewise.
9490
9491 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
9492
9493 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
9494 function label.
9495
9496 2018-02-10 Alan Modra <amodra@gmail.com>
9497
9498 PR target/84300
9499 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
9500 Specify LR as an input.
9501
9502 2018-02-10 Jakub Jelinek <jakub@redhat.com>
9503
9504 PR sanitizer/83987
9505 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
9506 remove_member_access_dummy_vars): New functions.
9507 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
9508 lower_omp_1, execute_lower_omp): Use them.
9509
9510 PR rtl-optimization/84308
9511 * shrink-wrap.c (spread_components): Release todo vector.
9512
9513 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
9514
9515 PR rtl-optimization/57193
9516 * ira-color.c (struct allocno_color_data): Add member
9517 conflict_allocno_hard_prefs.
9518 (update_conflict_allocno_hard_prefs): New.
9519 (bucket_allocno_compare_func): Add a preference based on
9520 conflict_allocno_hard_prefs.
9521 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
9522 (color_allocnos): Remove a dead code. Initiate
9523 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
9524
9525 2018-02-09 Jakub Jelinek <jakub@redhat.com>
9526
9527 PR target/84226
9528 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
9529 constraint from =wa to wa. Avoid a subreg on the output operand,
9530 instead use a pseudo and subreg it in a move.
9531 (p9_xxbrd_<mode>): Changed to ...
9532 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
9533 (p9_xxbrd_v2df): New expander.
9534 (p9_xxbrw_<mode>): Changed to ...
9535 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
9536 (p9_xxbrw_v4sf): New expander.
9537
9538 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
9539
9540 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
9541
9542 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
9543
9544 PR target/83926
9545 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
9546 multiply in 32-bit mode.
9547 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
9548 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
9549 mode.
9550
9551 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
9552
9553 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
9554 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
9555 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
9556 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
9557
9558 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
9559
9560 PR lto/84213
9561 * dwarf2out.c (is_trivial_indirect_ref): New function.
9562 (dwarf2out_late_global_decl): Do not generate a location
9563 attribute for variables that have a non-trivial DECL_VALUE_EXPR
9564 and that are not defined in the current unit.
9565
9566 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
9567
9568 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
9569 instead of a libcall for UNORDERED.
9570
9571 2018-02-09 Tamar Christina <tamar.christina@arm.com>
9572
9573 PR target/82641
9574 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
9575 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
9576
9577 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9578
9579 PR target/PR84295
9580 * config/s390/s390.c (s390_set_current_function): Invoke
9581 s390_indirect_branch_settings also if fndecl didn't change.
9582
9583 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
9584
9585 * config/rs6000/rs6000.md (blockage): Set length to zero.
9586
9587 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
9588
9589 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
9590
9591 2018-02-09 Jakub Jelinek <jakub@redhat.com>
9592
9593 PR sanitizer/84285
9594 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
9595 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
9596 -static-lib*san.
9597
9598 PR debug/84252
9599 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
9600 PARALLEL incoming that failed vt_get_decl_and_offset check.
9601
9602 PR middle-end/84237
9603 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
9604 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
9605 TREE_READONLY bit.
9606 (get_variable_section): For decls in named .bss* sections pass true as
9607 second argument to bss_initializer_p.
9608
9609 2018-02-09 Marek Polacek <polacek@redhat.com>
9610 Jakub Jelinek <jakub@redhat.com>
9611
9612 PR c++/83659
9613 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
9614 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
9615 Sync some changes from cxx_fold_indirect_ref.
9616
9617 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
9618
9619 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
9620 markers.
9621 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
9622 (BLOCK_INLINE_ENTRY_LABEL): New.
9623 (dwarf2out_var_location): Disregard inline entry markers.
9624 (inline_entry_data): New struct.
9625 (inline_entry_data_hasher): New hashtable type.
9626 (inline_entry_data_hasher::hash): New.
9627 (inline_entry_data_hasher::equal): New.
9628 (inline_entry_data_table): New variable.
9629 (add_high_low_attributes): Add DW_AT_entry_pc and
9630 DW_AT_GNU_entry_view attributes if a pending entry is found
9631 in inline_entry_data_table. Add old entry_pc attribute only
9632 if debug nonbinding markers are disabled.
9633 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
9634 markers are enabled.
9635 (block_within_block_p, dwarf2out_inline_entry): New.
9636 (dwarf2out_finish): Check that no entries remained in
9637 inline_entry_data_table.
9638 * final.c (reemit_insn_block_notes): Handle inline entry notes.
9639 (final_scan_insn, notice_source_line): Likewise.
9640 (rest_of_clean_state): Skip inline entry markers.
9641 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
9642 markers.
9643 * gimple.c (gimple_build_debug_inline_entry): New.
9644 * gimple.h (enum gimple_debug_subcode): Add
9645 GIMPLE_DEBUG_INLINE_ENTRY.
9646 (gimple_build_debug_inline_entry): Declare.
9647 (gimple_debug_inline_entry_p): New.
9648 (gimple_debug_nonbind_marker_p): Adjust.
9649 * insn-notes.def (INLINE_ENTRY): New.
9650 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
9651 inline entry marker notes.
9652 (print_insn): Likewise.
9653 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
9654 (INSN_DEBUG_MARKER_KIND): Likewise.
9655 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
9656 * tree-inline.c (expand_call_inline): Build and insert
9657 debug_inline_entry stmt.
9658 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
9659 inline entry blocks early, if nonbind markers are enabled.
9660 (dump_scope_block): Dump fragment info.
9661 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
9662 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
9663 (gimple_build_debug_inline_entry): New.
9664 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
9665 Enable/disable inline entry points too.
9666 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
9667 (DEBUG_INSN): Describe inline entry markers.
9668
9669 * common.opt (gvariable-location-views): New.
9670 (gvariable-location-views=incompat5): New.
9671 * config.in: Rebuilt.
9672 * configure: Rebuilt.
9673 * configure.ac: Test assembler for view support.
9674 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
9675 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
9676 * dwarf2out.c (var_loc_view): New typedef.
9677 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
9678 (dwarf2out_locviews_in_attribute): New.
9679 (dwarf2out_locviews_in_loclist): New.
9680 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
9681 (enum dw_line_info_opcode): Add LI_adv_address.
9682 (struct dw_line_info_table): Add view.
9683 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
9684 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
9685 (zero_view_p): New variable.
9686 (ZERO_VIEW_P): New macro.
9687 (output_asm_line_debug_info): New.
9688 (struct var_loc_node): Add view.
9689 (add_AT_view_list, AT_loc_list): New.
9690 (add_var_loc_to_decl): Add view param. Test it against last.
9691 (new_loc_list): Add view params. Record them.
9692 (AT_loc_list_ptr): Handle loc and view lists.
9693 (view_list_to_loc_list_val_node): New.
9694 (print_dw_val): Handle dw_val_class_view_list.
9695 (size_of_die): Likewise.
9696 (value_format): Likewise.
9697 (loc_list_has_views): New.
9698 (gen_llsym): Set vl_symbol too.
9699 (maybe_gen_llsym, skip_loc_list_entry): New.
9700 (dwarf2out_maybe_output_loclist_view_pair): New.
9701 (output_loc_list): Output view list or entries too.
9702 (output_view_list_offset): New.
9703 (output_die): Handle dw_val_class_view_list.
9704 (output_dwarf_version): New.
9705 (output_compilation_unit_header): Use it.
9706 (output_skeleton_debug_sections): Likewise.
9707 (output_rnglists, output_line_info): Likewise.
9708 (output_pubnames, output_aranges): Update version comments.
9709 (output_one_line_info_table): Output view numbers in asm comments.
9710 (dw_loc_list): Determine current endview, pass it to new_loc_list.
9711 Call maybe_gen_llsym.
9712 (loc_list_from_tree_1): Adjust.
9713 (add_AT_location_description): Create view list attribute if
9714 needed, check it's absent otherwise.
9715 (convert_cfa_to_fb_loc_list): Adjust.
9716 (maybe_emit_file): Call output_asm_line_debug_info for test.
9717 (dwarf2out_var_location): Reset views as needed. Precompute
9718 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
9719 attribute. Set view.
9720 (new_line_info_table): Reset next view.
9721 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
9722 (dwarf2out_source_line): Likewise. Output view resets and labels to
9723 the assembler, or select appropriate line info opcodes.
9724 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
9725 (optimize_string_length): Catch it. Adjust.
9726 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
9727 dw_val_class_view_list, and remove it if no longer needed.
9728 (hash_loc_list): Hash view numbers.
9729 (loc_list_hasher::equal): Compare them.
9730 (optimize_location_lists): Check whether a view list symbol is
9731 needed, and whether the locview attribute is present, and
9732 whether they match. Remove the locview attribute if no longer
9733 needed.
9734 (index_location_lists): Call skip_loc_list_entry for test.
9735 (dwarf2out_finish): Call output_asm_line_debug_info for test.
9736 Use output_dwarf_version.
9737 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
9738 (struct dw_val_node): Add val_view_list.
9739 * final.c (SEEN_NEXT_VIEW): New.
9740 (set_next_view_needed): New.
9741 (clear_next_view_needed): New.
9742 (maybe_output_next_view): New.
9743 (final_start_function): Rename to...
9744 (final_start_function_1): ... this. Take pointer to FIRST,
9745 add SEEN parameter. Emit param bindings in the initial view.
9746 (final_start_function): Reintroduce SEEN-less interface.
9747 (final): Rename to...
9748 (final_1): ... this. Take SEEN parameter. Output final pending
9749 next view at the end.
9750 (final): Reintroduce seen-less interface.
9751 (final_scan_insn): Output pending next view before switching
9752 sections or ending a block. Mark the next view as needed when
9753 outputting variable locations. Notify debug backend of section
9754 changes, and of location view changes.
9755 (rest_of_handle_final): Adjust.
9756 * toplev.c (process_options): Autodetect value for debug variable
9757 location views option. Warn on incompat5 without -gdwarf-5.
9758 * doc/invoke.texi (gvariable-location-views): New.
9759 (gvariable-location-views=incompat5): New.
9760 (gno-variable-location-views): New.
9761
9762 2018-02-08 David Malcolm <dmalcolm@redhat.com>
9763
9764 PR tree-optimization/84136
9765 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
9766 that the result of find_edge is non-NULL.
9767
9768 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
9769
9770 PR target/83008
9771 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
9772 storing integer register in SImode. Fix cost of 256 and 512
9773 byte aligned SSE register store.
9774
9775 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
9776
9777 * config/i386/i386.c (ix86_multiplication_cost): Fix
9778 multiplication cost for TARGET_AVX512DQ.
9779
9780 2018-02-08 Marek Polacek <polacek@redhat.com>
9781
9782 PR tree-optimization/84238
9783 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
9784 get_range_strlen.
9785
9786 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
9787
9788 PR tree-optimization/84265
9789 * tree-vect-stmts.c (vectorizable_store): Don't treat
9790 VMAT_CONTIGUOUS accesses as grouped.
9791 (vectorizable_load): Likewise.
9792
9793 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
9794
9795 PR tree-optimization/81635
9796 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
9797 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
9798 (test_round_for_mask): New functions.
9799 (wide_int_cc_tests): Call test_round_for_mask.
9800 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
9801 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
9802 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
9803 range returned by get_range_info.
9804
9805 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
9806
9807 PR ipa/81360
9808 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
9809 * symtab.c: Include builtins.h
9810 (symtab_node::output_to_lto_symbol_table_p): Move here
9811 from lto-streamer-out.c:output_symbol_p.
9812 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
9813 (output_symbol_p): Move all logic to symtab.c
9814 (produce_symtab): Update.
9815
9816 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9817
9818 * config/s390/s390-opts.h (enum indirect_branch): Define.
9819 * config/s390/s390-protos.h (s390_return_addr_from_memory)
9820 (s390_indirect_branch_via_thunk)
9821 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
9822 (enum s390_indirect_branch_type): Define.
9823 * config/s390/s390.c (struct s390_frame_layout, struct
9824 machine_function): Remove.
9825 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
9826 (indirect_branch_table_label_no, indirect_branch_table_name):
9827 Define variables.
9828 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
9829 (enum s390_indirect_branch_option): Define.
9830 (s390_return_addr_from_memory): New function.
9831 (s390_handle_string_attribute): New function.
9832 (s390_attribute_table): Add new attribute handler.
9833 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
9834 (s390_indirect_branch_via_thunk): New function.
9835 (s390_indirect_branch_via_inline_thunk): New function.
9836 (s390_function_ok_for_sibcall): When jumping via thunk disallow
9837 sibling call optimization for non z10 compiles.
9838 (s390_emit_call): Force indirect branch target to be a single
9839 register. Add r1 clobber for non-z10 compiles.
9840 (s390_emit_epilogue): Emit return jump via return_use expander.
9841 (s390_reorg): Handle JUMP_INSNs as execute targets.
9842 (s390_option_override_internal): Perform validity checks for the
9843 new command line options.
9844 (s390_indirect_branch_attrvalue): New function.
9845 (s390_indirect_branch_settings): New function.
9846 (s390_set_current_function): Invoke s390_indirect_branch_settings.
9847 (s390_output_indirect_thunk_function): New function.
9848 (s390_code_end): Implement target hook.
9849 (s390_case_values_threshold): Implement target hook.
9850 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
9851 macros.
9852 * config/s390/s390.h (struct s390_frame_layout)
9853 (struct machine_function): Move here from s390.c.
9854 (TARGET_INDIRECT_BRANCH_NOBP_RET)
9855 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
9856 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
9857 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
9858 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
9859 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
9860 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
9861 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
9862 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
9863 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
9864 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
9865 (mnemonic attribute): Add values which aren't recognized
9866 automatically.
9867 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
9868 pattern for branch conversion. Fix mnemonic attribute.
9869 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
9870 indirect branch via thunk if requested.
9871 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
9872 ("*indirect_jump"): Disable for branch conversion using out of
9873 line thunks.
9874 ("indirect_jump_via_thunk<mode>_z10")
9875 ("indirect_jump_via_thunk<mode>")
9876 ("indirect_jump_via_inlinethunk<mode>_z10")
9877 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
9878 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
9879 ("casesi_jump_via_inlinethunk<mode>_z10")
9880 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
9881 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
9882 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
9883 ("*indirect2_jump"): Disable for branch conversion.
9884 ("casesi_jump"): Turn into expander and expand patterns for branch
9885 conversion.
9886 ("return_use"): New expander.
9887 ("*return"): Emit return via thunk and rename it to ...
9888 ("*return<mode>"): ... this one.
9889 * config/s390/s390.opt: Add new options and and enum for the
9890 option values.
9891
9892 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
9893
9894 * lra-constraints.c (match_reload): Unconditionally use
9895 gen_lowpart_SUBREG, rather than selecting between that
9896 and equivalent gen_rtx_SUBREG code.
9897
9898 2018-02-08 Richard Biener <rguenther@suse.de>
9899
9900 PR tree-optimization/84233
9901 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
9902 changed flag instead of boguously re-using phi_inserted.
9903
9904 2018-02-08 Martin Jambor <mjambor@suse.cz>
9905
9906 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
9907 static local variables.
9908
9909 2018-02-08 Richard Biener <rguenther@suse.de>
9910
9911 PR tree-optimization/84278
9912 * tree-vect-stmts.c (vectorizable_store): When looking for
9913 smaller vector types to perform grouped strided loads/stores
9914 make sure the mode is supported by the target.
9915 (vectorizable_load): Likewise.
9916
9917 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
9918
9919 * config/aarch64/aarch64.c (aarch64_components_for_bb):
9920 Increase LDP/STP opportunities by adding adjacent callee-saves.
9921
9922 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
9923
9924 PR rtl-optimization/84068
9925 PR rtl-optimization/83459
9926 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
9927
9928 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
9929
9930 PR tree-optimization/84224
9931 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
9932 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
9933 non-zero arguments.
9934
9935 2018-02-07 Iain Sandoe <iain@codesourcery.com>
9936
9937 PR target/84113
9938 * config/rs6000/altivec.md (*restore_world): Remove LR use.
9939 * config/rs6000/predicates.md (restore_world_operation): Adjust op
9940 count, remove one USE.
9941
9942 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
9943
9944 * doc/install.texi (Configuration): Document the
9945 --with-long-double-format={ibm,ieee} PowerPC configuration
9946 options.
9947
9948 PR target/84154
9949 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
9950 Convert from define_expand to be define_insn_and_split. Rework
9951 float/double/_Float128 conversions to QI/HI/SImode to work with
9952 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
9953 conversions to QI/HImode types did a store and then a load to
9954 truncate the value. For conversions to VSX registers, don't split
9955 the insn, instead emit the code directly. Use the code iterator
9956 any_fix to combine signed and unsigned conversions.
9957 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
9958 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
9959 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
9960 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
9961 (fix_<mode>di2_hw): Likewise.
9962 (fixuns_<mode>di2_hw): Likewise.
9963 (fix_<mode>si2_hw): Likewise.
9964 (fixuns_<mode>si2_hw): Likewise.
9965 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
9966 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
9967 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
9968 fix<uns>_trunc<SFDF:mode>si2_p8.
9969 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
9970 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
9971 (fix<uns>_<mode>_mem): Likewise.
9972 (fctiw<u>z_<mode>_mem): Likewise.
9973 (fix<uns>_<mode>_mem): Likewise.
9974 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
9975 the register allocator from doing a direct move to the GPRs to do
9976 a store, and instead use the ISA 3.0 store byte/half-word from
9977 vector register instruction. For IEEE 128-bit floating point,
9978 also optimize stores of 32-bit ints.
9979 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
9980
9981 2018-02-07 Alan Hayward <alan.hayward@arm.com>
9982
9983 * genextract.c (push_pathstr_operand): New function to support
9984 [a-zA-Z].
9985 (walk_rtx): Call push_pathstr_operand.
9986 (print_path): Support [a-zA-Z].
9987
9988 2018-02-07 Richard Biener <rguenther@suse.de>
9989
9990 PR tree-optimization/84037
9991 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
9992 (cse_and_gimplify_to_preheader): Declare.
9993 (vect_get_place_in_interleaving_chain): Likewise.
9994 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9995 ivexpr_map.
9996 (_loop_vec_info::~_loop_vec_info): Delete it.
9997 (cse_and_gimplify_to_preheader): New function.
9998 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
9999 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
10000 (vectorizable_load): Likewise. For grouped stores always base
10001 the IV on the first element.
10002 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
10003 condition before gimplifying.
10004
10005 2018-02-07 Jakub Jelinek <jakub@redhat.com>
10006
10007 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
10008 *DIV_EXPR and *MOD_EXPR.
10009
10010 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
10011
10012 PR target/84248
10013 * config/i386/i386.c (ix86_option_override_internal): Mask out
10014 the CF_SET bit when checking -fcf-protection.
10015
10016 2018-02-07 Tom de Vries <tom@codesourcery.com>
10017
10018 PR libgomp/84217
10019 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
10020 enough.
10021
10022 2018-02-07 Richard Biener <rguenther@suse.de>
10023
10024 PR tree-optimization/84204
10025 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
10026 this place.
10027
10028 PR tree-optimization/84205
10029 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
10030 special-case isl_ast_op_zdiv_r.
10031
10032 PR tree-optimization/84223
10033 * graphite-scop-detection.c (gather_bbs::before_dom_children):
10034 Only add conditions from within the region.
10035 (gather_bbs::after_dom_children): Adjust.
10036
10037 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
10038
10039 PR target/84209
10040 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
10041 * config/avr/avr.md: Only post-reload split REG-REG moves if
10042 either register is GENERAL_REG_P.
10043
10044 2018-02-07 Jakub Jelinek <jakub@redhat.com>
10045
10046 PR tree-optimization/84235
10047 * tree-ssa-scopedtables.c
10048 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
10049 if the subtraction is performed in floating point type where NaNs are
10050 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
10051 build 1. Formatting fix.
10052
10053 2018-02-06 Jakub Jelinek <jakub@redhat.com>
10054
10055 PR target/84146
10056 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
10057 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
10058 and skip it regardless of bb boundaries. Use CALL_P macro,
10059 don't test INSN_P (insn) together with CALL_P or JUMP_P check
10060 unnecessarily, formatting fix.
10061
10062 2018-02-06 Michael Collison <michael.collison@arm.com>
10063
10064 * config/arm/thumb2.md:
10065 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
10066 (*thumb_mov_notscc): Ditto.
10067
10068 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
10069
10070 PR target/84154
10071 * config/rs6000/rs6000.md (su code attribute): Use "u" for
10072 unsigned_fix, not "s".
10073
10074 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10075
10076 * configure.ac (gcc_fn_eh_frame_ro): New function.
10077 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
10078 correct .eh_frame permissions.
10079 * configure: Regenerate.
10080
10081 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
10082
10083 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
10084 irrelevant options.
10085
10086 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10087
10088 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10089 Display warning message for -mno-speculate-indirect-jumps.
10090
10091 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
10092
10093 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
10094 Undocumented.
10095 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
10096
10097 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
10098
10099 PR tree-optimization/84225
10100 * tree-eh.c (find_trapping_overflow): Only call
10101 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
10102
10103 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
10104
10105 PR target/84145
10106 * config/i386/i386.c: Reimplement the check of possible options
10107 -mibt/-mshstk conbination. Change error messages.
10108 * doc/invoke.texi: Fix a typo: remove extra '='.
10109
10110 2018-02-06 Marek Polacek <polacek@redhat.com>
10111
10112 PR tree-optimization/84228
10113 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
10114
10115 2018-02-06 Tamar Christina <tamar.christina@arm.com>
10116
10117 PR target/82641
10118 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
10119 emitted arch directives.
10120 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
10121 __ARM_FEATURE_COPROC before changing architectures.
10122
10123 2018-02-06 Richard Biener <rguenther@suse.de>
10124
10125 * config/i386/i386.c (print_reg): Fix typo.
10126 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
10127
10128 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
10129
10130 * configure: Regenerate.
10131
10132 2018-02-05 Martin Sebor <msebor@redhat.com>
10133
10134 PR tree-optimization/83369
10135 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
10136 inlining context.
10137
10138 2018-02-05 Martin Liska <mliska@suse.cz>
10139
10140 * doc/invoke.texi: Cherry-pick upstream r323995.
10141
10142 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
10143
10144 * ira.c (ira_init_register_move_cost): Adjust comment.
10145
10146 2018-02-05 Martin Liska <mliska@suse.cz>
10147
10148 PR gcov-profile/84137
10149 * doc/gcov.texi: Fix typo in documentation.
10150
10151 2018-02-05 Martin Liska <mliska@suse.cz>
10152
10153 PR gcov-profile/83879
10154 * doc/gcov.texi: Document necessity of --dynamic-list-data when
10155 using dlopen functionality.
10156
10157 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
10158
10159 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
10160 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
10161 _mm_maskz_range_ss, _mm_mask_range_round_ss,
10162 _mm_maskz_range_round_ss): New intrinsics.
10163 (__builtin_ia32_rangesd128_round)
10164 (__builtin_ia32_rangess128_round): Remove.
10165 (__builtin_ia32_rangesd128_mask_round,
10166 __builtin_ia32_rangess128_mask_round): New builtins.
10167 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
10168 __builtin_ia32_rangess128_round): Remove.
10169 (__builtin_ia32_rangesd128_mask_round,
10170 __builtin_ia32_rangess128_mask_round): New builtins.
10171 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
10172 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
10173 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
10174 "<round_saeonly_constraint>")): Changed to ...
10175 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
10176 "<round_saeonly_scalar_constraint>")): ... this.
10177 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
10178 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
10179 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
10180 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
10181 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
10182
10183 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
10184
10185 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
10186 options.
10187 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
10188 Remove all values except native, 8540 and 8548.
10189
10190 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
10191
10192 * config/i386/i386.c (ix86_output_function_return): Pass
10193 INVALID_REGNUM, instead of -1, as invalid register number to
10194 indirect_thunk_name and output_indirect_thunk.
10195
10196 2018-02-02 Julia Koval <julia.koval@intel.com>
10197
10198 * config.gcc: Add -march=icelake.
10199 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
10200 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
10201 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
10202 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
10203 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
10204 (processor_target_table): Add icelake.
10205 (ix86_option_override_internal): Handle new PTAs.
10206 (get_builtin_code_for_version): Handle icelake.
10207 (M_INTEL_COREI7_ICELAKE): New.
10208 (fold_builtin_cpu): Handle icelake.
10209 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
10210 * doc/invoke.texi: Add -march=icelake.
10211
10212 2018-02-02 Julia Koval <julia.koval@intel.com>
10213
10214 * config/i386/i386.c (ix86_option_override_internal): Change flags type
10215 to wide_int_bitmask.
10216 * wide-int-bitmask.h: New.
10217
10218 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
10219
10220 PR target/84066
10221 * config/i386/i386.md: Replace Pmode with word_mode in
10222 builtin_setjmp_setup and builtin_longjmp to support x32.
10223
10224 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
10225
10226 PR target/56010
10227 PR target/83743
10228 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
10229 #include "opts.h".
10230 (rs6000_supported_cpu_names): New static variable.
10231 (linux_cpu_translation_table): Likewise.
10232 (elf_platform) <cpu>: Define new static variable and use it.
10233 Translate kernel AT_PLATFORM name to canonical name if needed.
10234 Error if platform name is unknown.
10235
10236 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
10237
10238 PR target/84089
10239 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
10240
10241 2018-02-01 Jeff Law <law@redhat.com>
10242
10243 PR target/84128
10244 * config/i386/i386.c (release_scratch_register_on_entry): Add new
10245 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
10246 the scratch if RELEASE_VIA_POP is false.
10247 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
10248 If we have to save a temporary register, decrement SIZE appropriately.
10249 Pass new arguments to release_scratch_register_on_entry.
10250 (ix86_adjust_stack_and_probe): Likewise.
10251 (ix86_emit_probe_stack_range): Pass new arguments to
10252 release_scratch_register_on_entry.
10253
10254 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
10255
10256 PR rtl-optimization/84157
10257 * combine.c (change_zero_ext): Use REG_P predicate in
10258 front of HARD_REGISTER_P predicate.
10259
10260 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
10261
10262 * config/avr/avr.c (avr_option_override): Move disabling of
10263 -fdelete-null-pointer-checks to...
10264 * common/config/avr/avr-common.c (avr_option_optimization_table):
10265 ...here.
10266
10267 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10268
10269 PR tree-optimization/81635
10270 * tree-data-ref.c (split_constant_offset_1): For types that
10271 wrap on overflow, try to use range info to prove that wrapping
10272 cannot occur.
10273
10274 2018-02-01 Renlin Li <renlin.li@arm.com>
10275
10276 PR target/83370
10277 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
10278 TAILCALL_ADDR_REGS.
10279 (aarch64_register_move_cost): Likewise.
10280 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
10281 TAILCALL_ADDR_REGS.
10282 (REG_CLASS_NAMES): Likewise.
10283 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
10284 TAILCALL_ADDR_REGS. Remove IP registers.
10285 * config/aarch64/aarch64.md (Ucs): Update register constraint.
10286
10287 2018-02-01 Richard Biener <rguenther@suse.de>
10288
10289 * domwalk.h (dom_walker::dom_walker): Add additional constructor
10290 for specifying RPO order and allow NULL for that.
10291 * domwalk.c (dom_walker::dom_walker): Likewise.
10292 (dom_walker::walk): Handle NULL RPO order.
10293 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
10294 in RPO order.
10295 (rewrite_update_dom_walker): Likewise.
10296 (mark_def_dom_walker): Likewise.
10297
10298 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10299
10300 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
10301 (aarch64_maybe_expand_sve_subreg_move): Declare.
10302 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
10303 * config/aarch64/predicates.md (aarch64_any_register_operand): New
10304 predicate.
10305 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
10306 that are semantically a reverse operation.
10307 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
10308 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
10309 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
10310 functions.
10311 (aarch64_can_change_mode_class): For big-endian, forbid changes
10312 between two SVE modes if they have different element sizes.
10313
10314 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10315
10316 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
10317 the TImode handling for big-endian targets.
10318
10319 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10320
10321 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
10322 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
10323 not just bytes.
10324 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
10325 Remove BSWAP handing for big-endian targets and use the form of
10326 LD1RQ appropariate for the mode.
10327
10328 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10329
10330 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
10331 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
10332 duplicated element.
10333
10334 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10335
10336 PR tearget/83845
10337 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
10338 check for operands that need to go through aarch64_sve_reload_be.
10339
10340 2018-02-01 Jakub Jelinek <jakub@redhat.com>
10341
10342 PR tree-optimization/81661
10343 PR tree-optimization/84117
10344 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
10345 * tree-eh.c: Include gimplify.h.
10346 (find_trapping_overflow, replace_trapping_overflow,
10347 rewrite_to_non_trapping_overflow): New functions.
10348 * tree-vect-loop.c: Include tree-eh.h.
10349 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
10350 * tree-data-ref.c: Include tree-eh.h.
10351 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
10352
10353 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
10354
10355 PR rtl-optimization/84123
10356 * combine.c (change_zero_ext): Check if hard register satisfies
10357 can_change_dest_mode before calling gen_lowpart_SUBREG.
10358
10359 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
10360
10361 PR target/82444
10362 * ira.c (ira_init_register_move_cost): Remove assert.
10363
10364 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
10365
10366 PR rtl-optimization/84071
10367 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
10368 * doc/tm.texi: Regenerate.
10369
10370 2018-01-31 Richard Biener <rguenther@suse.de>
10371
10372 PR tree-optimization/84132
10373 * tree-data-ref.c (analyze_miv_subscript): Properly
10374 check whether evolution_function_is_affine_multivariate_p
10375 before calling gcd_of_steps_may_divide_p.
10376
10377 2018-01-31 Julia Koval <julia.koval@intel.com>
10378
10379 PR target/83618
10380 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
10381 * config/i386/i386.md (rdpid_rex64) New.
10382 (rdpid): Make 32bit only.
10383
10384 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
10385
10386 PR lto/84105
10387 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
10388 an IDENTIFIER_NODE for FUNCTION_TYPE's.
10389
10390 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
10391
10392 Revert
10393 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
10394
10395 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
10396
10397 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
10398
10399 PR rtl-optimization/84071
10400 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
10401 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
10402
10403 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
10404
10405 * config/arc/arc.c (arc_handle_aux_attribute): New function.
10406 (arc_attribute_table): Add 'aux' attribute.
10407 (arc_in_small_data_p): Consider aux like variables.
10408 (arc_is_aux_reg_p): New function.
10409 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
10410 (arc_get_aux_arg): New function.
10411 (prepare_move_operands): Handle aux-register access.
10412 (arc_handle_aux_attribute): New function.
10413 * doc/extend.texi (ARC Variable attributes): Add subsection.
10414
10415 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
10416
10417 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
10418 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
10419 (arc_attribute_table): Add 'uncached' attribute.
10420 (arc_print_operand): Print '.di' flag for uncached memory
10421 accesses.
10422 (arc_in_small_data_p): Do not consider for small data the uncached
10423 types.
10424 (arc_is_uncached_mem_p): New function.
10425 * config/arc/predicates.md (compact_store_memory_operand): Check
10426 for uncached memory accesses.
10427 (nonvol_nonimm_operand): Likewise.
10428 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
10429
10430 2018-01-31 Jakub Jelinek <jakub@redhat.com>
10431
10432 PR c/84100
10433 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
10434 falign-loops=): Add Optimization flag.
10435
10436 2018-01-30 Jeff Law <law@redhat.com>
10437
10438 PR target/84064
10439 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
10440 INT_REGISTERS_SAVED. Check it prior to calling
10441 get_scratch_register_on_entry.
10442 (ix86_adjust_stack_and_probe): Similarly.
10443 (ix86_emit_probe_stack_range): Similarly.
10444 (ix86_expand_prologue): Corresponding changes.
10445
10446 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10447
10448 PR target/40411
10449 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
10450 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
10451
10452 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
10453
10454 PR target/84112
10455 * lra-constraints.c (curr_insn_transform): Process AND in the
10456 address.
10457
10458 2018-01-30 Jakub Jelinek <jakub@redhat.com>
10459
10460 PR rtl-optimization/83986
10461 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
10462 dependence against last_pending_memory_flush in addition to
10463 pending_jump_insns.
10464
10465 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
10466
10467 PR tree-optimization/81611
10468 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
10469 copies.
10470
10471 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10472
10473 PR target/83758
10474 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
10475 a reg rtx.
10476
10477 2018-01-30 Richard Biener <rguenther@suse.de>
10478 Jakub Jelinek <jakub@redhat.com>
10479
10480 PR tree-optimization/84111
10481 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
10482 inner loops added during recursion, as they don't have up-to-date
10483 SSA form.
10484
10485 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
10486
10487 PR ipa/81360
10488 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
10489 (can_inline_edge_by_limits_p): ... here.
10490 (can_early_inline_edge_p, check_callers,
10491 update_caller_keys, update_callee_keys, recursive_inlining,
10492 add_new_edges_to_heap, speculation_useful_p,
10493 inline_small_functions,
10494 inline_small_functions, flatten_function,
10495 inline_to_all_callers_1): Update.
10496
10497 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
10498
10499 * profile-count.c (profile_count::combine_with_ipa_count): Handle
10500 zeros correctly.
10501
10502 2018-01-30 Richard Biener <rguenther@suse.de>
10503
10504 PR tree-optimization/83008
10505 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
10506 invariant and constant vector uses in stmts when they need
10507 more than one stmt.
10508
10509 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10510
10511 PR bootstrap/84017
10512 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
10513 * configure: Regenerate.
10514
10515 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
10516
10517 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
10518 pattern.
10519 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
10520 Use gen_rtx_REG rather than gen_lowpart.
10521
10522 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
10523
10524 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
10525 rather than 0 when creating partial subregs.
10526
10527 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
10528
10529 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
10530 of usage.
10531
10532 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
10533
10534 PR target/81550
10535 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
10536 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
10537 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
10538 flags. This restores the settings used before the 2017-07-24.
10539 Turning off pre increment/decrement/modify allows IVOPTS to
10540 optimize DF/SF loops where the index is an int.
10541
10542 2018-01-29 Richard Biener <rguenther@suse.de>
10543 Kelvin Nilsen <kelvin@gcc.gnu.org>
10544
10545 PR bootstrap/80867
10546 * tree-vect-stmts.c (vectorizable_call): Don't call
10547 targetm.vectorize_builtin_md_vectorized_function if callee is
10548 NULL.
10549
10550 2018-01-22 Carl Love <cel@us.ibm.com>
10551
10552 * doc/extend.tex: Fix typo in second arg in
10553 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
10554
10555 2018-01-29 Richard Biener <rguenther@suse.de>
10556
10557 PR tree-optimization/84086
10558 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
10559 (flush_ssaname_freelist): When SSA names were released reset
10560 the SCEV hash table.
10561
10562 2018-01-29 Richard Biener <rguenther@suse.de>
10563
10564 PR tree-optimization/84057
10565 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
10566 removed paths when removing edges.
10567
10568 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
10569
10570 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
10571 -mfunction-return=@var{choice}.
10572
10573 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
10574
10575 PR diagnostic/84034
10576 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
10577 Handle CR like TAB.
10578 (layout::print_source_line): Likewise.
10579 (test_get_line_width_without_trailing_whitespace): Add test cases.
10580
10581 2018-01-27 Jakub Jelinek <jakub@redhat.com>
10582
10583 PR middle-end/84040
10584 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
10585 debug insns.
10586
10587 2018-01-26 Jim Wilson <jimw@sifive.com>
10588
10589 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
10590
10591 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
10592 specified.
10593
10594 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10595
10596 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
10597 and CMP + SUB-immediate -> SUBS.
10598
10599 2018-01-26 Martin Sebor <msebor@redhat.com>
10600
10601 PR tree-optimization/83896
10602 * tree-ssa-strlen.c (get_string_len): Rename...
10603 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
10604 Avoid assuming length is constant.
10605 (handle_char_store): Use HOST_WIDE_INT for string length.
10606
10607 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
10608
10609 PR target/81763
10610 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
10611 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
10612
10613 2018-01-26 Richard Biener <rguenther@suse.de>
10614
10615 PR rtl-optimization/84003
10616 * dse.c (record_store): Only record redundant stores when
10617 the earlier store aliases at least all accesses the later one does.
10618
10619 2018-01-26 Jakub Jelinek <jakub@redhat.com>
10620
10621 PR rtl-optimization/83985
10622 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
10623 REG_CFA_RESTORE insns.
10624 (delete_unmarked_insns): Don't ignore separate shrink wrapping
10625 REG_CFA_RESTORE insns here.
10626
10627 PR c/83989
10628 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
10629 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
10630
10631 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10632
10633 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
10634 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
10635 (arc_init): Likewise.
10636 (arc_override_options): Likewise.
10637 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
10638 value.
10639 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
10640 support.
10641 * config/arc/arc.h (TARGET_DBNZ): Define.
10642 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
10643 properly set the tune attribute.
10644 (dbnz): Use TARGET_DBNZ guard.
10645 * config/arc/arc.opt (mtune): Add core3 option.
10646
10647 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10648
10649 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
10650 recognize new pic like addresses.
10651 (arc_delegitimize_address): Clean up.
10652
10653 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10654
10655 * config/arc/arc-arches.def: Option mrf16 valid for all
10656 architectures.
10657 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
10658 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
10659 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
10660 * config/arc/arc-tables.opt: Regenerate.
10661 * config/arc/arc.c (arc_conditional_register_usage): Handle
10662 reduced register file case.
10663 (arc_file_start): Set must have build attributes.
10664 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
10665 mrf16 option value.
10666 * config/arc/arc.opt (mrf16): Add new option.
10667 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
10668 * config/arc/genmultilib.awk: Handle new mrf16 option.
10669 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
10670 * config/arc/t-multilib: Regenerate.
10671 * doc/invoke.texi (ARC Options): Document mrf16 option.
10672
10673 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10674
10675 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
10676 * config/arc/arc.c (arc_handle_secure_attribute): New function.
10677 (arc_attribute_table): Add 'secure_call' attribute.
10678 (arc_print_operand): Print secure call operand.
10679 (arc_function_ok_for_sibcall): Don't optimize tail calls when
10680 secure.
10681 (arc_is_secure_call_p): New function. * config/arc/arc.md
10682 (call_i): Add support for sjli instruction.
10683 (call_value_i): Likewise.
10684 * config/arc/constraints.md (Csc): New constraint.
10685
10686 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10687 John Eric Martin <John.Martin@emmicro-us.com>
10688
10689 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
10690 * config/arc/arc.c (_arc_jli_section): New struct.
10691 (arc_jli_section): New type.
10692 (rc_jli_sections): New static variable.
10693 (arc_handle_jli_attribute): New function.
10694 (arc_attribute_table): Add jli_always and jli_fixed attribute.
10695 (arc_file_end): New function.
10696 (TARGET_ASM_FILE_END): Define.
10697 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
10698 (arc_add_jli_section): New function.
10699 (jli_call_scan): Likewise.
10700 (arc_reorg): Call jli_call_scan.
10701 (arc_output_addsi): Remove 'S' from printing asm operand.
10702 (arc_is_jli_call_p): New function.
10703 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
10704 operand.
10705 (movhi_insn): Likewise.
10706 (movsi_insn): Likewise.
10707 (movsi_set_cc_insn): Likewise.
10708 (loadqi_update): Likewise.
10709 (load_zeroextendqisi_update): Likewise.
10710 (load_signextendqisi_update): Likewise.
10711 (loadhi_update): Likewise.
10712 (load_zeroextendhisi_update): Likewise.
10713 (load_signextendhisi_update): Likewise.
10714 (loadsi_update): Likewise.
10715 (loadsf_update): Likewise.
10716 (movsicc_insn): Likewise.
10717 (bset_insn): Likewise.
10718 (bxor_insn): Likewise.
10719 (bclr_insn): Likewise.
10720 (bmsk_insn): Likewise.
10721 (bicsi3_insn): Likewise.
10722 (cmpsi_cc_c_insn): Likewise.
10723 (movsi_ne): Likewise.
10724 (movsi_cond_exec): Likewise.
10725 (clrsbsi2): Likewise.
10726 (norm_f): Likewise.
10727 (normw): Likewise.
10728 (swap): Likewise.
10729 (divaw): Likewise.
10730 (flag): Likewise.
10731 (sr): Likewise.
10732 (kflag): Likewise.
10733 (ffs): Likewise.
10734 (ffs_f): Likewise.
10735 (fls): Likewise.
10736 (call_i): Remove 'S' asm letter, add jli instruction.
10737 (call_value_i): Likewise.
10738 * config/arc/arc.op (mjli-always): New option.
10739 * config/arc/constraints.md (Cji): New constraint.
10740 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
10741 operand.
10742 (subsf3_fpx): Likewise.
10743 (mulsf3_fpx): Likewise.
10744 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
10745 asm operand.
10746 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
10747 function attrbutes.
10748 * doc/invoke.texi (ARC): Document mjli-always option.
10749
10750 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
10751
10752 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
10753 avoid addition with 0 and use incw and decw where possible.
10754
10755 2018-01-26 Richard Biener <rguenther@suse.de>
10756
10757 PR tree-optimization/81082
10758 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
10759 association if it requires casting to unsigned.
10760 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
10761 from fold_plusminus_mult_expr to catch important cases late when
10762 range info is available.
10763
10764 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10765
10766 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
10767 * configure.ac (hidden_linkonce): New test.
10768 * configure: Regenerate.
10769 * config.in: Regenerate.
10770
10771 2018-01-26 Julia Koval <julia.koval@intel.com>
10772
10773 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
10774 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
10775 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
10776 _mm_mask_bitshuffle_epi64_mask): Fix type.
10777 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
10778 USI_FTYPE_V4DI_V4DI_USI): Remove.
10779 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
10780 __builtin_ia32_vpshufbitqmb256_mask,
10781 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
10782 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
10783 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
10784
10785 2018-01-26 Alan Modra <amodra@gmail.com>
10786
10787 PR target/84033
10788 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
10789 UNSPEC_VBPERMQ. Sort other unspecs.
10790
10791 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
10792
10793 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
10794
10795 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
10796
10797 PR middle-end/83055
10798 * predict.c (drop_profile): Do not push/pop cfun; update also
10799 node->count.
10800 (handle_missing_profiles): Fix logic looking for zero profiles.
10801
10802 2018-01-25 Jakub Jelinek <jakub@redhat.com>
10803
10804 PR middle-end/83977
10805 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
10806 on functions with #pragma omp declare simd or functions with simd
10807 attribute.
10808 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
10809 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
10810 Remove trailing \n from warning_at calls.
10811
10812 2018-01-25 Tom de Vries <tom@codesourcery.com>
10813
10814 PR target/84028
10815 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
10816 for neutered workers.
10817
10818 2018-01-24 Joseph Myers <joseph@codesourcery.com>
10819
10820 PR target/68467
10821 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
10822 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
10823
10824 2018-01-24 Jeff Law <law@redhat.com>
10825
10826 PR target/83994
10827 * i386.c (get_probe_interval): Move to earlier point.
10828 (ix86_compute_frame_layout): If -fstack-clash-protection and
10829 the frame is larger than the probe interval, then use pushes
10830 to save registers rather than reg->mem moves.
10831 (ix86_expand_prologue): Remove conditional for int_registers_saved
10832 assertion.
10833
10834 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
10835
10836 PR target/84014
10837 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
10838 min/max for never referenced object.
10839
10840 2018-01-24 Jakub Jelinek <jakub@redhat.com>
10841
10842 PR middle-end/83977
10843 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
10844 here.
10845 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
10846 attributes from DECL_ATTRIBUTES (decl) without affecting
10847 DECL_ATTRIBUTES (current_function_decl).
10848 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
10849 functions with non-NULL DECL_ABSTRACT_ORIGIN.
10850
10851 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
10852
10853 PR tree-optimization/83979
10854 * fold-const.c (fold_comparison): Use constant_boolean_node
10855 instead of boolean_{true,false}_node.
10856
10857 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
10858
10859 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
10860 with zero counts.
10861
10862 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10863
10864 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
10865 Simplify the clause that sets the length attribute.
10866 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
10867 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
10868 clause that sets the length attribute.
10869 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
10870
10871 2018-01-24 Tom de Vries <tom@codesourcery.com>
10872
10873 PR target/83589
10874 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
10875 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
10876 Add strict parameter.
10877 (prevent_branch_around_nothing): Insert dummy insn between branch to
10878 label and label with no ptx insn inbetween.
10879 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
10880
10881 2018-01-24 Tom de Vries <tom@codesourcery.com>
10882
10883 PR target/81352
10884 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
10885 for neutered threads in warp.
10886 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
10887
10888 2018-01-24 Richard Biener <rguenther@suse.de>
10889
10890 PR tree-optimization/83176
10891 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
10892 operands.
10893
10894 2018-01-24 Richard Biener <rguenther@suse.de>
10895
10896 PR tree-optimization/82819
10897 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
10898 code generating pluses that are no-ops in the target precision.
10899
10900 2018-01-24 Richard Biener <rguenther@suse.de>
10901
10902 PR middle-end/84000
10903 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
10904
10905 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
10906
10907 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
10908 to merge probabilities.
10909 * predict.c (probably_never_executed): Also mark as cold functions
10910 with global 0 profile and guessed local profile.
10911 * profile-count.c (profile_probability::combine_with_count): New
10912 member function.
10913 * profile-count.h (profile_probability::operator*,
10914 profile_probability::operator*=, profile_probability::operator/,
10915 profile_probability::operator/=): Reduce precision to adjusted
10916 and set value to guessed on contradictory divisions.
10917 (profile_probability::combine_with_freq): Remove.
10918 (profile_probability::combine_wiht_count): Declare.
10919 (profile_count::force_nonzero):: Set to adjusted.
10920 (profile_count::probability_in):: Set quality to adjusted.
10921 * tree-ssa-tail-merge.c (replace_block_by): Use
10922 combine_with_count.
10923
10924 2018-01-23 Andrew Waterman <andrew@sifive.com>
10925 Jim Wilson <jimw@sifive.com>
10926
10927 * config/riscv/riscv.c (riscv_stack_boundary): New.
10928 (riscv_option_override): Set riscv_stack_boundary. Handle
10929 riscv_preferred_stack_boundary_arg.
10930 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
10931 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
10932 (STACK_BOUNDARY): Set to riscv_stack_boundary.
10933 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
10934 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
10935 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
10936
10937 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
10938
10939 PR target/83905
10940 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
10941 of struct ix86_frame.
10942 (ix86_expand_epilogue): Likewise. Add a local variable for
10943 the reg_save_offset field in struct ix86_frame.
10944
10945 2018-01-23 Bin Cheng <bin.cheng@arm.com>
10946
10947 PR tree-optimization/82604
10948 * tree-loop-distribution.c (enum partition_kind): New enum item
10949 PKIND_PARTIAL_MEMSET.
10950 (partition_builtin_p): Support above new enum item.
10951 (generate_code_for_partition): Ditto.
10952 (compute_access_range): Differentiate cases that equality can be
10953 proven at all loops, the innermost loops or no loops.
10954 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
10955 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
10956 (finalize_partitions, distribute_loop): Don't fuse partition of
10957 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
10958 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
10959 parloop is enabled.
10960
10961 2018-01-23 Martin Liska <mliska@suse.cz>
10962
10963 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
10964 order to ignore the predictor.
10965 (PRED_POLYMORPHIC_CALL): Likewise.
10966 (PRED_RECURSIVE_CALL): Likewise.
10967
10968 2018-01-23 Martin Liska <mliska@suse.cz>
10969
10970 * tree-profile.c (tree_profiling): Print function header to
10971 aware reader which function we are working on.
10972 * value-prof.c (gimple_find_values_to_profile): Do not print
10973 not interesting value histograms.
10974
10975 2018-01-23 Martin Liska <mliska@suse.cz>
10976
10977 * profile-count.h (enum profile_quality): Add
10978 profile_uninitialized as the first value. Do not number values
10979 as they are zero based.
10980 (profile_count::verify): Update sanity check.
10981 (profile_probability::verify): Likewise.
10982
10983 2018-01-23 Nathan Sidwell <nathan@acm.org>
10984
10985 * doc/invoke.texi (ffor-scope): Deprecate.
10986
10987 2018-01-23 David Malcolm <dmalcolm@redhat.com>
10988
10989 PR tree-optimization/83510
10990 * domwalk.c (set_all_edges_as_executable): New function.
10991 (dom_walker::dom_walker): Convert bool param
10992 "skip_unreachable_blocks" to enum reachability. Move setup of
10993 edge flags to set_all_edges_as_executable and only do it when
10994 reachability is REACHABLE_BLOCKS.
10995 * domwalk.h (enum dom_walker::reachability): New enum.
10996 (dom_walker::dom_walker): Convert bool param
10997 "skip_unreachable_blocks" to enum reachability.
10998 (set_all_edges_as_executable): New decl.
10999 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
11000 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
11001 "reachability".
11002 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
11003 but converting true to REACHABLE_BLOCKS.
11004 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
11005 * tree-vrp.c
11006 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
11007 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
11008 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
11009 REACHABLE_BLOCKS.
11010 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
11011 if check_all_array_refs will be called.
11012
11013 2018-01-23 David Malcolm <dmalcolm@redhat.com>
11014
11015 * tree.c (selftest::test_location_wrappers): Add more test
11016 coverage.
11017
11018 2018-01-23 David Malcolm <dmalcolm@redhat.com>
11019
11020 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
11021 (selftest::test_bit_in_range): Likewise.
11022
11023 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
11024
11025 PR testsuite/83888
11026 * doc/sourcebuild.texi (vect_float): Say that the selector
11027 only describes the situation when -funsafe-math-optimizations is on.
11028 (vect_float_strict): Document.
11029
11030 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
11031
11032 PR tree-optimization/83965
11033 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11034 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
11035 instead of checking only for a reduction.
11036 (vect_recog_widen_sum_pattern): Likewise.
11037
11038 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
11039
11040 * predict.c (probably_never_executed): Only use precise profile info.
11041 (compute_function_frequency): Skip after inlining hack since we now
11042 have quality checking.
11043
11044 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
11045
11046 * profile-count.h (profile_probability::very_unlikely,
11047 profile_probability::unlikely, profile_probability::even): Set
11048 precision to guessed.
11049
11050 2018-01-23 Richard Biener <rguenther@suse.de>
11051
11052 PR tree-optimization/83963
11053 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
11054 Properly terminate dominator walk when crossing the exit edge not
11055 when visiting its source block.
11056
11057 2018-01-23 Jakub Jelinek <jakub@redhat.com>
11058
11059 PR c++/83918
11060 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
11061 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
11062
11063 2018-01-22 Jakub Jelinek <jakub@redhat.com>
11064
11065 PR tree-optimization/83957
11066 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
11067 semicolon after for body surrounded by braces.
11068
11069 PR tree-optimization/83081
11070 * profile-count.h (profile_probability::split): New method.
11071 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
11072 Use profile_probability::split.
11073 (do_compare_rtx_and_jump): Fix adjustment of probabilities
11074 when splitting a single conditional jump into 2.
11075
11076 2018-01-22 David Malcolm <dmalcolm@redhat.com>
11077
11078 PR tree-optimization/69452
11079 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
11080 decl.
11081
11082 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
11083
11084 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
11085 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
11086 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
11087
11088 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
11089
11090 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
11091 declaration.
11092 * config/rl78/rl78.md (movdi): New define_expand.
11093 * config/rl78/rl78.c (rl78_split_movdi): New function.
11094
11095 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
11096
11097 PR target/83862
11098 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
11099 no longer used.
11100 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
11101 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
11102 128-bit to produce an UNSPEC move to get the double word with the
11103 signbit and then a shift directly to do signbit.
11104 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
11105 implementation with a new version that just does either a direct
11106 move or a regular move. Move memory interface to separate insns.
11107 Move insns so they are next to the expander.
11108 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
11109 with signbit move. Split big and little endian case.
11110 (signbit<mode>2_dm_mem_le): Likewise.
11111 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
11112 (signbit<mode>2_dm2): Likewise.
11113
11114 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
11115
11116 * config/rl78/rl78.md (anddi3): New define_expand.
11117
11118 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
11119
11120 * config/rl78/rl78.md (umindi3): New define_expand.
11121
11122 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
11123
11124 * config/rl78/rl78.md (smindi3): New define_expand.
11125
11126 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
11127
11128 * config/rl78/rl78.md (smaxdi3): New define_expand.
11129
11130 2018-01-22 Carl Love <cel@us.ibm.com>
11131
11132 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
11133 LVX_V1TI): Add macro expansion.
11134 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
11135 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
11136 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
11137 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
11138 Change check to determine if the instruction is a byte reversing
11139 entry. Fix typo in comment.
11140 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
11141 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
11142 Add def_builtin calls for new builtins.
11143 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
11144 Add define_insn expansion.
11145
11146 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
11147
11148 * config/rl78/rl78.md (umaxdi3): New define_expand.
11149
11150 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
11151
11152 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
11153 for non-QImode registers.
11154
11155 2018-01-22 Richard Biener <rguenther@suse.de>
11156
11157 PR tree-optimization/83963
11158 * graphite-scop-detection.c (scop_detection::get_sese): Delay
11159 including the loop exit block.
11160 (scop_detection::merge_sese): Likewise.
11161 (scop_detection::add_scop): Do it here instead.
11162
11163 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11164
11165 * doc/sourcebuild.texi (arm_softfloat): Document.
11166
11167 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
11168
11169 PR gcc/77734
11170 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
11171 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
11172 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
11173
11174 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11175 David Edelsohn <dje.gcc@gmail.com>
11176
11177 PR target/83946
11178 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
11179 Change "crset eq" to "crset 2".
11180 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
11181 (*call_indirect_aix<mode>_nospec): Likewise.
11182 (*call_value_indirect_aix<mode>_nospec): Likewise.
11183 (*call_indirect_elfv2<mode>_nospec): Likewise.
11184 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
11185 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
11186 change assembly output from . to $.
11187 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
11188 (indirect_jump<mode>_nospec): Change assembly output from . to $.
11189 (*tablejump<mode>_internal1_nospec): Likewise.
11190
11191 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
11192
11193 PR target/80870
11194 * config/sh/sh_optimize_sett_clrt.cc:
11195 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
11196
11197 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
11198
11199 PR tree-optimization/83940
11200 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
11201 offset_dt to vect_constant_def rather than vect_unknown_def_type.
11202 (vect_check_load_store_mask): Add a mask_dt_out parameter and
11203 use it to pass back the definition type.
11204 (vect_check_store_rhs): Likewise rhs_dt_out.
11205 (vect_build_gather_load_calls): Add a mask_dt argument and use
11206 it instead of a call to vect_is_simple_use.
11207 (vectorizable_store): Update calls to vect_check_load_store_mask
11208 and vect_check_store_rhs. Use the dt returned by the latter instead
11209 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
11210 instead of calls to vect_is_simple_use. Pass the scalar rather
11211 than the vector operand to vect_is_simple_use when handling
11212 second and subsequent copies of an rhs value.
11213 (vectorizable_load): Update calls to vect_check_load_store_mask
11214 and vect_build_gather_load_calls. Use the cached mask_dt and
11215 gs_info.offset_dt instead of calls to vect_is_simple_use.
11216
11217 2018-01-20 Jakub Jelinek <jakub@redhat.com>
11218
11219 PR middle-end/83945
11220 * tree-emutls.c: Include gimplify.h.
11221 (lower_emutls_2): New function.
11222 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
11223 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
11224 it before further processing.
11225
11226 PR target/83930
11227 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
11228 UINTVAL (trueop1) instead of INTVAL (op1).
11229
11230 2018-01-19 Jakub Jelinek <jakub@redhat.com>
11231
11232 PR debug/81570
11233 PR debug/83728
11234 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
11235 INCOMING_FRAME_SP_OFFSET if not defined.
11236 (scan_trace): Add ENTRY argument. If true and
11237 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
11238 emit a note to adjust the CFA offset.
11239 (create_cfi_notes): Adjust scan_trace callers.
11240 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
11241 INCOMING_FRAME_SP_OFFSET in the CIE.
11242 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
11243 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
11244 Likewise.
11245 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
11246 * doc/tm.texi: Regenerated.
11247
11248 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11249
11250 PR rtl-optimization/83147
11251 * lra-constraints.c (remove_inheritance_pseudos): Use
11252 lra_substitute_pseudo_within_insn.
11253
11254 2018-01-19 Tom de Vries <tom@codesourcery.com>
11255 Cesar Philippidis <cesar@codesourcery.com>
11256
11257 PR target/83920
11258 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
11259
11260 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
11261
11262 PR target/83790
11263 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
11264 spaces for function labels.
11265
11266 2018-01-19 Martin Liska <mliska@suse.cz>
11267
11268 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
11269 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
11270 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
11271 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
11272 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
11273 (PRED_CONST_RETURN): Change from 69 to 65.
11274 (PRED_NULL_RETURN): Change from 91 to 71.
11275 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
11276 (PRED_LOOP_GUARD): Change from 66 to 73.
11277
11278 2018-01-19 Martin Liska <mliska@suse.cz>
11279
11280 * predict.c (predict_insn_def): Add new assert.
11281 (struct branch_predictor): Change type to signed integer.
11282 (test_prediction_value_range): Amend test to cover
11283 PROB_UNINITIALIZED.
11284 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
11285 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
11286 (PRED_LOOP_ITERATIONS_MAX): Likewise.
11287 (PRED_LOOP_IV_COMPARE): Likewise.
11288 * predict.h (PROB_UNINITIALIZED): Define new constant.
11289
11290 2018-01-19 Martin Liska <mliska@suse.cz>
11291
11292 * predict.c (dump_prediction): Add new format for
11293 analyze_brprob.py script which is enabled with -details
11294 suboption.
11295 * profile-count.h (precise_p): New function.
11296
11297 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
11298
11299 PR tree-optimization/83922
11300 * tree-vect-loop.c (vect_verify_full_masking): Return false if
11301 there are no statements that need masking.
11302 (vect_active_double_reduction_p): New function.
11303 (vect_analyze_loop_operations): Use it when handling phis that
11304 are not in the loop header.
11305
11306 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
11307
11308 PR tree-optimization/83914
11309 * tree-vect-loop.c (vectorizable_induction): Don't convert
11310 init_expr or apply the peeling adjustment for inductions
11311 that are nested within the vectorized loop.
11312
11313 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11314
11315 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
11316 instead of NEG.
11317
11318 2018-01-18 Jakub Jelinek <jakub@redhat.com>
11319
11320 PR sanitizer/81715
11321 PR testsuite/83882
11322 * function.h (gimplify_parameters): Add gimple_seq * argument.
11323 * function.c: Include gimple.h and options.h.
11324 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
11325 for the added local temporaries if needed.
11326 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
11327 if there are any parameter cleanups, wrap whole body into a
11328 try/finally with the cleanups.
11329
11330 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
11331
11332 PR target/82964
11333 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
11334 Use GET_MODE_CLASS for scalar floating point.
11335
11336 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
11337
11338 PR ipa/82256
11339 patch by PaX Team
11340 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
11341 Fix call of call_cgraph_insertion_hooks.
11342
11343 2018-01-18 Martin Sebor <msebor@redhat.com>
11344
11345 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
11346
11347 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
11348
11349 PR ipa/83619
11350 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
11351 frequencies.
11352
11353 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
11354
11355 PR other/70268
11356 * common.opt: (-ffile-prefix-map): New option.
11357 * opts.c (common_handle_option): Defer it.
11358 * opts-global.c (handle_common_deferred_options): Handle it.
11359 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
11360 * file-prefix-map.h: New file.
11361 (remap_debug_filename, add_debug_prefix_map): ...here.
11362 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
11363 * final.c (debug_prefix_map, add_debug_prefix_map
11364 remap_debug_filename): Move to...
11365 * file-prefix-map.c: New file.
11366 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
11367 generalize, get rid of alloca(), use strrchr() instead of strchr().
11368 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
11369 Implement in terms of add_prefix_map().
11370 (remap_macro_filename, remap_debug_filename): Implement in term of
11371 remap_filename().
11372 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
11373 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
11374 * dbxout.c: Include file-prefix-map.h.
11375 * varasm.c: Likewise.
11376 * vmsdbgout.c: Likewise.
11377 * xcoffout.c: Likewise.
11378 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
11379 * doc/cppopts.texi (-fmacro-prefix-map): Document.
11380 * doc/invoke.texi (-ffile-prefix-map): Document.
11381 (-fdebug-prefix-map): Update description.
11382
11383 2018-01-18 Martin Liska <mliska@suse.cz>
11384
11385 * config/i386/i386.c (indirect_thunk_name): Document that also
11386 lfence is emitted.
11387 (output_indirect_thunk): Document why both instructions
11388 (pause and lfence) are generated.
11389
11390 2018-01-18 Richard Biener <rguenther@suse.de>
11391
11392 PR tree-optimization/83887
11393 * graphite-scop-detection.c
11394 (scop_detection::get_nearest_dom_with_single_entry): Remove.
11395 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
11396 (scop_detection::merge_sese): Re-implement with a flood-fill
11397 algorithm that properly finds a SESE region if it exists.
11398
11399 2018-01-18 Jakub Jelinek <jakub@redhat.com>
11400
11401 PR c/61240
11402 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
11403 pointer_diff optimizations use view_convert instead of convert.
11404
11405 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11406
11407 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
11408 Generate different code for -mno-speculate-indirect-jumps.
11409 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
11410 (*call_indirect_aix<mode>): Disable for
11411 -mno-speculate-indirect-jumps.
11412 (*call_indirect_aix<mode>_nospec): New define_insn.
11413 (*call_value_indirect_aix<mode>): Disable for
11414 -mno-speculate-indirect-jumps.
11415 (*call_value_indirect_aix<mode>_nospec): New define_insn.
11416 (*sibcall_nonlocal_sysv<mode>): Generate different code for
11417 -mno-speculate-indirect-jumps.
11418 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
11419
11420 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
11421
11422 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
11423 long double type, set the flags for noting the default long double
11424 type, even if we don't pass or return a long double type.
11425
11426 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
11427
11428 PR ipa/83051
11429 * ipa-inline.c (flatten_function): Do not overwrite final inlining
11430 failure.
11431
11432 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
11433
11434 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
11435 support for merge[hl].
11436 (fold_mergehl_helper): New helper function.
11437 (tree-vector-builder.h): New #include for tree_vector_builder usage.
11438 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
11439 (altivec_vmrglw_direct): Add xxmrglw insn.
11440
11441 2018-01-17 Andrew Waterman <andrew@sifive.com>
11442
11443 * config/riscv/riscv.c (riscv_conditional_register_usage): If
11444 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
11445
11446 2018-01-17 David Malcolm <dmalcolm@redhat.com>
11447
11448 PR lto/83121
11449 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
11450 call the lto_location_cache before reading the
11451 DECL_SOURCE_LOCATION of the types.
11452
11453 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
11454 Richard Sandiford <richard.sandiford@linaro.org>
11455
11456 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
11457 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
11458 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
11459 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
11460 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
11461 Add declaration.
11462 * config/aarch64/constraints.md (aarch64_movti_operand):
11463 Limit immediates.
11464 * config/aarch64/predicates.md (Uti): Add new constraint.
11465
11466 2018-01-17 Carl Love <cel@us.ibm.com>
11467
11468 * config/rs6000/vsx.md (define_expand xl_len_r,
11469 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
11470 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
11471 lxvll.
11472 (define_expand, define_insn): Move the shift left from the
11473 define_insn to the define_expand for lxvl and stxvl instructions.
11474 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
11475 and XL_LEN_R definitions to PURE.
11476
11477 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
11478
11479 * config/i386/i386.c (indirect_thunk_name): Declare regno
11480 as unsigned int. Compare regno with INVALID_REGNUM.
11481 (output_indirect_thunk): Ditto.
11482 (output_indirect_thunk_function): Ditto.
11483 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
11484 in the call to output_indirect_thunk_function.
11485
11486 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
11487
11488 PR middle-end/83884
11489 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
11490 rather than the size of inner_type to determine the stack slot size
11491 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
11492
11493 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
11494
11495 PR target/83546
11496 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
11497 to PTA_SILVERMONT.
11498
11499 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
11500
11501 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
11502 endian Linux systems to optionally enable multilibs for selecting
11503 the long double type if the user configured an explicit type.
11504 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
11505 have no long double multilibs if not defined.
11506 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
11507 warn if the user used -mabi={ieee,ibm}longdouble and we built
11508 multilibs for long double.
11509 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
11510 appropriate multilib option.
11511 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
11512 multilib options.
11513 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
11514 for building long double multilibs.
11515 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
11516
11517 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
11518
11519 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
11520 copies.
11521
11522 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
11523 64 bits.
11524 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
11525 128 bits.
11526
11527 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
11528 variables.
11529
11530 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
11531 return value.
11532
11533 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
11534
11535 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
11536 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
11537
11538 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
11539
11540 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
11541 different rtl trees depending on TARGET_64BIT.
11542 (rs6000_gen_lvx): Likewise.
11543
11544 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
11545
11546 * config/visium/visium.md (nop): Tweak comment.
11547 (hazard_nop): Likewise.
11548
11549 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11550
11551 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
11552 -mspeculate-indirect-jumps.
11553 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
11554 for -mno-speculate-indirect-jumps.
11555 (*call_indirect_elfv2<mode>_nospec): New define_insn.
11556 (*call_value_indirect_elfv2<mode>): Disable for
11557 -mno-speculate-indirect-jumps.
11558 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
11559 (indirect_jump): Emit different RTL for
11560 -mno-speculate-indirect-jumps.
11561 (*indirect_jump<mode>): Disable for
11562 -mno-speculate-indirect-jumps.
11563 (*indirect_jump<mode>_nospec): New define_insn.
11564 (tablejump): Emit different RTL for
11565 -mno-speculate-indirect-jumps.
11566 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
11567 (tablejumpsi_nospec): New define_expand.
11568 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
11569 (tablejumpdi_nospec): New define_expand.
11570 (*tablejump<mode>_internal1): Disable for
11571 -mno-speculate-indirect-jumps.
11572 (*tablejump<mode>_internal1_nospec): New define_insn.
11573 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
11574 option.
11575
11576 2018-01-16 Artyom Skrobov tyomitch@gmail.com
11577
11578 * caller-save.c (insert_save): Drop unnecessary parameter. All
11579 callers updated.
11580
11581 2018-01-16 Jakub Jelinek <jakub@redhat.com>
11582 Richard Biener <rguenth@suse.de>
11583
11584 PR libgomp/83590
11585 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
11586 return early, inline manually is_gimple_sizepos. Make sure if we
11587 call gimplify_expr we don't end up with a gimple constant.
11588 * tree.c (variably_modified_type_p): Don't return true for
11589 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
11590 * gimplify.h (is_gimple_sizepos): Remove.
11591
11592 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11593
11594 PR tree-optimization/83857
11595 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
11596 vectorizable_live_operation for pure SLP statements.
11597 (vectorizable_live_operation): Handle PHIs.
11598
11599 2018-01-16 Richard Biener <rguenther@suse.de>
11600
11601 PR tree-optimization/83867
11602 * tree-vect-stmts.c (vect_transform_stmt): Precompute
11603 nested_in_vect_loop_p since the scalar stmt may get invalidated.
11604
11605 2018-01-16 Jakub Jelinek <jakub@redhat.com>
11606
11607 PR c/83844
11608 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
11609 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
11610 If off is not INTEGER_CST, issue a may not be aligned warning
11611 rather than isn't aligned. Use isn%'t rather than isn't.
11612 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
11613 into MULT_EXPR.
11614 <case MULT_EXPR>: Improve the case when bottom and one of the
11615 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
11616 operand, in that case check if the other operand is multiple of
11617 bottom divided by the INTEGER_CST operand.
11618
11619 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11620
11621 PR target/83858
11622 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
11623 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
11624 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
11625 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
11626 * config/pa/pa.c (pa_function_arg_advance): Likewise.
11627 (pa_function_arg, pa_arg_partial_bytes): Likewise.
11628 (pa_function_arg_size): New function.
11629
11630 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11631
11632 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
11633 in a separate statement.
11634
11635 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11636
11637 PR tree-optimization/83847
11638 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
11639 group gathers and scatters.
11640
11641 2018-01-16 Jakub Jelinek <jakub@redhat.com>
11642
11643 PR rtl-optimization/86620
11644 * params.def (max-sched-ready-insns): Bump minimum value to 1.
11645
11646 PR rtl-optimization/83213
11647 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
11648 to last if both are JUMP_INSNs.
11649
11650 PR tree-optimization/83843
11651 * gimple-ssa-store-merging.c
11652 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
11653 store_immediate_info for bswap/nop orig_stores.
11654
11655 2018-01-15 Andrew Waterman <andrew@sifive.com>
11656
11657 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
11658 !TARGET_MUL.
11659 <UDIV>: Increase cost if !TARGET_DIV.
11660
11661 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
11662
11663 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
11664 (define_attr "cr_logical_3op"): New.
11665 (cceq_ior_compare): Adjust.
11666 (cceq_ior_compare_complement): Adjust.
11667 (*cceq_rev_compare): Adjust.
11668 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
11669 (is_cracked_insn): Adjust.
11670 (insn_must_be_first_in_group): Adjust.
11671 * config/rs6000/40x.md: Adjust.
11672 * config/rs6000/440.md: Adjust.
11673 * config/rs6000/476.md: Adjust.
11674 * config/rs6000/601.md: Adjust.
11675 * config/rs6000/603.md: Adjust.
11676 * config/rs6000/6xx.md: Adjust.
11677 * config/rs6000/7450.md: Adjust.
11678 * config/rs6000/7xx.md: Adjust.
11679 * config/rs6000/8540.md: Adjust.
11680 * config/rs6000/cell.md: Adjust.
11681 * config/rs6000/e300c2c3.md: Adjust.
11682 * config/rs6000/e500mc.md: Adjust.
11683 * config/rs6000/e500mc64.md: Adjust.
11684 * config/rs6000/e5500.md: Adjust.
11685 * config/rs6000/e6500.md: Adjust.
11686 * config/rs6000/mpc.md: Adjust.
11687 * config/rs6000/power4.md: Adjust.
11688 * config/rs6000/power5.md: Adjust.
11689 * config/rs6000/power6.md: Adjust.
11690 * config/rs6000/power7.md: Adjust.
11691 * config/rs6000/power8.md: Adjust.
11692 * config/rs6000/power9.md: Adjust.
11693 * config/rs6000/rs64.md: Adjust.
11694 * config/rs6000/titan.md: Adjust.
11695
11696 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11697
11698 * config/i386/predicates.md (indirect_branch_operand): Rewrite
11699 ix86_indirect_branch_register logic.
11700
11701 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11702
11703 * config/i386/constraints.md (Bs): Update
11704 ix86_indirect_branch_register check. Don't check
11705 ix86_indirect_branch_register with GOT_memory_operand.
11706 (Bw): Likewise.
11707 * config/i386/predicates.md (GOT_memory_operand): Don't check
11708 ix86_indirect_branch_register here.
11709 (GOT32_symbol_operand): Likewise.
11710
11711 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11712
11713 * config/i386/predicates.md (constant_call_address_operand):
11714 Rewrite ix86_indirect_branch_register logic.
11715 (sibcall_insn_operand): Likewise.
11716
11717 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11718
11719 * config/i386/constraints.md (Bs): Replace
11720 ix86_indirect_branch_thunk_register with
11721 ix86_indirect_branch_register.
11722 (Bw): Likewise.
11723 * config/i386/i386.md (indirect_jump): Likewise.
11724 (tablejump): Likewise.
11725 (*sibcall_memory): Likewise.
11726 (*sibcall_value_memory): Likewise.
11727 Peepholes of indirect call and jump via memory: Likewise.
11728 * config/i386/i386.opt: Likewise.
11729 * config/i386/predicates.md (indirect_branch_operand): Likewise.
11730 (GOT_memory_operand): Likewise.
11731 (call_insn_operand): Likewise.
11732 (sibcall_insn_operand): Likewise.
11733 (GOT32_symbol_operand): Likewise.
11734
11735 2018-01-15 Jakub Jelinek <jakub@redhat.com>
11736
11737 PR middle-end/83837
11738 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
11739 type rather than type addr's type points to.
11740 (expand_omp_atomic_mutex): Likewise.
11741 (expand_omp_atomic): Likewise.
11742
11743 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11744
11745 PR target/83839
11746 * config/i386/i386.c (output_indirect_thunk_function): Use
11747 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
11748 for __x86_return_thunk.
11749
11750 2018-01-15 Richard Biener <rguenther@suse.de>
11751
11752 PR middle-end/83850
11753 * expmed.c (extract_bit_field_1): Fix typo.
11754
11755 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11756
11757 PR target/83687
11758 * config/arm/iterators.md (VF): New mode iterator.
11759 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
11760 Remove integer-related logic from pattern.
11761 (neon_vabd<mode>_3): Likewise.
11762
11763 2018-01-15 Jakub Jelinek <jakub@redhat.com>
11764
11765 PR middle-end/82694
11766 * common.opt (fstrict-overflow): No longer an alias.
11767 (fwrapv-pointer): New option.
11768 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
11769 also for pointer types based on flag_wrapv_pointer.
11770 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
11771 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
11772 opts->x_flag_wrapv got set.
11773 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
11774 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
11775 POINTER_TYPE_OVERFLOW_UNDEFINED.
11776 * match.pd: Likewise in address comparison pattern.
11777 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
11778
11779 2018-01-15 Richard Biener <rguenther@suse.de>
11780
11781 PR lto/83804
11782 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
11783 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
11784 Reset type names to their identifier if their TYPE_DECL doesn't
11785 have linkage (and thus is used for ODR and devirt).
11786 (save_debug_info_for_decl): Remove.
11787 (save_debug_info_for_type): Likewise.
11788 (add_tree_to_fld_list): Adjust.
11789 * tree-pretty-print.c (dump_generic_node): Make dumping of
11790 type names more robust.
11791
11792 2018-01-15 Richard Biener <rguenther@suse.de>
11793
11794 * BASE-VER: Bump to 8.0.1.
11795
11796 2018-01-14 Martin Sebor <msebor@redhat.com>
11797
11798 PR other/83508
11799 * builtins.c (check_access): Avoid warning when the no-warning bit
11800 is set.
11801
11802 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
11803
11804 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
11805 * ira-color (allocno_hard_regs_compare): Likewise.
11806
11807 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
11808
11809 PR target/83013
11810 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
11811 Use .pushsection/.popsection.
11812
11813 2018-01-14 Martin Sebor <msebor@redhat.com>
11814
11815 PR c++/81327
11816 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
11817
11818 2018-01-14 Jakub Jelinek <jakub@redhat.com>
11819
11820 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
11821 entry from extra_headers.
11822 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
11823 extra_headers, make the list bitwise identical to the i?86-*-* one.
11824
11825 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11826
11827 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
11828 -mcmodel=large with -mindirect-branch=thunk,
11829 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
11830 -mfunction-return=thunk-extern.
11831 * doc/invoke.texi: Document -mcmodel=large is incompatible with
11832 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
11833 -mfunction-return=thunk and -mfunction-return=thunk-extern.
11834
11835 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11836
11837 * config/i386/i386.c (print_reg): Print the name of the full
11838 integer register without '%'.
11839 (ix86_print_operand): Handle 'V'.
11840 * doc/extend.texi: Document 'V' modifier.
11841
11842 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11843
11844 * config/i386/constraints.md (Bs): Disallow memory operand for
11845 -mindirect-branch-register.
11846 (Bw): Likewise.
11847 * config/i386/predicates.md (indirect_branch_operand): Likewise.
11848 (GOT_memory_operand): Likewise.
11849 (call_insn_operand): Likewise.
11850 (sibcall_insn_operand): Likewise.
11851 (GOT32_symbol_operand): Likewise.
11852 * config/i386/i386.md (indirect_jump): Call convert_memory_address
11853 for -mindirect-branch-register.
11854 (tablejump): Likewise.
11855 (*sibcall_memory): Likewise.
11856 (*sibcall_value_memory): Likewise.
11857 Disallow peepholes of indirect call and jump via memory for
11858 -mindirect-branch-register.
11859 (*call_pop): Replace m with Bw.
11860 (*call_value_pop): Likewise.
11861 (*sibcall_pop_memory): Replace m with Bs.
11862 * config/i386/i386.opt (mindirect-branch-register): New option.
11863 * doc/invoke.texi: Document -mindirect-branch-register option.
11864
11865 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11866
11867 * config/i386/i386-protos.h (ix86_output_function_return): New.
11868 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
11869 set function_return_type.
11870 (indirect_thunk_name): Add ret_p to indicate thunk for function
11871 return.
11872 (output_indirect_thunk_function): Pass false to
11873 indirect_thunk_name.
11874 (ix86_output_indirect_branch_via_reg): Likewise.
11875 (ix86_output_indirect_branch_via_push): Likewise.
11876 (output_indirect_thunk_function): Create alias for function
11877 return thunk if regno < 0.
11878 (ix86_output_function_return): New function.
11879 (ix86_handle_fndecl_attribute): Handle function_return.
11880 (ix86_attribute_table): Add function_return.
11881 * config/i386/i386.h (machine_function): Add
11882 function_return_type.
11883 * config/i386/i386.md (simple_return_internal): Use
11884 ix86_output_function_return.
11885 (simple_return_internal_long): Likewise.
11886 * config/i386/i386.opt (mfunction-return=): New option.
11887 (indirect_branch): Mention -mfunction-return=.
11888 * doc/extend.texi: Document function_return function attribute.
11889 * doc/invoke.texi: Document -mfunction-return= option.
11890
11891 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11892
11893 * config/i386/i386-opts.h (indirect_branch): New.
11894 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
11895 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
11896 with local indirect jump when converting indirect call and jump.
11897 (ix86_set_indirect_branch_type): New.
11898 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
11899 (indirectlabelno): New.
11900 (indirect_thunk_needed): Likewise.
11901 (indirect_thunk_bnd_needed): Likewise.
11902 (indirect_thunks_used): Likewise.
11903 (indirect_thunks_bnd_used): Likewise.
11904 (INDIRECT_LABEL): Likewise.
11905 (indirect_thunk_name): Likewise.
11906 (output_indirect_thunk): Likewise.
11907 (output_indirect_thunk_function): Likewise.
11908 (ix86_output_indirect_branch_via_reg): Likewise.
11909 (ix86_output_indirect_branch_via_push): Likewise.
11910 (ix86_output_indirect_branch): Likewise.
11911 (ix86_output_indirect_jmp): Likewise.
11912 (ix86_code_end): Call output_indirect_thunk_function if needed.
11913 (ix86_output_call_insn): Call ix86_output_indirect_branch if
11914 needed.
11915 (ix86_handle_fndecl_attribute): Handle indirect_branch.
11916 (ix86_attribute_table): Add indirect_branch.
11917 * config/i386/i386.h (machine_function): Add indirect_branch_type
11918 and has_local_indirect_jump.
11919 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
11920 to true.
11921 (tablejump): Likewise.
11922 (*indirect_jump): Use ix86_output_indirect_jmp.
11923 (*tablejump_1): Likewise.
11924 (simple_return_indirect_internal): Likewise.
11925 * config/i386/i386.opt (mindirect-branch=): New option.
11926 (indirect_branch): New.
11927 (keep): Likewise.
11928 (thunk): Likewise.
11929 (thunk-inline): Likewise.
11930 (thunk-extern): Likewise.
11931 * doc/extend.texi: Document indirect_branch function attribute.
11932 * doc/invoke.texi: Document -mindirect-branch= option.
11933
11934 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
11935
11936 PR ipa/83051
11937 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
11938
11939 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
11940
11941 * ipa-inline.c (want_inline_small_function_p): Return false if
11942 inlining has already failed with CIF_FINAL_ERROR.
11943 (update_caller_keys): Call want_inline_small_function_p before
11944 can_inline_edge_p.
11945 (update_callee_keys): Likewise.
11946
11947 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11948
11949 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
11950 New function.
11951 (rs6000_quadword_masked_address_p): Likewise.
11952 (quad_aligned_load_p): Likewise.
11953 (quad_aligned_store_p): Likewise.
11954 (const_load_sequence_p): Add comment to describe the outer-most loop.
11955 (mimic_memory_attributes_and_flags): New function.
11956 (rs6000_gen_stvx): Likewise.
11957 (replace_swapped_aligned_store): Likewise.
11958 (rs6000_gen_lvx): Likewise.
11959 (replace_swapped_aligned_load): Likewise.
11960 (replace_swapped_load_constant): Capitalize argument name in
11961 comment describing this function.
11962 (rs6000_analyze_swaps): Add a third pass to search for vector loads
11963 and stores that access quad-word aligned addresses and replace
11964 with stvx or lvx instructions when appropriate.
11965 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
11966 New function prototype.
11967 (rs6000_quadword_masked_address_p): Likewise.
11968 (rs6000_gen_lvx): Likewise.
11969 (rs6000_gen_stvx): Likewise.
11970 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
11971 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
11972 when memory address is aligned.
11973 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
11974 this split to select lvx instruction when memory address is aligned.
11975 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
11976 instruction when memory address is aligned.
11977 (*vsx_le_perm_load_v16qi): Likewise.
11978 (four unnamed splitters): Modify to select the stvx instruction
11979 when memory is aligned.
11980
11981 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
11982
11983 * predict.c (determine_unlikely_bbs): Handle correctly BBs
11984 which appears in the queue multiple times.
11985
11986 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11987 Alan Hayward <alan.hayward@arm.com>
11988 David Sherwood <david.sherwood@arm.com>
11989
11990 * tree-vectorizer.h (vec_lower_bound): New structure.
11991 (_loop_vec_info): Add check_nonzero and lower_bounds.
11992 (LOOP_VINFO_CHECK_NONZERO): New macro.
11993 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
11994 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
11995 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
11996 fields. Make seg_len the distance travelled, not including the
11997 access size.
11998 (dr_direction_indicator): Declare.
11999 (dr_zero_step_indicator): Likewise.
12000 (dr_known_forward_stride_p): Likewise.
12001 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
12002 tree-ssanames.h.
12003 (runtime_alias_check_p): Allow runtime alias checks with
12004 variable strides.
12005 (operator ==): Compare access_size and align.
12006 (prune_runtime_alias_test_list): Rework for new distinction between
12007 the access_size and seg_len.
12008 (create_intersect_range_checks_index): Likewise. Cope with polynomial
12009 segment lengths.
12010 (get_segment_min_max): New function.
12011 (create_intersect_range_checks): Use it.
12012 (dr_step_indicator): New function.
12013 (dr_direction_indicator): Likewise.
12014 (dr_zero_step_indicator): Likewise.
12015 (dr_known_forward_stride_p): Likewise.
12016 * tree-loop-distribution.c (data_ref_segment_size): Return
12017 DR_STEP * (niters - 1).
12018 (compute_alias_check_pairs): Update call to the dr_with_seg_len
12019 constructor.
12020 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
12021 (vect_preserves_scalar_order_p): New function, split out from...
12022 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
12023 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
12024 (vect_vfa_access_size): New function.
12025 (vect_vfa_align): Likewise.
12026 (vect_compile_time_alias): Take access_size_a and access_b arguments.
12027 (dump_lower_bound): New function.
12028 (vect_check_lower_bound): Likewise.
12029 (vect_small_gap_p): Likewise.
12030 (vectorizable_with_step_bound_p): Likewise.
12031 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
12032 depencies if the vectorization factor is 1. Convert the checks
12033 for nonzero steps into checks on the bounds of DR_STEP. Try using
12034 a bunds check for variable steps if the minimum required step is
12035 relatively small. Update calls to the dr_with_seg_len
12036 constructor and to vect_compile_time_alias.
12037 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
12038 function.
12039 (vect_loop_versioning): Call it.
12040 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
12041 when retrying.
12042 (vect_estimate_min_profitable_iters): Account for any bounds checks.
12043
12044 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12045 Alan Hayward <alan.hayward@arm.com>
12046 David Sherwood <david.sherwood@arm.com>
12047
12048 * doc/sourcebuild.texi (vect_scatter_store): Document.
12049 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
12050 optabs.
12051 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
12052 Document.
12053 * genopinit.c (main): Add supports_vec_scatter_store and
12054 supports_vec_scatter_store_cached to target_optabs.
12055 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
12056 IFN_MASK_SCATTER_STORE.
12057 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
12058 functions.
12059 * internal-fn.h (internal_store_fn_p): Declare.
12060 (internal_fn_stored_value_index): Likewise.
12061 * internal-fn.c (scatter_store_direct): New macro.
12062 (expand_scatter_store_optab_fn): New function.
12063 (direct_scatter_store_optab_supported_p): New macro.
12064 (internal_store_fn_p): New function.
12065 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
12066 IFN_MASK_SCATTER_STORE.
12067 (internal_fn_mask_index): Likewise.
12068 (internal_fn_stored_value_index): New function.
12069 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
12070 for scatter stores.
12071 * optabs-query.h (supports_vec_scatter_store_p): Declare.
12072 * optabs-query.c (supports_vec_scatter_store_p): New function.
12073 * tree-vectorizer.h (vect_get_store_rhs): Declare.
12074 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
12075 true for scatter stores.
12076 (vect_gather_scatter_fn_p): Handle scatter stores too.
12077 (vect_check_gather_scatter): Consider using scatter stores if
12078 supports_vec_scatter_store_p.
12079 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
12080 scatter stores too.
12081 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
12082 internal_fn_stored_value_index.
12083 (check_load_store_masking): Handle scatter stores too.
12084 (vect_get_store_rhs): Make public.
12085 (vectorizable_call): Use internal_store_fn_p.
12086 (vectorizable_store): Handle scatter store internal functions.
12087 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
12088 when deciding whether the end of the group has been reached.
12089 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
12090 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
12091 (mask_scatter_store<mode>): New insns.
12092
12093 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12094 Alan Hayward <alan.hayward@arm.com>
12095 David Sherwood <david.sherwood@arm.com>
12096
12097 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
12098 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
12099 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
12100 function.
12101 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
12102 Use vect_truncate_gather_scatter_offset if we can't treat the
12103 operation as a normal gather load or scatter store.
12104 (get_group_load_store_type): Take the gather_scatter_info
12105 as argument. Try using a gather load or scatter store for
12106 single-element groups.
12107 (get_load_store_type): Update calls to get_group_load_store_type
12108 and vect_use_strided_gather_scatters_p.
12109
12110 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12111 Alan Hayward <alan.hayward@arm.com>
12112 David Sherwood <david.sherwood@arm.com>
12113
12114 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
12115 optional tree argument.
12116 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
12117 null target hooks.
12118 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
12119 but continue to use the current value as a fallback.
12120 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
12121 to compare the updates.
12122 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
12123 (get_load_store_type): Use it when handling a strided access.
12124 (vect_get_strided_load_store_ops): New function.
12125 (vect_get_data_ptr_increment): Likewise.
12126 (vectorizable_load): Handle strided gather loads. Always pass
12127 a step to vect_create_data_ref_ptr and bump_vector_ptr.
12128
12129 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12130 Alan Hayward <alan.hayward@arm.com>
12131 David Sherwood <david.sherwood@arm.com>
12132
12133 * doc/md.texi (gather_load@var{m}): Document.
12134 (mask_gather_load@var{m}): Likewise.
12135 * genopinit.c (main): Add supports_vec_gather_load and
12136 supports_vec_gather_load_cached to target_optabs.
12137 * optabs-tree.c (init_tree_optimization_optabs): Use
12138 ggc_cleared_alloc to allocate target_optabs.
12139 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
12140 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
12141 functions.
12142 * internal-fn.h (internal_load_fn_p): Declare.
12143 (internal_gather_scatter_fn_p): Likewise.
12144 (internal_fn_mask_index): Likewise.
12145 (internal_gather_scatter_fn_supported_p): Likewise.
12146 * internal-fn.c (gather_load_direct): New macro.
12147 (expand_gather_load_optab_fn): New function.
12148 (direct_gather_load_optab_supported_p): New macro.
12149 (direct_internal_fn_optab): New function.
12150 (internal_load_fn_p): Likewise.
12151 (internal_gather_scatter_fn_p): Likewise.
12152 (internal_fn_mask_index): Likewise.
12153 (internal_gather_scatter_fn_supported_p): Likewise.
12154 * optabs-query.c (supports_at_least_one_mode_p): New function.
12155 (supports_vec_gather_load_p): Likewise.
12156 * optabs-query.h (supports_vec_gather_load_p): Declare.
12157 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
12158 and memory_type field.
12159 (NUM_PATTERNS): Bump to 15.
12160 * tree-vect-data-refs.c: Include internal-fn.h.
12161 (vect_gather_scatter_fn_p): New function.
12162 (vect_describe_gather_scatter_call): Likewise.
12163 (vect_check_gather_scatter): Try using internal functions for
12164 gather loads. Recognize existing calls to a gather load function.
12165 (vect_analyze_data_refs): Consider using gather loads if
12166 supports_vec_gather_load_p.
12167 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
12168 (vect_get_gather_scatter_offset_type): Likewise.
12169 (vect_convert_mask_for_vectype): Likewise.
12170 (vect_add_conversion_to_patterm): Likewise.
12171 (vect_try_gather_scatter_pattern): Likewise.
12172 (vect_recog_gather_scatter_pattern): New pattern recognizer.
12173 (vect_vect_recog_func_ptrs): Add it.
12174 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
12175 internal_fn_mask_index and internal_gather_scatter_fn_p.
12176 (check_load_store_masking): Take the gather_scatter_info as an
12177 argument and handle gather loads.
12178 (vect_get_gather_scatter_ops): New function.
12179 (vectorizable_call): Check internal_load_fn_p.
12180 (vectorizable_load): Likewise. Handle gather load internal
12181 functions.
12182 (vectorizable_store): Update call to check_load_store_masking.
12183 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
12184 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
12185 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
12186 (aarch64_gather_scale_operand_d): New predicates.
12187 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
12188 (mask_gather_load<mode>): New insns.
12189
12190 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12191 Alan Hayward <alan.hayward@arm.com>
12192 David Sherwood <david.sherwood@arm.com>
12193
12194 * optabs.def (fold_left_plus_optab): New optab.
12195 * doc/md.texi (fold_left_plus_@var{m}): Document.
12196 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
12197 * internal-fn.c (fold_left_direct): Define.
12198 (expand_fold_left_optab_fn): Likewise.
12199 (direct_fold_left_optab_supported_p): Likewise.
12200 * fold-const-call.c (fold_const_fold_left): New function.
12201 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
12202 * tree-parloops.c (valid_reduction_p): New function.
12203 (gather_scalar_reductions): Use it.
12204 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
12205 (vect_finish_replace_stmt): Declare.
12206 * tree-vect-loop.c (fold_left_reduction_fn): New function.
12207 (needs_fold_left_reduction_p): New function, split out from...
12208 (vect_is_simple_reduction): ...here. Accept reductions that
12209 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
12210 (vect_force_simple_reduction): Also store the reduction type in
12211 the assignment's STMT_VINFO_REDUC_TYPE.
12212 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
12213 (merge_with_identity): New function.
12214 (vect_expand_fold_left): Likewise.
12215 (vectorize_fold_left_reduction): Likewise.
12216 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
12217 scalar phi in place for it. Check for target support and reject
12218 cases that would reassociate the operation. Defer the transform
12219 phase to vectorize_fold_left_reduction.
12220 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
12221 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
12222 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
12223
12224 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12225
12226 * tree-if-conv.c (predicate_mem_writes): Remove redundant
12227 call to ifc_temp_var.
12228
12229 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12230 Alan Hayward <alan.hayward@arm.com>
12231 David Sherwood <david.sherwood@arm.com>
12232
12233 * target.def (legitimize_address_displacement): Take the original
12234 offset as a poly_int.
12235 * targhooks.h (default_legitimize_address_displacement): Update
12236 accordingly.
12237 * targhooks.c (default_legitimize_address_displacement): Likewise.
12238 * doc/tm.texi: Regenerate.
12239 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
12240 as an argument, moving assert of ad->disp == ad->disp_term to...
12241 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
12242 Try calling targetm.legitimize_address_displacement before expanding
12243 the address rather than afterwards, and adjust for the new interface.
12244 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
12245 Match the new hook interface. Handle SVE addresses.
12246 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
12247 new hook interface.
12248
12249 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12250
12251 * Makefile.in (OBJS): Add early-remat.o.
12252 * target.def (select_early_remat_modes): New hook.
12253 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
12254 * doc/tm.texi: Regenerate.
12255 * targhooks.h (default_select_early_remat_modes): Declare.
12256 * targhooks.c (default_select_early_remat_modes): New function.
12257 * timevar.def (TV_EARLY_REMAT): New timevar.
12258 * passes.def (pass_early_remat): New pass.
12259 * tree-pass.h (make_pass_early_remat): Declare.
12260 * early-remat.c: New file.
12261 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
12262 function.
12263 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
12264
12265 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12266 Alan Hayward <alan.hayward@arm.com>
12267 David Sherwood <david.sherwood@arm.com>
12268
12269 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
12270 vfm1 with a bound_epilog parameter.
12271 (vect_do_peeling): Update calls accordingly, and move the prologue
12272 call earlier in the function. Treat the base bound_epilog as 0 for
12273 fully-masked loops and retain vf - 1 for other loops. Add 1 to
12274 this base when peeling for gaps.
12275 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
12276 with fully-masked loops.
12277 (vect_estimate_min_profitable_iters): Handle the single peeled
12278 iteration in that case.
12279
12280 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12281 Alan Hayward <alan.hayward@arm.com>
12282 David Sherwood <david.sherwood@arm.com>
12283
12284 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
12285 single-element interleaving even if the size is not a power of 2.
12286 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
12287 accesses for single-element interleaving if the group size is
12288 not a power of 2.
12289
12290 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12291 Alan Hayward <alan.hayward@arm.com>
12292 David Sherwood <david.sherwood@arm.com>
12293
12294 * doc/md.texi (fold_extract_last_@var{m}): Document.
12295 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
12296 * optabs.def (fold_extract_last_optab): New optab.
12297 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
12298 * internal-fn.c (fold_extract_direct): New macro.
12299 (expand_fold_extract_optab_fn): Likewise.
12300 (direct_fold_extract_optab_supported_p): Likewise.
12301 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
12302 * tree-vect-loop.c (vect_model_reduction_cost): Handle
12303 EXTRACT_LAST_REDUCTION.
12304 (get_initial_def_for_reduction): Do not create an initial vector
12305 for EXTRACT_LAST_REDUCTION reductions.
12306 (vectorizable_reduction): Leave the scalar phi in place for
12307 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
12308 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
12309 epilogue code for EXTRACT_LAST_REDUCTION and defer the
12310 transform phase to vectorizable_condition.
12311 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
12312 split out from...
12313 (vect_finish_stmt_generation): ...here.
12314 (vect_finish_replace_stmt): New function.
12315 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
12316 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
12317 pattern.
12318 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
12319
12320 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12321 Alan Hayward <alan.hayward@arm.com>
12322 David Sherwood <david.sherwood@arm.com>
12323
12324 * doc/md.texi (extract_last_@var{m}): Document.
12325 * optabs.def (extract_last_optab): New optab.
12326 * internal-fn.def (EXTRACT_LAST): New internal function.
12327 * internal-fn.c (cond_unary_direct): New macro.
12328 (expand_cond_unary_optab_fn): Likewise.
12329 (direct_cond_unary_optab_supported_p): Likewise.
12330 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
12331 loops using EXTRACT_LAST.
12332 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
12333 (extract_last_<mode>): ...this optab.
12334 (vec_extract<mode><Vel>): Update accordingly.
12335
12336 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12337 Alan Hayward <alan.hayward@arm.com>
12338 David Sherwood <david.sherwood@arm.com>
12339
12340 * target.def (empty_mask_is_expensive): New hook.
12341 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
12342 * doc/tm.texi: Regenerate.
12343 * targhooks.h (default_empty_mask_is_expensive): Declare.
12344 * targhooks.c (default_empty_mask_is_expensive): New function.
12345 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
12346 if the target says that empty masks are expensive.
12347 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
12348 New function.
12349 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
12350
12351 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12352 Alan Hayward <alan.hayward@arm.com>
12353 David Sherwood <david.sherwood@arm.com>
12354
12355 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
12356 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
12357 (vect_use_loop_mask_for_alignment_p): New function.
12358 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
12359 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
12360 niters_skip argument. Make sure that the first niters_skip elements
12361 of the first iteration are inactive.
12362 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
12363 Update call to vect_set_loop_masks_directly.
12364 (get_misalign_in_elems): New function, split out from...
12365 (vect_gen_prolog_loop_niters): ...here.
12366 (vect_update_init_of_dr): Take a code argument that specifies whether
12367 the adjustment should be added or subtracted.
12368 (vect_update_init_of_drs): Likewise.
12369 (vect_prepare_for_masked_peels): New function.
12370 (vect_do_peeling): Skip prologue peeling if we're using a mask
12371 instead. Update call to vect_update_inits_of_drs.
12372 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12373 mask_skip_niters.
12374 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
12375 alignment. Do not include the number of peeled iterations in
12376 the minimum threshold in that case.
12377 (vectorizable_induction): Adjust the start value down by
12378 LOOP_VINFO_MASK_SKIP_NITERS iterations.
12379 (vect_transform_loop): Call vect_prepare_for_masked_peels.
12380 Take the number of skipped iterations into account when calculating
12381 the loop bounds.
12382 * tree-vect-stmts.c (vect_gen_while_not): New function.
12383
12384 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12385 Alan Hayward <alan.hayward@arm.com>
12386 David Sherwood <david.sherwood@arm.com>
12387
12388 * doc/sourcebuild.texi (vect_fully_masked): Document.
12389 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
12390 default value to 0.
12391 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
12392 split out from...
12393 (vect_analyze_loop_2): ...here. Don't check the vectorization
12394 factor against the number of loop iterations if the loop is
12395 fully-masked.
12396
12397 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12398 Alan Hayward <alan.hayward@arm.com>
12399 David Sherwood <david.sherwood@arm.com>
12400
12401 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
12402 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
12403 (dump_groups): Update accordingly.
12404 (iv_use::mem_type): New member variable.
12405 (address_p): New function.
12406 (record_use): Add a mem_type argument and initialize the new
12407 mem_type field.
12408 (record_group_use): Add a mem_type argument. Use address_p.
12409 Remove obsolete null checks of base_object. Update call to record_use.
12410 (find_interesting_uses_op): Update call to record_group_use.
12411 (find_interesting_uses_cond): Likewise.
12412 (find_interesting_uses_address): Likewise.
12413 (get_mem_type_for_internal_fn): New function.
12414 (find_address_like_use): Likewise.
12415 (find_interesting_uses_stmt): Try find_address_like_use before
12416 calling find_interesting_uses_op.
12417 (addr_offset_valid_p): Use the iv mem_type field as the type
12418 of the addressed memory.
12419 (add_autoinc_candidates): Likewise.
12420 (get_address_cost): Likewise.
12421 (split_small_address_groups_p): Use address_p.
12422 (split_address_groups): Likewise.
12423 (add_iv_candidate_for_use): Likewise.
12424 (autoinc_possible_for_pair): Likewise.
12425 (rewrite_groups): Likewise.
12426 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
12427 (determine_group_iv_cost): Update after split of USE_ADDRESS.
12428 (get_alias_ptr_type_for_ptr_address): New function.
12429 (rewrite_use_address): Rewrite address uses in calls that were
12430 identified by find_address_like_use.
12431
12432 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12433 Alan Hayward <alan.hayward@arm.com>
12434 David Sherwood <david.sherwood@arm.com>
12435
12436 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
12437 TARGET_MEM_REFs.
12438 * gimple-expr.h (is_gimple_addressable: Likewise.
12439 * gimple-expr.c (is_gimple_address): Likewise.
12440 * internal-fn.c (expand_call_mem_ref): New function.
12441 (expand_mask_load_optab_fn): Use it.
12442 (expand_mask_store_optab_fn): Likewise.
12443
12444 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12445 Alan Hayward <alan.hayward@arm.com>
12446 David Sherwood <david.sherwood@arm.com>
12447
12448 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
12449 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
12450 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
12451 (cond_umax@var{mode}): Document.
12452 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
12453 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
12454 (cond_umin_optab, cond_umax_optab): New optabs.
12455 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
12456 (COND_IOR, COND_XOR): New internal functions.
12457 * internal-fn.h (get_conditional_internal_fn): Declare.
12458 * internal-fn.c (cond_binary_direct): New macro.
12459 (expand_cond_binary_optab_fn): Likewise.
12460 (direct_cond_binary_optab_supported_p): Likewise.
12461 (get_conditional_internal_fn): New function.
12462 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
12463 Cope with reduction statements that are vectorized as calls rather
12464 than assignments.
12465 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
12466 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
12467 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
12468 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
12469 (UNSPEC_COND_EOR): New unspecs.
12470 (optab): Add mappings for them.
12471 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
12472 (sve_int_op, sve_fp_op): New int attributes.
12473
12474 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12475 Alan Hayward <alan.hayward@arm.com>
12476 David Sherwood <david.sherwood@arm.com>
12477
12478 * optabs.def (while_ult_optab): New optab.
12479 * doc/md.texi (while_ult@var{m}@var{n}): Document.
12480 * internal-fn.def (WHILE_ULT): New internal function.
12481 * internal-fn.h (direct_internal_fn_supported_p): New override
12482 that takes two types as argument.
12483 * internal-fn.c (while_direct): New macro.
12484 (expand_while_optab_fn): New function.
12485 (convert_optab_supported_p): Likewise.
12486 (direct_while_optab_supported_p): New macro.
12487 * wide-int.h (wi::udiv_ceil): New function.
12488 * tree-vectorizer.h (rgroup_masks): New structure.
12489 (vec_loop_masks): New typedef.
12490 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
12491 and fully_masked_p.
12492 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
12493 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
12494 (vect_max_vf): New function.
12495 (slpeel_make_loop_iterate_ntimes): Delete.
12496 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
12497 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
12498 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
12499 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
12500 internal-fn.h, stor-layout.h and optabs-query.h.
12501 (vect_set_loop_mask): New function.
12502 (add_preheader_seq): Likewise.
12503 (add_header_seq): Likewise.
12504 (interleave_supported_p): Likewise.
12505 (vect_maybe_permute_loop_masks): Likewise.
12506 (vect_set_loop_masks_directly): Likewise.
12507 (vect_set_loop_condition_masked): Likewise.
12508 (vect_set_loop_condition_unmasked): New function, split out from
12509 slpeel_make_loop_iterate_ntimes.
12510 (slpeel_make_loop_iterate_ntimes): Rename to..
12511 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
12512 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
12513 (vect_do_peeling): Update call accordingly.
12514 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
12515 loops.
12516 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12517 mask_compare_type, can_fully_mask_p and fully_masked_p.
12518 (release_vec_loop_masks): New function.
12519 (_loop_vec_info): Use it to free the loop masks.
12520 (can_produce_all_loop_masks_p): New function.
12521 (vect_get_max_nscalars_per_iter): Likewise.
12522 (vect_verify_full_masking): Likewise.
12523 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
12524 retries, and free the mask rgroups before retrying. Check loop-wide
12525 reasons for disallowing fully-masked loops. Make the final decision
12526 about whether use a fully-masked loop or not.
12527 (vect_estimate_min_profitable_iters): Do not assume that peeling
12528 for the number of iterations will be needed for fully-masked loops.
12529 (vectorizable_reduction): Disable fully-masked loops.
12530 (vectorizable_live_operation): Likewise.
12531 (vect_halve_mask_nunits): New function.
12532 (vect_double_mask_nunits): Likewise.
12533 (vect_record_loop_mask): Likewise.
12534 (vect_get_loop_mask): Likewise.
12535 (vect_transform_loop): Handle the case in which the final loop
12536 iteration might handle a partial vector. Call vect_set_loop_condition
12537 instead of slpeel_make_loop_iterate_ntimes.
12538 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
12539 (check_load_store_masking): New function.
12540 (prepare_load_store_mask): Likewise.
12541 (vectorizable_store): Handle fully-masked loops.
12542 (vectorizable_load): Likewise.
12543 (supportable_widening_operation): Use vect_halve_mask_nunits for
12544 booleans.
12545 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
12546 (vect_gen_while): New function.
12547 * config/aarch64/aarch64.md (umax<mode>3): New expander.
12548 (aarch64_uqdec<mode>): New insn.
12549
12550 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12551 Alan Hayward <alan.hayward@arm.com>
12552 David Sherwood <david.sherwood@arm.com>
12553
12554 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
12555 (reduc_xor_scal_optab): New optabs.
12556 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
12557 (reduc_xor_scal_@var{m}): Document.
12558 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
12559 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
12560 internal functions.
12561 * fold-const-call.c (fold_const_call): Handle them.
12562 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
12563 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
12564 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
12565 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
12566 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
12567 (UNSPEC_XORV): New unspecs.
12568 (optab): Add entries for them.
12569 (BITWISEV): New int iterator.
12570 (bit_reduc_op): New int attributes.
12571
12572 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12573 Alan Hayward <alan.hayward@arm.com>
12574 David Sherwood <david.sherwood@arm.com>
12575
12576 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
12577 * internal-fn.def (VEC_SHL_INSERT): New internal function.
12578 * optabs.def (vec_shl_insert_optab): New optab.
12579 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
12580 (duplicate_and_interleave): Likewise.
12581 * tree-vect-loop.c: Include internal-fn.h.
12582 (neutral_op_for_slp_reduction): New function, split out from
12583 get_initial_defs_for_reduction.
12584 (get_initial_def_for_reduction): Handle option 2 for variable-length
12585 vectors by loading the neutral value into a vector and then shifting
12586 the initial value into element 0.
12587 (get_initial_defs_for_reduction): Replace the code argument with
12588 the neutral value calculated by neutral_op_for_slp_reduction.
12589 Use gimple_build_vector for constant-length vectors.
12590 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
12591 but the first group_size elements have a neutral value.
12592 Use duplicate_and_interleave otherwise.
12593 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
12594 Update call to get_initial_defs_for_reduction. Handle SLP
12595 reductions for variable-length vectors by creating one vector
12596 result for each scalar result, with the elements associated
12597 with other scalar results stubbed out with the neutral value.
12598 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
12599 Require IFN_VEC_SHL_INSERT for double reductions on
12600 variable-length vectors, or SLP reductions that have
12601 a neutral value. Require can_duplicate_and_interleave_p
12602 support for variable-length unchained SLP reductions if there
12603 is no neutral value, such as for MIN/MAX reductions. Also require
12604 the number of vector elements to be a multiple of the number of
12605 SLP statements when doing variable-length unchained SLP reductions.
12606 Update call to vect_create_epilog_for_reduction.
12607 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
12608 and remove initial values.
12609 (duplicate_and_interleave): Make public.
12610 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
12611 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
12612
12613 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12614 Alan Hayward <alan.hayward@arm.com>
12615 David Sherwood <david.sherwood@arm.com>
12616
12617 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
12618 (can_duplicate_and_interleave_p): New function.
12619 (vect_get_and_check_slp_defs): Take the vector of statements
12620 rather than just the current one. Remove excess parentheses.
12621 Restriction rejectinon of vect_constant_def and vect_external_def
12622 for variable-length vectors to boolean types, or types for which
12623 can_duplicate_and_interleave_p is false.
12624 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
12625 (duplicate_and_interleave): New function.
12626 (vect_get_constant_vectors): Use gimple_build_vector for
12627 constant-length vectors and suitable variable-length constant
12628 vectors. Use duplicate_and_interleave for other variable-length
12629 vectors. Don't defer the update when inserting new statements.
12630
12631 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12632 Alan Hayward <alan.hayward@arm.com>
12633 David Sherwood <david.sherwood@arm.com>
12634
12635 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
12636 min_profitable_iters doesn't go negative.
12637
12638 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12639 Alan Hayward <alan.hayward@arm.com>
12640 David Sherwood <david.sherwood@arm.com>
12641
12642 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
12643 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
12644 * optabs.def (vec_mask_load_lanes_optab): New optab.
12645 (vec_mask_store_lanes_optab): Likewise.
12646 * internal-fn.def (MASK_LOAD_LANES): New internal function.
12647 (MASK_STORE_LANES): Likewise.
12648 * internal-fn.c (mask_load_lanes_direct): New macro.
12649 (mask_store_lanes_direct): Likewise.
12650 (expand_mask_load_optab_fn): Handle masked operations.
12651 (expand_mask_load_lanes_optab_fn): New macro.
12652 (expand_mask_store_optab_fn): Handle masked operations.
12653 (expand_mask_store_lanes_optab_fn): New macro.
12654 (direct_mask_load_lanes_optab_supported_p): Likewise.
12655 (direct_mask_store_lanes_optab_supported_p): Likewise.
12656 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
12657 parameter.
12658 (vect_load_lanes_supported): Likewise.
12659 * tree-vect-data-refs.c (strip_conversion): New function.
12660 (can_group_stmts_p): Likewise.
12661 (vect_analyze_data_ref_accesses): Use it instead of checking
12662 for a pair of assignments.
12663 (vect_store_lanes_supported): Take a masked_p parameter.
12664 (vect_load_lanes_supported): Likewise.
12665 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
12666 vect_store_lanes_supported and vect_load_lanes_supported.
12667 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12668 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
12669 parameter. Don't allow gaps for masked accesses.
12670 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
12671 and vect_load_lanes_supported.
12672 (get_load_store_type): Take a masked_p parameter and update
12673 call to get_group_load_store_type.
12674 (vectorizable_store): Update call to get_load_store_type.
12675 Handle IFN_MASK_STORE_LANES.
12676 (vectorizable_load): Update call to get_load_store_type.
12677 Handle IFN_MASK_LOAD_LANES.
12678
12679 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12680 Alan Hayward <alan.hayward@arm.com>
12681 David Sherwood <david.sherwood@arm.com>
12682
12683 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
12684 modes for SVE.
12685 * config/aarch64/aarch64-protos.h
12686 (aarch64_sve_struct_memory_operand_p): Declare.
12687 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
12688 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
12689 (VPRED, vpred): Handle SVE structure modes.
12690 * config/aarch64/constraints.md (Utx): New constraint.
12691 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
12692 (aarch64_sve_struct_nonimmediate_operand): New predicates.
12693 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
12694 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
12695 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
12696 structure modes. Split into pieces after RA.
12697 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
12698 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
12699 New patterns.
12700 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
12701 SVE structure modes.
12702 (aarch64_classify_address): Likewise.
12703 (sizetochar): Move earlier in file.
12704 (aarch64_print_operand): Handle SVE register lists.
12705 (aarch64_array_mode): New function.
12706 (aarch64_sve_struct_memory_operand_p): Likewise.
12707 (TARGET_ARRAY_MODE): Redefine.
12708
12709 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12710 Alan Hayward <alan.hayward@arm.com>
12711 David Sherwood <david.sherwood@arm.com>
12712
12713 * target.def (array_mode): New target hook.
12714 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
12715 * doc/tm.texi: Regenerate.
12716 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
12717 * hooks.c (hook_optmode_mode_uhwi_none): New function.
12718 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
12719 targetm.array_mode.
12720 * stor-layout.c (mode_for_array): Likewise. Support polynomial
12721 type sizes.
12722
12723 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12724 Alan Hayward <alan.hayward@arm.com>
12725 David Sherwood <david.sherwood@arm.com>
12726
12727 * fold-const.c (fold_binary_loc): Check the argument types
12728 rather than the result type when testing for a vector operation.
12729
12730 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12731
12732 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
12733 * doc/tm.texi: Regenerate.
12734
12735 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12736 Alan Hayward <alan.hayward@arm.com>
12737 David Sherwood <david.sherwood@arm.com>
12738
12739 * doc/invoke.texi (-msve-vector-bits=): Document new option.
12740 (sve): Document new AArch64 extension.
12741 * doc/md.texi (w): Extend the description of the AArch64
12742 constraint to include SVE vectors.
12743 (Upl, Upa): Document new AArch64 predicate constraints.
12744 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
12745 enum.
12746 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
12747 (msve-vector-bits=): New option.
12748 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
12749 SVE when these are disabled.
12750 (sve): New extension.
12751 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
12752 modes. Adjust their number of units based on aarch64_sve_vg.
12753 (MAX_BITSIZE_MODE_ANY_MODE): Define.
12754 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
12755 aarch64_addr_query_type.
12756 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
12757 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
12758 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
12759 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
12760 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
12761 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
12762 (aarch64_simd_imm_zero_p): Delete.
12763 (aarch64_check_zero_based_sve_index_immediate): Declare.
12764 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
12765 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
12766 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
12767 (aarch64_sve_float_mul_immediate_p): Likewise.
12768 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
12769 rather than an rtx.
12770 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
12771 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
12772 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
12773 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
12774 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
12775 (aarch64_regmode_natural_size): Likewise.
12776 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
12777 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
12778 left one place.
12779 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
12780 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
12781 for VG and the SVE predicate registers.
12782 (V_ALIASES): Add a "z"-prefixed alias.
12783 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
12784 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
12785 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
12786 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
12787 (REG_CLASS_NAMES): Add entries for them.
12788 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
12789 and the predicate registers.
12790 (aarch64_sve_vg): Declare.
12791 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
12792 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
12793 (REGMODE_NATURAL_SIZE): Define.
12794 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
12795 SVE macros.
12796 * config/aarch64/aarch64.c: Include cfgrtl.h.
12797 (simd_immediate_info): Add a constructor for series vectors,
12798 and an associated step field.
12799 (aarch64_sve_vg): New variable.
12800 (aarch64_dbx_register_number): Handle VG and the predicate registers.
12801 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
12802 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
12803 (VEC_ANY_DATA, VEC_STRUCT): New constants.
12804 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
12805 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
12806 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
12807 (aarch64_get_mask_mode): New functions.
12808 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
12809 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
12810 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
12811 predicate modes and predicate registers. Explicitly restrict
12812 GPRs to modes of 16 bytes or smaller. Only allow FP registers
12813 to store a vector mode if it is recognized by
12814 aarch64_classify_vector_mode.
12815 (aarch64_regmode_natural_size): New function.
12816 (aarch64_hard_regno_caller_save_mode): Return the original mode
12817 for predicates.
12818 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
12819 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
12820 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
12821 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
12822 functions.
12823 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
12824 does not overlap dest if the function is frame-related. Handle
12825 SVE constants.
12826 (aarch64_split_add_offset): New function.
12827 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
12828 them aarch64_add_offset.
12829 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
12830 and update call to aarch64_sub_sp.
12831 (aarch64_add_cfa_expression): New function.
12832 (aarch64_expand_prologue): Pass extra temporary registers to the
12833 functions above. Handle the case in which we need to emit new
12834 DW_CFA_expressions for registers that were originally saved
12835 relative to the stack pointer, but now have to be expressed
12836 relative to the frame pointer.
12837 (aarch64_output_mi_thunk): Pass extra temporary registers to the
12838 functions above.
12839 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
12840 IP0 and IP1 values for SVE frames.
12841 (aarch64_expand_vec_series): New function.
12842 (aarch64_expand_sve_widened_duplicate): Likewise.
12843 (aarch64_expand_sve_const_vector): Likewise.
12844 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
12845 Handle SVE constants. Use emit_move_insn to move a force_const_mem
12846 into the register, rather than emitting a SET directly.
12847 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
12848 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
12849 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
12850 (offset_9bit_signed_scaled_p): New functions.
12851 (aarch64_replicate_bitmask_imm): New function.
12852 (aarch64_bitmask_imm): Use it.
12853 (aarch64_cannot_force_const_mem): Reject expressions involving
12854 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
12855 (aarch64_classify_index): Handle SVE indices, by requiring
12856 a plain register index with a scale that matches the element size.
12857 (aarch64_classify_address): Handle SVE addresses. Assert that
12858 the mode of the address is VOIDmode or an integer mode.
12859 Update call to aarch64_classify_symbol.
12860 (aarch64_classify_symbolic_expression): Update call to
12861 aarch64_classify_symbol.
12862 (aarch64_const_vec_all_in_range_p): New function.
12863 (aarch64_print_vector_float_operand): Likewise.
12864 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
12865 "vN" for FP registers with SVE modes. Handle (const ...) vectors
12866 and the FP immediates 1.0 and 0.5.
12867 (aarch64_print_address_internal): Handle SVE addresses.
12868 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
12869 (aarch64_regno_regclass): Handle predicate registers.
12870 (aarch64_secondary_reload): Handle big-endian reloads of SVE
12871 data modes.
12872 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
12873 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
12874 (aarch64_convert_sve_vector_bits): New function.
12875 (aarch64_override_options): Use it to handle -msve-vector-bits=.
12876 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
12877 rather than an rtx.
12878 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
12879 Handle SVE vector and predicate modes. Accept VL-based constants
12880 that need only one temporary register, and VL offsets that require
12881 no temporary registers.
12882 (aarch64_conditional_register_usage): Mark the predicate registers
12883 as fixed if SVE isn't available.
12884 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
12885 Return true for SVE vector and predicate modes.
12886 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
12887 rather than an unsigned int. Handle SVE modes.
12888 (aarch64_preferred_simd_mode): Update call accordingly. Handle
12889 SVE modes.
12890 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
12891 if SVE is enabled.
12892 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
12893 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
12894 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
12895 (aarch64_sve_float_mul_immediate_p): New functions.
12896 (aarch64_sve_valid_immediate): New function.
12897 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
12898 Explicitly reject structure modes. Check for INDEX constants.
12899 Handle PTRUE and PFALSE constants.
12900 (aarch64_check_zero_based_sve_index_immediate): New function.
12901 (aarch64_simd_imm_zero_p): Delete.
12902 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
12903 vector modes. Accept constants in the range of CNT[BHWD].
12904 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
12905 ask for an Advanced SIMD mode.
12906 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
12907 (aarch64_simd_vector_alignment): Handle SVE predicates.
12908 (aarch64_vectorize_preferred_vector_alignment): New function.
12909 (aarch64_simd_vector_alignment_reachable): Use it instead of
12910 the vector size.
12911 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
12912 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
12913 functions.
12914 (MAX_VECT_LEN): Delete.
12915 (expand_vec_perm_d): Add a vec_flags field.
12916 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
12917 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
12918 (aarch64_evpc_ext): Don't apply a big-endian lane correction
12919 for SVE modes.
12920 (aarch64_evpc_rev): Rename to...
12921 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
12922 (aarch64_evpc_rev_global): New function.
12923 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
12924 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
12925 MAX_VECT_LEN.
12926 (aarch64_evpc_sve_tbl): New function.
12927 (aarch64_expand_vec_perm_const_1): Update after rename of
12928 aarch64_evpc_rev. Handle SVE permutes too, trying
12929 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
12930 than aarch64_evpc_tbl.
12931 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
12932 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
12933 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
12934 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
12935 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
12936 (aarch64_expand_sve_vcond): New functions.
12937 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
12938 of aarch64_vector_mode_p.
12939 (aarch64_dwarf_poly_indeterminate_value): New function.
12940 (aarch64_compute_pressure_classes): Likewise.
12941 (aarch64_can_change_mode_class): Likewise.
12942 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
12943 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
12944 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
12945 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
12946 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
12947 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
12948 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
12949 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
12950 constraints.
12951 (Dn, Dl, Dr): Accept const as well as const_vector.
12952 (Dz): Likewise. Compare against CONST0_RTX.
12953 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
12954 of "vector" where appropriate.
12955 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
12956 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
12957 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
12958 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
12959 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
12960 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
12961 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
12962 (v_int_equiv): Extend to SVE modes.
12963 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
12964 mode attributes.
12965 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
12966 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
12967 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
12968 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
12969 (SVE_COND_FP_CMP): New int iterators.
12970 (perm_hilo): Handle the new unpack unspecs.
12971 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
12972 attributes.
12973 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
12974 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
12975 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
12976 (aarch64_equality_operator, aarch64_constant_vector_operand)
12977 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
12978 (aarch64_sve_nonimmediate_operand): Likewise.
12979 (aarch64_sve_general_operand): Likewise.
12980 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
12981 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
12982 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
12983 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
12984 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
12985 (aarch64_sve_float_arith_immediate): Likewise.
12986 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
12987 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
12988 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
12989 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
12990 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
12991 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
12992 (aarch64_sve_float_arith_operand): Likewise.
12993 (aarch64_sve_float_arith_with_sub_operand): Likewise.
12994 (aarch64_sve_float_mul_operand): Likewise.
12995 (aarch64_sve_vec_perm_operand): Likewise.
12996 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
12997 (aarch64_mov_operand): Accept const_poly_int and const_vector.
12998 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
12999 as well as const_vector.
13000 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
13001 in file. Use CONST0_RTX and CONSTM1_RTX.
13002 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
13003 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
13004 Use aarch64_simd_imm_zero.
13005 * config/aarch64/aarch64-sve.md: New file.
13006 * config/aarch64/aarch64.md: Include it.
13007 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
13008 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
13009 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
13010 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
13011 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
13012 (sve): New attribute.
13013 (enabled): Disable instructions with the sve attribute unless
13014 TARGET_SVE.
13015 (movqi, movhi): Pass CONST_POLY_INT operaneds through
13016 aarch64_expand_mov_immediate.
13017 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
13018 CNT[BHSD] immediates.
13019 (movti): Split CONST_POLY_INT moves into two halves.
13020 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
13021 Split additions that need a temporary here if the destination
13022 is the stack pointer.
13023 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
13024 (*add<mode>3_poly_1): New instruction.
13025 (set_clobber_cc): New expander.
13026
13027 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13028
13029 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
13030 parameter and use it instead of GET_MODE_SIZE (innermode). Use
13031 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
13032 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
13033 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
13034 Change innermode from fixed_mode_size to machine_mode.
13035 (simplify_subreg): Update call accordingly. Handle a constant-sized
13036 subreg of a variable-length CONST_VECTOR.
13037
13038 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13039 Alan Hayward <alan.hayward@arm.com>
13040 David Sherwood <david.sherwood@arm.com>
13041
13042 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
13043 (add_offset_to_base): New function, split out from...
13044 (create_mem_ref): ...here. When handling a scale other than 1,
13045 check first whether the address is valid without the offset.
13046 Add it into the base if so, leaving the index and scale as-is.
13047
13048 2018-01-12 Jakub Jelinek <jakub@redhat.com>
13049
13050 PR c++/83778
13051 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
13052 fold_for_warn before checking if arg2 is INTEGER_CST.
13053
13054 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
13055
13056 * config/rs6000/predicates.md (load_multiple_operation): Delete.
13057 (store_multiple_operation): Delete.
13058 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
13059 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
13060 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
13061 guarded by TARGET_STRING.
13062 (rs6000_output_load_multiple): Delete.
13063 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
13064 OPTION_MASK_STRING / TARGET_STRING handling.
13065 (print_operand) <'N', 'O'>: Add comment that these are unused now.
13066 (const rs6000_opt_masks) <"string">: Change mask to 0.
13067 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
13068 (MASK_STRING): Delete.
13069 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
13070 parts. Simplify.
13071 (load_multiple): Delete.
13072 (*ldmsi8): Delete.
13073 (*ldmsi7): Delete.
13074 (*ldmsi6): Delete.
13075 (*ldmsi5): Delete.
13076 (*ldmsi4): Delete.
13077 (*ldmsi3): Delete.
13078 (store_multiple): Delete.
13079 (*stmsi8): Delete.
13080 (*stmsi7): Delete.
13081 (*stmsi6): Delete.
13082 (*stmsi5): Delete.
13083 (*stmsi4): Delete.
13084 (*stmsi3): Delete.
13085 (movmemsi_8reg): Delete.
13086 (corresponding unnamed define_insn): Delete.
13087 (movmemsi_6reg): Delete.
13088 (corresponding unnamed define_insn): Delete.
13089 (movmemsi_4reg): Delete.
13090 (corresponding unnamed define_insn): Delete.
13091 (movmemsi_2reg): Delete.
13092 (corresponding unnamed define_insn): Delete.
13093 (movmemsi_1reg): Delete.
13094 (corresponding unnamed define_insn): Delete.
13095 * config/rs6000/rs6000.opt (mno-string): New.
13096 (mstring): Replace by deprecation warning stub.
13097 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
13098
13099 2018-01-12 Jakub Jelinek <jakub@redhat.com>
13100
13101 * regrename.c (regrename_do_replace): If replacing the same
13102 reg multiple times, try to reuse last created gen_raw_REG.
13103
13104 PR debug/81155
13105 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
13106 main to workaround a bug in GDB.
13107
13108 2018-01-12 Tom de Vries <tom@codesourcery.com>
13109
13110 PR target/83737
13111 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
13112
13113 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
13114
13115 PR rtl-optimization/80481
13116 * ira-color.c (get_cap_member): New function.
13117 (allocnos_conflict_by_live_ranges_p): Use it.
13118 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
13119 (setup_slot_coalesced_allocno_live_ranges): Ditto.
13120
13121 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
13122
13123 PR target/83628
13124 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
13125 (*saddl_se_1): Ditto.
13126 (*ssubsi_1): Ditto.
13127 (*ssubl_se_1): Ditto.
13128
13129 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
13130
13131 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
13132 rather than wi::to_widest for DR_INITs.
13133 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
13134 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
13135 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
13136 INTEGER_CSTs.
13137 (vect_analyze_group_access_1): Note that here.
13138
13139 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
13140
13141 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
13142 polynomial type sizes.
13143
13144 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
13145
13146 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
13147 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
13148 (gimple_add_tmp_var): Likewise.
13149
13150 2018-01-12 Martin Liska <mliska@suse.cz>
13151
13152 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
13153 (gimple_alloc_sizes): Likewise.
13154 (dump_gimple_statistics): Use PRIu64 in printf format.
13155 * gimple.h: Change uint64_t to int.
13156
13157 2018-01-12 Martin Liska <mliska@suse.cz>
13158
13159 * tree-core.h: Use uint64_t instead of int.
13160 * tree.c (tree_node_counts): Likewise.
13161 (tree_node_sizes): Likewise.
13162 (dump_tree_statistics): Use PRIu64 in printf format.
13163
13164 2018-01-12 Martin Liska <mliska@suse.cz>
13165
13166 * Makefile.in: As qsort_chk is implemented in vec.c, add
13167 vec.o to linkage of gencfn-macros.
13168 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
13169 passing the info to record_node_allocation_statistics.
13170 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
13171 and pass the info.
13172 * ggc-common.c (struct ggc_usage): Add operator== and use
13173 it in operator< and compare function.
13174 * mem-stats.h (struct mem_usage): Likewise.
13175 * vec.c (struct vec_usage): Remove operator< and compare
13176 function. Can be simply inherited.
13177
13178 2018-01-12 Martin Jambor <mjambor@suse.cz>
13179
13180 PR target/81616
13181 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
13182 * tree-ssa-math-opts.c: Include domwalk.h.
13183 (convert_mult_to_fma_1): New function.
13184 (fma_transformation_info): New type.
13185 (fma_deferring_state): Likewise.
13186 (cancel_fma_deferring): New function.
13187 (result_of_phi): Likewise.
13188 (last_fma_candidate_feeds_initial_phi): Likewise.
13189 (convert_mult_to_fma): Added deferring logic, split actual
13190 transformation to convert_mult_to_fma_1.
13191 (math_opts_dom_walker): New type.
13192 (math_opts_dom_walker::after_dom_children): New method, body moved
13193 here from pass_optimize_widening_mul::execute, added deferring logic
13194 bits.
13195 (pass_optimize_widening_mul::execute): Moved most of code to
13196 math_opts_dom_walker::after_dom_children.
13197 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
13198 * config/i386/i386.c (ix86_option_override_internal): Added
13199 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
13200
13201 2018-01-12 Richard Biener <rguenther@suse.de>
13202
13203 PR debug/83157
13204 * dwarf2out.c (gen_variable_die): Do not reset old_die for
13205 inline instance vars.
13206
13207 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
13208
13209 PR target/81819
13210 * config/rx/rx.c (rx_is_restricted_memory_address):
13211 Handle SUBREG case.
13212
13213 2018-01-12 Richard Biener <rguenther@suse.de>
13214
13215 PR tree-optimization/80846
13216 * target.def (split_reduction): New target hook.
13217 * targhooks.c (default_split_reduction): New function.
13218 * targhooks.h (default_split_reduction): Declare.
13219 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
13220 target requests first reduce vectors by combining low and high
13221 parts.
13222 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
13223 (get_vectype_for_scalar_type_and_size): Export.
13224 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
13225 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
13226 * doc/tm.texi: Regenerate.
13227 * config/i386/i386.c (ix86_split_reduction): Implement
13228 TARGET_VECTORIZE_SPLIT_REDUCTION.
13229
13230 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
13231
13232 PR target/83368
13233 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
13234 in PIC mode except for TARGET_VXWORKS_RTP.
13235 * config/sparc/sparc.c: Include cfgrtl.h.
13236 (TARGET_INIT_PIC_REG): Define.
13237 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
13238 (sparc_pic_register_p): New predicate.
13239 (sparc_legitimate_address_p): Use it.
13240 (sparc_legitimize_pic_address): Likewise.
13241 (sparc_delegitimize_address): Likewise.
13242 (sparc_mode_dependent_address_p): Likewise.
13243 (gen_load_pcrel_sym): Remove 4th parameter.
13244 (load_got_register): Adjust call to above. Remove obsolete stuff.
13245 (sparc_expand_prologue): Do not call load_got_register here.
13246 (sparc_flat_expand_prologue): Likewise.
13247 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
13248 (sparc_use_pseudo_pic_reg): New function.
13249 (sparc_init_pic_reg): Likewise.
13250 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
13251 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
13252
13253 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
13254
13255 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
13256 Add item for branch_cost.
13257
13258 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
13259
13260 PR rtl-optimization/83565
13261 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
13262 not extend the result to a larger mode for rotate operations.
13263 (num_sign_bit_copies1): Likewise.
13264
13265 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13266
13267 PR target/40411
13268 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
13269 -symbolic.
13270 Use values-Xc.o for -pedantic.
13271 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
13272
13273 2018-01-12 Martin Liska <mliska@suse.cz>
13274
13275 PR ipa/83054
13276 * ipa-devirt.c (final_warning_record::grow_type_warnings):
13277 New function.
13278 (possible_polymorphic_call_targets): Use it.
13279 (ipa_devirt): Likewise.
13280
13281 2018-01-12 Martin Liska <mliska@suse.cz>
13282
13283 * profile-count.h (enum profile_quality): Use 0 as invalid
13284 enum value of profile_quality.
13285
13286 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
13287
13288 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
13289 -mext-string options.
13290
13291 2018-01-12 Richard Biener <rguenther@suse.de>
13292
13293 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
13294 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
13295 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
13296 Likewise.
13297 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
13298
13299 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
13300
13301 * configure.ac (--with-long-double-format): Add support for the
13302 configuration option to change the default long double format on
13303 PowerPC systems.
13304 * config.gcc (powerpc*-linux*-*): Likewise.
13305 * configure: Regenerate.
13306 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
13307 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
13308 used without modification.
13309
13310 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13311
13312 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
13313 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
13314 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
13315 MISC_BUILTIN_SPEC_BARRIER.
13316 (rs6000_init_builtins): Likewise.
13317 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
13318 enum value.
13319 (speculation_barrier): New define_insn.
13320 * doc/extend.texi: Document __builtin_speculation_barrier.
13321
13322 2018-01-11 Jakub Jelinek <jakub@redhat.com>
13323
13324 PR target/83203
13325 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
13326 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
13327 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
13328 iterators.
13329 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
13330 integral modes instead of "ss" and "sd".
13331 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
13332 vectors with 32-bit and 64-bit elements.
13333 (vecdupssescalarmodesuffix): New mode attribute.
13334 (vec_dup<mode>): Use it.
13335
13336 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
13337
13338 PR target/83330
13339 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
13340 frame if argument is passed on stack.
13341
13342 2018-01-11 Jakub Jelinek <jakub@redhat.com>
13343
13344 PR target/82682
13345 * ree.c (combine_reaching_defs): Optimize also
13346 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
13347 reg2=any_extend(exp); reg1=reg2;, formatting fix.
13348
13349 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
13350
13351 PR middle-end/83189
13352 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
13353
13354 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
13355
13356 PR middle-end/83718
13357 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
13358 after they are computed.
13359
13360 2018-01-11 Bin Cheng <bin.cheng@arm.com>
13361
13362 PR tree-optimization/83695
13363 * gimple-loop-linterchange.cc
13364 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
13365 reset cached scev information after interchange.
13366 (pass_linterchange::execute): Remove call to scev_reset_htab.
13367
13368 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13369
13370 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
13371 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
13372 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
13373 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
13374 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
13375 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
13376 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
13377 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
13378 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
13379 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
13380 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
13381 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
13382 (V_lane_reg): Likewise.
13383 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
13384 New define_expand.
13385 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
13386 (vfmal_lane_low<mode>_intrinsic,
13387 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
13388 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
13389 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
13390 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
13391 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
13392 vfmsl_lane_high<mode>_intrinsic): New define_insns.
13393
13394 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13395
13396 * config/arm/arm-cpus.in (fp16fml): New feature.
13397 (ALL_SIMD): Add fp16fml.
13398 (armv8.2-a): Add fp16fml as an option.
13399 (armv8.3-a): Likewise.
13400 (armv8.4-a): Add fp16fml as part of fp16.
13401 * config/arm/arm.h (TARGET_FP16FML): Define.
13402 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
13403 when appropriate.
13404 * config/arm/arm-modes.def (V2HF): Define.
13405 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
13406 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
13407 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
13408 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
13409 vfmsl_low, vfmsl_high): New set of builtins.
13410 * config/arm/iterators.md (PLUSMINUS): New code iterator.
13411 (vfml_op): New code attribute.
13412 (VFMLHALVES): New int iterator.
13413 (VFML, VFMLSEL): New mode attributes.
13414 (V_reg): Define mapping for V2HF.
13415 (V_hi, V_lo): New mode attributes.
13416 (VF_constraint): Likewise.
13417 (vfml_half, vfml_half_selector): New int attributes.
13418 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
13419 define_expand.
13420 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
13421 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
13422 New define_insn.
13423 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
13424 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
13425 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
13426 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
13427 documentation.
13428 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
13429 Document new effective target and option set.
13430
13431 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13432
13433 * config/arm/arm-cpus.in (armv8_4): New feature.
13434 (ARMv8_4a): New fgroup.
13435 (armv8.4-a): New arch.
13436 * config/arm/arm-tables.opt: Regenerate.
13437 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
13438 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
13439 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
13440 Add matching rules for -march=armv8.4-a and extensions.
13441 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
13442
13443 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
13444
13445 PR target/81821
13446 * config/rx/rx.md (BW): New mode attribute.
13447 (sync_lock_test_and_setsi): Add mode suffix to insn output.
13448
13449 2018-01-11 Richard Biener <rguenther@suse.de>
13450
13451 PR tree-optimization/83435
13452 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
13453 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
13454 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
13455
13456 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13457 Alan Hayward <alan.hayward@arm.com>
13458 David Sherwood <david.sherwood@arm.com>
13459
13460 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
13461 field.
13462 (aarch64_classify_address): Initialize it. Track polynomial offsets.
13463 (aarch64_print_address_internal): Use it to check for a zero offset.
13464
13465 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13466 Alan Hayward <alan.hayward@arm.com>
13467 David Sherwood <david.sherwood@arm.com>
13468
13469 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
13470 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
13471 Return a poly_int64 rather than a HOST_WIDE_INT.
13472 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
13473 rather than a HOST_WIDE_INT.
13474 * config/aarch64/aarch64.h (aarch64_frame): Protect with
13475 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
13476 hard_fp_offset, frame_size, initial_adjust, callee_offset and
13477 final_offset from HOST_WIDE_INT to poly_int64.
13478 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
13479 to_constant when getting the number of units in an Advanced SIMD
13480 mode.
13481 (aarch64_builtin_vectorized_function): Check for a constant number
13482 of units.
13483 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
13484 GET_MODE_SIZE.
13485 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
13486 attribute instead of GET_MODE_NUNITS.
13487 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
13488 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
13489 GET_MODE_SIZE for fixed-size registers.
13490 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
13491 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
13492 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
13493 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
13494 (aarch64_print_operand, aarch64_print_address_internal)
13495 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
13496 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
13497 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
13498 Handle polynomial GET_MODE_SIZE.
13499 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
13500 wider than SImode without modification.
13501 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
13502 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
13503 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
13504 passing and returning SVE modes.
13505 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
13506 rather than GEN_INT.
13507 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
13508 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
13509 (aarch64_allocate_and_probe_stack_space): Likewise.
13510 (aarch64_layout_frame): Cope with polynomial offsets.
13511 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
13512 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
13513 polynomial offsets.
13514 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
13515 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
13516 poly_int64 rather than a HOST_WIDE_INT.
13517 (aarch64_get_separate_components, aarch64_process_components)
13518 (aarch64_expand_prologue, aarch64_expand_epilogue)
13519 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
13520 (aarch64_anchor_offset): New function, split out from...
13521 (aarch64_legitimize_address): ...here.
13522 (aarch64_builtin_vectorization_cost): Handle polynomial
13523 TYPE_VECTOR_SUBPARTS.
13524 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
13525 GET_MODE_NUNITS.
13526 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
13527 number of elements from the PARALLEL rather than the mode.
13528 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
13529 rather than GET_MODE_BITSIZE.
13530 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
13531 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
13532 (aarch64_expand_vec_perm_const_1): Handle polynomial
13533 d->perm.length () and d->perm elements.
13534 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
13535 Apply to_constant to d->perm elements.
13536 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
13537 polynomial CONST_VECTOR_NUNITS.
13538 (aarch64_move_pointer): Take amount as a poly_int64 rather
13539 than an int.
13540 (aarch64_progress_pointer): Avoid temporary variable.
13541 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
13542 the mode attribute instead of GET_MODE.
13543
13544 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13545 Alan Hayward <alan.hayward@arm.com>
13546 David Sherwood <david.sherwood@arm.com>
13547
13548 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
13549 x exists before using it.
13550 (aarch64_add_constant_internal): Rename to...
13551 (aarch64_add_offset_1): ...this. Replace regnum with separate
13552 src and dest rtxes. Handle the case in which they're different,
13553 including when the offset is zero. Replace scratchreg with an rtx.
13554 Use 2 additions if there is no spare register into which we can
13555 move a 16-bit constant.
13556 (aarch64_add_constant): Delete.
13557 (aarch64_add_offset): Replace reg with separate src and dest
13558 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
13559 Use aarch64_add_offset_1.
13560 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
13561 an rtx rather than an int. Take the delta as a poly_int64
13562 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
13563 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
13564 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
13565 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
13566 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
13567 and aarch64_add_sp.
13568 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
13569 aarch64_add_constant.
13570
13571 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13572
13573 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
13574 Use scalar_float_mode.
13575
13576 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13577
13578 * config/aarch64/aarch64-simd.md
13579 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
13580 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
13581 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
13582 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
13583 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
13584 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
13585 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
13586 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
13587 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
13588 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
13589
13590 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13591
13592 PR target/83514
13593 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
13594 targ_options->x_arm_arch_string is non NULL.
13595
13596 2018-01-11 Tamar Christina <tamar.christina@arm.com>
13597
13598 * config/aarch64/aarch64.h
13599 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
13600
13601 2018-01-11 Sudakshina Das <sudi.das@arm.com>
13602
13603 PR target/82096
13604 * expmed.c (emit_store_flag_force): Swap if const op0
13605 and change VOIDmode to mode of op0.
13606
13607 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13608
13609 PR rtl-optimization/83761
13610 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
13611 than bytes to mode_for_size.
13612
13613 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
13614
13615 PR middle-end/83189
13616 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
13617 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
13618 profile.
13619
13620 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
13621
13622 PR middle-end/83575
13623 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
13624 when in layout mode.
13625 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
13626 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
13627 partition fixup.
13628
13629 2018-01-10 Michael Collison <michael.collison@arm.com>
13630
13631 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
13632 * config/aarch64/aarch64-option-extension.def: Add
13633 AARCH64_OPT_EXTENSION of 'fp16fml'.
13634 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13635 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
13636 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
13637 * config/aarch64/constraints.md (Ui7): New constraint.
13638 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
13639 (VFMLA_SEL_W): Ditto.
13640 (f16quad): Ditto.
13641 (f16mac1): Ditto.
13642 (VFMLA16_LOW): New int iterator.
13643 (VFMLA16_HIGH): Ditto.
13644 (UNSPEC_FMLAL): New unspec.
13645 (UNSPEC_FMLSL): Ditto.
13646 (UNSPEC_FMLAL2): Ditto.
13647 (UNSPEC_FMLSL2): Ditto.
13648 (f16mac): New code attribute.
13649 * config/aarch64/aarch64-simd-builtins.def
13650 (aarch64_fmlal_lowv2sf): Ditto.
13651 (aarch64_fmlsl_lowv2sf): Ditto.
13652 (aarch64_fmlalq_lowv4sf): Ditto.
13653 (aarch64_fmlslq_lowv4sf): Ditto.
13654 (aarch64_fmlal_highv2sf): Ditto.
13655 (aarch64_fmlsl_highv2sf): Ditto.
13656 (aarch64_fmlalq_highv4sf): Ditto.
13657 (aarch64_fmlslq_highv4sf): Ditto.
13658 (aarch64_fmlal_lane_lowv2sf): Ditto.
13659 (aarch64_fmlsl_lane_lowv2sf): Ditto.
13660 (aarch64_fmlal_laneq_lowv2sf): Ditto.
13661 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
13662 (aarch64_fmlalq_lane_lowv4sf): Ditto.
13663 (aarch64_fmlsl_lane_lowv4sf): Ditto.
13664 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
13665 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
13666 (aarch64_fmlal_lane_highv2sf): Ditto.
13667 (aarch64_fmlsl_lane_highv2sf): Ditto.
13668 (aarch64_fmlal_laneq_highv2sf): Ditto.
13669 (aarch64_fmlsl_laneq_highv2sf): Ditto.
13670 (aarch64_fmlalq_lane_highv4sf): Ditto.
13671 (aarch64_fmlsl_lane_highv4sf): Ditto.
13672 (aarch64_fmlalq_laneq_highv4sf): Ditto.
13673 (aarch64_fmlsl_laneq_highv4sf): Ditto.
13674 * config/aarch64/aarch64-simd.md:
13675 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
13676 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
13677 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
13678 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
13679 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
13680 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
13681 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
13682 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
13683 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
13684 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
13685 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
13686 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
13687 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
13688 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
13689 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
13690 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
13691 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
13692 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
13693 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
13694 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
13695 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
13696 (vfmlsl_low_u32): Ditto.
13697 (vfmlalq_low_u32): Ditto.
13698 (vfmlslq_low_u32): Ditto.
13699 (vfmlal_high_u32): Ditto.
13700 (vfmlsl_high_u32): Ditto.
13701 (vfmlalq_high_u32): Ditto.
13702 (vfmlslq_high_u32): Ditto.
13703 (vfmlal_lane_low_u32): Ditto.
13704 (vfmlsl_lane_low_u32): Ditto.
13705 (vfmlal_laneq_low_u32): Ditto.
13706 (vfmlsl_laneq_low_u32): Ditto.
13707 (vfmlalq_lane_low_u32): Ditto.
13708 (vfmlslq_lane_low_u32): Ditto.
13709 (vfmlalq_laneq_low_u32): Ditto.
13710 (vfmlslq_laneq_low_u32): Ditto.
13711 (vfmlal_lane_high_u32): Ditto.
13712 (vfmlsl_lane_high_u32): Ditto.
13713 (vfmlal_laneq_high_u32): Ditto.
13714 (vfmlsl_laneq_high_u32): Ditto.
13715 (vfmlalq_lane_high_u32): Ditto.
13716 (vfmlslq_lane_high_u32): Ditto.
13717 (vfmlalq_laneq_high_u32): Ditto.
13718 (vfmlslq_laneq_high_u32): Ditto.
13719 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
13720 (AARCH64_FL_FOR_ARCH8_4): New.
13721 (AARCH64_ISA_F16FML): New ISA flag.
13722 (TARGET_F16FML): New feature flag for fp16fml.
13723 (doc/invoke.texi): Document new fp16fml option.
13724
13725 2018-01-10 Michael Collison <michael.collison@arm.com>
13726
13727 * config/aarch64/aarch64-builtins.c:
13728 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
13729 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13730 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
13731 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
13732 (AARCH64_ISA_SHA3): New ISA flag.
13733 (TARGET_SHA3): New feature flag for sha3.
13734 * config/aarch64/iterators.md (sha512_op): New int attribute.
13735 (CRYPTO_SHA512): New int iterator.
13736 (UNSPEC_SHA512H): New unspec.
13737 (UNSPEC_SHA512H2): Ditto.
13738 (UNSPEC_SHA512SU0): Ditto.
13739 (UNSPEC_SHA512SU1): Ditto.
13740 * config/aarch64/aarch64-simd-builtins.def
13741 (aarch64_crypto_sha512hqv2di): New builtin.
13742 (aarch64_crypto_sha512h2qv2di): Ditto.
13743 (aarch64_crypto_sha512su0qv2di): Ditto.
13744 (aarch64_crypto_sha512su1qv2di): Ditto.
13745 (aarch64_eor3qv8hi): Ditto.
13746 (aarch64_rax1qv2di): Ditto.
13747 (aarch64_xarqv2di): Ditto.
13748 (aarch64_bcaxqv8hi): Ditto.
13749 * config/aarch64/aarch64-simd.md:
13750 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
13751 (aarch64_crypto_sha512su0qv2di): Ditto.
13752 (aarch64_crypto_sha512su1qv2di): Ditto.
13753 (aarch64_eor3qv8hi): Ditto.
13754 (aarch64_rax1qv2di): Ditto.
13755 (aarch64_xarqv2di): Ditto.
13756 (aarch64_bcaxqv8hi): Ditto.
13757 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
13758 (vsha512h2q_u64): Ditto.
13759 (vsha512su0q_u64): Ditto.
13760 (vsha512su1q_u64): Ditto.
13761 (veor3q_u16): Ditto.
13762 (vrax1q_u64): Ditto.
13763 (vxarq_u64): Ditto.
13764 (vbcaxq_u16): Ditto.
13765 * config/arm/types.md (crypto_sha512): New type attribute.
13766 (crypto_sha3): Ditto.
13767 (doc/invoke.texi): Document new sha3 option.
13768
13769 2018-01-10 Michael Collison <michael.collison@arm.com>
13770
13771 * config/aarch64/aarch64-builtins.c:
13772 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
13773 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13774 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
13775 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
13776 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
13777 (AARCH64_ISA_SM4): New ISA flag.
13778 (TARGET_SM4): New feature flag for sm4.
13779 * config/aarch64/aarch64-simd-builtins.def
13780 (aarch64_sm3ss1qv4si): Ditto.
13781 (aarch64_sm3tt1aq4si): Ditto.
13782 (aarch64_sm3tt1bq4si): Ditto.
13783 (aarch64_sm3tt2aq4si): Ditto.
13784 (aarch64_sm3tt2bq4si): Ditto.
13785 (aarch64_sm3partw1qv4si): Ditto.
13786 (aarch64_sm3partw2qv4si): Ditto.
13787 (aarch64_sm4eqv4si): Ditto.
13788 (aarch64_sm4ekeyqv4si): Ditto.
13789 * config/aarch64/aarch64-simd.md:
13790 (aarch64_sm3ss1qv4si): Ditto.
13791 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
13792 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
13793 (aarch64_sm4eqv4si): Ditto.
13794 (aarch64_sm4ekeyqv4si): Ditto.
13795 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
13796 (sm3part_op): Ditto.
13797 (CRYPTO_SM3TT): Ditto.
13798 (CRYPTO_SM3PART): Ditto.
13799 (UNSPEC_SM3SS1): New unspec.
13800 (UNSPEC_SM3TT1A): Ditto.
13801 (UNSPEC_SM3TT1B): Ditto.
13802 (UNSPEC_SM3TT2A): Ditto.
13803 (UNSPEC_SM3TT2B): Ditto.
13804 (UNSPEC_SM3PARTW1): Ditto.
13805 (UNSPEC_SM3PARTW2): Ditto.
13806 (UNSPEC_SM4E): Ditto.
13807 (UNSPEC_SM4EKEY): Ditto.
13808 * config/aarch64/constraints.md (Ui2): New constraint.
13809 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
13810 * config/arm/types.md (crypto_sm3): New type attribute.
13811 (crypto_sm4): Ditto.
13812 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
13813 (vsm3tt1aq_u32): Ditto.
13814 (vsm3tt1bq_u32): Ditto.
13815 (vsm3tt2aq_u32): Ditto.
13816 (vsm3tt2bq_u32): Ditto.
13817 (vsm3partw1q_u32): Ditto.
13818 (vsm3partw2q_u32): Ditto.
13819 (vsm4eq_u32): Ditto.
13820 (vsm4ekeyq_u32): Ditto.
13821 (doc/invoke.texi): Document new sm4 option.
13822
13823 2018-01-10 Michael Collison <michael.collison@arm.com>
13824
13825 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
13826 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
13827 (AARCH64_FL_FOR_ARCH8_4): New.
13828 (AARCH64_FL_V8_4): New flag.
13829 (doc/invoke.texi): Document new armv8.4-a option.
13830
13831 2018-01-10 Michael Collison <michael.collison@arm.com>
13832
13833 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13834 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
13835 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
13836 * config/aarch64/aarch64-option-extension.def: Add
13837 AARCH64_OPT_EXTENSION of 'sha2'.
13838 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
13839 (crypto): Disable sha2 and aes if crypto disabled.
13840 (crypto): Enable aes and sha2 if enabled.
13841 (simd): Disable sha2 and aes if simd disabled.
13842 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
13843 New flags.
13844 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
13845 (TARGET_SHA2): New feature flag for sha2.
13846 (TARGET_AES): New feature flag for aes.
13847 * config/aarch64/aarch64-simd.md:
13848 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
13849 conditional on TARGET_AES.
13850 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
13851 (aarch64_crypto_sha1hsi): Make pattern conditional
13852 on TARGET_SHA2.
13853 (aarch64_crypto_sha1hv4si): Ditto.
13854 (aarch64_be_crypto_sha1hv4si): Ditto.
13855 (aarch64_crypto_sha1su1v4si): Ditto.
13856 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
13857 (aarch64_crypto_sha1su0v4si): Ditto.
13858 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
13859 (aarch64_crypto_sha256su0v4si): Ditto.
13860 (aarch64_crypto_sha256su1v4si): Ditto.
13861 (doc/invoke.texi): Document new aes and sha2 options.
13862
13863 2018-01-10 Martin Sebor <msebor@redhat.com>
13864
13865 PR tree-optimization/83781
13866 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
13867 as string arrays.
13868
13869 2018-01-11 Martin Sebor <msebor@gmail.com>
13870 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13871
13872 PR tree-optimization/83501
13873 PR tree-optimization/81703
13874
13875 * tree-ssa-strlen.c (get_string_cst): Rename...
13876 (get_string_len): ...to this. Handle global constants.
13877 (handle_char_store): Adjust.
13878
13879 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
13880 Jim Wilson <jimw@sifive.com>
13881
13882 * config/riscv/riscv-protos.h (riscv_output_return): New.
13883 * config/riscv/riscv.c (struct machine_function): New naked_p field.
13884 (riscv_attribute_table, riscv_output_return),
13885 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
13886 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
13887 (riscv_compute_frame_info): Only compute frame->mask if not a naked
13888 function.
13889 (riscv_expand_prologue): Add early return for naked function.
13890 (riscv_expand_epilogue): Likewise.
13891 (riscv_function_ok_for_sibcall): Return false for naked function.
13892 (riscv_set_current_function): New.
13893 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
13894 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
13895 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
13896 * doc/extend.texi (RISC-V Function Attributes): New.
13897
13898 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
13899
13900 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
13901 check for 128-bit long double before checking TCmode.
13902 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
13903 128-bit long doubles before checking TFmode or TCmode.
13904 (FLOAT128_IBM_P): Likewise.
13905
13906 2018-01-10 Martin Sebor <msebor@redhat.com>
13907
13908 PR tree-optimization/83671
13909 * builtins.c (c_strlen): Unconditionally return zero for the empty
13910 string.
13911 Use -Warray-bounds for warnings.
13912 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
13913 for non-constant array indices with COMPONENT_REF, arrays of
13914 arrays, and pointers to arrays.
13915 (gimple_fold_builtin_strlen): Determine and set length range for
13916 non-constant character arrays.
13917
13918 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
13919
13920 PR middle-end/81897
13921 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
13922 empty blocks.
13923
13924 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
13925
13926 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
13927
13928 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
13929
13930 PR target/83399
13931 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
13932 VECTOR_MEM_ALTIVEC_OR_VSX_P.
13933 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
13934 indexed_or_indirect_operand predicate.
13935 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
13936 (*vsx_le_perm_load_v8hi): Likewise.
13937 (*vsx_le_perm_load_v16qi): Likewise.
13938 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
13939 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
13940 (*vsx_le_perm_store_v8hi): Likewise.
13941 (*vsx_le_perm_store_v16qi): Likewise.
13942 (eight unnamed splitters): Likewise.
13943
13944 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
13945
13946 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
13947 * config/rs6000/emmintrin.h: Likewise.
13948 * config/rs6000/mmintrin.h: Likewise.
13949 * config/rs6000/xmmintrin.h: Likewise.
13950
13951 2018-01-10 David Malcolm <dmalcolm@redhat.com>
13952
13953 PR c++/43486
13954 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
13955 "public_flag".
13956 * tree.c (tree_nop_conversion): Return true for location wrapper
13957 nodes.
13958 (maybe_wrap_with_location): New function.
13959 (selftest::check_strip_nops): New function.
13960 (selftest::test_location_wrappers): New function.
13961 (selftest::tree_c_tests): Call it.
13962 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
13963 (maybe_wrap_with_location): New decl.
13964 (EXPR_LOCATION_WRAPPER_P): New macro.
13965 (location_wrapper_p): New inline function.
13966 (tree_strip_any_location_wrapper): New inline function.
13967
13968 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
13969
13970 PR target/83735
13971 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
13972 stack_realign_offset for the largest alignment of stack slot
13973 actually used.
13974 (ix86_find_max_used_stack_alignment): New function.
13975 (ix86_finalize_stack_frame_flags): Use it. Set
13976 max_used_stack_alignment if we don't realign stack.
13977 * config/i386/i386.h (machine_function): Add
13978 max_used_stack_alignment.
13979
13980 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
13981
13982 * config/arm/arm.opt (-mbranch-cost): New option.
13983 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
13984 account.
13985
13986 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
13987
13988 PR target/83629
13989 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
13990 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
13991
13992 2018-01-10 Richard Biener <rguenther@suse.de>
13993
13994 PR debug/83765
13995 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
13996 early out so it also covers the case where we have a non-NULL
13997 origin.
13998
13999 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
14000
14001 PR tree-optimization/83753
14002 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
14003 for non-strided grouped accesses if the number of elements is 1.
14004
14005 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
14006
14007 PR target/81616
14008 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
14009 * i386.h (TARGET_USE_GATHER): Define.
14010 * x86-tune.def (X86_TUNE_USE_GATHER): New.
14011
14012 2018-01-10 Martin Liska <mliska@suse.cz>
14013
14014 PR bootstrap/82831
14015 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
14016 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
14017 partitioning.
14018 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
14019 CLEANUP_NO_PARTITIONING is not set.
14020
14021 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
14022
14023 * doc/rtl.texi: Remove documentation of (const ...) wrappers
14024 for vectors, as a partial revert of r254296.
14025 * rtl.h (const_vec_p): Delete.
14026 (const_vec_duplicate_p): Don't test for vector CONSTs.
14027 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
14028 * expmed.c (make_tree): Likewise.
14029
14030 Revert:
14031 * common.md (E, F): Use CONSTANT_P instead of checking for
14032 CONST_VECTOR.
14033 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
14034 checking for CONST_VECTOR.
14035
14036 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
14037
14038 PR middle-end/83575
14039 * predict.c (force_edge_cold): Handle in more sane way edges
14040 with no prediction.
14041
14042 2018-01-09 Carl Love <cel@us.ibm.com>
14043
14044 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
14045 V4SI, V4SF types.
14046 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
14047 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
14048 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
14049 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
14050 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
14051 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
14052 * config/rs6000/rs6000-protos.h: Add extern defition for
14053 rs6000_generate_float2_double_code.
14054 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
14055 function.
14056 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
14057 (float2_v2df): Add define_expand.
14058
14059 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
14060
14061 PR target/83628
14062 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
14063 op_mode in the force_to_mode call.
14064
14065 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
14066
14067 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
14068 instead of checking each element individually.
14069 (aarch64_evpc_uzp): Likewise.
14070 (aarch64_evpc_zip): Likewise.
14071 (aarch64_evpc_ext): Likewise.
14072 (aarch64_evpc_rev): Likewise.
14073 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
14074 instead of checking each element individually. Return true without
14075 generating rtl if
14076 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
14077 whether all selected elements come from the same input, instead of
14078 checking each element individually. Remove calls to gen_rtx_REG,
14079 start_sequence and end_sequence and instead assert that no rtl is
14080 generated.
14081
14082 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
14083
14084 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
14085 order of HIGH and CONST checks.
14086
14087 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
14088
14089 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
14090 if the destination isn't an SSA_NAME.
14091
14092 2018-01-09 Richard Biener <rguenther@suse.de>
14093
14094 PR tree-optimization/83668
14095 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
14096 move prologue...
14097 (canonicalize_loop_form): ... here, renamed from ...
14098 (canonicalize_loop_closed_ssa_form): ... this and amended to
14099 swap successor edges for loop exit blocks to make us use
14100 the RPO order we need for initial schedule generation.
14101
14102 2018-01-09 Joseph Myers <joseph@codesourcery.com>
14103
14104 PR tree-optimization/64811
14105 * match.pd: When optimizing comparisons with Inf, avoid
14106 introducing or losing exceptions from comparisons with NaN.
14107
14108 2018-01-09 Martin Liska <mliska@suse.cz>
14109
14110 PR sanitizer/82517
14111 * asan.c (shadow_mem_size): Add gcc_assert.
14112
14113 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
14114
14115 Don't save registers in main().
14116
14117 PR target/83738
14118 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
14119 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
14120 * config/avr/avr.c (avr_set_current_function): Don't error if
14121 naked, OS_task or OS_main are specified at the same time.
14122 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
14123 OS_main.
14124 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
14125 attribute.
14126 * common/config/avr/avr-common.c (avr_option_optimization_table):
14127 Switch on -mmain-is-OS_task for optimizing compilations.
14128
14129 2018-01-09 Richard Biener <rguenther@suse.de>
14130
14131 PR tree-optimization/83572
14132 * graphite.c: Include cfganal.h.
14133 (graphite_transform_loops): Connect infinite loops to exit
14134 and remove fake edges at the end.
14135
14136 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
14137
14138 * ipa-inline.c (edge_badness): Revert accidental checkin.
14139
14140 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
14141
14142 PR ipa/80763
14143 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
14144 symbols; not inline clones.
14145
14146 2018-01-09 Jakub Jelinek <jakub@redhat.com>
14147
14148 PR target/83507
14149 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
14150 hard registers. Formatting fixes.
14151
14152 PR preprocessor/83722
14153 * gcc.c (try_generate_repro): Pass
14154 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
14155 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
14156 do_report_bug.
14157
14158 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
14159 Kito Cheng <kito.cheng@gmail.com>
14160
14161 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
14162 (riscv_leaf_function_p): Delete.
14163 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
14164
14165 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14166
14167 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
14168 function.
14169 (do_ifelse): New function.
14170 (do_isel): New function.
14171 (do_sub3): New function.
14172 (do_add3): New function.
14173 (do_load_mask_compare): New function.
14174 (do_overlap_load_compare): New function.
14175 (expand_compare_loop): New function.
14176 (expand_block_compare): Call expand_compare_loop() when appropriate.
14177 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
14178 option description.
14179 (-mblock-compare-inline-loop-limit): New option.
14180
14181 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14182
14183 PR target/83677
14184 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
14185 Reverse order of second and third operands in first alternative.
14186 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
14187 of first and second elements in UNSPEC_VPERMR vector.
14188 (altivec_expand_vec_perm_le): Likewise.
14189
14190 2018-01-08 Jeff Law <law@redhat.com>
14191
14192 PR rtl-optimizatin/81308
14193 * tree-switch-conversion.c (cfg_altered): New file scoped static.
14194 (process_switch): If group_case_labels makes a change, then set
14195 cfg_altered.
14196 (pass_convert_switch::execute): If a switch is converted, then
14197 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
14198
14199 PR rtl-optimization/81308
14200 * recog.c (split_all_insns): Conditionally cleanup the CFG after
14201 splitting insns.
14202
14203 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
14204
14205 PR target/83663 - Revert r255946
14206 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
14207 generation for cases where splatting a value is not useful.
14208 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
14209 across a vec_duplicate and a paradoxical subreg forming a vector
14210 mode to a vec_concat.
14211
14212 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14213
14214 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
14215 -march=armv8.3-a variants.
14216 * config/arm/t-multilib: Likewise.
14217 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
14218
14219 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14220
14221 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
14222 to generate rtl.
14223 (cceq_ior_compare_complement): Give it a name so I can use it, and
14224 change boolean_or_operator predicate to boolean_operator so it can
14225 be used to generate a crand.
14226 (eqne): New code iterator.
14227 (bd/bd_neg): New code_attrs.
14228 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
14229 a single define_insn.
14230 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
14231 decrement (bdnzt/bdnzf/bdzt/bdzf).
14232 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
14233 with the new names of the branch decrement patterns, and added the
14234 names of the branch decrement conditional patterns.
14235
14236 2018-01-08 Richard Biener <rguenther@suse.de>
14237
14238 PR tree-optimization/83563
14239 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
14240 cache.
14241
14242 2018-01-08 Richard Biener <rguenther@suse.de>
14243
14244 PR middle-end/83713
14245 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
14246
14247 2018-01-08 Richard Biener <rguenther@suse.de>
14248
14249 PR tree-optimization/83685
14250 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
14251 references to abnormals.
14252
14253 2018-01-08 Richard Biener <rguenther@suse.de>
14254
14255 PR lto/83719
14256 * dwarf2out.c (output_indirect_strings): Handle empty
14257 skeleton_debug_str_hash.
14258 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
14259
14260 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
14261
14262 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
14263 (emit_store_direct): Likewise.
14264 (arc_trampoline_adjust_address): Likewise.
14265 (arc_asm_trampoline_template): New function.
14266 (arc_initialize_trampoline): Use asm_trampoline_template.
14267 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
14268 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
14269 * config/arc/arc.md (flush_icache): Delete pattern.
14270
14271 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
14272
14273 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
14274 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
14275 munaligned-access.
14276
14277 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
14278
14279 PR target/83681
14280 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
14281 by not USED_FOR_TARGET.
14282 (make_pass_resolve_sw_modes): Likewise.
14283
14284 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
14285
14286 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
14287 USED_FOR_TARGET.
14288
14289 2018-01-08 Richard Biener <rguenther@suse.de>
14290
14291 PR middle-end/83580
14292 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
14293
14294 2018-01-08 Richard Biener <rguenther@suse.de>
14295
14296 PR middle-end/83517
14297 * match.pd ((t * 2) / 2) -> t): Add missing :c.
14298
14299 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
14300
14301 PR middle-end/81897
14302 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
14303 basic blocks with a small number of successors.
14304 (convert_control_dep_chain_into_preds): Improve handling of
14305 forwarder blocks.
14306 (dump_predicates): Split apart into...
14307 (dump_pred_chain): ...here...
14308 (dump_pred_info): ...and here.
14309 (can_one_predicate_be_invalidated_p): Add debugging printfs.
14310 (can_chain_union_be_invalidated_p): Improve check for invalidation
14311 of paths.
14312 (uninit_uses_cannot_happen): Avoid unnecessary if
14313 convert_control_dep_chain_into_preds yielded nothing.
14314
14315 2018-01-06 Martin Sebor <msebor@redhat.com>
14316
14317 PR tree-optimization/83640
14318 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
14319 subtracting negative offset from size.
14320 (builtin_access::overlap): Adjust offset bounds of the access to fall
14321 within the size of the object if possible.
14322
14323 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
14324
14325 PR rtl-optimization/83699
14326 * expmed.c (extract_bit_field_1): Restrict the vector usage of
14327 extract_bit_field_as_subreg to cases in which the extracted
14328 value is also a vector.
14329
14330 * lra-constraints.c (process_alt_operands): Test for the equivalence
14331 substitutions when detecting a possible reload cycle.
14332
14333 2018-01-06 Jakub Jelinek <jakub@redhat.com>
14334
14335 PR debug/83480
14336 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
14337 by default if flag_selective_schedling{,2}. Formatting fixes.
14338
14339 PR rtl-optimization/83682
14340 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
14341 if it has non-VECTOR_MODE element mode.
14342 (vec_duplicate_p): Likewise.
14343
14344 PR middle-end/83694
14345 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
14346 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
14347
14348 2018-01-05 Jakub Jelinek <jakub@redhat.com>
14349
14350 PR target/83604
14351 * config/i386/i386-builtin.def
14352 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
14353 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
14354 Require also OPTION_MASK_ISA_AVX512F in addition to
14355 OPTION_MASK_ISA_GFNI.
14356 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
14357 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
14358 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
14359 to OPTION_MASK_ISA_GFNI.
14360 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
14361 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
14362 OPTION_MASK_ISA_AVX512BW.
14363 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
14364 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
14365 addition to OPTION_MASK_ISA_GFNI.
14366 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
14367 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
14368 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
14369 to OPTION_MASK_ISA_GFNI.
14370 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
14371 a requirement for all ISAs rather than any of them with a few
14372 exceptions.
14373 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
14374 processing.
14375 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
14376 bitmasks to be enabled with 3 exceptions, instead of requiring any
14377 enabled ISA with lots of exceptions.
14378 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
14379 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
14380 Change avx512bw in isa attribute to avx512f.
14381 * config/i386/sgxintrin.h: Add license boilerplate.
14382 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
14383 to __AVX512F__ and __AVX512VL to __AVX512VL__.
14384 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
14385 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
14386 defined.
14387 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
14388 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
14389 temporarily sse2 rather than sse if not enabled already.
14390
14391 PR target/83604
14392 * config/i386/sse.md (VI248_VLBW): Rename to ...
14393 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
14394 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
14395 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
14396 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
14397 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
14398 mode iterator instead of VI248_VLBW.
14399
14400 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
14401
14402 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
14403 (record_modified): Skip clobbers; add debug output.
14404 (param_change_prob): Use sreal frequencies.
14405
14406 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
14407
14408 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
14409 punt for user-aligned variables.
14410
14411 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
14412
14413 * tree-chrec.c (chrec_contains_symbols): Return true for
14414 POLY_INT_CST.
14415
14416 2018-01-05 Sudakshina Das <sudi.das@arm.com>
14417
14418 PR target/82439
14419 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
14420 of (x|y) == x for BICS pattern.
14421
14422 2018-01-05 Jakub Jelinek <jakub@redhat.com>
14423
14424 PR tree-optimization/83605
14425 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
14426 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
14427 can throw.
14428
14429 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
14430
14431 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
14432 * config/epiphany/rtems.h: New file.
14433
14434 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14435 Uros Bizjak <ubizjak@gmail.com>
14436
14437 PR target/83554
14438 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
14439 QIreg_operand instead of register_operand predicate.
14440 * config/i386/i386.c (ix86_rop_should_change_byte_p,
14441 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
14442 comments instead of -fmitigate[-_]rop.
14443
14444 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14445
14446 PR bootstrap/81926
14447 * cgraphunit.c (symbol_table::compile): Switch to text_section
14448 before calling assembly_start debug hook.
14449 * run-rtl-passes.c (run_rtl_passes): Likewise.
14450 Include output.h.
14451
14452 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14453
14454 * tree-vrp.c (extract_range_from_binary_expr_1): Check
14455 range_int_cst_p rather than !symbolic_range_p before calling
14456 extract_range_from_multiplicative_op_1.
14457
14458 2018-01-04 Jeff Law <law@redhat.com>
14459
14460 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
14461 redundant test in assertion.
14462
14463 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14464
14465 * doc/rtl.texi: Document machine_mode wrapper classes.
14466
14467 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14468
14469 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
14470 using tree_to_uhwi.
14471
14472 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14473
14474 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
14475 the VEC_PERM_EXPR fold to fail.
14476
14477 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14478
14479 PR debug/83585
14480 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
14481 to switched_sections.
14482
14483 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14484
14485 PR target/83680
14486 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
14487 test for d.testing.
14488
14489 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
14490
14491 PR target/83387
14492 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
14493 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
14494
14495 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14496
14497 PR debug/83666
14498 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
14499 is BLKmode and bitpos not zero or mode change is needed.
14500
14501 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14502
14503 PR target/83675
14504 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
14505 TARGET_VIS2.
14506
14507 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
14508
14509 PR target/83628
14510 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
14511 instead of MULT rtx. Update all corresponding splitters.
14512 (*saddl_se): Ditto.
14513 (*ssub<modesuffix>): Ditto.
14514 (*ssubl_se): Ditto.
14515 (*cmp_sadd_di): Update split patterns.
14516 (*cmp_sadd_si): Ditto.
14517 (*cmp_sadd_sidi): Ditto.
14518 (*cmp_ssub_di): Ditto.
14519 (*cmp_ssub_si): Ditto.
14520 (*cmp_ssub_sidi): Ditto.
14521 * config/alpha/predicates.md (const23_operand): New predicate.
14522 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
14523 Look for ASHIFT, not MULT inner operand.
14524 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
14525
14526 2018-01-04 Martin Liska <mliska@suse.cz>
14527
14528 PR gcov-profile/83669
14529 * gcov.c (output_intermediate_file): Add version to intermediate
14530 gcov file.
14531 * doc/gcov.texi: Document new field 'version' in intermediate
14532 file format. Fix location of '-k' option of gcov command.
14533
14534 2018-01-04 Martin Liska <mliska@suse.cz>
14535
14536 PR ipa/82352
14537 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
14538
14539 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14540
14541 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
14542
14543 2018-01-03 Martin Sebor <msebor@redhat.com>
14544
14545 PR tree-optimization/83655
14546 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
14547 checking calls with invalid arguments.
14548
14549 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14550
14551 * tree-vect-stmts.c (vect_get_store_rhs): New function.
14552 (vectorizable_mask_load_store): Delete.
14553 (vectorizable_call): Return false for masked loads and stores.
14554 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
14555 instead of gimple_assign_rhs1.
14556 (vectorizable_load): Handle IFN_MASK_LOAD.
14557 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
14558
14559 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14560
14561 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
14562 split out from..,
14563 (vectorizable_mask_load_store): ...here.
14564 (vectorizable_load): ...and here.
14565
14566 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14567
14568 * tree-vect-stmts.c (vect_build_all_ones_mask)
14569 (vect_build_zero_merge_argument): New functions, split out from...
14570 (vectorizable_load): ...here.
14571
14572 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14573
14574 * tree-vect-stmts.c (vect_check_store_rhs): New function,
14575 split out from...
14576 (vectorizable_mask_load_store): ...here.
14577 (vectorizable_store): ...and here.
14578
14579 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14580
14581 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
14582 split out from...
14583 (vectorizable_mask_load_store): ...here.
14584
14585 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14586
14587 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
14588 (vect_model_store_cost): Take a vec_load_store_type instead of a
14589 vect_def_type.
14590 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
14591 (vect_model_store_cost): Take a vec_load_store_type instead of a
14592 vect_def_type.
14593 (vectorizable_mask_load_store): Update accordingly.
14594 (vectorizable_store): Likewise.
14595 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
14596
14597 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14598
14599 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
14600 IFN_MASK_LOAD calls here rather than...
14601 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
14602
14603 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14604 Alan Hayward <alan.hayward@arm.com>
14605 David Sherwood <david.sherwood@arm.com>
14606
14607 * expmed.c (extract_bit_field_1): For vector extracts,
14608 fall back to extract_bit_field_as_subreg if vec_extract
14609 isn't available.
14610
14611 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14612 Alan Hayward <alan.hayward@arm.com>
14613 David Sherwood <david.sherwood@arm.com>
14614
14615 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
14616 they are variable or constant sized.
14617 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
14618 slots for constant-sized data.
14619
14620 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14621 Alan Hayward <alan.hayward@arm.com>
14622 David Sherwood <david.sherwood@arm.com>
14623
14624 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
14625 handling COND_EXPRs with boolean comparisons, try to find a better
14626 basis for the mask type than the boolean itself.
14627
14628 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14629
14630 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
14631 is calculated and how it can be overridden.
14632 * genmodes.c (max_bitsize_mode_any_mode): New variable.
14633 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
14634 if defined.
14635 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
14636 if nonzero.
14637
14638 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14639 Alan Hayward <alan.hayward@arm.com>
14640 David Sherwood <david.sherwood@arm.com>
14641
14642 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
14643 Remove the mode argument.
14644 (aarch64_simd_valid_immediate): Remove the mode and inverse
14645 arguments.
14646 * config/aarch64/iterators.md (bitsize): New iterator.
14647 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
14648 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
14649 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
14650 aarch64_simd_valid_immediate.
14651 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
14652 (aarch64_reg_or_bic_imm): Likewise.
14653 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
14654 with an insn_type enum and msl with a modifier_type enum.
14655 Replace element_width with a scalar_mode. Change the shift
14656 to unsigned int. Add constructors for scalar_float_mode and
14657 scalar_int_mode elements.
14658 (aarch64_vect_float_const_representable_p): Delete.
14659 (aarch64_can_const_movi_rtx_p)
14660 (aarch64_simd_scalar_immediate_valid_for_move)
14661 (aarch64_simd_make_constant): Update call to
14662 aarch64_simd_valid_immediate.
14663 (aarch64_advsimd_valid_immediate_hs): New function.
14664 (aarch64_advsimd_valid_immediate): Likewise.
14665 (aarch64_simd_valid_immediate): Remove mode and inverse
14666 arguments. Rewrite to use the above. Use const_vec_duplicate_p
14667 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
14668 and aarch64_float_const_representable_p on the result.
14669 (aarch64_output_simd_mov_immediate): Remove mode argument.
14670 Update call to aarch64_simd_valid_immediate and use of
14671 simd_immediate_info.
14672 (aarch64_output_scalar_simd_mov_immediate): Update call
14673 accordingly.
14674
14675 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14676 Alan Hayward <alan.hayward@arm.com>
14677 David Sherwood <david.sherwood@arm.com>
14678
14679 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
14680 (mode_nunits): Likewise CONST_MODE_NUNITS.
14681 * machmode.def (ADJUST_NUNITS): Document.
14682 * genmodes.c (mode_data::need_nunits_adj): New field.
14683 (blank_mode): Update accordingly.
14684 (adj_nunits): New variable.
14685 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
14686 parameter.
14687 (emit_mode_size_inline): Set need_bytesize_adj for all modes
14688 listed in adj_nunits.
14689 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
14690 listed in adj_nunits. Don't emit case statements for such modes.
14691 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
14692 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
14693 nothing if adj_nunits is nonnull.
14694 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
14695 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
14696 (emit_mode_fbit): Update use of print_maybe_const_decl.
14697 (emit_move_size): Likewise. Treat the array as non-const
14698 if adj_nunits.
14699 (emit_mode_adjustments): Handle adj_nunits.
14700
14701 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14702
14703 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
14704 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
14705 (VECTOR_MODES): Use it.
14706 (make_vector_modes): Take the prefix as an argument.
14707
14708 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14709 Alan Hayward <alan.hayward@arm.com>
14710 David Sherwood <david.sherwood@arm.com>
14711
14712 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
14713 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
14714 for MODE_VECTOR_BOOL.
14715 * machmode.def (VECTOR_BOOL_MODE): Document.
14716 * genmodes.c (VECTOR_BOOL_MODE): New macro.
14717 (make_vector_bool_mode): New function.
14718 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
14719 MODE_VECTOR_BOOL.
14720 * lto-streamer-in.c (lto_input_mode_table): Likewise.
14721 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
14722 Likewise.
14723 * stor-layout.c (int_mode_for_mode): Likewise.
14724 * tree.c (build_vector_type_for_mode): Likewise.
14725 * varasm.c (output_constant_pool_2): Likewise.
14726 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
14727 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
14728 for MODE_VECTOR_BOOL.
14729 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
14730 of mode class checks.
14731 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
14732 instead of a list of mode class checks.
14733 (expand_vector_scalar_condition): Likewise.
14734 (type_for_widest_vector_mode): Handle BImode as an inner mode.
14735
14736 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14737 Alan Hayward <alan.hayward@arm.com>
14738 David Sherwood <david.sherwood@arm.com>
14739
14740 * machmode.h (mode_size): Change from unsigned short to
14741 poly_uint16_pod.
14742 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
14743 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
14744 or if measurement_type is not polynomial.
14745 (fixed_size_mode::includes_p): Check for constant-sized modes.
14746 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
14747 return a poly_uint16 rather than an unsigned short.
14748 (emit_mode_size): Change the type of mode_size from unsigned short
14749 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
14750 (emit_mode_adjustments): Cope with polynomial vector sizes.
14751 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14752 for GET_MODE_SIZE.
14753 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14754 for GET_MODE_SIZE.
14755 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
14756 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
14757 * caller-save.c (setup_save_areas): Likewise.
14758 (replace_reg_with_saved_mem): Likewise.
14759 * calls.c (emit_library_call_value_1): Likewise.
14760 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
14761 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
14762 (gen_lowpart_for_combine): Likewise.
14763 * convert.c (convert_to_integer_1): Likewise.
14764 * cse.c (equiv_constant, cse_insn): Likewise.
14765 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
14766 (cselib_subst_to_values): Likewise.
14767 * dce.c (word_dce_process_block): Likewise.
14768 * df-problems.c (df_word_lr_mark_ref): Likewise.
14769 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
14770 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
14771 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
14772 (rtl_for_decl_location): Likewise.
14773 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
14774 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
14775 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
14776 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
14777 (expand_expr_real_1): Likewise.
14778 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
14779 (pad_below): Likewise.
14780 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
14781 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
14782 * ira.c (get_subreg_tracking_sizes): Likewise.
14783 * ira-build.c (ira_create_allocno_objects): Likewise.
14784 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
14785 (ira_sort_regnos_for_alter_reg): Likewise.
14786 * ira-costs.c (record_operand_costs): Likewise.
14787 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
14788 (resolve_simple_move): Likewise.
14789 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
14790 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
14791 (lra_constraints): Likewise.
14792 (CONST_POOL_OK_P): Reject variable-sized modes.
14793 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
14794 (add_pseudo_to_slot, lra_spill): Likewise.
14795 * omp-low.c (omp_clause_aligned_alignment): Likewise.
14796 * optabs-query.c (get_best_extraction_insn): Likewise.
14797 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
14798 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
14799 (expand_mult_highpart, valid_multiword_target_p): Likewise.
14800 * recog.c (offsettable_address_addr_space_p): Likewise.
14801 * regcprop.c (maybe_mode_change): Likewise.
14802 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
14803 * regrename.c (build_def_use): Likewise.
14804 * regstat.c (dump_reg_info): Likewise.
14805 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
14806 (find_reloads, find_reloads_subreg_address): Likewise.
14807 * reload1.c (eliminate_regs_1): Likewise.
14808 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
14809 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
14810 (simplify_binary_operation_1, simplify_subreg): Likewise.
14811 * targhooks.c (default_function_arg_padding): Likewise.
14812 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
14813 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
14814 (verify_gimple_assign_ternary): Likewise.
14815 * tree-inline.c (estimate_move_cost): Likewise.
14816 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14817 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
14818 (get_address_cost_ainc): Likewise.
14819 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
14820 (vect_supportable_dr_alignment): Likewise.
14821 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14822 (vectorizable_reduction): Likewise.
14823 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
14824 (vectorizable_operation, vectorizable_load): Likewise.
14825 * tree.c (build_same_sized_truth_vector_type): Likewise.
14826 * valtrack.c (cleanup_auto_inc_dec): Likewise.
14827 * var-tracking.c (emit_note_insn_var_location): Likewise.
14828 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
14829 (ADDR_VEC_ALIGN): Likewise.
14830
14831 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14832 Alan Hayward <alan.hayward@arm.com>
14833 David Sherwood <david.sherwood@arm.com>
14834
14835 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
14836 unsigned short.
14837 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
14838 or if measurement_type is polynomial.
14839 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
14840 * combine.c (make_extraction): Likewise.
14841 * dse.c (find_shift_sequence): Likewise.
14842 * dwarf2out.c (mem_loc_descriptor): Likewise.
14843 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
14844 (extract_bit_field, extract_low_bits): Likewise.
14845 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
14846 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
14847 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
14848 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
14849 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
14850 * reload.c (find_reloads): Likewise.
14851 * reload1.c (alter_reg): Likewise.
14852 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
14853 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
14854 * tree-if-conv.c (predicate_mem_writes): Likewise.
14855 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
14856 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
14857 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
14858 * valtrack.c (dead_debug_insert_temp): Likewise.
14859 * varasm.c (mergeable_constant_section): Likewise.
14860 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
14861
14862 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14863 Alan Hayward <alan.hayward@arm.com>
14864 David Sherwood <david.sherwood@arm.com>
14865
14866 * expr.c (expand_assignment): Cope with polynomial mode sizes
14867 when assigning to a CONCAT.
14868
14869 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14870 Alan Hayward <alan.hayward@arm.com>
14871 David Sherwood <david.sherwood@arm.com>
14872
14873 * machmode.h (mode_precision): Change from unsigned short to
14874 poly_uint16_pod.
14875 (mode_to_precision): Return a poly_uint16 rather than an unsigned
14876 short.
14877 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
14878 or if measurement_type is not polynomial.
14879 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
14880 in which the mode is already known to be a scalar_int_mode.
14881 * genmodes.c (emit_mode_precision): Change the type of mode_precision
14882 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
14883 initializer.
14884 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14885 for GET_MODE_PRECISION.
14886 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14887 for GET_MODE_PRECISION.
14888 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
14889 as polynomial.
14890 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
14891 (expand_field_assignment, make_extraction): Likewise.
14892 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
14893 (get_last_value): Likewise.
14894 * convert.c (convert_to_integer_1): Likewise.
14895 * cse.c (cse_insn): Likewise.
14896 * expr.c (expand_expr_real_1): Likewise.
14897 * lra-constraints.c (simplify_operand_subreg): Likewise.
14898 * optabs-query.c (can_atomic_load_p): Likewise.
14899 * optabs.c (expand_atomic_load): Likewise.
14900 (expand_atomic_store): Likewise.
14901 * ree.c (combine_reaching_defs): Likewise.
14902 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
14903 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
14904 * tree.h (type_has_mode_precision_p): Likewise.
14905 * ubsan.c (instrument_si_overflow): Likewise.
14906
14907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14908 Alan Hayward <alan.hayward@arm.com>
14909 David Sherwood <david.sherwood@arm.com>
14910
14911 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
14912 polynomial numbers of units.
14913 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
14914 (valid_vector_subparts_p): New function.
14915 (build_vector_type): Remove temporary shim and take the number
14916 of units as a poly_uint64 rather than an int.
14917 (build_opaque_vector_type): Take the number of units as a
14918 poly_uint64 rather than an int.
14919 * tree.c (build_vector_from_ctor): Handle polynomial
14920 TYPE_VECTOR_SUBPARTS.
14921 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
14922 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
14923 (build_vector_from_val): If the number of units is variable,
14924 use build_vec_duplicate_cst for constant operands and
14925 VEC_DUPLICATE_EXPR otherwise.
14926 (make_vector_type): Remove temporary is_constant ().
14927 (build_vector_type, build_opaque_vector_type): Take the number of
14928 units as a poly_uint64 rather than an int.
14929 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
14930 VECTOR_CST_NELTS.
14931 * cfgexpand.c (expand_debug_expr): Likewise.
14932 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
14933 (store_constructor, expand_expr_real_1): Likewise.
14934 (const_scalar_mask_from_tree): Likewise.
14935 * fold-const-call.c (fold_const_reduction): Likewise.
14936 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
14937 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
14938 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
14939 (fold_relational_const): Likewise.
14940 (native_interpret_vector): Likewise. Change the size from an
14941 int to an unsigned int.
14942 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
14943 TYPE_VECTOR_SUBPARTS.
14944 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
14945 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
14946 duplicating a non-constant operand into a variable-length vector.
14947 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
14948 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
14949 * ipa-icf.c (sem_variable::equals): Likewise.
14950 * match.pd: Likewise.
14951 * omp-simd-clone.c (simd_clone_subparts): Likewise.
14952 * print-tree.c (print_node): Likewise.
14953 * stor-layout.c (layout_type): Likewise.
14954 * targhooks.c (default_builtin_vectorization_cost): Likewise.
14955 * tree-cfg.c (verify_gimple_comparison): Likewise.
14956 (verify_gimple_assign_binary): Likewise.
14957 (verify_gimple_assign_ternary): Likewise.
14958 (verify_gimple_assign_single): Likewise.
14959 * tree-pretty-print.c (dump_generic_node): Likewise.
14960 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14961 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
14962 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
14963 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
14964 (vect_shift_permute_load_chain): Likewise.
14965 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
14966 (expand_vector_condition, optimize_vector_constructor): Likewise.
14967 (lower_vec_perm, get_compute_type): Likewise.
14968 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14969 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
14970 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
14971 (vect_recog_mask_conversion_pattern): Likewise.
14972 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
14973 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
14974 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14975 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
14976 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
14977 (vectorizable_shift, vectorizable_operation, vectorizable_store)
14978 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
14979 (supportable_widening_operation): Likewise.
14980 (supportable_narrowing_operation): Likewise.
14981 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
14982 Likewise.
14983 * varasm.c (output_constant): Likewise.
14984
14985 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14986 Alan Hayward <alan.hayward@arm.com>
14987 David Sherwood <david.sherwood@arm.com>
14988
14989 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
14990 so that both the length == 3 and length != 3 cases set up their
14991 own permute vectors. Add comments explaining why we know the
14992 number of elements is constant.
14993 (vect_permute_load_chain): Likewise.
14994
14995 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14996 Alan Hayward <alan.hayward@arm.com>
14997 David Sherwood <david.sherwood@arm.com>
14998
14999 * machmode.h (mode_nunits): Change from unsigned char to
15000 poly_uint16_pod.
15001 (ONLY_FIXED_SIZE_MODES): New macro.
15002 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
15003 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
15004 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
15005 New typedefs.
15006 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
15007 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
15008 or if measurement_type is not polynomial.
15009 * genmodes.c (ZERO_COEFFS): New macro.
15010 (emit_mode_nunits_inline): Make mode_nunits_inline return a
15011 poly_uint16.
15012 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
15013 Use ZERO_COEFFS when emitting initializers.
15014 * data-streamer.h (bp_pack_poly_value): New function.
15015 (bp_unpack_poly_value): Likewise.
15016 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
15017 for GET_MODE_NUNITS.
15018 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
15019 for GET_MODE_NUNITS.
15020 * tree.c (make_vector_type): Remove temporary shim and make
15021 the real function take the number of units as a poly_uint64
15022 rather than an int.
15023 (build_vector_type_for_mode): Handle polynomial nunits.
15024 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
15025 * emit-rtl.c (const_vec_series_p_1): Likewise.
15026 (gen_rtx_CONST_VECTOR): Likewise.
15027 * fold-const.c (test_vec_duplicate_folding): Likewise.
15028 * genrecog.c (validate_pattern): Likewise.
15029 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
15030 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
15031 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
15032 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
15033 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
15034 * rtlanal.c (subreg_get_info): Likewise.
15035 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
15036 (vect_grouped_load_supported): Likewise.
15037 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
15038 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
15039 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
15040 (simplify_const_unary_operation, simplify_binary_operation_1)
15041 (simplify_const_binary_operation, simplify_ternary_operation)
15042 (test_vector_ops_duplicate, test_vector_ops): Likewise.
15043 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
15044 instead of CONST_VECTOR_NUNITS.
15045 * varasm.c (output_constant_pool_2): Likewise.
15046 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
15047 explicit-encoded elements in the XVEC for variable-length vectors.
15048
15049 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15050
15051 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
15052
15053 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15054 Alan Hayward <alan.hayward@arm.com>
15055 David Sherwood <david.sherwood@arm.com>
15056
15057 * coretypes.h (fixed_size_mode): Declare.
15058 (fixed_size_mode_pod): New typedef.
15059 * builtins.h (target_builtins::x_apply_args_mode)
15060 (target_builtins::x_apply_result_mode): Change type to
15061 fixed_size_mode_pod.
15062 * builtins.c (apply_args_size, apply_result_size, result_vector)
15063 (expand_builtin_apply_args_1, expand_builtin_apply)
15064 (expand_builtin_return): Update accordingly.
15065
15066 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15067
15068 * cse.c (hash_rtx_cb): Hash only the encoded elements.
15069 * cselib.c (cselib_hash_rtx): Likewise.
15070 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
15071 CONST_VECTOR encoding.
15072
15073 2018-01-03 Jakub Jelinek <jakub@redhat.com>
15074 Jeff Law <law@redhat.com>
15075
15076 PR target/83641
15077 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
15078 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
15079 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
15080 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
15081
15082 PR target/83641
15083 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
15084 explicitly probe *sp in a noreturn function if there were any callee
15085 register saves or frame pointer is needed.
15086
15087 2018-01-03 Jakub Jelinek <jakub@redhat.com>
15088
15089 PR debug/83621
15090 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
15091 BLKmode for ternary, binary or unary expressions.
15092
15093 PR debug/83645
15094 * var-tracking.c (delete_vta_debug_insn): New inline function.
15095 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
15096 insns from get_insns () to NULL instead of each bb separately.
15097 Use delete_vta_debug_insn. No longer static.
15098 (vt_debug_insns_local, variable_tracking_main_1): Adjust
15099 delete_vta_debug_insns callers.
15100 * rtl.h (delete_vta_debug_insns): Declare.
15101 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
15102 instead of variable_tracking_main.
15103
15104 2018-01-03 Martin Sebor <msebor@redhat.com>
15105
15106 PR tree-optimization/83603
15107 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
15108 arguments past the endof the argument list in functions declared
15109 without a prototype.
15110 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
15111 Avoid checking when arguments are null.
15112
15113 2018-01-03 Martin Sebor <msebor@redhat.com>
15114
15115 PR c/83559
15116 * doc/extend.texi (attribute const): Fix a typo.
15117 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
15118 issuing -Wsuggest-attribute for void functions.
15119
15120 2018-01-03 Martin Sebor <msebor@redhat.com>
15121
15122 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
15123 offset_int::from instead of wide_int::to_shwi.
15124 (maybe_diag_overlap): Remove assertion.
15125 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
15126 * gimple-ssa-sprintf.c (format_directive): Same.
15127 (parse_directive): Same.
15128 (sprintf_dom_walker::compute_format_length): Same.
15129 (try_substitute_return_value): Same.
15130
15131 2018-01-03 Jeff Law <law@redhat.com>
15132
15133 PR middle-end/83654
15134 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
15135 non-constant residual for zero at runtime and avoid probing in
15136 that case. Reorganize code for trailing problem to mirror handling
15137 of the residual.
15138
15139 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15140
15141 PR tree-optimization/83501
15142 * tree-ssa-strlen.c (get_string_cst): New.
15143 (handle_char_store): Call get_string_cst.
15144
15145 2018-01-03 Martin Liska <mliska@suse.cz>
15146
15147 PR tree-optimization/83593
15148 * tree-ssa-strlen.c: Include tree-cfg.h.
15149 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
15150 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
15151 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
15152 to false.
15153 (strlen_dom_walker::before_dom_children): Call
15154 gimple_purge_dead_eh_edges. Dump tranformation with details
15155 dump flags.
15156 (strlen_dom_walker::before_dom_children): Update call by adding
15157 new argument cleanup_eh.
15158 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
15159
15160 2018-01-03 Martin Liska <mliska@suse.cz>
15161
15162 PR ipa/83549
15163 * cif-code.def (VARIADIC_THUNK): New enum value.
15164 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
15165 thunks.
15166
15167 2018-01-03 Jan Beulich <jbeulich@suse.com>
15168
15169 * sse.md (mov<mode>_internal): Tighten condition for when to use
15170 vmovdqu<ssescalarsize> for TI and OI modes.
15171
15172 2018-01-03 Jakub Jelinek <jakub@redhat.com>
15173
15174 Update copyright years.
15175
15176 2018-01-03 Martin Liska <mliska@suse.cz>
15177
15178 PR ipa/83594
15179 * ipa-visibility.c (function_and_variable_visibility): Skip
15180 functions with noipa attribure.
15181
15182 2018-01-03 Jakub Jelinek <jakub@redhat.com>
15183
15184 * gcc.c (process_command): Update copyright notice dates.
15185 * gcov-dump.c (print_version): Ditto.
15186 * gcov.c (print_version): Ditto.
15187 * gcov-tool.c (print_version): Ditto.
15188 * gengtype.c (create_file): Ditto.
15189 * doc/cpp.texi: Bump @copying's copyright year.
15190 * doc/cppinternals.texi: Ditto.
15191 * doc/gcc.texi: Ditto.
15192 * doc/gccint.texi: Ditto.
15193 * doc/gcov.texi: Ditto.
15194 * doc/install.texi: Ditto.
15195 * doc/invoke.texi: Ditto.
15196
15197 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15198
15199 * vector-builder.h (vector_builder::m_full_nelts): Change from
15200 unsigned int to poly_uint64.
15201 (vector_builder::full_nelts): Update prototype accordingly.
15202 (vector_builder::new_vector): Likewise.
15203 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
15204 (vector_builder::operator ==): Likewise.
15205 (vector_builder::finalize): Likewise.
15206 * int-vector-builder.h (int_vector_builder::int_vector_builder):
15207 Take the number of elements as a poly_uint64 rather than an
15208 unsigned int.
15209 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
15210 from unsigned int to poly_uint64.
15211 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
15212 (vec_perm_indices::new_vector): Likewise.
15213 (vec_perm_indices::length): Likewise.
15214 (vec_perm_indices::nelts_per_input): Likewise.
15215 (vec_perm_indices::input_nelts): Likewise.
15216 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
15217 number of elements per input as a poly_uint64 rather than an
15218 unsigned int. Use the original encoding for variable-length
15219 vectors, rather than clamping each individual element.
15220 For the second and subsequent elements in each pattern,
15221 clamp the step and base before clamping their sum.
15222 (vec_perm_indices::series_p): Handle polynomial element counts.
15223 (vec_perm_indices::all_in_range_p): Likewise.
15224 (vec_perm_indices_to_tree): Likewise.
15225 (vec_perm_indices_to_rtx): Likewise.
15226 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
15227 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
15228 (tree_vector_builder::new_binary_operation): Handle polynomial
15229 element counts. Return false if we need to know the number
15230 of elements at compile time.
15231 * fold-const.c (fold_vec_perm): Punt if the number of elements
15232 isn't known at compile time.
15233
15234 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15235
15236 * vec-perm-indices.h (vec_perm_builder): Change element type
15237 from HOST_WIDE_INT to poly_int64.
15238 (vec_perm_indices::element_type): Update accordingly.
15239 (vec_perm_indices::clamp): Handle polynomial element_types.
15240 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
15241 (vec_perm_indices::all_in_range_p): Likewise.
15242 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
15243 than shwi trees.
15244 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
15245 polynomial vec_perm_indices element types.
15246 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
15247 * fold-const.c (fold_vec_perm): Likewise.
15248 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
15249 * tree-vect-generic.c (lower_vec_perm): Likewise.
15250 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
15251 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
15252 element type to HOST_WIDE_INT.
15253
15254 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15255 Alan Hayward <alan.hayward@arm.com>
15256 David Sherwood <david.sherwood@arm.com>
15257
15258 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
15259 rather than an int. Use plus_constant.
15260 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
15261 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
15262
15263 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15264 Alan Hayward <alan.hayward@arm.com>
15265 David Sherwood <david.sherwood@arm.com>
15266
15267 * calls.c (emit_call_1, expand_call): Change struct_value_size from
15268 a HOST_WIDE_INT to a poly_int64.
15269
15270 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15271 Alan Hayward <alan.hayward@arm.com>
15272 David Sherwood <david.sherwood@arm.com>
15273
15274 * calls.c (load_register_parameters): Cope with polynomial
15275 mode sizes. Require a constant size for BLKmode parameters
15276 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
15277 forces a parameter to be padded at the lsb end in order to
15278 fill a complete number of words, require the parameter size
15279 to be ordered wrt UNITS_PER_WORD.
15280
15281 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15282 Alan Hayward <alan.hayward@arm.com>
15283 David Sherwood <david.sherwood@arm.com>
15284
15285 * reload1.c (spill_stack_slot_width): Change element type
15286 from unsigned int to poly_uint64_pod.
15287 (alter_reg): Treat mode sizes as polynomial.
15288
15289 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15290 Alan Hayward <alan.hayward@arm.com>
15291 David Sherwood <david.sherwood@arm.com>
15292
15293 * reload.c (complex_word_subreg_p): New function.
15294 (reload_inner_reg_of_subreg, push_reload): Use it.
15295
15296 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15297 Alan Hayward <alan.hayward@arm.com>
15298 David Sherwood <david.sherwood@arm.com>
15299
15300 * lra-constraints.c (process_alt_operands): Reject matched
15301 operands whose sizes aren't ordered.
15302 (match_reload): Refer to this check here.
15303
15304 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15305 Alan Hayward <alan.hayward@arm.com>
15306 David Sherwood <david.sherwood@arm.com>
15307
15308 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
15309 that the mode size is in the set {1, 2, 4, 8, 16}.
15310
15311 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15312 Alan Hayward <alan.hayward@arm.com>
15313 David Sherwood <david.sherwood@arm.com>
15314
15315 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
15316 Use plus_constant instead of gen_rtx_PLUS.
15317
15318 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15319 Alan Hayward <alan.hayward@arm.com>
15320 David Sherwood <david.sherwood@arm.com>
15321
15322 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
15323 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
15324 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
15325 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
15326 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
15327 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
15328 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
15329 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
15330 * config/i386/i386.c (ix86_push_rounding): ...this new function.
15331 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
15332 a poly_int64.
15333 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
15334 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
15335 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
15336 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
15337 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
15338 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
15339 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
15340 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
15341 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
15342 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
15343 function.
15344 * expr.c (emit_move_resolve_push): Treat the input and result
15345 of PUSH_ROUNDING as a poly_int64.
15346 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
15347 (emit_push_insn): Likewise.
15348 * lra-eliminations.c (mark_not_eliminable): Likewise.
15349 * recog.c (push_operand): Likewise.
15350 * reload1.c (elimination_effects): Likewise.
15351 * rtlanal.c (nonzero_bits1): Likewise.
15352 * calls.c (store_one_arg): Likewise. Require the padding to be
15353 known at compile time.
15354
15355 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15356 Alan Hayward <alan.hayward@arm.com>
15357 David Sherwood <david.sherwood@arm.com>
15358
15359 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
15360 Use plus_constant instead of gen_rtx_PLUS.
15361
15362 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15363 Alan Hayward <alan.hayward@arm.com>
15364 David Sherwood <david.sherwood@arm.com>
15365
15366 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
15367 rather than an int.
15368
15369 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15370 Alan Hayward <alan.hayward@arm.com>
15371 David Sherwood <david.sherwood@arm.com>
15372
15373 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
15374 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
15375 via stack temporaries. Treat the mode size as polynomial too.
15376
15377 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15378 Alan Hayward <alan.hayward@arm.com>
15379 David Sherwood <david.sherwood@arm.com>
15380
15381 * expr.c (expand_expr_real_2): When handling conversions involving
15382 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
15383 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
15384 as a poly_uint64 too.
15385
15386 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15387 Alan Hayward <alan.hayward@arm.com>
15388 David Sherwood <david.sherwood@arm.com>
15389
15390 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
15391
15392 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15393 Alan Hayward <alan.hayward@arm.com>
15394 David Sherwood <david.sherwood@arm.com>
15395
15396 * combine.c (can_change_dest_mode): Handle polynomial
15397 REGMODE_NATURAL_SIZE.
15398 * expmed.c (store_bit_field_1): Likewise.
15399 * expr.c (store_constructor): Likewise.
15400 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
15401 and polynomial REGMODE_NATURAL_SIZE.
15402 (gen_lowpart_common): Likewise.
15403 * reginfo.c (record_subregs_of_mode): Likewise.
15404 * rtlanal.c (read_modify_subreg_p): Likewise.
15405
15406 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15407 Alan Hayward <alan.hayward@arm.com>
15408 David Sherwood <david.sherwood@arm.com>
15409
15410 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
15411 numbers of elements.
15412
15413 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15414 Alan Hayward <alan.hayward@arm.com>
15415 David Sherwood <david.sherwood@arm.com>
15416
15417 * match.pd: Cope with polynomial numbers of vector elements.
15418
15419 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15420 Alan Hayward <alan.hayward@arm.com>
15421 David Sherwood <david.sherwood@arm.com>
15422
15423 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
15424 in a POINTER_PLUS_EXPR.
15425
15426 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15427 Alan Hayward <alan.hayward@arm.com>
15428 David Sherwood <david.sherwood@arm.com>
15429
15430 * omp-simd-clone.c (simd_clone_subparts): New function.
15431 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
15432 (ipa_simd_modify_function_body): Likewise.
15433
15434 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15435 Alan Hayward <alan.hayward@arm.com>
15436 David Sherwood <david.sherwood@arm.com>
15437
15438 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
15439 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
15440 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
15441 (expand_vector_condition, vector_element): Likewise.
15442 (subparts_gt): New function.
15443 (get_compute_type): Use subparts_gt.
15444 (count_type_subparts): Delete.
15445 (expand_vector_operations_1): Use subparts_gt instead of
15446 count_type_subparts.
15447
15448 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15449 Alan Hayward <alan.hayward@arm.com>
15450 David Sherwood <david.sherwood@arm.com>
15451
15452 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
15453 (vect_compile_time_alias): ...this new function. Do the calculation
15454 on poly_ints rather than trees.
15455 (vect_prune_runtime_alias_test_list): Update call accordingly.
15456
15457 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15458 Alan Hayward <alan.hayward@arm.com>
15459 David Sherwood <david.sherwood@arm.com>
15460
15461 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
15462 numbers of units.
15463 (vect_schedule_slp_instance): Likewise.
15464
15465 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15466 Alan Hayward <alan.hayward@arm.com>
15467 David Sherwood <david.sherwood@arm.com>
15468
15469 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
15470 constant and extern definitions for variable-length vectors.
15471 (vect_get_constant_vectors): Note that the number of units
15472 is known to be constant.
15473
15474 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15475 Alan Hayward <alan.hayward@arm.com>
15476 David Sherwood <david.sherwood@arm.com>
15477
15478 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
15479 of units as polynomial. Choose between WIDE and NARROW based
15480 on multiple_p.
15481
15482 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15483 Alan Hayward <alan.hayward@arm.com>
15484 David Sherwood <david.sherwood@arm.com>
15485
15486 * tree-vect-stmts.c (simd_clone_subparts): New function.
15487 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
15488
15489 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15490 Alan Hayward <alan.hayward@arm.com>
15491 David Sherwood <david.sherwood@arm.com>
15492
15493 * tree-vect-stmts.c (vectorizable_call): Treat the number of
15494 vectors as polynomial. Use build_index_vector for
15495 IFN_GOMP_SIMD_LANE.
15496
15497 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15498 Alan Hayward <alan.hayward@arm.com>
15499 David Sherwood <david.sherwood@arm.com>
15500
15501 * tree-vect-stmts.c (get_load_store_type): Treat the number of
15502 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
15503 for variable-length vectors.
15504 (vectorizable_mask_load_store): Treat the number of units as
15505 polynomial, asserting that it is constant if the condition has
15506 already been enforced.
15507 (vectorizable_store, vectorizable_load): Likewise.
15508
15509 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15510 Alan Hayward <alan.hayward@arm.com>
15511 David Sherwood <david.sherwood@arm.com>
15512
15513 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
15514 of units as polynomial. Punt if we can't tell at compile time
15515 which vector contains the final result.
15516
15517 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15518 Alan Hayward <alan.hayward@arm.com>
15519 David Sherwood <david.sherwood@arm.com>
15520
15521 * tree-vect-loop.c (vectorizable_induction): Treat the number
15522 of units as polynomial. Punt on SLP inductions. Use an integer
15523 VEC_SERIES_EXPR for variable-length integer reductions. Use a
15524 cast of such a series for variable-length floating-point
15525 reductions.
15526
15527 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15528 Alan Hayward <alan.hayward@arm.com>
15529 David Sherwood <david.sherwood@arm.com>
15530
15531 * tree.h (build_index_vector): Declare.
15532 * tree.c (build_index_vector): New function.
15533 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
15534 of units as polynomial, forcibly converting it to a constant if
15535 vectorizable_reduction has already enforced the condition.
15536 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
15537 to create a {1,2,3,...} vector.
15538 (vectorizable_reduction): Treat the number of units as polynomial.
15539 Choose vectype_in based on the largest scalar element size rather
15540 than the smallest number of units. Enforce the restrictions
15541 relied on above.
15542
15543 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15544 Alan Hayward <alan.hayward@arm.com>
15545 David Sherwood <david.sherwood@arm.com>
15546
15547 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
15548 number of units as polynomial.
15549
15550 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15551 Alan Hayward <alan.hayward@arm.com>
15552 David Sherwood <david.sherwood@arm.com>
15553
15554 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
15555 * target.def (autovectorize_vector_sizes): Return the vector sizes
15556 by pointer, using vector_sizes rather than a bitmask.
15557 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
15558 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
15559 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
15560 Likewise.
15561 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
15562 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
15563 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
15564 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
15565 * omp-general.c (omp_max_vf): Likewise.
15566 * omp-low.c (omp_clause_aligned_alignment): Likewise.
15567 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
15568 * tree-vect-loop.c (vect_analyze_loop): Likewise.
15569 * tree-vect-slp.c (vect_slp_bb): Likewise.
15570 * doc/tm.texi: Regenerate.
15571 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
15572 to a poly_uint64.
15573 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
15574 the vector size as a poly_uint64 rather than an unsigned int.
15575 (current_vector_size): Change from an unsigned int to a poly_uint64.
15576 (get_vectype_for_scalar_type): Update accordingly.
15577 * tree.h (build_truth_vector_type): Take the size and number of
15578 units as a poly_uint64 rather than an unsigned int.
15579 (build_vector_type): Add a temporary overload that takes
15580 the number of units as a poly_uint64 rather than an unsigned int.
15581 * tree.c (make_vector_type): Likewise.
15582 (build_truth_vector_type): Take the number of units as a poly_uint64
15583 rather than an unsigned int.
15584
15585 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15586 Alan Hayward <alan.hayward@arm.com>
15587 David Sherwood <david.sherwood@arm.com>
15588
15589 * target.def (get_mask_mode): Take the number of units and length
15590 as poly_uint64s rather than unsigned ints.
15591 * targhooks.h (default_get_mask_mode): Update accordingly.
15592 * targhooks.c (default_get_mask_mode): Likewise.
15593 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
15594 * doc/tm.texi: Regenerate.
15595
15596 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15597 Alan Hayward <alan.hayward@arm.com>
15598 David Sherwood <david.sherwood@arm.com>
15599
15600 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
15601 * omp-general.c (omp_max_vf): Likewise.
15602 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
15603 (expand_omp_simd): Handle polynomial safelen.
15604 * omp-low.c (omplow_simd_context): Add a default constructor.
15605 (omplow_simd_context::max_vf): Change from int to poly_uint64.
15606 (lower_rec_simd_input_clauses): Update accordingly.
15607 (lower_rec_input_clauses): Likewise.
15608
15609 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15610 Alan Hayward <alan.hayward@arm.com>
15611 David Sherwood <david.sherwood@arm.com>
15612
15613 * tree-vectorizer.h (vect_nunits_for_cost): New function.
15614 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
15615 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
15616 (vect_analyze_slp_cost): Likewise.
15617 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
15618 (vect_model_load_cost): Likewise.
15619
15620 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15621 Alan Hayward <alan.hayward@arm.com>
15622 David Sherwood <david.sherwood@arm.com>
15623
15624 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
15625 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
15626 from an unsigned int * to a poly_uint64_pod *.
15627 (calculate_unrolling_factor): New function.
15628 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
15629
15630 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15631 Alan Hayward <alan.hayward@arm.com>
15632 David Sherwood <david.sherwood@arm.com>
15633
15634 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
15635 from an unsigned int to a poly_uint64.
15636 (_loop_vec_info::slp_unrolling_factor): Likewise.
15637 (_loop_vec_info::vectorization_factor): Change from an int
15638 to a poly_uint64.
15639 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
15640 (vect_get_num_vectors): New function.
15641 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
15642 (vect_get_num_copies): Use vect_get_num_vectors.
15643 (vect_analyze_data_ref_dependences): Change max_vf from an int *
15644 to an unsigned int *.
15645 (vect_analyze_data_refs): Change min_vf from an int * to a
15646 poly_uint64 *.
15647 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
15648 than an unsigned HOST_WIDE_INT.
15649 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
15650 (vect_analyze_data_ref_dependence): Change max_vf from an int *
15651 to an unsigned int *.
15652 (vect_analyze_data_ref_dependences): Likewise.
15653 (vect_compute_data_ref_alignment): Handle polynomial vf.
15654 (vect_enhance_data_refs_alignment): Likewise.
15655 (vect_prune_runtime_alias_test_list): Likewise.
15656 (vect_shift_permute_load_chain): Likewise.
15657 (vect_supportable_dr_alignment): Likewise.
15658 (dependence_distance_ge_vf): Take the vectorization factor as a
15659 poly_uint64 rather than an unsigned HOST_WIDE_INT.
15660 (vect_analyze_data_refs): Change min_vf from an int * to a
15661 poly_uint64 *.
15662 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
15663 vfm1 as a poly_uint64 rather than an int. Make the same change
15664 for the returned bound_scalar.
15665 (vect_gen_vector_loop_niters): Handle polynomial vf.
15666 (vect_do_peeling): Likewise. Update call to
15667 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
15668 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
15669 be constant.
15670 * tree-vect-loop.c (vect_determine_vectorization_factor)
15671 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
15672 (vect_get_known_peeling_cost): Likewise.
15673 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
15674 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
15675 (vect_transform_loop): Likewise. Use the lowest possible VF when
15676 updating the upper bounds of the loop.
15677 (vect_min_worthwhile_factor): Make static. Return an unsigned int
15678 rather than an int.
15679 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
15680 polynomial unroll factors.
15681 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
15682 (vect_make_slp_decision): Likewise.
15683 (vect_supported_load_permutation_p): Likewise, and polynomial
15684 vf too.
15685 (vect_analyze_slp_cost): Handle polynomial vf.
15686 (vect_slp_analyze_node_operations): Likewise.
15687 (vect_slp_analyze_bb_1): Likewise.
15688 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
15689 than an unsigned HOST_WIDE_INT.
15690 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
15691 (vectorizable_load): Handle polynomial vf.
15692 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
15693 a poly_uint64.
15694 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
15695
15696 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15697 Alan Hayward <alan.hayward@arm.com>
15698 David Sherwood <david.sherwood@arm.com>
15699
15700 * match.pd: Handle bit operations involving three constants
15701 and try to fold one pair.
15702
15703 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15704
15705 * tree-vect-loop-manip.c: Include gimple-fold.h.
15706 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
15707 niters_maybe_zero parameters. Handle other cases besides a step of 1.
15708 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
15709 Add a path that uses a step of VF instead of 1, but disable it
15710 for now.
15711 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
15712 and niters_no_overflow parameters. Update calls to
15713 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
15714 Create a new SSA name if the latter choses to use a ste other
15715 than zero, and return it via niters_vector_mult_vf_var.
15716 * tree-vect-loop.c (vect_transform_loop): Update calls to
15717 vect_do_peeling, vect_gen_vector_loop_niters and
15718 slpeel_make_loop_iterate_ntimes.
15719 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
15720 (vect_gen_vector_loop_niters): Update declarations after above changes.
15721
15722 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
15723
15724 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
15725 128-bit round to integer instructions.
15726 (ceil<mode>2): Likewise.
15727 (btrunc<mode>2): Likewise.
15728 (round<mode>2): Likewise.
15729
15730 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15731
15732 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
15733 unaligned VSX load/store on P8/P9.
15734 (expand_block_clear): Allow the use of unaligned VSX
15735 load/store on P8/P9.
15736
15737 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15738
15739 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
15740 New function.
15741 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
15742 swap associated with both a load and a store.
15743
15744 2018-01-02 Andrew Waterman <andrew@sifive.com>
15745
15746 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
15747 * config/riscv/riscv.md (clear_cache): Use it.
15748
15749 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
15750
15751 * web.c: Remove out-of-date comment.
15752
15753 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15754
15755 * expr.c (fixup_args_size_notes): Check that any existing
15756 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
15757 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
15758 (emit_single_push_insn): ...here.
15759
15760 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15761
15762 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
15763 (const_vector_encoded_nelts): New function.
15764 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
15765 (const_vector_int_elt, const_vector_elt): Declare.
15766 * emit-rtl.c (const_vector_int_elt_1): New function.
15767 (const_vector_elt): Likewise.
15768 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
15769 of CONST_VECTOR_ELT.
15770
15771 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15772
15773 * expr.c: Include rtx-vector-builder.h.
15774 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
15775 directly on the tree encoding.
15776 (const_vector_from_tree): Likewise.
15777 * optabs.c: Include rtx-vector-builder.h.
15778 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
15779 sequence of "u" values.
15780 * vec-perm-indices.c: Include rtx-vector-builder.h.
15781 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
15782 directly on the vec_perm_indices encoding.
15783
15784 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15785
15786 * doc/rtl.texi (const_vector): Describe new encoding scheme.
15787 * Makefile.in (OBJS): Add rtx-vector-builder.o.
15788 * rtx-vector-builder.h: New file.
15789 * rtx-vector-builder.c: Likewise.
15790 * rtl.h (rtx_def::u2): Add a const_vector field.
15791 (CONST_VECTOR_NPATTERNS): New macro.
15792 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
15793 (CONST_VECTOR_DUPLICATE_P): Likewise.
15794 (CONST_VECTOR_STEPPED_P): Likewise.
15795 (CONST_VECTOR_ENCODED_ELT): Likewise.
15796 (const_vec_duplicate_p): Check for a duplicated vector encoding.
15797 (unwrap_const_vec_duplicate): Likewise.
15798 (const_vec_series_p): Check for a non-duplicated vector encoding.
15799 Say that the function only returns true for integer vectors.
15800 * emit-rtl.c: Include rtx-vector-builder.h.
15801 (gen_const_vec_duplicate_1): Delete.
15802 (gen_const_vector): Call gen_const_vec_duplicate instead of
15803 gen_const_vec_duplicate_1.
15804 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
15805 (gen_const_vec_duplicate): Use rtx_vector_builder.
15806 (gen_const_vec_series): Likewise.
15807 (gen_rtx_CONST_VECTOR): Likewise.
15808 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
15809 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
15810 Build a new vector rather than modifying a CONST_VECTOR in-place.
15811 (handle_special_swappables): Update call accordingly.
15812 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
15813 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
15814 Build a new vector rather than modifying a CONST_VECTOR in-place.
15815 (handle_special_swappables): Update call accordingly.
15816
15817 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15818
15819 * simplify-rtx.c (simplify_const_binary_operation): Use
15820 CONST_VECTOR_ELT instead of XVECEXP.
15821
15822 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15823
15824 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
15825 the selector elements to be different from the data elements
15826 if the selector is a VECTOR_CST.
15827 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
15828 ssizetype for the selector.
15829
15830 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15831
15832 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
15833 before testing each element individually.
15834 * tree-vect-generic.c (lower_vec_perm): Likewise.
15835
15836 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15837
15838 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
15839 * selftest-run-tests.c (selftest::run_tests): Call it.
15840 * vector-builder.h (vector_builder::operator ==): New function.
15841 (vector_builder::operator !=): Likewise.
15842 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
15843 (vec_perm_indices::all_from_input_p): New function.
15844 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
15845 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
15846 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
15847 instead of reading the VECTOR_CST directly. Detect whether both
15848 vector inputs are the same before constructing the vec_perm_indices,
15849 and update the number of inputs argument accordingly. Use the
15850 utility functions added above. Only construct sel2 if we need to.
15851
15852 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15853
15854 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
15855 the broadcast of the low byte.
15856 (expand_mult_highpart): Use an explicit encoding for the permutes.
15857 * optabs-query.c (can_mult_highpart_p): Likewise.
15858 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
15859 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15860 (vectorizable_bswap): Likewise.
15861 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
15862 explicit encoding for the power-of-2 permutes.
15863 (vect_permute_store_chain): Likewise.
15864 (vect_grouped_load_supported): Likewise.
15865 (vect_permute_load_chain): Likewise.
15866
15867 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15868
15869 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
15870 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
15871 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
15872 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
15873 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
15874 (vect_gen_perm_mask_any): Likewise.
15875
15876 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15877
15878 * int-vector-builder.h: New file.
15879 * vec-perm-indices.h: Include int-vector-builder.h.
15880 (vec_perm_indices): Redefine as an int_vector_builder.
15881 (auto_vec_perm_indices): Delete.
15882 (vec_perm_builder): Redefine as a stand-alone class.
15883 (vec_perm_indices::vec_perm_indices): New function.
15884 (vec_perm_indices::clamp): Likewise.
15885 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
15886 (vec_perm_indices::new_vector): New function.
15887 (vec_perm_indices::new_expanded_vector): Update for new
15888 vec_perm_indices class.
15889 (vec_perm_indices::rotate_inputs): New function.
15890 (vec_perm_indices::all_in_range_p): Operate directly on the
15891 encoded form, without computing elided elements.
15892 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
15893 encoding. Update for new vec_perm_indices class.
15894 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
15895 the given vec_perm_builder.
15896 (expand_vec_perm_var): Update vec_perm_builder constructor.
15897 (expand_mult_highpart): Use vec_perm_builder instead of
15898 auto_vec_perm_indices.
15899 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
15900 vec_perm_indices instead of auto_vec_perm_indices. Use a single
15901 or double series encoding as appropriate.
15902 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
15903 vec_perm_indices instead of auto_vec_perm_indices.
15904 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15905 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
15906 (vect_permute_store_chain): Likewise.
15907 (vect_grouped_load_supported): Likewise.
15908 (vect_permute_load_chain): Likewise.
15909 (vect_shift_permute_load_chain): Likewise.
15910 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
15911 (vect_transform_slp_perm_load): Likewise.
15912 (vect_schedule_slp_instance): Likewise.
15913 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15914 (vectorizable_mask_load_store): Likewise.
15915 (vectorizable_bswap): Likewise.
15916 (vectorizable_store): Likewise.
15917 (vectorizable_load): Likewise.
15918 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
15919 vec_perm_indices instead of auto_vec_perm_indices. Use
15920 tree_to_vec_perm_builder to read the vector from a tree.
15921 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
15922 vec_perm_builder instead of a vec_perm_indices.
15923 (have_whole_vector_shift): Use vec_perm_builder and
15924 vec_perm_indices instead of auto_vec_perm_indices. Leave the
15925 truncation to calc_vec_perm_mask_for_shift.
15926 (vect_create_epilog_for_reduction): Likewise.
15927 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
15928 from auto_vec_perm_indices to vec_perm_indices.
15929 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
15930 instead of changing individual elements.
15931 (aarch64_vectorize_vec_perm_const): Use new_vector to install
15932 the vector in d.perm.
15933 * config/arm/arm.c (expand_vec_perm_d::perm): Change
15934 from auto_vec_perm_indices to vec_perm_indices.
15935 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
15936 instead of changing individual elements.
15937 (arm_vectorize_vec_perm_const): Use new_vector to install
15938 the vector in d.perm.
15939 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
15940 Update vec_perm_builder constructor.
15941 (rs6000_expand_interleave): Likewise.
15942 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
15943 (rs6000_expand_interleave): Likewise.
15944
15945 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15946
15947 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
15948 to qimode could truncate the indices.
15949 * optabs.c (expand_vec_perm_var): Likewise.
15950
15951 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15952
15953 * Makefile.in (OBJS): Add vec-perm-indices.o.
15954 * vec-perm-indices.h: New file.
15955 * vec-perm-indices.c: Likewise.
15956 * target.h (vec_perm_indices): Replace with a forward class
15957 declaration.
15958 (auto_vec_perm_indices): Move to vec-perm-indices.h.
15959 * optabs.h: Include vec-perm-indices.h.
15960 (expand_vec_perm): Delete.
15961 (selector_fits_mode_p, expand_vec_perm_var): Declare.
15962 (expand_vec_perm_const): Declare.
15963 * target.def (vec_perm_const_ok): Replace with...
15964 (vec_perm_const): ...this new hook.
15965 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
15966 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
15967 * doc/tm.texi: Regenerate.
15968 * optabs.def (vec_perm_const): Delete.
15969 * doc/md.texi (vec_perm_const): Likewise.
15970 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
15971 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
15972 expand_vec_perm for constant permutation vectors. Assert that
15973 the mode of variable permutation vectors is the integer equivalent
15974 of the mode that is being permuted.
15975 * optabs-query.h (selector_fits_mode_p): Declare.
15976 * optabs-query.c: Include vec-perm-indices.h.
15977 (selector_fits_mode_p): New function.
15978 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
15979 is defined, instead of checking whether the vec_perm_const_optab
15980 exists. Use targetm.vectorize.vec_perm_const instead of
15981 targetm.vectorize.vec_perm_const_ok. Check whether the indices
15982 fit in the vector mode before using a variable permute.
15983 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
15984 vec_perm_indices instead of an rtx.
15985 (expand_vec_perm): Replace with...
15986 (expand_vec_perm_const): ...this new function. Take the selector
15987 as a vec_perm_indices rather than an rtx. Also take the mode of
15988 the selector. Update call to shift_amt_for_vec_perm_mask.
15989 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
15990 Use vec_perm_indices::new_expanded_vector to expand the original
15991 selector into bytes. Check whether the indices fit in the vector
15992 mode before using a variable permute.
15993 (expand_vec_perm_var): Make global.
15994 (expand_mult_highpart): Use expand_vec_perm_const.
15995 * fold-const.c: Includes vec-perm-indices.h.
15996 * tree-ssa-forwprop.c: Likewise.
15997 * tree-vect-data-refs.c: Likewise.
15998 * tree-vect-generic.c: Likewise.
15999 * tree-vect-loop.c: Likewise.
16000 * tree-vect-slp.c: Likewise.
16001 * tree-vect-stmts.c: Likewise.
16002 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
16003 Delete.
16004 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
16005 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
16006 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
16007 (aarch64_vectorize_vec_perm_const): ...this new function.
16008 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
16009 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
16010 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
16011 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
16012 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
16013 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
16014 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
16015 into...
16016 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
16017 check for NEON modes.
16018 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
16019 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
16020 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
16021 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
16022 into...
16023 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
16024 the old VEC_PERM_CONST conditions.
16025 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
16026 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
16027 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
16028 (ia64_vectorize_vec_perm_const_ok): Merge into...
16029 (ia64_vectorize_vec_perm_const): ...this new function.
16030 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
16031 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
16032 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
16033 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
16034 * config/mips/mips.c (mips_expand_vec_perm_const)
16035 (mips_vectorize_vec_perm_const_ok): Merge into...
16036 (mips_vectorize_vec_perm_const): ...this new function.
16037 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
16038 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
16039 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
16040 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
16041 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
16042 (rs6000_expand_vec_perm_const): Delete.
16043 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
16044 Delete.
16045 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
16046 (altivec_expand_vec_perm_const_le): Take each operand individually.
16047 Operate on constant selectors rather than rtxes.
16048 (altivec_expand_vec_perm_const): Likewise. Update call to
16049 altivec_expand_vec_perm_const_le.
16050 (rs6000_expand_vec_perm_const): Delete.
16051 (rs6000_vectorize_vec_perm_const_ok): Delete.
16052 (rs6000_vectorize_vec_perm_const): New function.
16053 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
16054 an element count and rtx array.
16055 (rs6000_expand_extract_even): Update call accordingly.
16056 (rs6000_expand_interleave): Likewise.
16057 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
16058 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
16059 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
16060 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
16061 (rs6000_expand_vec_perm_const): Delete.
16062 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
16063 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
16064 (altivec_expand_vec_perm_const_le): Take each operand individually.
16065 Operate on constant selectors rather than rtxes.
16066 (altivec_expand_vec_perm_const): Likewise. Update call to
16067 altivec_expand_vec_perm_const_le.
16068 (rs6000_expand_vec_perm_const): Delete.
16069 (rs6000_vectorize_vec_perm_const_ok): Delete.
16070 (rs6000_vectorize_vec_perm_const): New function. Remove stray
16071 reference to the SPE evmerge intructions.
16072 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
16073 an element count and rtx array.
16074 (rs6000_expand_extract_even): Update call accordingly.
16075 (rs6000_expand_interleave): Likewise.
16076 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
16077 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
16078 new function.
16079 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
16080
16081 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16082
16083 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
16084 vector mode and that that mode matches the mode of the data
16085 being permuted.
16086 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
16087 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
16088 directly using expand_vec_perm_1 when forcing selectors into
16089 registers.
16090 (expand_vec_perm_var): New function, split out from expand_vec_perm.
16091
16092 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16093
16094 * optabs-query.h (can_vec_perm_p): Delete.
16095 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
16096 * optabs-query.c (can_vec_perm_p): Split into...
16097 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
16098 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
16099 particular selector is valid.
16100 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16101 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
16102 (vect_grouped_load_supported): Likewise.
16103 (vect_shift_permute_load_chain): Likewise.
16104 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
16105 (vect_transform_slp_perm_load): Likewise.
16106 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
16107 (vectorizable_bswap): Likewise.
16108 (vect_gen_perm_mask_checked): Likewise.
16109 * fold-const.c (fold_ternary_loc): Likewise. Don't take
16110 implementations of variable permutation vectors into account
16111 when deciding which selector to use.
16112 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
16113 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
16114 with a false third argument.
16115 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
16116 to test whether the constant selector is valid and can_vec_perm_var_p
16117 to test whether a variable selector is valid.
16118
16119 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16120
16121 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
16122 * optabs-query.c (can_vec_perm_p): Likewise.
16123 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
16124 instead of vec_perm_indices.
16125 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
16126 (vect_gen_perm_mask_checked): Likewise,
16127 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
16128 (vect_gen_perm_mask_checked): Likewise,
16129
16130 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16131
16132 * optabs-query.h (qimode_for_vec_perm): Declare.
16133 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
16134 (qimode_for_vec_perm): ...this new function.
16135 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
16136
16137 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16138
16139 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
16140 does not have a conditional at the top.
16141
16142 2018-01-02 Richard Biener <rguenther@suse.de>
16143
16144 * ipa-inline.c (big_speedup_p): Fix expression.
16145
16146 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
16147
16148 PR target/81616
16149 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
16150 for generic 4->6.
16151
16152 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
16153
16154 PR target/81616
16155 Generic tuning.
16156 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
16157 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
16158 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
16159 cond_taken_branch_cost 3->4.
16160
16161 2018-01-01 Jakub Jelinek <jakub@redhat.com>
16162
16163 PR tree-optimization/83581
16164 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
16165 TODO_cleanup_cfg if any changes have been made.
16166
16167 PR middle-end/83608
16168 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
16169 convert_modes if target mode has the right side, but different mode
16170 class.
16171
16172 PR middle-end/83609
16173 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
16174 last argument when extracting from CONCAT. If either from_real or
16175 from_imag is NULL, use expansion through memory. If result is not
16176 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
16177 the parts directly to inner mode, if even that fails, use expansion
16178 through memory.
16179
16180 PR middle-end/83623
16181 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
16182 check for bswap in mode rather than HImode and use that in expand_unop
16183 too.
16184 \f
16185 Copyright (C) 2018 Free Software Foundation, Inc.
16186
16187 Copying and distribution of this file, with or without modification,
16188 are permitted in any medium without royalty provided the copyright
16189 notice and this notice are preserved.