1 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4 redundant WIDEN_SUM_EXPR handling.
5 (vect_recog_sad_pattern): Likewise.
7 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
11 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
12 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
13 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
15 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17 * tree-vect-stmts.c (vectorizable_call): Make sure that we
18 use the stmt_vec_info of the original bb statement for the
19 new zero assignment, even if the call is part of a pattern.
21 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
23 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
24 that the sequence is attached to the original statement rather
25 than the pattern statement.
26 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
27 PATTERN_DEF_SEQ from the original statement rather than
28 the main pattern statement.
29 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
30 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
31 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
33 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
35 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
36 definition statements before the early exit for statements that aren't
38 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
40 (vect_transform_loop): ...here. Process pattern definition
41 statements without first checking whether the main pattern
42 statement is live or relevant.
44 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
46 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
47 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
49 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
51 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
52 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
53 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
54 (expand_block_compare): Change select_block_compare_mode call.
55 (expand_strncmp_align_check): Use new functions, fix comment.
56 (emit_final_str_compare_gpr): New function.
57 (expand_strn_compare): Refactor and clean up code.
58 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
60 2018-06-19 Tony Reix <tony.reix@atos.com>
61 Damien Bergamini <damien.bergamini@atos.com>
62 David Edelsohn <dje.gcc@gmail.com>
64 * collect2.c (static_obj): New variable.
65 (static_libs): New variable.
66 (is_in_list): Uncomment declaration.
67 (main): Track AIX libraries linked statically.
68 (is_in_list): Uncomment definition.
69 (scan_prog_file): Don't add AIX shared libraries initializer
70 to constructor list if linking statically.
72 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
74 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
76 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
78 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
80 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
83 2018-06-19 Martin Liska <mliska@suse.cz>
85 * config/i386/i386.c (ix86_can_inline_p): Do not use
86 ipa_fn_summaries::get_create.
87 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
89 (devirtualization_time_bonus): Likewise.
90 (ipcp_propagate_stage): Likewise.
91 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
92 (edge_set_predicate): Likewise.
93 (evaluate_conditions_for_known_args): Likewise.
94 (evaluate_properties_for_edge): Likewise.
95 (ipa_call_summary::reset): Tranform to ...
96 (ipa_call_summary::~ipa_call_summary): ... this.
97 (ipa_fn_summary::reset): Transform to ...
98 (ipa_fn_summary::~ipa_fn_summary): ... this.
99 (ipa_fn_summary_t::remove): Rename to ...
100 (ipa_fn_summary_t::remove_callees): ... this.
101 (ipa_fn_summary_t::duplicate): Use placement new
102 instead of memory copy.
103 (ipa_call_summary_t::duplicate): Likewise.
104 (ipa_call_summary_t::remove): Remove.
105 (dump_ipa_call_summary): Change get_create to get.
106 (ipa_dump_fn_summary): Dump only when summary exists.
107 (analyze_function_body): Use symbol_summary::get instead
109 (compute_fn_summary): Likewise.
110 (estimate_edge_devirt_benefit): Likewise.
111 (estimate_edge_size_and_time): Likewise.
112 (inline_update_callee_summaries): Likewise.
113 (remap_edge_change_prob): Likewise.
114 (remap_edge_summaries): Likewise.
115 (ipa_merge_fn_summary_after_inlining): Likewise.
116 (write_ipa_call_summary): Likewise.
117 (ipa_fn_summary_write): Likewise.
118 (ipa_free_fn_summary): Likewise.
119 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
120 (struct ipa_call_summary): Likewise.
121 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
123 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
124 (estimate_size_after_inlining): Likewise.
125 (estimate_growth): Likewise.
126 (growth_likely_positive): Likewise.
127 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
128 (inline_call): Likewise.
129 * ipa-inline.c (caller_growth_limits): Likewise.
130 (can_inline_edge_p): Likewise.
131 (can_inline_edge_by_limits_p): Likewise.
132 (compute_uninlined_call_time): Likewise.
133 (compute_inlined_call_time): Likewise.
134 (want_inline_small_function_p): Likewise.
135 (edge_badness): Likewise.
136 (update_caller_keys): Likewise.
137 (update_callee_keys): Likewise.
138 (inline_small_functions): Likewise.
139 (inline_to_all_callers_1): Likewise.
140 (dump_overall_stats): Likewise.
141 (early_inline_small_functions): Likewise.
142 (early_inliner): Likewise.
143 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
144 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
145 * ipa-pure-const.c (malloc_candidate_p): Likewise.
146 * ipa-split.c (execute_split_functions): Likewise.
147 * symbol-summary.h: Likewise.
148 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
150 2018-06-19 Richard Biener <rguenther@suse.de>
152 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
153 (vectorize_loops): ... here. Fix dbgcnt handling.
154 (try_vectorize_loop): Wrap try_vectorize_loop_1.
156 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
159 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
160 ieee128 argument takes up only one (vector) register, not two (floating
163 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
165 * gimplify.c (gimplify_init_constructor): Really never clear for an
166 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
168 2018-06-19 Richard Biener <rguenther@suse.de>
170 PR tree-optimization/86179
171 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
172 after failed recognition.
174 2018-06-18 Martin Sebor <msebor@redhat.com>
177 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
178 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
179 Handle integer subtraction.
180 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
181 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
183 2018-06-18 David Malcolm <dmalcolm@redhat.com>
185 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
186 param from rtx to rtx_insn *.
187 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
189 (frv_ifcvt_modify_insn): Likwise.
190 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
191 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
192 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
193 as_a <rtx_insn *> cast to local "unprotected_region" once
194 it's been established that it's not NULL or pc_rtx.
195 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
196 param "sethi" from rtx to rtx_insn *.
197 (nds32_group_float_insns): Likewise for param "insn".
198 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
200 (vax_output_int_subtract): Likewise.
201 * config/vax/vax.c (vax_output_int_add): Likewise for param
203 (vax_output_int_subtract): Likewise.
204 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
205 (emit_pattern_after): Likewise for param "after".
206 (emit_insn_after): Likewise.
207 (emit_jump_insn_after): Likewise.
208 (emit_call_insn_after): Likewise.
209 (emit_debug_insn_after): Likewise.
210 (emit_pattern_before): Likewise for param "before".
211 (emit_insn_before): Likewise.
212 (emit_jump_insn_before): Likewise.
213 * final.c (get_insn_template): Likewise for param "insn", removing
215 * output.h (get_insn_template): Likewise for 2nd param.
216 * rtl.h (emit_insn_before): Likewise.
217 (emit_jump_insn_before): Likewise.
218 (emit_debug_insn_before_noloc): Likewise.
219 (emit_insn_after): Likewise.
220 (emit_jump_insn_after): Likewise.
221 (emit_call_insn_after): Likewise.
222 (emit_debug_insn_after): Likewise.
223 (set_insn_deleted): Likewise for param.
225 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
228 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
229 floating point modes, so that IFmode is numerically greater than
230 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
231 to declare the ordering. This prevents IFmode from being
232 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
233 machine. Include rs6000-modes.h to share the fractional values
234 between genmodes* and the rest of the compiler.
238 * config/rs6000/rs6000-modes.h: New file.
239 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
240 meaning of rs6000_long_double_size so that 126..128 selects an
241 appropriate 128-bit floating point type.
242 (rs6000_option_override_internal): Likewise.
243 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
244 (TARGET_LONG_DOUBLE_128): Change the meaning of
245 rs6000_long_double_size so that 126..128 selects an appropriate
246 128-bit floating point type.
247 (LONG_DOUBLE_TYPE_SIZE): Update comment.
248 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
249 source and destination to match the standard usage.
250 (truncifkf2): Likewise.
251 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
252 ISA 2.07 to use an explicit clobber, instead of passing in a
254 (copysign<mode>3_soft): Likewise.
256 2018-06-18 David Malcolm <dmalcolm@redhat.com>
258 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
259 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
260 (vect_slp_analyze_instance_dependence): Likewise.
261 (vect_enhance_data_refs_alignment): Likewise.
262 (vect_analyze_data_refs_alignment): Likewise.
263 (vect_slp_analyze_and_verify_instance_alignment
264 (vect_analyze_data_ref_accesses): Likewise.
265 (vect_prune_runtime_alias_test_list): Likewise.
266 (vect_analyze_data_refs): Likewise.
267 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
268 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
269 (vect_analyze_scalar_cycles_1): Likewise.
270 (vect_get_loop_niters): Likewise.
271 (vect_analyze_loop_form_1): Likewise.
272 (vect_update_vf_for_slp): Likewise.
273 (vect_analyze_loop_operations): Likewise.
274 (vect_analyze_loop): Likewise.
275 (vectorizable_induction): Likewise.
276 (vect_transform_loop): Likewise.
277 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
278 * tree-vect-slp.c (vect_analyze_slp): Likewise.
279 (vect_make_slp_decision): Likewise.
280 (vect_detect_hybrid_slp): Likewise.
281 (vect_slp_analyze_operations): Likewise.
282 (vect_slp_bb): Likewise.
283 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
284 (vectorizable_bswap): Likewise.
285 (vectorizable_call): Likewise.
286 (vectorizable_simd_clone_call): Likewise.
287 (vectorizable_conversion): Likewise.
288 (vectorizable_assignment): Likewise.
289 (vectorizable_shift): Likewise.
290 (vectorizable_operation): Likewise.
291 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
293 2018-06-18 Martin Sebor <msebor@redhat.com>
295 PR tree-optimization/81384
296 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
297 * builtins.c (expand_builtin_strnlen): New function.
298 (expand_builtin): Call it.
299 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
300 * builtins.def (BUILT_IN_STRNLEN): New.
301 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
302 Warn for bounds in excess of maximum object size.
303 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
304 single-value ranges. Handle strnlen.
305 (handle_builtin_strlen): Handle strnlen.
306 (strlen_check_and_optimize_stmt): Same.
307 * doc/extend.texi (Other Builtins): Document strnlen.
309 2018-06-18 Maya Rashish <coypu@sdf.org>
311 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
312 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
313 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
315 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
317 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
319 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
321 * tree.c (escaped_string::escape): Replace cast to char * by
322 const_cast<char *> (unescaped).
324 2018-06-18 Nick Clifton <nickc@redhat.com>
327 * tree.c (escaped_string): New class. Converts an unescaped
328 string into its escaped equivalent.
329 (warn_deprecated_use): Use the new class to convert the
330 deprecation message, if present.
331 (test_escaped_strings): New self test.
332 (test_c_tests): Add test_escaped_strings.
333 * doc/extend.texi (deprecated): Add a note that the
334 deprecation message is affected by the -fmessage-length
335 option, and that control characters will be escaped.
336 (#pragma GCC error): Document this pragma.
337 (#pragma GCC warning): Likewise.
338 * doc/invoke.texi (-fmessage-length): Document this option's
339 effect on the #warning and #error preprocessor directives and
340 the deprecated attribute.
342 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
344 * tree.c (decl_value_expr_lookup): Revert latest change.
345 (decl_value_expr_insert): Likewise.
347 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
349 * gimplify.c (nonlocal_vlas): Delete.
350 (nonlocal_vla_vars): Likewise.
351 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
353 (gimplify_body): Do not create and destroy nonlocal_vlas.
354 * tree-nested.c: Include diagnostic.h.
355 (use_pointer_in_frame): Tweak.
356 (lookup_field_for_decl): Add assertion and declare the transformation.
357 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
358 internal error when the reference is in a wrong context. Do not
359 create a debug decl by default.
360 (note_nonlocal_block_vlas): Delete.
361 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
362 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
363 create a debug decl by default.
364 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
365 call is in a wrong context.
366 (fixup_vla_decls): New function.
367 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
368 debug variables were created.
369 * tree.c (decl_value_expr_lookup): Add checking assertion.
370 (decl_value_expr_insert): Likewise.
372 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
375 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
376 * tree-scalar-evolution.c (interpret_expr): Likewise.
377 (expression_expensive_p): Likewise.
378 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
379 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
380 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
381 (ssa_defined_by_minus_one_stmt_p): New.
383 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
386 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
387 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
388 * dojump.c (do_jump): Likewise.
389 * expr.c (expand_expr_real_2): Check operand type's sign.
390 * fold-const.c (const_unop): Handle ABSU_EXPR.
391 (fold_abs_const): Likewise.
392 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
393 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
394 (strip_sign_op_1): Likesise.
395 * match.pd: Add new pattern to generate ABSU_EXPR.
396 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
397 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
398 * tree-eh.c (operation_could_trap_helper_p): Likewise.
399 * tree-inline.c (estimate_operator_cost): Likewise.
400 * tree-pretty-print.c (dump_generic_node): Likewise.
401 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
402 * tree.def (ABSU_EXPR): New.
404 2018-06-16 Jakub Jelinek <jakub@redhat.com>
407 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
408 documented as preserved for backward compatibility only.
409 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
411 PR rtl-optimization/86108
412 * bb-reorder.c (create_forwarder_block): Renamed to ...
413 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
414 jump from new landing pad to the second part.
415 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
418 2018-06-15 Jakub Jelinek <jakub@redhat.com>
421 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
422 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
423 Only call store_expr for halves if the mode is the same.
426 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
427 Fix up comment formatting.
429 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
431 * typed-splay-tree.h (typed_splay_tree::remove): New function.
432 (typed_splay_tree::closure,
433 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
434 (typed_splay_tree::typed_splay_tree,
435 typed_splay_tree::operator =): Declared private.
436 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
437 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
438 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
439 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
440 typed_splay_tree::splay_tree_splay,
441 typed_splay_tree::splay_tree_foreach_helper,
442 typed_splay_tree::splay_tree_insert,
443 typed_splay_tree::splay_tree_remove,
444 typed_splay_tree::splay_tree_lookup,
445 typed_splay_tree::splay_tree_predecessor,
446 typed_splay_tree::splay_tree_successor,
447 typed_splay_tree::splay_tree_min,
448 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
449 (typed_splay_tree::root, typed_splay_tree::comp,
450 typed_splay_tree::delete_key,
451 typed_splay_tree::delete_value): New data members.
452 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
453 typed_splay_tree::remove.
455 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
457 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
458 -mginv and -mno-ginv to the assembler.
459 * config/mips/mips.opt (-mcrc): New option.
461 * doc/invoke.text (-mcrc): Document.
464 2018-06-15 Nick Clifton <nickc@redhat.com>
467 * tree.c (escaped_string): New class. Converts an unescaped
468 string into its escaped equivalent.
469 (warn_deprecated_use): Use the new class to convert the
470 deprecation message, if present.
471 (test_escaped_strings): New self test.
472 (test_c_tests): Add test_escaped_strings.
473 * doc/extend.texi (deprecated): Add a note that the
474 deprecation message is affected by the -fmessage-length
475 option, and that control characters will be escaped.
476 (#pragma GCC error): Document this pragma.
477 (#pragma GCC warning): Likewise.
478 * doc/invoke.texi (-fmessage-length): Document this option's
479 effect on the #warning and #error preprocessor directives and
480 the deprecated attribute.
482 2018-06-15 Richard Biener <rguenther@suse.de>
484 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
485 here, also noting vector size used.
486 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
487 size used in MSG_OPTIMIZED_LOCATIONS dump.
488 (pass_slp_vectorize::execute): Adjust.
490 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
493 * config/arc/arc.c (arc_return_address_register): Fix
496 2018-06-15 Richard Biener <rguenther@suse.de>
499 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
500 leave useless conversion stripping to force_gimple_operand_gsi.
501 (gimplify_build2): Likewise.
502 (gimplify_build1): Likewise.
504 2018-06-15 Richard Biener <rguenther@suse.de>
507 * tree-cfg.c (move_stmt_op): unshare invariant addresses
508 before adjusting their block.
510 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
512 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
513 multilibs for *-*-rtems*.
514 * config/riscv/t-rtems: New file.
516 2018-06-14 Jakub Jelinek <jakub@redhat.com>
519 * match.pd ((A +- CST1) +- CST2): Punt if last resort
520 unsigned_type_for returns NULL.
523 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
524 subregs of multi-word pseudos unless the float mode has word size.
526 2018-06-14 Richard Biener <rguenther@suse.de>
529 * tree-vect-generic.c (build_word_mode_vector_type): Remove
530 duplicate and harmful type_hash_canon.
531 * tree.c (type_hash_canon): Assert we didn't find ourselves.
533 2018-06-14 Richard Biener <rguenther@suse.de>
536 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
539 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
541 * config/rtems.h (STDINT_LONG32): Define.
543 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
544 Prachi Godbole <prachi.godbole@imgtec.com>
546 * config/mips/mips-cpus.def: Define P6600.
547 * config/mips/mips-tables.opt: Regenerate.
548 * config/mips/mips.c (mips_ucbranch_type): New enum.
549 (mips_rtx_cost_data): Add support for P6600.
550 (mips_issue_rate): Likewise.
551 (mips_multipass_dfa_lookahead): Likewise.
552 (mips_avoid_hazard): Likewise.
553 (mips_reorg_process_insns): Likewise.
554 (mips_classify_branch_p6600): New function.
555 * config/mips/mips.h (TUNE_P6600): New define.
556 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
557 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
558 * config/mips/mips.md: Include p6600.md.
559 (processor): Add p6600.
560 * config/mips/p6600.md: New file.
561 * doc/invoke.texi: Add p6600 to supported architectures.
563 2018-06-13 Martin Sebor <msebor@redhat.com>
565 PR tree-optimization/86114
566 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
568 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
570 2018-06-13 Richard Biener <rguenther@suse.de>
572 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
573 Properly set vector type of the intermediate stmt.
574 * tree-vect-stmts.c (vectorizable_operation): The destination
575 var always has vectype_out type.
577 2018-06-13 Jeff Law <law@redhat.com>
579 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
580 integer 0 for argument to print_rtl_with_bb.
581 (rl78_reorg): Likewise.
583 2018-06-13 David Malcolm <dmalcolm@redhat.com>
585 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
586 from rtx to rtx_insn *.
587 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
589 (add_sched_insns_for_speculation): Likewise for local "target",
590 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
591 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
592 from rtx_insn ** to rtx_code_label **.
593 (reorg_emit_nops): Likewise.
594 (c6x_reorg): Likewise for local "call_labels".
595 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
597 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
598 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
599 the loops over LABEL_REFS.
600 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
602 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
603 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
604 (split_branches): Strengthen local "olabel" from rtx to
605 rtx_insn *, adding a safe_as_a cast.
606 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
608 (add_insn_after): Likewise for first two params.
609 (add_insn_before): Likewise.
610 (remove_insn): Likewise for param.
611 (emit_pattern_before_noloc): Likewise for second and third params.
612 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
613 (emit_call_insn_before_noloc): Likewise.
614 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
616 (emit_barrier_before): Likewise.
617 (emit_label_before): Strengthen "label" param from "rtx" to
618 "rtx_code_label *". Strengthen "before" param from "rtx" to
620 (emit_insn_after_1): Strengthen "after" param from "rtx" to
622 (emit_pattern_after_noloc): Likewise.
623 (emit_insn_after_noloc): Likewise.
624 (emit_jump_insn_after_noloc): Likewise.
625 (emit_call_insn_after_noloc): Likewise.
626 (emit_debug_insn_after_noloc): Likewise.
627 (emit_barrier_after): Likewise.
628 (emit_label_after): Likewise for both params.
629 (emit_pattern_after_setloc): Likewise for "after" param. Convert
630 "loc" param from "int" to "location_t".
631 (emit_insn_after_setloc): Likewise.
632 (emit_jump_insn_after_setloc): Likewise.
633 (emit_call_insn_after_setloc): Likewise.
634 (emit_debug_insn_after_setloc): Likewise.
635 (emit_pattern_before_setloc): Likewise for "before" param. Convert
636 "loc" param from "int" to "location_t".
637 (emit_pattern_before): Convert NULL_RTX to NULL.
638 (emit_insn_before_setloc): Convert "loc" param from "int" to
640 (emit_jump_insn_before_setloc): Likewise.
641 (emit_call_insn_before_setloc): Likewise.
642 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
643 rtx_insn *. Convert "loc" param from "int" to "location_t".
644 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
645 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
646 Convert 3rd param from "int" to "location_t".
647 (emit_barrier_before, emit_barrier_after, next_real_insn):
648 Strengthen param from rtx to rtx_insn *.
649 (emit_label_before): Strengthen 1st param from "rtx" to
650 "rtx_code_label *". Strengthen 2nd param from "rtx" to
652 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
653 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
654 Strengthen 2nd param from "rtx" to "rtx_insn *".
655 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
656 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
657 Likewise. Convert 3rd param from "int" to "location_t".
658 (emit_label_after): Strengthen 1st param from "rtx" to
660 (next_real_insn, remove_insn): Strengthen param from "rtx" to
662 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
663 from "rtx" to "rtx_insn *".
665 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
667 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
668 bodies streamed in with -Q.
669 * dumpfile.c (dump_files): Add lto-stream-out dump file.
670 * dumpfile.h (tree_dump_index): Add lto_stream_out.
671 * gimple-streamer-out.c: Include gimple-pretty-print.h
672 (output_bb): Dump stmts streamed.
673 * lto-section-out.c: Include print-tree.h
674 (lto_begin_section): Dump sections created.
675 (lto_output_decl_index): Dump decl encoded.
676 * lto-streamer-out.c: Include print-tree.h
677 (create_output_block): Dump output block created.
678 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
679 (output_function): Dump function output.
680 (output_constructor): Dump constructor streamed.
681 (write_global_stream): Output indexes encoded.
682 (produce_asm_for_decls): Dump streams encoded.
683 * lto-streamer.c (streamer_dump_file): New global var.
684 * lto-streamer.h (streamer_dump_file): Declare.
685 * passes.c (ipa_write_summaries): Initialize streamer dump.
686 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
689 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
692 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
693 offsets for register save directives. Emit a second batch of save
694 directives, if need be, when the function accesses prior frames.
696 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
698 * config/arc/fpu.md (fmasf4): Force operand to register.
701 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
703 * config/arc/arc-protos.h (arc_pad_return): Remove.
704 * config/arc/arc.c (machine_function): Remove force_short_suffix
706 (arc_print_operand): Adjust printing of '&'.
707 (arc_verify_short): Remove conditional printing of short suffix.
708 (arc_final_prescan_insn): Remove reference to size_reason.
709 (pad_return): New function.
710 (arc_reorg): Call pad_return.
711 (arc_pad_return): Remove.
712 (arc_init_machine_status): Remove reference to force_short_suffix.
713 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
714 (attr length): When attribute iscompact is true force to 2
715 regardless; in the case of maybe check if we want to force the
716 instruction to have 4 bytes length.
717 (nopv): Change it to generate 4 byte long nop as well.
718 (blockage): New pattern.
719 (simple_return): Remove call to arc_pad_return.
720 (p_return_i): Likewise.
722 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
724 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
726 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
728 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
731 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
733 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
734 for ARC700 and ARCv2.
736 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
739 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
740 operands[2] instead of operands[1].
743 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
745 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
746 case, check whether the outer register overlaps an unallocatable
747 register, not just whether it fits the required class.
749 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
751 * poly-int.h (can_div_trunc_p): Add new overload in which all values
753 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
754 (memrefs_conflict_p): Likewise.
755 (init_alias_analysis): Likewise.
756 * cfgexpand.c (expand_debug_expr): Likewise.
757 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
758 * cse.c (fold_rtx): Likewise.
759 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
760 * expr.c (emit_block_move_hints): Likewise.
761 (clear_storage_hints, push_block, emit_push_insn): Likewise.
762 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
763 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
764 (emit_group_store): Likewise.
765 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
766 to read the PRE/POST_MODIFY increment.
767 * calls.c (store_one_arg): Use strip_offset.
768 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
770 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
772 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
773 (simplify_binary_operation_1): Extend CONST_INT handling to
775 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
776 than a HOST_WIDE_INT.
777 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
779 (adjust_mems, add_stores): Update accodingly.
780 (vt_canonicalize_addr): Track polynomial offsets.
781 (emit_note_insn_var_location): Likewise.
782 (vt_add_function_parameter): Likewise.
783 (vt_initialize): Likewise.
785 2018-06-12 Jeff Law <law@redhat.com>
787 * config.gcc (alpha*-*-freebsd*): Remove.
788 * config/alpha/freebsd.h: Remove.
790 2018-06-12 David Malcolm <dmalcolm@redhat.com>
793 * spellcheck-tree.c (levenshtein_distance): Rename to...
794 (get_edit_distance): ...this, and update for underlying renaming.
795 * spellcheck-tree.h (levenshtein_distance): Rename to...
796 (get_edit_distance): ...this.
797 * spellcheck.c (levenshtein_distance): Rename to...
798 (get_edit_distance): ...this. Convert from Levenshtein distance
799 to Damerau-Levenshtein distance by supporting transpositions of
800 adjacent characters. Rename "v1" to "v_next" and "v0" to
802 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
803 (selftest::test_edit_distance_unit_test_oneway): ...this, and
804 update for underlying renaming.
805 (selftest::levenshtein_distance_unit_test): Rename to...
806 (selftest::test_get_edit_distance_unit): ...this, and update for
808 (selftest::test_find_closest_string): Add example from PR 69968
809 where transposition helps
810 (selftest::test_metric_conditions): Update for renaming.
811 (selftest::test_metric_conditions): Likewise.
812 (selftest::spellcheck_c_tests): Likewise.
813 * spellcheck.h (levenshtein_distance): Rename both overloads to...
814 (get_edit_distance): ...this.
815 (best_match::consider): Update for renaming.
817 2018-06-12 Martin Sebor <msebor@redhat.com>
819 PR tree-optimization/85259
820 * builtins.c (compute_objsize): Handle constant offsets.
821 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
822 true iff a warning has been issued.
823 * gimple.h (gimple_nonartificial_location): New function.
824 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
825 gimple_nonartificial_location and handle -Wno-system-headers.
826 (handle_builtin_stxncpy): Same.
828 2018-06-12 Martin Sebor <msebor@redhat.com>
831 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
833 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
835 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
836 BUILTIN_VEC_XST entries for pointer to double and long long.
838 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
841 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
843 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
846 2018-06-12 Martin Liska <mliska@suse.cz>
848 * doc/options.texi: Document IntegerRange.
850 2018-06-12 Martin Liska <mliska@suse.cz>
852 * config/i386/i386.opt: Make MPX-related options as Deprecated.
853 * opt-functions.awk: Handle Deprecated flag.
854 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
856 (read_cmdline_option): Report warning for a deprecated option.
857 * opts.h (struct cl_option): Add new field cl_deprecated.
858 (CL_ERR_DEPRECATED): New.
860 2018-06-12 Martin Liska <mliska@suse.cz>
862 * doc/options.texi: Document Deprecated option flag.
864 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
866 * config/arc/arc-arch.h (arc_extras): New enum.
867 (arc_cpu_t):Add field extra.
868 (arc_cpu_types): Consider the extras.
869 * config/arc/arc-cpus.def: Add extras info.
870 * config/arc/arc-opts.h (processor_type): Consider extra field.
871 * config/arc/arc.c (arc_override_options): Handle extra field.
873 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
875 * config/arc/arc-arch.h: Update ARC_OPTX macro.
876 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
878 * config/arc/arc.c (arc_init): Update pic warning.
879 (irq_range): Update irq range parsing warnings.
880 (arc_override_options): Update various warning messages.
881 (arc_handle_aux_attribute): Likewise.
883 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
885 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
887 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
889 * doc/sourcebuild.texi: Document usage of line number 0 in verify
890 compiler messages directives.
892 2018-06-12 Matthew Fortune <mfortune@gmail.com>
894 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
895 * config/mips/mips-tables.opt: Regenerate.
896 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
898 * doc/invoke.texi: Document -march=i6500.
900 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
902 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
903 (i6400_gpmul): Add cpu_unit.
904 (i6400_gpdiv): Likewise.
905 (i6400_msa_add_d): Update reservations.
906 (i6400_msa_int_add) Likewise.
907 (i6400_msa_short_logic3) Likewise.
908 (i6400_msa_short_logic2) Likewise.
909 (i6400_msa_short_logic) Likewise.
910 (i6400_msa_move) Likewise.
911 (i6400_msa_cmp) Likewise.
912 (i6400_msa_short_float2) Likewise.
913 (i6400_msa_div_d) Likewise.
914 (i6400_msa_long_logic1) Likewise.
915 (i6400_msa_long_logic2) Likewise.
916 (i6400_msa_mult) Likewise.
917 (i6400_msa_long_float2) Likewise.
918 (i6400_msa_long_float4) Likewise.
919 (i6400_msa_long_float5) Likewise.
920 (i6400_msa_long_float8) Likewise.
921 (i6400_fpu_fadd): Include frint type.
922 (i6400_fpu_store): New define_insn_reservation.
923 (i6400_fpu_load): Likewise.
924 (i6400_fpu_move): Likewise.
925 (i6400_fpu_fcmp): Likewise.
926 (i6400_fpu_fmadd): Likewise.
927 (i6400_int_mult): Include imul3nc type and update reservation.
928 (i6400_int_div): Include idiv3 type and update reservation.
929 (i6400_int_load): Update to check type not move_type.
930 (i6400_int_store): Likewise.
931 (i6400_int_prefetch): Set zero latency.
933 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
935 * gcc.c: Document new %@{...} sequence.
936 (LINK_COMMAND_SPEC): Use it for the -L switches.
937 (cpp_unique_options): Use it for the -I switches.
938 (at_file_argbuf): New global variable.
939 (in_at_file): Likewise.
940 (alloc_args): Create at_file_argbuf.
941 (clear_args): Truncate at_file_argbuf.
942 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
943 (open_at_file): New function.
944 (close_at_file): Likewise.
945 (create_at_file): Delete.
946 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
949 (validate_switches_from_spec): Deal with %@{...} sequence.
950 (validate_switches): Likewise.
951 (driver::finalize): Call clear_args.
953 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
955 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
957 2018-06-11 Martin Sebor <msebor@redhat.com>
959 * doc/invoke.texi (-Wall): List -Wc++17-compat.
960 (Wno-class-memaccess): Add @opindex.
961 (Wno-templates, Wno-multiple-inheritance): Same.
962 (Wno-virtual-inheritance, Wno-namespaces): Same.
963 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
964 (Wno-format-overflow, Wno-format-truncation): Same.
965 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
966 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
967 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
968 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
969 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
970 (Wno-misspelled-isr): Same.
972 2018-06-11 Martin Sebor <msebor@redhat.com>
974 * PR tree-optimization/86083
975 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
977 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
979 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
981 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
984 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
985 on the correct operand.
986 (*movdi_internal64): Ditto.
988 2018-06-11 Martin Liska <mliska@suse.cz>
990 PR tree-optimization/86089
991 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
993 2018-06-11 Julia Koval <julia.koval@intel.com>
995 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
996 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
997 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
999 2018-06-11 Olivier Hainque <hainque@adacore.com>
1001 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
1002 for Ada with strict dwarf2.
1004 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
1007 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
1010 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
1012 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
1014 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
1016 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
1019 2018-06-08 Martin Liska <mliska@suse.cz>
1021 * tree-cfg.h (debug_function): Fix argument type to match
1024 2018-06-08 Martin Liska <mliska@suse.cz>
1026 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
1027 Remove usage of MPX-related (and removed) fields.
1028 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
1030 2018-06-08 David Malcolm <dmalcolm@redhat.com>
1032 * cfg.c (debug): Use TDF_NONE rather than 0.
1033 * cfghooks.c (debug): Likewise.
1034 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
1035 (struct dump_option_value_info): Convert to...
1036 (struct kv_pair): ...this template type.
1037 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
1039 (optinfo_verbosity_options): Likewise.
1040 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
1042 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
1043 than int for "optgroup_flags" param.
1044 (dump_generic_expr_loc): Use dump_flags_t rather than int for
1046 (dump_dec): Likewise.
1047 (dump_finish): Use TDF_NONE rather than 0.
1048 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
1049 rather than int for "optgroup_flags" param. Use TDF_NONE rather
1050 than 0. Update for change to option_ptr.
1051 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
1052 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
1053 0. Update for changes to optinfo_verbosity_options and
1055 (opt_info_switch_p): Convert optgroup_flags from int to
1057 (dump_basic_block): Use dump_flags_t rather than int
1058 for "dump_kind" param.
1059 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
1060 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
1061 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
1062 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
1063 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
1064 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
1065 TDF_NONE): Convert from macros to...
1066 (enum dump_flag): ...this new enum.
1067 (dump_flags_t): Update to use enum.
1068 (operator|, operator&, operator~, operator|=, operator&=):
1069 Implement for dump_flags_t.
1070 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
1071 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
1072 Convert from macros to...
1073 (enum optgroup_flag): ...this new enum.
1074 (optgroup_flags_t): New typedef.
1075 (operator|, operator|=): Implement for optgroup_flags_t.
1076 (struct dump_file_info): Convert field "alt_flags" to
1077 dump_flags_t. Convert field "optgroup_flags" to
1079 (dump_basic_block): Use dump_flags_t rather than int for param.
1080 (dump_generic_expr_loc): Likewise.
1081 (dump_dec): Likewise.
1082 (dump_register): Convert param "optgroup_flags" to
1084 (opt_info_enable_passes): Likewise.
1085 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
1087 * gimple-pretty-print.c (debug): Likewise.
1088 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
1089 (merged_store_group::apply_stores): Likewise.
1090 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
1091 * gimple.c (verify_gimple_pp): Likewise.
1092 * graphite-poly.c (print_pbb_body): Likewise.
1093 * passes.c (pass_manager::register_one_dump_file): Convert
1094 local "optgroup_flags" to optgroup_flags_t.
1095 * print-tree.c (print_node): Use TDF_NONE rather than 0.
1097 (debug_body): Likewise.
1098 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
1099 to optgroup_flags_t.
1100 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
1102 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
1103 (convert_mult_to_fma): Likewise.
1104 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
1105 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
1106 * tree-vect-data-refs.c (dump_lower_bound): Convert param
1107 "dump_kind" to dump_flags_t.
1109 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
1111 * config/rs6000/rs6000.c (min, max): Delete.
1113 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
1115 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
1116 -mabi=spe and -mabi=no-spe.
1118 2018-06-08 Martin Liska <mliska@suse.cz>
1120 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
1121 where we expect an existing summary.
1123 2018-06-08 Martin Liska <mliska@suse.cz>
1125 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
1126 * ipa-inline.h (estimate_edge_growth): Likewise.
1128 2018-06-08 Martin Liska <mliska@suse.cz>
1130 * cgraph.c (function_version_hasher::hash): Use
1131 cgraph_node::get_uid ().
1132 (function_version_hasher::equal):
1133 * cgraph.h (cgraph_node::get_uid): New method.
1134 * ipa-inline.c (update_caller_keys): Use
1135 cgraph_node::get_uid ().
1136 (update_callee_keys): Likewise.
1137 * ipa-utils.c (searchc): Likewise.
1138 (ipa_reduced_postorder): Likewise.
1139 * lto-cgraph.c (input_node): Likewise.
1140 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
1141 * symbol-summary.h (symtab_insertion): Likewise.
1142 (symtab_removal): Likewise.
1143 (symtab_duplication): Likewise.
1144 * tree-pretty-print.c (dump_function_header): Likewise.
1145 * tree-sra.c (convert_callers_for_node): Likewise.
1147 2018-06-08 Martin Liska <mliska@suse.cz>
1149 * cgraph.c (symbol_table::create_edge): Always assign a new
1151 (symbol_table::free_edge): Do not recycle numbers.
1152 * cgraph.h (cgraph_edge::get): New method.
1153 * symbol-summary.h (symtab_removal): Use it.
1154 (symtab_duplication): Likewise.
1155 (call_summary::hashable_uid): Remove.
1157 2018-06-08 Martin Liska <mliska@suse.cz>
1159 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
1160 (initialize_growth_caches): Remove.
1161 (free_growth_caches): Likewise.
1162 (do_estimate_edge_time): Use edge_growth_cache.
1163 (do_estimate_edge_size): Likewise.
1164 (do_estimate_edge_hints): Likewise.
1165 * ipa-inline.c (reset_edge_caches): Likewise.
1166 (recursive_inlining): Likewise.
1167 (inline_small_functions): Likewise.
1168 * ipa-inline.h (initialize_growth_caches): Remove.
1169 (estimate_edge_size): Likewise.
1170 (estimate_edge_time): Likewise.
1171 (estimate_edge_hints): Likewise.
1172 (reset_edge_growth_cache): Likewise.
1173 * symbol-summary.h (call_summary::remove): New method.
1175 2018-06-08 Martin Liska <mliska@suse.cz>
1177 * ipa-cp.c (class edge_clone_summary): New summary.
1178 (grow_edge_clone_vectors): Remove.
1179 (ipcp_edge_duplication_hook): Remove.
1180 (class edge_clone_summary_t): New call_summary class.
1181 (ipcp_edge_removal_hook): Remove.
1182 (edge_clone_summary_t::duplicate): New function.
1183 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
1184 (create_specialized_node): Likewise.
1185 (ipcp_driver): Initialize edge_clone_summaries and do not
1188 2018-06-08 Martin Liska <mliska@suse.cz>
1190 * symbol-summary.h (get): New function.
1191 (call_summary::m_initialize_when_cloning): New class member.
1193 2018-06-08 Martin Liska <mliska@suse.cz>
1195 * cgraph.c (cgraph_node::remove): Do not recycle uid.
1196 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
1197 (symbol_table::allocate_cgraph_symbol): Do not set uid.
1198 * passes.c (uid_hash_t): Record removed_nodes by their uids.
1199 (remove_cgraph_node_from_order): Use the removed_nodes set.
1200 (do_per_function_toporder): Likwise.
1201 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
1202 instead of summary_uid.
1203 (symtab_removal): Likewise.
1204 (symtab_duplication): Likewise.
1206 2018-06-08 Martin Liska <mliska@suse.cz>
1208 * ipa-cp.c (ipcp_store_bits_results): Use
1209 ipcp_transformation_sum.
1210 (ipcp_store_vr_results): Likewise.
1211 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
1213 (ipcp_transformation_initialize): ... this.
1214 (ipa_set_node_agg_value_chain):
1215 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
1216 (write_ipcp_transformation_info): Likewise.
1217 (read_ipcp_transformation_info): Likewise.
1218 (ipcp_update_bits): Likewise.
1219 (ipcp_update_vr): Likewise.
1220 (ipcp_transform_function): Likewise.
1221 * ipa-prop.h: Rename ipcp_transformation_summary to
1222 ipcp_transformation.
1223 (class ipcp_transformation_t): New function summary.
1224 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
1225 (ipa_get_agg_replacements_for_node): Likewise.
1227 2018-06-08 Martin Liska <mliska@suse.cz>
1229 * ipa-pure-const.c (struct funct_state_d): Do it class instead
1231 (class funct_state_summary_t): New function_summary class.
1232 (has_function_state): Remove.
1233 (get_function_state): Likewise.
1234 (set_function_state): Likewise.
1235 (add_new_function): Likewise.
1236 (funct_state_summary_t::insert): New function.
1237 (duplicate_node_data): Remove.
1238 (remove_node_data): Remove.
1239 (funct_state_summary_t::duplicate): New function.
1240 (register_hooks): Create new funct_state_summaries.
1241 (pure_const_generate_summary): Use it.
1242 (pure_const_write_summary): Likewise.
1243 (pure_const_read_summary): Likewise.
1244 (propagate_pure_const): Likewise.
1245 (propagate_nothrow): Likewise.
1246 (dump_malloc_lattice): Likewise.
1247 (propagate_malloc): Likewise.
1248 (execute): Do not register hooks, just remove summary
1250 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
1253 2018-06-08 Martin Liska <mliska@suse.cz>
1255 * ipa-reference.c (remove_node_data): Remove.
1256 (duplicate_node_data): Likewise.
1257 (class ipa_ref_var_info_summary_t): New class.
1258 (class ipa_ref_opt_summary_t): Likewise.
1259 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
1260 (get_reference_optimization_summary): Use
1261 ipa_ref_opt_sum_summaries.
1262 (set_reference_vars_info): Remove.
1263 (set_reference_optimization_summary): Likewise.
1264 (ipa_init): Create summaries.
1265 (init_function_info): Use function summary.
1266 (ipa_ref_opt_summary_t::duplicate): New function.
1267 (ipa_ref_opt_summary_t::remove): New function.
1268 (get_read_write_all_from_node): Fix GNU coding style.
1269 (propagate): Use function summary.
1270 (write_node_summary_p): Fix GNU coding style.
1271 (stream_out_bitmap): Likewise.
1272 (ipa_reference_read_optimization_summary): Use function summary.
1273 (ipa_reference_c_finalize): Do not release hooks.
1275 2018-06-08 Martin Liska <mliska@suse.cz>
1277 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
1278 (analyze_function_body): Extract multiple calls of get_create.
1279 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
1280 * ipa-inline.c (recursive_inlining): Use ::get method.
1281 * ipa-inline.h (estimate_edge_growth): Likewise.
1283 2018-06-08 Martin Liska <mliska@suse.cz>
1285 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
1287 (hsa_function_summary::hsa_function_summary): Use the new enum
1289 (hsa_gpu_implementation_p): Use hsa_summaries::get.
1290 * hsa-gen.c (hsa_get_host_function): Likewise.
1291 (get_brig_function_name): Likewise.
1292 * ipa-hsa.c (process_hsa_functions): Likewise.
1293 (ipa_hsa_write_summary): Likewise.
1294 * symbol-summary.h (symtab_duplication): Use ::get function/
1295 (get): New function.
1297 2018-06-08 Martin Liska <mliska@suse.cz>
1299 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
1301 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
1302 (hsa_register_kernel): Likewise.
1303 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
1304 * hsa-gen.c (hsa_get_host_function): Likewise.
1305 (get_brig_function_name): Likewise.
1306 (generate_hsa): Likewise.
1307 (pass_gen_hsail::execute): Likewise.
1308 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
1309 (devirtualization_time_bonus): Likewise.
1310 (ipcp_propagate_stage): Likewise.
1311 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
1312 (edge_set_predicate): Likewise.
1313 (evaluate_conditions_for_known_args): Likewise.
1314 (evaluate_properties_for_edge): Likewise.
1315 (ipa_fn_summary::reset): Likewise.
1316 (ipa_fn_summary_t::duplicate): Likewise.
1317 (dump_ipa_call_summary): Likewise.
1318 (ipa_dump_fn_summary): Likewise.
1319 (analyze_function_body): Likewise.
1320 (compute_fn_summary): Likewise.
1321 (estimate_edge_devirt_benefit): Likewise.
1322 (estimate_edge_size_and_time): Likewise.
1323 (estimate_calls_size_and_time): Likewise.
1324 (estimate_node_size_and_time): Likewise.
1325 (inline_update_callee_summaries): Likewise.
1326 (remap_edge_change_prob): Likewise.
1327 (remap_edge_summaries): Likewise.
1328 (ipa_merge_fn_summary_after_inlining): Likewise.
1329 (ipa_update_overall_fn_summary): Likewise.
1330 (read_ipa_call_summary): Likewise.
1331 (inline_read_section): Likewise.
1332 (write_ipa_call_summary): Likewise.
1333 (ipa_fn_summary_write): Likewise.
1334 (ipa_free_fn_summary): Likewise.
1335 * ipa-hsa.c (process_hsa_functions): Likewise.
1336 (ipa_hsa_write_summary): Likewise.
1337 (ipa_hsa_read_section): Likewise.
1338 * ipa-icf.c (sem_function::merge): Likewise.
1339 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
1340 (do_estimate_edge_time): Likewise.
1341 (estimate_size_after_inlining): Likewise.
1342 (estimate_growth): Likewise.
1343 (growth_likely_positive): Likewise.
1344 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
1345 (inline_call): Likewise.
1346 * ipa-inline.c (caller_growth_limits): Likewise.
1347 (can_inline_edge_p): Likewise.
1348 (can_inline_edge_by_limits_p): Likewise.
1349 (compute_uninlined_call_time): Likewise.
1350 (compute_inlined_call_time): Likewise.
1351 (want_inline_small_function_p): Likewise.
1352 (edge_badness): Likewise.
1353 (update_caller_keys): Likewise.
1354 (update_callee_keys): Likewise.
1355 (recursive_inlining): Likewise.
1356 (inline_small_functions): Likewise.
1357 (inline_to_all_callers_1): Likewise.
1358 (dump_overall_stats): Likewise.
1359 (early_inline_small_functions): Likewise.
1360 (early_inliner): Likewise.
1361 * ipa-inline.h (estimate_edge_growth): Likewise.
1362 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
1363 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1364 * ipa-prop.h (IPA_NODE_REF): Likewise.
1365 (IPA_EDGE_REF): Likewise.
1366 * ipa-pure-const.c (malloc_candidate_p): Likewise.
1367 (propagate_malloc): Likewise.
1368 * ipa-split.c (execute_split_functions): Likewise.
1369 * symbol-summary.h: Rename get to get_create.
1371 (get_create): Likewise.
1372 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
1374 2018-06-08 Martin Liska <mliska@suse.cz>
1376 * symbol-summary.h (release): Move definition out of class
1378 (symtab_removal): Likewise.
1379 (symtab_duplication): Likewise.
1381 2018-06-08 Martin Liska <mliska@suse.cz>
1383 * symbol-summary.h (function_summary): Move constructor
1384 implementation out of class declaration.
1385 (release): Likewise.
1386 (symtab_insertion): Likewise.
1387 (symtab_removal): Likewise.
1388 (symtab_duplication): Likewise.
1391 2018-06-08 Martin Liska <mliska@suse.cz>
1393 * Makefile.in: Remove support for MPX (macros, related functions,
1394 fields in cgraph_node, ...).
1395 * builtin-types.def (BT_BND): Likewise.
1396 (BT_FN_BND_CONST_PTR): Likewise.
1397 (BT_FN_CONST_PTR_BND): Likewise.
1398 (BT_FN_VOID_PTR_BND): Likewise.
1399 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
1400 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
1401 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
1402 (expand_builtin_mempcpy_with_bounds): Likewise.
1403 (expand_builtin_memset_with_bounds): Likewise.
1404 (expand_builtin_memset_args): Likewise.
1405 (std_expand_builtin_va_start): Likewise.
1406 (expand_builtin): Likewise.
1407 (expand_builtin_with_bounds): Likewise.
1408 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
1409 (DEF_LIB_BUILTIN_CHKP): Likewise.
1410 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
1411 (DEF_CHKP_BUILTIN): Likewise.
1412 (BUILT_IN_MEMCPY): Likewise.
1413 (BUILT_IN_MEMMOVE): Likewise.
1414 (BUILT_IN_MEMPCPY): Likewise.
1415 (BUILT_IN_MEMSET): Likewise.
1416 (BUILT_IN_STPCPY): Likewise.
1417 (BUILT_IN_STRCAT): Likewise.
1418 (BUILT_IN_STRCHR): Likewise.
1419 (BUILT_IN_STRCPY): Likewise.
1420 (BUILT_IN_STRLEN): Likewise.
1421 (BUILT_IN_MEMCPY_CHK): Likewise.
1422 (BUILT_IN_MEMMOVE_CHK): Likewise.
1423 (BUILT_IN_MEMPCPY_CHK): Likewise.
1424 (BUILT_IN_MEMSET_CHK): Likewise.
1425 (BUILT_IN_STPCPY_CHK): Likewise.
1426 (BUILT_IN_STRCAT_CHK): Likewise.
1427 (BUILT_IN_STRCPY_CHK): Likewise.
1428 * calls.c (store_bounds): Likewise.
1429 (emit_call_1): Likewise.
1430 (special_function_p): Likewise.
1431 (maybe_warn_nonstring_arg): Likewise.
1432 (initialize_argument_information): Likewise.
1433 (finalize_must_preallocate): Likewise.
1434 (compute_argument_addresses): Likewise.
1435 (expand_call): Likewise.
1436 * cfgexpand.c (expand_call_stmt): Likewise.
1437 (expand_return): Likewise.
1438 (expand_gimple_stmt_1): Likewise.
1439 (pass_expand::execute): Likewise.
1440 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
1441 (cgraph_node::remove): Likewise.
1442 (cgraph_node::dump): Likewise.
1443 (cgraph_node::verify_node): Likewise.
1444 * cgraph.h (chkp_function_instrumented_p): Likewise.
1445 (symtab_node::get_alias_target): Likewise.
1446 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
1447 (cgraph_local_p): Likewise.
1448 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
1449 (cgraph_edge::rebuild_references): Likewise.
1450 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
1451 (walk_polymorphic_call_targets): Likewise.
1452 (cgraph_node::expand_thunk): Likewise.
1453 (symbol_table::output_weakrefs): Likewise.
1454 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
1455 (ix86_handle_option): Likewise.
1456 * config/i386/constraints.md: Likewise.
1457 * config/i386/i386-builtin-types.def (BND): Likewise.
1461 * config/i386/i386-builtin.def (BDESC_END): Likewise.
1462 (BDESC_FIRST): Likewise.
1464 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
1465 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
1466 * config/i386/i386.c (enum reg_class): Likewise.
1467 (ix86_target_string): Likewise.
1468 (ix86_option_override_internal): Likewise.
1469 (ix86_conditional_register_usage): Likewise.
1470 (ix86_valid_target_attribute_inner_p): Likewise.
1471 (ix86_set_indirect_branch_type): Likewise.
1472 (ix86_set_current_function): Likewise.
1473 (ix86_function_arg_regno_p): Likewise.
1474 (init_cumulative_args): Likewise.
1475 (ix86_function_arg_advance): Likewise.
1476 (ix86_function_arg): Likewise.
1477 (ix86_pass_by_reference): Likewise.
1478 (ix86_function_value_regno_p): Likewise.
1479 (ix86_function_value_1): Likewise.
1480 (ix86_function_value_bounds): Likewise.
1481 (ix86_return_in_memory): Likewise.
1482 (ix86_setup_incoming_vararg_bounds): Likewise.
1483 (ix86_va_start): Likewise.
1484 (indirect_thunk_need_prefix): Likewise.
1485 (print_reg): Likewise.
1486 (ix86_print_operand): Likewise.
1487 (ix86_expand_call): Likewise.
1488 (ix86_output_function_return): Likewise.
1489 (reg_encoded_number): Likewise.
1490 (BDESC_VERIFYS): Likewise.
1491 (ix86_init_mpx_builtins): Likewise.
1492 (ix86_init_builtins): Likewise.
1493 (ix86_emit_cmove): Likewise.
1494 (ix86_emit_move_max): Likewise.
1495 (ix86_expand_builtin): Likewise.
1496 (ix86_builtin_mpx_function): Likewise.
1497 (ix86_get_arg_address_for_bt): Likewise.
1498 (ix86_load_bounds): Likewise.
1499 (ix86_store_bounds): Likewise.
1500 (ix86_load_returned_bounds): Likewise.
1501 (ix86_store_returned_bounds): Likewise.
1502 (ix86_class_likely_spilled_p): Likewise.
1503 (ix86_hard_regno_mode_ok): Likewise.
1504 (x86_order_regs_for_local_alloc): Likewise.
1505 (ix86_mitigate_rop): Likewise.
1506 (ix86_bnd_prefixed_insn_p): Likewise.
1507 (ix86_mpx_bound_mode): Likewise.
1508 (ix86_make_bounds_constant): Likewise.
1509 (ix86_initialize_bounds): Likewise.
1510 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
1511 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
1512 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
1513 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
1514 (TARGET_CHKP_BOUND_MODE): Likewise.
1515 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
1516 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
1517 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
1518 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
1519 * config/i386/i386.h (TARGET_MPX): Likewise.
1520 (TARGET_MPX_P): Likewise.
1521 (VALID_BND_REG_MODE): Likewise.
1522 (FIRST_BND_REG): Likewise.
1523 (LAST_BND_REG): Likewise.
1524 (enum reg_class): Likewise.
1525 (BND_REG_P): Likewise.
1526 (BND_REGNO_P): Likewise.
1527 (BNDmode): Likewise.
1528 (ADJUST_INSN_LENGTH): Likewise.
1529 * config/i386/i386.md: Likewise.
1530 * config/i386/i386.opt: Likewise.
1531 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
1532 (defined): Likewise.
1533 (LINK_MPX): Likewise.
1534 (MPX_SPEC): Likewise.
1535 (LIBMPX_SPEC): Likewise.
1536 (LIBMPXWRAPPERS_SPEC): Likewise.
1537 (CHKP_SPEC): Likewise.
1538 * config/i386/predicates.md: Likewise.
1539 * dbxout.c (dbxout_type): Likewise.
1540 * doc/extend.texi: Likewise.
1541 * doc/invoke.texi: Likewise.
1542 * doc/md.texi: Likewise.
1543 * doc/tm.texi: Likewise.
1544 * doc/tm.texi.in: Likewise.
1545 * dwarf2out.c (is_base_type): Likewise.
1546 (gen_formal_types_die): Likewise.
1547 (gen_subprogram_die): Likewise.
1548 (gen_type_die_with_usage): Likewise.
1549 (gen_decl_die): Likewise.
1550 (dwarf2out_late_global_decl): Likewise.
1551 * expr.c (expand_assignment): Likewise.
1552 (emit_storent_insn): Likewise.
1553 (store_expr_with_bounds): Likewise.
1554 (store_expr): Likewise.
1555 (expand_expr_real_1): Likewise.
1556 * expr.h (store_expr_with_bounds): Likewise.
1557 * function.c (use_register_for_decl): Likewise.
1558 (struct bounds_parm_data): Likewise.
1559 (assign_parms_augmented_arg_list): Likewise.
1560 (assign_parm_find_entry_rtl): Likewise.
1561 (assign_parm_is_stack_parm): Likewise.
1562 (assign_parm_load_bounds): Likewise.
1563 (assign_bounds): Likewise.
1564 (assign_parms): Likewise.
1565 (expand_function_start): Likewise.
1566 * gcc.c (CHKP_SPEC): Likewise.
1567 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
1568 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
1569 (wrestrict_dom_walker::check_call): Likewise.
1570 * gimple.c (gimple_build_call_from_tree): Likewise.
1571 * gimple.h (enum gf_mask): Likewise.
1572 (gimple_call_with_bounds_p): Likewise.
1573 (gimple_call_set_with_bounds): Likewise.
1574 * gimplify.c (gimplify_init_constructor): Likewise.
1575 * ipa-cp.c (initialize_node_lattices): Likewise.
1576 (propagate_constants_across_call): Likewise.
1577 (find_more_scalar_values_for_callers_subset): Likewise.
1578 * ipa-hsa.c (process_hsa_functions): Likewise.
1579 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
1580 * ipa-icf.c (sem_function::merge): Likewise.
1581 * ipa-inline.c (early_inliner): Likewise.
1582 * ipa-pure-const.c (warn_function_noreturn): Likewise.
1583 (warn_function_cold): Likewise.
1584 (propagate_pure_const): Likewise.
1585 * ipa-ref.h (enum GTY): Likewise.
1586 * ipa-split.c (find_retbnd): Likewise.
1587 (consider_split): Likewise.
1588 (split_function): Likewise.
1589 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1590 * ipa.c (walk_polymorphic_call_targets): Likewise.
1591 (symbol_table::remove_unreachable_nodes): Likewise.
1592 (process_references): Likewise.
1593 (cgraph_build_static_cdtor_1): Likewise.
1594 * lto-cgraph.c (lto_output_node): Likewise.
1595 (output_refs): Likewise.
1596 (compute_ltrans_boundary): Likewise.
1597 (input_overwrite_node): Likewise.
1598 (input_node): Likewise.
1599 (input_cgraph_1): Likewise.
1600 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
1601 * passes.c (pass_manager::execute_early_local_passes): Likewise.
1602 (class pass_chkp_instrumentation_passes): Likewise.
1603 (make_pass_chkp_instrumentation_passes): Likewise.
1604 * passes.def: Likewise.
1605 * rtl.h (struct GTY): Likewise.
1606 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
1607 * stor-layout.c (layout_type): Likewise.
1608 * symtab.c: Likewise.
1609 * target.def: Likewise.
1610 * targhooks.c (default_chkp_bound_type): Likewise.
1611 (default_chkp_bound_mode): Likewise.
1612 (default_builtin_chkp_function): Likewise.
1613 (default_chkp_function_value_bounds): Likewise.
1614 (default_chkp_make_bounds_constant): Likewise.
1615 (default_chkp_initialize_bounds): Likewise.
1616 * targhooks.h (default_chkp_bound_type): Likewise.
1617 (default_chkp_bound_mode): Likewise.
1618 (default_builtin_chkp_function): Likewise.
1619 (default_chkp_function_value_bounds): Likewise.
1620 (default_chkp_make_bounds_constant): Likewise.
1621 (default_chkp_initialize_bounds): Likewise.
1622 * toplev.c (compile_file): Likewise.
1623 (process_options): Likewise.
1624 * tree-core.h (DEF_BUILTIN): Likewise.
1625 (DEF_BUILTIN_CHKP): Likewise.
1626 * tree-inline.c (declare_return_variable): Likewise.
1627 (remap_gimple_stmt): Likewise.
1628 (copy_bb): Likewise.
1629 (initialize_inlined_parameters): Likewise.
1630 (expand_call_inline): Likewise.
1631 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
1632 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
1633 (make_pass_ipa_chkp_produce_thunks): Likewise.
1634 (make_pass_chkp): Likewise.
1635 (make_pass_chkp_opt): Likewise.
1636 (make_pass_chkp_instrumentation_passes): Likewise.
1637 * tree-pretty-print.c (dump_generic_node): Likewise.
1638 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
1639 * tree-ssa-dce.c (propagate_necessity): Likewise.
1640 (eliminate_unnecessary_stmts): Likewise.
1641 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
1642 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
1643 * tree-ssa-sccvn.h: Likewise.
1644 * tree-ssa-strlen.c (get_string_length): Likewise.
1645 (valid_builtin_call): Likewise.
1646 (adjust_last_stmt): Likewise.
1647 (handle_builtin_strchr): Likewise.
1648 (handle_builtin_strcpy): Likewise.
1649 (handle_builtin_stxncpy): Likewise.
1650 (handle_builtin_memcpy): Likewise.
1651 (handle_builtin_strcat): Likewise.
1652 (strlen_check_and_optimize_stmt): Likewise.
1653 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
1654 * tree-streamer-in.c: Likewise.
1655 * tree-streamer.c (record_common_node): Likewise.
1656 * tree.c (tree_code_size): Likewise.
1657 (wide_int_to_tree_1): Likewise.
1658 (type_contains_placeholder_1): Likewise.
1659 (build_common_tree_nodes): Likewise.
1660 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
1661 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
1662 (POINTER_BOUNDS_P): Likewise.
1663 (BOUNDED_TYPE_P): Likewise.
1664 (BOUNDED_P): Likewise.
1665 (CALL_WITH_BOUNDS_P): Likewise.
1666 (pointer_bounds_type_node): Likewise.
1667 * value-prof.c (gimple_ic): Likewise.
1668 * var-tracking.c (vt_add_function_parameters): Likewise.
1669 * varasm.c (make_decl_rtl): Likewise.
1670 (assemble_start_function): Likewise.
1671 (output_constant): Likewise.
1672 (maybe_assemble_visibility): Likewise.
1673 * varpool.c (ctor_for_folding): Likewise.
1674 * chkp-builtins.def: Remove.
1675 * ipa-chkp.c: Remove.
1676 * ipa-chkp.h: Remove.
1677 * rtl-chkp.c: Remove.
1678 * rtl-chkp.h: Remove.
1679 * tree-chkp-opt.c: Remove.
1680 * tree-chkp.c: Remove.
1681 * tree-chkp.h: Remove.
1683 2018-06-07 Carl Love <cel@us.ibm.com>
1685 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
1686 vextract_fp_from_shortl): Add BE support.
1688 2018-06-07 Paul Koning <ni1d@arrl.net>
1690 * compare-elim.c (try_merge_compare): Don't merge compare if
1691 address contains a side effect.
1692 (try_eliminate_compare): Likewise.
1694 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
1696 * config.gcc: Support "tremont".
1697 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
1698 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1700 * config/i386/i386.c (m_TREMONT): Define.
1701 (processor_target_table): Add "tremont".
1702 (PTA_TREMONT): Define.
1703 (ix86_lea_outperforms): Add TARGET_TREMONT.
1704 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
1705 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
1706 and M_INTEL_GOLDMONT_PLUS.
1707 (fold_builtin_cpu): Add "tremont".
1708 (ix86_add_stmt_cost): Add TARGET_TREMONT.
1709 (ix86_option_override_internal): Add "tremont".
1710 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
1711 (processor_type): Add PROCESSOR_TREMONT.
1712 * config/i386/x86-tune.def: Add m_TREMONT.
1713 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
1715 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1717 * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
1718 symbol defined for msp430i* devices to be lower case.
1720 gcc/testsuite/gcc.target/msp430/
1721 * msp430i-device-symbol.c: New test.
1722 * msp430f-device-symbol.c: New test.
1723 * msp430.h: New test header file.
1725 2018-06-07 Richard Biener <rguenther@suse.de>
1727 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
1728 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
1729 Properly wrap signed arithmetic if overflow wraps.
1731 2018-06-07 Jakub Jelinek <jakub@redhat.com>
1733 PR tree-optimization/69615
1734 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
1735 of a cast from a same precision integral SSA_NAME in a bb dominated
1736 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
1737 cast to utype if rhs2 has already a compatible type.
1739 2018-06-07 Richard Biener <rguenther@suse.de>
1741 PR tree-optimization/85935
1742 * graphite-scop-detection.c (find_params_in_bb): Analyze
1743 condition operands with respect to the correct loop. Assert
1744 the analysis doesn't fail.
1746 2018-06-04 Carl Love <cel@us.ibm.com>
1748 * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
1749 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
1750 as it is slightly cheaper.
1751 (first_match_or_eos_index_<mode>):
1752 Calculate index using natural element order.
1753 (first_match_index_<mode>):
1754 Calculate index using natural element order.
1755 (first_match_or_eos_index_<mode>):
1756 Calculate index using natural order.
1757 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
1758 for BE and LE modes.
1759 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
1760 P9V_BUILTIN_VCLZLSBB_V16QI.
1761 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
1764 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
1766 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
1767 indentation and line wrap for many prototypes. Add missing
1768 @smallexample directives around block of prototypes for vec_xl and
1771 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
1773 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
1774 track if we pass or return IEEE 128-bit floating point.
1775 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
1776 C++ mangling that is compatible with GCC 8.1.
1777 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
1778 (init_cumulative_args): Note if we pass or return IEEE 128-bit
1779 floating point types.
1780 (rs6000_function_arg_advance_1): Likewise.
1781 (rs6000_mangle_type): Optionally generate mangled names that match
1782 what GCC 8.1 generated for IEEE 128-bit floating point types.
1783 (rs6000_globalize_decl_name): If we have an external function that
1784 passes or returns IEEE 128-bit types, generate a weak reference
1785 from the mangled name used in GCC 8.1 to the current mangled
1787 (rs6000_init_builtins): Make __ibm128 use the long double type if
1788 long double is IBM extended double. Make __float128 use the long
1789 double type if long double is IEEE 128-bit.
1792 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
1793 macro for __ibm128 built-in functions.
1794 (PACK_IF): Add __ibm128 pack/unpack functions.
1795 (UNPACK_IF): Likewise.
1796 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
1797 enable long double built-in functions if long double is IEEE
1798 128-bit floating point.
1799 (rs6000_invalid_builtin): Update long double built-in function
1801 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
1802 functions, adjust the built-in function to use the long double
1803 built-in function if __ibm128 and long double are the same type.
1804 * doc/extend.texi (PowerPC builtins): Update documention for
1805 __builtin_{,un}pack_longdouble. Add documentation for
1806 __builtin_{,un}pack_ibm128.
1808 2018-06-06 Jim Wilson <jimw@sifive.com>
1810 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
1811 (struct machine_function): New field interrupt_mode.
1812 (riscv_handle_type_attribute): New function. Add forward declaration.
1813 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
1814 (riscv_expand_epilogue): Check interrupt_mode field.
1815 (riscv_set_current_function): Check interrupt attribute args and
1816 set interrupt_mode field.
1817 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
1818 (riscv_sret, riscv_uret): New.
1819 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
1820 new arguments to interrupt attribute.
1822 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
1825 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
1826 Don't handle -mcpu=power8 if -mpower9-vector is also used.
1828 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
1830 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
1831 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
1832 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
1833 several redundant entries.
1835 2018-06-06 David Malcolm <dmalcolm@redhat.com>
1837 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
1838 type from "rtx" to "rtx_insn *".
1839 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
1840 for local "call_insn", removing cast.
1841 (ix86_expand_call): Likewise, introducing a "call_insn" local.
1843 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
1845 PR tree-optimization/86066
1846 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
1847 for BIT_INSERT_EXPR stores.
1849 2018-06-06 Richard Biener <rguenther@suse.de>
1851 PR tree-optimization/86062
1852 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
1853 component refs ontop
1854 of to be offsetted base.
1856 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1858 * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
1859 to be static and remove check on interrupt attribute name.
1861 gcc/testsuite/gcc.target/msp430/
1862 * function-attributes-4.c: New test.
1863 * static-interrupts.c: New test.
1865 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
1867 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
1868 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
1870 2018-06-05 Steve Ellcey <sellcey@cavium.com>
1873 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
1875 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
1876 Remove second argument, change how error is called.
1877 (aarch64_layout_arg): Remove second argument from
1878 aarch64_err_no_fpadvsimd call.
1879 (aarch64_init_cumulative_args): Ditto.
1880 (aarch64_gimplify_va_arg_expr): Ditto.
1881 * config/aarch64/aarch64.md (mov<mode>): Ditto.
1883 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
1885 * config/i386/i386.md (simple_return_indirect_internal): New expander.
1886 (*simple_return_indirect_internal<mode>): Rename from
1887 simple_return_indirect_internal. Use W mode iterator.
1888 (rstorssp): New expander.
1889 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
1890 (clrssbsy): New expander.
1891 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
1893 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
1895 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
1897 (cmse_check_pointed_object): Likewise.
1899 2018-06-05 Martin Liska <mliska@suse.cz>
1901 PR gcov-profile/47618
1902 * doc/invoke.texi: Document how -fprofile-dir format
1905 2018-06-05 Richard Biener <rguenther@suse.de>
1907 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
1908 removal pretend DOM info isn't available so we do not update
1909 it and only remove edges, not dominated blocks. Actually free
1910 DOM info in case we removed something. Remove unreachable blocks.
1911 (mfb_keep_latches): Work with either DOM info or marked backedges.
1912 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
1913 first. Mark backedges if DOM info isn't available.
1914 (Re-)compute DOM info after cleanup_control_flow_pre.
1916 2018-06-05 Richard Biener <rguenther@suse.de>
1918 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
1919 (locus_discrim_hasher::hash): Adjust.
1920 (locus_discrim_hasher::equal): Likewise.
1921 (next_discriminator_for_locus): Work on line directly.
1922 (same_line_p): Pass in expanded locus1 as well.
1923 (assign_discriminators): Avoid redundant location expansions.
1925 2018-06-05 Richard Biener <rguenther@suse.de>
1927 PR tree-optimization/86046
1928 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
1929 if required after clearing TREE_ADDRESSABLE.
1931 2018-06-05 Richard Biener <rguenther@suse.de>
1933 PR tree-optimization/86047
1934 * tree-ssa-loop.c (for_each_index): Glob handling of all
1935 decls and constants and really handle all of them.
1937 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1940 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
1941 qualifier_void_pointer and qualifier_const_void_pointer.
1942 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
1943 (arm_init_builtins): Handle the above.
1944 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
1945 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
1946 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
1949 2018-06-05 Martin Liska <mliska@suse.cz>
1951 * auto-profile.c (read_autofdo_file): Do not use
1952 gcov_ctr_summary struct.
1953 (afdo_callsite_hot_enough_for_early_inline): Likewise.
1954 * coverage.c (struct counts_entry): Likewise.
1955 (read_counts_file): Read just single summary entry.
1956 (get_coverage_counts): Use gcov_summary struct.
1957 * coverage.h (get_coverage_counts): Likewise.
1958 * gcov-dump.c (dump_working_sets): Likewise.
1959 (tag_summary): Dump just single summary.
1960 * gcov-io.c (gcov_write_summary): Write just histogram
1962 (gcov_read_summary): Read just single summary.
1963 (compute_working_sets): Use gcov_summary struct.
1964 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
1965 of GCOV_COUNTERS_SUMMABLE.
1966 (GCOV_COUNTERS_SUMMABLE): Remove.
1967 (GCOV_FIRST_VALUE_COUNTER): Replace with
1968 GCOV_COUNTER_V_INTERVAL.
1969 (struct gcov_ctr_summary): Remove.
1970 (struct gcov_summary): Directly use fields of former
1972 (compute_working_sets): Use gcov_summary struct.
1973 * gcov.c (read_count_file): Do not use ctrs fields.
1974 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
1976 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
1978 * profile.c: Likewise.
1979 * profile.h: Likewise.
1981 2018-06-05 Martin Liska <mliska@suse.cz>
1983 PR gcov-profile/84846
1984 * gcov.c (output_lines): Print working directory only
1985 in intermediate format.
1987 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
1989 * config/s390/s390-builtin-types.def: Add void function type.
1990 * config/s390/s390-builtins.def: Use the function type for the
1993 2018-06-04 Jim Wilson <jimw@sifive.com>
1995 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
1997 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
1998 and maybe_eh_return. Change regno to unsigned int. Use new args to
1999 handle EH_RETURN_DATA_REGNO registers properly.
2000 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
2001 (riscv_expand_epilogue): Update comment. Change argument name and
2002 type. Update code to use new name and type. Pass new args to
2003 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
2005 * config/riscv/riscv.md (NORMAL_RETURN): New.
2006 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
2007 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
2008 (eh_return): Call gen_eh_return_internal and emit barrier.
2009 (eh_return_internal): Call riscv_expand_epilogue.
2011 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
2013 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
2014 bit_insertion field and declare can_be_merged_into method.
2015 (merged_store_group::can_be_merged_into): New method.
2016 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
2017 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
2018 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
2020 2018-06-04 Richard Biener <rguenther@suse.de>
2022 PR tree-optimization/85955
2023 * builtins.c (fold_builtin_sincos): Convert pointers to
2024 destination to appropriate type before dereferencing.
2026 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
2028 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
2030 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
2032 * expr.c (expand_expr_real_1): Force the operand into memory if
2033 its TYPE_MODE is BLKmode and if there is no integer mode for
2034 the number of bits being extracted.
2036 2018-06-04 Jakub Jelinek <jakub@redhat.com>
2040 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
2041 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
2043 2018-06-04 Richard Biener <rguenther@suse.de>
2045 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
2046 (cleanup_tree_cfg_noloop): ... single caller. Do
2047 start_recording_case_labels later.
2049 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
2051 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
2052 to _IMMINTRIN_H_INCLUDED.
2053 * config/i386/pconfigintrin.h: Ditto.
2054 * config/i386/waitpkgintrin.h: Ditto.
2055 * config/i386/immintrin.h: Add includes for sgxintrin.h,
2056 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
2057 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
2058 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
2059 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
2060 waitpkgintrin.h and cldemoteintrin.h.
2062 2018-06-04 Richard Biener <rguenther@suse.de>
2064 PR tree-optimization/86038
2065 * tracer.c (find_best_successor): Check probability for
2066 being initialized, bail out if not.
2068 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
2071 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
2072 of bits to ignore when comparing architectures.
2074 2018-06-04 Jakub Jelinek <jakub@redhat.com>
2076 PR tree-optimization/69615
2077 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
2078 maximum or minimum of the type, try to merge it also as if
2079 range1 is + [-, x - 1] or + [x + 1, -].
2082 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
2084 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
2086 PR tree-optimization/86034
2087 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
2088 the unsigned bitfield type in a bit insertion sequence if it does not
2089 have a larger precision than the bitfield size.
2090 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
2092 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
2094 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
2096 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
2098 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
2099 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
2100 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
2101 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
2103 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
2105 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
2106 Disable -fdelete-null-pointer-checks for ELF toolchain.
2108 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
2109 Kito Cheng <kito.cheng@gmail.com>
2111 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
2112 (nds32le-*-*, nds32be-*-*): Integrate checking process.
2113 (nds32*-*-*): Add glibc and uclibc conditions.
2114 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
2115 (TARGET_EXCEPT_UNWIND_INFO): Define.
2116 * config/nds32/elf.h: New file.
2117 * config/nds32/linux.h: New file.
2118 * config/nds32/nds32-elf.opt: New file.
2119 * config/nds32/nds32-linux.opt: New file.
2120 * config/nds32/nds32-fp-as-gp.c
2121 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
2122 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
2124 (nds32_asm_file_end): Ditto.
2125 (nds32_print_operand): Ditto.
2126 (nds32_insert_attributes): Ditto.
2127 (nds32_init_libfuncs): New function.
2128 (TARGET_HAVE_TLS): Define.
2129 (TARGET_INIT_LIBFUNCS): Define.
2130 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
2132 (TARGET_ELF): Apply different mcmodel setting.
2133 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
2134 been migrated into elf.h and linux.h files.
2135 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
2136 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
2137 (mcmodel): The content has been migrated into nds32-elf.opt and
2138 nds32-linux.opt files.
2139 * config/nds32/t-elf: New file.
2140 * config/nds32/t-linux: New file.
2142 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
2143 Shiva Chen <shiva0217@gmail.com>
2145 * config/nds32/constants.md (unspec_volatile_element): Add
2146 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
2147 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
2149 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
2150 (make_pass_nds32_fp_as_gp): Declare.
2151 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
2153 (nds32_asm_function_end_prologue): Remove unused asm output.
2154 (nds32_asm_function_begin_epilogue): Remove unused asm output.
2155 (nds32_asm_file_start): Output necessary fp_as_gp information.
2156 (nds32_option_override): Adjust register usage.
2157 (nds32_expand_prologue): Consider fp_as_gp situation.
2158 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
2159 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
2162 (simple_return): Ditto.
2163 (omit_fp_begin): Output special directive for fp_as_gp.
2164 (omit_fp_end): Output special directive for fp_as_gp.
2165 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
2166 mforbid-fp-as-gp): New options.
2168 2018-06-01 Mark Wielaard <mark@klomp.org>
2170 * dwarf2out.c (dwarf2out_finish): Remove generation of
2171 DW_AT_loclists_base.
2173 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
2175 * gimple-ssa-store-merging.c: Include gimple-fold.h.
2176 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
2177 (struct merged_store_group): Add bit_insertion field.
2178 (dump_char_array): Use standard hexadecimal format.
2179 (merged_store_group::merged_store_group): Set bit_insertion to false.
2180 (merged_store_group::apply_stores): Use optimal buffer size. Deal
2181 with BIT_INSERT_EXPR stores. Move up code updating the mask and
2182 also print the mask in the dump file.
2183 (pass_store_merging::gate): Minor tweak.
2184 (imm_store_chain_info::coalesce_immediate): Fix wrong association
2185 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
2186 stores with INTEGER_CST stores.
2187 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
2188 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
2189 and use it throughout. Generate bit insertion sequences if need be.
2190 (pass_store_merging::process_store): Remove redundant condition.
2191 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
2193 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
2195 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
2196 the 128-bit floating point types. Fix function comment.
2198 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2200 * config/aarch64/aarch64-simd.md
2201 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
2203 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
2206 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
2208 PR tree-optimization/85989
2209 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
2211 (backprop::intersect_uses): Check it when deciding whether this
2212 is a backedge reference.
2213 (backprop::process_block): Add each phi to m_visited_phis
2214 after visiting it, then clear it at the end.
2216 2018-06-01 Richard Biener <rguenther@suse.de>
2218 * tree-vectorizer.h (vect_dr_stmt): New function.
2219 (vect_get_load_cost): Adjust.
2220 (vect_get_store_cost): Likewise.
2221 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
2222 Use vect_dr_stmt instead of DR_SMTT.
2223 (vect_record_base_alignments): Likewise.
2224 (vect_calculate_target_alignment): Likewise.
2225 (vect_compute_data_ref_alignment): Likewise and make static.
2226 (vect_update_misalignment_for_peel): Likewise.
2227 (vect_verify_datarefs_alignment): Likewise.
2228 (vector_alignment_reachable_p): Likewise.
2229 (vect_get_data_access_cost): Likewise. Pass down
2230 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
2231 (vect_get_peeling_costs_all_drs): Likewise.
2232 (vect_peeling_hash_get_lowest_cost): Likewise.
2233 (vect_enhance_data_refs_alignment): Likewise.
2234 (vect_find_same_alignment_drs): Likewise.
2235 (vect_analyze_data_refs_alignment): Likewise.
2236 (vect_analyze_group_access_1): Likewise.
2237 (vect_analyze_group_access): Likewise.
2238 (vect_analyze_data_ref_access): Likewise.
2239 (vect_analyze_data_ref_accesses): Likewise.
2240 (vect_vfa_segment_size): Likewise.
2241 (vect_small_gap_p): Likewise.
2242 (vectorizable_with_step_bound_p): Likewise.
2243 (vect_prune_runtime_alias_test_list): Likewise.
2244 (vect_analyze_data_refs): Likewise.
2245 (vect_supportable_dr_alignment): Likewise.
2246 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2247 (vect_gen_prolog_loop_niters): Likewise.
2248 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2249 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
2251 (vect_recog_mask_conversion_pattern): Likewise.
2252 (vect_try_gather_scatter_pattern): Likewise.
2253 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
2254 to vect_get_store_cost.
2255 (vect_get_store_cost): Get stmt_info instead of DR.
2256 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
2257 (vect_get_load_cost): Get stmt_info instead of DR.
2259 2018-06-01 Richard Biener <rguenther@suse.de>
2262 * gimple-fold.c (var_decl_component_p): Also allow offsetted
2263 vars wrapped in MEM_REFs.
2265 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
2267 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
2268 Fix subreg tests so that we only return a choice between
2269 GENERAL_REGS and FP_REGS if the original classes included both.
2271 2018-06-01 Richard Biener <rguenther@suse.de>
2274 * tree-ssa-structalias.c (get_function_part_constraint):
2275 Handle NULL fi->decl.
2276 (find_func_aliases_for_call): Properly handle indirect
2277 fi from direct call.
2278 (find_func_clobbers): Likewise.
2279 (ipa_pta_execute): Likewise.
2280 (create_variable_info_for): For functions that are ifunc_resolver
2281 resolve to a varinfo that contains the result of the resolver call.
2282 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
2285 2018-05-31 Michael Collison <michael.collison@arm.com>
2287 * config/aarch64/aarch64.md:
2288 (*fix_to_zero_extenddfdi2): New pattern.
2289 * gcc.target/aarch64/fix_extend1.c: New testcase.
2291 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
2295 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
2296 and BUILT_IN_STRNCMP_EQ.
2297 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
2298 BUILT_IN_STRNCMP_EQ.
2299 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
2300 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
2301 (gimple_fold_builtin): Likewise.
2302 * tree-ssa-strlen.c (compute_string_length): New function.
2303 (determine_min_obsize): New function.
2304 (handle_builtin_string_cmp): New function to handle calls to
2305 string compare functions.
2306 (strlen_optimize_stmt): Add handling to builtin string compare
2308 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
2309 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
2310 * tree.c (build_common_builtin_nodes): Add new defines of
2311 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
2313 2018-05-31 Jakub Jelinek <jakub@redhat.com>
2316 * bb-reorder.c (pass_partition_blocks::gate): Return false for
2317 functions with naked attribute.
2319 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2321 * config/i386/sse.md (avx_vec_concat<mode>):
2322 Substitute concat_tg_mode mode attribute with xtg_mode.
2323 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
2324 (concat_tg_mode): Remove mode attribute.
2326 2018-05-31 Martin Sebor <msebor@redhat.com>
2329 * calls.c (alloc_max_size): Correct a logic error/typo.
2330 Treat excessive arguments as infinite. Warn for invalid arguments.
2331 * doc/invoke.texi (-Walloc-size-larger-than): Update.
2333 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
2336 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
2337 and movx for Haswell.
2339 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
2340 Cesar Philippidis <cesar@codesourcery.com>
2343 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
2344 when emitting error on private/firstprivate reductions.
2345 * omp-low.c (lower_omp_target): Avoid reference-type processing
2346 on pointers for firstprivate clause.
2348 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2350 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
2353 * config/aarch64/aarch64-simd.md
2354 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
2355 (aarch64_ld1_x3_<mode>): Likewise
2356 (aarch64_st1x2<VALLDIF:mode>): Likewise
2357 (aarch64_st1_x2_<mode>): Likewise
2358 (aarch64_st1x3<VALLDIF:mode>): Likewise
2359 (aarch64_st1_x3_<mode>): Likewise
2360 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
2361 (vld1_s8_x3): Likewise.
2362 (vld1_u16_x3): Likewise.
2363 (vld1_s16_x3): Likewise.
2364 (vld1_u32_x3): Likewise.
2365 (vld1_s32_x3): Likewise.
2366 (vld1_u64_x3): Likewise.
2367 (vld1_s64_x3): Likewise.
2368 (vld1_f16_x3): Likewise.
2369 (vld1_f32_x3): Likewise.
2370 (vld1_f64_x3): Likewise.
2371 (vld1_p8_x3): Likewise.
2372 (vld1_p16_x3): Likewise.
2373 (vld1_p64_x3): Likewise.
2374 (vld1q_u8_x3): Likewise.
2375 (vld1q_s8_x3): Likewise.
2376 (vld1q_u16_x3): Likewise.
2377 (vld1q_s16_x3): Likewise.
2378 (vld1q_u32_x3): Likewise.
2379 (vld1q_s32_x3): Likewise.
2380 (vld1q_u64_x3): Likewise.
2381 (vld1q_s64_x3): Likewise.
2382 (vld1q_f16_x3): Likewise.
2383 (vld1q_f32_x3): Likewise.
2384 (vld1q_f64_x3): Likewise.
2385 (vld1q_p8_x3): Likewise.
2386 (vld1q_p16_x3): Likewise.
2387 (vld1q_p64_x3): Likewise.
2388 (vst1_s64_x2): Likewise.
2389 (vst1_u64_x2): Likewise.
2390 (vst1_f64_x2): Likewise.
2391 (vst1_s8_x2): Likewise.
2392 (vst1_p8_x2): Likewise.
2393 (vst1_s16_x2): Likewise.
2394 (vst1_p16_x2): Likewise.
2395 (vst1_s32_x2): Likewise.
2396 (vst1_u8_x2): Likewise.
2397 (vst1_u16_x2): Likewise.
2398 (vst1_u32_x2): Likewise.
2399 (vst1_f16_x2): Likewise.
2400 (vst1_f32_x2): Likewise.
2401 (vst1_p64_x2): Likewise.
2402 (vst1q_s8_x2): Likewise.
2403 (vst1q_p8_x2): Likewise.
2404 (vst1q_s16_x2): Likewise.
2405 (vst1q_p16_x2): Likewise.
2406 (vst1q_s32_x2): Likewise.
2407 (vst1q_s64_x2): Likewise.
2408 (vst1q_u8_x2): Likewise.
2409 (vst1q_u16_x2): Likewise.
2410 (vst1q_u32_x2): Likewise.
2411 (vst1q_u64_x2): Likewise.
2412 (vst1q_f16_x2): Likewise.
2413 (vst1q_f32_x2): Likewise.
2414 (vst1q_f64_x2): Likewise.
2415 (vst1q_p64_x2): Likewise.
2416 (vst1_s64_x3): Likewise.
2417 (vst1_u64_x3): Likewise.
2418 (vst1_f64_x3): Likewise.
2419 (vst1_s8_x3): Likewise.
2420 (vst1_p8_x3): Likewise.
2421 (vst1_s16_x3): Likewise.
2422 (vst1_p16_x3): Likewise.
2423 (vst1_s32_x3): Likewise.
2424 (vst1_u8_x3): Likewise.
2425 (vst1_u16_x3): Likewise.
2426 (vst1_u32_x3): Likewise.
2427 (vst1_f16_x3): Likewise.
2428 (vst1_f32_x3): Likewise.
2429 (vst1_p64_x3): Likewise.
2430 (vst1q_s8_x3): Likewise.
2431 (vst1q_p8_x3): Likewise.
2432 (vst1q_s16_x3): Likewise.
2433 (vst1q_p16_x3): Likewise.
2434 (vst1q_s32_x3): Likewise.
2435 (vst1q_s64_x3): Likewise.
2436 (vst1q_u8_x3): Likewise.
2437 (vst1q_u16_x3): Likewise.
2438 (vst1q_u32_x3): Likewise.
2439 (vst1q_u64_x3): Likewise.
2440 (vst1q_f16_x3): Likewise.
2441 (vst1q_f32_x3): Likewise.
2442 (vst1q_f64_x3): Likewise.
2443 (vst1q_p64_x3): Likewise.
2445 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2447 * config/msp430/msp430.c (msp430_output_labelref): Prepend
2448 user_label_prefix to name.
2450 * tree-core.h: Update comment about the format of NAME string
2451 passed to handler in attribute_spec.
2453 * config/msp430/msp430.md: Remove erroneous subreg expression from
2454 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
2455 zero_extend{q,h}isi2.
2457 2018-05-30 Borislav Petkov <bp@suse.de>
2459 * doc/extend.texi: Document some architecture specific
2460 constraints and sort entries.
2462 2018-05-30 Martin Sebor <msebor@redhat.com>
2465 * builtins.c (expand_builtin_stpcpy_1): New function.
2466 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
2467 only if the former succeeds.
2469 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2471 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
2474 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
2476 * doc/invoke.texi (-flinker-output): Document
2478 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
2480 * passes.c (ipa_write_summaries): Only modify statements if body
2482 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
2483 incrementally linking.
2484 (ipa_passes): Likewise.
2485 * lto-cgraph.c (lto_output_node): When incrementally linking do not
2486 pass down resolution info.
2487 * common.opt (flag_incremental_link): Update info.
2488 * gcc.c (plugin specs): Turn flinker-output=* to
2489 -plugin-opt=-linker-output-known
2490 * toplev.c (compile_file): Also cut compilation when doing incremental
2492 * flag-types. (enum lto_partition_model): Add
2493 LTO_LINKER_OUTPUT_NOLTOREL.
2494 (invoke.texi): Add -flinker-output docs.
2495 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
2496 link same way as WPA; do not stream in dead initializers.
2498 * dwarf2out.c (dwarf2out_die_ref_for_decl,
2499 darf2out_register_external_decl): Support incremental link.
2501 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
2503 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
2505 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
2507 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
2508 it down to simple_object_copy_lto_debug_sections.
2509 (run_gcc): Determine incremental LTO link time and configure
2510 lto1 into non-wpa mode, disable renaming of debug sections.
2512 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
2514 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
2515 descriptions of various incorrectly documented functions.
2517 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
2520 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2521 address check not strict.
2523 2018-05-30 Richard Biener <rguenther@suse.de>
2525 PR tree-optimization/85964
2526 * tracer.c (better_p): Drop initialized count check, we only
2527 call the function with initialized counts now.
2528 (find_best_successor): Do find a best edge if one
2529 has uninitialized count.
2530 (find_best_predecessor): Likewise. Do BB frequency check only
2531 if count is initialized.
2533 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
2535 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
2536 (aarch64_ldrstr_offset_compare): New.
2537 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
2538 load/store orderings.
2539 (aarch64_gen_adjusted_ldpstp): Likewise.
2541 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
2543 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
2544 Check for subset of GENERAL_REGS and FP_REGS.
2545 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
2548 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
2550 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
2551 and wi::to_poly_offset. Add the current offset and then check
2552 whether the sum fits, rather than using an unchecked addition of
2553 a checked term. Check for a shwi rather than a uhwi.
2554 * expr.c (get_bit_range): Use tree_to_poly_uint64.
2555 (store_constructor): Use poly_int_tree_p.
2556 (expand_expr_real_1): Likewise.
2557 * function.c (assign_temp): Likewise.
2558 * fold-const.c (const_binop): Use poly_int_tree_p and
2560 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
2562 * ipa-icf-gimple.c (func_checker::compare_operand): Use
2563 to_poly_offset for MEM offsets.
2564 * ipa-icf.c (sem_variable::equals): Likewise.
2565 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
2566 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
2567 wi::to_poly_offset for BIT_FIELD_REF offsets.
2568 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
2570 * var-tracking.c (emit_note_insn_var_location): Use
2571 tree_to_poly_uint64.
2573 2018-05-29 Jim Wilson <jimw@sifive.com>
2575 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
2577 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
2580 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
2581 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
2583 (sse4_1_round<mode>2): Use nonimmediate_operand
2584 for operand 1 predicate.
2586 2018-05-29 Martin Sebor <msebor@redhat.com>
2587 Richard Biener <rguenther@suse.de>
2590 * calls.c (get_size_range): Call determine_value_range instead
2591 of get_value_range..
2592 * tree-vrp.h (determine_value_range): Declared new function.
2593 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
2595 2018-05-29 Richard Biener <rguenther@suse.de>
2597 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
2598 sure to use non-pattern stmts for get_earlier_stmt arguments.
2599 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
2600 called on pattern stmts.
2601 (get_later_stmt): Likewise.
2603 2018-05-29 Martin Liska <mliska@suse.cz>
2605 PR gcov-profile/85759
2606 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
2609 2018-05-29 Jakub Jelinek <jakub@redhat.com>
2611 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
2613 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
2617 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
2618 VEC_PACK_FLOAT_EXPR): New tree codes.
2619 * tree-pretty-print.c (op_code_prio): Handle
2620 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
2621 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
2622 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
2623 * tree-inline.c (estimate_operator_cost): Likewise.
2624 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
2625 * fold-const.c (const_binop): Likewise.
2626 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
2627 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
2628 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
2629 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
2630 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
2631 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
2632 * expr.c (expand_expr_real_2): Likewise.
2633 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
2634 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
2635 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
2637 * optabs.c (expand_widen_pattern_expr): For
2638 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
2639 sign from result type rather than operand's type.
2640 (expand_binop_directly): For vec_packu_float_optab and
2641 vec_packs_float_optab allow result type to be different from operand's
2643 * optabs-tree.c (optab_for_tree_code): Handle
2644 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
2645 VEC_PACK_FLOAT_EXPR. Formatting fixes.
2646 * tree-vect-generic.c (expand_vector_operations_1): Handle
2647 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
2648 VEC_PACK_FLOAT_EXPR.
2649 * tree-vect-stmts.c (supportable_widening_operation): Handle
2651 (supportable_narrowing_operation): Handle FLOAT_EXPR.
2652 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
2653 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
2654 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
2655 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
2657 (vec_pack<floatprefix>_float_<mode>): New expander.
2658 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
2660 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
2661 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
2662 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
2663 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
2664 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
2666 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
2667 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
2668 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
2669 VEC_PACK_FLOAT_EXPR): Document.
2671 2018-05-29 Richard Biener <rguenther@suse.de>
2673 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
2675 (stmt_vec_info_vec): Make pointer.
2676 (init_stmt_vec_info_vec): Remove.
2677 (free_stmt_vec_info_vec): Likewise.
2678 (set_stmt_vec_info_vec): New function.
2679 (free_stmt_vec_infos): Likewise.
2680 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
2681 (set_vinfo_for_stmt): Likewise.
2682 (get_earlier_stmt): Likewise.
2683 (get_later_stmt): Likewise.
2684 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
2685 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
2686 (vec_info::~vec_info): Free stmt_vec_infos.
2687 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
2688 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
2689 (pass_slp_vectorize::execute): Likewise.
2690 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
2691 (free_stmt_vec_info_vec): Likewise.
2692 (set_stmt_vec_info_vec): New function.
2693 (free_stmt_vec_infos): Likewise.
2694 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
2695 the global stmt_vec_info_vec.
2696 * tree-parloops.c (gather_scalar_reductions): Use
2697 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
2700 2018-05-29 Richard Biener <rguenther@suse.de>
2702 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
2704 2018-05-29 Martin Liska <mliska@suse.cz>
2705 David Malcolm <dmalcolm@redhat.com>
2707 * vec.c (test_reverse): New.
2708 (vec_c_tests): Add new test.
2709 * vec.h (vl_ptr>::reverse): New function.
2711 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
2713 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
2715 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
2718 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2720 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
2722 2018-05-28 Richard Biener <rguenther@suse.de>
2724 PR tree-optimization/85933
2725 * tree-vect-data-refs.c (vect_record_base_alignments): Only
2726 look at stmts marked as vectorizable.
2728 2018-05-28 Richard Biener <rguenther@suse.de>
2730 PR tree-optimization/85934
2731 * tree-vect-generic.c (expand_vector_operations_1): Hoist
2732 vector boolean check before scalar optimization.
2734 2018-05-28 Jakub Jelinek <jakub@redhat.com>
2736 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
2739 2018-05-28 Mark Wielaard <mark@klomp.org>
2741 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
2742 if it is an expression containing a minus sign.
2744 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
2746 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
2748 2018-05-27 Paul Koning <ni1d@arrl.net>
2750 * config/pdp11/pdp11.md (truncsihi2): Remove.
2752 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
2753 Chung-Ju Wu <jasonwucj@gmail.com>
2755 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
2757 (unaligned_store_dw): Ditto.
2758 * config/nds32/nds32-memory-manipulation.c
2759 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
2760 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
2761 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
2762 (emit_setmem_word_loop): Rename to ...
2763 (emit_setmem_doubleword_loop): ... this.
2764 (nds32_gen_dup_4_byte_to_word_value): New function.
2765 (nds32_gen_dup_8_byte_to_double_word_value): New function.
2766 (nds32_expand_setmem_loop): Refine implementation.
2767 (nds32_expand_setmem_loop_v3m): Ditto.
2768 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
2771 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
2773 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
2775 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
2777 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
2778 (nds32_init_machine_status): Initialize machine->attr_naked_p and
2779 machine->attr_no_prologue_p.
2780 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
2781 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
2782 (nds32_expand_epilogue): Consider attr_naked_p.
2783 (nds32_expand_epilogue_v3pop): Likewise.
2784 (nds32_can_use_return_insn): Likewise.
2785 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
2786 attr_no_prologue_p fields.
2787 * config/nds32/nds32.opt (mret-in-naked-func): New option.
2789 2018-05-27 Jakub Jelinek <jakub@redhat.com>
2792 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
2794 * config/i386/sse.md
2795 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
2797 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
2799 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
2801 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
2803 (*<floatsuffix>floatv2div2sf2): Rename to ...
2804 (*float<floatunssuffix>v2div2sf2): ... this.
2805 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
2806 (float<floatunssuffix>v2div2sf2_mask): ... this.
2807 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
2808 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
2809 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
2811 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
2813 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
2815 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
2817 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
2819 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
2821 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
2822 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
2823 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
2824 gen_ufix_truncv8dfv8si2.
2825 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
2826 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
2827 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
2828 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
2829 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
2830 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
2831 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
2832 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
2834 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
2838 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
2840 2018-05-25 Jim Wilson <jimw@sifive.com>
2842 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
2843 * config/riscv/riscv.c (struct machine_function): Add
2844 interrupt_handler_p and attribute_checked_p fields.
2845 (riscv_attribute_table): Add interrupt.
2846 (riscv_interrupt_type_p): New.
2847 (riscv_save_reg_p): Save extra regs for interrupt handler.
2848 (riscv_use_save_libcall): Return false for interrupt handler.
2849 (riscv_first_stack_step): Add forward declaration.
2850 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
2851 for interrupt handler with large frame. Use it for saved reg list.
2852 (riscv_expand_prologue): Move flag_stack_usage_info support to
2853 eliminate duplication.
2854 (riscv_expand_epilogue): Generate mret for interrupt handler.
2855 (riscv_epilogue_uses): New.
2856 (riscv_can_use_return_insn): Return false for interrupt handler.
2857 (riscv_function_ok_for_sibcall): Likewise.
2858 (riscv_set_current_function): Add interrupt handler support.
2859 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
2860 * config/riscv/riscv.md (UNSPECV_MRET): New.
2862 (riscv_frflags, riscv_fsflags): Use tab after opcode.
2864 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
2866 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
2868 PR tree-optimization/85712
2869 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
2870 this candidate has already been replaced in-situ by a copy.
2872 2018-05-25 Jason Merrill <jason@redhat.com>
2874 PR c++/80485 - inline function non-zero address.
2875 * symtab.c (nonzero_address): Check DECL_COMDAT.
2877 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
2880 * config/alpha/alpha.md (ashlsi3): New insn pattern.
2881 (*ashlsi_se): Rename from *ashldi_se. Define as sign
2882 extension of SImode operation. Use const123_operand predicate.
2883 (*saddsi_1): Remove.
2884 (*saddl_se_1): Ditto.
2886 (*ssubl_se_1): Ditto.
2887 * config/alpha/predicates.md (const123_operand): New predicate.
2888 * config/alpha/constraints.md (P): Use IN_RANGE.
2890 2018-05-25 Richard Biener <rguenther@suse.de>
2892 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
2894 (ref_maybe_used_by_stmt_p): Likewise.
2895 (stmt_may_clobber_ref_p): Likewise.
2896 (stmt_may_clobber_ref_p_1): Likewise.
2897 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
2899 (ref_maybe_used_by_stmt_p): Likewise.
2900 (stmt_may_clobber_ref_p): Likewise.
2901 (stmt_may_clobber_ref_p_1): Likewise.
2902 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
2903 the alias oracle to disambiguate DRs with stmts DR analysis
2905 (vect_analyze_data_refs): Do not give up on not analyzable
2906 DRs for BB vectorization. Remove code truncating the dataref
2909 2018-05-25 Jakub Jelinek <jakub@redhat.com>
2912 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
2913 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
2914 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
2916 2018-05-25 Richard Biener <rguenther@suse.de>
2918 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
2919 function, combining stmt data ref gathering and fatal analysis
2921 (vect_analyze_data_refs): Remove now redudnant code and simplify.
2922 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
2923 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
2924 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
2925 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
2927 2018-05-25 Bin Cheng <bin.cheng@arm.com>
2929 PR tree-optimization/85720
2930 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
2931 SCC if all partitions are builtins.
2932 (version_loop_by_alias_check): New parameter. Generate cancelable
2933 runtime alias check if all partitions are builtins.
2934 (distribute_loop): Update call to above function.
2936 2018-05-25 Bin Cheng <bin.cheng@arm.com>
2938 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
2939 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
2940 (parm_default_def_partition_arg): Ditto.
2941 (set_parm_default_def_partition): Ditto.
2942 (get_parm_default_def_partitions): Ditto and make it static.
2943 (get_undefined_value_partitions): Ditto and make it static.
2944 (remove_ssa_form): Refactor call to init_var_map here.
2945 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
2946 computation for loop region.
2947 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
2948 (register_default_def): Delete.
2949 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
2950 (parm_default_def_partition_arg): Ditto.
2951 (set_parm_default_def_partition): Ditto.
2952 (get_parm_default_def_partitions): Ditto and make it static.
2953 (get_undefined_value_partitions): Ditto and make it static.
2954 (coalesce_with_default, coalesce_with_default): Update comment.
2955 (create_coalesce_list_for_region): New func factored out from
2956 create_outofssa_var_map.
2957 (populate_coalesce_list_for_outofssa): New func factored out from
2958 create_outofssa_var_map and coalesce_ssa_name.
2959 (create_outofssa_var_map): Delete.
2960 (coalesce_ssa_name): Refactor to support live range computation.
2961 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
2962 (get_parm_default_def_partitions): Delete.
2963 (get_undefined_value_partitions): Ditto.
2964 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
2965 computation for loop region.
2966 (new_tree_live_info, loe_visit_block): Ditto.
2967 (live_worklist, set_var_live_on_entry): Ditto.
2968 (calculate_live_on_exit, verify_live_on_entry): Ditto.
2969 * tree-ssa-live.h (struct _var_map): New fields.
2970 (init_var_map): Change decl.
2971 (region_contains_p): New.
2973 2018-05-25 Bin Cheng <bin.cheng@arm.com>
2975 * tree-ssa-live.h (live_merge_and_clear): Delete.
2977 2018-05-25 Richard Biener <rguenther@suse.de>
2980 * tree-dump.c (dequeue_and_dump): Remove access to removed
2981 operand 2 of a SWITCH_EXPR.
2983 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
2985 * doc/sourcebuild.texi (vect_double_cond_arith): Include
2986 multiplication and division.
2987 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
2988 (cond_udiv@var{m}, cond_umod@var{m}): Document.
2989 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
2990 (cond_udiv_optab, cond_umod_optab): New optabs.
2991 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
2992 (IFN_COND_RDIV): New internal functions.
2993 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
2994 TRUNC_MOD_EXPR and RDIV_EXPR.
2995 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
2996 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
2998 (SVE_INT_BINARY): Include mult.
2999 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
3000 (optab, sve_int_op): Handle mult.
3001 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
3003 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
3004 for SVE_INT_BINARY_SD.
3006 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
3008 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
3009 (optab, sve_int_op): Handle div and udiv.
3010 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
3011 for SVE_INT_BINARY_SD.
3012 (*<optab><mode>3): New insn for the same.
3014 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
3016 * tree-vect-patterns.c: Include predict.h.
3017 (vect_recog_divmod_pattern): Restrict check for division support
3018 to when optimizing for size.
3020 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
3022 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
3023 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
3024 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
3025 (gimple_match_op::set_op): Likewise.
3026 (gimple_resimplify4): Declare.
3027 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
3028 (expr::gen_transform): Likewise.
3029 (decision_tree::gen): Generate a simplification routine for 4 operands.
3030 * gimple-match-head.c (gimple_simplify): Add an overload for
3031 4 operands. In the top-level function, handle up to 4 call
3032 arguments and call gimple_resimplify4.
3033 (gimple_resimplify4): New function.
3034 (build_call_internal): Pass a fourth operand.
3035 (maybe_push_to_seq): Likewise.
3036 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
3037 Fold VEC_COND_EXPRs of an operation and a default value into
3038 an IFN_COND_* function if possible.
3039 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
3041 (SVE_COND_FP_BINARY): Include them.
3042 (optab, sve_fp_op): Handle them.
3043 (SVE_INT_BINARY_REV): New code iterator.
3044 (SVE_COND_FP_BINARY_REV): New int iterator.
3045 (commutative): New int attribute.
3046 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
3048 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
3050 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
3051 (*cond_<optab><mode>): New patterns for reversed operands.
3053 2018-05-25 Richard Biener <rguenther@suse.de>
3055 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
3056 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
3057 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
3058 (STMT_VINFO_GROUPED_ACCESS): Adjust.
3059 * tree-vect-data-refs.c (everywhere): Adjust users.
3060 * tree-vect-loop.c (everywhere): Likewise.
3061 * tree-vect-slp.c (everywhere): Likewise.
3062 * tree-vect-stmts.c (everywhere): Likewise.
3063 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3065 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3067 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
3069 (gcc_cv_as_section_exclude): ... this.
3070 Try Solaris as #exclude syntax.
3071 * configure: Regenerate.
3072 * config.in: Regenerate.
3073 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
3075 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
3076 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
3078 * varasm.c (default_elf_asm_named_section): Don't check if
3079 HAVE_GAS_SECTION_EXCLUDE is defined.
3081 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
3083 * doc/md.texi: Update the documentation of the cond_* optabs
3084 to mention the new final operand. Fix GET_MODE_NUNITS call.
3085 Describe the scalar case too.
3086 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
3087 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
3089 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
3090 (get_conditional_internal_fn): Update comment.
3091 * tree-vect-loop.c (vectorizable_reduction): Pass the original
3092 accumulator value as a final argument to conditional functions.
3093 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
3094 a define_expand and add an "else" operand. Assert for now that
3095 the else operand is equal to operand 2. Use SVE_INT_BINARY and
3096 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
3097 (*cond_<optab><mode>): New patterns.
3098 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
3099 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
3100 (UNSPEC_COND_EOR): Delete.
3101 (optab): Remove associated mappings.
3102 (SVE_INT_BINARY): New code iterator.
3103 (sve_int_op): Remove int attribute and add "minus" to the code
3105 (SVE_COND_INT_OP): Delete.
3106 (SVE_COND_FP_OP): Rename to...
3107 (SVE_COND_FP_BINARY): ...this.
3109 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
3111 * optabs.c (can_reuse_operands_p): New function.
3112 (maybe_legitimize_operands): Try to reuse the results for
3115 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
3117 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
3118 Add {q} suffix to insn mnemonic.
3120 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3122 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
3123 (msp430_warn_func_return): New.
3125 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
3127 * fold-const.c (tree_nonzero_bits): New function.
3128 * fold-const.h (tree_nonzero_bits): Likewise.
3129 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
3130 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
3132 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
3136 * varasm.c (assemble_alias): Check ifunc_resolver only on
3139 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
3142 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
3143 when memory input operand is handled.
3145 2018-05-24 Luis Machado <luis.machado@linaro.org>
3147 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
3149 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
3151 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
3153 * match.pd: Delay FMA folds until after vectorization.
3155 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
3158 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3159 address check not strict.
3161 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
3163 * gimple-match.h (gimple_match_op): New class.
3164 (mprts_hook): Replace parameters with a gimple_match_op *.
3165 (maybe_build_generic_op): Likewise.
3166 (gimple_simplified_result_is_gimple_val): Replace parameters with
3167 a const gimple_match_op *.
3168 (gimple_simplify): Replace code_helper * and tree * parameters with
3169 a gimple_match_op * parameter.
3170 (gimple_resimplify1): Replace code_helper *, tree and tree *
3171 parameters with a gimple_match_op * parameter.
3172 (gimple_resimplify2): Likewise.
3173 (gimple_resimplify3): Likewise.
3174 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
3175 parameters with a gimple_match_op * parameter.
3176 * gimple-match-head.c (gimple_simplify): Change prototypes of
3177 auto-generated functions to take a gimple_match_op * instead of
3178 separate code_helper * and tree * parameters. Make the same
3179 change in the top-level overload and update calls to the
3180 gimple_resimplify routines. Update calls to the auto-generated
3181 functions and to maybe_push_res_to_seq in the publicly-facing
3182 operation-specific gimple_simplify overloads.
3183 (gimple_match_op::MAX_NUM_OPS): Define.
3184 (gimple_resimplify1): Replace rcode and ops with a single res_op
3185 parameter. Update call to gimple_simplify.
3186 (gimple_resimplify2): Likewise.
3187 (gimple_resimplify3): Likewise.
3188 (mprts_hook): Replace parameters with a gimple_match_op *.
3189 (maybe_build_generic_op): Likewise.
3190 (build_call_internal): Replace type, nargs and ops with
3191 a gimple_match_op *.
3192 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
3193 with a single gimple_match_op *. Update calls to mprts_hook,
3194 build_call_internal and gimple_simplified_result_is_gimple_val.
3195 Factor out code that is common to the tree_code and combined_fn cases.
3196 * genmatch.c (expr::gen_transform): Replace tem_code and
3197 tem_ops with a gimple_match_op called tem_op. Update calls
3198 to the gimple_resimplify functions and maybe_push_res_to_seq.
3199 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
3200 res_ops. Update call to the gimple_resimplify functions.
3201 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
3202 (decision_tree::gen): Make the functions take a gimple_match_op *
3203 called res_op instead of separate res_code and res_ops parameters.
3204 Update call accordingly.
3205 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
3206 and ops with a single res_op parameter. Update calls to
3207 maybe_build_generic_op and maybe_push_res_to_seq.
3208 (fold_stmt_1): Update calls to gimple_simplify and
3209 replace_stmt_with_simplification.
3210 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
3211 and gimple_simplified_result_is_gimple_val.
3212 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
3214 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
3215 with a gimple_match_op *.
3216 (vn_nary_build_or_lookup): Likewise. Update call to
3217 vn_nary_build_or_lookup_1.
3218 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
3219 gimple_match_op *. Update calls to the gimple_resimplify routines
3220 and to gimple_simplified_result_is_gimple_val.
3221 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
3222 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
3223 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
3224 (visit_nary_op): Likewise.
3225 (visit_reference_op_load): Likewise.
3227 2018-05-23 Luis Machado <luis.machado@linaro.org>
3229 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
3230 modifier for printing the step amount.
3232 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
3235 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
3238 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
3240 * doc/sourcebuild.texi (Endianness): New subsubsection.
3242 2018-05-23 Luis Machado <luis.machado@linaro.org>
3244 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3245 <prefetch_dynamic_strides>: New const bool field.
3246 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3247 prefetch_dynamic_strides.
3248 (exynosm1_prefetch_tune): Likewise.
3249 (thunderxt88_prefetch_tune): Likewise.
3250 (thunderx_prefetch_tune): Likewise.
3251 (thunderx2t99_prefetch_tune): Likewise.
3252 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
3254 (aarch64_override_options_internal): Update to set
3255 PARAM_PREFETCH_DYNAMIC_STRIDES.
3256 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
3257 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
3258 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
3259 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
3260 prefetch-dynamic-strides setting.
3262 2018-05-23 Luis Machado <luis.machado@linaro.org>
3264 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3265 <minimum_stride>: New const int field.
3266 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3267 minimum_stride field defaulting to -1.
3268 (exynosm1_prefetch_tune): Likewise.
3269 (thunderxt88_prefetch_tune): Likewise.
3270 (thunderx_prefetch_tune): Likewise.
3271 (thunderx2t99_prefetch_tune): Likewise.
3272 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
3273 <default_opt_level>: Set to 3.
3274 (aarch64_override_options_internal): Update to set
3275 PARAM_PREFETCH_MINIMUM_STRIDE.
3276 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
3277 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
3278 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
3279 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
3280 stride is constant and is below the minimum stride threshold.
3282 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3284 * config/arm/arm-cpus.in (mode26): Delete.
3285 (armv4): Delete mode26 reference.
3286 * config/arm/arm.c (arm_configure_build_target): Delete use of
3289 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
3291 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
3293 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
3294 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
3296 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
3297 (floatunsdidf2): Ditto.
3299 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
3301 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
3302 (fixuns_trunc<mode>si2_avx512f): Ditto.
3303 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
3304 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
3305 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
3307 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
3309 PR rtl-optimization/79985
3310 * df-scan.c (df_insn_refs_collect): Remove special case for
3311 global registers and asm statements.
3313 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
3315 * extend.texi (Global Register Variables): Rewrite the bullet list.
3316 Note that the register is available for allocation. Note that access
3317 via inline asm must use constraints. Add note about async-signal
3318 handlers. Remove paragraph about automagic register selection.
3320 2018-05-23 Richard Biener <rguenther@suse.de>
3322 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
3323 of fixed offset from memset VN.
3325 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
3327 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
3329 (alloc_cand_and_find_basis): Initialize first_interp field.
3330 (slsr_process_mul): Modify first_interp field.
3331 (slsr_process_add): Likewise.
3332 (slsr_process_cast): Modify first_interp field for each new
3334 (slsr_process_copy): Likewise.
3335 (dump_candidate): Dump first_interp field.
3336 (replace_mult_candidate): Process all interpretations, not just
3338 (replace_rhs_if_not_dup): Likewise.
3339 (replace_one_candidate): Likewise.
3341 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
3343 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
3345 (aarch64_needs_frame_chain): New function.
3346 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
3348 2018-05-23 Sudakshina Das <sudi.das@arm.com>
3351 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
3352 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
3353 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
3354 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
3355 as true for strict-align.
3356 (aarch64_can_inline_p): Perform checks even when callee has no
3357 attributes to check for strict alignment.
3358 * doc/extend.texi (AArch64 Function Attributes): Document
3360 * doc/invoke.texi: (AArch64 Options): Likewise.
3362 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
3364 PR tree-optimization/85853
3365 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
3366 the handling of the root of the node to...
3367 (vect_slp_analyze_node_operations_1): ...this new function,
3368 and run the whole thing with the child nodes' def types
3369 set according to their SLP node's def type.
3371 2018-05-23 Richard Biener <rguenther@suse.de>
3374 * tree-data-ref.c (create_runtime_alias_checks): Defer
3375 and ignore overflow warnings.
3377 2018-05-23 Yury Gribov <tetra2005@gmail.com>
3379 PR tree-optimization/85822
3380 * tree-vrp.c (is_masked_range_test): Fix handling of negative
3383 2018-05-23 Richard Biener <rguenther@suse.de>
3385 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
3386 memset constants via native_interpret_expr.
3388 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
3391 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
3393 (cgraph_node::create_alias): Likewise.
3394 (cgraph_node::get_availability): Check ifunc_resolver instead
3395 of looking up ifunc attribute.
3396 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
3397 * varasm.c (do_assemble_alias): Likewise.
3398 (assemble_alias): Likewise.
3399 (default_binds_local_p_3): Likewise.
3400 * cgraph.h (cgraph_node): Add ifunc_resolver.
3401 (cgraph_node::only_called_directly_or_aliased_p): Return false
3403 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
3405 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
3406 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
3407 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
3408 instead of looking up ifunc attribute.
3410 2018-05-22 Luis Machado <luis.machado@linaro.org>
3412 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
3414 2018-05-22 Martin Sebor <msebor@redhat.com>
3417 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
3418 only when expasion succeeds.
3419 (expand_builtin_strcmp): Same.
3420 (expand_builtin_strncmp): Same.
3422 2018-05-22 Martin Sebor <msebor@redhat.com>
3424 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
3426 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
3427 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3429 * config/aarch64/aarch64-ldpstp.md: Replace uses of
3430 aarch64_mem_pair_operand with memory_operand and delete operand swapping
3432 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
3433 Add check for legitimate_address.
3434 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
3435 (aarch64_swap_ldrstr_operands): New.
3436 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
3439 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
3440 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3442 * config/aarch64/aarch64.md: New patterns to generate stp
3444 (store_pair_sw, store_pair_dw): New patterns to generate stp for
3445 single words and double words.
3446 (load_pair_sw, load_pair_dw): Likewise.
3447 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
3449 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
3451 * config/aarch64/aarch64-ldpstp.md: Modify peephole
3452 for different mode ldpstp and add peephole for merged zero stores.
3454 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
3456 (aarch64_gen_store_pair): Rename calls to match new patterns.
3457 (aarch64_gen_load_pair): Rename calls to match new patterns.
3458 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
3459 (load_pair<DREG:mode><DREG2:mode>): ... This.
3460 (store_pair<mode>): Rename to...
3461 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
3462 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
3464 (V_INT_EQUIV): Handle SImode.
3465 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
3468 2018-05-22 Martin Sebor <msebor@redhat.com>
3471 * calls.c (maybe_warn_nonstring_arg): Use string length to set
3472 or ajust the presumed bound on an operation to avoid unnecessary
3475 2018-05-22 Martin Sebor <msebor@redhat.com>
3477 PR tree-optimization/85826
3478 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
3479 assuming that a DECL necesarily has a constant size.
3481 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
3484 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
3486 2018-05-22 Richard Biener <rguenther@suse.de>
3488 PR tree-optimization/85834
3489 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
3490 non-constant and non-zero memset arguments.
3492 2018-05-22 Martin Liska <mliska@suse.cz>
3495 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
3497 2018-05-22 Richard Biener <rguenther@suse.de>
3499 PR tree-optimization/85863
3500 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
3501 comparisons when vectype is specified.
3502 (vectorizable_condition): Do not specify vectype for
3503 vect_is_simple_cond when SLP vectorizing.
3505 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
3508 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
3509 define __ibm128 as long double.
3510 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
3511 as a distinct type when IEEE 128-bit support is enabled.
3512 (init_float128_ieee): Fix up conversions between IFmode and IEEE
3513 128-bit types to use the correct functions.
3514 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
3515 convert between 128-bit floating point types that have different
3516 modes but the same representation, instead of using gen_lowpart to
3518 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
3520 (IFKF_reg): New attributes to give the register constraints for
3522 (extend<mode>tf2_internal): New insns to mark an explicit
3523 conversion between 128-bit floating point types that have a
3524 different mode but share the same representation.
3526 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
3528 PR tree-optimization/85814
3529 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
3530 a null return from get_strinfo when unsharing the next
3531 strinfo in the chain.
3533 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
3536 * varasm.c (weak_finish): Clean up weak_decls.
3538 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3540 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
3541 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
3542 UNSPEC_UADALP values.
3543 * config/aarch64/iterators.md (ABAL): New int iterator.
3546 (sur): Add mappings for the above.
3547 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
3549 (aarch64_<sur>abal<mode>_4): Likewise.
3550 (aarch64_<sur>adalp<mode>_3): Likewise.
3551 (<sur>sadv16qi): New define_expand.
3553 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
3555 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
3556 (*movdf_internal): Ditto.
3557 (*rcpsf2_sse): Ditto.
3558 (*rsqrtsf2_sse): Ditto.
3559 (*sqrt<mode>2_sse): Ditto.
3561 2018-05-21 Tamar Christina <tamar.christina@arm.com>
3563 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
3565 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
3566 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
3567 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
3568 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
3570 * config/aarch64/arm_neon.h: Likewise.
3571 * config/aarch64/iterators.md (VQ_I): New.
3573 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
3575 * config.gcc: Add arc/t-multilib-linux to tmake_file for
3577 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
3580 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
3582 * config/nds32/constraints.md (S): New constraint.
3583 * config/nds32/nds32.md (call_internal): Use constraint S.
3584 (call_value_internal): Likewise.
3585 (sibcall_internal): Likewise.
3586 (sibcall_value_internal): Likewise.
3588 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
3589 Chung-Ju Wu <jasonwucj@gmail.com>
3591 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
3594 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
3595 Chung-Ju Wu <jasonwucj@gmail.com>
3597 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
3598 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
3599 (nds32_rtx_costs_impl): Simplify.
3600 (nds32_address_cost_impl): Simplify.
3601 (nds32_init_rtx_costs): New function.
3602 (nds32_rtx_costs_speed_prefer): Likewise.
3603 (nds32_rtx_costs_size_prefer): Likewise.
3604 (nds32_address_cost_speed_prefer): Likewise.
3605 (nds32_address_cost_speed_fwprop): Likewise.
3606 (nds32_address_cost_size_prefer): Likewise.
3607 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
3608 * config/nds32/nds32.c (nds32_option_override): Use
3609 nds32_init_rtx_costs function.
3611 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
3613 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
3614 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
3615 (TARGET_PIPELINE_N8): Likewise.
3616 (TARGET_PIPELINE_N10): Likewise.
3617 (TARGET_PIPELINE_N13): Likewise.
3618 (TARGET_PIPELINE_GRAYWOLF): Likewise.
3620 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
3622 * config/nds32/nds32-fpu.md: Update copyright year.
3624 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
3626 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
3628 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
3630 * config/nds32/nds32.c
3631 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
3632 * config/nds32/nds32.opt (minline-asm-r15): New option.
3634 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
3636 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
3638 * config/nds32/nds32.md (abssi2): New pattern.
3640 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
3642 * config/i386/i386.md (rex64namesuffix): New mode attribute.
3643 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
3644 Merge insn pattern from sse_cvtsi2ss<round_name> and
3645 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
3646 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
3647 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
3648 using SWI48 mode iterator.
3649 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
3650 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
3651 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
3652 pattern from sse_cvttss2si<round_saeonly_name>
3653 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
3654 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
3655 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
3656 using SWI48 mode iterator.
3657 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
3658 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
3659 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
3660 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
3661 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
3662 using SWI48 mode iterator.
3663 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
3664 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
3665 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
3666 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
3667 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
3668 SWI48 mode iterator.
3669 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
3670 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
3671 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
3672 pattern from sse_cvttsd2si<round_saeonly_name>
3673 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
3675 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
3677 * config/nds32/nds32-md-auxiliary.c
3678 (nds32_valid_smw_lwm_base_p): Refine.
3679 (nds32_output_smw_single_word): Refine.
3680 (nds32_output_smw_double_word): New.
3681 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
3683 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
3685 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
3686 (nds32_output_stack_pop): Refine.
3687 (nds32_expand_unaligned_load): Refine.
3688 (nds32_expand_unaligned_store): Refine.
3690 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3691 Chung-Ju Wu <jasonwucj@gmail.com>
3693 * config/nds32/constants.md: Add TP_REGNUM constant.
3694 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
3695 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
3697 * config/nds32/nds32-doubleword.md: Consider flag_pic.
3698 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
3699 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
3700 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
3701 and PIC code generation.
3702 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
3704 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
3706 * config/nds32/nds32.md: Support TLS and PIC.
3707 * config/nds32/nds32.c: Support TLS and PIC.
3708 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
3709 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
3712 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
3714 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
3715 mode with E_ prefix.
3717 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3718 Chung-Ju Wu <jasonwucj@gmail.com>
3720 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
3721 * config/nds32/nds32-md-auxiliary.c
3722 (symbolic_reference_mentioned_p): New.
3723 (nds32_legitimize_ict_address): New.
3724 (nds32_expand_ict_move): New.
3725 (nds32_indirect_call_referenced_p): New.
3726 (nds32_symbol_binds_local_p): Delete.
3727 (nds32_long_call_p): Modify.
3728 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
3729 * config/nds32/nds32-protos.h
3730 (symbolic_reference_mentioned_p): Declare.
3731 (nds32_legitimize_ict_address): Declare.
3732 (nds32_expand_ict_move): Declare.
3733 (nds32_indirect_call_referenced_p): Declare.
3734 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
3735 (nds32_relax_group): Use nds32_ict_const_p as condition.
3736 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
3737 (nds32_asm_file_start): Output ict_model directive in asm code.
3738 (nds32_legitimate_address_p): Consider indirect call.
3739 (nds32_print_operand): Consider indirect call.
3740 (nds32_print_operand_address): Consider indirect call.
3741 (nds32_insert_attributes): Handle "indirect_call" attribute.
3742 (TARGET_LEGITIMATE_ADDRESS_P): Define.
3743 (TARGET_LEGITIMATE_CONSTANT_P): Define.
3744 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
3745 (TARGET_DELEGITIMIZE_ADDRESS): Define.
3746 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
3747 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
3748 (TARGET_ICT_MODEL_SMALL): Define.
3749 (TARGET_ICT_MODEL_LARGE): Define.
3750 * config/nds32/nds32.md (movsi): Consider ict model.
3751 (call, call_value): Consider ict model.
3752 (sibcall, sibcall_value): Consider ict model.
3753 * config/nds32/nds32.opt (mict-model): New option.
3754 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
3757 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
3758 Monk Chiang <sh.chiang04@gmail.com>
3759 Jim Wilson <jimw@sifive.com>
3761 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
3762 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
3763 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
3764 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
3765 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
3766 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
3767 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
3768 compute save_libcall_adjustment properly.
3769 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
3770 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
3771 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
3772 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
3773 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
3774 (ABI_SPEC): Handle mabi=ilp32e.
3775 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
3776 (RVE): Add RVE mask.
3777 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
3778 <-march>: Add rv32e as an example.
3780 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
3783 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
3784 (intra_create_variable_infos): Handle C++ constructors.
3786 2018-05-18 Martin Liska <mliska@suse.cz>
3788 * passes.def: Remove a redundant pass.
3790 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
3793 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
3795 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3797 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
3799 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
3801 (armv2, armv2a, armv3, armv3m): Delete architectures.
3802 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
3803 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
3804 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
3806 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
3807 (*mulsidi3adddi): Likewise.
3808 (mulsidi3): Likewise.
3809 (*mulsidi3_nov6): Likewise.
3810 (umulsidi3): Likewise.
3811 (umulsidi3_nov6): Likewise.
3812 (umaddsidi4): Likewise.
3813 (*umulsidi3adddi): Likewise.
3814 (smulsi3_highpart): Likewise.
3815 (*smulsi3_highpart_nov6): Likewise.
3816 (umulsi3_highpart): Likewise.
3817 (*umulsi3_highpart_nov6): Likewise.
3818 * config/arm/arm.h (arm_arch3m): Delete.
3819 * config/arm/arm.c (arm_arch3m): Delete.
3820 (arm_option_override_internal): Update armv3-related comment.
3821 (arm_configure_build_target): Delete use of isa_bit_mode32.
3822 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
3823 (arm_rtx_costs_internal): Delete check of arm_arch3m.
3824 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
3826 (mulusa3): Likewise.
3827 * config/arm/arm-protos.h (arm_arch3m): Delete.
3828 * config/arm/arm-tables.opt: Regenerate.
3829 * config/arm/arm-tune.md: Likewise.
3830 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
3831 deleted architectures.
3833 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3835 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
3836 (armv5t, armv5te): New features.
3837 (ARMv5, ARMv5e): Delete fgroups.
3838 (ARMv5t, ARMv5te): Adjust for above changes.
3840 (armv5, armv5e): Delete arches.
3841 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
3843 (*call_reg_arm): Likewise.
3844 (*call_value_reg_armv5): Likewise.
3845 (*call_value_reg_arm): Likewise.
3846 (*call_symbol): Likewise.
3847 (*call_value_symbol): Likewise.
3848 (*sibcall_insn): Likewise.
3849 (*sibcall_value_insn): Likewise.
3851 (prefetch): Likewise.
3852 (define_split and define_peephole2 dependent on arm_arch5):
3854 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
3856 (TARGET_ARM_QBIT): Likewise.
3857 (TARGET_DSP_MULTIPLY): Likewise.
3858 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
3859 (arm_arch5, arm_arch5e): Delete.
3860 (arm_arch5t, arm_arch5te): Declare.
3861 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
3862 (arm_arch5t): Declare.
3863 (arm_option_reconfigure_globals): Update for the above.
3864 (arm_options_perform_arch_sanity_checks): Update comment, replace
3865 use of arm_arch5 with arm_arch5t.
3866 (use_return_insn): Likewise.
3867 (arm_emit_call_insn): Likewise.
3868 (output_return_instruction): Likewise.
3869 (arm_final_prescan_insn): Likewise.
3870 (arm_coproc_builtin_available): Likewise.
3871 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
3872 arm_arch5e with arm_arch5t and arm_arch5te.
3873 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
3874 (arm_arch5t, arm_arch5te): Declare.
3875 * config/arm/arm-tables.opt: Regenerate.
3876 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
3877 * config/arm/t-multilib: Likewise.
3878 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
3879 instead of arm_arch5.
3880 (*call_reg_thumb1): Likewise.
3881 (*call_value_reg_thumb1_v5): Likewise.
3882 (*call_value_reg_thumb1): Likewise.
3883 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
3885 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
3887 2018-05-18 Martin Liska <mliska@suse.cz>
3889 PR gcov-profile/84846
3890 * doc/gcov.texi: Document -t option of gcov tool.
3892 2018-05-18 Martin Liska <mliska@suse.cz>
3894 PR gcov-profile/84846
3895 * gcov.c (print_usage): Add new -t option.
3896 (process_args): Handle the option.
3897 (generate_results): Use stdout as output when requested by
3900 2018-05-18 Martin Liska <mliska@suse.cz>
3902 PR gcov-profile/84846
3903 * coverage.c (coverage_init): Write PWD to .gcno file.
3904 * doc/gcov.texi: Document how working directory is printed.
3905 * gcov-dump.c (dump_gcov_file): Print PWD.
3906 * gcov.c (output_intermediate_file): Likewise.
3907 (read_graph_file): Read PWD string.
3908 (output_lines): Print PWD.
3910 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3913 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
3914 for retval and return false if all args to phi are zero.
3916 2018-05-18 Richard Biener <rguenther@suse.de>
3918 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
3920 (evrp_dom_walker::before_dom_children): Call it.
3922 2018-05-18 Richard Biener <rguenther@suse.de>
3924 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
3925 results when processing array refs with variable index.
3927 2018-05-18 Toon Moene <toon@moene.org>
3929 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
3930 directly after that of -floop-interchange. Indicate that both
3931 options are enabled by default when specifying -O3.
3933 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3935 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
3936 iterator. Delete separate integer-mode vec_set<mode> expander.
3937 (aarch64_simd_vec_setv2di): Delete.
3938 (vec_setv2di): Delete.
3939 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
3940 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
3941 the "w, r" alternative.
3943 2018-05-18 Martin Liska <mliska@suse.cz>
3945 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
3946 * tree-pass.h (make_pass_lower_switch_O0): New function.
3947 * tree-switch-conversion.c (node_has_low_bound): Remove.
3948 (node_has_high_bound): Likewise.
3949 (node_is_bounded): Likewise.
3950 (class pass_lower_switch): Make it a template type and create
3952 (pass_lower_switch::execute): Add template argument.
3953 (make_pass_lower_switch): New function.
3954 (make_pass_lower_switch_O0): New function.
3955 (do_jump_if_equal): Remove.
3956 (emit_case_nodes): Simplify to just handle all 3 cases and leave
3957 all the hard work to tree optimization passes.
3959 2018-05-18 Martin Liska <mliska@suse.cz>
3961 * dbgcnt.c (limit_low): Renamed from limit.
3962 (limit_high): New variable.
3963 (dbg_cnt_is_enabled): Check for upper limit.
3964 (dbg_cnt): Adjust dumping.
3965 (dbg_cnt_set_limit_by_index): Add new argument for high
3967 (dbg_cnt_set_limit_by_name): Likewise.
3968 (dbg_cnt_process_single_pair): Parse new format.
3969 (dbg_cnt_process_opt): Use strtok.
3970 (dbg_cnt_list_all_counters): Remove 'value' and add
3972 * doc/invoke.texi: Document changes.
3974 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
3976 * doc/sourcebuild.texi (scalar_all_fma): Document.
3977 * tree.def (FMA_EXPR): Delete.
3978 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
3979 * internal-fn.c (ternary_direct): New macro.
3980 (expand_ternary_optab_fn): Likewise.
3981 (direct_ternary_optab_supported_p): Likewise.
3982 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
3983 * builtins.c (fold_builtin_fma): Delete.
3984 (fold_builtin_3): Don't call it.
3985 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
3986 * expr.c (expand_expr_real_2): Likewise.
3987 * fold-const.c (operand_equal_p): Likewise.
3988 (fold_ternary_loc): Likewise.
3989 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
3990 * gimple.c (DEFTREECODE): Likewise.
3991 * gimplify.c (gimplify_expr): Likewise.
3992 * optabs-tree.c (optab_for_tree_code): Likewise.
3993 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
3994 * tree-eh.c (operation_could_trap_p): Likewise.
3995 (stmt_could_throw_1_p): Likewise.
3996 * tree-inline.c (estimate_operator_cost): Likewise.
3997 * tree-pretty-print.c (dump_generic_node): Likewise.
3998 (op_code_prio): Likewise.
3999 * tree-ssa-loop-im.c (stmt_cost): Likewise.
4000 * tree-ssa-operands.c (get_expr_operands): Likewise.
4001 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
4002 * fold-const-call.h (fold_fma): Delete.
4003 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
4004 CFN_FNMA and CFN_FNMS.
4006 * genmatch.c (combined_fn): New enum.
4007 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
4008 (commutative_op): New function.
4009 (commutate): Use it. Handle more than 2 operands.
4010 (dt_operand::gen_gimple_expr): Use commutative_op.
4011 (parser::parse_expr): Allow :c to be used with non-binary
4012 operators if the commutative operand is known.
4013 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
4014 CFN_FMS, CFN_FNMA and CFN_FNMS.
4015 (backprop::process_assign_use): Remove FMA_EXPR handling.
4016 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
4017 (gen_hsa_fma): New function.
4018 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
4019 IFN_FNMA and IFN_FNMS.
4020 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
4021 * gimple-fold.h (follow_all_ssa_edges): Declare.
4022 * gimple-fold.c (follow_all_ssa_edges): New function.
4023 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
4024 gimple_build interface and use follow_all_ssa_edges to fold the result.
4025 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
4026 instead of checking for optabs directly.
4027 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
4028 rather than FMA_EXPRs.
4029 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
4030 call to IFN_FMA instead of an FMA_EXPR.
4032 2018-05-17 Jim Wilson <jimw@sifive.com>
4034 * expr.c (do_tablejump): When converting index to Pmode, if we have a
4035 sign extended promoted subreg, and the range does not have the sign bit
4036 set, then do a sign extend.
4038 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
4039 test, check for sign extended subreg and/or constant operands, and
4040 do a sign extend in that case.
4042 2018-05-17 Steve Ellcey <sellcey@cavium.com>
4044 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
4045 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
4047 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
4048 Change logics_shift_reg to logics_shift_imm.
4049 (thunderx2t99_fp_loadpair_basic): Delete.
4050 (thunderx2t99_fp_storepair_basic): Delete.
4051 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
4052 (thunderx2t99_asimd_polynomial): Delete.
4053 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
4054 and neon_fp_mul_d_scalar_q.
4055 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
4056 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
4057 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
4058 (thunderx2t99_asimd_lut): Add missing tbl types.
4059 (thunderx2t99_asimd_ext): Delete.
4060 (thunderx2t99_asimd_load1_1_mult): Delete.
4061 (thunderx2t99_asimd_load1_2_mult): Delete.
4062 (thunderx2t99_asimd_load1_ldp): New.
4063 (thunderx2t99_asimd_load1): New.
4064 (thunderx2t99_asimd_load2): Add missing *load2* types.
4065 (thunderx2t99_asimd_load3): New.
4066 (thunderx2t99_asimd_load4): New.
4067 (thunderx2t99_asimd_store1_1_mult): Delete.
4068 (thunderx2t99_asimd_store1_2_mult): Delete.
4069 (thunderx2t99_asimd_store2_mult): Delete.
4070 (thunderx2t99_asimd_store2_onelane): Delete.
4071 (thunderx2t99_asimd_store_stp): New.
4072 (thunderx2t99_asimd_store1): New.
4073 (thunderx2t99_asimd_store2): New.
4074 (thunderx2t99_asimd_store3): New.
4075 (thunderx2t99_asimd_store4): New.
4077 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
4079 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
4080 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
4082 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
4083 Segher Boessenkool <segher@kernel.crashing.org>
4086 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
4089 2018-05-17 Richard Biener <rguenther@suse.de>
4091 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
4092 for pruning loop and prune defs feeding only already visited PHIs.
4094 2018-05-17 Richard Biener <rguenther@suse.de>
4096 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
4098 2018-05-17 Bin Cheng <bin.cheng@arm.com>
4099 Richard Biener <rguenther@suse.de>
4101 PR tree-optimization/85793
4102 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
4103 for VMAT_ELEMENTWISE.
4105 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
4107 * internal-fn.h (lookup_internal_fn): Declare
4108 * internal-fn.c (lookup_internal_fn): New function.
4109 * gimple.c (gimple_build_call_from_tree): Handle calls to
4111 * gimple-pretty-print.c (dump_gimple_call): Print "." before
4112 internal function names.
4113 * tree-pretty-print.c (dump_generic_node): Likewise.
4114 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
4116 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
4118 * gimple-fold.h (gimple_build): Make the function forms take
4119 combined_fn rather than built_in_function.
4120 (gimple_simplify): Likewise.
4121 * gimple-match-head.c (gimple_simplify): Likewise.
4122 * gimple-fold.c (gimple_build): Likewise.
4123 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
4124 rather than gimple_build_call_internal.
4125 (get_initial_defs_for_reduction): Likewise.
4126 (vect_create_epilog_for_reduction): Likewise.
4127 (vectorizable_live_operation): Likewise.
4129 2018-05-17 Martin Liska <mliska@suse.cz>
4131 * gimple-ssa-sprintf.c (format_directive): Do not use
4132 space in between 'G_' and '('.
4134 2018-05-17 Jakub Jelinek <jakub@redhat.com>
4137 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
4138 even if the mask is not all ones.
4141 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
4143 (ix86_gimple_fold_builtin): Likewise.
4146 * config/i386/i386.c: Include tree-vector-builder.h.
4147 (ix86_vector_shift_count): New function.
4148 (ix86_fold_builtin): Fold shift builtins by scalar count.
4149 (ix86_gimple_fold_builtin): Likewise.
4151 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
4152 _mm512_setzero): New intrinsics.
4154 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4155 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4157 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
4158 code generation for cases where splatting a value is not useful.
4159 * simplify-rtx.c (simplify_ternary_operation): Simplify
4160 vec_merge across a vec_duplicate and a paradoxical subreg forming
4161 a vector mode to a vec_concat.
4163 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
4165 * config.gcc: Support "goldmont-plus".
4166 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
4168 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4169 PROCESSOR_GOLDMONT_PLUS.
4170 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
4171 (processor_target_table): Add "goldmont-plus".
4172 (PTA_GOLDMONT_PLUS): Define.
4173 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
4174 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
4175 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
4176 (fold_builtin_cpu): Add "goldmont-plus".
4177 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
4178 (ix86_option_override_internal): Add "goldmont-plus".
4179 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
4180 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
4181 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
4182 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
4184 2018-05-17 Richard Biener <rguenther@suse.de>
4186 PR tree-optimization/85757
4187 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
4188 remove defs that only feed that PHI from further processing.
4190 2018-05-16 Jim Wilson <jimw@sifive.com>
4192 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
4194 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
4196 2018-05-16 Mark Wielaard <mark@klomp.org>
4198 * dwarf2out.c (count_index_strings): New function.
4199 (output_indirect_strings): Call count_index_strings and generate
4200 header for dwarf_version >= 5.
4202 2018-05-16 Mark Wielaard <mark@klomp.org>
4204 * dwarf2out.c (dwarf_FORM): New function.
4205 (set_indirect_string): Use dwarf_FORM.
4206 (reset_indirect_string): Likewise.
4207 (size_of_die): Likewise.
4208 (value_format): Likewise.
4209 (output_die): Likewise.
4210 (add_skeleton_AT_string): Likewise.
4211 (output_macinfo_op): Likewise.
4212 (index_string): Likewise.
4213 (output_index_string_offset): Likewise.
4214 (output_index_string): Likewise.
4215 (count_index_strings): Likewise.
4217 2018-05-16 Carl Love <cel@us.ibm.com>
4219 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
4220 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
4222 2018-05-16 Martin Jambor <mjambor@suse.cz>
4224 * ipa-prop.c (ipa_free_all_edge_args): Remove.
4225 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
4227 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
4229 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
4230 (fnma<mode>4): Likewise.
4231 (fms<mode>4): Likewise.
4232 (fnms<mode>4): Likewise.
4233 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
4234 (aarch64_fnma<mode>4): Likewise.
4235 (aarch64_fms<mode>4): Likewise.
4236 (aarch64_fnms<mode>4): Likewise.
4237 (aarch64_fnmadd<mode>4): Likewise.
4239 2018-05-16 Jason Merrill <jason@redhat.com>
4241 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
4243 2018-05-16 Richard Biener <rguenther@suse.de>
4245 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
4246 (dump_stmt_cost): Declare.
4247 (add_stmt_cost): Dump cost we add.
4248 (add_stmt_costs): New function.
4249 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
4251 (vect_analyze_stmt): Adjust prototype.
4252 (vectorizable_condition): Likewise.
4253 (vectorizable_live_operation): Likewise.
4254 (vectorizable_reduction): Likewise.
4255 (vectorizable_induction): Likewise.
4256 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
4257 cost vector to pass to vectorizable_ and record afterwards.
4258 (vect_model_reduction_cost): Take cost vector argument and adjust.
4259 (vect_model_induction_cost): Likewise.
4260 (vectorizable_reduction): Likewise.
4261 (vectorizable_induction): Likewise.
4262 (vectorizable_live_operation): Likewise.
4263 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
4264 SLP_TREE_NUMBER_OF_VEC_STMTS.
4265 (vect_analyze_slp_cost_1): Remove.
4266 (vect_analyze_slp_cost): Likewise.
4267 (vect_slp_analyze_node_operations): Take visited args and
4268 a target cost vector. Avoid processing already visited stmt sets.
4269 (vect_slp_analyze_operations): Use a local cost vector to gather
4270 costs and register those of non-discarded instances.
4271 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
4272 (vect_schedule_slp_instance): Remove copying of
4273 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
4275 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
4276 adding cost. Record cost entry location.
4277 (vect_prologue_cost_for_slp_op): Function to compute cost of
4278 a constant or invariant generated for SLP vect in the prologue,
4279 split out from vect_analyze_slp_cost_1.
4280 (vect_model_simple_cost): Make static. Adjust for SLP costing.
4281 (vect_model_promotion_demotion_cost): Likewise.
4282 (vect_model_store_cost): Likewise, make static.
4283 (vect_model_load_cost): Likewise.
4284 (vectorizable_bswap): Add cost vector arg and adjust.
4285 (vectorizable_call): Likewise.
4286 (vectorizable_simd_clone_call): Likewise.
4287 (vectorizable_conversion): Likewise.
4288 (vectorizable_assignment): Likewise.
4289 (vectorizable_shift): Likewise.
4290 (vectorizable_operation): Likewise.
4291 (vectorizable_store): Likewise.
4292 (vectorizable_load): Likewise.
4293 (vectorizable_condition): Likewise.
4294 (vectorizable_comparison): Likewise.
4295 (can_vectorize_live_stmts): Likewise.
4296 (vect_analyze_stmt): Likewise.
4297 (vect_transform_stmt): Adjust calls to vectorizable_*.
4298 * tree-vectorizer.c: Include gimple-pretty-print.h.
4299 (dump_stmt_cost): New function.
4301 2018-05-16 Richard Biener <rguenther@suse.de>
4303 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
4304 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
4305 * tree-ssa-dse.c: Include tree-ssa-loop.h.
4306 (check_name): New callback.
4307 (dse_classify_store): Track cycles via a visited bitmap of PHI
4308 defs and simplify handling of in-loop and across loop dead stores
4309 and properly fail for loop-variant refs. Handle byte-tracking with
4310 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
4313 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
4315 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
4316 (vect_get_mask_type_for_stmt): Likewise.
4317 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
4319 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
4320 to determine the statement's vector type and the vector type that
4321 should be used for calculating nunits. Deal with cases in which
4322 the type has to be deferred.
4323 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
4324 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
4325 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
4326 (vect_determine_vf_for_stmt): New functions, split out from...
4327 (vect_determine_vectorization_factor): ...here.
4328 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
4329 (vect_get_mask_type_for_stmt): New functions, split out from
4330 vect_determine_vectorization_factor.
4332 2018-05-16 Richard Biener <rguenther@suse.de>
4334 * tree-cfg.c (verify_gimple_assign_ternary): Properly
4335 verify the [VEC_]COND_EXPR embedded comparison.
4337 2018-05-15 Martin Sebor <msebor@redhat.com>
4339 PR tree-optimization/85753
4340 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
4341 RECORD_TYPE in addition to ARRAY_TYPE.
4343 2018-05-15 Martin Sebor <msebor@redhat.com>
4346 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
4348 2018-05-15 Richard Biener <rguenther@suse.de>
4350 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
4351 add by_clobber_p one. Change algorithm to collect all defs
4352 representing uses we need to walk and try reducing them to
4353 a single one before failing.
4354 (dse_dom_walker::dse_optimize_stmt): Adjust.
4356 2018-05-13 Mark Wielaard <mark@klomp.org>
4358 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
4359 (size_of_loc_descr): Likewise.
4360 (output_loc_operands): Likewise.
4361 (output_loc_operands_raw): Likewise.
4362 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
4363 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
4364 (hash_loc_operands): Likewise.
4365 (compare_loc_operands): Likewise.
4367 2018-05-14 Mark Wielaard <mark@klomp.org>
4369 * dwarf2out.c (count_index_addrs): New function.
4370 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
4372 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4374 PR tree-optimization/83648
4375 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
4376 return value as malloc candidate.
4378 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4381 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
4382 param as true in call to suggest_attribute.
4384 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
4386 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
4387 -mreadonly-in-sdata.
4389 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4391 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
4393 (aarch64_crypto_aesd_fused): Likewise.
4395 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
4397 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
4398 (movsi_aarch64): Likewise.
4399 (load_pairsi): Likewise.
4400 (load_pairdi): Likewise.
4401 (store_pairsi): Likewise.
4402 (store_pairdi): Likewise.
4403 (load_pairsf): Likewise.
4404 (load_pairdf): Likewise.
4405 (store_pairsf): Likewise.
4406 (store_pairdf): Likewise.
4407 (zero_extend): Likewise.
4408 (trunc): Swap alternatives.
4409 (fcvt_target): Add '?' to prefer w over r.
4411 2018-05-14 Jakub Jelinek <jakub@redhat.com>
4414 * config/i386/i386.md: Disallow non-commutative arithmetics in
4415 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
4416 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
4417 in the peephole2 before it.
4419 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
4421 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
4422 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
4423 (ix86_handle_option): Handle -mcldemote.
4424 * config.gcc: New header.
4425 * config/i386/cldemoteintrin.h: New file.
4426 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
4427 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
4429 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4430 OPTION_MASK_ISA_CLDEMOTE.
4431 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
4432 (ix86_valid_target_attribute_inner_p): Ditto.
4433 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
4434 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
4435 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
4436 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
4437 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
4439 * config/i386/i386.opt: Add -mcldemote.
4440 * config/i386/x86intrin.h: New header.
4441 * doc/invoke.texi: Add -mcldemote.
4443 2018-05-14 Richard Biener <rguenther@suse.de>
4445 * doc/match-and-simplify.texi: Adjust :s documentation.
4447 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
4449 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
4450 intended memcpy size.
4451 (REORDER_45): Likewise.
4453 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
4455 * sort.cc: New file.
4456 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
4457 * vec.c (qsort_chk): Use gcc_qsort.
4458 * Makefile.in (OBJS-libcommon): Add sort.o.
4459 (build/sort.o): New target. Use it...
4460 (BUILD_RTL): ... here, and...
4461 (build/gencfn-macros): ... here, and...
4462 (build/genmatch): ... here.
4464 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
4465 Chung-Ju Wu <jasonwucj@gmail.com>
4467 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
4468 * config/nds32/nds32-graywolf.md: New file.
4469 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
4470 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
4472 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
4473 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
4474 * config/nds32/nds32.md (pipeline_model): Add graywolf.
4475 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
4476 * config/nds32/pipelines.md: Include n15 settings.
4478 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
4479 Chung-Ju Wu <jasonwucj@gmail.com>
4481 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
4482 * config/nds32/nds32-n13.md: New file.
4483 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
4484 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
4486 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
4487 * config/nds32/nds32.md (pipeline_model): Add n13.
4488 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
4489 * config/nds32/pipelines.md: Include n13 settings.
4491 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
4492 Chung-Ju Wu <jasonwucj@gmail.com>
4494 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
4495 * config/nds32/nds32-n10.md: New file.
4496 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
4497 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
4499 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
4500 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
4501 * config/nds32/nds32.md (pipeline_model): Add n10.
4502 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
4503 * config/nds32/pipelines.md: Include n10 settings.
4505 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
4506 Kito Cheng <kito.cheng@gmail.com>
4507 Chung-Ju Wu <jasonwucj@gmail.com>
4509 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
4510 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4511 Add enum values for DSP extension instructions.
4512 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
4514 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
4515 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
4517 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
4518 * config/nds32/nds32-dspext.md: New file for DSP implementation.
4519 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
4520 * config/nds32/nds32-intrinsic.md: Likewise.
4521 * config/nds32/nds32_intrinsic.h: Likewise.
4522 * config/nds32/nds32-md-auxiliary.c: Likewise.
4523 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
4524 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
4525 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
4526 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
4527 * config/nds32/nds32-protos.h: New declarations for DSP extension.
4528 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
4529 TYPE_DMAC in switch statement.
4530 * config/nds32/nds32.c: New checking and implementation for DSP
4531 extension instructions.
4532 * config/nds32/nds32.h: Likewise.
4533 * config/nds32/nds32.md: Likewise.
4534 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
4535 * config/nds32/predicates.md: Implement new predicates for DSP
4538 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
4540 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
4541 Reformat alternatives and attributes so it is easier to identify
4542 which constraints/attributes go with which instruction.
4543 (mov<mode>_hardfloat32, FMOVE64): Likewise.
4544 (mov<mode>_softfloat32, FMOVE64): Likewise.
4545 (mov<mode>_hardfloat64, FMOVE64): Likewise.
4546 (mov<mode>_softfloat64, FMOVE64): Likewise.
4548 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
4550 * doc/extend.texi (PowerPC Built-in Functions): Rename this
4552 (Basic PowerPC Built-in Functions): The new name of the
4553 subsection previously known as "PowerPC Built-in Functions".
4554 (Basic PowerPC Built-in Functions Available on all Configurations):
4556 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
4557 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
4558 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
4559 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
4561 2018-05-11 Martin Jambor <mjambor@suse.cz>
4564 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
4567 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
4570 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
4572 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
4574 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
4575 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
4576 (ix86_handle_option): Handle -mwaitpkg.
4577 * config.gcc: New header.
4578 * config/i386/cpuid.h (bit_WAITPKG): New bit.
4579 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
4580 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
4582 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4583 OPTION_MASK_ISA_WAITPKG.
4584 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
4585 (ix86_option_override_internal): Add PTA_WAITPKG.
4586 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
4587 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
4588 IX86_BUILTIN_TPAUSE.
4589 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
4590 __builtin_ia32_umwait and __builtin_ia32_tpause.
4591 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
4592 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
4593 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
4594 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
4595 UNSPECV_TPAUSE): New.
4596 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
4597 * config/i386/i386.opt: Add -mwaitpkg.
4598 * config/i386/waitpkgintrin.h: New file.
4599 * config/i386/x86intrin.h: New header.
4600 * doc/invoke.texi: Add -mwaitpkg.
4602 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
4605 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
4607 (cortex-m0): Use armv6s-m isa.
4608 (cortex-m0plus): Likewise.
4609 (cortex-m1): Likewise.
4610 (cortex-m0.small-multiply): Likewise.
4611 (cortex-m0plus.small-multiply): Likewise.
4612 (cortex-m1.small-multiply): Likewise.
4614 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
4615 Jakub Jelinek <jakub@redhat.com>
4617 PR tree-optimization/85692
4618 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
4619 source permute as well.
4621 2018-05-11 Martin Liska <mliska@suse.cz>
4624 * doc/extend.texi: Document LLVM style format for no_sanitize
4627 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
4629 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
4630 mode_supports_vsx_dform_quad to mode_supports_dq_form.
4631 (mode_supports_vsx_dform_quad): Likewise.
4632 (mode_supports_vmx_dform): Move these functions to be next to the
4633 other mode_supports functions.
4634 (mode_supports_dq_form): Likewise.
4635 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
4636 mode_supports_dq_form.
4637 (reg_offset_addressing_ok_p): Likewise.
4638 (offsettable_ok_by_alignment): Likewise.
4639 (rs6000_legitimate_offset_address_p): Likewise.
4640 (legitimate_lo_sum_address_p): Likewise.
4641 (rs6000_legitimize_address): Likewise.
4642 (rs6000_legitimize_reload_address): Likewise.
4643 (rs6000_secondary_reload_inner): Likewise.
4644 (rs6000_preferred_reload_class): Likewise.
4645 (rs6000_output_move_128bit): Likewise.
4647 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
4649 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
4650 Generate SImode target register for null target.
4651 <case IX86_BUILTIN_XGETBV>: Ditto.
4652 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
4653 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
4655 2018-05-10 Carl Love <cel@us.ibm.com>
4657 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
4658 dcbtt and dcbtstt if operands[2] is 0.
4660 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
4663 * config/i386/sse.md (usadv64qi): New expander.
4665 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
4667 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
4668 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
4669 -maltivec=be support.
4670 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
4671 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
4672 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
4673 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
4674 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
4675 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
4676 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
4677 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
4678 altivec_vsumsws): Adjust.
4679 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
4680 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
4681 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
4683 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
4684 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
4685 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
4686 (altivec_lve<VI_char>x): Delete expand.
4687 (*altivec_lve<VI_char>x_internal): Rename to...
4688 (altivec_lve<VI_char>x): ... this.
4689 (altivec_lvxl_<mode>): Delete expand.
4690 (*altivec_lvxl_<mode>_internal): Rename to ...
4691 (altivec_lvxl_<mode>): ... this.
4692 (altivec_stvxl_<mode>): Delete expand.
4693 (*altivec_stvxl_<mode>_internal): Rename to ...
4694 (altivec_stvxl_<mode>): ... this.
4695 (altivec_stve<VI_char>x): Delete expand.
4696 (*altivec_stve<VI_char>x_internal): Rename to ...
4697 (altivec_stve<VI_char>x): ... this.
4698 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
4699 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
4700 reduc_plus_scal_<mode>): Adjust.
4701 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
4703 (rs6000_cpu_cpp_builtins): Adjust.
4704 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
4705 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
4706 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
4707 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
4708 -maltivec=be support.
4709 (rs6000_split_vec_extract_var): Adjust.
4710 (rs6000_split_v4si_init): Adjust.
4711 (swap_selector_for_mode): Delete.
4712 (altivec_expand_lvx_be, altivec_expand_stvx_be,
4713 altivec_expand_stvex_be): Delete.
4714 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
4715 -maltivec=be support.
4716 (rs6000_gimple_fold_builtin): Ditto.
4717 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
4719 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
4720 (TARGET_DIRECT_MOVE_64BIT): Adjust.
4721 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
4722 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
4723 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
4724 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
4725 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
4726 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
4727 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
4728 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
4729 anonymous split): Adjust.
4730 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
4731 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
4733 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4735 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
4736 when --with-gxx-include-dir is also specified.
4737 * configure: Regenerate.
4739 2018-05-09 Jim Wilson <jimw@sifive.com>
4742 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
4743 * config/riscv/t-withmultilib: New.
4744 * config/riscv/withmultilib.h: New.
4745 * doc/install.texi: Document RISC-V --with-multilib-list support.
4747 2018-05-09 Richard Biener <rguenther@suse.de>
4749 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
4751 (vect_bb_vectorization_profitable_p): Adjust. Compute
4752 actual scalar cost using the cost vector and the add_stmt_cost
4755 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
4757 PR rtl-optimization/85645
4758 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
4759 in the REG_CFA_REGISTER note for LR, don't leave it empty.
4761 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
4763 PR rtl-optimization/85645
4764 * shrink-wrap.c (spread_components): Return a boolean saying if
4765 anything was changed.
4766 (try_shrink_wrapping_separate): Iterate spread_components until
4767 nothing changes anymore.
4769 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
4771 PR rtl-optimization/85645
4772 * regrename.c (build_def_use): Also kill the chains that include the
4773 destination of a REG_CFA_REGISTER note.
4775 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
4777 PR rtl-optimization/85645
4778 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
4779 insn that has a REG_CFA_REGISTER note.
4781 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
4783 * cfgexpand.c (expand_clobber): New function.
4784 (expand_gimple_stmt_1): Use it.
4785 * tree-vect-stmts.c (vect_clobber_variable): New function,
4787 (vectorizable_simd_clone_call): ...here.
4788 (vectorizable_store): Emit a clobber either side of an
4789 IFN_STORE_LANES sequence.
4790 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
4792 2018-05-09 Tom de Vries <tom@codesourcery.com>
4795 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
4796 (define_insn "trap_if_false"): Add exit after trap.
4798 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
4800 PR rtl-optimization/85638
4801 * bb-reorder.c: Include common/common-target.h.
4802 (create_forwarder_block): New function extracted from...
4803 (fix_up_crossing_landing_pad): ...here. Rename into...
4804 (dw2_fix_up_crossing_landing_pad): ...this.
4805 (sjlj_fix_up_crossing_landing_pad): New function.
4806 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
4807 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
4808 from both partitions and exit the loop after one iteration.
4810 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
4813 * doc/extend.texi (PowerPC Built-in Functions): Rename this
4815 (Basic PowerPC Built-in Functions): The new name of the
4816 subsection previously known as "PowerPC Built-in Functions".
4817 (Basic PowerPC Built-in Functions Available on all Configurations):
4819 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
4821 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
4823 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
4825 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
4828 2018-05-08 Jim Wilson <jimw@sifive.com>
4830 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
4831 (LD_EMUL_SUFFIX): New.
4832 (LINK_SPEC): Use it.
4834 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
4836 * doc/extend.texi (PowerPC Built-in Functions): Rename this
4838 (Basic PowerPC Built-in Functions): The new name of the
4839 subsection previously known as "PowerPC Built-in Functions".
4840 (Basic PowerPC Built-in Functions Available on all Configurations):
4842 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
4844 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
4846 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
4848 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
4851 2018-05-08 Jakub Jelinek <jakub@redhat.com>
4854 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
4855 after cmpelim optimization.
4857 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
4859 * config.gcc: Support "goldmont".
4860 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
4861 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4863 * config/i386/i386.c (m_GOLDMONT): Define.
4864 (processor_target_table): Add "goldmont".
4865 (PTA_GOLDMONT): Define.
4866 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
4867 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
4868 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
4869 (fold_builtin_cpu): Add "goldmont".
4870 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
4871 (ix86_option_override_internal): Add "goldmont".
4872 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
4873 (processor_type): Add PROCESSOR_GOLDMONT.
4874 * config/i386/i386.md: Add CPU "glm".
4875 * config/i386/glm.md: New file.
4876 * config/i386/x86-tune.def: Add m_GOLDMONT.
4877 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
4879 2018-05-08 Jakub Jelinek <jakub@redhat.com>
4882 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
4884 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
4885 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
4886 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
4889 * config/i386/i386.c (ix86_fold_builtin): Handle
4890 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
4893 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
4894 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
4896 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
4899 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
4900 (check_arch): Likewise.
4901 (check_fpu): Return the result rather than printing it.
4902 (end arch): Fix operator precedence.
4903 (end cpu): Likewise.
4904 (END): Print the result from check_fpu.
4906 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
4907 Alan Hayward <alan.hayward@arm.com>
4908 David Sherwood <david.sherwood@arm.com>
4910 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
4911 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
4912 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
4913 (*fcmuo<mode>_and): New patterns.
4915 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
4917 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
4918 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
4919 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
4920 (cmp_op, sve_imm_con): New code attributes.
4921 (SVE_COND_INT_CMP, imm_con): Delete.
4922 (cmp_op): Remove above unspecs from int attribute.
4923 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
4925 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
4926 comparison-specific unspecs.
4927 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
4928 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
4929 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
4930 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
4931 (*vec_fcm<cmp_op><mode>): Rename to...
4932 (*fcm<cmp_op><mode>): ...this and adjust likewise.
4933 (*vec_fcmuo<mode>): Rename to...
4934 (*fcmuo<mode>): ...this and adjust likewise.
4935 (*pred_fcm<cmp_op><mode>): New pattern.
4936 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
4937 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
4939 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
4941 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
4942 (aarch64_emit_sve_predicated_cond): New function.
4943 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
4944 (aarch64_emit_unspec_cond_or): Replace with...
4945 (aarch64_emit_sve_or_conds): ...this new function. Use
4946 aarch64_emit_sve_ptrue_op for the individual comparisons and
4947 aarch64_emit_binop to OR them together.
4948 (aarch64_emit_inverted_unspec_cond): Replace with...
4949 (aarch64_emit_sve_inverted_cond): ...this new function. Use
4950 aarch64_emit_sve_ptrue_op for the comparison and
4951 aarch64_emit_unop to invert the result.
4952 (aarch64_expand_sve_vec_cmp_float): Update after the above
4953 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
4955 2018-05-07 Nathan Sidwell <nathan@acm.org>
4957 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
4958 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
4959 (Backwards Compatibility): Likewise.
4961 2018-05-07 Luis Machado <luis.machado@linaro.org>
4965 2018-05-07 Luis Machado <luis.machado@linaro.org>
4967 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
4968 <prefetch_dynamic_strides>: New const bool field.
4969 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
4970 prefetch_dynamic_strides.
4971 (exynosm1_prefetch_tune): Likewise.
4972 (thunderxt88_prefetch_tune): Likewise.
4973 (thunderx_prefetch_tune): Likewise.
4974 (thunderx2t99_prefetch_tune): Likewise.
4975 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
4977 (aarch64_override_options_internal): Update to set
4978 PARAM_PREFETCH_DYNAMIC_STRIDES.
4979 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
4980 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
4981 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
4982 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
4983 prefetch-dynamic-strides setting.
4985 2018-05-07 Luis Machado <luis.machado@linaro.org>
4987 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
4988 <minimum_stride>: New const int field.
4989 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
4990 minimum_stride field.
4991 (exynosm1_prefetch_tune): Likewise.
4992 (thunderxt88_prefetch_tune): Likewise.
4993 (thunderx_prefetch_tune): Likewise.
4994 (thunderx2t99_prefetch_tune): Likewise.
4995 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
4996 (aarch64_override_options_internal): Update to set
4997 PARAM_PREFETCH_MINIMUM_STRIDE.
4998 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
4999 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5000 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5001 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5002 stride is constant and is below the minimum stride threshold.
5004 2018-05-07 Luis Machado <luis.machado@linaro.org>
5006 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
5009 2018-05-07 Luis Machado <luis.machado@linaro.org>
5011 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5012 <prefetch_dynamic_strides>: New const bool field.
5013 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5014 prefetch_dynamic_strides.
5015 (exynosm1_prefetch_tune): Likewise.
5016 (thunderxt88_prefetch_tune): Likewise.
5017 (thunderx_prefetch_tune): Likewise.
5018 (thunderx2t99_prefetch_tune): Likewise.
5019 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
5021 (aarch64_override_options_internal): Update to set
5022 PARAM_PREFETCH_DYNAMIC_STRIDES.
5023 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5024 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5025 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5026 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5027 prefetch-dynamic-strides setting.
5029 2018-05-07 Luis Machado <luis.machado@linaro.org>
5031 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5032 <minimum_stride>: New const int field.
5033 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5034 minimum_stride field.
5035 (exynosm1_prefetch_tune): Likewise.
5036 (thunderxt88_prefetch_tune): Likewise.
5037 (thunderx_prefetch_tune): Likewise.
5038 (thunderx2t99_prefetch_tune): Likewise.
5039 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
5040 (aarch64_override_options_internal): Update to set
5041 PARAM_PREFETCH_MINIMUM_STRIDE.
5042 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5043 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5044 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5045 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5046 stride is constant and is below the minimum stride threshold.
5048 2018-05-06 Jakub Jelinek <jakub@redhat.com>
5051 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
5052 the type is addressable. Don't force op into register if it has
5055 2018-05-05 Roland McGrath <mcgrathr@google.com>
5058 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
5059 any section for which we don't know a specific type it should have,
5060 regardless of name. Previously this was done only for the exact
5061 names ".init_array", ".fini_array", and ".preinit_array".
5062 (default_elf_asm_named_section): Add comment about
5063 relationship with default_section_type_flags and SECTION_NOTYPE.
5064 (get_section): Don't consider it a type conflict if one side has
5065 SECTION_NOTYPE and the other doesn't, as long as neither has the
5066 SECTION_BSS et al used in the default_section_type_flags logic.
5068 2018-05-05 Tom de Vries <tom@codesourcery.com>
5071 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
5072 (workaround_barsyncs): New function.
5073 (nvptx_reorg): Use workaround_barsyncs.
5074 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
5075 (define_expand "nvptx_membar_cta"): New define_expand.
5076 (define_insn "*nvptx_membar_cta"): New insn.
5078 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
5080 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
5081 To improve optimization opportunities.
5082 * builtin-types.def: The new needed builtin types for the above.
5084 2018-05-04 Richard Biener <rguenther@suse.de>
5086 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
5087 * gimple-ssa-store-merging.c
5088 (imm_store_chain_info::output_merged_store): Remove redundant create,
5089 release split_store vector contents on failure.
5090 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
5091 scalar stmt vector on cache hit.
5093 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
5095 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
5097 * config.gcc (powerpc-xilinx-eabi*): Remove.
5098 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
5100 (fusion_addis_mem_combo_load): Ditto.
5101 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
5103 (rs6000_cpu_cpp_builtins): Ditto.
5104 * config/rs6000/rs6000-linux.c
5105 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
5106 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
5107 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
5109 (rs6000_setup_reg_addr_masks): Ditto.
5110 (rs6000_init_hard_regno_mode_ok): Ditto.
5111 (rs6000_option_override_internal): Ditto.
5112 (legitimate_lo_sum_address_p): Ditto.
5113 (rs6000_legitimize_address): Ditto.
5114 (rs6000_legitimize_reload_address): Ditto.
5115 (rs6000_legitimate_address_p): Ditto.
5116 (abi_v4_pass_in_fpr): Ditto.
5117 (setup_incoming_varargs): Ditto.
5118 (rs6000_gimplify_va_arg): Ditto.
5119 (rs6000_split_multireg_move): Ditto.
5120 (rs6000_savres_strategy): Ditto.
5121 (rs6000_emit_prologue_components): Ditto.
5122 (rs6000_emit_epilogue_components): Ditto.
5123 (rs6000_emit_prologue): Ditto.
5124 (rs6000_emit_epilogue): Ditto.
5125 (rs6000_elf_file_end): Ditto.
5126 (rs6000_function_value): Ditto.
5127 (rs6000_libcall_value): Ditto.
5128 * config/rs6000/rs6000.h: Ditto.
5129 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
5130 (TARGET_MINMAX): ... this. New.
5131 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
5132 * config/rs6000/rs6000.md: Remove Xilinx FP support.
5133 (*movsi_internal1_single): Delete.
5134 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
5135 mfpu=, mxilinx-fpu): Delete.
5136 * config/rs6000/singlefp.h: Delete.
5137 * config/rs6000/sysv4.h: Remove Xilinx FP support.
5138 * config/rs6000/t-rs6000: Ditto.
5139 * config/rs6000/t-xilinx: Delete.
5140 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
5141 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
5142 (VStype_simple): Delete.
5143 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
5144 * config/rs6000/xfpu.h: Delete.
5145 * config/rs6000/xfpu.md: Delete.
5146 * config/rs6000/xilinx.h: Delete.
5147 * config/rs6000/xilinx.opt: Delete.
5148 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
5149 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
5151 2018-05-04 Tom de Vries <tom@codesourcery.com>
5154 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
5157 2018-05-04 Richard Biener <rguenther@suse.de>
5160 * tree-complex.c (update_complex_assignment): We are always in SSA form.
5161 (expand_complex_div_wide): Likewise.
5162 (expand_complex_operations_1): Likewise.
5163 (expand_complex_libcall): Preserve EH info of the original stmt.
5164 (tree_lower_complex): Handle removed blocks.
5165 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
5166 on complex multiplication and division libcall builtins.
5168 2018-05-04 Richard Biener <rguenther@suse.de>
5171 * fold-const.c (negate_expr_p): Restrict negation of operand
5172 zero of a division to when we know that can happen without
5174 (fold_negate_expr_1): Likewise.
5176 2018-05-04 Jakub Jelinek <jakub@redhat.com>
5179 * real.h (real_nextafter): Declare.
5180 * real.c (real_nextafter): New function.
5181 * fold-const-call.c (fold_const_nextafter): New function.
5182 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
5183 CASE_CFN_NEXTTOWARD.
5184 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
5185 even when arg1_mode is different from arg0_mode.
5187 2018-05-03 Nathan Sidwell <nathan@acm.org>
5189 * doc/extend.texi (Deprecated Features): Remove
5191 (Backwards Compatibility): Likewise.
5192 * doc/invoke.texi (C++ Language Options): Likewise.
5193 (C++ Dialect Options): Likewise.
5195 2018-05-03 Jakub Jelinek <jakub@redhat.com>
5198 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
5199 _mm512_mask_mullox_epi64): New intrinsics.
5201 2018-05-03 Tom de Vries <tom@codesourcery.com>
5204 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5205 dump files): Add offload-tree.
5207 2018-05-03 Richard Biener <rguenther@suse.de>
5209 PR tree-optimization/85615
5210 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
5211 to loops not nested in BBs loop father to avoid creating multi-entry
5214 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5216 PR tree-optimization/70291
5217 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
5218 arguments. Change return type to tree. Emit libcall as a new
5219 statement rather than replacing existing one when inplace_p is true.
5220 (expand_complex_multiplication_components): New function.
5221 (expand_complex_multiplication): Expand floating-point complex
5222 multiplication using the above.
5223 (expand_complex_division): Rename inner_type parameter to type.
5224 Update expand_complex_libcall call-site.
5225 (expand_complex_operations_1): Update expand_complex_multiplication
5226 and expand_complex_division call-sites.
5228 2018-05-02 Jakub Jelinek <jakub@redhat.com>
5231 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
5232 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
5233 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
5234 the highest significant bit of the shift count mask is clear. In
5235 check whether and[sq]i3 is needed verify that all significant bits
5236 of the shift count other than the highest are set.
5238 2018-05-02 Tom de Vries <tom@codesourcery.com>
5241 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
5242 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
5243 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
5244 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
5245 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
5246 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
5247 __builtin_goacc_parlevel_size.
5249 2018-05-02 Richard Biener <rguenther@suse.de>
5251 PR tree-optimization/85597
5252 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
5253 do not use split vect_get_vec_defs call but call vect_get_slp_defs
5256 2018-05-02 Tom de Vries <tom@codesourcery.com>
5259 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5260 dump files): Add ltrans-tree.
5262 2018-05-02 Tom de Vries <tom@codesourcery.com>
5265 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5266 dump files): Add wpa-ipa.
5268 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
5270 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
5271 powerpc*-*-linux*paired* target.
5272 * config/rs6000/750cl.h: Delete.
5273 * config/rs6000/paired.h: Delete.
5274 * config/rs6000/paired.md: Delete.
5275 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
5277 * config/rs6000/rs6000-builtin.def: Remove paired float support.
5278 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
5279 comment. Remove paired float support.
5280 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
5281 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
5283 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
5284 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
5286 * config/rs6000/rs6000.c: Remove paired float support.
5287 (paired_expand_vector_init, paired_expand_vector_move,
5288 paired_emit_vector_compare, paired_emit_vector_cond_expr,
5289 (paired_expand_lv_builtin, paired_expand_stv_builtin,
5290 paired_expand_builtin, paired_expand_predicate_builtin,
5291 paired_init_builtins): Delete.
5292 * config/rs6000/rs6000.h: Remove paired float support.
5293 * config/rs6000/rs6000.md: Remove paired float support.
5294 (move_from_CR_ov_bit): Delete.
5295 * config/rs6000/rs6000.opt (mpaired): Delete.
5296 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
5297 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
5299 2018-05-02 Richard Biener <rguenther@suse.de>
5302 * gimplify.c (gimplify_save_expr): When in SSA form allow
5303 SAVE_EXPRs to compute to SSA vars.
5305 2018-05-02 Jakub Jelinek <jakub@redhat.com>
5308 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
5309 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
5310 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
5311 clobber operands[2], instead use a new pseudo. Formatting fixes.
5313 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
5315 PR tree-optimization/85586
5316 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
5317 exit early for statements in the same group if the accesses are
5320 2018-05-02 Tom de Vries <tom@codesourcery.com>
5323 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
5326 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
5328 PR tree-optimization/85143
5329 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
5331 2018-05-01 Tom de Vries <tom@codesourcery.com>
5334 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
5335 not found" error message.
5337 2018-05-01 Tom de Vries <tom@codesourcery.com>
5340 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
5341 * vec.c (test_ordered_remove_if): New function.
5342 (vec_c_tests): Call test_ordered_remove_if.
5343 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
5344 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
5345 * tree-vect-patterns.c (vect_pattern_recog_1): Use
5346 VEC_ORDERED_REMOVE_IF.
5348 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5350 PR tree-optimization/82665
5351 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
5352 pointer subtraction where arguments come from a memchr call.
5354 2018-05-01 Jakub Jelinek <jakub@redhat.com>
5356 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
5357 --push-state --as-needed and --pop-state instead of --as-needed and
5358 --no-as-needed if ld supports it.
5359 * configure: Regenerated.
5362 * doc/install.texi2html: Replace _002d with - and _002a with * in
5363 generated html files using sed.
5365 2018-04-30 David Malcolm <dmalcolm@redhat.com>
5368 * gcc-rich-location.c (blank_line_before_p): New function.
5369 (use_new_line): New function.
5370 (gcc_rich_location::add_fixit_insert_formatted): New function.
5371 * gcc-rich-location.h
5372 (gcc_rich_location::add_fixit_insert_formatted): New function.
5374 2018-04-30 David Malcolm <dmalcolm@redhat.com>
5376 * selftest.c (assert_streq): Rename "expected" and "actual" to
5377 "val1" and "val2". Extend NULL-handling to cover both inputs
5378 symmetrically, while still requiring both to be non-NULL for a pass.
5379 * selftest.h (assert_streq): Rename "expected" and "actual" to
5381 (ASSERT_EQ): Likewise.
5382 (ASSERT_EQ_AT): Likewise.
5383 (ASSERT_KNOWN_EQ): Likewise.
5384 (ASSERT_KNOWN_EQ_AT): Likewise.
5385 (ASSERT_NE): Likewise.
5386 (ASSERT_MAYBE_NE): Likewise.
5387 (ASSERT_MAYBE_NE_AT): Likewise.
5388 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
5389 the assertion to pass.
5390 (ASSERT_STREQ_AT): Likewise.
5392 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
5394 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
5395 interaction with -pie.
5397 2018-04-30 David Malcolm <dmalcolm@redhat.com>
5399 * selftest.h: Fix alphabetization of per-source-file selftest
5402 2018-04-30 Jason Merrill <jason@redhat.com>
5404 PR c++/61982 - dead stores to destroyed objects.
5405 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
5408 2018-04-30 Jason Merrill <jason@redhat.com>
5410 * tree.c (build_clobber): New.
5411 * tree.h: Declare it.
5412 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
5414 2018-04-30 David Malcolm <dmalcolm@redhat.com>
5416 * diagnostic-show-locus.c (layout::layout): Update for
5417 location_get_source_line returning a char_span.
5418 (struct char_span): Move to input.h.
5419 (struct correction): Update for fields in char_span becoming
5421 (struct source_line): Update for location_get_source_line
5422 returning a char_span.
5423 (layout::print_line): Likewise.
5424 * edit-context.c (edited_file::print_content): Likewise.
5425 (edited_file::print_diff_hunk): Likewise.
5426 (edited_file::print_run_of_changed_lines): Likewise.
5427 (edited_file::get_num_lines): Likewise.
5428 (edited_line::edited_line): Likewise.
5429 * final.c (asm_show_source): Likewise.
5430 * input.c (location_get_source_line): Convert return type
5431 from const char * to char_span, losing the final "line_len"
5433 (dump_location_info): Update for the above.
5434 (get_substring_ranges_for_loc): Likewise. Use a char_span
5435 when handling the literal within the line.
5436 (test_reading_source_line): Update for location_get_source_line
5437 returning a char_span.
5438 * input.h (class char_span): Move here from
5439 diagnostic-show-locus.c, converting from a struct to a class.
5440 Make data members private.
5441 (char_span::operator bool): New.
5442 (char_span::length): New.
5443 (char_span::get_buffer): New.
5444 (char_span::operator[]): New.
5445 (char_span::subspan): Make const.
5446 (char_span::xstrdup): New.
5447 (location_get_source_line): Convert return type from const char *
5448 to char_span, losing the final "line_size" param.
5450 2018-04-30 Jan Hubicka <jh@suse.cz>
5452 * lto-wrapper.c (ltrans_priorities): New static var.
5453 (cmp_priority): New.
5454 (run_gcc): Read priorities and if doing parallel build order
5455 the Makefile by them.
5457 2018-04-30 David Malcolm <dmalcolm@redhat.com>
5459 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
5461 2018-04-30 Richard Biener <rguenther@suse.de>
5463 * tree-cfg.c (verify_address): Remove base argument, add
5464 flag whether to check TREE_ADDRESSABLE and do that.
5465 (verify_expr): Remove.
5466 (verify_types_in_gimple_reference): Add pieces from verify_expr.
5467 (verify_gimple_assign_single): Likewise.
5468 (verify_gimple_switch): Likewise.
5469 (verify_expr_location_1): Dereference tp once. Add (disabled)
5470 piece from verify_expr.
5471 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
5473 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
5475 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
5477 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
5479 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
5480 (small_data_pattern): Likewise.
5481 (arc_rewrite_small_data): Likewise.
5482 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
5483 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
5484 (get_symbol_alignment): New function.
5485 (legitimate_small_data_address_p): Likewise.
5486 (legitimate_scaled_address): Update, call
5487 legitimate_small_data_address_p.
5488 (output_sdata): New static variable.
5489 (arc_print_operand): Update how we handle small data operands.
5490 (arc_print_operand_address): Likewise.
5491 (arc_legitimate_address_p): Update, use
5492 legitimate_small_data_address_p.
5493 (arc_rewrite_small_data_p): Remove.
5494 (arc_rewrite_small_data_1): Likewise.
5495 (arc_rewrite_small_data): Likewise.
5496 (small_data_pattern): Likewise.
5497 (compact_sda_memory_operand): Update to use
5498 legitimate_small_data_address_p and get_symbol_alignment.
5499 (prepare_move_operands): Don't rewite sdata pattern.
5500 (prepare_extend_operands): Remove.
5501 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
5503 (zero_extendqisi2): Likewise.
5504 (zero_extendhisi2): Likewise.
5505 (extendqihi2): Likewise.
5506 (extendqisi2): Likewise.
5507 (extendhisi2): Likewise.
5511 * config/arc/constraints.md (Usd): Change it to memory constraint.
5513 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
5515 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
5516 as source of std instructions.
5517 * config/arc/arc.md (movsi_insn): Update pattern predicate to
5518 allow 6-bit constants as source for store instructions.
5519 (movdi_insn): Update instruction pattern to allow 6-bit constants
5520 as source for store instructions.
5522 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
5524 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
5526 2018-04-30 Nathan Sidwell <nathan@acm.org>
5527 Sandra Loosemore <sandra@codesourcery.com>
5529 * dumpfile.c (dump_open): Allow '-' for stdout.
5530 * doc/invoke.texi (Developer Options): Document dump filename
5531 determination early. Document stdin/stdout selection.
5533 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
5535 Microblaze Target: PIC data text relative
5537 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
5538 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
5540 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
5541 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
5542 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
5543 New addressing mode for data-text relative position indepenedent code.
5544 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
5545 'ADDRESS_SYMBOLIC_TXT_REL'.
5546 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
5547 (microblaze_legitimate_pic_operand): Exclude function calls from
5548 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
5549 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
5551 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
5552 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
5553 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
5554 for 'address + offset'.
5555 (microblaze_expand_prologue): Add new function prologue call for
5557 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
5558 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
5559 table in case of TARGET_PIC_DATA_TEXT_REL.
5560 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
5561 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
5562 Add new macros 'UNSPEC_TEXT',
5563 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
5564 + exclude function calls from 'UNSPEC_PLT' in case of data text
5566 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
5567 new target hook for generating address diff vector tables in case of
5569 * doc/tm.texi : Regenerate.
5570 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
5571 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
5572 of addr diff vector generation.
5573 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
5574 target hook definition.
5575 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
5576 Add default function for generate_pic_addr_diff_vec -> flag_pic.
5577 * doc/invoke.texi (Add new pic option): Add new microblaze pic
5578 option for data text relative.
5580 2018-04-30 Richard Biener <rguenther@suse.de>
5582 * tree-chrec.h (evolution_function_is_constant_p): Remove
5584 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
5586 2018-04-30 Richard Biener <rguenther@suse.de>
5589 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
5591 2018-04-30 Richard Biener <rguenther@suse.de>
5593 PR tree-optimization/28364
5594 PR tree-optimization/85275
5595 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
5596 copying first exit test.
5598 2018-04-28 Mark Wielaard <mark@klomp.org>
5600 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
5602 (dwarf_AT): Handle DW_AT_addr_base.
5603 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
5605 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
5608 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
5609 (*ashl<dwi>3_doubleword_mask_1): Ditto.
5610 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
5611 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
5613 2018-04-28 Richard Biener <rguenther@suse.de>
5615 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
5616 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
5617 to reflect use. Only add interesting stmts.
5619 2018-04-27 Martin Jambor <mjambor@suse.cz>
5622 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
5623 the jump function allows for passing through aggregate values.
5625 2018-04-27 David Malcolm <dmalcolm@redhat.com>
5627 * input.h (in_system_header_at): Convert from macro to inline
5629 (from_macro_expansion_at): Likewise.
5630 (from_macro_definition_at): Likewise.
5632 2018-04-27 Jeff Law <law@redhat.com>
5634 * config.gcc: Mark tile* targets as deprecated/obsolete.
5636 2018-04-27 Richard Biener <rguenther@suse.de>
5638 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
5641 2018-04-27 Richard Biener <rguenther@suse.de>
5643 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
5645 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
5647 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
5648 with Yd constraint. Set "preferred_for_speed" attribute from
5649 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
5651 (*movdi_internal): Ditto.
5652 (movti_interunit splitters): Remove
5653 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
5654 (movdi_interunit splitters): Ditto.
5655 * config/i386/constraints.md (Ye): Remove.
5656 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
5658 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5661 * config/aarch64/constraints.md (Usg): Limit to 31.
5664 2018-04-27 Jakub Jelinek <jakub@redhat.com>
5666 PR tree-optimization/85529
5667 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
5668 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
5669 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
5670 zero extension or masking of the MSB bit.
5671 (optimize_range_tests): Add FIRST_BB argument, pass it through
5672 to optimize_range_tests_var_bound.
5673 (maybe_optimize_range_tests, reassociate_bb): Adjust
5674 optimize_range_tests callers.
5676 2018-04-26 Richard Biener <rguenther@suse.de>
5677 Jakub Jelinek <jakub@redhat.com>
5679 * cgraph.h (symbol_table): Just declare debug method here.
5680 * symtab.c (symbol_table::debug): Define.
5682 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
5684 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
5686 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
5688 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
5689 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
5690 (*movdi_internal): Substitute Yi and Yj constraint with x
5691 and Ym and Yn constraint with y constraint. Update "isa"
5692 attribute and set "preferred_for_speed" attribute from
5693 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
5694 (*movsi_internal): Ditto.
5695 (*movdf_internal): Ditto.
5696 (*movsf_internal): Ditto.
5697 (*zero_extendsidi2): Ditto.
5698 * config/i386/sse.md (vec_set<mode>_0): Ditto.
5699 (sse2_loadld): Ditto.
5700 (*vec_extract<ssevecmodelower>_0): Ditto.
5701 (*vec_extractv4si_0_zext_sse4): Ditto.
5702 (vec_concatv2di): Ditto.
5703 (*vec_dup<mode>): Ditto.
5704 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
5705 * config/i386/constraints.md (Yi): Remove.
5710 2018-04-26 Nathan Sidwell <nathan@acm.org>
5712 * dumpfile.c (dump_open): New.
5713 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
5714 (dump_finish): Detect stdio/stderr by value not name.
5716 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
5718 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
5720 2018-04-26 Tom de Vries <tom@codesourcery.com>
5723 * config/nvptx/nvptx.c (verify_neutering_jumps)
5724 (verify_neutering_labels): New function
5725 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
5727 2018-04-26 Tom de Vries <tom@codesourcery.com>
5730 * config/nvptx/nvptx.c (needs_neutering_p): New function.
5731 (nvptx_single): Use needs_neutering_p to skip over insns that do not
5734 2018-04-26 Richard Biener <rguenther@suse.de>
5735 Tom de Vries <tom@codesourcery.com>
5738 * lto-streamer-out.c (output_function): Fixup loops if required to match
5739 discovery done in the reader.
5741 2018-04-26 Richard Biener <rguenther@suse.de>
5743 PR tree-optimization/85116
5744 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
5745 have a loop exit from the single latch predecessor. Remove
5746 case of header with just condition.
5747 (ch_base::copy_headers): Exclude infinite loops from any
5749 (pass_ch::execute): Record exits.
5751 2018-04-26 Richard Biener <rguenther@suse.de>
5753 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
5754 prologue cost vector and pass it to vect_get_load_cost.
5755 (vect_get_peeling_costs_all_drs): Likewise.
5756 (vect_peeling_hash_get_lowest_cost): Likewise.
5757 (vect_enhance_data_refs_alignment): Likewise.
5759 2018-04-26 Richard Biener <rguenther@suse.de>
5762 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
5763 checking of integer<->pointer conversions.
5764 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
5765 sign-/zero-extending pointer types.
5766 (expand_omp_for_static_chunk): Likewise.
5768 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
5769 Jean Lee <xiaoyur347@gmail.com>
5771 * config/mips/mips.c (mips_asan_shadow_offset): New function.
5772 (TARGET_ASAN_SHADOW_OFFSET): Define.
5773 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
5774 true for -fsanitize=address.
5776 2018-04-25 Mark Wielaard <mark@klomp.org>
5778 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
5781 2018-04-25 Jakub Jelinek <jakub@redhat.com>
5783 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
5784 than "alu", remove explicit "memory" and "imm_disp" attributes.
5785 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
5788 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
5789 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
5790 gen_lowpart_no_emit.
5792 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
5795 * config/i386/i386.c (ix86_expand_builtin): Change memory
5796 operand to XI, extend p0 to Pmode.
5797 * config/i386/i386.md: Change unspec volatile and operand
5798 1 mode to XI, change operand 0 mode to P.
5800 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
5802 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
5803 GET_MODE_MASK before any checking.
5804 (nds32_can_use_bset_p): Likewise.
5805 (nds32_can_use_btgl_p): Likewise.
5807 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
5809 * config/nds32/nds32-doubleword.md: New define_split pattern for
5810 illegal register number.
5812 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
5814 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
5816 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
5818 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
5820 2018-04-25 Richard Biener <rguenther@suse.de>
5822 * lto-streamer.h (LTO_major_version): Bump to 8.
5824 2018-04-25 Jakub Jelinek <jakub@redhat.com>
5826 * BASE-VER: Set to 9.0.0.
5828 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
5830 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
5831 in __abskf2 and __powikf2.
5833 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5836 * config/aarch64/constraints.md (Usg, Usj): New constraints.
5837 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
5838 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
5839 Use the above on operand 2. Reindent.
5840 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
5842 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
5845 * common/config/i386/i386-common.c (ix86_handle_option): Don't
5847 * config/i386/i386.opt (mcet): Removed.
5848 * doc/install.texi: Remove -mcet documentation.
5849 * doc/invoke.texi: Likewise.
5851 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
5854 * doc/install.texi: Remove -mcet from bootstrap-cet.
5856 2018-04-24 Jakub Jelinek <jakub@redhat.com>
5859 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
5860 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
5864 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
5865 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
5866 containing a CONST_VECTOR.
5868 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
5870 * doc/install.texi: Update newlib dependency for nvptx.
5872 2018-04-24 Jakub Jelinek <jakub@redhat.com>
5875 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
5876 instead of INTVAL when shifting x left.
5878 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
5880 PR tree-optimization/85478
5881 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
5882 vect_grouped_store_supported for single element vectors.
5884 2018-04-24 Richard Biener <rguenther@suse.de>
5887 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
5888 load cost increase to the case of non-constant step.
5890 2018-04-24 Jakub Jelinek <jakub@redhat.com>
5893 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
5894 destination if any_malformed_asm.
5896 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
5899 * expr.c (store_field): In the bitfield case, if the value comes from
5900 a function call and is returned in registers by means of a PARALLEL,
5901 do not change the mode of the temporary unless BLKmode and VOIDmode.
5903 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
5905 PR rtl-optimization/85423
5906 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
5907 dependencies to debug insns when the previous insn is non-debug.
5909 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
5911 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
5912 enums into a single definition.
5913 (fls): Fix predicates and printing.
5916 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
5918 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
5919 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
5920 and short u6 immediate.
5921 (check_if_valid_sleep_operand): Remove.
5922 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
5924 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
5926 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
5927 flag_always_save_lp condition.
5928 * config/nds32/nds32.opt (malways-save-lp): New option.
5930 2018-04-22 Shiva Chen <shiva0217@gmail.com>
5932 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
5933 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
5934 * config/nds32/nds32.h
5935 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
5936 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
5938 2018-04-22 Shiva Chen <shiva0217@gmail.com>
5940 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
5941 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
5943 2018-04-22 Shiva Chen <shiva0217@gmail.com>
5944 Chung-Ju Wu <jasonwucj@gmail.com>
5946 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
5948 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
5949 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
5951 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
5953 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
5955 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
5957 * config/nds32/nds32-protos.h (nds32_data_alignment,
5958 nds32_local_alignment): Declare.
5959 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
5960 nds32_local_alignment): New functions.
5961 (TARGET_CONSTANT_ALIGNMENT): Define.
5962 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
5964 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
5966 * config/nds32/nds32.c
5967 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
5968 (TARGET_MODES_TIEABLE_P): Likewise.
5970 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
5972 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
5975 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
5976 Chung-Ju Wu <jasonwucj@gmail.com>
5978 * config/nds32/constants.md (unspec_volatile_element): Add enum values
5979 for unaligned access.
5980 * config/nds32/nds32-intrinsic.c: Implementation of expanding
5982 * config/nds32/nds32-intrinsic.md: Likewise.
5983 * config/nds32/nds32_intrinsic.h: Likewise.
5984 * config/nds32/nds32.h (nds32_builtins): Likewise.
5985 * config/nds32/nds32.opt (munaligned-access): New option.
5986 * config/nds32/nds32.c (nds32_asm_file_start): Display
5987 flag_unaligned_access status.
5989 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
5991 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
5992 -mno-relax is present.
5993 * config/riscv/linux.h (LINK_SPEC): Ditto.
5995 2018-04-20 Martin Sebor <msebor@redhat.com>
5998 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
6000 (gimple_fold_builtin_stxcpy_chk): Same.
6001 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
6003 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
6006 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
6007 __powikf2 when long double is IEEE 128-bit.
6009 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
6011 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
6012 step to make sure stack always aligned.
6014 2018-04-20 Carl Love <cel@us.ibm.com>
6017 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
6018 size check for arg0.
6020 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
6021 Tom de Vries <tom@codesourcery.com>
6024 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
6025 Emit insns for calls too.
6026 (nvptx_find_par): Always look for worker-level predecessor insn.
6027 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
6029 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
6030 (nvptx_process_pars): Propagate frames for calls.
6032 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
6035 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
6037 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
6038 (ix86_handle_option): Don't handle OPT_mibt.
6039 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
6041 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
6043 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
6044 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
6045 (ix86_target_macros): Define __CET__ with flag_cf_protection
6046 for -fcf-protection.
6047 * config/i386/i386.c (isa2_opts): Remove -mibt.
6048 * config/i386/i386.h (TARGET_IBT): Removed.
6049 (TARGET_IBT_P): Likewise.
6050 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
6051 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
6052 * config/i386/i386.opt (mcet): Update help message.
6055 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
6056 -mcet as an alias for -mshstk.
6058 2018-04-20 Richard Biener <rguenther@suse.de>
6061 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
6062 complexity by forcing a single use of the multiply operand.
6064 2018-04-20 Martin Jambor <mjambor@suse.cz>
6067 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
6068 recursion dependency to only apply to non-clones.
6070 2018-04-20 Martin Jambor <mjambor@suse.cz>
6073 * ipa-cp.c (create_specialized_node): Check that clones of
6074 self-recursive edges exist during IPA-CP.
6076 2018-04-19 Toon Moene <toon@moene.org>
6078 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
6081 2018-04-19 Jakub Jelinek <jakub@redhat.com>
6083 PR tree-optimization/85467
6084 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
6085 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
6086 VECTOR_CST element to type.
6088 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
6091 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
6092 * config/i386/i386.md (builtin_setjmp_setup): Removed.
6093 (builtin_longjmp): Likewise.
6094 (save_stack_nonlocal): New pattern.
6095 (restore_stack_nonlocal): Likewise.
6097 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
6100 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
6101 Replace ASM_OUTPUT_LABEL with fprintf.
6103 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
6106 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
6107 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
6108 * config/i386/i386-c.c (ix86_target_macros_internal): Also
6109 define __IBT__ and __SHSTK__ for -fcf-protection.
6110 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
6112 (ix86_trampoline_init): Likewise.
6113 (x86_output_mi_thunk): Likewise.
6114 (ix86_notrack_prefixed_insn_p): Likewise.
6115 (ix86_option_override_internal): Don't disallow -fcf-protection.
6116 * config/i386/i386.md (rdssp<mode>): Also enable for
6118 (incssp<mode>): Likewise.
6119 (nop_endbr): Likewise.
6120 * config/i386/i386.opt (mcet): Change help message to built-in
6124 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
6125 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
6126 enable CET built-in functions.
6128 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
6130 * common/config/i386/i386-common.c
6131 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
6132 OPTION_MASK_ISA_MOVDIRI_UNSET,
6133 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
6134 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
6135 * config.gcc (movdirintrin.h): New header.
6136 * config/i386/cpuid.h (bit_MOVDIRI,
6137 bit_MOVDIR64B): New bits.
6138 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
6140 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
6141 (VOID, PVOID, PCVOID)): New function types.
6142 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
6143 __builtin_ia32_directstoreu_u64,
6144 __builtin_ia32_movdir64b): New builtins.
6145 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
6146 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
6148 (ix86_valid_target_attribute_inner_p): Ditto.
6149 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
6150 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
6151 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
6152 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
6153 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
6154 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
6155 (movdiri<mode>, movdir64b_<mode>): New.
6156 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
6157 * config/i386/immintrin.h: Include movdirintrin.h.
6158 * config/i386/movdirintrin.h: New file.
6159 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
6161 2018-04-19 Richard Biener <rguenther@suse.de>
6164 * cfg.c (clear_bb_flags): When loop state says we have
6165 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
6167 2018-04-19 Richard Biener <rguenther@suse.de>
6169 PR tree-optimization/84737
6170 * tree-vect-data-refs.c (vect_copy_ref_info): New function
6171 copying restrict info.
6172 (vect_setup_realignment): Use it.
6173 * tree-vectorizer.h (vect_copy_ref_info): Declare.
6174 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
6175 the first DR to all generated stores.
6176 (vectorizable_load): Likewise for loads.
6178 2018-04-19 Jakub Jelinek <jakub@redhat.com>
6180 PR tree-optimization/85446
6181 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
6182 the integral and pointer types to have the same precision.
6184 * doc/install.texi: Document --disable-cet being the default and
6187 2018-04-18 Martin Liska <mliska@suse.cz>
6189 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
6192 2018-04-18 Martin Liska <mliska@suse.cz>
6195 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
6198 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6199 arguments if they are comparable.
6201 2018-04-18 Martin Liska <mliska@suse.cz>
6204 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
6207 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
6210 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
6213 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
6214 ENDBR after calling __morestack.
6216 2018-04-18 David Malcolm <dmalcolm@redhat.com>
6219 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
6220 by using gcc_base_ver to generate a gcc_driver_version, and use
6221 it when generating GCC_DRIVER_NAME.
6222 * configure: Regenerate.
6224 2018-04-18 Jakub Jelinek <jakub@redhat.com>
6227 * config.gcc: Obsolete powerpc*-*-*spe*.
6229 2018-04-17 Jakub Jelinek <jakub@redhat.com>
6232 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
6233 (stabstr_D): Change type of unum from unsigned int to
6234 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
6237 2018-04-17 Jim Wilson <jimw@sifive.com>
6240 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
6241 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
6242 Set arg_pointer_offset after using pretend_args_size.
6244 2018-04-17 Jakub Jelinek <jakub@redhat.com>
6246 PR rtl-optimization/85431
6247 * dse.c (record_store): Ignore zero width stores.
6250 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
6251 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
6252 __builtin_stack_restore rather than after it.
6253 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
6254 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
6255 argument instead of virtual_dynamic_stack_rtx.
6257 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
6259 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
6261 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
6262 Add note to error message to explain internal mapping of overloaded
6263 built-in function name to non-overloaded built-in function name.
6264 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
6267 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
6270 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
6271 where the inputs overlap with the output.
6273 2018-04-17 Jakub Jelinek <jakub@redhat.com>
6275 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
6276 (=v, v) alternative and explicit "memory" attribute.
6277 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
6278 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6280 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
6281 "sselog1" type instead of "sselog".
6282 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
6283 "sselog". Remove explicit "memory" attribute.
6284 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
6285 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6287 (vec_extract_hi_v32hi): Merge all alternatives into one, use
6288 "sselog1" type instead of "sselog". Remove explicit "memory"
6290 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
6291 use "sselog1" type instead of "sselog". Remove explicit "memory"
6293 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
6294 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6296 (vec_extract_hi_v64qi): Merge all alternatives into one, use
6297 "sselog1" type instead of "sselog". Remove explicit "memory"
6299 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
6300 use "sselog1" type instead of "sselog". Remove explicit "memory"
6304 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
6307 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
6310 2018-04-17 Martin Jambor <mjambor@suse.cz>
6313 * ipa-cp.c (create_specialized_node): Call
6314 expand_all_artificial_thunks if necessary.
6316 2018-04-17 Martin Liska <mliska@suse.cz>
6319 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
6320 in message, remote space in between '_G' and '('.
6322 2018-04-17 Jakub Jelinek <jakub@redhat.com>
6325 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
6326 avx512f_vmcmp<mode>3<round_saeonly_name>,
6327 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
6328 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
6329 avx512f_rndscale<mode><round_saeonly_name>,
6330 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
6331 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
6332 Use %<iptr>2 instead of %2 for -masm=intel.
6333 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
6334 avx512f_vcvttss2usi<round_saeonly_name>,
6335 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
6337 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
6338 avx512f_vcvttsd2usi<round_saeonly_name>,
6339 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
6340 Use %q1 instead of %1 for -masm=intel.
6341 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
6342 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
6343 of %3 for -masm=intel.
6344 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
6346 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
6348 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
6350 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
6351 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
6353 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
6355 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
6356 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
6357 %g1 and one with %0 and %1.
6358 (avx512er_vmrcp28<mode><round_saeonly_name>,
6359 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
6361 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
6362 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
6363 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
6364 of %0 and %{%4%} for -masm=intel.
6365 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
6366 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
6367 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
6368 order of %0 and %{%5%}%{z%} for -masm=intel.
6370 2018-04-17 Jan Hubicka <jh@suse.cz>
6373 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
6375 2018-04-17 Martin Liska <mliska@suse.cz>
6378 * multiple_target.c (create_dispatcher_calls): Set apostrophes
6379 for target_clone error message. Make default implementation
6380 clone to be a local declaration.
6381 (separate_attrs): Add new argument and check for an empty
6383 (expand_target_clones): Handle it.
6384 (ipa_target_clone): Make redirection just for target_clones
6387 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
6388 Tom de Vries <tom@codesourcery.com>
6391 * omp-expand.c (expand_oacc_for): Add dummy false branch for
6392 tiled basic blocks without omp continue statements.
6394 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
6397 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
6398 vec_extract expression as having side effects to make sure it gets
6401 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
6404 * config/i386/i386.c (get_builtin_code_for_version): Check
6407 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
6410 * gcc/config.gcc: Support "skylake".
6411 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
6413 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
6414 (processor_target_table): Add "skylake".
6415 (ix86_option_override_internal): Add "skylake".
6416 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
6417 PROCESSOR_CANNONLAKE.
6418 (get_builtin_code_for_version): Fix priority for
6419 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
6420 PROCESSOR_SKYLAKE-AVX512.
6421 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
6422 (processor_type): Add PROCESSOR_SKYLAKE.
6424 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
6425 Jason Merrill <jason@redhat.com>
6428 * convert.c (convert_to_integer_1): Use direct recursion for
6429 enumeral types and types with a precision less than the number
6430 of bits in their mode.
6432 2018-04-16 Julia Koval <julia.koval@intel.com>
6435 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
6436 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
6438 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
6441 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
6442 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
6443 and -mno-direct-move.
6445 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
6448 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
6449 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
6450 Ensure negative shifts result in {0}.
6452 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
6454 PR rtl-optimization/79916
6455 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
6456 regs (if any) to define how to gnerate SD moves when LRA is in
6459 2018-04-13 Jakub Jelinek <jakub@redhat.com>
6461 PR rtl-optimization/85393
6462 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
6463 * except.c (expand_dw2_landing_pad_for_region): Make static.
6464 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
6465 a label and unconditional jump to old_bb, rather than
6466 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
6469 PR rtl-optimization/85376
6470 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
6471 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
6472 instead of a specific value.
6474 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
6475 Bin Cheng <bin.cheng@arm.com>
6477 PR tree-optimization/82965
6478 PR tree-optimization/83991
6479 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
6480 by_profile_only parameter.
6481 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
6482 information if the loop was predicted to iterate too many times.
6483 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
6485 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
6488 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
6491 2018-04-13 Martin Liska <mliska@suse.cz>
6492 Jakub Jelinek <jakub@redhat.com>
6495 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
6496 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
6497 * builtins.c (expand_builtin_memory_copy_args): Use
6498 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
6499 handle dest_addr == pc_rtx.
6501 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
6504 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
6505 asked to not generate direct moves.
6506 (fix_trunc<mode>si2_stfiwx): Similar.
6507 (fix_trunc<mode>si2_internal): Similar.
6509 2018-04-12 Jakub Jelinek <jakub@redhat.com>
6512 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
6513 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
6514 lookup if dest in some wider mode is known to be const0_rtx and
6515 if so, record permanent equivalence for it to be ZERO_EXTEND of
6516 the narrower mode destination.
6518 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
6520 * lto-streamer-out.c (output_function): Revert 259346.
6521 * omp-expand.c (expand_oacc_for): Likewise.
6523 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
6525 PR rtl-optimization/85354
6526 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
6527 * sel-sched.c (sel_global_init): ... here.
6529 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
6532 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
6533 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
6534 mode for PE-COFF targets.
6535 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
6536 (i386_pe_asm_lto_end): Likewise.
6537 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
6538 (TARGET_ASM_LTO_END): Likewise.
6539 * config/i386/winnt.c (saved_debug_info_level): New static variable.
6540 (i386_pe_asm_lto_start): New function.
6541 (i386_pe_asm_lto_end): Likewise.
6543 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
6544 Richard Biener <rguenther@suse.de>
6547 * lto-streamer-out.c (output_function): Fix CFG loop state before
6549 * omp-expand.c (expand_oacc_for): Handle calls to internal
6550 functions like regular functions.
6552 2018-04-12 Richard Biener <rguenther@suse.de>
6555 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
6556 for the early LTO debug to properly generate references to it
6557 during DIE emission. Do not re-use that for the skeleton for
6559 (dwarf2out_early_finish): Likewise.
6561 2018-04-12 Jakub Jelinek <jakub@redhat.com>
6564 * config/i386/sse.md
6565 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
6566 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
6567 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
6568 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
6569 and output is a reg, avoid creating invalid lowpart subreg, but
6570 instead split into a 512-bit move. Don't split if not AVX512VL,
6571 input is xmm16+ reg and output is a mem.
6572 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
6573 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
6574 xmm16+ reg and output is a mem.
6576 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
6578 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
6579 also for flag_dwarf2_cfi_asm.
6581 2018-04-12 Jakub Jelinek <jakub@redhat.com>
6583 PR rtl-optimization/85342
6584 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
6585 a bool scalar var inside of the loop instead. Don't try to update
6586 recog_data.operand after failed apply_change_group.
6588 2018-04-12 Tom de Vries <tom@codesourcery.com>
6591 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
6592 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
6593 array with flexible array member as array without given dimension.
6594 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
6595 argument for undefined param to true.
6597 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
6600 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
6601 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
6602 from PowerPC section.
6603 * config/rs6000/sysv4.opt (mcall-): Improve help text.
6604 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
6605 help text that is too long.
6606 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
6607 help text that is too long.
6608 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
6609 help text that is too long.
6611 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
6613 * config/alpha/alpha.md (stack_probe_internal): Rename
6614 from "probe_stack". Update all callers.
6616 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
6618 PR rtl-optimization/84566
6619 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
6620 sched_macro_fuse_insns.
6622 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
6625 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
6626 (compute_block_dependences): ... from here.
6628 2018-04-11 Jakub Jelinek <jakub@redhat.com>
6630 PR tree-optimization/85331
6631 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
6632 from int to HOST_WIDE_INT.
6634 2018-04-11 Martin Jambor <mjambor@suse.cz>
6637 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
6638 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
6639 not the same as the source val.
6640 (cgraph_edge_brings_value_p): New parameter.
6641 (gather_edges_for_value): Pass destination value to
6642 cgraph_edge_brings_value_p.
6643 (perhaps_add_new_callers): Likewise.
6644 (get_info_about_necessary_edges): Likewise and exclude values brought
6645 only by self-recursive edges.
6646 (create_specialized_node): Redirect only clones of self-calling edges.
6647 (+self_recursive_pass_through_p): New function.
6648 (find_more_scalar_values_for_callers_subset): Use it.
6649 (find_aggregate_values_for_callers_subset): Likewise.
6650 (known_aggs_to_agg_replacement_list): Removed.
6651 (decide_whether_version_node): Re-calculate known constants for all
6652 remaining context clones.
6654 2018-04-11 Richard Biener <rguenther@suse.de>
6657 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
6658 from early DWARF output.
6659 (dwarf2out_early_finish): Output line info unconditionally into
6660 early DWARF and add reference to it.
6662 2018-04-11 Jakub Jelinek <jakub@redhat.com>
6665 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
6666 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
6667 other than V2DFmode using iptr mode attribute.
6668 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
6670 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
6672 PR rtl-optimization/84659
6673 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
6675 2018-04-11 Jakub Jelinek <jakub@redhat.com>
6678 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
6680 (output_loc_list): Pass address of a dummy size variable even in the
6681 locview handling loop.
6682 (index_location_lists): Add comment on why skip_loc_list_entry can't
6685 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
6688 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
6691 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
6694 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
6695 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
6696 and -mstring-compare-inline-limit.
6698 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
6701 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
6702 for stack clash protection in a register whenever we need it to be in
6705 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
6707 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
6708 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
6710 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
6713 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
6715 (mlong-double-): Ditto.
6716 * config/rs6000/sysv4.opt (msdata=): Ditto.
6717 (mtls-size=): Ditto.
6719 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
6721 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6722 erroneous entries for
6723 "vector int vec_ldl (int, long int *)", and
6724 "vector unsigned int vec_ldl (int, unsigned long int *)".
6725 Add comments and entries for
6726 "vector bool char vec_ldl (int, bool char *)",
6727 "vector bool short vec_ldl (int, bool short *)",
6728 "vector bool int vec_ldl (int, bool int *)",
6729 "vector bool long long vec_ldl (int, bool long long *)",
6730 "vector pixel vec_ldl (int, pixel *)",
6731 "vector long long vec_ldl (int, long long *)",
6732 "vector unsigned long long vec_ldl (int, unsigned long long *)".
6733 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
6734 type tree bool_long_long_type_node and correct definition of
6735 bool_V2DI_type_node to make reference to this new type tree.
6736 (rs6000_mangle_type): Replace erroneous reference to
6737 bool_long_type_node with bool_long_long_type_node.
6738 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
6739 comments to emphasize sign distinctions for char and int types and
6740 replace RS6000_BTI_bool_long constant with
6741 RS6000_BTI_bool_long_long constant. Also add comment to restrict
6742 use of RS6000_BTI_pixel.
6743 (bool_long_type_node): Remove this macro definition.
6744 (bool_long_long_type_node): New macro definition
6746 2018-04-10 Jakub Jelinek <jakub@redhat.com>
6748 PR rtl-optimization/85300
6749 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
6750 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
6751 simplify_unary_operation fails.
6753 2018-04-10 Martin Liska <mliska@suse.cz>
6755 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
6756 cgraph_edge and ipa_ref.
6758 2018-04-10 Jakub Jelinek <jakub@redhat.com>
6762 * config/i386/sse.md
6763 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
6764 computation of the VEC_MERGE selector from mask.
6765 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
6766 Fix decoding of the VEC_MERGE selector into mask.
6768 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
6770 PR tree-optimization/85286
6771 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
6773 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
6775 * final.c (final_1): Set insn_last_address as well as
6776 insn_current_address.
6778 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6781 * explow.c (emit_stack_probe): Call validize_mem on memory location
6782 before passing it to gen_probe_stack. Create address operand and
6783 legitimize it for the probe_stack_address case.
6785 2018-04-09 Jan Hubicka <jh@suse.cz>
6788 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
6789 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
6790 * tree.c (free_lang_data_in_type): Fix handling of binfos;
6792 (free_lang_data): Rebuild type inheritance graph.
6794 2018-04-09 Martin Sebor <msebor@redhat.com>
6796 * invoke.texi (-finline-small-functions): Mention other optimization
6798 (-findirect-inlining, -fpartial-inlining): Same.
6799 (-finline-functions-called-once): Same.
6800 (-freorder-blocks-and-partition): Same.
6802 2018-04-09 Jan Hubicka <jh@suse.cz>
6805 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
6806 jumps; choose last target that matches the criteria (i.e.
6807 no partition changes for non-crossing jumps).
6808 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
6809 support for redirecting crossing jumps to non-crossing.
6811 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
6813 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
6814 also for naked functions.
6816 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
6818 * config/arc/arc.md (add_shift): New pattern.
6819 (add_shift2): Likewise.
6820 (sub_shift): Likewise.
6821 (sub_shift_cmp0_noout): Likewise.
6822 (compare_si_ashiftsi): Likewise.
6823 (xbfu_cmp0_noout): New combine pattern.
6824 (xbfu_cmp0"): Likewise.
6825 (movsi_set_cc_insn): Place the predicable variant first.
6826 (commutative_binary_cmp0_noout): Remove clobber.
6827 (commutative_binary_cmp0): New pattern.
6828 (noncommutative_binary_cmp0): Likewise.
6829 (noncommutative_binary_cmp0_noout): Likewise.
6830 (noncommutative_binary_comparison_result_used): Removed.
6831 (rsub_cmp0): New pattern.
6832 (rsub_cmp0_noout): Likewise.
6833 (extzvsi): Changed, keep only meaningful variants.
6834 (SQH, SEZ): New iterators.
6835 (SQH_postfix): New mode attribute.
6836 (SEZ_prefix): New code attribute.
6837 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
6838 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
6839 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
6841 (noncommutative_operator): Check the availability of barrel
6844 2018-04-09 Richard Biener <rguenther@suse.de>
6846 PR tree-optimization/85284
6847 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
6848 Only use the niter constraining form of simple_iv when the exit
6851 2018-04-09 Tom de Vries <tom@codesourcery.com>
6854 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
6855 (define_expand "*memory_barrier"): New define_expand.
6856 (define_insn "memory_barrier"): New insn.
6858 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
6860 PR rtl-optimization/80463
6861 PR rtl-optimization/83972
6862 PR rtl-optimization/83480
6864 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
6865 correct producer for the insn.
6866 (tidy_control_flow): Fixup seqnos in case of debug insns.
6868 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
6870 PR rtl-optimization/83913
6872 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
6873 different sched-times when merging exprs.
6875 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
6877 PR rtl-optimization/83962
6879 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
6880 tidy_fallthru_edge and tidy_control_flow.
6882 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
6884 PR rtl-optimization/83530
6886 * sel-sched.c (force_next_insn): New global variable.
6887 (remove_insn_for_debug): When force_next_insn is true, also leave only
6888 next insn in the ready list.
6889 (sel_sched_region): When the region wasn't scheduled, make another pass
6890 over it with force_next_insn set to 1.
6892 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
6894 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
6896 * config/nds32/constants.md (unspec_volatile_element): Add enum values
6897 for interrupt control.
6898 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
6899 functions for interrupt control.
6900 * config/nds32/nds32-intrinsic.md: Likewise.
6901 * config/nds32/nds32_intrinsic.h: Likewise.
6902 * config/nds32/nds32.h (nds32_builtins): Likewise.
6904 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
6906 * config/nds32/nds32.c (nds32_init_machine_status,
6907 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
6908 strict_aligned_p field.
6909 (nds32_expand_to_rtl_hook): New function.
6910 (TARGET_EXPAND_TO_RTL_HOOK): Define.
6911 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
6913 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
6914 Chung-Ju Wu <jasonwucj@gmail.com>
6916 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
6917 * config/nds32/nds32-n7.md: New file.
6918 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
6919 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
6921 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
6922 * config/nds32/nds32.md (pipeline_model): Add n7.
6923 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
6924 * config/nds32/pipelines.md: Include n7 settings.
6926 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
6927 Chung-Ju Wu <jasonwucj@gmail.com>
6929 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
6930 * config/nds32/nds32-e8.md: New file.
6931 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
6932 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
6934 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
6935 * config/nds32/nds32.md (pipeline_model): Add e8.
6936 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
6937 * config/nds32/pipelines.md: Include e8 settings.
6939 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
6940 Chung-Ju Wu <jasonwucj@gmail.com>
6942 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
6943 * config/nds32/nds32-n8.md: New file.
6944 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
6945 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
6947 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
6948 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
6949 * config/nds32/nds32.md (pipeline_model): Add n8.
6950 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
6951 * config/nds32/pipelines.md: Include n8 settings.
6953 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
6954 Chung-Ju Wu <jasonwucj@gmail.com>
6956 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
6957 * config/nds32/nds32-n9-2r1w.md: New file.
6958 * config/nds32/nds32-n9-3r2w.md: New file.
6959 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
6960 nds32_register_ports): New or modify for cpu n9.
6961 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
6963 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
6964 * config/nds32/nds32-utils.c: New file.
6965 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
6966 TARGET_MUL_SLOW): Define.
6967 * config/nds32/nds32.md (pipeline_model): New attribute.
6968 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
6969 New options that support cpu n9.
6970 * config/nds32/pipelines.md: Include n9 settings.
6971 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
6973 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
6975 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
6976 information if necessary.
6977 (output_cond_branch_compare_zero): Likewise.
6978 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
6979 (nds32_target_alignment): Refine for alignment.
6980 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
6981 (FUNCTION_BOUNDARY): Modify.
6982 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
6984 * config/nds32/nds32.opt (malways-align, malign-functions): New.
6986 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
6988 * config/nds32/constants.md (unspec_volatile_element): Add values for
6989 TLB operation and data prefetch.
6990 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
6991 functions for TLB operation and data prefetch.
6992 * config/nds32/nds32-intrinsic.md: Likewise.
6993 * config/nds32/nds32_intrinsic.h: Likewise.
6994 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
6995 (nds32_print_operand): Likewise.
6996 * config/nds32/nds32.h (nds32_builtins): Likewise.
6998 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
6999 Andrew Pinski <pinsika@gcc.gnu.org>
7002 * match.pd: Use constant_boolean_node of correct type instead of
7003 boolean_true_node or boolean_false_node for simplifying
7004 pointer comparisons to zero.
7006 2018-04-07 Jakub Jelinek <jakub@redhat.com>
7008 PR tree-optimization/80021
7009 * tree.c (verify_type_variant): Make error call in verify_variant_match
7010 translatable and remove final full stop.
7012 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
7014 * config/nds32/constants.md (unspec_volatile_element): Add
7015 UNSPEC_VOLATILE_EH_RETURN.
7016 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
7017 nds32_output_stack_pop): Support dwarf exception handling process.
7018 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
7019 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
7020 exception handling process.
7021 (nds32_compute_stack_frame): Likewise.
7022 (nds32_return_addr_rtx): Likewise.
7023 (nds32_initial_elimination_offset): Likewise.
7024 (nds32_expand_prologue): Likewise.
7025 (nds32_expand_epilogue): Likewise.
7026 (nds32_dynamic_chain_address): New function.
7027 * config/nds32/nds32.h (machine_function): Add fields for dwarf
7029 (DYNAMIC_CHAIN_ADDRESS): Define.
7030 (EH_RETURN_DATA_REGNO): Define.
7031 (EH_RETURN_STACKADJ_RTX): Define.
7032 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
7033 patterns for dwarf exception handling.
7035 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
7037 * config/nds32/nds32.h: Clean up obsolete macros.
7039 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
7041 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7042 Add enum values for particular instructions.
7043 * config/nds32/nds32-intrinsic.c: Implementation of expanding
7044 particular intrinsic functions.
7045 * config/nds32/nds32-intrinsic.md: Likewise.
7046 * config/nds32/nds32_intrinsic.h: Likewise.
7047 * config/nds32/nds32.h (nds32_builtins): Likewise.
7048 * config/nds32/nds32.md (type): Add pbsad and pbsada.
7049 (btst, ave): New patterns for particular instructions.
7051 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
7053 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7054 Add enum values for atomic load/store and memory sync.
7055 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
7057 * config/nds32/nds32-intrinsic.md: Likewise.
7058 * config/nds32/nds32_intrinsic.h: Likewise.
7059 * config/nds32/nds32.h (nds32_builtins): Likewise.
7061 2018-04-07 Jakub Jelinek <jakub@redhat.com>
7063 PR tree-optimization/85257
7064 * fold-const.c (native_encode_vector): If not all elts could fit
7065 and off is -1, return 0 rather than offset.
7066 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
7067 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
7068 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
7069 adjust buffer in native_interpret_expr call.
7071 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
7073 * config/nds32/constants.md (unspec_volatile_element): Add cache
7074 control enum values.
7075 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
7076 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
7077 * config/nds32/nds32.c (nds32_cctl_names): New.
7078 (nds32_print_operand): Handle cache control register names.
7079 * config/nds32/nds32.h (nds32_builtins): New enum values.
7080 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
7082 * config/nds32/nds32.md (type): Add mmu.
7083 * config/nds32/pipelines.md (simple_insn): Add mmu.
7085 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
7087 * config/nds32/nds32.md (type): Remove call.
7088 * config/nds32/pipelines.md (simple_insn): Likewise.
7090 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
7092 * config/nds32/constants.md (unspec_volatile_element): Add
7093 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
7094 UNSPEC_VOLATILE_FMFCFG.
7095 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
7096 description for fmfcfg and fmfcsr.
7097 (bdesc_1arg): Add fmtcsr.
7098 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
7099 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
7100 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
7101 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
7102 unspec_fmfcfg): New patterns.
7103 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
7104 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
7105 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
7106 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
7107 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
7108 __nds32__fmfcfg): Define.
7110 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
7112 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
7113 intrinsic register names.
7114 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
7115 intrinsic register enum values and macros.
7117 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
7119 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
7120 for load/store addressing form.
7121 (nds32_print_operand_address): Likewise.
7123 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
7126 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
7127 based on LABEL_REF. Remove useless assertion.
7128 (pic_address_needs_scratch): Fix formatting.
7129 (sparc_legitimize_pic_address): Minor tweaks.
7130 (sparc_delegitimize_address): Adjust assertion accordingly.
7131 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
7132 into symbolic_operand.
7133 (movsi_high_pic_label_ref): Likewise.
7134 (movsi_lo_sum_pic_label_ref): Likewise.
7135 (movdi_pic_label_ref): Likewise.
7136 (movdi_high_pic_label_ref): Likewise.
7137 (movdi_lo_sum_pic_label_ref): Likewise.
7139 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
7141 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
7142 custom LIB_SPEC setup.
7144 2018-04-06 Ruslan Bukin <br@bsdpad.com>
7145 Kito Cheng <kito.cheng@gmail.com>
7147 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
7148 * config/riscv/freebsd.h: New.
7150 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
7152 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
7153 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
7156 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
7157 Kito Cheng <kito.cheng@gmail.com>
7159 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
7160 nds32_output_call, nds32_symbol_binds_local_p): New functions.
7161 * config/nds32/nds32-protos.h (nds32_output_call,
7162 nds32_output_return): Declare.
7163 * config/nds32/nds32.md: Refine all the call and return patterns.
7165 2018-04-06 Jakub Jelinek <jakub@redhat.com>
7168 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
7169 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
7171 PR rtl-optimization/84872
7172 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
7173 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
7176 2018-04-06 Tamar Christina <tamar.christina@arm.com>
7178 * expr.c (copy_blkmode_to_reg): Revert 254862.
7179 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
7181 2018-04-06 Richard Biener <rguenther@suse.de>
7184 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
7185 after seeing a component reference with an adjacent field. Treat
7186 refs to arrays at struct end of external decls similar to
7187 refs to unconstrained commons.
7189 2018-04-06 Jakub Jelinek <jakub@redhat.com>
7192 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
7193 look through SAVE_EXPRs with non-side-effects argument. Adjust
7195 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
7198 2018-04-06 Richard Biener <rguenther@suse.de>
7201 * alias.c (find_base_term): New wrapper around find_base_term
7202 unwinding CSELIB_VAL_PTR changes.
7203 (find_base_term): Do not restore CSELIB_VAL_PTR during the
7206 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
7208 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
7210 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
7211 constant definitions.
7212 ("nop"): lr 0,0 -> nopr r0
7213 ("nop_lr0", "nop_lr1"): New insn definitions.
7215 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
7217 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
7218 NDS32_V3PUSH_AVAILABLE_P macro.
7220 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
7221 Chung-Ju Wu <jasonwucj@gmail.com>
7223 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
7224 (nds32*-*-*): Add float and fpu_config into supported_defaults.
7225 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
7226 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
7227 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
7228 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
7229 * config/nds32/constraints.md: New constraints and checking for hard
7230 float configuration.
7231 * config/nds32/iterators.md: New mode iterator and attribute for hard
7232 float configuration.
7233 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
7235 * config/nds32/nds32-fpu.md: New file.
7236 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
7237 deal with hard float code generation.
7238 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
7240 (abi_type, float_reg_number): New enum type.
7241 * config/nds32/nds32-predicates.c: New predicates for hard float.
7242 * config/nds32/nds32-protos.h: Declare functions for hard float.
7243 * config/nds32/nds32.c: Implementation for hard float configuration.
7244 * config/nds32/nds32.h: Definitions for hard float configuration.
7245 * config/nds32/nds32.md: Include hard float machine description and
7246 modify patterns for hard float configuration.
7247 * config/nds32/nds32.opt: New options for hard float configuration.
7248 * config/nds32/predicates.md: New predicates for hard float
7251 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7253 * common/config/nds32/nds32-common.c
7254 (nds32_option_optimization_table): Enable -mreleax-hint by default.
7256 2018-04-05 Jakub Jelinek <jakub@redhat.com>
7259 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
7260 CONSTRUCTOR_ELT (ctor, ...)->value.
7262 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
7265 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
7267 2018-04-05 Tom de Vries <tom@codesourcery.com>
7270 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
7273 2018-04-05 Shiva Chen <shiva0217@gmail.com>
7274 Kito Cheng <kito.cheng@gmail.com>
7276 * config/nds32/constraints.md (U33): Fine-tune checking condition.
7277 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
7278 * config/nds32/nds32.h (nds32_16bit_address_type): Add
7279 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
7281 2018-04-05 Shiva Chen <shiva0217@gmail.com>
7282 Kito Cheng <kito.cheng@gmail.com>
7284 * config/nds32/constraints.md (Ufe): New memory constraint.
7285 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
7286 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
7287 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
7289 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
7290 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
7292 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
7294 * config/nds32/nds32.md: Use optimize_size in the condition for
7295 alu-shift instructions.
7297 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
7299 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
7301 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
7303 * config/nds32/nds32.md (negsi2): Refine pattern.
7305 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
7306 Chung-Ju Wu <jasonwucj@gmail.com>
7308 * config/nds32/iterators.md (shift_rotate): New code iterator.
7309 (shift): New code attribute.
7310 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
7311 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
7312 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
7313 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
7314 bit-wise operations.
7315 (andsi3, *andsi3): Ditto.
7316 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
7317 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
7318 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
7319 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
7320 nds32_ior_operand, nds32_xor_operand): New predicates.
7322 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
7324 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
7325 (addsi3, subsi3): ... this.
7327 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
7329 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
7331 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
7333 * config/nds32/nds32.md: Adjust indention.
7335 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
7337 * config/nds32/nds32.md (feature): New attribute.
7339 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
7341 * config/nds32/nds32.md (subtype): New attribute.
7343 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
7346 * config/arm/arm-builtins.c (arm_expand_builtin): Change
7347 expansion to perform a bitwise AND of the argument followed by a
7348 boolean negation of the result.
7350 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
7352 PR rtl-optimization/84878
7353 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
7354 the basic block. Assert the use reference is not artificial and that
7355 it has an associated insn.
7357 2018-04-04 Michael Matz <matz@suse.de>
7359 * builtins.c (compute_objsize): Pass correct operand
7360 to array_at_struct_end_p.
7362 2018-04-04 Richard Biener <rguenther@suse.de>
7365 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
7366 from contexts for DINFO_LEVEL_TERSE and below.
7368 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
7370 * config/nds32/nds32-doubleword.md (move_<mode>): Require
7371 resiter_operand condition.
7372 * config/nds32/nds32.md (*move<mode>): Ditto.
7374 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
7375 Monk Chiang <sh.chiang04@gmail.com>
7377 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
7379 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
7381 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
7383 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
7384 Kito Cheng <kito.cheng@gmail.com>
7386 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
7387 nds32_cond_code_str, output_cond_branch,
7388 output_cond_branch_compare_zero, nds32_expand_cbranch,
7389 nds32_expand_cstore, nds32_expand_movcc,
7390 nds32_output_cbranchsi4_equality_zero,
7391 nds32_output_cbranchsi4_equality_reg,
7392 nds32_output_cbranchsi4_equality_reg_or_const_int,
7393 nds32_output_cbranchsi4_greater_less_zero: New functions.
7394 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
7395 nds32_expand_cstore, nds32_expand_movcc,
7396 nds32_output_cbranchsi4_equality_zero,
7397 nds32_output_cbranchsi4_equality_reg,
7398 nds32_output_cbranchsi4_equality_reg_or_const_int,
7399 nds32_output_cbranchsi4_greater_less_zero): Declare.
7400 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
7401 nds32_rimm11s_operand): New predicates.
7402 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
7403 * config/nds32/nds32.md: Rewrite all the branch and conditional move
7406 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
7408 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
7409 * config/nds32/nds32.md: Ditto.
7410 * config/nds32/pipelines.md: Ditto.
7412 2018-04-04 Richard Biener <rguenther@suse.de>
7414 PR tree-optimization/85168
7415 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
7416 propagating abnormals.
7418 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
7420 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
7422 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
7423 Kito Cheng <kito.cheng@gmail.com>
7425 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
7426 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
7427 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
7428 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
7429 * config/nds32/nds32.md (sibcall_internal): New.
7430 (sibcall_register): Remove.
7431 (sibcall_immediate): Remove.
7432 (sibcall_value_internal): New.
7433 (sibcall_value_register): Remove.
7434 (sibcall_value_immediate): Remove.
7435 * config/nds32/predicates.md (nds32_general_register_operand): New.
7436 (nds32_call_address_operand): New.
7438 2018-04-03 Jakub Jelinek <jakub@redhat.com>
7440 PR rtl-optimization/85167
7441 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
7442 bb_defs if *split_p, instead preinitialize it to NULL.
7444 PR tree-optimization/85156
7445 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
7446 evaluating the argument multiple times.
7448 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
7450 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
7452 (_mm_cvtpd_ps): Likewise.
7453 (_mm_cvttpd_epi32): Likewise.
7454 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
7455 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
7456 vector, pixel, and bool following altivec.h include.
7458 2018-04-03 Martin Sebor <msebor@redhat.com>
7460 * doc/extend.texi (Common Function Attributes): Clarify.
7461 (const attribute): Likewise.
7462 (pure attribute): Likewise.
7464 2018-04-03 Jakub Jelinek <jakub@redhat.com>
7467 * config/i386/i386.c (ix86_expand_vector_set): Use
7468 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
7470 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
7472 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
7473 instructions when changing rounding bits to preserve precision bits
7474 in the x87 control word.
7476 2018-04-03 Martin Liska <mliska@suse.cz>
7478 PR tree-optimization/82491
7479 * rtl.h (strip_offset_and_add): Replace += suboffset with
7480 poly_uint64 () + suboffset.
7482 2018-03-29 Martin Liska <mliska@suse.cz>
7483 Martin Jambor <mjambor@suse.cz>
7486 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
7487 param_type is not an integral or pointer type.
7489 2018-04-03 Richard Biener <rguenther@suse.de>
7491 * sese.h (recompute_all_dominators): Remove.
7493 2018-04-02 Martin Sebor <msebor@redhat.com>
7495 * doc/invoke.texi (-Wrestrict): Fix typos.
7497 2018-04-02 Jim Wilson <jimw@sifive.com>
7499 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
7500 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
7501 (<optab>di3, <optab>si3_extend): Likewise.
7502 (<optab>si3_mask, <optab>si3_mask_1): New.
7503 (<optab>di3_mask, <optab>di3_mask_1): New.
7504 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
7505 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
7506 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
7508 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
7510 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
7513 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
7515 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
7516 (nds32_canonicalize_comparison): New function.
7518 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
7519 Kito Cheng <kito.cheng@gmail.com>
7520 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7522 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
7523 * config/nds32/constants.md (unspec_volatile_element): Add
7524 UNSPEC_VOLATILE_RELAX_GROUP.
7525 * config/nds32/nds32-relax-opt.c: New file.
7526 * config/nds32/nds32-predicates.c
7527 (nds32_symbol_load_store_p): New function.
7528 * config/nds32/nds32-protos.h
7529 (nds32_symbol_load_store_p): Declare function.
7530 (make_pass_nds32_relax_opt): Declare new rtl pass function.
7531 * config/nds32/nds32.c
7532 (nds32_register_pass): New function to register pass.
7533 (nds32_register_passes): New function to register passes.
7534 * config/nds32/nds32.md (relax_group): New pattern.
7535 * config/nds32/nds32.opt (mrelax-hint): New option.
7536 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
7538 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
7540 * config/nds32/t-nds32: Modify files dependency.
7542 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
7544 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
7545 (PROFILE_HOOK): Define its implementation.
7547 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
7549 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
7550 type and 32-bit size.
7552 2018-04-01 Jakub Jelinek <jakub@redhat.com>
7555 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
7556 (V_128_256): New mode iterator.
7557 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
7558 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
7559 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
7561 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
7562 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
7564 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
7567 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
7568 NaN inputs correctly.
7570 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
7573 * config/rs6000/vsx.md (??r): New mode attribute.
7574 (*vsx_mov<mode>_64bit): Use it.
7575 (*vsx_mov<mode>_32bit): Likewise.
7577 2018-03-30 Martin Sebor <msebor@redhat.com>
7579 PR tree-optimization/84818
7580 * builtins.c (check_access): Use warning_n.
7582 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
7585 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
7587 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
7590 2018-03-30 Julia Koval <julia.koval@intel.com>
7593 * x86-tune.def (movx, partial_reg_dependency): Enable for
7596 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
7599 * lra-constraints.c (process_alt_operands): Move setting
7600 this_alternative_matches below.
7602 2018-03-29 Martin Liska <mliska@suse.cz>
7605 * doc/invoke.texi: Document how LTO works with debug info.
7606 Describe auto-load support of binutils. Mention 'x86-64'
7607 as valid option value of -march option.
7609 2018-03-29 Jakub Jelinek <jakub@redhat.com>
7611 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
7614 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
7615 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
7616 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
7619 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
7622 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
7623 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
7624 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
7625 for RS6000_BTM_POWERPC64.
7626 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
7627 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
7628 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
7633 2018-03-28 Carl Love <cel@us.ibm.com>
7636 2017-09-27 Carl Love <cel@us.ibm.com>
7638 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
7639 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
7640 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
7643 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7645 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
7646 instead of __vector bool.
7647 (_mm_max_pu8): Likewise.
7648 (_mm_min_pi16): Likewise.
7650 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
7653 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
7654 (DIVWEUO): Likewise.
7656 (DIVDEUO): Likewise.
7657 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
7658 DIVWEUO and DIVDEUO.
7659 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
7660 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
7661 (div_extend): Likewise.
7662 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
7664 (__builtin_divweuo): Likewise.
7665 (__builtin_divdeo): Likewise.
7666 (__builtin_divdeuo): Likewise.
7668 2018-03-28 Jakub Jelinek <jakub@redhat.com>
7671 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
7672 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
7674 PR tree-optimization/82004
7675 * gimple-match-head.c (optimize_pow_to_exp): New function.
7676 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
7677 Don't fold to exp if optimize_pow_to_exp is false.
7679 2018-03-28 Martin Liska <mliska@suse.cz>
7682 * calls.c (initialize_argument_information): Fix trailing space.
7683 * common.opt: Fix typo and provide better explanation for
7684 -fsanitize-coverage option.
7685 * config/i386/i386.opt: Fix typo.
7687 2018-03-28 Jakub Jelinek <jakub@redhat.com>
7688 Martin Liska <mliska@suse.cz>
7691 * gimplify.c (asan_poison_variable): Don't do the check for
7692 gimplify_omp_ctxp here.
7693 (gimplify_decl_expr): Do it here.
7694 (gimplify_target_expr): Likewise.
7696 2018-03-28 Martin Liska <mliska@suse.cz>
7699 * config/i386/i386.c (ix86_function_arg_advance): Do not call
7700 chkp_type_bounds_count if MPX is not enabled.
7702 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
7704 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
7706 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
7709 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
7710 function to create the function decl for complex long double
7711 multiply and divide for -mabi=ieeelongdouble.
7712 (init_float128_ieee): Call it.
7714 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
7717 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
7718 -fcf-protection=branch -mibt.
7719 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
7721 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7724 * config/arm/arm.c (arm_valid_symbolic_address): Handle
7725 arm_word_relocations.
7727 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
7730 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
7731 extern array declarations.
7733 2018-03-27 Richard Biener <rguenther@suse.de>
7736 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
7737 explicit single_use checks.
7739 2018-03-27 Richard Biener <rguenther@suse.de>
7741 PR tree-optimization/85082
7742 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
7745 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7747 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
7748 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
7749 Turn on fasynchronous-unwind-tables and funwind-tables.
7751 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
7754 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
7755 (*bmi_blsr_<mode>_ccz): Ditto.
7757 2018-03-26 Tom de Vries <tom@codesourcery.com>
7759 PR tree-optimization/85063
7760 * omp-general.c (offloading_function_p): New function. Factor out
7762 * omp-offload.c (pass_omp_target_link::gate): ... here.
7763 * omp-general.h (offloading_function_p): Declare.
7764 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
7765 with attribute omp declare target for offloading functions.
7767 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
7769 PR tree-optimization/84005
7770 * tree-data-ref.h (get_base_for_alignment): Declare.
7771 * tree-data-ref.c (get_base_for_alignment_1): New function.
7772 (get_base_for_alignment): Likewise.
7773 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
7774 get_base_for_alignment to find a suitable base object, instead
7775 of always using drb->base_address.
7777 2018-03-23 Jakub Jelinek <jakub@redhat.com>
7780 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
7781 known size by default.
7783 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
7786 * lra-constraints.c (process_alt_operands): Don't match BLKmode
7787 and non BLKmode operands.
7789 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7792 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
7793 Clean up attributes.
7795 2018-03-23 Richard Biener <rguenther@suse.de>
7798 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
7799 we are going to emit early debug for LTO.
7801 2018-03-23 Jakub Jelinek <jakub@redhat.com>
7804 * function.c (match_asm_constraints_1): Don't optimize if input
7805 doesn't satisfy general_operand predicate for output's mode.
7808 * alias.c (write_dependence_p): Don't require for x_canonicalized
7809 non-VOIDmode if x has VOIDmode.
7812 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
7813 just don't try to optimize it rather than assert it never happens.
7815 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
7817 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
7818 macro expansions for definition of ST_INTERNAL_<mode> and
7819 LD_INTERNAL_<mode> builtins.
7820 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
7822 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
7824 (altivec_expand_st_builtin): Likewise.
7825 (altivec_expand_builtin): Remove calls to deleted functions.
7826 (rs6000_address_for_altivec): Delete this function.
7827 * config/rs6000/vector.md: Remove expands for
7828 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
7830 2018-03-22 Sudakshina Das <sudi.das@arm.com>
7833 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
7834 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
7835 re-computing once computed.
7836 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
7837 (arm_init_machine_status): Initialize
7838 machine->static_chain_stack_bytes.
7840 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
7843 * doc/extend.texi: Add four new prototypes for vec_ld.
7844 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
7845 definitions for more logical presentation.
7846 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
7847 entries for V1TI variants of __builtin_altivec_ld builtin.
7848 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
7849 handling of V1TI variant of LVX icode pattern.
7850 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
7851 (rs6000_gimple_fold_builtin): Likewise.
7852 (altivec_init_builtins): Add code to define
7853 __builtin_altivec_lvx_v1ti function.
7855 2018-03-22 Jakub Jelinek <jakub@redhat.com>
7858 * function.c (match_asm_constraints_1): Don't do the optimization
7859 if input isn't a REG, SUBREG, MEM or constant.
7861 2018-03-22 Tom de Vries <tom@codesourcery.com>
7863 PR tree-optimization/84956
7864 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
7865 bb_has_abnormal_pred.
7867 2018-03-22 Jakub Jelinek <jakub@redhat.com>
7870 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
7871 DECL_INITIAL (decl) to decl at the end.
7872 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
7875 2018-03-21 Joseph Myers <joseph@codesourcery.com>
7877 * doc/extend.texi (__builtin_tgmath): Document when complex
7878 integer types are treated as _Complex _Float64.
7880 2018-03-21 Tom de Vries <tom@codesourcery.com>
7882 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
7884 2018-03-21 Jakub Jelinek <jakub@redhat.com>
7886 PR tree-optimization/84960
7887 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
7888 if it is ENTRY block, move them into single succ of ENTRY in that case.
7890 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
7892 PR tree-optimization/84811
7893 * poly-int.h (poly_span_traits): Remove the T3 parameter and
7894 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
7895 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
7896 (known_subrange_p): Update accordingly. Cast each value involved
7897 in the size comparison, rather than casting the result of the
7900 2018-03-21 Jakub Jelinek <jakub@redhat.com>
7902 PR tree-optimization/84982
7903 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
7904 by flipping the least significant bit rather than all bits from
7905 bitpos to bitpos + bitsize - 1.
7907 2018-03-21 Nathan Sidwell <nathan@acm.org>
7909 * doc/extend.texi (Deprecated Features): Remove mention of
7910 long-deleted deprecations.
7912 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7915 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
7916 * configure: Regenerate.
7918 2018-03-21 Tom de Vries <tom@codesourcery.com>
7920 PR tree-optimization/83126
7921 * tree-parloops.c (num_phis): New function.
7922 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
7924 2018-03-21 Nathan Sidwell <nathan@acm.org>
7926 * doc/extend.texi (Deprecated Features): Update deprecated flags,
7927 mention anon-struct/union members and trailing attributes.
7929 2018-03-21 Bin Cheng <bin.cheng@arm.com>
7931 PR tree-optimization/84969
7932 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
7933 builtin memset partitions if they set different rhs values.
7935 2018-03-21 Jakub Jelinek <jakub@redhat.com>
7937 PR rtl-optimization/84989
7938 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
7939 VEC_DUPLICATE with scalar result mode.
7941 2018-03-21 Martin Liska <mliska@suse.cz>
7944 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
7945 not intended return statement.
7947 2018-03-21 Martin Liska <mliska@suse.cz>
7950 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
7951 (chkp_find_bound_slots_1): Limit number of iterations.
7953 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
7956 * Minor grammar fixes for x86 options.
7958 2018-03-20 Jakub Jelinek <jakub@redhat.com>
7961 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
7962 holding REG_CFA_RESTORE notes, instead turn them into a USE.
7964 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
7967 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
7968 (altivec_lvx_<mode>_1op): Likewise.
7969 (altivec_stvx_<mode>_2op): Likewise.
7970 (altivec_stvx_<mode>_1op): Likewise.
7971 (altivec_lvx_<VM2:mode>): New define_expand.
7972 (altivec_stvx_<VM2:mode>): Likewise.
7973 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
7974 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
7975 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
7976 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
7977 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
7978 (rs6000_gen_lvx): Likewise.
7979 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
7980 (altivec_expand_stv_builtin): Likewise.
7981 (altivec_expand_builtin): Likewise.
7982 * config/rs6000/vector.md: Likewise.
7984 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7987 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
7990 2018-03-20 Richard Biener <rguenther@suse.de>
7993 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
7994 sign-conversions as zero, fall back to standard scalar_stmt
7997 2018-03-20 Martin Liska <mliska@suse.cz>
8000 * predict.c (rebuild_frequencies): Handle case when we have
8001 PROFILE_ABSENT, but flag_guess_branch_prob is false.
8003 2018-03-20 Jakub Jelinek <jakub@redhat.com>
8006 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
8007 flag_section_anchors.
8008 * varasm.c (use_blocks_for_decl_p): Remove hack for
8009 dw2_force_const_mem.
8012 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
8014 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
8015 be created, use lowpart_subreg of operands[0] rather than operands[0]
8017 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
8018 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
8019 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
8020 and n constraint instead of aarch64_shift_imm_di and Usd.
8021 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
8022 (*aarch64_<optab>_reg_minus<mode>3): ... this.
8024 2018-03-20 Sudakshina Das <sudi.das@arm.com>
8027 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
8028 to favor GPR over NEON registers.
8029 (<shift>di3_neon): Likewise.
8031 2018-03-20 Tom de Vries <tom@codesourcery.com>
8034 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
8035 (nvptx_process_pars): Emit bar.sync asap and alap.
8037 2018-03-20 Tom de Vries <tom@codesourcery.com>
8040 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
8041 seen_label if seen_label is already set.
8043 2018-03-20 Jakub Jelinek <jakub@redhat.com>
8046 * config/i386/i386.c (fold_builtin_cpu): For features above 31
8047 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
8048 Use 1U instead of 1. Formatting fixes.
8051 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
8052 instead of TREE_TYPE (s1) for the return value.
8054 2018-03-19 Jakub Jelinek <jakub@redhat.com>
8056 PR tree-optimization/84946
8057 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
8058 bitsize + bitsize in poly_uint64 rather than poly_int64.
8061 * dwarf2asm.c: Include fold-const.c.
8062 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
8063 of decl rather than decl itself.
8065 PR rtl-optimization/84643
8066 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
8068 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
8071 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
8072 calling assemble_variable.
8074 2018-03-19 Sudakshina Das <sudi.das@arm.com>
8077 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
8078 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
8080 2018-03-19 Jim Wilson <jimw@sifive.com>
8083 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
8084 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
8085 (riscv_first_stack_step): Likewise.
8086 (riscv_option_override): Use STACK_BOUNDARY instead of
8088 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
8090 (BIGGEST_ALIGNMENT): Set to 128.
8091 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
8092 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
8095 2018-03-19 Richard Biener <rguenther@suse.de>
8097 PR tree-optimization/84933
8098 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
8099 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
8101 2018-03-19 Richard Biener <rguenther@suse.de>
8103 PR tree-optimization/84859
8104 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
8105 (cond_if_else_store_replacement): Perform sinking operation on
8106 single-store BBs regardless of MAX_STORES_TO_SINK setting.
8107 Generalize what a BB with a single eligible store is.
8109 2018-03-19 Richard Biener <rguenther@suse.de>
8111 PR tree-optimization/84929
8112 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
8113 chrec_is_positive against non-chrec arg.
8115 2018-03-19 Tamar Christina <tamar.christina@arm.com>
8118 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
8120 2018-03-18 Martin Liska <mliska@suse.cz>
8122 PR rtl-optimization/84635
8123 * regrename.c (build_def_use): Use matches_mode only when
8126 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
8128 PR tree-optimization/84913
8129 * tree-vect-loop.c (vectorizable_reduction): Don't try to
8130 vectorize chains of COND_EXPRs.
8132 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
8134 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
8136 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
8138 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
8140 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
8142 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
8144 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
8145 Kito Cheng <kito.cheng@gmail.com>
8147 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
8148 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
8149 (nds32_adjust_reg_alloc_order): New function.
8150 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
8152 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
8154 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
8155 nds32_print_operand, nds32_print_operand_address): Use
8156 HOST_WIDE_INT_PRINT_DEC instead.
8158 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
8160 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
8162 2018-03-17 Jakub Jelinek <jakub@redhat.com>
8165 * config/i386/i386.c (initial_ix86_tune_features,
8166 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
8168 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
8169 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
8170 rather than 1u << ix86_tune. Formatting fix.
8171 (ix86_option_override_internal): Change ix86_arch_mask from
8172 unsigned int to unsigned HOST_WIDE_INT, initialize to
8173 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
8174 (ix86_function_specific_restore): Likewise.
8176 2018-03-16 Jakub Jelinek <jakub@redhat.com>
8179 * postreload.c (reload_combine_recognize_pattern): Perform
8180 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
8181 truncate_int_for_mode the result for the destination's mode.
8184 * hsa-gen.c (mem_type_for_type): Fix comment typo.
8185 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
8187 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
8190 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
8193 * lra-assigns.c (lra_split_hard_reg_for): Don't use
8194 regno_allocno_class_array and sorted_pseudos.
8195 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
8196 insns where regno is used.
8198 2018-03-16 Martin Liska <mliska@suse.cz>
8201 * multiple_target.c (create_dispatcher_calls): Redirect
8202 reference in the symbol table.
8204 2018-03-16 Martin Liska <mliska@suse.cz>
8207 * multiple_target.c (create_dispatcher_calls): Redirect also
8210 2018-03-16 Jakub Jelinek <jakub@redhat.com>
8214 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
8215 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
8216 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
8218 2018-03-16 Julia Koval <julia.koval@intel.com>
8220 * doc/invoke.texi (Skylake Server): Add CLWB.
8221 Cannonlake): Remove CLWB.
8223 2018-03-16 Jakub Jelinek <jakub@redhat.com>
8225 PR tree-optimization/84841
8226 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
8228 (FLOAT_ONE_CONST_TYPE): Define.
8229 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
8230 (sort_by_operand_rank): Put entries with higher constant_type last
8231 rather than first to match comments.
8233 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
8235 * config/nios2/nios2.md (movsi_internal): Fix thinko in
8238 2018-03-15 Jakub Jelinek <jakub@redhat.com>
8241 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
8242 check and use address of target always.
8244 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
8247 * config/i386/i386.c (indirect_thunk_needed): Update comments.
8248 (indirect_thunk_bnd_needed): Likewise.
8249 (indirect_thunks_used): Likewise.
8250 (indirect_thunks_bnd_used): Likewise.
8251 (indirect_return_needed): New.
8252 (indirect_return_bnd_needed): Likewise.
8253 (output_indirect_thunk_function): Add a bool argument for
8255 (output_indirect_thunk_function): Don't generate alias for
8256 function return thunk.
8257 (ix86_code_end): Call output_indirect_thunk_function to generate
8258 function return thunks.
8259 (ix86_output_function_return): Set indirect_return_bnd_needed
8260 and indirect_return_needed instead of indirect_thunk_bnd_needed
8261 and indirect_thunk_needed.
8263 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
8265 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
8266 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
8267 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
8269 2018-03-15 David Malcolm <dmalcolm@redhat.com>
8270 Paul Hua <paul.hua.gm@gmail.com>
8273 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
8275 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
8277 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
8278 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
8281 2018-03-15 Tamar Christina <tamar.christina@arm.com>
8284 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
8285 instead of GET_MODE_SIZE when comparing Units.
8287 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8290 * varasm.c (hash_section): Return an unchangeble hash value
8291 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
8292 Return !aarch64_can_use_per_function_literal_pools_p ().
8294 2018-03-15 Jakub Jelinek <jakub@redhat.com>
8297 * optabs.c (emit_conditional_move): Pass address of cmode's copy
8298 rather than address of cmode as last argument to prepare_cmp_insn.
8300 2018-03-15 Julia Koval <julia.koval@intel.com>
8302 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
8303 F_AVX512VNNI, F_AVX512BITALG): New.
8305 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
8308 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
8309 insn for floating-point loads and stores.
8311 2018-03-14 Carl Love <cel@us.ibm.com>
8313 * config/rs6000/rs6000-c.c: Add macro definitions for
8314 ALTIVEC_BUILTIN_VEC_PERMXOR.
8315 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
8316 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
8317 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
8318 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
8320 * config/doc/extend.texi: Add prototypes for vec_permxor.
8322 2018-03-14 David Malcolm <dmalcolm@redhat.com>
8325 * diagnostic-show-locus.c (class layout_point): Convert m_line
8326 from int to linenum_type.
8327 (line_span::comparator): Use linenum "compare" function when
8328 comparing line numbers.
8329 (test_line_span): New function.
8330 (layout_range::contains_point): Convert param "row" from int to
8332 (layout_range::intersects_line_p): Likewise.
8333 (layout::will_show_line_p): Likewise.
8334 (layout::print_source_line): Likewise.
8335 (layout::should_print_annotation_line_p): Likewise.
8336 (layout::print_annotation_line): Likewise.
8337 (layout::print_leading_fixits): Likewise.
8338 (layout::annotation_line_showed_range_p): Likewise.
8339 (struct line_corrections): Likewise for field m_row.
8340 (line_corrections::line_corrections): Likewise for param "row".
8341 (layout::print_trailing_fixits): Likewise.
8342 (layout::get_state_at_point): Likewise.
8343 (layout::get_x_bound_for_row): Likewise.
8344 (layout::print_line): Likewise.
8345 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
8346 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
8347 * input.c (selftest::test_linenum_comparisons): New function.
8348 (selftest::input_c_tests): Call it.
8349 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
8350 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
8351 * selftest.h (ASSERT_GT): New macro.
8352 (ASSERT_GT_AT): New macro.
8353 (ASSERT_LT): New macro.
8354 (ASSERT_LT_AT): New macro.
8356 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
8358 PR rtl-optimization/84780
8359 * combine.c (distribute_links): Don't make a link based on pc_rtx.
8361 2018-03-14 Martin Liska <mliska@suse.cz>
8363 * tree.c (record_node_allocation_statistics): Use
8364 get_stats_node_kind.
8365 (get_stats_node_kind): New function extracted from
8366 record_node_allocation_statistics.
8367 (free_node): Use get_stats_node_kind.
8369 2018-03-14 Richard Biener <rguenther@suse.de>
8371 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
8372 that the value-set of ANTIC_IN doesn't grow.
8375 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
8377 (BB_VISITED_WITH_VISITED_SUCCS): New define.
8378 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
8380 2018-03-14 Julia Koval <julia.koval@intel.com>
8382 * config.gcc (icelake-client, icelake-server): New.
8384 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
8385 (initial_ix86_arch_features): Ditto.
8386 (PTA_SKYLAKE): Add SGX.
8387 (PTA_ICELAKE): Remove.
8388 (PTA_ICELAKE_CLIENT): New.
8389 (PTA_ICELAKE_SERVER): New.
8390 (ix86_option_override_internal): Split up icelake on icelake client and
8392 (get_builtin_code_for_version): Ditto.
8393 (fold_builtin_cpu): Ditto.
8394 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
8395 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
8396 * config/i386/i386.h (processor_type): Ditto.
8397 * doc/invoke.texi: Ditto.
8399 2018-03-14 Jakub Jelinek <jakub@redhat.com>
8402 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
8403 INTEGER_CST offset, add it together with bitpos / 8 and
8404 sign extend based on POINTER_SIZE.
8408 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
8411 * config/i386/constraints.md (Yc): New register constraint.
8412 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
8413 Use Yc constraint for alternative 2 of operand 0. Remove
8414 preferred_for_speed attribute.
8416 2018-03-14 Richard Biener <rguenther@suse.de>
8418 PR tree-optimization/84830
8419 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
8420 with the old one to avoid oscillations.
8422 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
8425 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
8427 (assign_by_spills): Return a flag of reload assignment failure.
8428 Do not process the reload assignment failures. Do not spill other
8429 reload pseudos if they has the same reg class. Update n if
8431 (lra_assign): Add a return arg. Set up from the result of
8432 assign_by_spills call.
8433 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
8434 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
8435 usage_insns if it is not NULL.
8436 (spill_hard_reg_in_range): New function.
8437 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
8438 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
8439 function prototypes.
8440 (lra_assign): Change prototype.
8441 * lra.c (lra): Add code to deal with fails by splitting hard reg
8444 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
8446 * config/riscv/riscv.opt (mrelax): New option.
8447 * config/riscv/riscv.c (riscv_file_start): Emit ".option
8448 "norelax" when riscv_mrelax is disabled.
8449 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
8451 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
8454 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
8455 reassociation for int modes.
8457 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
8459 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
8460 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
8462 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
8463 * config/aarch64/aarch64-sve.md
8464 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
8465 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
8466 (*extend<mode><Vwide>2): Rename to...
8467 (aarch64_sve_extend<mode><Vwide>2): ...this.
8468 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
8469 renaming the old pattern to...
8470 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
8472 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
8473 define_expand, renaming the old pattern to...
8474 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
8475 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
8476 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
8477 account when deciding which SVE instruction the optab should use.
8478 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
8480 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
8482 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
8483 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
8484 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
8485 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
8486 (tlsdesc_small_<mode>): Turn a define_expand and use
8487 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
8488 (tlsdesc_small_advsimd_<mode>): ...this.
8489 (tlsdesc_small_sve_<mode>): New pattern.
8491 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
8493 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
8494 (UNSPEC_UMUL_HIGHPART): New constants.
8495 (MUL_HIGHPART): New int iteraor.
8496 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
8497 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
8499 (*<su>mul<mode>3_highpart): New define_insn.
8501 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
8504 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
8507 2018-03-13 Martin Liska <mliska@suse.cz>
8510 * (sem_item_optimizer::sem_item_optimizer): Initialize new
8512 (sem_item_optimizer::~sem_item_optimizer): Release it.
8513 (sem_item_optimizer::merge_classes): Register variable aliases.
8514 (sem_item_optimizer::fixup_pt_set): New function.
8515 (sem_item_optimizer::fixup_points_to_sets): Likewise.
8516 * ipa-icf.h: Declare new variables and functions.
8518 2018-03-13 Jakub Jelinek <jakub@redhat.com>
8521 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
8522 integer_pow2p@2 and test integer_pow2p in condition.
8523 (A < 0 ? C : 0): Similarly for @1.
8526 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
8527 characters starting at p contain '\0' character, don't look beyond
8531 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
8532 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
8535 * reg-stack.c (change_stack): Change update_end var from int to
8536 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
8537 also call set_block_for_insn on the newly added insns and rescan.
8540 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
8541 on the last operand.
8544 * tree.c (stabilize_reference_1): Return save_expr (e) for
8545 STATEMENT_LIST even if it doesn't have side-effects.
8547 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
8549 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
8551 2018-03-12 Renlin Li <renlin.li@arm.com>
8553 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
8554 aarch64_output_scalar_simd_mov_immediate.
8556 2018-03-12 Martin Sebor <msebor@redhat.com>
8558 PR tree-optimization/83456
8559 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
8560 for perfectly overlapping calls to memcpy.
8561 (gimple_fold_builtin_memory_chk): Same.
8562 (gimple_fold_builtin_strcpy): Handle no-warning.
8563 (gimple_fold_builtin_stxcpy_chk): Same.
8564 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
8566 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
8568 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
8569 parameter. Use it for SFmode.
8570 (rs6000_function_arg_advance_1): Adjust.
8571 (rs6000_function_arg): Adjust.
8572 (rs6000_gimplify_va_arg): Pass false for that new parameter.
8574 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
8576 PR rtl-optimization/84169
8577 PR rtl-optimization/84780
8578 * combine.c (can_combine_p): Check for a 2-insn combination whether
8579 the destination register is used between the two insns, too.
8581 2018-03-12 Richard Biener <rguenther@suse.de>
8583 PR tree-optimization/84803
8584 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
8585 for refs DR analysis didn't process.
8587 2018-03-12 Richard Biener <rguenther@suse.de>
8589 PR tree-optimization/84777
8590 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
8591 force-vectorize loops ignore whether we are optimizing for size.
8593 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
8595 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
8596 (TARGET_MD_ASM_ADJUST): Define.
8598 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
8599 Kito Cheng <kito.cheng@gmail.com>
8600 Chung-Ju Wu <jasonwucj@gmail.com>
8602 * config/nds32/nds32.c (nds32_compute_stack_frame,
8603 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
8604 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
8605 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
8606 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
8607 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
8608 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
8609 * config/nds32/nds32.md (prologue, epilogue): Use macro
8610 NDS32_V3PUSH_AVAILABLE_P to do checking.
8612 2018-03-11 Jakub Jelinek <jakub@redhat.com>
8615 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
8616 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
8617 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
8618 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
8619 addition of most attributes on !orig_type_die or the attribute not
8620 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
8622 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
8623 Chung-Ju Wu <jasonwucj@gmail.com>
8625 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
8627 * config/nds32/nds32.opt (mvh): New option.
8629 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
8630 Chung-Ju Wu <jasonwucj@gmail.com>
8632 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
8634 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
8635 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
8638 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
8639 Chung-Ju Wu <jasonwucj@gmail.com>
8641 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
8643 * config/nds32/nds32-multiple.md (strlensi): New pattern.
8644 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
8646 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
8647 Kito Cheng <kito.cheng@gmail.com>
8648 Chung-Ju Wu <jasonwucj@gmail.com>
8650 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
8651 UNSPEC_FFMISM and UNSPEC_FLMISM.
8652 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
8653 for ffb, ffmism and flmism.
8654 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
8655 (unspec_ffmism): Ditto.
8656 (unspec_flmism): Ditto.
8657 (nds32_expand_builtin_impl): Check if string extension is available.
8658 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
8659 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
8661 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
8664 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
8667 * lra-assigns.c (assign_by_spills): Return a flag of reload
8668 assignment failure. Do not process the reload assignment
8669 failures. Do not spill other reload pseudos if they has the same
8671 (lra_assign): Add a return arg. Set up from the result of
8672 assign_by_spills call.
8673 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
8674 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
8675 usage_insns if it is not NULL.
8676 (spill_hard_reg_in_range): New function.
8677 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
8678 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
8679 function prototypes.
8680 (lra_assign): Change prototype.
8681 * lra.c (lra): Add code to deal with fails by splitting hard reg
8684 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
8687 * config/i386/i386.opt: Replace Enforcment with Enforcement.
8689 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
8692 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
8693 (dw_val_node): Add val_symbolic_view.
8694 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
8695 (symview_upper_bound): New.
8696 (new_line_info_table): Initialize symviews_since_reset.
8697 (dwarf2out_source_line): Count symviews_since_reset and set
8698 symview_upper_bound.
8699 (dw_val_equal_p): Handle symview.
8700 (add_AT_symview): New.
8701 (print_dw_val): Handle symview.
8702 (attr_checksum, attr_checksum_ordered): Likewise.
8703 (same_dw_val_p, size_of_die): Likewise.
8704 (value_format, output_die): Likewise.
8705 (add_high_low_attributes): Use add_AT_symview for entry_view.
8706 (dwarf2out_finish): Reset symview_upper_bound, clear
8709 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
8712 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
8713 Add strict argument and use it.
8714 (rs6000_split_multireg_move): Update for new strict argument.
8715 (mem_operand_gpr): Disallow all non-offsettable addresses.
8716 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
8718 2018-03-09 Jakub Jelinek <jakub@redhat.com>
8721 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
8722 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
8723 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
8726 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
8727 decl, use remap_type if we want to use the type.
8729 2018-03-09 Martin Sebor <msebor@redhat.com>
8731 PR tree-optimization/84526
8732 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
8734 (builtin_access::generic_overlap): Be prepared to handle non-array
8737 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
8739 PR rtl-optimization/84682
8740 * lra-constraints.c (process_address_1): Check is_address flag
8741 for address constraints.
8742 (process_alt_operands): Likewise.
8743 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
8744 preprocess_constraints.
8745 * recog.h (preprocess_constraints): Add oploc parameter.
8747 * recog.c (preprocess_constraints): Test address_operand for
8748 CT_ADDRESS constraints.
8750 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
8753 * lra-assigns.c (assign_by_spills): Return a flag of reload
8754 assignment failure. Do not process the reload assignment
8755 failures. Do not spill other reload pseudos if they has the same
8757 (lra_assign): Add a return arg. Set up from the result of
8758 assign_by_spills call.
8759 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
8760 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
8761 usage_insns if it is not NULL.
8762 (spill_hard_reg_in_range): New function.
8763 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
8764 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
8765 function prototypes.
8766 (lra_assign): Change prototype.
8767 * lra.c (lra): Add code to deal with fails by splitting hard reg
8770 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8773 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
8774 Accept complain bool parameter. Only emit errors if it is true.
8775 (arm_parse_cpu_option_name): Likewise.
8776 (arm_target_thumb_only): Adjust callers of the above.
8777 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
8778 prototype to take a default true bool parameter.
8779 (arm_parse_arch_option_name): Likewise.
8781 2018-03-09 David Malcolm <dmalcolm@redhat.com>
8782 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8786 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
8787 * configure: Regenerate.
8788 * configure.ac ("linker --version-script option"): New.
8789 ("linker soname option"): New.
8791 2018-03-09 Richard Biener <rguenther@suse.de>
8793 PR tree-optimization/84775
8794 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
8795 immediate uses of predicate stmts and mark them modified.
8798 PR tree-optimization/84178
8799 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
8801 (version_loop_for_if_conversion): Delay update_ssa call.
8802 (tree_if_conversion): Delay update_ssa until after predicate
8805 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
8808 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
8809 when the function accesses prior frames.
8811 2018-03-08 Jakub Jelinek <jakub@redhat.com>
8814 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
8815 gen_llsym, otherwise call maybe_gen_llsym.
8818 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
8819 has ',' character inside of it.
8821 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8824 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
8825 as clobbering CC_REGNUM.
8827 2018-03-08 Richard Biener <rguenther@suse.de>
8830 * tree-scalar-evolution.c: Include tree-into-ssa.h.
8831 (follow_copies_to_constant): Do not follow SSA names registered
8834 2018-03-08 Richard Biener <rguenther@suse.de>
8836 PR tree-optimization/84178
8837 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
8839 (version_loop_for_if_conversion): Delay update_ssa call.
8840 (tree_if_conversion): Delay update_ssa until after predicate
8843 2018-03-08 David Malcolm <dmalcolm@redhat.com>
8845 PR tree-optimization/84178
8846 * tree-if-conv.c (release_bb_predicate): Remove the
8847 the assertion that the stmts have NULL use_ops.
8848 Discard the statements, asserting that they haven't
8849 yet been added to a BB.
8851 2018-03-08 Richard Biener <rguenther@suse.de>
8853 PR tree-optimization/84746
8854 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
8855 (phi_translate): Pass in destination ANTIC_OUT set.
8856 (phi_translate_1): Likewise. For a simplified result lookup
8857 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
8858 (phi_translate_set): Adjust.
8859 (do_pre_regular_insertion): Likewise.
8860 (do_pre_partial_partial_insertion): Likewise.
8862 2018-03-08 Martin Liska <mliska@suse.cz>
8864 PR gcov-profile/84735
8865 * doc/gcov.texi: Document usage of profile files.
8866 * gcov-io.h: Document changes in the format.
8868 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
8872 * dwarf2out.c (struct dw_line_info_table): Update comments for
8874 (FORCE_RESET_NEXT_VIEW): New.
8875 (FORCE_RESETTING_VIEW_P): New.
8876 (RESETTING_VIEW_P): Check for -1 too.
8877 (ZERO_VIEW_P): Likewise.
8878 (new_line_info_table): Force-reset next view.
8879 (dwarf2out_begin_function): Likewise.
8880 (dwarf2out_source_line): Simplify zero_view_p initialization.
8881 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
8882 view directly. Omit view when omitting .loc at line 0.
8884 2018-03-08 Jakub Jelinek <jakub@redhat.com>
8886 PR tree-optimization/84740
8887 * tree-switch-conversion.c (process_switch): Call build_constructors
8888 only if info.phi_count is non-zero.
8890 PR tree-optimization/84739
8891 * tree-tailcall.c (find_tail_calls): Check call arguments against
8892 DECL_ARGUMENTS (current_function_decl) rather than
8893 DECL_ARGUMENTS (func) when checking for tail recursion.
8895 2018-03-07 Jakub Jelinek <jakub@redhat.com>
8897 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
8898 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
8899 Volker Reichelt's entry and add entries for people that perform
8900 GCC fuzzy testing and report numerous bugs.
8902 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
8905 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
8906 readonly data in sdata, if that is disabled.
8907 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
8908 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
8909 -mreadonly-in-sdata option.
8911 2018-03-07 Martin Sebor <msebor@redhat.com>
8913 PR tree-optimization/84468
8914 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
8915 basic block when looking for nul assignment.
8917 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
8920 * except.h (output_function_exception_table): Adjust prototype.
8921 * except.c (output_function_exception_table): Remove FNNAME parameter
8922 and add SECTION parameter. Ouput one part of the table at a time.
8923 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
8924 the first part of the exception table and emit unwind directives.
8925 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
8926 (i386_pe_seh_cold_init): Likewise.
8927 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
8928 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
8929 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
8930 (ix86_output_call_insn): Emit a nop in one more case for SEH.
8931 * config/i386/winnt.c: Include except.h.
8932 (struct seh_frame_state): Add reg_offset, after_prologue and
8933 in_cold_section fields.
8934 (i386_pe_seh_end_prologue): Set seh->after_prologue.
8935 (i386_pe_seh_cold_init): New function.
8936 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
8937 to seh->in_cold_section.
8938 (seh_emit_push): Record the offset of the push.
8939 (seh_emit_save): Record the offet of the save.
8940 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
8941 Test seh->after_prologue to disregard the epilogue.
8942 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
8943 (i386_pe_end_cold_function): New function.
8945 2018-03-07 Jakub Jelinek <jakub@redhat.com>
8948 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
8949 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
8952 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
8954 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
8955 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
8958 * multiple_target.c: Include tree-inline.h and intl.h.
8959 (expand_target_clones): Diagnose and fail if node->definition and
8960 !tree_versionable_function_p (node->decl).
8962 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
8964 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
8966 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
8967 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8968 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
8970 2018-03-06 Jakub Jelinek <jakub@redhat.com>
8973 * combine.c (try_combine): Use reg_or_subregno instead of handling
8974 just paradoxical SUBREGs and REGs.
8976 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
8978 * config/arc/arc.c (arc_finalize_pic): Remove function.
8979 (arc_must_save_register): We use single base PIC register, remove
8980 checks to save/restore the PIC register.
8981 (arc_expand_prologue): Likewise.
8982 * config/arc/arc-protos.h (arc_set_default_type_attributes):
8984 (arc_verify_short): Likewise.
8985 (arc_attr_type): Likewise.
8986 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
8987 (walk_stores): Likewise.
8988 (arc_address_cost): Make it static.
8989 (arc_verify_short): Likewise.
8990 (branch_dest): Likewise.
8991 (arc_attr_type): Likewise.
8992 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
8993 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
8994 (arc_final_prescan_insn): Remove inserting the nops due to
8995 hardware hazards. It is done in reorg step.
8996 (insn_length_variant_t): Remove.
8997 (insn_length_parameters_t): Likewise.
8998 (arc_insn_length_parameters): Likewise.
8999 (arc_get_insn_variants): Likewise.
9000 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
9002 2018-03-06 Jakub Jelinek <jakub@redhat.com>
9005 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
9008 PR tree-optimization/84687
9009 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
9011 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
9013 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9015 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
9016 Rename to ppc_speculation_barrier.
9017 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
9018 __builtin_ppc_speculation_barrier.
9020 2018-03-05 Jakub Jelinek <jakub@redhat.com>
9023 * combine.c (combine_simplify_rtx): Don't try to simplify if
9024 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
9027 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
9029 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
9030 to 32 bytes when compiling for POWER9.
9032 2018-03-05 Jakub Jelinek <jakub@redhat.com>
9035 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
9036 regparm >= 3 with no arg reg available also for calls with
9037 flag_force_indirect_call. Pass decl to ix86_function_regparm.
9040 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
9042 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
9044 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
9047 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
9049 2018-03-05 Richard Biener <rguenther@suse.de>
9051 PR tree-optimization/84486
9052 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
9053 When inserting a __builtin_assume_aligned call set the LHS
9054 SSA name alignment info accordingly.
9056 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
9058 PR tree-optimization/84114
9059 * config/aarch64/aarch64.c (aarch64_reassociation_width)
9060 Avoid reassociation of FLOAT_MODE addition.
9062 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
9064 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
9065 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
9066 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
9067 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
9068 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
9069 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
9070 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
9072 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
9073 __builtin_ia32_wbinvd): New builtins.
9074 (SPECIAL_ARGS2): New.
9075 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
9076 (SPECIAL_ARGS2): New.
9077 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
9078 (ix86_valid_target_attribute_inner_p): Ditto.
9079 (ix86_init_mmx_sse_builtins): Add special_args2.
9080 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
9081 TARGET_WBNOINVD_P): New.
9082 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
9083 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
9084 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
9085 * config/i386/immintrin.h (_wbinvd): New intrinsic.
9086 * config/i386/pconfigintrin.h: New file.
9087 * config/i386/wbnoinvdintrin.h: Ditto.
9088 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
9090 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
9092 2018-03-05 Richard Biener <rguenther@suse.de>
9094 PR tree-optimization/84670
9095 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
9097 (BB_VISITED_WITH_VISITED_SUCCS): New define.
9098 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
9099 (compute_antic_aux): Only assert the number of values in ANTIC_IN
9100 doesn't grow if all successors (recursively) were visited at least
9103 2018-03-05 Richard Biener <rguenther@suse.de>
9105 PR tree-optimization/84650
9106 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
9107 if executed in the loop pipeline.
9109 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
9111 * doc/configfiles.texi (Configuration Files): Move info about
9112 conditionalizing $target-protos.h to...
9113 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
9114 differs from $target-protos.h.
9116 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
9117 Chung-Ju Wu <jasonwucj@gmail.com>
9119 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
9120 * config/nds32/nds32-multiple.md (setmemsi): Define.
9121 * config/nds32/nds32-memory-manipulation.c
9122 (nds32_gen_dup_4_byte_to_word_value): New.
9123 (emit_setmem_word_loop): New.
9124 (emit_setmem_byte_loop): New.
9125 (nds32_expand_setmem_loop): New.
9126 (nds32_expand_setmem_loop_v3m): New.
9127 (nds32_expand_setmem_unroll): New.
9128 (nds32_expand_setmem): New.
9130 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
9131 Chung-Ju Wu <jasonwucj@gmail.com>
9133 * config/nds32/nds32-memory-manipulation.c
9134 (nds32_emit_load_store): New.
9135 (nds32_emit_post_inc_load_store): New.
9136 (nds32_emit_mem_move): New.
9137 (nds32_emit_mem_move_block): New.
9138 (nds32_expand_movmemsi_loop_unknown_size): New.
9139 (nds32_expand_movmemsi_loop_known_size): New.
9140 (nds32_expand_movmemsi_loop): New.
9141 (nds32_expand_movmemsi_unroll): New.
9142 (nds32_expand_movmemqi): Rename ...
9143 (nds32_expand_movmemsi): ... to this.
9144 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
9145 (movmemsi): ... to this.
9146 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
9147 (nds32_expand_movmemsi): ... to this.
9149 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
9150 Monk Chiang <sh.chiang04@gmail.com>
9151 Chung-Ju Wu <jasonwucj@gmail.com>
9153 * config/nds32/nds32-protos.h
9154 (nds32_expand_load_multiple): New arguments.
9155 (nds32_expand_store_multiple): Ditto.
9156 (nds32_valid_multiple_load_store): Rename ...
9157 (nds32_valid_multiple_load_store_p): ... to this.
9158 * config/nds32/nds32-memory-manipulation.c
9159 (nds32_expand_load_multiple): Refine implementation.
9160 (nds32_expand_store_multiple): Ditto.
9161 * config/nds32/nds32-multiple.md
9162 (load_multiple): Update nds32_expand_load_multiple interface.
9163 (store_multiple): Update nds32_expand_store_multiple interface.
9164 * config/nds32/nds32-predicates.c
9165 (nds32_valid_multiple_load_store): Rename ...
9166 (nds32_valid_multiple_load_store_p): ... to this and refine
9168 * config/nds32/predicates.md
9169 (nds32_load_multiple_and_update_address_operation): New predicate.
9170 (nds32_store_multiple_and_update_address_operation): New predicate.
9172 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
9173 Chung-Ju Wu <jasonwucj@gmail.com>
9175 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
9176 (combo): New attribute.
9177 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
9179 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
9181 * config/nds32/nds32.opt: Change -mcmodel= default value.
9183 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
9184 Monk Chiang <sh.chiang04@gmail.com>
9185 Chung-Ju Wu <jasonwucj@gmail.com>
9187 * config/nds32/constants.md (unspec_element): New enum.
9188 * config/nds32/constraints.md (Umw): New constraint.
9189 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
9190 * config/nds32/nds32-intrinsic.md: Likewise.
9191 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
9192 (nds32_valid_smw_lwm_base_p): New.
9193 (nds32_output_smw_single_word): New.
9194 (nds32_output_lmw_single_word): New.
9195 (nds32_expand_unaligned_load): New.
9196 (nds32_expand_unaligned_store): New.
9197 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
9198 (nds32_output_smw_single_word): Declare.
9199 (nds32_output_lmw_single_word): Declare.
9200 (nds32_expand_unaligned_load): Declare.
9201 (nds32_expand_unaligned_store): Declare.
9202 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
9203 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
9204 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
9205 NDS32_BUILTIN_UASTORE_DW.
9206 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
9209 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
9210 Kito Cheng <kito.cheng@gmail.com>
9211 Chung-Ju Wu <jasonwucj@gmail.com>
9213 * config/nds32/nds32-intrinsic.c
9214 (nds32_expand_builtin_null_ftype_reg): Delete.
9215 (nds32_expand_builtin_reg_ftype_imm): Ditto.
9216 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
9217 (nds32_read_argument): New.
9218 (nds32_legitimize_target): Ditto.
9219 (nds32_legitimize_argument): Ditto.
9220 (nds32_check_constant_argument): Ditto.
9221 (nds32_expand_unop_builtin): Ditto.
9222 (nds32_expand_unopimm_builtin): Ditto.
9223 (nds32_expand_binop_builtin): Ditto.
9224 (nds32_builtin_decl_impl): Ditto.
9225 (builtin_description): Ditto.
9226 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
9227 (nds32_init_builtins_impl): Ditto.
9228 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
9229 (nds32_builtin_decl): New.
9230 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
9231 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
9233 2018-03-02 Jeff Law <law@redhat.com>
9235 * reorg.c (stop_search_p): Handle DEBUG_INSN.
9236 (redundant_insn, fill_simple_delay_slots): Likewise.
9237 (fill_slots_from_thread): Likewise.
9238 * resource.c (mark_referenced_resources): Likewise.
9239 (mark_set_resources, find_dead_or_set_registers): Likewise.
9241 2018-03-02 Jakub Jelinek <jakub@redhat.com>
9243 * substring-locations.h (format_warning_va): Formatting fix for
9245 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
9247 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
9248 * substring-locations.c: Include intl.h.
9249 (format_warning_va): Turned into small wrapper around
9250 format_warning_n_va, renamed to ...
9251 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
9252 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
9254 (format_warning_at_substring_n): New function.
9255 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
9256 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
9257 format_warning_at_substring with just a shorter name instead of
9258 const function pointer.
9259 (fmtwarn_n): New function.
9260 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
9261 appropriate, get rid of all the fmtstr temporaries, move conditionals
9262 with G_() wrapped string literals directly into fmtwarn arguments,
9263 cast dir.len to (int), formatting fixes.
9265 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
9267 * doc/invoke.texi: Remove "Cilk Plus" references.
9269 2018-03-02 Jakub Jelinek <jakub@redhat.com>
9270 Richard Biener <rguenther@suse.de>
9273 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
9274 for error or warning attributes if CALL_FROM_THUNK_P is set.
9277 2018-03-02 Jakub Jelinek <jakub@redhat.com>
9280 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
9281 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
9284 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
9285 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
9287 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
9288 instead of -1U in last predictors element's probability member.
9290 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
9293 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9294 arguments if they are comparable.
9296 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
9298 PR tree-optimization/84634
9299 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
9300 masks and masked_loop_p with a single loop_masks, making sure it's
9301 null for bb vectorization.
9303 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
9305 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9306 (vect_analyze_data_ref_access): Use loop->safe_len rather than
9307 loop->force_vectorize to check whether there is no alias.
9309 2018-03-02 Jakub Jelinek <jakub@redhat.com>
9312 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
9314 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
9316 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
9317 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
9318 instead of a loop around prev_real_insn.
9319 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
9323 * config/i386/i386.c (ix86_print_operand): Use conditional
9324 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
9327 2018-03-02 Richard Biener <rguenther@suse.de>
9329 PR tree-optimization/84427
9330 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
9331 (bitmap_set_subtract_values): Rewrite to handle multiple
9334 (prune_clobbered_mems): Likewise.
9335 (phi_translate): Take edge instead of pred/phiblock.
9336 (phi_translate_1): Likewise.
9337 (phi_translate_set): Likewise. Insert all translated
9338 exprs for a value into the set, keeping possibly multiple
9339 expressions per value.
9340 (compute_antic_aux): Adjust for phi_translate changes.
9341 When intersecting union the expressions and prune those
9342 not in the final value set, keeping possibly multiple
9343 expressions per value. Do not use value-insertion
9344 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
9345 all expressions. Add verification that the value-sets
9346 only shrink during iteration.
9347 (compute_partial_antic_aux): Adjust for the phi_translate changes.
9348 (do_pre_regular_insertion): Likewise.
9349 (do_pre_partial_partial_insertion): Likewise.
9351 2018-03-02 Richard Biener <rguenther@suse.de>
9354 * config/darwin.c (saved_debug_info_level): New static global.
9355 (darwin_asm_lto_start): Disable debug info generation for LTO out.
9356 (darwin_asm_lto_end): Restore debug info generation settings.
9358 2018-03-01 Martin Liska <mliska@suse.cz>
9361 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
9364 2018-03-01 Richard Biener <rguenther@suse.de>
9367 * dwarf2out.c (gen_variable_die): Properly handle late VLA
9368 type annotation with LTO when debug was disabled at compile-time.
9370 2018-03-01 Matthew Fortune <mfortune@gmail.com>
9372 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
9374 (mips_final_postscan_insn): Likewise.
9376 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
9378 PR rtl-optimization/84528
9379 * alias.c (init_alias_target): Add commentary.
9380 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
9381 a unique base value if the frame pointer is not eliminated
9382 to the stack pointer.
9384 2018-03-01 Tom de Vries <tom@codesourcery.com>
9386 PR rtl-optimization/83327
9387 * lra-int.h (hard_regs_spilled_into): Declare.
9388 * lra.c (hard_regs_spilled_into): Define.
9389 (init_reg_info): Init hard_regs_spilled_into.
9390 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
9391 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
9392 (process_bb_lives): Handle hard_regs_spilled_into.
9393 (lra_create_live_ranges_1): Before doing liveness propagation, clear
9394 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
9396 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
9398 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
9399 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
9400 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
9401 * config/rs6000/aix72.h: New file.
9403 2018-02-28 Jakub Jelinek <jakub@redhat.com>
9405 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
9406 instead of warning_at with conditional singular and plural messages
9410 * stor-layout.c (update_alignment_for_field): For
9411 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
9412 && !DECL_PACKED (field), do the alignment update, just use
9413 only desired_align instead of MAX (type_align, desired_align)
9415 (place_field): Don't do known_align < desired_align handling
9416 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
9417 is non-NULL, instead do it after rli->prev_field handling and
9418 only if not within a bitfield word. For DECL_PACKED (field)
9419 use type_align of BITS_PER_UNIT.
9421 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
9423 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
9424 superfluous parentheses and trailing spaces.
9426 2018-02-28 Richard Biener <rguenther@suse.de>
9428 PR tree-optimization/84584
9429 * graphite-scop-detection.c (scop_detection::add_scop): Discard
9430 SCoPs with fake exit edge.
9432 2018-02-28 Martin Liska <mliska@suse.cz>
9435 * timevar.c (timer::print): Fix format to properly print 100%
9438 2018-02-28 Richard Biener <rguenther@suse.de>
9441 * genmatch.c (capture_info::walk_match): Do not mark
9442 captured expressions without operands as expr_p given
9443 they act more like predicates and should be subject to
9444 "lost tail" side-effect preserving.
9446 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
9448 PR rtl-optimization/81611
9449 * auto-inc-dec.c (attempt_change): Move dead note from
9450 mem_insn if it's the next use of regno
9451 (find_address): Take address use of reg holding
9452 non-incremented value. Add parm to limit search to the named
9454 (merge_in_block): Attempt to use a mem insn that is the next
9455 use of the original regno.
9457 2018-02-27 Martin Sebor <msebor@redhat.com>
9460 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
9461 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
9463 2018-02-27 Martin Sebor <msebor@redhat.com>
9465 PR translation/84207
9466 * diagnostic-core.h (warning_n, error_n, inform_n): Change
9467 n argument to unsigned HOST_WIDE_INT.
9468 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
9469 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
9470 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
9471 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
9473 2018-02-27 Richard Biener <rguenther@suse.de>
9475 PR tree-optimization/84512
9476 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
9477 Do not use the estimate returned from record_stmt_cost for
9478 the scalar iteration cost but sum properly using add_stmt_cost.
9480 2018-02-27 Richard Biener <rguenther@suse.de>
9482 PR tree-optimization/84466
9483 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
9484 Adjust last change to less strictly validate use operands.
9486 2018-02-27 Martin Liska <mliska@suse.cz>
9488 PR gcov-profile/84548
9489 * gcov.c (process_file): Allow partial overlap and consider it
9490 also as group functions.
9491 (output_lines): Properly calculate range of lines for a group.
9493 2018-02-27 Martin Liska <mliska@suse.cz>
9495 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
9496 'ggc' suffixes. Change first column width.
9497 (timer::print): Fix formatting of the column.
9499 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
9501 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
9502 preserve inline entry blocks for the sake of debug inline
9503 entry point markers alone.
9504 (remove_unused_locals): Suggest in comments a better place to
9505 force the preservation of inline entry blocks that are
9506 otherwise unused, but do not preserve them.
9508 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
9510 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
9512 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
9515 * config/i386/constraints.md (Bs): Replace
9516 ix86_indirect_branch_register with
9517 TARGET_INDIRECT_BRANCH_REGISTER.
9519 * config/i386/i386.md (indirect_jump): Likewise.
9520 (tablejump): Likewise.
9521 (*sibcall_memory): Likewise.
9522 (*sibcall_value_memory): Likewise.
9523 Peepholes of indirect call and jump via memory: Likewise.
9524 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
9525 (*sibcall_value_GOT_32): Likewise.
9526 * config/i386/predicates.md (indirect_branch_operand): Likewise.
9527 (GOT_memory_operand): Likewise.
9528 (call_insn_operand): Likewise.
9529 (sibcall_insn_operand): Likewise.
9530 (GOT32_symbol_operand): Likewise.
9531 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
9533 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
9535 PR rtl-optimization/83496
9536 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
9537 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
9538 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
9539 redundant insn, if any.
9540 (relax_delay_slots): Likewise.
9541 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
9543 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
9545 PR tree-optimization/83965
9546 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
9547 that grouped statements are part of a reduction chain. Return
9548 true if the statement is not marked as a reduction itself but
9550 (vect_recog_dot_prod_pattern): Don't check whether the statement
9551 is part of a group here.
9552 (vect_recog_sad_pattern): Likewise.
9553 (vect_recog_widen_sum_pattern): Likewise.
9555 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
9558 * final.c (rest_of_clean_state): Also look for calls inside sequences.
9560 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
9563 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
9565 (ix86_output_indirect_function_return): New prototype.
9566 (ix86_split_simple_return_pop_internal): Likewise.
9567 * config/i386/i386.c (indirect_return_via_cx): New.
9568 (indirect_return_via_cx_bnd): Likewise.
9569 (indirect_thunk_name): Handle return va CX_REG.
9570 (output_indirect_thunk_function): Create alias for
9571 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
9572 (ix86_output_indirect_jmp): Remove the bool argument.
9573 (ix86_output_indirect_function_return): New function.
9574 (ix86_split_simple_return_pop_internal): Likewise.
9575 * config/i386/i386.md (*indirect_jump): Don't pass false
9576 to ix86_output_indirect_jmp.
9577 (*tablejump_1): Likewise.
9578 (simple_return_pop_internal): Change it to define_insn_and_split.
9579 Call ix86_split_simple_return_pop_internal to split it for
9581 (simple_return_indirect_internal): Call
9582 ix86_output_indirect_function_return instead of
9583 ix86_output_indirect_jmp.
9585 2018-02-26 Jakub Jelinek <jakub@redhat.com>
9588 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
9589 memset and value initialization afterwards.
9591 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
9593 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
9595 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9598 * common/config/aarch64/aarch64-common.c
9599 (aarch_option_optimization_table[]): Switch
9600 off fomit-frame-pointer
9602 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
9603 Chung-Ju Wu <jasonwucj@gmail.com>
9605 * config/nds32/nds32-multiple.md (load_multiple): Disallow
9607 (store_multiple): Ditto.
9609 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
9611 * config.gcc: Add --with-cpu support for nds32 target.
9612 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
9613 * config/nds32/nds32.opt: Add -mcpu= option.
9615 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
9617 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
9618 isel=yes): Warn for these deprecated options.
9620 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
9622 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
9623 ISA_2_5_MASKS_EMBEDDED.
9625 2018-02-23 Jakub Jelinek <jakub@redhat.com>
9627 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
9628 p->max as pointers rather than using iterative_hash_expr.
9630 2018-02-23 Carl Love <cel@us.ibm.com>
9632 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
9633 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
9635 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
9636 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
9637 P8V_BUILTIN_VEC_VUNSIGNED2.
9639 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
9642 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
9643 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
9645 * lra-constraints.c (curr_insn_transform): Set up
9646 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
9648 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
9649 * lra-eliminations.c (spill_pseudos): Ditto.
9650 (process_insn_for_elimination): Ditto.
9651 * lra-lives.c (reg_early_clobber_p): Use the new macros.
9652 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
9653 LRA_NON_CLOBBERED_ALT.
9655 2018-02-22 Martin Sebor <msebor@redhat.com>
9657 PR tree-optimization/84480
9658 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
9659 to maybe_diag_stxncpy_trunc. Call it.
9660 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
9661 from gimple_fold_builtin_strcpy. Print inlining stack.
9662 (handle_builtin_stxncpy): Print inlining stack.
9663 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
9665 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
9668 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
9669 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
9670 and -fcheck-pointer-bounds are used together.
9671 (indirect_thunk_prefix): New enum.
9672 (indirect_thunk_need_prefix): New function.
9673 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
9674 "_nt" instead of "_bnd" for NOTRACK prefix.
9675 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
9676 (output_indirect_thunk_function): Likewise.
9678 (ix86_code_end): Update output_indirect_thunk_function calls.
9679 (ix86_output_indirect_branch_via_reg): Replace
9680 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
9681 (ix86_output_indirect_branch_via_push): Likewise.
9682 (ix86_output_function_return): Likewise.
9683 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
9684 incompatible with -fcf-protection=branch and
9685 -fcheck-pointer-bounds.
9687 2018-02-22 Steve Ellcey <sellcey@cavium.com>
9690 * config/aarch64/aarch64.c (aarch64_print_address_internal):
9691 Change gcc_assert call to output_operand_lossage.
9693 2018-02-22 Steve Ellcey <sellcey@cavium.com>
9695 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
9697 2018-02-22 DJ Delorie <dj@redhat.com>
9698 Sebastian Perta <sebastian.perta@renesas.com>
9699 Oleg Endo <olegendo@gcc.gnu.org>
9701 * config/rx/rx.c (rx_rtx_costs): New function.
9702 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
9704 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
9706 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
9708 2018-02-22 Martin Liska <mliska@suse.cz>
9711 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
9712 Add "native" as a possible value.
9714 2018-02-22 Martin Liska <mliska@suse.cz>
9717 * config/i386/i386.c (ix86_option_override_internal):
9718 Add "native" as a possible value for -march and -mtune.
9720 2018-02-22 Jakub Jelinek <jakub@redhat.com>
9723 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
9724 to all type variants.
9726 PR tree-optimization/84503
9727 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
9728 width as info->bitpos + info->bitsize - start.
9729 (merged_store_group::merge_overlapping): Simplify width computation.
9730 (check_no_overlap): New function.
9731 (imm_store_chain_info::try_coalesce_bswap): Compute expected
9732 start + width and last_order of the group, fail if check_no_overlap
9734 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
9735 to group if check_no_overlap fails.
9737 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
9739 * config/rs6000/altivec.md: Delete contraint arguments to
9740 define_expand, define_split, and define_peephole2, and in
9741 define_insn_and_split if always unused.
9742 * config/rs6000/darwin.md: Ditto.
9743 * config/rs6000/dfp.md: Ditto.
9744 * config/rs6000/rs6000.md: Ditto.
9745 * config/rs6000/sync.md: Ditto.
9746 * config/rs6000/vector.md: Ditto.
9747 * config/rs6000/vsx.md: Ditto.
9749 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
9751 * config/rs6000/altivec.md: Write output control strings as braced
9752 blocks instead of double-quoted strings.
9753 * config/rs6000/darwin.md: Ditto.
9754 * config/rs6000/rs6000.md: Ditto.
9755 * config/rs6000/vector.md: Ditto.
9756 * config/rs6000/vsx.md: Ditto.
9758 2018-02-21 Jason Merrill <jason@redhat.com>
9760 PR c++/84314 - ICE with templates and fastcall attribute.
9761 * attribs.c (build_type_attribute_qual_variant): Remove assert.
9763 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
9765 * ipa-cp.c (determine_versionability): Fix comment typos.
9767 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
9770 * ipa-cp.c (determine_versionability): Do not version functions caling
9773 2018-02-21 Martin Liska <mliska@suse.cz>
9776 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
9777 Add "native" as a possible value.
9778 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
9779 the macro when native cpu detection is available.
9781 2018-02-21 Martin Liska <mliska@suse.cz>
9784 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
9785 Add "native" as a possible value.
9786 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
9787 when native cpu detection is available.
9789 2018-02-21 Jakub Jelinek <jakub@redhat.com>
9790 Martin Sebor <msebor@redhat.com>
9792 PR tree-optimization/84478
9793 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
9795 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
9796 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
9797 support which is conservatively correct, for 2 only stay conservative
9798 for maxlen. Formatting and comment capitalization fixes. Add STRICT
9799 argument to the 2 argument get_range_strlen, adjust 6 arg
9800 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
9802 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
9803 (gimple_fold_builtin_strlen): Pass true as last argument to
9806 2018-02-20 Martin Sebor <msebor@redhat.com>
9809 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
9810 (builtin_memref::set_base_and_offset): Same. Handle inner references.
9811 (builtin_memref::builtin_memref): Factor out parts into
9812 set_base_and_offset and call it.
9814 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
9817 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
9818 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
9819 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
9820 search at the associated MODE_INT.
9822 2018-02-20 Jeff Law <law@redhat.com>
9825 PR tree-optimization/81592
9827 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
9828 for range data rather than using global data.
9829 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
9830 range data rather than using global data.
9831 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
9832 pass it to children as needed.
9833 (struct directive::fmtresult): Similarly.
9834 (struct directive::set_width): Similarly.
9835 (struct directive::set_precision): Similarly.
9836 (format_integer, format_directive, parse_directive): Similarly.
9837 (format_none): Accept unnamed vr_values parameter.
9838 (format_percent, format_floating, format_character): Similarly.
9839 (format_string, format_plain): Similarly.
9840 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
9841 the EVRP range analyzer for range data rather than using global data.
9842 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
9843 gimple-ssa-evrp-analyze.h
9844 (class sprintf_dom_walker): Add after_dom_children member function.
9845 Add evrp_range_analyzer member.
9846 (sprintf_dom_walker::before_dom_children): Call into the EVRP
9847 range analyzer as needed.
9848 (sprintf_dom_walker::after_dom_children): New member function.
9849 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
9851 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
9852 (evrp_range_analyzer::pop_to_marker): Likewise.
9854 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
9856 PR tree-optimization/84419
9857 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
9858 with the required type if its current type is compatible but
9861 2018-02-20 Jakub Jelinek <jakub@redhat.com>
9864 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
9865 after vectorization.
9867 2018-02-20 Martin Liska <mliska@suse.cz>
9870 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
9871 possible values if we don't have a hint.
9873 2018-02-20 Martin Liska <mliska@suse.cz>
9877 * final.c (shorten_branches): Build align_tab array with one
9879 * opts.c (finish_options): Add alignment option limit check.
9880 (MAX_CODE_ALIGN): Likewise.
9881 (MAX_CODE_ALIGN_VALUE): Likewise.
9882 * doc/invoke.texi: Document maximum allowed option value for
9883 all -falign-* options.
9885 2018-02-19 Jakub Jelinek <jakub@redhat.com>
9888 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
9889 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
9890 * var-tracking.c (emit_note_insn_var_location): Remove all references
9891 to NOTE_INSN_CALL_ARG_LOCATION.
9892 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
9893 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
9894 Use copy_rtx_if_shared.
9895 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
9896 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
9897 (dwarf2out_var_location): Remove handling of
9898 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
9900 * final.c (final_scan_insn): Remove all references to
9901 NOTE_INSN_CALL_ARG_LOCATION.
9902 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
9903 before dumping final insns.
9904 * except.c (emit_note_eh_region_end): Remove all references to
9905 NOTE_INSN_CALL_ARG_LOCATION.
9906 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
9907 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
9908 * config/arc/arc.c (hwloop_optimize): Likewise.
9909 * config/arm/arm.c (create_fix_barrier): Likewise.
9910 * config/s390/s390.c (s390_chunkify_start): Likewise.
9911 * config/sh/sh.c (find_barrier): Likewise.
9912 * config/i386/i386.c (rest_of_insert_endbranch,
9913 ix86_seh_fixup_eh_fallthru): Likewise.
9914 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
9915 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
9916 * config/frv/frv.c (frv_function_prologue): Likewise.
9917 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
9919 (note_outside_basic_block_p): Remove all references to
9920 NOTE_INSN_CALL_ARG_LOCATION.
9921 * gengtype.c (adjust_field_rtx_def): Likewise.
9922 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
9924 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
9925 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
9928 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
9931 PR tree-optimization/84452
9932 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
9933 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
9936 2018-02-19 Martin Liska <mliska@suse.cz>
9939 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
9941 2018-02-19 Martin Liska <mliska@suse.cz>
9942 Richard Sandiford <richard.sandiford@linaro.org>
9944 PR tree-optimization/82491
9945 * gimple-fold.c (get_base_constructor): Make earlier bail out
9948 2018-02-19 Carl Love <cel@us.ibm.com>
9950 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
9951 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
9953 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
9954 P8V_BUILTIN_VEC_NEG.
9956 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
9958 * config/rl78/rl78.md (movdf): New define expand.
9960 2018-02-19 Martin Liska <mliska@suse.cz>
9963 * doc/invoke.texi: Fix typo.
9964 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
9966 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
9968 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
9969 handle rs6000_single_float and rs6000_double_float specially for
9972 2018-02-16 Jeff Law <law@redhat.com>
9974 * config/rx/rx.c (add_pop_cfi_notes): New function.;
9977 2018-02-16 Jakub Jelinek <jakub@redhat.com>
9980 * ipa-inline.c (inline_small_functions): Fix a typo.
9982 2018-02-16 Nathan Sidwell <nathan@acm.org>
9984 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
9986 2018-02-16 Carl Love <cel@us.ibm.com>
9988 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
9989 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
9990 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
9991 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
9992 expansion to P8V_BUILTIN_VEC_FLOAT2.
9994 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
9996 PR rtl-optimization/70023
9997 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
9998 src_regno into account.
10000 2018-02-16 Carl Love <cel@us.ibm.com>
10002 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
10003 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
10004 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
10005 * config/rs6000/rs6000.c: Remove case statements for
10006 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
10007 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
10008 and P9V_BUILTIN_VEC_VINSERT4B.
10009 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
10010 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
10011 * config/rs6000/vsx.md:
10012 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
10015 2018-02-16 Carl Love <cel@us.ibm.com>
10017 * config/rs6000/altivec.h: Add builtin names vec_extract4b
10019 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
10021 * config/rs6000/rs6000-c.c: Add the definitions for
10022 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
10023 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
10024 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
10025 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
10026 definition for insert4b and define insn *insert3b_internal.
10027 * doc/extend.texi: Add documentation for vec_extract4b.
10029 2018-02-16 Nathan Sidwell <nathan@acm.org>
10031 * doc/extend.texi (Backwards Compatibility): Mention friend
10032 injection. Note for-scope is deprecated.
10033 * doc/invoke.texi (-ffriend-injection): Deprecate.
10035 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
10037 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
10038 that moved to I2, also allow destinations that are a paradoxical
10039 subreg (instead of a normal reg).
10041 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
10044 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
10047 2018-02-16 Richard Biener <rguenther@suse.de>
10049 PR tree-optimization/84037
10050 PR tree-optimization/84016
10052 * config/i386/i386.c (ix86_builtin_vectorization_cost):
10053 Adjust vec_construct for the fact we need additional higher latency
10054 128bit inserts for AVX256 and AVX512 vector builds.
10055 (ix86_add_stmt_cost): Scale vector construction cost for
10058 2018-02-16 Richard Biener <rguenther@suse.de>
10060 PR tree-optimization/84417
10061 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
10062 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
10063 (non_rewritable_lvalue_p): Likewise, use poly-ints.
10065 2018-02-16 Martin Liska <mliska@suse.cz>
10068 * internal-fn.def (ASAN_CHECK): Set proper flags.
10069 (ASAN_MARK): Likewise.
10071 2018-02-16 Julia Koval <julia.koval@intel.com>
10073 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
10074 from PTA_CANNONLAKE.
10076 2018-02-16 Jakub Jelinek <jakub@redhat.com>
10079 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
10080 Use ++iter rather than iter++ for std::list iterators.
10081 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
10082 defer deleting them until all nodes in the forest are processed. Do
10083 free even leaf nodes. Change to_process into auto_vec.
10086 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
10087 * vec.h (vec_default_construct): Use memset instead of placement new
10088 if BROKEN_VALUE_INITIALIZATION is defined.
10089 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
10090 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
10093 PR rtl-optimization/83723
10094 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
10095 * lra.c (lra_substitute_pseudo): Likewise. If true, use
10096 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
10098 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
10100 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
10102 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
10104 PR rtl-optimization/81443
10105 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
10106 from inner REGs to paradoxical SUBREGs.
10108 2018-02-16 Richard Biener <rguenther@suse.de>
10110 PR tree-optimization/84399
10111 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
10112 For operands we can analyze at their definition make sure we can
10113 analyze them at each use as well.
10115 2018-02-16 Richard Biener <rguenther@suse.de>
10117 PR tree-optimization/84190
10118 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
10119 volatile accesses if the decl isn't volatile.
10121 2018-02-15 Jason Merrill <jason@redhat.com>
10123 PR c++/84314 - ICE with templates and fastcall attribute.
10124 * attribs.c (build_type_attribute_qual_variant): Don't clobber
10125 TYPE_CANONICAL on an existing type.
10127 2018-02-15 Jakub Jelinek <jakub@redhat.com>
10129 PR tree-optimization/84383
10130 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
10131 dstoff nor call operand_equal_p if dstbase is NULL.
10133 PR tree-optimization/84334
10134 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
10135 also a CONSTANT_CLASS_P, punt.
10137 2018-02-14 Jim Wilson <jimw@sifive.com>
10139 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
10140 first SMALL_OPERAND check. New local min_second_step. Move assert
10141 to where locals are set. Add TARGET_RVC support.
10142 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
10144 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
10146 * doc/invoke.texi: Correct -Wformat-overflow code sample.
10148 2018-02-14 Martin Sebor <msebor@redhat.com>
10150 PR tree-optimization/83698
10151 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
10152 arrays constrain the offset range to their bounds.
10153 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
10154 (builtin_access::overlap): Avoid setting the size of overlap if it's
10156 (maybe_diag_overlap): Also consider arrays when deciding what values
10157 of offsets to include in diagnostics.
10159 2018-02-14 Martin Sebor <msebor@redhat.com>
10162 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
10163 that correspond to the kind of a declaration.
10165 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
10168 * config/pa/pa.md: Load address of PIC label using the linkage table
10169 if the label is nonlocal.
10171 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
10173 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
10174 warning message if user requests -maltivec=be.
10175 * doc/invoke.texi: Document deprecation of -maltivec=be.
10177 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
10180 * config/rs6000/rs6000-c.c: Update definitions for
10181 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
10182 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
10184 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
10187 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
10188 add _get_ssp intrinsics. Remove argument from
10189 __builtin_ia32_rdssp[d|q].
10190 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
10191 * config/i386/i386-builtin.def: Remove argument from
10192 __builtin_ia32_rdssp[d|q].
10193 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
10194 ix86_expand_special_args_builtin for _rdssp[d|q].
10195 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
10196 Clear register before usage.
10197 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
10198 Add documentation for new _get_ssp and _inc_ssp intrinsics.
10200 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
10202 PR tree-optimization/84357
10203 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
10204 operand 1 of an ARRAY_REF too.
10206 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
10209 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
10210 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
10212 (set_of_reg): New struct.
10213 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
10214 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
10215 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
10217 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
10218 Split into bitclr, bitset, bitinvert patterns if appropriate.
10219 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
10220 use rx_fuse_in_memory_bitop.
10221 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
10222 to named insn, correct maximum insn length.
10224 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
10227 * machmode.def: Define a complex mode for PARTIAL_INT.
10228 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
10230 * doc/rtl.texi: Document CSPImode.
10231 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
10233 (msp430_hard_regno_nregs_with_padding): Likewise.
10235 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
10238 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
10240 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
10242 PR rtl-optimization/84169
10243 * combine.c (try_combine): New variable split_i2i3. Set it to true if
10244 we generated a parallel as new i3 and we split that to new i2 and i3
10245 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
10246 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
10247 those to i2, not i1. Partially rewrite this scan code.
10249 2018-02-13 Jakub Jelinek <jakub@redhat.com>
10252 * stor-layout.c (place_field): For variable length fields, adjust
10253 offset_align afterwards not just based on the field's alignment,
10254 but also on the size.
10256 PR middle-end/84309
10257 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
10258 of exps and logs in the use_exp2 case.
10260 2018-02-13 Jeff Law <law@redhat.com>
10262 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
10263 entry for "vector".
10265 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
10268 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
10272 * common.opt (gas-loc-support, gas-locview-support): New.
10273 (ginline-points, ginternal-reset-location-views): New.
10274 * doc/invoke.texi: Document them. Use @itemx where intended.
10275 (gvariable-location-views): Adjust.
10276 * target.def (reset_location_view): New.
10277 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
10278 (TARGET_RESET_LOCATION_VIEW): New.
10279 * doc/tm.texi: Rebuilt.
10280 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
10281 (dwarf2out_default_as_locview_support): New.
10282 (output_asm_line_debug_info): Use option variables.
10283 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
10284 (output_loc_list): Likewise.
10285 (add_high_low_attributes): Check option variables.
10286 Don't output entry view attribute in strict mode.
10287 (gen_inlined_subroutine_die): Check option variables.
10288 (dwarf2out_inline_entry): Likewise.
10289 (init_sections_and_labels): Likewise.
10290 (dwarf2out_early_finish): Likewise.
10291 (maybe_reset_location_view): New, from...
10292 (dwarf2out_var_location): ... here. Call it.
10293 * debug.h (dwarf2out_default_as_loc_support): Declare.
10294 (dwarf2out_default_as_locview_support): Declare.
10295 * hooks.c (hook_int_rtx_insn_0): New.
10296 * hooks.h (hook_int_rtx_insn_0): Declare.
10297 * toplev.c (process_options): Take -gas-loc-support and
10298 -gas-locview-support from dwarf2out. Enable
10299 -gvariable-location-views by default only with locview
10300 assembler support. Enable -ginternal-reset-location-views by
10301 default only if the target defines the corresponding hook.
10302 Enable -ginline-points by default if location views are
10303 enabled; force it disabled if statement frontiers are
10305 * tree-inline.c (expand_call_inline): Check option variables.
10306 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
10308 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
10310 PR tree-optimization/84321
10311 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
10312 handling. Also check whether the anti-range contains any values
10313 that satisfy the mask; switch to a VR_RANGE if not.
10315 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
10318 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
10320 2018-02-13 Martin Jambor <mjambor@suse.cz>
10323 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
10324 of call statements, also set location of a load to a temporary.
10326 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
10328 * config/rl78/rl78.c (add_vector_labels): New function.
10329 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
10330 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
10331 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
10332 which checks that no arguments are passed.
10333 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
10334 * doc/extend.texi: Documentation for the new attribute.
10336 2018-02-13 Andreas Schwab <schwab@suse.de>
10338 * config/riscv/linux.h (CPP_SPEC): Define.
10340 2018-02-13 Jakub Jelinek <jakub@redhat.com>
10343 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
10344 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
10345 OPTION_MASK_ISA_AES as first argument to def_builtin_const
10346 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
10347 instead of OPTION_MASK_ISA_PCLMUL as first argument to
10348 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
10349 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
10350 temporarily for AES and PCLMUL builtins.
10352 PR tree-optimization/84339
10353 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
10354 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
10357 PR middle-end/84309
10358 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
10359 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
10360 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
10362 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
10364 * omp-simd-clone.h: New file.
10365 * omp-simd-clone.c: Include omp-simd-clone.h.
10366 (expand_simd_clones): No longer static.
10367 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
10368 cgraph.h and omp-simd-clone.h.
10369 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
10370 (vect_recog_widen_shift_pattern): Formatting fix.
10371 (vect_pattern_recog_1): Don't check optab for calls.
10374 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
10375 operands[2] into a REG before using gen_lowpart on it.
10377 2018-02-12 Jeff Law <law@redhat.com>
10380 * config/sh/sh.c (find_barrier): Consider a sibling call
10383 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
10384 successfully back substituting a reg.
10386 2018-02-12 Richard Biener <rguenther@suse.de>
10388 PR tree-optimization/84037
10389 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
10390 parameter, move visited init to caller.
10391 (vect_slp_analyze_operations): Separate cost from validity
10392 check, initialize visited once for all instances.
10393 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
10395 * tree-vect-stmts.c (vect_model_simple_cost): Make early
10397 (vect_model_promotion_demotion_cost): Likewise.
10398 (vectorizable_bswap): Guard cost modeling with !slp_node
10399 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
10401 (vectorizable_call): Likewise.
10402 (vectorizable_conversion): Likewise.
10403 (vectorizable_assignment): Likewise.
10404 (vectorizable_shift): Likewise.
10405 (vectorizable_operation): Likewise.
10406 (vectorizable_store): Likewise.
10407 (vectorizable_load): Likewise.
10408 (vectorizable_condition): Likewise.
10409 (vectorizable_comparison): Likewise.
10411 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
10414 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
10415 (ASAN_MARK): Fix fnspec to account for return value, change pointer
10416 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
10418 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
10420 PR middle-end/83665
10421 * params.def (inline-min-speedup): Increase from 8 to 15.
10422 (max-inline-insns-auto): Decrease from 40 to 30.
10423 * ipa-split.c (consider_split): Add some buffer for function to
10424 be considered inlining candidate.
10425 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
10428 2018-02-12 Richard Biener <rguenther@suse.de>
10430 PR tree-optimization/84037
10431 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
10432 matched stmts if we cannot swap the non-matched ones.
10434 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
10436 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
10437 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
10438 _mm_maskz_scalef_round_ss): New intrinsics.
10439 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
10440 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
10441 __builtin_ia32_scalefss_round): Remove.
10442 (__builtin_ia32_scalefsd_mask_round,
10443 __builtin_ia32_scalefss_mask_round): New intrinsics.
10444 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
10445 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
10446 ((match_operand:VF_128 2 "<round_nimm_predicate>"
10447 "<round_constraint>")): Changed to ...
10448 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
10449 "<round_scalar_constraint>")): ... this.
10450 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
10451 %0, %1, %2<round_op3>}"): Changed to ...
10452 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
10453 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
10454 %2<round_scalar_mask_op3>}"): ... this.
10455 * config/i386/subst.md (round_scalar_nimm_predicate): New.
10457 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
10459 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
10460 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
10461 (_mm_maskz_sqrt_round_ss): New intrinsics.
10462 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
10463 (__builtin_ia32_sqrtsd_mask_round)
10464 (__builtin_ia32_sqrtss_mask_round): New builtins.
10465 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
10466 (__builtin_ia32_sqrtss_round): Remove.
10467 (__builtin_ia32_sqrtsd_mask_round)
10468 (__builtin_ia32_sqrtss_mask_round): New builtins.
10469 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
10470 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
10471 ((match_operand:VF_128 1 "vector_operand"
10472 "xBm,<round_constraint>")): Changed to ...
10473 ((match_operand:VF_128 1 "vector_operand"
10474 "xBm,<round_scalar_constraint>")): ... this.
10475 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
10476 %0, %2, %<iptr>1<round_op3>}): Changed to ...
10477 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
10478 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
10479 %<iptr>1<round_scalar_mask_op3>}): ... this.
10480 ((set_attr "prefix" "<round_prefix>")): Changed to ...
10481 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
10483 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
10486 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
10487 Cast vec_cmpeq result to correct type.
10488 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
10489 Cast vec_cmpgt result to correct type.
10491 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
10493 * final.c (final_scan_insn_1): Renamed from...
10494 (final_scan_insn): ... this. New wrapper, to recover
10495 seen from the outermost call in recursive ones.
10496 * config/sparc/sparc.c (output_return): Drop seen from call.
10497 (output_sibcall): Likewise.
10498 * config/visium/visium.c (output_branch): Likewise.
10500 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
10502 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
10505 2018-02-10 Alan Modra <amodra@gmail.com>
10508 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
10509 Specify LR as an input.
10511 2018-02-10 Jakub Jelinek <jakub@redhat.com>
10514 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
10515 remove_member_access_dummy_vars): New functions.
10516 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
10517 lower_omp_1, execute_lower_omp): Use them.
10519 PR rtl-optimization/84308
10520 * shrink-wrap.c (spread_components): Release todo vector.
10522 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
10524 PR rtl-optimization/57193
10525 * ira-color.c (struct allocno_color_data): Add member
10526 conflict_allocno_hard_prefs.
10527 (update_conflict_allocno_hard_prefs): New.
10528 (bucket_allocno_compare_func): Add a preference based on
10529 conflict_allocno_hard_prefs.
10530 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
10531 (color_allocnos): Remove a dead code. Initiate
10532 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
10534 2018-02-09 Jakub Jelinek <jakub@redhat.com>
10537 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
10538 constraint from =wa to wa. Avoid a subreg on the output operand,
10539 instead use a pseudo and subreg it in a move.
10540 (p9_xxbrd_<mode>): Changed to ...
10541 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
10542 (p9_xxbrd_v2df): New expander.
10543 (p9_xxbrw_<mode>): Changed to ...
10544 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
10545 (p9_xxbrw_v4sf): New expander.
10547 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
10549 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
10551 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
10554 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
10555 multiply in 32-bit mode.
10556 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
10557 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
10560 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
10562 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
10563 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
10564 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
10565 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
10567 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
10570 * dwarf2out.c (is_trivial_indirect_ref): New function.
10571 (dwarf2out_late_global_decl): Do not generate a location
10572 attribute for variables that have a non-trivial DECL_VALUE_EXPR
10573 and that are not defined in the current unit.
10575 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
10577 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
10578 instead of a libcall for UNORDERED.
10580 2018-02-09 Tamar Christina <tamar.christina@arm.com>
10583 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
10584 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
10586 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10589 * config/s390/s390.c (s390_set_current_function): Invoke
10590 s390_indirect_branch_settings also if fndecl didn't change.
10592 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
10594 * config/rs6000/rs6000.md (blockage): Set length to zero.
10596 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
10598 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
10600 2018-02-09 Jakub Jelinek <jakub@redhat.com>
10603 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
10604 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
10608 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
10609 PARALLEL incoming that failed vt_get_decl_and_offset check.
10611 PR middle-end/84237
10612 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
10613 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
10615 (get_variable_section): For decls in named .bss* sections pass true as
10616 second argument to bss_initializer_p.
10618 2018-02-09 Marek Polacek <polacek@redhat.com>
10619 Jakub Jelinek <jakub@redhat.com>
10622 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
10623 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
10624 Sync some changes from cxx_fold_indirect_ref.
10626 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
10628 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
10630 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
10631 (BLOCK_INLINE_ENTRY_LABEL): New.
10632 (dwarf2out_var_location): Disregard inline entry markers.
10633 (inline_entry_data): New struct.
10634 (inline_entry_data_hasher): New hashtable type.
10635 (inline_entry_data_hasher::hash): New.
10636 (inline_entry_data_hasher::equal): New.
10637 (inline_entry_data_table): New variable.
10638 (add_high_low_attributes): Add DW_AT_entry_pc and
10639 DW_AT_GNU_entry_view attributes if a pending entry is found
10640 in inline_entry_data_table. Add old entry_pc attribute only
10641 if debug nonbinding markers are disabled.
10642 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
10643 markers are enabled.
10644 (block_within_block_p, dwarf2out_inline_entry): New.
10645 (dwarf2out_finish): Check that no entries remained in
10646 inline_entry_data_table.
10647 * final.c (reemit_insn_block_notes): Handle inline entry notes.
10648 (final_scan_insn, notice_source_line): Likewise.
10649 (rest_of_clean_state): Skip inline entry markers.
10650 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
10652 * gimple.c (gimple_build_debug_inline_entry): New.
10653 * gimple.h (enum gimple_debug_subcode): Add
10654 GIMPLE_DEBUG_INLINE_ENTRY.
10655 (gimple_build_debug_inline_entry): Declare.
10656 (gimple_debug_inline_entry_p): New.
10657 (gimple_debug_nonbind_marker_p): Adjust.
10658 * insn-notes.def (INLINE_ENTRY): New.
10659 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
10660 inline entry marker notes.
10661 (print_insn): Likewise.
10662 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
10663 (INSN_DEBUG_MARKER_KIND): Likewise.
10664 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
10665 * tree-inline.c (expand_call_inline): Build and insert
10666 debug_inline_entry stmt.
10667 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
10668 inline entry blocks early, if nonbind markers are enabled.
10669 (dump_scope_block): Dump fragment info.
10670 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
10671 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
10672 (gimple_build_debug_inline_entry): New.
10673 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
10674 Enable/disable inline entry points too.
10675 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
10676 (DEBUG_INSN): Describe inline entry markers.
10678 * common.opt (gvariable-location-views): New.
10679 (gvariable-location-views=incompat5): New.
10680 * config.in: Rebuilt.
10681 * configure: Rebuilt.
10682 * configure.ac: Test assembler for view support.
10683 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
10684 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
10685 * dwarf2out.c (var_loc_view): New typedef.
10686 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
10687 (dwarf2out_locviews_in_attribute): New.
10688 (dwarf2out_locviews_in_loclist): New.
10689 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
10690 (enum dw_line_info_opcode): Add LI_adv_address.
10691 (struct dw_line_info_table): Add view.
10692 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
10693 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
10694 (zero_view_p): New variable.
10695 (ZERO_VIEW_P): New macro.
10696 (output_asm_line_debug_info): New.
10697 (struct var_loc_node): Add view.
10698 (add_AT_view_list, AT_loc_list): New.
10699 (add_var_loc_to_decl): Add view param. Test it against last.
10700 (new_loc_list): Add view params. Record them.
10701 (AT_loc_list_ptr): Handle loc and view lists.
10702 (view_list_to_loc_list_val_node): New.
10703 (print_dw_val): Handle dw_val_class_view_list.
10704 (size_of_die): Likewise.
10705 (value_format): Likewise.
10706 (loc_list_has_views): New.
10707 (gen_llsym): Set vl_symbol too.
10708 (maybe_gen_llsym, skip_loc_list_entry): New.
10709 (dwarf2out_maybe_output_loclist_view_pair): New.
10710 (output_loc_list): Output view list or entries too.
10711 (output_view_list_offset): New.
10712 (output_die): Handle dw_val_class_view_list.
10713 (output_dwarf_version): New.
10714 (output_compilation_unit_header): Use it.
10715 (output_skeleton_debug_sections): Likewise.
10716 (output_rnglists, output_line_info): Likewise.
10717 (output_pubnames, output_aranges): Update version comments.
10718 (output_one_line_info_table): Output view numbers in asm comments.
10719 (dw_loc_list): Determine current endview, pass it to new_loc_list.
10720 Call maybe_gen_llsym.
10721 (loc_list_from_tree_1): Adjust.
10722 (add_AT_location_description): Create view list attribute if
10723 needed, check it's absent otherwise.
10724 (convert_cfa_to_fb_loc_list): Adjust.
10725 (maybe_emit_file): Call output_asm_line_debug_info for test.
10726 (dwarf2out_var_location): Reset views as needed. Precompute
10727 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
10728 attribute. Set view.
10729 (new_line_info_table): Reset next view.
10730 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
10731 (dwarf2out_source_line): Likewise. Output view resets and labels to
10732 the assembler, or select appropriate line info opcodes.
10733 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
10734 (optimize_string_length): Catch it. Adjust.
10735 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
10736 dw_val_class_view_list, and remove it if no longer needed.
10737 (hash_loc_list): Hash view numbers.
10738 (loc_list_hasher::equal): Compare them.
10739 (optimize_location_lists): Check whether a view list symbol is
10740 needed, and whether the locview attribute is present, and
10741 whether they match. Remove the locview attribute if no longer
10743 (index_location_lists): Call skip_loc_list_entry for test.
10744 (dwarf2out_finish): Call output_asm_line_debug_info for test.
10745 Use output_dwarf_version.
10746 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
10747 (struct dw_val_node): Add val_view_list.
10748 * final.c (SEEN_NEXT_VIEW): New.
10749 (set_next_view_needed): New.
10750 (clear_next_view_needed): New.
10751 (maybe_output_next_view): New.
10752 (final_start_function): Rename to...
10753 (final_start_function_1): ... this. Take pointer to FIRST,
10754 add SEEN parameter. Emit param bindings in the initial view.
10755 (final_start_function): Reintroduce SEEN-less interface.
10756 (final): Rename to...
10757 (final_1): ... this. Take SEEN parameter. Output final pending
10758 next view at the end.
10759 (final): Reintroduce seen-less interface.
10760 (final_scan_insn): Output pending next view before switching
10761 sections or ending a block. Mark the next view as needed when
10762 outputting variable locations. Notify debug backend of section
10763 changes, and of location view changes.
10764 (rest_of_handle_final): Adjust.
10765 * toplev.c (process_options): Autodetect value for debug variable
10766 location views option. Warn on incompat5 without -gdwarf-5.
10767 * doc/invoke.texi (gvariable-location-views): New.
10768 (gvariable-location-views=incompat5): New.
10769 (gno-variable-location-views): New.
10771 2018-02-08 David Malcolm <dmalcolm@redhat.com>
10773 PR tree-optimization/84136
10774 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
10775 that the result of find_edge is non-NULL.
10777 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
10780 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
10781 storing integer register in SImode. Fix cost of 256 and 512
10782 byte aligned SSE register store.
10784 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
10786 * config/i386/i386.c (ix86_multiplication_cost): Fix
10787 multiplication cost for TARGET_AVX512DQ.
10789 2018-02-08 Marek Polacek <polacek@redhat.com>
10791 PR tree-optimization/84238
10792 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
10795 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
10797 PR tree-optimization/84265
10798 * tree-vect-stmts.c (vectorizable_store): Don't treat
10799 VMAT_CONTIGUOUS accesses as grouped.
10800 (vectorizable_load): Likewise.
10802 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
10804 PR tree-optimization/81635
10805 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
10806 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
10807 (test_round_for_mask): New functions.
10808 (wide_int_cc_tests): Call test_round_for_mask.
10809 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
10810 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
10811 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
10812 range returned by get_range_info.
10814 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
10817 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
10818 * symtab.c: Include builtins.h
10819 (symtab_node::output_to_lto_symbol_table_p): Move here
10820 from lto-streamer-out.c:output_symbol_p.
10821 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
10822 (output_symbol_p): Move all logic to symtab.c
10823 (produce_symtab): Update.
10825 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10827 * config/s390/s390-opts.h (enum indirect_branch): Define.
10828 * config/s390/s390-protos.h (s390_return_addr_from_memory)
10829 (s390_indirect_branch_via_thunk)
10830 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
10831 (enum s390_indirect_branch_type): Define.
10832 * config/s390/s390.c (struct s390_frame_layout, struct
10833 machine_function): Remove.
10834 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
10835 (indirect_branch_table_label_no, indirect_branch_table_name):
10837 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
10838 (enum s390_indirect_branch_option): Define.
10839 (s390_return_addr_from_memory): New function.
10840 (s390_handle_string_attribute): New function.
10841 (s390_attribute_table): Add new attribute handler.
10842 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
10843 (s390_indirect_branch_via_thunk): New function.
10844 (s390_indirect_branch_via_inline_thunk): New function.
10845 (s390_function_ok_for_sibcall): When jumping via thunk disallow
10846 sibling call optimization for non z10 compiles.
10847 (s390_emit_call): Force indirect branch target to be a single
10848 register. Add r1 clobber for non-z10 compiles.
10849 (s390_emit_epilogue): Emit return jump via return_use expander.
10850 (s390_reorg): Handle JUMP_INSNs as execute targets.
10851 (s390_option_override_internal): Perform validity checks for the
10852 new command line options.
10853 (s390_indirect_branch_attrvalue): New function.
10854 (s390_indirect_branch_settings): New function.
10855 (s390_set_current_function): Invoke s390_indirect_branch_settings.
10856 (s390_output_indirect_thunk_function): New function.
10857 (s390_code_end): Implement target hook.
10858 (s390_case_values_threshold): Implement target hook.
10859 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
10861 * config/s390/s390.h (struct s390_frame_layout)
10862 (struct machine_function): Move here from s390.c.
10863 (TARGET_INDIRECT_BRANCH_NOBP_RET)
10864 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
10865 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
10866 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
10867 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
10868 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
10869 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
10870 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
10871 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
10872 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
10873 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
10874 (mnemonic attribute): Add values which aren't recognized
10876 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
10877 pattern for branch conversion. Fix mnemonic attribute.
10878 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
10879 indirect branch via thunk if requested.
10880 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
10881 ("*indirect_jump"): Disable for branch conversion using out of
10883 ("indirect_jump_via_thunk<mode>_z10")
10884 ("indirect_jump_via_thunk<mode>")
10885 ("indirect_jump_via_inlinethunk<mode>_z10")
10886 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
10887 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
10888 ("casesi_jump_via_inlinethunk<mode>_z10")
10889 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
10890 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
10891 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
10892 ("*indirect2_jump"): Disable for branch conversion.
10893 ("casesi_jump"): Turn into expander and expand patterns for branch
10895 ("return_use"): New expander.
10896 ("*return"): Emit return via thunk and rename it to ...
10897 ("*return<mode>"): ... this one.
10898 * config/s390/s390.opt: Add new options and and enum for the
10901 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
10903 * lra-constraints.c (match_reload): Unconditionally use
10904 gen_lowpart_SUBREG, rather than selecting between that
10905 and equivalent gen_rtx_SUBREG code.
10907 2018-02-08 Richard Biener <rguenther@suse.de>
10909 PR tree-optimization/84233
10910 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
10911 changed flag instead of boguously re-using phi_inserted.
10913 2018-02-08 Martin Jambor <mjambor@suse.cz>
10915 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
10916 static local variables.
10918 2018-02-08 Richard Biener <rguenther@suse.de>
10920 PR tree-optimization/84278
10921 * tree-vect-stmts.c (vectorizable_store): When looking for
10922 smaller vector types to perform grouped strided loads/stores
10923 make sure the mode is supported by the target.
10924 (vectorizable_load): Likewise.
10926 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
10928 * config/aarch64/aarch64.c (aarch64_components_for_bb):
10929 Increase LDP/STP opportunities by adding adjacent callee-saves.
10931 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
10933 PR rtl-optimization/84068
10934 PR rtl-optimization/83459
10935 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
10937 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
10939 PR tree-optimization/84224
10940 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
10941 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
10942 non-zero arguments.
10944 2018-02-07 Iain Sandoe <iain@codesourcery.com>
10947 * config/rs6000/altivec.md (*restore_world): Remove LR use.
10948 * config/rs6000/predicates.md (restore_world_operation): Adjust op
10949 count, remove one USE.
10951 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
10953 * doc/install.texi (Configuration): Document the
10954 --with-long-double-format={ibm,ieee} PowerPC configuration
10958 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
10959 Convert from define_expand to be define_insn_and_split. Rework
10960 float/double/_Float128 conversions to QI/HI/SImode to work with
10961 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
10962 conversions to QI/HImode types did a store and then a load to
10963 truncate the value. For conversions to VSX registers, don't split
10964 the insn, instead emit the code directly. Use the code iterator
10965 any_fix to combine signed and unsigned conversions.
10966 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
10967 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
10968 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
10969 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
10970 (fix_<mode>di2_hw): Likewise.
10971 (fixuns_<mode>di2_hw): Likewise.
10972 (fix_<mode>si2_hw): Likewise.
10973 (fixuns_<mode>si2_hw): Likewise.
10974 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
10975 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
10976 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
10977 fix<uns>_trunc<SFDF:mode>si2_p8.
10978 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
10979 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
10980 (fix<uns>_<mode>_mem): Likewise.
10981 (fctiw<u>z_<mode>_mem): Likewise.
10982 (fix<uns>_<mode>_mem): Likewise.
10983 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
10984 the register allocator from doing a direct move to the GPRs to do
10985 a store, and instead use the ISA 3.0 store byte/half-word from
10986 vector register instruction. For IEEE 128-bit floating point,
10987 also optimize stores of 32-bit ints.
10988 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
10990 2018-02-07 Alan Hayward <alan.hayward@arm.com>
10992 * genextract.c (push_pathstr_operand): New function to support
10994 (walk_rtx): Call push_pathstr_operand.
10995 (print_path): Support [a-zA-Z].
10997 2018-02-07 Richard Biener <rguenther@suse.de>
10999 PR tree-optimization/84037
11000 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
11001 (cse_and_gimplify_to_preheader): Declare.
11002 (vect_get_place_in_interleaving_chain): Likewise.
11003 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11005 (_loop_vec_info::~_loop_vec_info): Delete it.
11006 (cse_and_gimplify_to_preheader): New function.
11007 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
11008 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
11009 (vectorizable_load): Likewise. For grouped stores always base
11010 the IV on the first element.
11011 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
11012 condition before gimplifying.
11014 2018-02-07 Jakub Jelinek <jakub@redhat.com>
11016 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
11017 *DIV_EXPR and *MOD_EXPR.
11019 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
11022 * config/i386/i386.c (ix86_option_override_internal): Mask out
11023 the CF_SET bit when checking -fcf-protection.
11025 2018-02-07 Tom de Vries <tom@codesourcery.com>
11028 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
11031 2018-02-07 Richard Biener <rguenther@suse.de>
11033 PR tree-optimization/84204
11034 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
11037 PR tree-optimization/84205
11038 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
11039 special-case isl_ast_op_zdiv_r.
11041 PR tree-optimization/84223
11042 * graphite-scop-detection.c (gather_bbs::before_dom_children):
11043 Only add conditions from within the region.
11044 (gather_bbs::after_dom_children): Adjust.
11046 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
11049 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
11050 * config/avr/avr.md: Only post-reload split REG-REG moves if
11051 either register is GENERAL_REG_P.
11053 2018-02-07 Jakub Jelinek <jakub@redhat.com>
11055 PR tree-optimization/84235
11056 * tree-ssa-scopedtables.c
11057 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
11058 if the subtraction is performed in floating point type where NaNs are
11059 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
11060 build 1. Formatting fix.
11062 2018-02-06 Jakub Jelinek <jakub@redhat.com>
11065 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
11066 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
11067 and skip it regardless of bb boundaries. Use CALL_P macro,
11068 don't test INSN_P (insn) together with CALL_P or JUMP_P check
11069 unnecessarily, formatting fix.
11071 2018-02-06 Michael Collison <michael.collison@arm.com>
11073 * config/arm/thumb2.md:
11074 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
11075 (*thumb_mov_notscc): Ditto.
11077 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
11080 * config/rs6000/rs6000.md (su code attribute): Use "u" for
11081 unsigned_fix, not "s".
11083 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11085 * configure.ac (gcc_fn_eh_frame_ro): New function.
11086 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
11087 correct .eh_frame permissions.
11088 * configure: Regenerate.
11090 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
11092 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
11093 irrelevant options.
11095 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11097 * config/rs6000/rs6000.c (rs6000_option_override_internal):
11098 Display warning message for -mno-speculate-indirect-jumps.
11100 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
11102 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
11104 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
11106 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
11108 PR tree-optimization/84225
11109 * tree-eh.c (find_trapping_overflow): Only call
11110 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
11112 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
11115 * config/i386/i386.c: Reimplement the check of possible options
11116 -mibt/-mshstk conbination. Change error messages.
11117 * doc/invoke.texi: Fix a typo: remove extra '='.
11119 2018-02-06 Marek Polacek <polacek@redhat.com>
11121 PR tree-optimization/84228
11122 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
11124 2018-02-06 Tamar Christina <tamar.christina@arm.com>
11127 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
11128 emitted arch directives.
11129 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
11130 __ARM_FEATURE_COPROC before changing architectures.
11132 2018-02-06 Richard Biener <rguenther@suse.de>
11134 * config/i386/i386.c (print_reg): Fix typo.
11135 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
11137 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
11139 * configure: Regenerate.
11141 2018-02-05 Martin Sebor <msebor@redhat.com>
11143 PR tree-optimization/83369
11144 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
11147 2018-02-05 Martin Liska <mliska@suse.cz>
11149 * doc/invoke.texi: Cherry-pick upstream r323995.
11151 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
11153 * ira.c (ira_init_register_move_cost): Adjust comment.
11155 2018-02-05 Martin Liska <mliska@suse.cz>
11157 PR gcov-profile/84137
11158 * doc/gcov.texi: Fix typo in documentation.
11160 2018-02-05 Martin Liska <mliska@suse.cz>
11162 PR gcov-profile/83879
11163 * doc/gcov.texi: Document necessity of --dynamic-list-data when
11164 using dlopen functionality.
11166 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
11168 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
11169 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
11170 _mm_maskz_range_ss, _mm_mask_range_round_ss,
11171 _mm_maskz_range_round_ss): New intrinsics.
11172 (__builtin_ia32_rangesd128_round)
11173 (__builtin_ia32_rangess128_round): Remove.
11174 (__builtin_ia32_rangesd128_mask_round,
11175 __builtin_ia32_rangess128_mask_round): New builtins.
11176 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
11177 __builtin_ia32_rangess128_round): Remove.
11178 (__builtin_ia32_rangesd128_mask_round,
11179 __builtin_ia32_rangess128_mask_round): New builtins.
11180 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
11181 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
11182 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
11183 "<round_saeonly_constraint>")): Changed to ...
11184 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
11185 "<round_saeonly_scalar_constraint>")): ... this.
11186 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
11187 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
11188 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
11189 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
11190 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
11192 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
11194 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
11196 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
11197 Remove all values except native, 8540 and 8548.
11199 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
11201 * config/i386/i386.c (ix86_output_function_return): Pass
11202 INVALID_REGNUM, instead of -1, as invalid register number to
11203 indirect_thunk_name and output_indirect_thunk.
11205 2018-02-02 Julia Koval <julia.koval@intel.com>
11207 * config.gcc: Add -march=icelake.
11208 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
11209 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
11210 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
11211 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
11212 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
11213 (processor_target_table): Add icelake.
11214 (ix86_option_override_internal): Handle new PTAs.
11215 (get_builtin_code_for_version): Handle icelake.
11216 (M_INTEL_COREI7_ICELAKE): New.
11217 (fold_builtin_cpu): Handle icelake.
11218 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
11219 * doc/invoke.texi: Add -march=icelake.
11221 2018-02-02 Julia Koval <julia.koval@intel.com>
11223 * config/i386/i386.c (ix86_option_override_internal): Change flags type
11224 to wide_int_bitmask.
11225 * wide-int-bitmask.h: New.
11227 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
11230 * config/i386/i386.md: Replace Pmode with word_mode in
11231 builtin_setjmp_setup and builtin_longjmp to support x32.
11233 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
11237 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
11239 (rs6000_supported_cpu_names): New static variable.
11240 (linux_cpu_translation_table): Likewise.
11241 (elf_platform) <cpu>: Define new static variable and use it.
11242 Translate kernel AT_PLATFORM name to canonical name if needed.
11243 Error if platform name is unknown.
11245 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
11248 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
11250 2018-02-01 Jeff Law <law@redhat.com>
11253 * config/i386/i386.c (release_scratch_register_on_entry): Add new
11254 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
11255 the scratch if RELEASE_VIA_POP is false.
11256 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
11257 If we have to save a temporary register, decrement SIZE appropriately.
11258 Pass new arguments to release_scratch_register_on_entry.
11259 (ix86_adjust_stack_and_probe): Likewise.
11260 (ix86_emit_probe_stack_range): Pass new arguments to
11261 release_scratch_register_on_entry.
11263 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
11265 PR rtl-optimization/84157
11266 * combine.c (change_zero_ext): Use REG_P predicate in
11267 front of HARD_REGISTER_P predicate.
11269 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
11271 * config/avr/avr.c (avr_option_override): Move disabling of
11272 -fdelete-null-pointer-checks to...
11273 * common/config/avr/avr-common.c (avr_option_optimization_table):
11276 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
11278 PR tree-optimization/81635
11279 * tree-data-ref.c (split_constant_offset_1): For types that
11280 wrap on overflow, try to use range info to prove that wrapping
11283 2018-02-01 Renlin Li <renlin.li@arm.com>
11286 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
11287 TAILCALL_ADDR_REGS.
11288 (aarch64_register_move_cost): Likewise.
11289 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
11290 TAILCALL_ADDR_REGS.
11291 (REG_CLASS_NAMES): Likewise.
11292 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
11293 TAILCALL_ADDR_REGS. Remove IP registers.
11294 * config/aarch64/aarch64.md (Ucs): Update register constraint.
11296 2018-02-01 Richard Biener <rguenther@suse.de>
11298 * domwalk.h (dom_walker::dom_walker): Add additional constructor
11299 for specifying RPO order and allow NULL for that.
11300 * domwalk.c (dom_walker::dom_walker): Likewise.
11301 (dom_walker::walk): Handle NULL RPO order.
11302 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
11304 (rewrite_update_dom_walker): Likewise.
11305 (mark_def_dom_walker): Likewise.
11307 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
11309 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
11310 (aarch64_maybe_expand_sve_subreg_move): Declare.
11311 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
11312 * config/aarch64/predicates.md (aarch64_any_register_operand): New
11314 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
11315 that are semantically a reverse operation.
11316 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
11317 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
11318 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
11320 (aarch64_can_change_mode_class): For big-endian, forbid changes
11321 between two SVE modes if they have different element sizes.
11323 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
11325 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
11326 the TImode handling for big-endian targets.
11328 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
11330 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
11331 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
11333 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
11334 Remove BSWAP handing for big-endian targets and use the form of
11335 LD1RQ appropariate for the mode.
11337 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
11339 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
11340 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
11341 duplicated element.
11343 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
11346 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
11347 check for operands that need to go through aarch64_sve_reload_be.
11349 2018-02-01 Jakub Jelinek <jakub@redhat.com>
11351 PR tree-optimization/81661
11352 PR tree-optimization/84117
11353 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
11354 * tree-eh.c: Include gimplify.h.
11355 (find_trapping_overflow, replace_trapping_overflow,
11356 rewrite_to_non_trapping_overflow): New functions.
11357 * tree-vect-loop.c: Include tree-eh.h.
11358 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
11359 * tree-data-ref.c: Include tree-eh.h.
11360 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
11362 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
11364 PR rtl-optimization/84123
11365 * combine.c (change_zero_ext): Check if hard register satisfies
11366 can_change_dest_mode before calling gen_lowpart_SUBREG.
11368 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
11371 * ira.c (ira_init_register_move_cost): Remove assert.
11373 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
11375 PR rtl-optimization/84071
11376 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
11377 * doc/tm.texi: Regenerate.
11379 2018-01-31 Richard Biener <rguenther@suse.de>
11381 PR tree-optimization/84132
11382 * tree-data-ref.c (analyze_miv_subscript): Properly
11383 check whether evolution_function_is_affine_multivariate_p
11384 before calling gcd_of_steps_may_divide_p.
11386 2018-01-31 Julia Koval <julia.koval@intel.com>
11389 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
11390 * config/i386/i386.md (rdpid_rex64) New.
11391 (rdpid): Make 32bit only.
11393 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
11396 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
11397 an IDENTIFIER_NODE for FUNCTION_TYPE's.
11399 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
11402 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
11404 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11406 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
11408 PR rtl-optimization/84071
11409 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
11410 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
11412 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
11414 * config/arc/arc.c (arc_handle_aux_attribute): New function.
11415 (arc_attribute_table): Add 'aux' attribute.
11416 (arc_in_small_data_p): Consider aux like variables.
11417 (arc_is_aux_reg_p): New function.
11418 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
11419 (arc_get_aux_arg): New function.
11420 (prepare_move_operands): Handle aux-register access.
11421 (arc_handle_aux_attribute): New function.
11422 * doc/extend.texi (ARC Variable attributes): Add subsection.
11424 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
11426 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
11427 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
11428 (arc_attribute_table): Add 'uncached' attribute.
11429 (arc_print_operand): Print '.di' flag for uncached memory
11431 (arc_in_small_data_p): Do not consider for small data the uncached
11433 (arc_is_uncached_mem_p): New function.
11434 * config/arc/predicates.md (compact_store_memory_operand): Check
11435 for uncached memory accesses.
11436 (nonvol_nonimm_operand): Likewise.
11437 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
11439 2018-01-31 Jakub Jelinek <jakub@redhat.com>
11442 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
11443 falign-loops=): Add Optimization flag.
11445 2018-01-30 Jeff Law <law@redhat.com>
11448 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
11449 INT_REGISTERS_SAVED. Check it prior to calling
11450 get_scratch_register_on_entry.
11451 (ix86_adjust_stack_and_probe): Similarly.
11452 (ix86_emit_probe_stack_range): Similarly.
11453 (ix86_expand_prologue): Corresponding changes.
11455 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11458 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
11459 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
11461 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
11464 * lra-constraints.c (curr_insn_transform): Process AND in the
11467 2018-01-30 Jakub Jelinek <jakub@redhat.com>
11469 PR rtl-optimization/83986
11470 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
11471 dependence against last_pending_memory_flush in addition to
11472 pending_jump_insns.
11474 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
11476 PR tree-optimization/81611
11477 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
11480 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11483 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
11486 2018-01-30 Richard Biener <rguenther@suse.de>
11487 Jakub Jelinek <jakub@redhat.com>
11489 PR tree-optimization/84111
11490 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
11491 inner loops added during recursion, as they don't have up-to-date
11494 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
11497 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
11498 (can_inline_edge_by_limits_p): ... here.
11499 (can_early_inline_edge_p, check_callers,
11500 update_caller_keys, update_callee_keys, recursive_inlining,
11501 add_new_edges_to_heap, speculation_useful_p,
11502 inline_small_functions,
11503 inline_small_functions, flatten_function,
11504 inline_to_all_callers_1): Update.
11506 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
11508 * profile-count.c (profile_count::combine_with_ipa_count): Handle
11511 2018-01-30 Richard Biener <rguenther@suse.de>
11513 PR tree-optimization/83008
11514 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
11515 invariant and constant vector uses in stmts when they need
11516 more than one stmt.
11518 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11521 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
11522 * configure: Regenerate.
11524 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
11526 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
11528 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
11529 Use gen_rtx_REG rather than gen_lowpart.
11531 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
11533 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
11534 rather than 0 when creating partial subregs.
11536 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
11538 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
11541 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
11544 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
11545 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
11546 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
11547 flags. This restores the settings used before the 2017-07-24.
11548 Turning off pre increment/decrement/modify allows IVOPTS to
11549 optimize DF/SF loops where the index is an int.
11551 2018-01-29 Richard Biener <rguenther@suse.de>
11552 Kelvin Nilsen <kelvin@gcc.gnu.org>
11555 * tree-vect-stmts.c (vectorizable_call): Don't call
11556 targetm.vectorize_builtin_md_vectorized_function if callee is
11559 2018-01-22 Carl Love <cel@us.ibm.com>
11561 * doc/extend.tex: Fix typo in second arg in
11562 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
11564 2018-01-29 Richard Biener <rguenther@suse.de>
11566 PR tree-optimization/84086
11567 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
11568 (flush_ssaname_freelist): When SSA names were released reset
11569 the SCEV hash table.
11571 2018-01-29 Richard Biener <rguenther@suse.de>
11573 PR tree-optimization/84057
11574 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
11575 removed paths when removing edges.
11577 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
11579 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
11580 -mfunction-return=@var{choice}.
11582 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
11584 PR diagnostic/84034
11585 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
11586 Handle CR like TAB.
11587 (layout::print_source_line): Likewise.
11588 (test_get_line_width_without_trailing_whitespace): Add test cases.
11590 2018-01-27 Jakub Jelinek <jakub@redhat.com>
11592 PR middle-end/84040
11593 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
11596 2018-01-26 Jim Wilson <jimw@sifive.com>
11598 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
11600 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
11603 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11605 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
11606 and CMP + SUB-immediate -> SUBS.
11608 2018-01-26 Martin Sebor <msebor@redhat.com>
11610 PR tree-optimization/83896
11611 * tree-ssa-strlen.c (get_string_len): Rename...
11612 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
11613 Avoid assuming length is constant.
11614 (handle_char_store): Use HOST_WIDE_INT for string length.
11616 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
11619 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
11620 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
11622 2018-01-26 Richard Biener <rguenther@suse.de>
11624 PR rtl-optimization/84003
11625 * dse.c (record_store): Only record redundant stores when
11626 the earlier store aliases at least all accesses the later one does.
11628 2018-01-26 Jakub Jelinek <jakub@redhat.com>
11630 PR rtl-optimization/83985
11631 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
11632 REG_CFA_RESTORE insns.
11633 (delete_unmarked_insns): Don't ignore separate shrink wrapping
11634 REG_CFA_RESTORE insns here.
11637 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
11638 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
11640 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
11642 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
11643 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
11644 (arc_init): Likewise.
11645 (arc_override_options): Likewise.
11646 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
11648 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
11650 * config/arc/arc.h (TARGET_DBNZ): Define.
11651 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
11652 properly set the tune attribute.
11653 (dbnz): Use TARGET_DBNZ guard.
11654 * config/arc/arc.opt (mtune): Add core3 option.
11656 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
11658 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
11659 recognize new pic like addresses.
11660 (arc_delegitimize_address): Clean up.
11662 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
11664 * config/arc/arc-arches.def: Option mrf16 valid for all
11666 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
11667 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
11668 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
11669 * config/arc/arc-tables.opt: Regenerate.
11670 * config/arc/arc.c (arc_conditional_register_usage): Handle
11671 reduced register file case.
11672 (arc_file_start): Set must have build attributes.
11673 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
11674 mrf16 option value.
11675 * config/arc/arc.opt (mrf16): Add new option.
11676 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
11677 * config/arc/genmultilib.awk: Handle new mrf16 option.
11678 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
11679 * config/arc/t-multilib: Regenerate.
11680 * doc/invoke.texi (ARC Options): Document mrf16 option.
11682 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
11684 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
11685 * config/arc/arc.c (arc_handle_secure_attribute): New function.
11686 (arc_attribute_table): Add 'secure_call' attribute.
11687 (arc_print_operand): Print secure call operand.
11688 (arc_function_ok_for_sibcall): Don't optimize tail calls when
11690 (arc_is_secure_call_p): New function. * config/arc/arc.md
11691 (call_i): Add support for sjli instruction.
11692 (call_value_i): Likewise.
11693 * config/arc/constraints.md (Csc): New constraint.
11695 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
11696 John Eric Martin <John.Martin@emmicro-us.com>
11698 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
11699 * config/arc/arc.c (_arc_jli_section): New struct.
11700 (arc_jli_section): New type.
11701 (rc_jli_sections): New static variable.
11702 (arc_handle_jli_attribute): New function.
11703 (arc_attribute_table): Add jli_always and jli_fixed attribute.
11704 (arc_file_end): New function.
11705 (TARGET_ASM_FILE_END): Define.
11706 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
11707 (arc_add_jli_section): New function.
11708 (jli_call_scan): Likewise.
11709 (arc_reorg): Call jli_call_scan.
11710 (arc_output_addsi): Remove 'S' from printing asm operand.
11711 (arc_is_jli_call_p): New function.
11712 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
11714 (movhi_insn): Likewise.
11715 (movsi_insn): Likewise.
11716 (movsi_set_cc_insn): Likewise.
11717 (loadqi_update): Likewise.
11718 (load_zeroextendqisi_update): Likewise.
11719 (load_signextendqisi_update): Likewise.
11720 (loadhi_update): Likewise.
11721 (load_zeroextendhisi_update): Likewise.
11722 (load_signextendhisi_update): Likewise.
11723 (loadsi_update): Likewise.
11724 (loadsf_update): Likewise.
11725 (movsicc_insn): Likewise.
11726 (bset_insn): Likewise.
11727 (bxor_insn): Likewise.
11728 (bclr_insn): Likewise.
11729 (bmsk_insn): Likewise.
11730 (bicsi3_insn): Likewise.
11731 (cmpsi_cc_c_insn): Likewise.
11732 (movsi_ne): Likewise.
11733 (movsi_cond_exec): Likewise.
11734 (clrsbsi2): Likewise.
11735 (norm_f): Likewise.
11745 (call_i): Remove 'S' asm letter, add jli instruction.
11746 (call_value_i): Likewise.
11747 * config/arc/arc.op (mjli-always): New option.
11748 * config/arc/constraints.md (Cji): New constraint.
11749 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
11751 (subsf3_fpx): Likewise.
11752 (mulsf3_fpx): Likewise.
11753 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
11755 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
11756 function attrbutes.
11757 * doc/invoke.texi (ARC): Document mjli-always option.
11759 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
11761 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
11762 avoid addition with 0 and use incw and decw where possible.
11764 2018-01-26 Richard Biener <rguenther@suse.de>
11766 PR tree-optimization/81082
11767 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
11768 association if it requires casting to unsigned.
11769 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
11770 from fold_plusminus_mult_expr to catch important cases late when
11771 range info is available.
11773 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11775 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
11776 * configure.ac (hidden_linkonce): New test.
11777 * configure: Regenerate.
11778 * config.in: Regenerate.
11780 2018-01-26 Julia Koval <julia.koval@intel.com>
11782 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
11783 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
11784 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
11785 _mm_mask_bitshuffle_epi64_mask): Fix type.
11786 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
11787 USI_FTYPE_V4DI_V4DI_USI): Remove.
11788 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
11789 __builtin_ia32_vpshufbitqmb256_mask,
11790 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
11791 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
11792 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
11794 2018-01-26 Alan Modra <amodra@gmail.com>
11797 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
11798 UNSPEC_VBPERMQ. Sort other unspecs.
11800 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
11802 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
11804 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
11806 PR middle-end/83055
11807 * predict.c (drop_profile): Do not push/pop cfun; update also
11809 (handle_missing_profiles): Fix logic looking for zero profiles.
11811 2018-01-25 Jakub Jelinek <jakub@redhat.com>
11813 PR middle-end/83977
11814 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
11815 on functions with #pragma omp declare simd or functions with simd
11817 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
11818 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
11819 Remove trailing \n from warning_at calls.
11821 2018-01-25 Tom de Vries <tom@codesourcery.com>
11824 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
11825 for neutered workers.
11827 2018-01-24 Joseph Myers <joseph@codesourcery.com>
11830 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
11831 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
11833 2018-01-24 Jeff Law <law@redhat.com>
11836 * i386.c (get_probe_interval): Move to earlier point.
11837 (ix86_compute_frame_layout): If -fstack-clash-protection and
11838 the frame is larger than the probe interval, then use pushes
11839 to save registers rather than reg->mem moves.
11840 (ix86_expand_prologue): Remove conditional for int_registers_saved
11843 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
11846 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
11847 min/max for never referenced object.
11849 2018-01-24 Jakub Jelinek <jakub@redhat.com>
11851 PR middle-end/83977
11852 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
11854 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
11855 attributes from DECL_ATTRIBUTES (decl) without affecting
11856 DECL_ATTRIBUTES (current_function_decl).
11857 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
11858 functions with non-NULL DECL_ABSTRACT_ORIGIN.
11860 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
11862 PR tree-optimization/83979
11863 * fold-const.c (fold_comparison): Use constant_boolean_node
11864 instead of boolean_{true,false}_node.
11866 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
11868 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
11871 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11873 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
11874 Simplify the clause that sets the length attribute.
11875 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
11876 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
11877 clause that sets the length attribute.
11878 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
11880 2018-01-24 Tom de Vries <tom@codesourcery.com>
11883 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
11884 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
11885 Add strict parameter.
11886 (prevent_branch_around_nothing): Insert dummy insn between branch to
11887 label and label with no ptx insn inbetween.
11888 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
11890 2018-01-24 Tom de Vries <tom@codesourcery.com>
11893 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
11894 for neutered threads in warp.
11895 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
11897 2018-01-24 Richard Biener <rguenther@suse.de>
11899 PR tree-optimization/83176
11900 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
11903 2018-01-24 Richard Biener <rguenther@suse.de>
11905 PR tree-optimization/82819
11906 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
11907 code generating pluses that are no-ops in the target precision.
11909 2018-01-24 Richard Biener <rguenther@suse.de>
11911 PR middle-end/84000
11912 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
11914 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
11916 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
11917 to merge probabilities.
11918 * predict.c (probably_never_executed): Also mark as cold functions
11919 with global 0 profile and guessed local profile.
11920 * profile-count.c (profile_probability::combine_with_count): New
11922 * profile-count.h (profile_probability::operator*,
11923 profile_probability::operator*=, profile_probability::operator/,
11924 profile_probability::operator/=): Reduce precision to adjusted
11925 and set value to guessed on contradictory divisions.
11926 (profile_probability::combine_with_freq): Remove.
11927 (profile_probability::combine_wiht_count): Declare.
11928 (profile_count::force_nonzero):: Set to adjusted.
11929 (profile_count::probability_in):: Set quality to adjusted.
11930 * tree-ssa-tail-merge.c (replace_block_by): Use
11931 combine_with_count.
11933 2018-01-23 Andrew Waterman <andrew@sifive.com>
11934 Jim Wilson <jimw@sifive.com>
11936 * config/riscv/riscv.c (riscv_stack_boundary): New.
11937 (riscv_option_override): Set riscv_stack_boundary. Handle
11938 riscv_preferred_stack_boundary_arg.
11939 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
11940 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
11941 (STACK_BOUNDARY): Set to riscv_stack_boundary.
11942 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
11943 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
11944 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
11946 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
11949 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
11950 of struct ix86_frame.
11951 (ix86_expand_epilogue): Likewise. Add a local variable for
11952 the reg_save_offset field in struct ix86_frame.
11954 2018-01-23 Bin Cheng <bin.cheng@arm.com>
11956 PR tree-optimization/82604
11957 * tree-loop-distribution.c (enum partition_kind): New enum item
11958 PKIND_PARTIAL_MEMSET.
11959 (partition_builtin_p): Support above new enum item.
11960 (generate_code_for_partition): Ditto.
11961 (compute_access_range): Differentiate cases that equality can be
11962 proven at all loops, the innermost loops or no loops.
11963 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
11964 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
11965 (finalize_partitions, distribute_loop): Don't fuse partition of
11966 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
11967 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
11968 parloop is enabled.
11970 2018-01-23 Martin Liska <mliska@suse.cz>
11972 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
11973 order to ignore the predictor.
11974 (PRED_POLYMORPHIC_CALL): Likewise.
11975 (PRED_RECURSIVE_CALL): Likewise.
11977 2018-01-23 Martin Liska <mliska@suse.cz>
11979 * tree-profile.c (tree_profiling): Print function header to
11980 aware reader which function we are working on.
11981 * value-prof.c (gimple_find_values_to_profile): Do not print
11982 not interesting value histograms.
11984 2018-01-23 Martin Liska <mliska@suse.cz>
11986 * profile-count.h (enum profile_quality): Add
11987 profile_uninitialized as the first value. Do not number values
11988 as they are zero based.
11989 (profile_count::verify): Update sanity check.
11990 (profile_probability::verify): Likewise.
11992 2018-01-23 Nathan Sidwell <nathan@acm.org>
11994 * doc/invoke.texi (ffor-scope): Deprecate.
11996 2018-01-23 David Malcolm <dmalcolm@redhat.com>
11998 PR tree-optimization/83510
11999 * domwalk.c (set_all_edges_as_executable): New function.
12000 (dom_walker::dom_walker): Convert bool param
12001 "skip_unreachable_blocks" to enum reachability. Move setup of
12002 edge flags to set_all_edges_as_executable and only do it when
12003 reachability is REACHABLE_BLOCKS.
12004 * domwalk.h (enum dom_walker::reachability): New enum.
12005 (dom_walker::dom_walker): Convert bool param
12006 "skip_unreachable_blocks" to enum reachability.
12007 (set_all_edges_as_executable): New decl.
12008 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
12009 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
12011 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
12012 but converting true to REACHABLE_BLOCKS.
12013 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
12015 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
12016 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
12017 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
12019 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
12020 if check_all_array_refs will be called.
12022 2018-01-23 David Malcolm <dmalcolm@redhat.com>
12024 * tree.c (selftest::test_location_wrappers): Add more test
12027 2018-01-23 David Malcolm <dmalcolm@redhat.com>
12029 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
12030 (selftest::test_bit_in_range): Likewise.
12032 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
12035 * doc/sourcebuild.texi (vect_float): Say that the selector
12036 only describes the situation when -funsafe-math-optimizations is on.
12037 (vect_float_strict): Document.
12039 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
12041 PR tree-optimization/83965
12042 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
12043 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
12044 instead of checking only for a reduction.
12045 (vect_recog_widen_sum_pattern): Likewise.
12047 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
12049 * predict.c (probably_never_executed): Only use precise profile info.
12050 (compute_function_frequency): Skip after inlining hack since we now
12051 have quality checking.
12053 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
12055 * profile-count.h (profile_probability::very_unlikely,
12056 profile_probability::unlikely, profile_probability::even): Set
12057 precision to guessed.
12059 2018-01-23 Richard Biener <rguenther@suse.de>
12061 PR tree-optimization/83963
12062 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
12063 Properly terminate dominator walk when crossing the exit edge not
12064 when visiting its source block.
12066 2018-01-23 Jakub Jelinek <jakub@redhat.com>
12069 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
12070 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
12072 2018-01-22 Jakub Jelinek <jakub@redhat.com>
12074 PR tree-optimization/83957
12075 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
12076 semicolon after for body surrounded by braces.
12078 PR tree-optimization/83081
12079 * profile-count.h (profile_probability::split): New method.
12080 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
12081 Use profile_probability::split.
12082 (do_compare_rtx_and_jump): Fix adjustment of probabilities
12083 when splitting a single conditional jump into 2.
12085 2018-01-22 David Malcolm <dmalcolm@redhat.com>
12087 PR tree-optimization/69452
12088 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
12091 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
12093 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
12094 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
12095 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
12097 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
12099 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
12101 * config/rl78/rl78.md (movdi): New define_expand.
12102 * config/rl78/rl78.c (rl78_split_movdi): New function.
12104 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
12107 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
12109 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
12110 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
12111 128-bit to produce an UNSPEC move to get the double word with the
12112 signbit and then a shift directly to do signbit.
12113 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
12114 implementation with a new version that just does either a direct
12115 move or a regular move. Move memory interface to separate insns.
12116 Move insns so they are next to the expander.
12117 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
12118 with signbit move. Split big and little endian case.
12119 (signbit<mode>2_dm_mem_le): Likewise.
12120 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
12121 (signbit<mode>2_dm2): Likewise.
12123 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
12125 * config/rl78/rl78.md (anddi3): New define_expand.
12127 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
12129 * config/rl78/rl78.md (umindi3): New define_expand.
12131 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
12133 * config/rl78/rl78.md (smindi3): New define_expand.
12135 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
12137 * config/rl78/rl78.md (smaxdi3): New define_expand.
12139 2018-01-22 Carl Love <cel@us.ibm.com>
12141 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
12142 LVX_V1TI): Add macro expansion.
12143 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
12144 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
12145 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
12146 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
12147 Change check to determine if the instruction is a byte reversing
12148 entry. Fix typo in comment.
12149 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
12150 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
12151 Add def_builtin calls for new builtins.
12152 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
12153 Add define_insn expansion.
12155 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
12157 * config/rl78/rl78.md (umaxdi3): New define_expand.
12159 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
12161 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
12162 for non-QImode registers.
12164 2018-01-22 Richard Biener <rguenther@suse.de>
12166 PR tree-optimization/83963
12167 * graphite-scop-detection.c (scop_detection::get_sese): Delay
12168 including the loop exit block.
12169 (scop_detection::merge_sese): Likewise.
12170 (scop_detection::add_scop): Do it here instead.
12172 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12174 * doc/sourcebuild.texi (arm_softfloat): Document.
12176 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
12179 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
12180 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
12181 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
12183 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12184 David Edelsohn <dje.gcc@gmail.com>
12187 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12188 Change "crset eq" to "crset 2".
12189 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12190 (*call_indirect_aix<mode>_nospec): Likewise.
12191 (*call_value_indirect_aix<mode>_nospec): Likewise.
12192 (*call_indirect_elfv2<mode>_nospec): Likewise.
12193 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
12194 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
12195 change assembly output from . to $.
12196 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12197 (indirect_jump<mode>_nospec): Change assembly output from . to $.
12198 (*tablejump<mode>_internal1_nospec): Likewise.
12200 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
12203 * config/sh/sh_optimize_sett_clrt.cc:
12204 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
12206 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
12208 PR tree-optimization/83940
12209 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
12210 offset_dt to vect_constant_def rather than vect_unknown_def_type.
12211 (vect_check_load_store_mask): Add a mask_dt_out parameter and
12212 use it to pass back the definition type.
12213 (vect_check_store_rhs): Likewise rhs_dt_out.
12214 (vect_build_gather_load_calls): Add a mask_dt argument and use
12215 it instead of a call to vect_is_simple_use.
12216 (vectorizable_store): Update calls to vect_check_load_store_mask
12217 and vect_check_store_rhs. Use the dt returned by the latter instead
12218 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
12219 instead of calls to vect_is_simple_use. Pass the scalar rather
12220 than the vector operand to vect_is_simple_use when handling
12221 second and subsequent copies of an rhs value.
12222 (vectorizable_load): Update calls to vect_check_load_store_mask
12223 and vect_build_gather_load_calls. Use the cached mask_dt and
12224 gs_info.offset_dt instead of calls to vect_is_simple_use.
12226 2018-01-20 Jakub Jelinek <jakub@redhat.com>
12228 PR middle-end/83945
12229 * tree-emutls.c: Include gimplify.h.
12230 (lower_emutls_2): New function.
12231 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
12232 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
12233 it before further processing.
12236 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
12237 UINTVAL (trueop1) instead of INTVAL (op1).
12239 2018-01-19 Jakub Jelinek <jakub@redhat.com>
12243 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
12244 INCOMING_FRAME_SP_OFFSET if not defined.
12245 (scan_trace): Add ENTRY argument. If true and
12246 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
12247 emit a note to adjust the CFA offset.
12248 (create_cfi_notes): Adjust scan_trace callers.
12249 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
12250 INCOMING_FRAME_SP_OFFSET in the CIE.
12251 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
12252 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
12254 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
12255 * doc/tm.texi: Regenerated.
12257 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12259 PR rtl-optimization/83147
12260 * lra-constraints.c (remove_inheritance_pseudos): Use
12261 lra_substitute_pseudo_within_insn.
12263 2018-01-19 Tom de Vries <tom@codesourcery.com>
12264 Cesar Philippidis <cesar@codesourcery.com>
12267 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
12269 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
12272 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
12273 spaces for function labels.
12275 2018-01-19 Martin Liska <mliska@suse.cz>
12277 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
12278 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
12279 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
12280 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
12281 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
12282 (PRED_CONST_RETURN): Change from 69 to 65.
12283 (PRED_NULL_RETURN): Change from 91 to 71.
12284 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
12285 (PRED_LOOP_GUARD): Change from 66 to 73.
12287 2018-01-19 Martin Liska <mliska@suse.cz>
12289 * predict.c (predict_insn_def): Add new assert.
12290 (struct branch_predictor): Change type to signed integer.
12291 (test_prediction_value_range): Amend test to cover
12292 PROB_UNINITIALIZED.
12293 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
12294 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
12295 (PRED_LOOP_ITERATIONS_MAX): Likewise.
12296 (PRED_LOOP_IV_COMPARE): Likewise.
12297 * predict.h (PROB_UNINITIALIZED): Define new constant.
12299 2018-01-19 Martin Liska <mliska@suse.cz>
12301 * predict.c (dump_prediction): Add new format for
12302 analyze_brprob.py script which is enabled with -details
12304 * profile-count.h (precise_p): New function.
12306 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
12308 PR tree-optimization/83922
12309 * tree-vect-loop.c (vect_verify_full_masking): Return false if
12310 there are no statements that need masking.
12311 (vect_active_double_reduction_p): New function.
12312 (vect_analyze_loop_operations): Use it when handling phis that
12313 are not in the loop header.
12315 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
12317 PR tree-optimization/83914
12318 * tree-vect-loop.c (vectorizable_induction): Don't convert
12319 init_expr or apply the peeling adjustment for inductions
12320 that are nested within the vectorized loop.
12322 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12324 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
12327 2018-01-18 Jakub Jelinek <jakub@redhat.com>
12331 * function.h (gimplify_parameters): Add gimple_seq * argument.
12332 * function.c: Include gimple.h and options.h.
12333 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
12334 for the added local temporaries if needed.
12335 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
12336 if there are any parameter cleanups, wrap whole body into a
12337 try/finally with the cleanups.
12339 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
12342 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
12343 Use GET_MODE_CLASS for scalar floating point.
12345 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
12349 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
12350 Fix call of call_cgraph_insertion_hooks.
12352 2018-01-18 Martin Sebor <msebor@redhat.com>
12354 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
12356 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
12359 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
12362 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
12365 * common.opt: (-ffile-prefix-map): New option.
12366 * opts.c (common_handle_option): Defer it.
12367 * opts-global.c (handle_common_deferred_options): Handle it.
12368 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
12369 * file-prefix-map.h: New file.
12370 (remap_debug_filename, add_debug_prefix_map): ...here.
12371 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
12372 * final.c (debug_prefix_map, add_debug_prefix_map
12373 remap_debug_filename): Move to...
12374 * file-prefix-map.c: New file.
12375 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
12376 generalize, get rid of alloca(), use strrchr() instead of strchr().
12377 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
12378 Implement in terms of add_prefix_map().
12379 (remap_macro_filename, remap_debug_filename): Implement in term of
12381 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
12382 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
12383 * dbxout.c: Include file-prefix-map.h.
12384 * varasm.c: Likewise.
12385 * vmsdbgout.c: Likewise.
12386 * xcoffout.c: Likewise.
12387 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
12388 * doc/cppopts.texi (-fmacro-prefix-map): Document.
12389 * doc/invoke.texi (-ffile-prefix-map): Document.
12390 (-fdebug-prefix-map): Update description.
12392 2018-01-18 Martin Liska <mliska@suse.cz>
12394 * config/i386/i386.c (indirect_thunk_name): Document that also
12396 (output_indirect_thunk): Document why both instructions
12397 (pause and lfence) are generated.
12399 2018-01-18 Richard Biener <rguenther@suse.de>
12401 PR tree-optimization/83887
12402 * graphite-scop-detection.c
12403 (scop_detection::get_nearest_dom_with_single_entry): Remove.
12404 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
12405 (scop_detection::merge_sese): Re-implement with a flood-fill
12406 algorithm that properly finds a SESE region if it exists.
12408 2018-01-18 Jakub Jelinek <jakub@redhat.com>
12411 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
12412 pointer_diff optimizations use view_convert instead of convert.
12414 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12416 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12417 Generate different code for -mno-speculate-indirect-jumps.
12418 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12419 (*call_indirect_aix<mode>): Disable for
12420 -mno-speculate-indirect-jumps.
12421 (*call_indirect_aix<mode>_nospec): New define_insn.
12422 (*call_value_indirect_aix<mode>): Disable for
12423 -mno-speculate-indirect-jumps.
12424 (*call_value_indirect_aix<mode>_nospec): New define_insn.
12425 (*sibcall_nonlocal_sysv<mode>): Generate different code for
12426 -mno-speculate-indirect-jumps.
12427 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12429 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
12431 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
12432 long double type, set the flags for noting the default long double
12433 type, even if we don't pass or return a long double type.
12435 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
12438 * ipa-inline.c (flatten_function): Do not overwrite final inlining
12441 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
12443 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
12444 support for merge[hl].
12445 (fold_mergehl_helper): New helper function.
12446 (tree-vector-builder.h): New #include for tree_vector_builder usage.
12447 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
12448 (altivec_vmrglw_direct): Add xxmrglw insn.
12450 2018-01-17 Andrew Waterman <andrew@sifive.com>
12452 * config/riscv/riscv.c (riscv_conditional_register_usage): If
12453 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
12455 2018-01-17 David Malcolm <dmalcolm@redhat.com>
12458 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
12459 call the lto_location_cache before reading the
12460 DECL_SOURCE_LOCATION of the types.
12462 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
12463 Richard Sandiford <richard.sandiford@linaro.org>
12465 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
12466 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
12467 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
12468 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
12469 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
12471 * config/aarch64/constraints.md (aarch64_movti_operand):
12473 * config/aarch64/predicates.md (Uti): Add new constraint.
12475 2018-01-17 Carl Love <cel@us.ibm.com>
12477 * config/rs6000/vsx.md (define_expand xl_len_r,
12478 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
12479 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
12481 (define_expand, define_insn): Move the shift left from the
12482 define_insn to the define_expand for lxvl and stxvl instructions.
12483 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
12484 and XL_LEN_R definitions to PURE.
12486 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
12488 * config/i386/i386.c (indirect_thunk_name): Declare regno
12489 as unsigned int. Compare regno with INVALID_REGNUM.
12490 (output_indirect_thunk): Ditto.
12491 (output_indirect_thunk_function): Ditto.
12492 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
12493 in the call to output_indirect_thunk_function.
12495 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
12497 PR middle-end/83884
12498 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
12499 rather than the size of inner_type to determine the stack slot size
12500 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
12502 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
12505 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
12508 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
12510 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
12511 endian Linux systems to optionally enable multilibs for selecting
12512 the long double type if the user configured an explicit type.
12513 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
12514 have no long double multilibs if not defined.
12515 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
12516 warn if the user used -mabi={ieee,ibm}longdouble and we built
12517 multilibs for long double.
12518 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
12519 appropriate multilib option.
12520 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
12522 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
12523 for building long double multilibs.
12524 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
12526 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
12528 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
12531 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
12533 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
12536 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
12539 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
12542 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
12544 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
12545 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
12547 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
12549 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
12550 different rtl trees depending on TARGET_64BIT.
12551 (rs6000_gen_lvx): Likewise.
12553 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
12555 * config/visium/visium.md (nop): Tweak comment.
12556 (hazard_nop): Likewise.
12558 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12560 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
12561 -mspeculate-indirect-jumps.
12562 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
12563 for -mno-speculate-indirect-jumps.
12564 (*call_indirect_elfv2<mode>_nospec): New define_insn.
12565 (*call_value_indirect_elfv2<mode>): Disable for
12566 -mno-speculate-indirect-jumps.
12567 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
12568 (indirect_jump): Emit different RTL for
12569 -mno-speculate-indirect-jumps.
12570 (*indirect_jump<mode>): Disable for
12571 -mno-speculate-indirect-jumps.
12572 (*indirect_jump<mode>_nospec): New define_insn.
12573 (tablejump): Emit different RTL for
12574 -mno-speculate-indirect-jumps.
12575 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
12576 (tablejumpsi_nospec): New define_expand.
12577 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
12578 (tablejumpdi_nospec): New define_expand.
12579 (*tablejump<mode>_internal1): Disable for
12580 -mno-speculate-indirect-jumps.
12581 (*tablejump<mode>_internal1_nospec): New define_insn.
12582 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
12585 2018-01-16 Artyom Skrobov tyomitch@gmail.com
12587 * caller-save.c (insert_save): Drop unnecessary parameter. All
12590 2018-01-16 Jakub Jelinek <jakub@redhat.com>
12591 Richard Biener <rguenth@suse.de>
12594 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
12595 return early, inline manually is_gimple_sizepos. Make sure if we
12596 call gimplify_expr we don't end up with a gimple constant.
12597 * tree.c (variably_modified_type_p): Don't return true for
12598 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
12599 * gimplify.h (is_gimple_sizepos): Remove.
12601 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
12603 PR tree-optimization/83857
12604 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
12605 vectorizable_live_operation for pure SLP statements.
12606 (vectorizable_live_operation): Handle PHIs.
12608 2018-01-16 Richard Biener <rguenther@suse.de>
12610 PR tree-optimization/83867
12611 * tree-vect-stmts.c (vect_transform_stmt): Precompute
12612 nested_in_vect_loop_p since the scalar stmt may get invalidated.
12614 2018-01-16 Jakub Jelinek <jakub@redhat.com>
12617 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
12618 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
12619 If off is not INTEGER_CST, issue a may not be aligned warning
12620 rather than isn't aligned. Use isn%'t rather than isn't.
12621 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
12623 <case MULT_EXPR>: Improve the case when bottom and one of the
12624 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
12625 operand, in that case check if the other operand is multiple of
12626 bottom divided by the INTEGER_CST operand.
12628 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
12631 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
12632 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
12633 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
12634 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
12635 * config/pa/pa.c (pa_function_arg_advance): Likewise.
12636 (pa_function_arg, pa_arg_partial_bytes): Likewise.
12637 (pa_function_arg_size): New function.
12639 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
12641 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
12642 in a separate statement.
12644 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
12646 PR tree-optimization/83847
12647 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
12648 group gathers and scatters.
12650 2018-01-16 Jakub Jelinek <jakub@redhat.com>
12652 PR rtl-optimization/86620
12653 * params.def (max-sched-ready-insns): Bump minimum value to 1.
12655 PR rtl-optimization/83213
12656 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
12657 to last if both are JUMP_INSNs.
12659 PR tree-optimization/83843
12660 * gimple-ssa-store-merging.c
12661 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
12662 store_immediate_info for bswap/nop orig_stores.
12664 2018-01-15 Andrew Waterman <andrew@sifive.com>
12666 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
12668 <UDIV>: Increase cost if !TARGET_DIV.
12670 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
12672 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
12673 (define_attr "cr_logical_3op"): New.
12674 (cceq_ior_compare): Adjust.
12675 (cceq_ior_compare_complement): Adjust.
12676 (*cceq_rev_compare): Adjust.
12677 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
12678 (is_cracked_insn): Adjust.
12679 (insn_must_be_first_in_group): Adjust.
12680 * config/rs6000/40x.md: Adjust.
12681 * config/rs6000/440.md: Adjust.
12682 * config/rs6000/476.md: Adjust.
12683 * config/rs6000/601.md: Adjust.
12684 * config/rs6000/603.md: Adjust.
12685 * config/rs6000/6xx.md: Adjust.
12686 * config/rs6000/7450.md: Adjust.
12687 * config/rs6000/7xx.md: Adjust.
12688 * config/rs6000/8540.md: Adjust.
12689 * config/rs6000/cell.md: Adjust.
12690 * config/rs6000/e300c2c3.md: Adjust.
12691 * config/rs6000/e500mc.md: Adjust.
12692 * config/rs6000/e500mc64.md: Adjust.
12693 * config/rs6000/e5500.md: Adjust.
12694 * config/rs6000/e6500.md: Adjust.
12695 * config/rs6000/mpc.md: Adjust.
12696 * config/rs6000/power4.md: Adjust.
12697 * config/rs6000/power5.md: Adjust.
12698 * config/rs6000/power6.md: Adjust.
12699 * config/rs6000/power7.md: Adjust.
12700 * config/rs6000/power8.md: Adjust.
12701 * config/rs6000/power9.md: Adjust.
12702 * config/rs6000/rs64.md: Adjust.
12703 * config/rs6000/titan.md: Adjust.
12705 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
12707 * config/i386/predicates.md (indirect_branch_operand): Rewrite
12708 ix86_indirect_branch_register logic.
12710 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
12712 * config/i386/constraints.md (Bs): Update
12713 ix86_indirect_branch_register check. Don't check
12714 ix86_indirect_branch_register with GOT_memory_operand.
12716 * config/i386/predicates.md (GOT_memory_operand): Don't check
12717 ix86_indirect_branch_register here.
12718 (GOT32_symbol_operand): Likewise.
12720 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
12722 * config/i386/predicates.md (constant_call_address_operand):
12723 Rewrite ix86_indirect_branch_register logic.
12724 (sibcall_insn_operand): Likewise.
12726 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
12728 * config/i386/constraints.md (Bs): Replace
12729 ix86_indirect_branch_thunk_register with
12730 ix86_indirect_branch_register.
12732 * config/i386/i386.md (indirect_jump): Likewise.
12733 (tablejump): Likewise.
12734 (*sibcall_memory): Likewise.
12735 (*sibcall_value_memory): Likewise.
12736 Peepholes of indirect call and jump via memory: Likewise.
12737 * config/i386/i386.opt: Likewise.
12738 * config/i386/predicates.md (indirect_branch_operand): Likewise.
12739 (GOT_memory_operand): Likewise.
12740 (call_insn_operand): Likewise.
12741 (sibcall_insn_operand): Likewise.
12742 (GOT32_symbol_operand): Likewise.
12744 2018-01-15 Jakub Jelinek <jakub@redhat.com>
12746 PR middle-end/83837
12747 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
12748 type rather than type addr's type points to.
12749 (expand_omp_atomic_mutex): Likewise.
12750 (expand_omp_atomic): Likewise.
12752 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
12755 * config/i386/i386.c (output_indirect_thunk_function): Use
12756 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
12757 for __x86_return_thunk.
12759 2018-01-15 Richard Biener <rguenther@suse.de>
12761 PR middle-end/83850
12762 * expmed.c (extract_bit_field_1): Fix typo.
12764 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12767 * config/arm/iterators.md (VF): New mode iterator.
12768 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
12769 Remove integer-related logic from pattern.
12770 (neon_vabd<mode>_3): Likewise.
12772 2018-01-15 Jakub Jelinek <jakub@redhat.com>
12774 PR middle-end/82694
12775 * common.opt (fstrict-overflow): No longer an alias.
12776 (fwrapv-pointer): New option.
12777 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
12778 also for pointer types based on flag_wrapv_pointer.
12779 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
12780 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
12781 opts->x_flag_wrapv got set.
12782 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
12783 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
12784 POINTER_TYPE_OVERFLOW_UNDEFINED.
12785 * match.pd: Likewise in address comparison pattern.
12786 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
12788 2018-01-15 Richard Biener <rguenther@suse.de>
12791 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
12792 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
12793 Reset type names to their identifier if their TYPE_DECL doesn't
12794 have linkage (and thus is used for ODR and devirt).
12795 (save_debug_info_for_decl): Remove.
12796 (save_debug_info_for_type): Likewise.
12797 (add_tree_to_fld_list): Adjust.
12798 * tree-pretty-print.c (dump_generic_node): Make dumping of
12799 type names more robust.
12801 2018-01-15 Richard Biener <rguenther@suse.de>
12803 * BASE-VER: Bump to 8.0.1.
12805 2018-01-14 Martin Sebor <msebor@redhat.com>
12808 * builtins.c (check_access): Avoid warning when the no-warning bit
12811 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
12813 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
12814 * ira-color (allocno_hard_regs_compare): Likewise.
12816 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
12819 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
12820 Use .pushsection/.popsection.
12822 2018-01-14 Martin Sebor <msebor@redhat.com>
12825 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
12827 2018-01-14 Jakub Jelinek <jakub@redhat.com>
12829 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
12830 entry from extra_headers.
12831 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
12832 extra_headers, make the list bitwise identical to the i?86-*-* one.
12834 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
12836 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
12837 -mcmodel=large with -mindirect-branch=thunk,
12838 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
12839 -mfunction-return=thunk-extern.
12840 * doc/invoke.texi: Document -mcmodel=large is incompatible with
12841 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
12842 -mfunction-return=thunk and -mfunction-return=thunk-extern.
12844 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
12846 * config/i386/i386.c (print_reg): Print the name of the full
12847 integer register without '%'.
12848 (ix86_print_operand): Handle 'V'.
12849 * doc/extend.texi: Document 'V' modifier.
12851 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
12853 * config/i386/constraints.md (Bs): Disallow memory operand for
12854 -mindirect-branch-register.
12856 * config/i386/predicates.md (indirect_branch_operand): Likewise.
12857 (GOT_memory_operand): Likewise.
12858 (call_insn_operand): Likewise.
12859 (sibcall_insn_operand): Likewise.
12860 (GOT32_symbol_operand): Likewise.
12861 * config/i386/i386.md (indirect_jump): Call convert_memory_address
12862 for -mindirect-branch-register.
12863 (tablejump): Likewise.
12864 (*sibcall_memory): Likewise.
12865 (*sibcall_value_memory): Likewise.
12866 Disallow peepholes of indirect call and jump via memory for
12867 -mindirect-branch-register.
12868 (*call_pop): Replace m with Bw.
12869 (*call_value_pop): Likewise.
12870 (*sibcall_pop_memory): Replace m with Bs.
12871 * config/i386/i386.opt (mindirect-branch-register): New option.
12872 * doc/invoke.texi: Document -mindirect-branch-register option.
12874 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
12876 * config/i386/i386-protos.h (ix86_output_function_return): New.
12877 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
12878 set function_return_type.
12879 (indirect_thunk_name): Add ret_p to indicate thunk for function
12881 (output_indirect_thunk_function): Pass false to
12882 indirect_thunk_name.
12883 (ix86_output_indirect_branch_via_reg): Likewise.
12884 (ix86_output_indirect_branch_via_push): Likewise.
12885 (output_indirect_thunk_function): Create alias for function
12886 return thunk if regno < 0.
12887 (ix86_output_function_return): New function.
12888 (ix86_handle_fndecl_attribute): Handle function_return.
12889 (ix86_attribute_table): Add function_return.
12890 * config/i386/i386.h (machine_function): Add
12891 function_return_type.
12892 * config/i386/i386.md (simple_return_internal): Use
12893 ix86_output_function_return.
12894 (simple_return_internal_long): Likewise.
12895 * config/i386/i386.opt (mfunction-return=): New option.
12896 (indirect_branch): Mention -mfunction-return=.
12897 * doc/extend.texi: Document function_return function attribute.
12898 * doc/invoke.texi: Document -mfunction-return= option.
12900 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
12902 * config/i386/i386-opts.h (indirect_branch): New.
12903 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
12904 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
12905 with local indirect jump when converting indirect call and jump.
12906 (ix86_set_indirect_branch_type): New.
12907 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
12908 (indirectlabelno): New.
12909 (indirect_thunk_needed): Likewise.
12910 (indirect_thunk_bnd_needed): Likewise.
12911 (indirect_thunks_used): Likewise.
12912 (indirect_thunks_bnd_used): Likewise.
12913 (INDIRECT_LABEL): Likewise.
12914 (indirect_thunk_name): Likewise.
12915 (output_indirect_thunk): Likewise.
12916 (output_indirect_thunk_function): Likewise.
12917 (ix86_output_indirect_branch_via_reg): Likewise.
12918 (ix86_output_indirect_branch_via_push): Likewise.
12919 (ix86_output_indirect_branch): Likewise.
12920 (ix86_output_indirect_jmp): Likewise.
12921 (ix86_code_end): Call output_indirect_thunk_function if needed.
12922 (ix86_output_call_insn): Call ix86_output_indirect_branch if
12924 (ix86_handle_fndecl_attribute): Handle indirect_branch.
12925 (ix86_attribute_table): Add indirect_branch.
12926 * config/i386/i386.h (machine_function): Add indirect_branch_type
12927 and has_local_indirect_jump.
12928 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
12930 (tablejump): Likewise.
12931 (*indirect_jump): Use ix86_output_indirect_jmp.
12932 (*tablejump_1): Likewise.
12933 (simple_return_indirect_internal): Likewise.
12934 * config/i386/i386.opt (mindirect-branch=): New option.
12935 (indirect_branch): New.
12938 (thunk-inline): Likewise.
12939 (thunk-extern): Likewise.
12940 * doc/extend.texi: Document indirect_branch function attribute.
12941 * doc/invoke.texi: Document -mindirect-branch= option.
12943 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
12946 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
12948 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
12950 * ipa-inline.c (want_inline_small_function_p): Return false if
12951 inlining has already failed with CIF_FINAL_ERROR.
12952 (update_caller_keys): Call want_inline_small_function_p before
12954 (update_callee_keys): Likewise.
12956 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
12958 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
12960 (rs6000_quadword_masked_address_p): Likewise.
12961 (quad_aligned_load_p): Likewise.
12962 (quad_aligned_store_p): Likewise.
12963 (const_load_sequence_p): Add comment to describe the outer-most loop.
12964 (mimic_memory_attributes_and_flags): New function.
12965 (rs6000_gen_stvx): Likewise.
12966 (replace_swapped_aligned_store): Likewise.
12967 (rs6000_gen_lvx): Likewise.
12968 (replace_swapped_aligned_load): Likewise.
12969 (replace_swapped_load_constant): Capitalize argument name in
12970 comment describing this function.
12971 (rs6000_analyze_swaps): Add a third pass to search for vector loads
12972 and stores that access quad-word aligned addresses and replace
12973 with stvx or lvx instructions when appropriate.
12974 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
12975 New function prototype.
12976 (rs6000_quadword_masked_address_p): Likewise.
12977 (rs6000_gen_lvx): Likewise.
12978 (rs6000_gen_stvx): Likewise.
12979 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
12980 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
12981 when memory address is aligned.
12982 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
12983 this split to select lvx instruction when memory address is aligned.
12984 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
12985 instruction when memory address is aligned.
12986 (*vsx_le_perm_load_v16qi): Likewise.
12987 (four unnamed splitters): Modify to select the stvx instruction
12988 when memory is aligned.
12990 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
12992 * predict.c (determine_unlikely_bbs): Handle correctly BBs
12993 which appears in the queue multiple times.
12995 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12996 Alan Hayward <alan.hayward@arm.com>
12997 David Sherwood <david.sherwood@arm.com>
12999 * tree-vectorizer.h (vec_lower_bound): New structure.
13000 (_loop_vec_info): Add check_nonzero and lower_bounds.
13001 (LOOP_VINFO_CHECK_NONZERO): New macro.
13002 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
13003 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
13004 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
13005 fields. Make seg_len the distance travelled, not including the
13007 (dr_direction_indicator): Declare.
13008 (dr_zero_step_indicator): Likewise.
13009 (dr_known_forward_stride_p): Likewise.
13010 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
13012 (runtime_alias_check_p): Allow runtime alias checks with
13014 (operator ==): Compare access_size and align.
13015 (prune_runtime_alias_test_list): Rework for new distinction between
13016 the access_size and seg_len.
13017 (create_intersect_range_checks_index): Likewise. Cope with polynomial
13019 (get_segment_min_max): New function.
13020 (create_intersect_range_checks): Use it.
13021 (dr_step_indicator): New function.
13022 (dr_direction_indicator): Likewise.
13023 (dr_zero_step_indicator): Likewise.
13024 (dr_known_forward_stride_p): Likewise.
13025 * tree-loop-distribution.c (data_ref_segment_size): Return
13026 DR_STEP * (niters - 1).
13027 (compute_alias_check_pairs): Update call to the dr_with_seg_len
13029 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
13030 (vect_preserves_scalar_order_p): New function, split out from...
13031 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
13032 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
13033 (vect_vfa_access_size): New function.
13034 (vect_vfa_align): Likewise.
13035 (vect_compile_time_alias): Take access_size_a and access_b arguments.
13036 (dump_lower_bound): New function.
13037 (vect_check_lower_bound): Likewise.
13038 (vect_small_gap_p): Likewise.
13039 (vectorizable_with_step_bound_p): Likewise.
13040 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
13041 depencies if the vectorization factor is 1. Convert the checks
13042 for nonzero steps into checks on the bounds of DR_STEP. Try using
13043 a bunds check for variable steps if the minimum required step is
13044 relatively small. Update calls to the dr_with_seg_len
13045 constructor and to vect_compile_time_alias.
13046 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
13048 (vect_loop_versioning): Call it.
13049 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
13051 (vect_estimate_min_profitable_iters): Account for any bounds checks.
13053 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13054 Alan Hayward <alan.hayward@arm.com>
13055 David Sherwood <david.sherwood@arm.com>
13057 * doc/sourcebuild.texi (vect_scatter_store): Document.
13058 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
13060 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
13062 * genopinit.c (main): Add supports_vec_scatter_store and
13063 supports_vec_scatter_store_cached to target_optabs.
13064 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
13065 IFN_MASK_SCATTER_STORE.
13066 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
13068 * internal-fn.h (internal_store_fn_p): Declare.
13069 (internal_fn_stored_value_index): Likewise.
13070 * internal-fn.c (scatter_store_direct): New macro.
13071 (expand_scatter_store_optab_fn): New function.
13072 (direct_scatter_store_optab_supported_p): New macro.
13073 (internal_store_fn_p): New function.
13074 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
13075 IFN_MASK_SCATTER_STORE.
13076 (internal_fn_mask_index): Likewise.
13077 (internal_fn_stored_value_index): New function.
13078 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
13079 for scatter stores.
13080 * optabs-query.h (supports_vec_scatter_store_p): Declare.
13081 * optabs-query.c (supports_vec_scatter_store_p): New function.
13082 * tree-vectorizer.h (vect_get_store_rhs): Declare.
13083 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
13084 true for scatter stores.
13085 (vect_gather_scatter_fn_p): Handle scatter stores too.
13086 (vect_check_gather_scatter): Consider using scatter stores if
13087 supports_vec_scatter_store_p.
13088 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
13089 scatter stores too.
13090 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
13091 internal_fn_stored_value_index.
13092 (check_load_store_masking): Handle scatter stores too.
13093 (vect_get_store_rhs): Make public.
13094 (vectorizable_call): Use internal_store_fn_p.
13095 (vectorizable_store): Handle scatter store internal functions.
13096 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
13097 when deciding whether the end of the group has been reached.
13098 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
13099 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
13100 (mask_scatter_store<mode>): New insns.
13102 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13103 Alan Hayward <alan.hayward@arm.com>
13104 David Sherwood <david.sherwood@arm.com>
13106 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
13107 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
13108 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
13110 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
13111 Use vect_truncate_gather_scatter_offset if we can't treat the
13112 operation as a normal gather load or scatter store.
13113 (get_group_load_store_type): Take the gather_scatter_info
13114 as argument. Try using a gather load or scatter store for
13115 single-element groups.
13116 (get_load_store_type): Update calls to get_group_load_store_type
13117 and vect_use_strided_gather_scatters_p.
13119 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13120 Alan Hayward <alan.hayward@arm.com>
13121 David Sherwood <david.sherwood@arm.com>
13123 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
13124 optional tree argument.
13125 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
13127 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
13128 but continue to use the current value as a fallback.
13129 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
13130 to compare the updates.
13131 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
13132 (get_load_store_type): Use it when handling a strided access.
13133 (vect_get_strided_load_store_ops): New function.
13134 (vect_get_data_ptr_increment): Likewise.
13135 (vectorizable_load): Handle strided gather loads. Always pass
13136 a step to vect_create_data_ref_ptr and bump_vector_ptr.
13138 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13139 Alan Hayward <alan.hayward@arm.com>
13140 David Sherwood <david.sherwood@arm.com>
13142 * doc/md.texi (gather_load@var{m}): Document.
13143 (mask_gather_load@var{m}): Likewise.
13144 * genopinit.c (main): Add supports_vec_gather_load and
13145 supports_vec_gather_load_cached to target_optabs.
13146 * optabs-tree.c (init_tree_optimization_optabs): Use
13147 ggc_cleared_alloc to allocate target_optabs.
13148 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
13149 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
13151 * internal-fn.h (internal_load_fn_p): Declare.
13152 (internal_gather_scatter_fn_p): Likewise.
13153 (internal_fn_mask_index): Likewise.
13154 (internal_gather_scatter_fn_supported_p): Likewise.
13155 * internal-fn.c (gather_load_direct): New macro.
13156 (expand_gather_load_optab_fn): New function.
13157 (direct_gather_load_optab_supported_p): New macro.
13158 (direct_internal_fn_optab): New function.
13159 (internal_load_fn_p): Likewise.
13160 (internal_gather_scatter_fn_p): Likewise.
13161 (internal_fn_mask_index): Likewise.
13162 (internal_gather_scatter_fn_supported_p): Likewise.
13163 * optabs-query.c (supports_at_least_one_mode_p): New function.
13164 (supports_vec_gather_load_p): Likewise.
13165 * optabs-query.h (supports_vec_gather_load_p): Declare.
13166 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
13167 and memory_type field.
13168 (NUM_PATTERNS): Bump to 15.
13169 * tree-vect-data-refs.c: Include internal-fn.h.
13170 (vect_gather_scatter_fn_p): New function.
13171 (vect_describe_gather_scatter_call): Likewise.
13172 (vect_check_gather_scatter): Try using internal functions for
13173 gather loads. Recognize existing calls to a gather load function.
13174 (vect_analyze_data_refs): Consider using gather loads if
13175 supports_vec_gather_load_p.
13176 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
13177 (vect_get_gather_scatter_offset_type): Likewise.
13178 (vect_convert_mask_for_vectype): Likewise.
13179 (vect_add_conversion_to_patterm): Likewise.
13180 (vect_try_gather_scatter_pattern): Likewise.
13181 (vect_recog_gather_scatter_pattern): New pattern recognizer.
13182 (vect_vect_recog_func_ptrs): Add it.
13183 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
13184 internal_fn_mask_index and internal_gather_scatter_fn_p.
13185 (check_load_store_masking): Take the gather_scatter_info as an
13186 argument and handle gather loads.
13187 (vect_get_gather_scatter_ops): New function.
13188 (vectorizable_call): Check internal_load_fn_p.
13189 (vectorizable_load): Likewise. Handle gather load internal
13191 (vectorizable_store): Update call to check_load_store_masking.
13192 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
13193 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
13194 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
13195 (aarch64_gather_scale_operand_d): New predicates.
13196 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
13197 (mask_gather_load<mode>): New insns.
13199 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13200 Alan Hayward <alan.hayward@arm.com>
13201 David Sherwood <david.sherwood@arm.com>
13203 * optabs.def (fold_left_plus_optab): New optab.
13204 * doc/md.texi (fold_left_plus_@var{m}): Document.
13205 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
13206 * internal-fn.c (fold_left_direct): Define.
13207 (expand_fold_left_optab_fn): Likewise.
13208 (direct_fold_left_optab_supported_p): Likewise.
13209 * fold-const-call.c (fold_const_fold_left): New function.
13210 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
13211 * tree-parloops.c (valid_reduction_p): New function.
13212 (gather_scalar_reductions): Use it.
13213 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
13214 (vect_finish_replace_stmt): Declare.
13215 * tree-vect-loop.c (fold_left_reduction_fn): New function.
13216 (needs_fold_left_reduction_p): New function, split out from...
13217 (vect_is_simple_reduction): ...here. Accept reductions that
13218 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
13219 (vect_force_simple_reduction): Also store the reduction type in
13220 the assignment's STMT_VINFO_REDUC_TYPE.
13221 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
13222 (merge_with_identity): New function.
13223 (vect_expand_fold_left): Likewise.
13224 (vectorize_fold_left_reduction): Likewise.
13225 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
13226 scalar phi in place for it. Check for target support and reject
13227 cases that would reassociate the operation. Defer the transform
13228 phase to vectorize_fold_left_reduction.
13229 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
13230 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
13231 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
13233 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13235 * tree-if-conv.c (predicate_mem_writes): Remove redundant
13236 call to ifc_temp_var.
13238 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13239 Alan Hayward <alan.hayward@arm.com>
13240 David Sherwood <david.sherwood@arm.com>
13242 * target.def (legitimize_address_displacement): Take the original
13243 offset as a poly_int.
13244 * targhooks.h (default_legitimize_address_displacement): Update
13246 * targhooks.c (default_legitimize_address_displacement): Likewise.
13247 * doc/tm.texi: Regenerate.
13248 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
13249 as an argument, moving assert of ad->disp == ad->disp_term to...
13250 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
13251 Try calling targetm.legitimize_address_displacement before expanding
13252 the address rather than afterwards, and adjust for the new interface.
13253 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
13254 Match the new hook interface. Handle SVE addresses.
13255 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
13256 new hook interface.
13258 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13260 * Makefile.in (OBJS): Add early-remat.o.
13261 * target.def (select_early_remat_modes): New hook.
13262 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
13263 * doc/tm.texi: Regenerate.
13264 * targhooks.h (default_select_early_remat_modes): Declare.
13265 * targhooks.c (default_select_early_remat_modes): New function.
13266 * timevar.def (TV_EARLY_REMAT): New timevar.
13267 * passes.def (pass_early_remat): New pass.
13268 * tree-pass.h (make_pass_early_remat): Declare.
13269 * early-remat.c: New file.
13270 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
13272 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
13274 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13275 Alan Hayward <alan.hayward@arm.com>
13276 David Sherwood <david.sherwood@arm.com>
13278 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
13279 vfm1 with a bound_epilog parameter.
13280 (vect_do_peeling): Update calls accordingly, and move the prologue
13281 call earlier in the function. Treat the base bound_epilog as 0 for
13282 fully-masked loops and retain vf - 1 for other loops. Add 1 to
13283 this base when peeling for gaps.
13284 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
13285 with fully-masked loops.
13286 (vect_estimate_min_profitable_iters): Handle the single peeled
13287 iteration in that case.
13289 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13290 Alan Hayward <alan.hayward@arm.com>
13291 David Sherwood <david.sherwood@arm.com>
13293 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
13294 single-element interleaving even if the size is not a power of 2.
13295 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
13296 accesses for single-element interleaving if the group size is
13299 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13300 Alan Hayward <alan.hayward@arm.com>
13301 David Sherwood <david.sherwood@arm.com>
13303 * doc/md.texi (fold_extract_last_@var{m}): Document.
13304 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
13305 * optabs.def (fold_extract_last_optab): New optab.
13306 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
13307 * internal-fn.c (fold_extract_direct): New macro.
13308 (expand_fold_extract_optab_fn): Likewise.
13309 (direct_fold_extract_optab_supported_p): Likewise.
13310 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
13311 * tree-vect-loop.c (vect_model_reduction_cost): Handle
13312 EXTRACT_LAST_REDUCTION.
13313 (get_initial_def_for_reduction): Do not create an initial vector
13314 for EXTRACT_LAST_REDUCTION reductions.
13315 (vectorizable_reduction): Leave the scalar phi in place for
13316 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
13317 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
13318 epilogue code for EXTRACT_LAST_REDUCTION and defer the
13319 transform phase to vectorizable_condition.
13320 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
13322 (vect_finish_stmt_generation): ...here.
13323 (vect_finish_replace_stmt): New function.
13324 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
13325 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
13327 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
13329 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13330 Alan Hayward <alan.hayward@arm.com>
13331 David Sherwood <david.sherwood@arm.com>
13333 * doc/md.texi (extract_last_@var{m}): Document.
13334 * optabs.def (extract_last_optab): New optab.
13335 * internal-fn.def (EXTRACT_LAST): New internal function.
13336 * internal-fn.c (cond_unary_direct): New macro.
13337 (expand_cond_unary_optab_fn): Likewise.
13338 (direct_cond_unary_optab_supported_p): Likewise.
13339 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
13340 loops using EXTRACT_LAST.
13341 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
13342 (extract_last_<mode>): ...this optab.
13343 (vec_extract<mode><Vel>): Update accordingly.
13345 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13346 Alan Hayward <alan.hayward@arm.com>
13347 David Sherwood <david.sherwood@arm.com>
13349 * target.def (empty_mask_is_expensive): New hook.
13350 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
13351 * doc/tm.texi: Regenerate.
13352 * targhooks.h (default_empty_mask_is_expensive): Declare.
13353 * targhooks.c (default_empty_mask_is_expensive): New function.
13354 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
13355 if the target says that empty masks are expensive.
13356 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
13358 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
13360 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13361 Alan Hayward <alan.hayward@arm.com>
13362 David Sherwood <david.sherwood@arm.com>
13364 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
13365 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
13366 (vect_use_loop_mask_for_alignment_p): New function.
13367 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
13368 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
13369 niters_skip argument. Make sure that the first niters_skip elements
13370 of the first iteration are inactive.
13371 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
13372 Update call to vect_set_loop_masks_directly.
13373 (get_misalign_in_elems): New function, split out from...
13374 (vect_gen_prolog_loop_niters): ...here.
13375 (vect_update_init_of_dr): Take a code argument that specifies whether
13376 the adjustment should be added or subtracted.
13377 (vect_update_init_of_drs): Likewise.
13378 (vect_prepare_for_masked_peels): New function.
13379 (vect_do_peeling): Skip prologue peeling if we're using a mask
13380 instead. Update call to vect_update_inits_of_drs.
13381 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13383 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
13384 alignment. Do not include the number of peeled iterations in
13385 the minimum threshold in that case.
13386 (vectorizable_induction): Adjust the start value down by
13387 LOOP_VINFO_MASK_SKIP_NITERS iterations.
13388 (vect_transform_loop): Call vect_prepare_for_masked_peels.
13389 Take the number of skipped iterations into account when calculating
13391 * tree-vect-stmts.c (vect_gen_while_not): New function.
13393 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13394 Alan Hayward <alan.hayward@arm.com>
13395 David Sherwood <david.sherwood@arm.com>
13397 * doc/sourcebuild.texi (vect_fully_masked): Document.
13398 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
13399 default value to 0.
13400 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
13402 (vect_analyze_loop_2): ...here. Don't check the vectorization
13403 factor against the number of loop iterations if the loop is
13406 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13407 Alan Hayward <alan.hayward@arm.com>
13408 David Sherwood <david.sherwood@arm.com>
13410 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
13411 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
13412 (dump_groups): Update accordingly.
13413 (iv_use::mem_type): New member variable.
13414 (address_p): New function.
13415 (record_use): Add a mem_type argument and initialize the new
13417 (record_group_use): Add a mem_type argument. Use address_p.
13418 Remove obsolete null checks of base_object. Update call to record_use.
13419 (find_interesting_uses_op): Update call to record_group_use.
13420 (find_interesting_uses_cond): Likewise.
13421 (find_interesting_uses_address): Likewise.
13422 (get_mem_type_for_internal_fn): New function.
13423 (find_address_like_use): Likewise.
13424 (find_interesting_uses_stmt): Try find_address_like_use before
13425 calling find_interesting_uses_op.
13426 (addr_offset_valid_p): Use the iv mem_type field as the type
13427 of the addressed memory.
13428 (add_autoinc_candidates): Likewise.
13429 (get_address_cost): Likewise.
13430 (split_small_address_groups_p): Use address_p.
13431 (split_address_groups): Likewise.
13432 (add_iv_candidate_for_use): Likewise.
13433 (autoinc_possible_for_pair): Likewise.
13434 (rewrite_groups): Likewise.
13435 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
13436 (determine_group_iv_cost): Update after split of USE_ADDRESS.
13437 (get_alias_ptr_type_for_ptr_address): New function.
13438 (rewrite_use_address): Rewrite address uses in calls that were
13439 identified by find_address_like_use.
13441 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13442 Alan Hayward <alan.hayward@arm.com>
13443 David Sherwood <david.sherwood@arm.com>
13445 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
13447 * gimple-expr.h (is_gimple_addressable: Likewise.
13448 * gimple-expr.c (is_gimple_address): Likewise.
13449 * internal-fn.c (expand_call_mem_ref): New function.
13450 (expand_mask_load_optab_fn): Use it.
13451 (expand_mask_store_optab_fn): Likewise.
13453 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13454 Alan Hayward <alan.hayward@arm.com>
13455 David Sherwood <david.sherwood@arm.com>
13457 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
13458 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
13459 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
13460 (cond_umax@var{mode}): Document.
13461 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
13462 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
13463 (cond_umin_optab, cond_umax_optab): New optabs.
13464 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
13465 (COND_IOR, COND_XOR): New internal functions.
13466 * internal-fn.h (get_conditional_internal_fn): Declare.
13467 * internal-fn.c (cond_binary_direct): New macro.
13468 (expand_cond_binary_optab_fn): Likewise.
13469 (direct_cond_binary_optab_supported_p): Likewise.
13470 (get_conditional_internal_fn): New function.
13471 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
13472 Cope with reduction statements that are vectorized as calls rather
13474 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
13475 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
13476 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
13477 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
13478 (UNSPEC_COND_EOR): New unspecs.
13479 (optab): Add mappings for them.
13480 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
13481 (sve_int_op, sve_fp_op): New int attributes.
13483 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13484 Alan Hayward <alan.hayward@arm.com>
13485 David Sherwood <david.sherwood@arm.com>
13487 * optabs.def (while_ult_optab): New optab.
13488 * doc/md.texi (while_ult@var{m}@var{n}): Document.
13489 * internal-fn.def (WHILE_ULT): New internal function.
13490 * internal-fn.h (direct_internal_fn_supported_p): New override
13491 that takes two types as argument.
13492 * internal-fn.c (while_direct): New macro.
13493 (expand_while_optab_fn): New function.
13494 (convert_optab_supported_p): Likewise.
13495 (direct_while_optab_supported_p): New macro.
13496 * wide-int.h (wi::udiv_ceil): New function.
13497 * tree-vectorizer.h (rgroup_masks): New structure.
13498 (vec_loop_masks): New typedef.
13499 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
13500 and fully_masked_p.
13501 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
13502 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
13503 (vect_max_vf): New function.
13504 (slpeel_make_loop_iterate_ntimes): Delete.
13505 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
13506 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
13507 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
13508 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
13509 internal-fn.h, stor-layout.h and optabs-query.h.
13510 (vect_set_loop_mask): New function.
13511 (add_preheader_seq): Likewise.
13512 (add_header_seq): Likewise.
13513 (interleave_supported_p): Likewise.
13514 (vect_maybe_permute_loop_masks): Likewise.
13515 (vect_set_loop_masks_directly): Likewise.
13516 (vect_set_loop_condition_masked): Likewise.
13517 (vect_set_loop_condition_unmasked): New function, split out from
13518 slpeel_make_loop_iterate_ntimes.
13519 (slpeel_make_loop_iterate_ntimes): Rename to..
13520 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
13521 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
13522 (vect_do_peeling): Update call accordingly.
13523 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
13525 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13526 mask_compare_type, can_fully_mask_p and fully_masked_p.
13527 (release_vec_loop_masks): New function.
13528 (_loop_vec_info): Use it to free the loop masks.
13529 (can_produce_all_loop_masks_p): New function.
13530 (vect_get_max_nscalars_per_iter): Likewise.
13531 (vect_verify_full_masking): Likewise.
13532 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
13533 retries, and free the mask rgroups before retrying. Check loop-wide
13534 reasons for disallowing fully-masked loops. Make the final decision
13535 about whether use a fully-masked loop or not.
13536 (vect_estimate_min_profitable_iters): Do not assume that peeling
13537 for the number of iterations will be needed for fully-masked loops.
13538 (vectorizable_reduction): Disable fully-masked loops.
13539 (vectorizable_live_operation): Likewise.
13540 (vect_halve_mask_nunits): New function.
13541 (vect_double_mask_nunits): Likewise.
13542 (vect_record_loop_mask): Likewise.
13543 (vect_get_loop_mask): Likewise.
13544 (vect_transform_loop): Handle the case in which the final loop
13545 iteration might handle a partial vector. Call vect_set_loop_condition
13546 instead of slpeel_make_loop_iterate_ntimes.
13547 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
13548 (check_load_store_masking): New function.
13549 (prepare_load_store_mask): Likewise.
13550 (vectorizable_store): Handle fully-masked loops.
13551 (vectorizable_load): Likewise.
13552 (supportable_widening_operation): Use vect_halve_mask_nunits for
13554 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
13555 (vect_gen_while): New function.
13556 * config/aarch64/aarch64.md (umax<mode>3): New expander.
13557 (aarch64_uqdec<mode>): New insn.
13559 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13560 Alan Hayward <alan.hayward@arm.com>
13561 David Sherwood <david.sherwood@arm.com>
13563 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
13564 (reduc_xor_scal_optab): New optabs.
13565 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
13566 (reduc_xor_scal_@var{m}): Document.
13567 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
13568 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
13569 internal functions.
13570 * fold-const-call.c (fold_const_call): Handle them.
13571 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
13572 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
13573 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
13574 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
13575 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
13576 (UNSPEC_XORV): New unspecs.
13577 (optab): Add entries for them.
13578 (BITWISEV): New int iterator.
13579 (bit_reduc_op): New int attributes.
13581 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13582 Alan Hayward <alan.hayward@arm.com>
13583 David Sherwood <david.sherwood@arm.com>
13585 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
13586 * internal-fn.def (VEC_SHL_INSERT): New internal function.
13587 * optabs.def (vec_shl_insert_optab): New optab.
13588 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
13589 (duplicate_and_interleave): Likewise.
13590 * tree-vect-loop.c: Include internal-fn.h.
13591 (neutral_op_for_slp_reduction): New function, split out from
13592 get_initial_defs_for_reduction.
13593 (get_initial_def_for_reduction): Handle option 2 for variable-length
13594 vectors by loading the neutral value into a vector and then shifting
13595 the initial value into element 0.
13596 (get_initial_defs_for_reduction): Replace the code argument with
13597 the neutral value calculated by neutral_op_for_slp_reduction.
13598 Use gimple_build_vector for constant-length vectors.
13599 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
13600 but the first group_size elements have a neutral value.
13601 Use duplicate_and_interleave otherwise.
13602 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
13603 Update call to get_initial_defs_for_reduction. Handle SLP
13604 reductions for variable-length vectors by creating one vector
13605 result for each scalar result, with the elements associated
13606 with other scalar results stubbed out with the neutral value.
13607 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
13608 Require IFN_VEC_SHL_INSERT for double reductions on
13609 variable-length vectors, or SLP reductions that have
13610 a neutral value. Require can_duplicate_and_interleave_p
13611 support for variable-length unchained SLP reductions if there
13612 is no neutral value, such as for MIN/MAX reductions. Also require
13613 the number of vector elements to be a multiple of the number of
13614 SLP statements when doing variable-length unchained SLP reductions.
13615 Update call to vect_create_epilog_for_reduction.
13616 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
13617 and remove initial values.
13618 (duplicate_and_interleave): Make public.
13619 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
13620 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
13622 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13623 Alan Hayward <alan.hayward@arm.com>
13624 David Sherwood <david.sherwood@arm.com>
13626 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
13627 (can_duplicate_and_interleave_p): New function.
13628 (vect_get_and_check_slp_defs): Take the vector of statements
13629 rather than just the current one. Remove excess parentheses.
13630 Restriction rejectinon of vect_constant_def and vect_external_def
13631 for variable-length vectors to boolean types, or types for which
13632 can_duplicate_and_interleave_p is false.
13633 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
13634 (duplicate_and_interleave): New function.
13635 (vect_get_constant_vectors): Use gimple_build_vector for
13636 constant-length vectors and suitable variable-length constant
13637 vectors. Use duplicate_and_interleave for other variable-length
13638 vectors. Don't defer the update when inserting new statements.
13640 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13641 Alan Hayward <alan.hayward@arm.com>
13642 David Sherwood <david.sherwood@arm.com>
13644 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
13645 min_profitable_iters doesn't go negative.
13647 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13648 Alan Hayward <alan.hayward@arm.com>
13649 David Sherwood <david.sherwood@arm.com>
13651 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
13652 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
13653 * optabs.def (vec_mask_load_lanes_optab): New optab.
13654 (vec_mask_store_lanes_optab): Likewise.
13655 * internal-fn.def (MASK_LOAD_LANES): New internal function.
13656 (MASK_STORE_LANES): Likewise.
13657 * internal-fn.c (mask_load_lanes_direct): New macro.
13658 (mask_store_lanes_direct): Likewise.
13659 (expand_mask_load_optab_fn): Handle masked operations.
13660 (expand_mask_load_lanes_optab_fn): New macro.
13661 (expand_mask_store_optab_fn): Handle masked operations.
13662 (expand_mask_store_lanes_optab_fn): New macro.
13663 (direct_mask_load_lanes_optab_supported_p): Likewise.
13664 (direct_mask_store_lanes_optab_supported_p): Likewise.
13665 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
13667 (vect_load_lanes_supported): Likewise.
13668 * tree-vect-data-refs.c (strip_conversion): New function.
13669 (can_group_stmts_p): Likewise.
13670 (vect_analyze_data_ref_accesses): Use it instead of checking
13671 for a pair of assignments.
13672 (vect_store_lanes_supported): Take a masked_p parameter.
13673 (vect_load_lanes_supported): Likewise.
13674 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
13675 vect_store_lanes_supported and vect_load_lanes_supported.
13676 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13677 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
13678 parameter. Don't allow gaps for masked accesses.
13679 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
13680 and vect_load_lanes_supported.
13681 (get_load_store_type): Take a masked_p parameter and update
13682 call to get_group_load_store_type.
13683 (vectorizable_store): Update call to get_load_store_type.
13684 Handle IFN_MASK_STORE_LANES.
13685 (vectorizable_load): Update call to get_load_store_type.
13686 Handle IFN_MASK_LOAD_LANES.
13688 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13689 Alan Hayward <alan.hayward@arm.com>
13690 David Sherwood <david.sherwood@arm.com>
13692 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
13694 * config/aarch64/aarch64-protos.h
13695 (aarch64_sve_struct_memory_operand_p): Declare.
13696 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
13697 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
13698 (VPRED, vpred): Handle SVE structure modes.
13699 * config/aarch64/constraints.md (Utx): New constraint.
13700 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
13701 (aarch64_sve_struct_nonimmediate_operand): New predicates.
13702 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
13703 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
13704 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
13705 structure modes. Split into pieces after RA.
13706 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
13707 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
13709 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
13710 SVE structure modes.
13711 (aarch64_classify_address): Likewise.
13712 (sizetochar): Move earlier in file.
13713 (aarch64_print_operand): Handle SVE register lists.
13714 (aarch64_array_mode): New function.
13715 (aarch64_sve_struct_memory_operand_p): Likewise.
13716 (TARGET_ARRAY_MODE): Redefine.
13718 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13719 Alan Hayward <alan.hayward@arm.com>
13720 David Sherwood <david.sherwood@arm.com>
13722 * target.def (array_mode): New target hook.
13723 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
13724 * doc/tm.texi: Regenerate.
13725 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
13726 * hooks.c (hook_optmode_mode_uhwi_none): New function.
13727 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
13728 targetm.array_mode.
13729 * stor-layout.c (mode_for_array): Likewise. Support polynomial
13732 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13733 Alan Hayward <alan.hayward@arm.com>
13734 David Sherwood <david.sherwood@arm.com>
13736 * fold-const.c (fold_binary_loc): Check the argument types
13737 rather than the result type when testing for a vector operation.
13739 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13741 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
13742 * doc/tm.texi: Regenerate.
13744 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13745 Alan Hayward <alan.hayward@arm.com>
13746 David Sherwood <david.sherwood@arm.com>
13748 * doc/invoke.texi (-msve-vector-bits=): Document new option.
13749 (sve): Document new AArch64 extension.
13750 * doc/md.texi (w): Extend the description of the AArch64
13751 constraint to include SVE vectors.
13752 (Upl, Upa): Document new AArch64 predicate constraints.
13753 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
13755 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
13756 (msve-vector-bits=): New option.
13757 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
13758 SVE when these are disabled.
13759 (sve): New extension.
13760 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
13761 modes. Adjust their number of units based on aarch64_sve_vg.
13762 (MAX_BITSIZE_MODE_ANY_MODE): Define.
13763 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
13764 aarch64_addr_query_type.
13765 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
13766 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
13767 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
13768 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
13769 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
13770 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
13771 (aarch64_simd_imm_zero_p): Delete.
13772 (aarch64_check_zero_based_sve_index_immediate): Declare.
13773 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
13774 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
13775 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
13776 (aarch64_sve_float_mul_immediate_p): Likewise.
13777 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
13778 rather than an rtx.
13779 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
13780 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
13781 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
13782 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
13783 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
13784 (aarch64_regmode_natural_size): Likewise.
13785 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
13786 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
13788 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
13789 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
13790 for VG and the SVE predicate registers.
13791 (V_ALIASES): Add a "z"-prefixed alias.
13792 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
13793 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
13794 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
13795 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
13796 (REG_CLASS_NAMES): Add entries for them.
13797 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
13798 and the predicate registers.
13799 (aarch64_sve_vg): Declare.
13800 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
13801 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
13802 (REGMODE_NATURAL_SIZE): Define.
13803 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
13805 * config/aarch64/aarch64.c: Include cfgrtl.h.
13806 (simd_immediate_info): Add a constructor for series vectors,
13807 and an associated step field.
13808 (aarch64_sve_vg): New variable.
13809 (aarch64_dbx_register_number): Handle VG and the predicate registers.
13810 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
13811 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
13812 (VEC_ANY_DATA, VEC_STRUCT): New constants.
13813 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
13814 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
13815 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
13816 (aarch64_get_mask_mode): New functions.
13817 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
13818 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
13819 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
13820 predicate modes and predicate registers. Explicitly restrict
13821 GPRs to modes of 16 bytes or smaller. Only allow FP registers
13822 to store a vector mode if it is recognized by
13823 aarch64_classify_vector_mode.
13824 (aarch64_regmode_natural_size): New function.
13825 (aarch64_hard_regno_caller_save_mode): Return the original mode
13827 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
13828 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
13829 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
13830 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
13832 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
13833 does not overlap dest if the function is frame-related. Handle
13835 (aarch64_split_add_offset): New function.
13836 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
13837 them aarch64_add_offset.
13838 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
13839 and update call to aarch64_sub_sp.
13840 (aarch64_add_cfa_expression): New function.
13841 (aarch64_expand_prologue): Pass extra temporary registers to the
13842 functions above. Handle the case in which we need to emit new
13843 DW_CFA_expressions for registers that were originally saved
13844 relative to the stack pointer, but now have to be expressed
13845 relative to the frame pointer.
13846 (aarch64_output_mi_thunk): Pass extra temporary registers to the
13848 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
13849 IP0 and IP1 values for SVE frames.
13850 (aarch64_expand_vec_series): New function.
13851 (aarch64_expand_sve_widened_duplicate): Likewise.
13852 (aarch64_expand_sve_const_vector): Likewise.
13853 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
13854 Handle SVE constants. Use emit_move_insn to move a force_const_mem
13855 into the register, rather than emitting a SET directly.
13856 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
13857 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
13858 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
13859 (offset_9bit_signed_scaled_p): New functions.
13860 (aarch64_replicate_bitmask_imm): New function.
13861 (aarch64_bitmask_imm): Use it.
13862 (aarch64_cannot_force_const_mem): Reject expressions involving
13863 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
13864 (aarch64_classify_index): Handle SVE indices, by requiring
13865 a plain register index with a scale that matches the element size.
13866 (aarch64_classify_address): Handle SVE addresses. Assert that
13867 the mode of the address is VOIDmode or an integer mode.
13868 Update call to aarch64_classify_symbol.
13869 (aarch64_classify_symbolic_expression): Update call to
13870 aarch64_classify_symbol.
13871 (aarch64_const_vec_all_in_range_p): New function.
13872 (aarch64_print_vector_float_operand): Likewise.
13873 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
13874 "vN" for FP registers with SVE modes. Handle (const ...) vectors
13875 and the FP immediates 1.0 and 0.5.
13876 (aarch64_print_address_internal): Handle SVE addresses.
13877 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
13878 (aarch64_regno_regclass): Handle predicate registers.
13879 (aarch64_secondary_reload): Handle big-endian reloads of SVE
13881 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
13882 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
13883 (aarch64_convert_sve_vector_bits): New function.
13884 (aarch64_override_options): Use it to handle -msve-vector-bits=.
13885 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
13886 rather than an rtx.
13887 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
13888 Handle SVE vector and predicate modes. Accept VL-based constants
13889 that need only one temporary register, and VL offsets that require
13890 no temporary registers.
13891 (aarch64_conditional_register_usage): Mark the predicate registers
13892 as fixed if SVE isn't available.
13893 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
13894 Return true for SVE vector and predicate modes.
13895 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
13896 rather than an unsigned int. Handle SVE modes.
13897 (aarch64_preferred_simd_mode): Update call accordingly. Handle
13899 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
13901 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
13902 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
13903 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
13904 (aarch64_sve_float_mul_immediate_p): New functions.
13905 (aarch64_sve_valid_immediate): New function.
13906 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
13907 Explicitly reject structure modes. Check for INDEX constants.
13908 Handle PTRUE and PFALSE constants.
13909 (aarch64_check_zero_based_sve_index_immediate): New function.
13910 (aarch64_simd_imm_zero_p): Delete.
13911 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
13912 vector modes. Accept constants in the range of CNT[BHWD].
13913 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
13914 ask for an Advanced SIMD mode.
13915 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
13916 (aarch64_simd_vector_alignment): Handle SVE predicates.
13917 (aarch64_vectorize_preferred_vector_alignment): New function.
13918 (aarch64_simd_vector_alignment_reachable): Use it instead of
13920 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
13921 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
13923 (MAX_VECT_LEN): Delete.
13924 (expand_vec_perm_d): Add a vec_flags field.
13925 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
13926 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
13927 (aarch64_evpc_ext): Don't apply a big-endian lane correction
13929 (aarch64_evpc_rev): Rename to...
13930 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
13931 (aarch64_evpc_rev_global): New function.
13932 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
13933 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
13935 (aarch64_evpc_sve_tbl): New function.
13936 (aarch64_expand_vec_perm_const_1): Update after rename of
13937 aarch64_evpc_rev. Handle SVE permutes too, trying
13938 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
13939 than aarch64_evpc_tbl.
13940 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
13941 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
13942 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
13943 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
13944 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
13945 (aarch64_expand_sve_vcond): New functions.
13946 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
13947 of aarch64_vector_mode_p.
13948 (aarch64_dwarf_poly_indeterminate_value): New function.
13949 (aarch64_compute_pressure_classes): Likewise.
13950 (aarch64_can_change_mode_class): Likewise.
13951 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
13952 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
13953 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
13954 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
13955 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
13956 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
13957 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
13958 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
13960 (Dn, Dl, Dr): Accept const as well as const_vector.
13961 (Dz): Likewise. Compare against CONST0_RTX.
13962 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
13963 of "vector" where appropriate.
13964 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
13965 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
13966 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
13967 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
13968 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
13969 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
13970 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
13971 (v_int_equiv): Extend to SVE modes.
13972 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
13974 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
13975 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
13976 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
13977 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
13978 (SVE_COND_FP_CMP): New int iterators.
13979 (perm_hilo): Handle the new unpack unspecs.
13980 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
13982 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
13983 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
13984 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
13985 (aarch64_equality_operator, aarch64_constant_vector_operand)
13986 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
13987 (aarch64_sve_nonimmediate_operand): Likewise.
13988 (aarch64_sve_general_operand): Likewise.
13989 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
13990 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
13991 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
13992 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
13993 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
13994 (aarch64_sve_float_arith_immediate): Likewise.
13995 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
13996 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
13997 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
13998 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
13999 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
14000 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
14001 (aarch64_sve_float_arith_operand): Likewise.
14002 (aarch64_sve_float_arith_with_sub_operand): Likewise.
14003 (aarch64_sve_float_mul_operand): Likewise.
14004 (aarch64_sve_vec_perm_operand): Likewise.
14005 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
14006 (aarch64_mov_operand): Accept const_poly_int and const_vector.
14007 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
14008 as well as const_vector.
14009 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
14010 in file. Use CONST0_RTX and CONSTM1_RTX.
14011 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
14012 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
14013 Use aarch64_simd_imm_zero.
14014 * config/aarch64/aarch64-sve.md: New file.
14015 * config/aarch64/aarch64.md: Include it.
14016 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
14017 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
14018 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
14019 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
14020 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
14021 (sve): New attribute.
14022 (enabled): Disable instructions with the sve attribute unless
14024 (movqi, movhi): Pass CONST_POLY_INT operaneds through
14025 aarch64_expand_mov_immediate.
14026 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
14027 CNT[BHSD] immediates.
14028 (movti): Split CONST_POLY_INT moves into two halves.
14029 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
14030 Split additions that need a temporary here if the destination
14031 is the stack pointer.
14032 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
14033 (*add<mode>3_poly_1): New instruction.
14034 (set_clobber_cc): New expander.
14036 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14038 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
14039 parameter and use it instead of GET_MODE_SIZE (innermode). Use
14040 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
14041 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
14042 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
14043 Change innermode from fixed_mode_size to machine_mode.
14044 (simplify_subreg): Update call accordingly. Handle a constant-sized
14045 subreg of a variable-length CONST_VECTOR.
14047 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14048 Alan Hayward <alan.hayward@arm.com>
14049 David Sherwood <david.sherwood@arm.com>
14051 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
14052 (add_offset_to_base): New function, split out from...
14053 (create_mem_ref): ...here. When handling a scale other than 1,
14054 check first whether the address is valid without the offset.
14055 Add it into the base if so, leaving the index and scale as-is.
14057 2018-01-12 Jakub Jelinek <jakub@redhat.com>
14060 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
14061 fold_for_warn before checking if arg2 is INTEGER_CST.
14063 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
14065 * config/rs6000/predicates.md (load_multiple_operation): Delete.
14066 (store_multiple_operation): Delete.
14067 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
14068 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
14069 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
14070 guarded by TARGET_STRING.
14071 (rs6000_output_load_multiple): Delete.
14072 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
14073 OPTION_MASK_STRING / TARGET_STRING handling.
14074 (print_operand) <'N', 'O'>: Add comment that these are unused now.
14075 (const rs6000_opt_masks) <"string">: Change mask to 0.
14076 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
14077 (MASK_STRING): Delete.
14078 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
14080 (load_multiple): Delete.
14087 (store_multiple): Delete.
14094 (movmemsi_8reg): Delete.
14095 (corresponding unnamed define_insn): Delete.
14096 (movmemsi_6reg): Delete.
14097 (corresponding unnamed define_insn): Delete.
14098 (movmemsi_4reg): Delete.
14099 (corresponding unnamed define_insn): Delete.
14100 (movmemsi_2reg): Delete.
14101 (corresponding unnamed define_insn): Delete.
14102 (movmemsi_1reg): Delete.
14103 (corresponding unnamed define_insn): Delete.
14104 * config/rs6000/rs6000.opt (mno-string): New.
14105 (mstring): Replace by deprecation warning stub.
14106 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
14108 2018-01-12 Jakub Jelinek <jakub@redhat.com>
14110 * regrename.c (regrename_do_replace): If replacing the same
14111 reg multiple times, try to reuse last created gen_raw_REG.
14114 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
14115 main to workaround a bug in GDB.
14117 2018-01-12 Tom de Vries <tom@codesourcery.com>
14120 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
14122 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
14124 PR rtl-optimization/80481
14125 * ira-color.c (get_cap_member): New function.
14126 (allocnos_conflict_by_live_ranges_p): Use it.
14127 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
14128 (setup_slot_coalesced_allocno_live_ranges): Ditto.
14130 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
14133 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
14134 (*saddl_se_1): Ditto.
14135 (*ssubsi_1): Ditto.
14136 (*ssubl_se_1): Ditto.
14138 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
14140 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
14141 rather than wi::to_widest for DR_INITs.
14142 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
14143 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
14144 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
14146 (vect_analyze_group_access_1): Note that here.
14148 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
14150 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
14151 polynomial type sizes.
14153 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
14155 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
14156 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
14157 (gimple_add_tmp_var): Likewise.
14159 2018-01-12 Martin Liska <mliska@suse.cz>
14161 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
14162 (gimple_alloc_sizes): Likewise.
14163 (dump_gimple_statistics): Use PRIu64 in printf format.
14164 * gimple.h: Change uint64_t to int.
14166 2018-01-12 Martin Liska <mliska@suse.cz>
14168 * tree-core.h: Use uint64_t instead of int.
14169 * tree.c (tree_node_counts): Likewise.
14170 (tree_node_sizes): Likewise.
14171 (dump_tree_statistics): Use PRIu64 in printf format.
14173 2018-01-12 Martin Liska <mliska@suse.cz>
14175 * Makefile.in: As qsort_chk is implemented in vec.c, add
14176 vec.o to linkage of gencfn-macros.
14177 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
14178 passing the info to record_node_allocation_statistics.
14179 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
14181 * ggc-common.c (struct ggc_usage): Add operator== and use
14182 it in operator< and compare function.
14183 * mem-stats.h (struct mem_usage): Likewise.
14184 * vec.c (struct vec_usage): Remove operator< and compare
14185 function. Can be simply inherited.
14187 2018-01-12 Martin Jambor <mjambor@suse.cz>
14190 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
14191 * tree-ssa-math-opts.c: Include domwalk.h.
14192 (convert_mult_to_fma_1): New function.
14193 (fma_transformation_info): New type.
14194 (fma_deferring_state): Likewise.
14195 (cancel_fma_deferring): New function.
14196 (result_of_phi): Likewise.
14197 (last_fma_candidate_feeds_initial_phi): Likewise.
14198 (convert_mult_to_fma): Added deferring logic, split actual
14199 transformation to convert_mult_to_fma_1.
14200 (math_opts_dom_walker): New type.
14201 (math_opts_dom_walker::after_dom_children): New method, body moved
14202 here from pass_optimize_widening_mul::execute, added deferring logic
14204 (pass_optimize_widening_mul::execute): Moved most of code to
14205 math_opts_dom_walker::after_dom_children.
14206 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
14207 * config/i386/i386.c (ix86_option_override_internal): Added
14208 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
14210 2018-01-12 Richard Biener <rguenther@suse.de>
14213 * dwarf2out.c (gen_variable_die): Do not reset old_die for
14214 inline instance vars.
14216 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
14219 * config/rx/rx.c (rx_is_restricted_memory_address):
14220 Handle SUBREG case.
14222 2018-01-12 Richard Biener <rguenther@suse.de>
14224 PR tree-optimization/80846
14225 * target.def (split_reduction): New target hook.
14226 * targhooks.c (default_split_reduction): New function.
14227 * targhooks.h (default_split_reduction): Declare.
14228 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
14229 target requests first reduce vectors by combining low and high
14231 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
14232 (get_vectype_for_scalar_type_and_size): Export.
14233 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
14234 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
14235 * doc/tm.texi: Regenerate.
14236 * config/i386/i386.c (ix86_split_reduction): Implement
14237 TARGET_VECTORIZE_SPLIT_REDUCTION.
14239 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
14242 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
14243 in PIC mode except for TARGET_VXWORKS_RTP.
14244 * config/sparc/sparc.c: Include cfgrtl.h.
14245 (TARGET_INIT_PIC_REG): Define.
14246 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
14247 (sparc_pic_register_p): New predicate.
14248 (sparc_legitimate_address_p): Use it.
14249 (sparc_legitimize_pic_address): Likewise.
14250 (sparc_delegitimize_address): Likewise.
14251 (sparc_mode_dependent_address_p): Likewise.
14252 (gen_load_pcrel_sym): Remove 4th parameter.
14253 (load_got_register): Adjust call to above. Remove obsolete stuff.
14254 (sparc_expand_prologue): Do not call load_got_register here.
14255 (sparc_flat_expand_prologue): Likewise.
14256 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
14257 (sparc_use_pseudo_pic_reg): New function.
14258 (sparc_init_pic_reg): Likewise.
14259 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14260 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
14262 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
14264 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
14265 Add item for branch_cost.
14267 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
14269 PR rtl-optimization/83565
14270 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
14271 not extend the result to a larger mode for rotate operations.
14272 (num_sign_bit_copies1): Likewise.
14274 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14277 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
14279 Use values-Xc.o for -pedantic.
14280 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
14282 2018-01-12 Martin Liska <mliska@suse.cz>
14285 * ipa-devirt.c (final_warning_record::grow_type_warnings):
14287 (possible_polymorphic_call_targets): Use it.
14288 (ipa_devirt): Likewise.
14290 2018-01-12 Martin Liska <mliska@suse.cz>
14292 * profile-count.h (enum profile_quality): Use 0 as invalid
14293 enum value of profile_quality.
14295 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
14297 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
14298 -mext-string options.
14300 2018-01-12 Richard Biener <rguenther@suse.de>
14302 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
14303 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
14304 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
14306 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
14308 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
14310 * configure.ac (--with-long-double-format): Add support for the
14311 configuration option to change the default long double format on
14313 * config.gcc (powerpc*-linux*-*): Likewise.
14314 * configure: Regenerate.
14315 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
14316 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
14317 used without modification.
14319 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14321 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
14322 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
14323 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
14324 MISC_BUILTIN_SPEC_BARRIER.
14325 (rs6000_init_builtins): Likewise.
14326 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
14328 (speculation_barrier): New define_insn.
14329 * doc/extend.texi: Document __builtin_speculation_barrier.
14331 2018-01-11 Jakub Jelinek <jakub@redhat.com>
14334 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
14335 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
14336 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
14338 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
14339 integral modes instead of "ss" and "sd".
14340 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
14341 vectors with 32-bit and 64-bit elements.
14342 (vecdupssescalarmodesuffix): New mode attribute.
14343 (vec_dup<mode>): Use it.
14345 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
14348 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
14349 frame if argument is passed on stack.
14351 2018-01-11 Jakub Jelinek <jakub@redhat.com>
14354 * ree.c (combine_reaching_defs): Optimize also
14355 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
14356 reg2=any_extend(exp); reg1=reg2;, formatting fix.
14358 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
14360 PR middle-end/83189
14361 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
14363 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
14365 PR middle-end/83718
14366 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
14367 after they are computed.
14369 2018-01-11 Bin Cheng <bin.cheng@arm.com>
14371 PR tree-optimization/83695
14372 * gimple-loop-linterchange.cc
14373 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
14374 reset cached scev information after interchange.
14375 (pass_linterchange::execute): Remove call to scev_reset_htab.
14377 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14379 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
14380 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
14381 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
14382 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
14383 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
14384 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
14385 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
14386 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
14387 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
14388 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
14389 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
14390 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
14391 (V_lane_reg): Likewise.
14392 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
14394 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
14395 (vfmal_lane_low<mode>_intrinsic,
14396 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
14397 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
14398 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
14399 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
14400 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
14401 vfmsl_lane_high<mode>_intrinsic): New define_insns.
14403 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14405 * config/arm/arm-cpus.in (fp16fml): New feature.
14406 (ALL_SIMD): Add fp16fml.
14407 (armv8.2-a): Add fp16fml as an option.
14408 (armv8.3-a): Likewise.
14409 (armv8.4-a): Add fp16fml as part of fp16.
14410 * config/arm/arm.h (TARGET_FP16FML): Define.
14411 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
14413 * config/arm/arm-modes.def (V2HF): Define.
14414 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
14415 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
14416 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
14417 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
14418 vfmsl_low, vfmsl_high): New set of builtins.
14419 * config/arm/iterators.md (PLUSMINUS): New code iterator.
14420 (vfml_op): New code attribute.
14421 (VFMLHALVES): New int iterator.
14422 (VFML, VFMLSEL): New mode attributes.
14423 (V_reg): Define mapping for V2HF.
14424 (V_hi, V_lo): New mode attributes.
14425 (VF_constraint): Likewise.
14426 (vfml_half, vfml_half_selector): New int attributes.
14427 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
14429 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
14430 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
14432 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
14433 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
14434 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
14435 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
14437 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
14438 Document new effective target and option set.
14440 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14442 * config/arm/arm-cpus.in (armv8_4): New feature.
14443 (ARMv8_4a): New fgroup.
14444 (armv8.4-a): New arch.
14445 * config/arm/arm-tables.opt: Regenerate.
14446 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
14447 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
14448 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
14449 Add matching rules for -march=armv8.4-a and extensions.
14450 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
14452 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
14455 * config/rx/rx.md (BW): New mode attribute.
14456 (sync_lock_test_and_setsi): Add mode suffix to insn output.
14458 2018-01-11 Richard Biener <rguenther@suse.de>
14460 PR tree-optimization/83435
14461 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
14462 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
14463 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
14465 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
14466 Alan Hayward <alan.hayward@arm.com>
14467 David Sherwood <david.sherwood@arm.com>
14469 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
14471 (aarch64_classify_address): Initialize it. Track polynomial offsets.
14472 (aarch64_print_address_internal): Use it to check for a zero offset.
14474 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
14475 Alan Hayward <alan.hayward@arm.com>
14476 David Sherwood <david.sherwood@arm.com>
14478 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
14479 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
14480 Return a poly_int64 rather than a HOST_WIDE_INT.
14481 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
14482 rather than a HOST_WIDE_INT.
14483 * config/aarch64/aarch64.h (aarch64_frame): Protect with
14484 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
14485 hard_fp_offset, frame_size, initial_adjust, callee_offset and
14486 final_offset from HOST_WIDE_INT to poly_int64.
14487 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
14488 to_constant when getting the number of units in an Advanced SIMD
14490 (aarch64_builtin_vectorized_function): Check for a constant number
14492 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
14494 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
14495 attribute instead of GET_MODE_NUNITS.
14496 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
14497 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
14498 GET_MODE_SIZE for fixed-size registers.
14499 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
14500 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
14501 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
14502 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
14503 (aarch64_print_operand, aarch64_print_address_internal)
14504 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
14505 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
14506 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
14507 Handle polynomial GET_MODE_SIZE.
14508 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
14509 wider than SImode without modification.
14510 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
14511 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
14512 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
14513 passing and returning SVE modes.
14514 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
14515 rather than GEN_INT.
14516 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
14517 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
14518 (aarch64_allocate_and_probe_stack_space): Likewise.
14519 (aarch64_layout_frame): Cope with polynomial offsets.
14520 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
14521 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
14522 polynomial offsets.
14523 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
14524 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
14525 poly_int64 rather than a HOST_WIDE_INT.
14526 (aarch64_get_separate_components, aarch64_process_components)
14527 (aarch64_expand_prologue, aarch64_expand_epilogue)
14528 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
14529 (aarch64_anchor_offset): New function, split out from...
14530 (aarch64_legitimize_address): ...here.
14531 (aarch64_builtin_vectorization_cost): Handle polynomial
14532 TYPE_VECTOR_SUBPARTS.
14533 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
14535 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
14536 number of elements from the PARALLEL rather than the mode.
14537 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
14538 rather than GET_MODE_BITSIZE.
14539 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
14540 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
14541 (aarch64_expand_vec_perm_const_1): Handle polynomial
14542 d->perm.length () and d->perm elements.
14543 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
14544 Apply to_constant to d->perm elements.
14545 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
14546 polynomial CONST_VECTOR_NUNITS.
14547 (aarch64_move_pointer): Take amount as a poly_int64 rather
14549 (aarch64_progress_pointer): Avoid temporary variable.
14550 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
14551 the mode attribute instead of GET_MODE.
14553 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
14554 Alan Hayward <alan.hayward@arm.com>
14555 David Sherwood <david.sherwood@arm.com>
14557 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
14558 x exists before using it.
14559 (aarch64_add_constant_internal): Rename to...
14560 (aarch64_add_offset_1): ...this. Replace regnum with separate
14561 src and dest rtxes. Handle the case in which they're different,
14562 including when the offset is zero. Replace scratchreg with an rtx.
14563 Use 2 additions if there is no spare register into which we can
14564 move a 16-bit constant.
14565 (aarch64_add_constant): Delete.
14566 (aarch64_add_offset): Replace reg with separate src and dest
14567 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
14568 Use aarch64_add_offset_1.
14569 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
14570 an rtx rather than an int. Take the delta as a poly_int64
14571 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
14572 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
14573 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
14574 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
14575 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
14576 and aarch64_add_sp.
14577 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
14578 aarch64_add_constant.
14580 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
14582 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
14583 Use scalar_float_mode.
14585 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
14587 * config/aarch64/aarch64-simd.md
14588 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
14589 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
14590 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
14591 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
14592 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
14593 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
14594 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
14595 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
14596 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
14597 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
14599 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14602 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
14603 targ_options->x_arm_arch_string is non NULL.
14605 2018-01-11 Tamar Christina <tamar.christina@arm.com>
14607 * config/aarch64/aarch64.h
14608 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
14610 2018-01-11 Sudakshina Das <sudi.das@arm.com>
14613 * expmed.c (emit_store_flag_force): Swap if const op0
14614 and change VOIDmode to mode of op0.
14616 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
14618 PR rtl-optimization/83761
14619 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
14620 than bytes to mode_for_size.
14622 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
14624 PR middle-end/83189
14625 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
14626 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
14629 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
14631 PR middle-end/83575
14632 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
14633 when in layout mode.
14634 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
14635 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
14638 2018-01-10 Michael Collison <michael.collison@arm.com>
14640 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
14641 * config/aarch64/aarch64-option-extension.def: Add
14642 AARCH64_OPT_EXTENSION of 'fp16fml'.
14643 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
14644 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
14645 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
14646 * config/aarch64/constraints.md (Ui7): New constraint.
14647 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
14648 (VFMLA_SEL_W): Ditto.
14651 (VFMLA16_LOW): New int iterator.
14652 (VFMLA16_HIGH): Ditto.
14653 (UNSPEC_FMLAL): New unspec.
14654 (UNSPEC_FMLSL): Ditto.
14655 (UNSPEC_FMLAL2): Ditto.
14656 (UNSPEC_FMLSL2): Ditto.
14657 (f16mac): New code attribute.
14658 * config/aarch64/aarch64-simd-builtins.def
14659 (aarch64_fmlal_lowv2sf): Ditto.
14660 (aarch64_fmlsl_lowv2sf): Ditto.
14661 (aarch64_fmlalq_lowv4sf): Ditto.
14662 (aarch64_fmlslq_lowv4sf): Ditto.
14663 (aarch64_fmlal_highv2sf): Ditto.
14664 (aarch64_fmlsl_highv2sf): Ditto.
14665 (aarch64_fmlalq_highv4sf): Ditto.
14666 (aarch64_fmlslq_highv4sf): Ditto.
14667 (aarch64_fmlal_lane_lowv2sf): Ditto.
14668 (aarch64_fmlsl_lane_lowv2sf): Ditto.
14669 (aarch64_fmlal_laneq_lowv2sf): Ditto.
14670 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
14671 (aarch64_fmlalq_lane_lowv4sf): Ditto.
14672 (aarch64_fmlsl_lane_lowv4sf): Ditto.
14673 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
14674 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
14675 (aarch64_fmlal_lane_highv2sf): Ditto.
14676 (aarch64_fmlsl_lane_highv2sf): Ditto.
14677 (aarch64_fmlal_laneq_highv2sf): Ditto.
14678 (aarch64_fmlsl_laneq_highv2sf): Ditto.
14679 (aarch64_fmlalq_lane_highv4sf): Ditto.
14680 (aarch64_fmlsl_lane_highv4sf): Ditto.
14681 (aarch64_fmlalq_laneq_highv4sf): Ditto.
14682 (aarch64_fmlsl_laneq_highv4sf): Ditto.
14683 * config/aarch64/aarch64-simd.md:
14684 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
14685 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
14686 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
14687 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
14688 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
14689 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
14690 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
14691 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
14692 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
14693 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
14694 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
14695 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
14696 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
14697 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
14698 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
14699 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
14700 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
14701 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
14702 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
14703 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
14704 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
14705 (vfmlsl_low_u32): Ditto.
14706 (vfmlalq_low_u32): Ditto.
14707 (vfmlslq_low_u32): Ditto.
14708 (vfmlal_high_u32): Ditto.
14709 (vfmlsl_high_u32): Ditto.
14710 (vfmlalq_high_u32): Ditto.
14711 (vfmlslq_high_u32): Ditto.
14712 (vfmlal_lane_low_u32): Ditto.
14713 (vfmlsl_lane_low_u32): Ditto.
14714 (vfmlal_laneq_low_u32): Ditto.
14715 (vfmlsl_laneq_low_u32): Ditto.
14716 (vfmlalq_lane_low_u32): Ditto.
14717 (vfmlslq_lane_low_u32): Ditto.
14718 (vfmlalq_laneq_low_u32): Ditto.
14719 (vfmlslq_laneq_low_u32): Ditto.
14720 (vfmlal_lane_high_u32): Ditto.
14721 (vfmlsl_lane_high_u32): Ditto.
14722 (vfmlal_laneq_high_u32): Ditto.
14723 (vfmlsl_laneq_high_u32): Ditto.
14724 (vfmlalq_lane_high_u32): Ditto.
14725 (vfmlslq_lane_high_u32): Ditto.
14726 (vfmlalq_laneq_high_u32): Ditto.
14727 (vfmlslq_laneq_high_u32): Ditto.
14728 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
14729 (AARCH64_FL_FOR_ARCH8_4): New.
14730 (AARCH64_ISA_F16FML): New ISA flag.
14731 (TARGET_F16FML): New feature flag for fp16fml.
14732 (doc/invoke.texi): Document new fp16fml option.
14734 2018-01-10 Michael Collison <michael.collison@arm.com>
14736 * config/aarch64/aarch64-builtins.c:
14737 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
14738 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
14739 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
14740 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
14741 (AARCH64_ISA_SHA3): New ISA flag.
14742 (TARGET_SHA3): New feature flag for sha3.
14743 * config/aarch64/iterators.md (sha512_op): New int attribute.
14744 (CRYPTO_SHA512): New int iterator.
14745 (UNSPEC_SHA512H): New unspec.
14746 (UNSPEC_SHA512H2): Ditto.
14747 (UNSPEC_SHA512SU0): Ditto.
14748 (UNSPEC_SHA512SU1): Ditto.
14749 * config/aarch64/aarch64-simd-builtins.def
14750 (aarch64_crypto_sha512hqv2di): New builtin.
14751 (aarch64_crypto_sha512h2qv2di): Ditto.
14752 (aarch64_crypto_sha512su0qv2di): Ditto.
14753 (aarch64_crypto_sha512su1qv2di): Ditto.
14754 (aarch64_eor3qv8hi): Ditto.
14755 (aarch64_rax1qv2di): Ditto.
14756 (aarch64_xarqv2di): Ditto.
14757 (aarch64_bcaxqv8hi): Ditto.
14758 * config/aarch64/aarch64-simd.md:
14759 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
14760 (aarch64_crypto_sha512su0qv2di): Ditto.
14761 (aarch64_crypto_sha512su1qv2di): Ditto.
14762 (aarch64_eor3qv8hi): Ditto.
14763 (aarch64_rax1qv2di): Ditto.
14764 (aarch64_xarqv2di): Ditto.
14765 (aarch64_bcaxqv8hi): Ditto.
14766 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
14767 (vsha512h2q_u64): Ditto.
14768 (vsha512su0q_u64): Ditto.
14769 (vsha512su1q_u64): Ditto.
14770 (veor3q_u16): Ditto.
14771 (vrax1q_u64): Ditto.
14772 (vxarq_u64): Ditto.
14773 (vbcaxq_u16): Ditto.
14774 * config/arm/types.md (crypto_sha512): New type attribute.
14775 (crypto_sha3): Ditto.
14776 (doc/invoke.texi): Document new sha3 option.
14778 2018-01-10 Michael Collison <michael.collison@arm.com>
14780 * config/aarch64/aarch64-builtins.c:
14781 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
14782 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
14783 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
14784 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
14785 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
14786 (AARCH64_ISA_SM4): New ISA flag.
14787 (TARGET_SM4): New feature flag for sm4.
14788 * config/aarch64/aarch64-simd-builtins.def
14789 (aarch64_sm3ss1qv4si): Ditto.
14790 (aarch64_sm3tt1aq4si): Ditto.
14791 (aarch64_sm3tt1bq4si): Ditto.
14792 (aarch64_sm3tt2aq4si): Ditto.
14793 (aarch64_sm3tt2bq4si): Ditto.
14794 (aarch64_sm3partw1qv4si): Ditto.
14795 (aarch64_sm3partw2qv4si): Ditto.
14796 (aarch64_sm4eqv4si): Ditto.
14797 (aarch64_sm4ekeyqv4si): Ditto.
14798 * config/aarch64/aarch64-simd.md:
14799 (aarch64_sm3ss1qv4si): Ditto.
14800 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
14801 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
14802 (aarch64_sm4eqv4si): Ditto.
14803 (aarch64_sm4ekeyqv4si): Ditto.
14804 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
14805 (sm3part_op): Ditto.
14806 (CRYPTO_SM3TT): Ditto.
14807 (CRYPTO_SM3PART): Ditto.
14808 (UNSPEC_SM3SS1): New unspec.
14809 (UNSPEC_SM3TT1A): Ditto.
14810 (UNSPEC_SM3TT1B): Ditto.
14811 (UNSPEC_SM3TT2A): Ditto.
14812 (UNSPEC_SM3TT2B): Ditto.
14813 (UNSPEC_SM3PARTW1): Ditto.
14814 (UNSPEC_SM3PARTW2): Ditto.
14815 (UNSPEC_SM4E): Ditto.
14816 (UNSPEC_SM4EKEY): Ditto.
14817 * config/aarch64/constraints.md (Ui2): New constraint.
14818 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
14819 * config/arm/types.md (crypto_sm3): New type attribute.
14820 (crypto_sm4): Ditto.
14821 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
14822 (vsm3tt1aq_u32): Ditto.
14823 (vsm3tt1bq_u32): Ditto.
14824 (vsm3tt2aq_u32): Ditto.
14825 (vsm3tt2bq_u32): Ditto.
14826 (vsm3partw1q_u32): Ditto.
14827 (vsm3partw2q_u32): Ditto.
14828 (vsm4eq_u32): Ditto.
14829 (vsm4ekeyq_u32): Ditto.
14830 (doc/invoke.texi): Document new sm4 option.
14832 2018-01-10 Michael Collison <michael.collison@arm.com>
14834 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
14835 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
14836 (AARCH64_FL_FOR_ARCH8_4): New.
14837 (AARCH64_FL_V8_4): New flag.
14838 (doc/invoke.texi): Document new armv8.4-a option.
14840 2018-01-10 Michael Collison <michael.collison@arm.com>
14842 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
14843 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
14844 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
14845 * config/aarch64/aarch64-option-extension.def: Add
14846 AARCH64_OPT_EXTENSION of 'sha2'.
14847 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
14848 (crypto): Disable sha2 and aes if crypto disabled.
14849 (crypto): Enable aes and sha2 if enabled.
14850 (simd): Disable sha2 and aes if simd disabled.
14851 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
14853 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
14854 (TARGET_SHA2): New feature flag for sha2.
14855 (TARGET_AES): New feature flag for aes.
14856 * config/aarch64/aarch64-simd.md:
14857 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
14858 conditional on TARGET_AES.
14859 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
14860 (aarch64_crypto_sha1hsi): Make pattern conditional
14862 (aarch64_crypto_sha1hv4si): Ditto.
14863 (aarch64_be_crypto_sha1hv4si): Ditto.
14864 (aarch64_crypto_sha1su1v4si): Ditto.
14865 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
14866 (aarch64_crypto_sha1su0v4si): Ditto.
14867 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
14868 (aarch64_crypto_sha256su0v4si): Ditto.
14869 (aarch64_crypto_sha256su1v4si): Ditto.
14870 (doc/invoke.texi): Document new aes and sha2 options.
14872 2018-01-10 Martin Sebor <msebor@redhat.com>
14874 PR tree-optimization/83781
14875 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
14878 2018-01-11 Martin Sebor <msebor@gmail.com>
14879 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14881 PR tree-optimization/83501
14882 PR tree-optimization/81703
14884 * tree-ssa-strlen.c (get_string_cst): Rename...
14885 (get_string_len): ...to this. Handle global constants.
14886 (handle_char_store): Adjust.
14888 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
14889 Jim Wilson <jimw@sifive.com>
14891 * config/riscv/riscv-protos.h (riscv_output_return): New.
14892 * config/riscv/riscv.c (struct machine_function): New naked_p field.
14893 (riscv_attribute_table, riscv_output_return),
14894 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
14895 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
14896 (riscv_compute_frame_info): Only compute frame->mask if not a naked
14898 (riscv_expand_prologue): Add early return for naked function.
14899 (riscv_expand_epilogue): Likewise.
14900 (riscv_function_ok_for_sibcall): Return false for naked function.
14901 (riscv_set_current_function): New.
14902 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
14903 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
14904 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
14905 * doc/extend.texi (RISC-V Function Attributes): New.
14907 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
14909 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
14910 check for 128-bit long double before checking TCmode.
14911 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
14912 128-bit long doubles before checking TFmode or TCmode.
14913 (FLOAT128_IBM_P): Likewise.
14915 2018-01-10 Martin Sebor <msebor@redhat.com>
14917 PR tree-optimization/83671
14918 * builtins.c (c_strlen): Unconditionally return zero for the empty
14920 Use -Warray-bounds for warnings.
14921 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
14922 for non-constant array indices with COMPONENT_REF, arrays of
14923 arrays, and pointers to arrays.
14924 (gimple_fold_builtin_strlen): Determine and set length range for
14925 non-constant character arrays.
14927 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
14929 PR middle-end/81897
14930 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
14933 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
14935 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
14937 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
14940 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
14941 VECTOR_MEM_ALTIVEC_OR_VSX_P.
14942 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
14943 indexed_or_indirect_operand predicate.
14944 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
14945 (*vsx_le_perm_load_v8hi): Likewise.
14946 (*vsx_le_perm_load_v16qi): Likewise.
14947 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
14948 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
14949 (*vsx_le_perm_store_v8hi): Likewise.
14950 (*vsx_le_perm_store_v16qi): Likewise.
14951 (eight unnamed splitters): Likewise.
14953 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
14955 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
14956 * config/rs6000/emmintrin.h: Likewise.
14957 * config/rs6000/mmintrin.h: Likewise.
14958 * config/rs6000/xmmintrin.h: Likewise.
14960 2018-01-10 David Malcolm <dmalcolm@redhat.com>
14963 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
14965 * tree.c (tree_nop_conversion): Return true for location wrapper
14967 (maybe_wrap_with_location): New function.
14968 (selftest::check_strip_nops): New function.
14969 (selftest::test_location_wrappers): New function.
14970 (selftest::tree_c_tests): Call it.
14971 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
14972 (maybe_wrap_with_location): New decl.
14973 (EXPR_LOCATION_WRAPPER_P): New macro.
14974 (location_wrapper_p): New inline function.
14975 (tree_strip_any_location_wrapper): New inline function.
14977 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
14980 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
14981 stack_realign_offset for the largest alignment of stack slot
14983 (ix86_find_max_used_stack_alignment): New function.
14984 (ix86_finalize_stack_frame_flags): Use it. Set
14985 max_used_stack_alignment if we don't realign stack.
14986 * config/i386/i386.h (machine_function): Add
14987 max_used_stack_alignment.
14989 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
14991 * config/arm/arm.opt (-mbranch-cost): New option.
14992 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
14995 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
14998 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
14999 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
15001 2018-01-10 Richard Biener <rguenther@suse.de>
15004 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
15005 early out so it also covers the case where we have a non-NULL
15008 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
15010 PR tree-optimization/83753
15011 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
15012 for non-strided grouped accesses if the number of elements is 1.
15014 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
15017 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
15018 * i386.h (TARGET_USE_GATHER): Define.
15019 * x86-tune.def (X86_TUNE_USE_GATHER): New.
15021 2018-01-10 Martin Liska <mliska@suse.cz>
15024 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
15025 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
15027 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
15028 CLEANUP_NO_PARTITIONING is not set.
15030 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
15032 * doc/rtl.texi: Remove documentation of (const ...) wrappers
15033 for vectors, as a partial revert of r254296.
15034 * rtl.h (const_vec_p): Delete.
15035 (const_vec_duplicate_p): Don't test for vector CONSTs.
15036 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
15037 * expmed.c (make_tree): Likewise.
15040 * common.md (E, F): Use CONSTANT_P instead of checking for
15042 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
15043 checking for CONST_VECTOR.
15045 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
15047 PR middle-end/83575
15048 * predict.c (force_edge_cold): Handle in more sane way edges
15049 with no prediction.
15051 2018-01-09 Carl Love <cel@us.ibm.com>
15053 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
15055 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
15056 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
15057 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
15058 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
15059 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
15060 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
15061 * config/rs6000/rs6000-protos.h: Add extern defition for
15062 rs6000_generate_float2_double_code.
15063 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
15065 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
15066 (float2_v2df): Add define_expand.
15068 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
15071 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
15072 op_mode in the force_to_mode call.
15074 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
15076 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
15077 instead of checking each element individually.
15078 (aarch64_evpc_uzp): Likewise.
15079 (aarch64_evpc_zip): Likewise.
15080 (aarch64_evpc_ext): Likewise.
15081 (aarch64_evpc_rev): Likewise.
15082 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
15083 instead of checking each element individually. Return true without
15085 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
15086 whether all selected elements come from the same input, instead of
15087 checking each element individually. Remove calls to gen_rtx_REG,
15088 start_sequence and end_sequence and instead assert that no rtl is
15091 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
15093 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
15094 order of HIGH and CONST checks.
15096 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
15098 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
15099 if the destination isn't an SSA_NAME.
15101 2018-01-09 Richard Biener <rguenther@suse.de>
15103 PR tree-optimization/83668
15104 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
15106 (canonicalize_loop_form): ... here, renamed from ...
15107 (canonicalize_loop_closed_ssa_form): ... this and amended to
15108 swap successor edges for loop exit blocks to make us use
15109 the RPO order we need for initial schedule generation.
15111 2018-01-09 Joseph Myers <joseph@codesourcery.com>
15113 PR tree-optimization/64811
15114 * match.pd: When optimizing comparisons with Inf, avoid
15115 introducing or losing exceptions from comparisons with NaN.
15117 2018-01-09 Martin Liska <mliska@suse.cz>
15120 * asan.c (shadow_mem_size): Add gcc_assert.
15122 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
15124 Don't save registers in main().
15127 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
15128 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
15129 * config/avr/avr.c (avr_set_current_function): Don't error if
15130 naked, OS_task or OS_main are specified at the same time.
15131 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
15133 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
15135 * common/config/avr/avr-common.c (avr_option_optimization_table):
15136 Switch on -mmain-is-OS_task for optimizing compilations.
15138 2018-01-09 Richard Biener <rguenther@suse.de>
15140 PR tree-optimization/83572
15141 * graphite.c: Include cfganal.h.
15142 (graphite_transform_loops): Connect infinite loops to exit
15143 and remove fake edges at the end.
15145 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
15147 * ipa-inline.c (edge_badness): Revert accidental checkin.
15149 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
15152 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
15153 symbols; not inline clones.
15155 2018-01-09 Jakub Jelinek <jakub@redhat.com>
15158 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
15159 hard registers. Formatting fixes.
15161 PR preprocessor/83722
15162 * gcc.c (try_generate_repro): Pass
15163 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
15164 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
15167 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
15168 Kito Cheng <kito.cheng@gmail.com>
15170 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
15171 (riscv_leaf_function_p): Delete.
15172 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
15174 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15176 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
15178 (do_ifelse): New function.
15179 (do_isel): New function.
15180 (do_sub3): New function.
15181 (do_add3): New function.
15182 (do_load_mask_compare): New function.
15183 (do_overlap_load_compare): New function.
15184 (expand_compare_loop): New function.
15185 (expand_block_compare): Call expand_compare_loop() when appropriate.
15186 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
15187 option description.
15188 (-mblock-compare-inline-loop-limit): New option.
15190 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15193 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
15194 Reverse order of second and third operands in first alternative.
15195 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
15196 of first and second elements in UNSPEC_VPERMR vector.
15197 (altivec_expand_vec_perm_le): Likewise.
15199 2018-01-08 Jeff Law <law@redhat.com>
15201 PR rtl-optimizatin/81308
15202 * tree-switch-conversion.c (cfg_altered): New file scoped static.
15203 (process_switch): If group_case_labels makes a change, then set
15205 (pass_convert_switch::execute): If a switch is converted, then
15206 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
15208 PR rtl-optimization/81308
15209 * recog.c (split_all_insns): Conditionally cleanup the CFG after
15212 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
15214 PR target/83663 - Revert r255946
15215 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
15216 generation for cases where splatting a value is not useful.
15217 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
15218 across a vec_duplicate and a paradoxical subreg forming a vector
15219 mode to a vec_concat.
15221 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15223 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
15224 -march=armv8.3-a variants.
15225 * config/arm/t-multilib: Likewise.
15226 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
15228 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15230 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
15232 (cceq_ior_compare_complement): Give it a name so I can use it, and
15233 change boolean_or_operator predicate to boolean_operator so it can
15234 be used to generate a crand.
15235 (eqne): New code iterator.
15236 (bd/bd_neg): New code_attrs.
15237 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
15238 a single define_insn.
15239 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
15240 decrement (bdnzt/bdnzf/bdzt/bdzf).
15241 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
15242 with the new names of the branch decrement patterns, and added the
15243 names of the branch decrement conditional patterns.
15245 2018-01-08 Richard Biener <rguenther@suse.de>
15247 PR tree-optimization/83563
15248 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
15251 2018-01-08 Richard Biener <rguenther@suse.de>
15253 PR middle-end/83713
15254 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
15256 2018-01-08 Richard Biener <rguenther@suse.de>
15258 PR tree-optimization/83685
15259 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
15260 references to abnormals.
15262 2018-01-08 Richard Biener <rguenther@suse.de>
15265 * dwarf2out.c (output_indirect_strings): Handle empty
15266 skeleton_debug_str_hash.
15267 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
15269 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
15271 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
15272 (emit_store_direct): Likewise.
15273 (arc_trampoline_adjust_address): Likewise.
15274 (arc_asm_trampoline_template): New function.
15275 (arc_initialize_trampoline): Use asm_trampoline_template.
15276 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
15277 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
15278 * config/arc/arc.md (flush_icache): Delete pattern.
15280 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
15282 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
15283 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
15286 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
15289 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
15290 by not USED_FOR_TARGET.
15291 (make_pass_resolve_sw_modes): Likewise.
15293 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
15295 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
15298 2018-01-08 Richard Biener <rguenther@suse.de>
15300 PR middle-end/83580
15301 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
15303 2018-01-08 Richard Biener <rguenther@suse.de>
15305 PR middle-end/83517
15306 * match.pd ((t * 2) / 2) -> t): Add missing :c.
15308 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
15310 PR middle-end/81897
15311 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
15312 basic blocks with a small number of successors.
15313 (convert_control_dep_chain_into_preds): Improve handling of
15315 (dump_predicates): Split apart into...
15316 (dump_pred_chain): ...here...
15317 (dump_pred_info): ...and here.
15318 (can_one_predicate_be_invalidated_p): Add debugging printfs.
15319 (can_chain_union_be_invalidated_p): Improve check for invalidation
15321 (uninit_uses_cannot_happen): Avoid unnecessary if
15322 convert_control_dep_chain_into_preds yielded nothing.
15324 2018-01-06 Martin Sebor <msebor@redhat.com>
15326 PR tree-optimization/83640
15327 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
15328 subtracting negative offset from size.
15329 (builtin_access::overlap): Adjust offset bounds of the access to fall
15330 within the size of the object if possible.
15332 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
15334 PR rtl-optimization/83699
15335 * expmed.c (extract_bit_field_1): Restrict the vector usage of
15336 extract_bit_field_as_subreg to cases in which the extracted
15337 value is also a vector.
15339 * lra-constraints.c (process_alt_operands): Test for the equivalence
15340 substitutions when detecting a possible reload cycle.
15342 2018-01-06 Jakub Jelinek <jakub@redhat.com>
15345 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
15346 by default if flag_selective_schedling{,2}. Formatting fixes.
15348 PR rtl-optimization/83682
15349 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
15350 if it has non-VECTOR_MODE element mode.
15351 (vec_duplicate_p): Likewise.
15353 PR middle-end/83694
15354 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
15355 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
15357 2018-01-05 Jakub Jelinek <jakub@redhat.com>
15360 * config/i386/i386-builtin.def
15361 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
15362 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
15363 Require also OPTION_MASK_ISA_AVX512F in addition to
15364 OPTION_MASK_ISA_GFNI.
15365 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
15366 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
15367 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
15368 to OPTION_MASK_ISA_GFNI.
15369 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
15370 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
15371 OPTION_MASK_ISA_AVX512BW.
15372 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
15373 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
15374 addition to OPTION_MASK_ISA_GFNI.
15375 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
15376 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
15377 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
15378 to OPTION_MASK_ISA_GFNI.
15379 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
15380 a requirement for all ISAs rather than any of them with a few
15382 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
15384 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
15385 bitmasks to be enabled with 3 exceptions, instead of requiring any
15386 enabled ISA with lots of exceptions.
15387 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
15388 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
15389 Change avx512bw in isa attribute to avx512f.
15390 * config/i386/sgxintrin.h: Add license boilerplate.
15391 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
15392 to __AVX512F__ and __AVX512VL to __AVX512VL__.
15393 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
15394 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
15396 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
15397 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
15398 temporarily sse2 rather than sse if not enabled already.
15401 * config/i386/sse.md (VI248_VLBW): Rename to ...
15402 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
15403 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
15404 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
15405 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
15406 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
15407 mode iterator instead of VI248_VLBW.
15409 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
15411 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
15412 (record_modified): Skip clobbers; add debug output.
15413 (param_change_prob): Use sreal frequencies.
15415 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
15417 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
15418 punt for user-aligned variables.
15420 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
15422 * tree-chrec.c (chrec_contains_symbols): Return true for
15425 2018-01-05 Sudakshina Das <sudi.das@arm.com>
15428 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
15429 of (x|y) == x for BICS pattern.
15431 2018-01-05 Jakub Jelinek <jakub@redhat.com>
15433 PR tree-optimization/83605
15434 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
15435 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
15438 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
15440 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
15441 * config/epiphany/rtems.h: New file.
15443 2018-01-04 Jakub Jelinek <jakub@redhat.com>
15444 Uros Bizjak <ubizjak@gmail.com>
15447 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
15448 QIreg_operand instead of register_operand predicate.
15449 * config/i386/i386.c (ix86_rop_should_change_byte_p,
15450 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
15451 comments instead of -fmitigate[-_]rop.
15453 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15456 * cgraphunit.c (symbol_table::compile): Switch to text_section
15457 before calling assembly_start debug hook.
15458 * run-rtl-passes.c (run_rtl_passes): Likewise.
15461 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
15463 * tree-vrp.c (extract_range_from_binary_expr_1): Check
15464 range_int_cst_p rather than !symbolic_range_p before calling
15465 extract_range_from_multiplicative_op_1.
15467 2018-01-04 Jeff Law <law@redhat.com>
15469 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
15470 redundant test in assertion.
15472 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
15474 * doc/rtl.texi: Document machine_mode wrapper classes.
15476 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
15478 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
15479 using tree_to_uhwi.
15481 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
15483 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
15484 the VEC_PERM_EXPR fold to fail.
15486 2018-01-04 Jakub Jelinek <jakub@redhat.com>
15489 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
15490 to switched_sections.
15492 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
15495 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
15496 test for d.testing.
15498 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
15501 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
15502 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
15504 2018-01-04 Jakub Jelinek <jakub@redhat.com>
15507 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
15508 is BLKmode and bitpos not zero or mode change is needed.
15510 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
15513 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
15516 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
15519 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
15520 instead of MULT rtx. Update all corresponding splitters.
15521 (*saddl_se): Ditto.
15522 (*ssub<modesuffix>): Ditto.
15523 (*ssubl_se): Ditto.
15524 (*cmp_sadd_di): Update split patterns.
15525 (*cmp_sadd_si): Ditto.
15526 (*cmp_sadd_sidi): Ditto.
15527 (*cmp_ssub_di): Ditto.
15528 (*cmp_ssub_si): Ditto.
15529 (*cmp_ssub_sidi): Ditto.
15530 * config/alpha/predicates.md (const23_operand): New predicate.
15531 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
15532 Look for ASHIFT, not MULT inner operand.
15533 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
15535 2018-01-04 Martin Liska <mliska@suse.cz>
15537 PR gcov-profile/83669
15538 * gcov.c (output_intermediate_file): Add version to intermediate
15540 * doc/gcov.texi: Document new field 'version' in intermediate
15541 file format. Fix location of '-k' option of gcov command.
15543 2018-01-04 Martin Liska <mliska@suse.cz>
15546 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
15548 2018-01-04 Jakub Jelinek <jakub@redhat.com>
15550 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
15552 2018-01-03 Martin Sebor <msebor@redhat.com>
15554 PR tree-optimization/83655
15555 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
15556 checking calls with invalid arguments.
15558 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15560 * tree-vect-stmts.c (vect_get_store_rhs): New function.
15561 (vectorizable_mask_load_store): Delete.
15562 (vectorizable_call): Return false for masked loads and stores.
15563 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
15564 instead of gimple_assign_rhs1.
15565 (vectorizable_load): Handle IFN_MASK_LOAD.
15566 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
15568 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15570 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
15572 (vectorizable_mask_load_store): ...here.
15573 (vectorizable_load): ...and here.
15575 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15577 * tree-vect-stmts.c (vect_build_all_ones_mask)
15578 (vect_build_zero_merge_argument): New functions, split out from...
15579 (vectorizable_load): ...here.
15581 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15583 * tree-vect-stmts.c (vect_check_store_rhs): New function,
15585 (vectorizable_mask_load_store): ...here.
15586 (vectorizable_store): ...and here.
15588 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15590 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
15592 (vectorizable_mask_load_store): ...here.
15594 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15596 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
15597 (vect_model_store_cost): Take a vec_load_store_type instead of a
15599 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
15600 (vect_model_store_cost): Take a vec_load_store_type instead of a
15602 (vectorizable_mask_load_store): Update accordingly.
15603 (vectorizable_store): Likewise.
15604 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
15606 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15608 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
15609 IFN_MASK_LOAD calls here rather than...
15610 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
15612 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15613 Alan Hayward <alan.hayward@arm.com>
15614 David Sherwood <david.sherwood@arm.com>
15616 * expmed.c (extract_bit_field_1): For vector extracts,
15617 fall back to extract_bit_field_as_subreg if vec_extract
15620 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15621 Alan Hayward <alan.hayward@arm.com>
15622 David Sherwood <david.sherwood@arm.com>
15624 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
15625 they are variable or constant sized.
15626 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
15627 slots for constant-sized data.
15629 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15630 Alan Hayward <alan.hayward@arm.com>
15631 David Sherwood <david.sherwood@arm.com>
15633 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
15634 handling COND_EXPRs with boolean comparisons, try to find a better
15635 basis for the mask type than the boolean itself.
15637 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15639 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
15640 is calculated and how it can be overridden.
15641 * genmodes.c (max_bitsize_mode_any_mode): New variable.
15642 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
15644 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
15647 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15648 Alan Hayward <alan.hayward@arm.com>
15649 David Sherwood <david.sherwood@arm.com>
15651 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
15652 Remove the mode argument.
15653 (aarch64_simd_valid_immediate): Remove the mode and inverse
15655 * config/aarch64/iterators.md (bitsize): New iterator.
15656 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
15657 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
15658 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
15659 aarch64_simd_valid_immediate.
15660 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
15661 (aarch64_reg_or_bic_imm): Likewise.
15662 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
15663 with an insn_type enum and msl with a modifier_type enum.
15664 Replace element_width with a scalar_mode. Change the shift
15665 to unsigned int. Add constructors for scalar_float_mode and
15666 scalar_int_mode elements.
15667 (aarch64_vect_float_const_representable_p): Delete.
15668 (aarch64_can_const_movi_rtx_p)
15669 (aarch64_simd_scalar_immediate_valid_for_move)
15670 (aarch64_simd_make_constant): Update call to
15671 aarch64_simd_valid_immediate.
15672 (aarch64_advsimd_valid_immediate_hs): New function.
15673 (aarch64_advsimd_valid_immediate): Likewise.
15674 (aarch64_simd_valid_immediate): Remove mode and inverse
15675 arguments. Rewrite to use the above. Use const_vec_duplicate_p
15676 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
15677 and aarch64_float_const_representable_p on the result.
15678 (aarch64_output_simd_mov_immediate): Remove mode argument.
15679 Update call to aarch64_simd_valid_immediate and use of
15680 simd_immediate_info.
15681 (aarch64_output_scalar_simd_mov_immediate): Update call
15684 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15685 Alan Hayward <alan.hayward@arm.com>
15686 David Sherwood <david.sherwood@arm.com>
15688 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
15689 (mode_nunits): Likewise CONST_MODE_NUNITS.
15690 * machmode.def (ADJUST_NUNITS): Document.
15691 * genmodes.c (mode_data::need_nunits_adj): New field.
15692 (blank_mode): Update accordingly.
15693 (adj_nunits): New variable.
15694 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
15696 (emit_mode_size_inline): Set need_bytesize_adj for all modes
15697 listed in adj_nunits.
15698 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
15699 listed in adj_nunits. Don't emit case statements for such modes.
15700 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
15701 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
15702 nothing if adj_nunits is nonnull.
15703 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
15704 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
15705 (emit_mode_fbit): Update use of print_maybe_const_decl.
15706 (emit_move_size): Likewise. Treat the array as non-const
15708 (emit_mode_adjustments): Handle adj_nunits.
15710 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15712 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
15713 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
15714 (VECTOR_MODES): Use it.
15715 (make_vector_modes): Take the prefix as an argument.
15717 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15718 Alan Hayward <alan.hayward@arm.com>
15719 David Sherwood <david.sherwood@arm.com>
15721 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
15722 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
15723 for MODE_VECTOR_BOOL.
15724 * machmode.def (VECTOR_BOOL_MODE): Document.
15725 * genmodes.c (VECTOR_BOOL_MODE): New macro.
15726 (make_vector_bool_mode): New function.
15727 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
15729 * lto-streamer-in.c (lto_input_mode_table): Likewise.
15730 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
15732 * stor-layout.c (int_mode_for_mode): Likewise.
15733 * tree.c (build_vector_type_for_mode): Likewise.
15734 * varasm.c (output_constant_pool_2): Likewise.
15735 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
15736 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
15737 for MODE_VECTOR_BOOL.
15738 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
15739 of mode class checks.
15740 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
15741 instead of a list of mode class checks.
15742 (expand_vector_scalar_condition): Likewise.
15743 (type_for_widest_vector_mode): Handle BImode as an inner mode.
15745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15746 Alan Hayward <alan.hayward@arm.com>
15747 David Sherwood <david.sherwood@arm.com>
15749 * machmode.h (mode_size): Change from unsigned short to
15751 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
15752 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
15753 or if measurement_type is not polynomial.
15754 (fixed_size_mode::includes_p): Check for constant-sized modes.
15755 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
15756 return a poly_uint16 rather than an unsigned short.
15757 (emit_mode_size): Change the type of mode_size from unsigned short
15758 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
15759 (emit_mode_adjustments): Cope with polynomial vector sizes.
15760 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
15762 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
15764 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
15765 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
15766 * caller-save.c (setup_save_areas): Likewise.
15767 (replace_reg_with_saved_mem): Likewise.
15768 * calls.c (emit_library_call_value_1): Likewise.
15769 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
15770 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
15771 (gen_lowpart_for_combine): Likewise.
15772 * convert.c (convert_to_integer_1): Likewise.
15773 * cse.c (equiv_constant, cse_insn): Likewise.
15774 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
15775 (cselib_subst_to_values): Likewise.
15776 * dce.c (word_dce_process_block): Likewise.
15777 * df-problems.c (df_word_lr_mark_ref): Likewise.
15778 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
15779 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
15780 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
15781 (rtl_for_decl_location): Likewise.
15782 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
15783 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
15784 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
15785 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
15786 (expand_expr_real_1): Likewise.
15787 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
15788 (pad_below): Likewise.
15789 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
15790 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
15791 * ira.c (get_subreg_tracking_sizes): Likewise.
15792 * ira-build.c (ira_create_allocno_objects): Likewise.
15793 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
15794 (ira_sort_regnos_for_alter_reg): Likewise.
15795 * ira-costs.c (record_operand_costs): Likewise.
15796 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
15797 (resolve_simple_move): Likewise.
15798 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
15799 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
15800 (lra_constraints): Likewise.
15801 (CONST_POOL_OK_P): Reject variable-sized modes.
15802 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
15803 (add_pseudo_to_slot, lra_spill): Likewise.
15804 * omp-low.c (omp_clause_aligned_alignment): Likewise.
15805 * optabs-query.c (get_best_extraction_insn): Likewise.
15806 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
15807 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
15808 (expand_mult_highpart, valid_multiword_target_p): Likewise.
15809 * recog.c (offsettable_address_addr_space_p): Likewise.
15810 * regcprop.c (maybe_mode_change): Likewise.
15811 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
15812 * regrename.c (build_def_use): Likewise.
15813 * regstat.c (dump_reg_info): Likewise.
15814 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
15815 (find_reloads, find_reloads_subreg_address): Likewise.
15816 * reload1.c (eliminate_regs_1): Likewise.
15817 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
15818 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
15819 (simplify_binary_operation_1, simplify_subreg): Likewise.
15820 * targhooks.c (default_function_arg_padding): Likewise.
15821 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
15822 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
15823 (verify_gimple_assign_ternary): Likewise.
15824 * tree-inline.c (estimate_move_cost): Likewise.
15825 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15826 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
15827 (get_address_cost_ainc): Likewise.
15828 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
15829 (vect_supportable_dr_alignment): Likewise.
15830 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
15831 (vectorizable_reduction): Likewise.
15832 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
15833 (vectorizable_operation, vectorizable_load): Likewise.
15834 * tree.c (build_same_sized_truth_vector_type): Likewise.
15835 * valtrack.c (cleanup_auto_inc_dec): Likewise.
15836 * var-tracking.c (emit_note_insn_var_location): Likewise.
15837 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
15838 (ADDR_VEC_ALIGN): Likewise.
15840 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15841 Alan Hayward <alan.hayward@arm.com>
15842 David Sherwood <david.sherwood@arm.com>
15844 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
15846 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
15847 or if measurement_type is polynomial.
15848 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
15849 * combine.c (make_extraction): Likewise.
15850 * dse.c (find_shift_sequence): Likewise.
15851 * dwarf2out.c (mem_loc_descriptor): Likewise.
15852 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
15853 (extract_bit_field, extract_low_bits): Likewise.
15854 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
15855 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
15856 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
15857 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
15858 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
15859 * reload.c (find_reloads): Likewise.
15860 * reload1.c (alter_reg): Likewise.
15861 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
15862 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
15863 * tree-if-conv.c (predicate_mem_writes): Likewise.
15864 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
15865 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
15866 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
15867 * valtrack.c (dead_debug_insert_temp): Likewise.
15868 * varasm.c (mergeable_constant_section): Likewise.
15869 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
15871 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15872 Alan Hayward <alan.hayward@arm.com>
15873 David Sherwood <david.sherwood@arm.com>
15875 * expr.c (expand_assignment): Cope with polynomial mode sizes
15876 when assigning to a CONCAT.
15878 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15879 Alan Hayward <alan.hayward@arm.com>
15880 David Sherwood <david.sherwood@arm.com>
15882 * machmode.h (mode_precision): Change from unsigned short to
15884 (mode_to_precision): Return a poly_uint16 rather than an unsigned
15886 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
15887 or if measurement_type is not polynomial.
15888 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
15889 in which the mode is already known to be a scalar_int_mode.
15890 * genmodes.c (emit_mode_precision): Change the type of mode_precision
15891 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
15893 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
15894 for GET_MODE_PRECISION.
15895 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
15896 for GET_MODE_PRECISION.
15897 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
15899 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
15900 (expand_field_assignment, make_extraction): Likewise.
15901 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
15902 (get_last_value): Likewise.
15903 * convert.c (convert_to_integer_1): Likewise.
15904 * cse.c (cse_insn): Likewise.
15905 * expr.c (expand_expr_real_1): Likewise.
15906 * lra-constraints.c (simplify_operand_subreg): Likewise.
15907 * optabs-query.c (can_atomic_load_p): Likewise.
15908 * optabs.c (expand_atomic_load): Likewise.
15909 (expand_atomic_store): Likewise.
15910 * ree.c (combine_reaching_defs): Likewise.
15911 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
15912 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
15913 * tree.h (type_has_mode_precision_p): Likewise.
15914 * ubsan.c (instrument_si_overflow): Likewise.
15916 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15917 Alan Hayward <alan.hayward@arm.com>
15918 David Sherwood <david.sherwood@arm.com>
15920 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
15921 polynomial numbers of units.
15922 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
15923 (valid_vector_subparts_p): New function.
15924 (build_vector_type): Remove temporary shim and take the number
15925 of units as a poly_uint64 rather than an int.
15926 (build_opaque_vector_type): Take the number of units as a
15927 poly_uint64 rather than an int.
15928 * tree.c (build_vector_from_ctor): Handle polynomial
15929 TYPE_VECTOR_SUBPARTS.
15930 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
15931 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
15932 (build_vector_from_val): If the number of units is variable,
15933 use build_vec_duplicate_cst for constant operands and
15934 VEC_DUPLICATE_EXPR otherwise.
15935 (make_vector_type): Remove temporary is_constant ().
15936 (build_vector_type, build_opaque_vector_type): Take the number of
15937 units as a poly_uint64 rather than an int.
15938 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
15940 * cfgexpand.c (expand_debug_expr): Likewise.
15941 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
15942 (store_constructor, expand_expr_real_1): Likewise.
15943 (const_scalar_mask_from_tree): Likewise.
15944 * fold-const-call.c (fold_const_reduction): Likewise.
15945 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
15946 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
15947 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
15948 (fold_relational_const): Likewise.
15949 (native_interpret_vector): Likewise. Change the size from an
15950 int to an unsigned int.
15951 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
15952 TYPE_VECTOR_SUBPARTS.
15953 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
15954 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
15955 duplicating a non-constant operand into a variable-length vector.
15956 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
15957 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
15958 * ipa-icf.c (sem_variable::equals): Likewise.
15959 * match.pd: Likewise.
15960 * omp-simd-clone.c (simd_clone_subparts): Likewise.
15961 * print-tree.c (print_node): Likewise.
15962 * stor-layout.c (layout_type): Likewise.
15963 * targhooks.c (default_builtin_vectorization_cost): Likewise.
15964 * tree-cfg.c (verify_gimple_comparison): Likewise.
15965 (verify_gimple_assign_binary): Likewise.
15966 (verify_gimple_assign_ternary): Likewise.
15967 (verify_gimple_assign_single): Likewise.
15968 * tree-pretty-print.c (dump_generic_node): Likewise.
15969 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15970 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
15971 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
15972 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
15973 (vect_shift_permute_load_chain): Likewise.
15974 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
15975 (expand_vector_condition, optimize_vector_constructor): Likewise.
15976 (lower_vec_perm, get_compute_type): Likewise.
15977 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
15978 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
15979 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
15980 (vect_recog_mask_conversion_pattern): Likewise.
15981 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
15982 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
15983 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15984 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
15985 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
15986 (vectorizable_shift, vectorizable_operation, vectorizable_store)
15987 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
15988 (supportable_widening_operation): Likewise.
15989 (supportable_narrowing_operation): Likewise.
15990 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
15992 * varasm.c (output_constant): Likewise.
15994 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15995 Alan Hayward <alan.hayward@arm.com>
15996 David Sherwood <david.sherwood@arm.com>
15998 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
15999 so that both the length == 3 and length != 3 cases set up their
16000 own permute vectors. Add comments explaining why we know the
16001 number of elements is constant.
16002 (vect_permute_load_chain): Likewise.
16004 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16005 Alan Hayward <alan.hayward@arm.com>
16006 David Sherwood <david.sherwood@arm.com>
16008 * machmode.h (mode_nunits): Change from unsigned char to
16010 (ONLY_FIXED_SIZE_MODES): New macro.
16011 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
16012 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
16013 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
16015 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
16016 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
16017 or if measurement_type is not polynomial.
16018 * genmodes.c (ZERO_COEFFS): New macro.
16019 (emit_mode_nunits_inline): Make mode_nunits_inline return a
16021 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
16022 Use ZERO_COEFFS when emitting initializers.
16023 * data-streamer.h (bp_pack_poly_value): New function.
16024 (bp_unpack_poly_value): Likewise.
16025 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16026 for GET_MODE_NUNITS.
16027 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16028 for GET_MODE_NUNITS.
16029 * tree.c (make_vector_type): Remove temporary shim and make
16030 the real function take the number of units as a poly_uint64
16031 rather than an int.
16032 (build_vector_type_for_mode): Handle polynomial nunits.
16033 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
16034 * emit-rtl.c (const_vec_series_p_1): Likewise.
16035 (gen_rtx_CONST_VECTOR): Likewise.
16036 * fold-const.c (test_vec_duplicate_folding): Likewise.
16037 * genrecog.c (validate_pattern): Likewise.
16038 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
16039 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
16040 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
16041 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
16042 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
16043 * rtlanal.c (subreg_get_info): Likewise.
16044 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
16045 (vect_grouped_load_supported): Likewise.
16046 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
16047 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
16048 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
16049 (simplify_const_unary_operation, simplify_binary_operation_1)
16050 (simplify_const_binary_operation, simplify_ternary_operation)
16051 (test_vector_ops_duplicate, test_vector_ops): Likewise.
16052 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
16053 instead of CONST_VECTOR_NUNITS.
16054 * varasm.c (output_constant_pool_2): Likewise.
16055 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
16056 explicit-encoded elements in the XVEC for variable-length vectors.
16058 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16060 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
16062 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16063 Alan Hayward <alan.hayward@arm.com>
16064 David Sherwood <david.sherwood@arm.com>
16066 * coretypes.h (fixed_size_mode): Declare.
16067 (fixed_size_mode_pod): New typedef.
16068 * builtins.h (target_builtins::x_apply_args_mode)
16069 (target_builtins::x_apply_result_mode): Change type to
16070 fixed_size_mode_pod.
16071 * builtins.c (apply_args_size, apply_result_size, result_vector)
16072 (expand_builtin_apply_args_1, expand_builtin_apply)
16073 (expand_builtin_return): Update accordingly.
16075 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16077 * cse.c (hash_rtx_cb): Hash only the encoded elements.
16078 * cselib.c (cselib_hash_rtx): Likewise.
16079 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
16080 CONST_VECTOR encoding.
16082 2018-01-03 Jakub Jelinek <jakub@redhat.com>
16083 Jeff Law <law@redhat.com>
16086 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
16087 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
16088 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
16089 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
16092 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
16093 explicitly probe *sp in a noreturn function if there were any callee
16094 register saves or frame pointer is needed.
16096 2018-01-03 Jakub Jelinek <jakub@redhat.com>
16099 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
16100 BLKmode for ternary, binary or unary expressions.
16103 * var-tracking.c (delete_vta_debug_insn): New inline function.
16104 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
16105 insns from get_insns () to NULL instead of each bb separately.
16106 Use delete_vta_debug_insn. No longer static.
16107 (vt_debug_insns_local, variable_tracking_main_1): Adjust
16108 delete_vta_debug_insns callers.
16109 * rtl.h (delete_vta_debug_insns): Declare.
16110 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
16111 instead of variable_tracking_main.
16113 2018-01-03 Martin Sebor <msebor@redhat.com>
16115 PR tree-optimization/83603
16116 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
16117 arguments past the endof the argument list in functions declared
16118 without a prototype.
16119 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
16120 Avoid checking when arguments are null.
16122 2018-01-03 Martin Sebor <msebor@redhat.com>
16125 * doc/extend.texi (attribute const): Fix a typo.
16126 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
16127 issuing -Wsuggest-attribute for void functions.
16129 2018-01-03 Martin Sebor <msebor@redhat.com>
16131 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
16132 offset_int::from instead of wide_int::to_shwi.
16133 (maybe_diag_overlap): Remove assertion.
16134 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
16135 * gimple-ssa-sprintf.c (format_directive): Same.
16136 (parse_directive): Same.
16137 (sprintf_dom_walker::compute_format_length): Same.
16138 (try_substitute_return_value): Same.
16140 2018-01-03 Jeff Law <law@redhat.com>
16142 PR middle-end/83654
16143 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
16144 non-constant residual for zero at runtime and avoid probing in
16145 that case. Reorganize code for trailing problem to mirror handling
16148 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16150 PR tree-optimization/83501
16151 * tree-ssa-strlen.c (get_string_cst): New.
16152 (handle_char_store): Call get_string_cst.
16154 2018-01-03 Martin Liska <mliska@suse.cz>
16156 PR tree-optimization/83593
16157 * tree-ssa-strlen.c: Include tree-cfg.h.
16158 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
16159 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
16160 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
16162 (strlen_dom_walker::before_dom_children): Call
16163 gimple_purge_dead_eh_edges. Dump tranformation with details
16165 (strlen_dom_walker::before_dom_children): Update call by adding
16166 new argument cleanup_eh.
16167 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
16169 2018-01-03 Martin Liska <mliska@suse.cz>
16172 * cif-code.def (VARIADIC_THUNK): New enum value.
16173 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
16176 2018-01-03 Jan Beulich <jbeulich@suse.com>
16178 * sse.md (mov<mode>_internal): Tighten condition for when to use
16179 vmovdqu<ssescalarsize> for TI and OI modes.
16181 2018-01-03 Jakub Jelinek <jakub@redhat.com>
16183 Update copyright years.
16185 2018-01-03 Martin Liska <mliska@suse.cz>
16188 * ipa-visibility.c (function_and_variable_visibility): Skip
16189 functions with noipa attribure.
16191 2018-01-03 Jakub Jelinek <jakub@redhat.com>
16193 * gcc.c (process_command): Update copyright notice dates.
16194 * gcov-dump.c (print_version): Ditto.
16195 * gcov.c (print_version): Ditto.
16196 * gcov-tool.c (print_version): Ditto.
16197 * gengtype.c (create_file): Ditto.
16198 * doc/cpp.texi: Bump @copying's copyright year.
16199 * doc/cppinternals.texi: Ditto.
16200 * doc/gcc.texi: Ditto.
16201 * doc/gccint.texi: Ditto.
16202 * doc/gcov.texi: Ditto.
16203 * doc/install.texi: Ditto.
16204 * doc/invoke.texi: Ditto.
16206 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16208 * vector-builder.h (vector_builder::m_full_nelts): Change from
16209 unsigned int to poly_uint64.
16210 (vector_builder::full_nelts): Update prototype accordingly.
16211 (vector_builder::new_vector): Likewise.
16212 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
16213 (vector_builder::operator ==): Likewise.
16214 (vector_builder::finalize): Likewise.
16215 * int-vector-builder.h (int_vector_builder::int_vector_builder):
16216 Take the number of elements as a poly_uint64 rather than an
16218 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
16219 from unsigned int to poly_uint64.
16220 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
16221 (vec_perm_indices::new_vector): Likewise.
16222 (vec_perm_indices::length): Likewise.
16223 (vec_perm_indices::nelts_per_input): Likewise.
16224 (vec_perm_indices::input_nelts): Likewise.
16225 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
16226 number of elements per input as a poly_uint64 rather than an
16227 unsigned int. Use the original encoding for variable-length
16228 vectors, rather than clamping each individual element.
16229 For the second and subsequent elements in each pattern,
16230 clamp the step and base before clamping their sum.
16231 (vec_perm_indices::series_p): Handle polynomial element counts.
16232 (vec_perm_indices::all_in_range_p): Likewise.
16233 (vec_perm_indices_to_tree): Likewise.
16234 (vec_perm_indices_to_rtx): Likewise.
16235 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
16236 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
16237 (tree_vector_builder::new_binary_operation): Handle polynomial
16238 element counts. Return false if we need to know the number
16239 of elements at compile time.
16240 * fold-const.c (fold_vec_perm): Punt if the number of elements
16241 isn't known at compile time.
16243 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16245 * vec-perm-indices.h (vec_perm_builder): Change element type
16246 from HOST_WIDE_INT to poly_int64.
16247 (vec_perm_indices::element_type): Update accordingly.
16248 (vec_perm_indices::clamp): Handle polynomial element_types.
16249 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
16250 (vec_perm_indices::all_in_range_p): Likewise.
16251 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
16253 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
16254 polynomial vec_perm_indices element types.
16255 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
16256 * fold-const.c (fold_vec_perm): Likewise.
16257 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
16258 * tree-vect-generic.c (lower_vec_perm): Likewise.
16259 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
16260 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
16261 element type to HOST_WIDE_INT.
16263 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16264 Alan Hayward <alan.hayward@arm.com>
16265 David Sherwood <david.sherwood@arm.com>
16267 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
16268 rather than an int. Use plus_constant.
16269 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
16270 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
16272 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16273 Alan Hayward <alan.hayward@arm.com>
16274 David Sherwood <david.sherwood@arm.com>
16276 * calls.c (emit_call_1, expand_call): Change struct_value_size from
16277 a HOST_WIDE_INT to a poly_int64.
16279 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16280 Alan Hayward <alan.hayward@arm.com>
16281 David Sherwood <david.sherwood@arm.com>
16283 * calls.c (load_register_parameters): Cope with polynomial
16284 mode sizes. Require a constant size for BLKmode parameters
16285 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
16286 forces a parameter to be padded at the lsb end in order to
16287 fill a complete number of words, require the parameter size
16288 to be ordered wrt UNITS_PER_WORD.
16290 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16291 Alan Hayward <alan.hayward@arm.com>
16292 David Sherwood <david.sherwood@arm.com>
16294 * reload1.c (spill_stack_slot_width): Change element type
16295 from unsigned int to poly_uint64_pod.
16296 (alter_reg): Treat mode sizes as polynomial.
16298 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16299 Alan Hayward <alan.hayward@arm.com>
16300 David Sherwood <david.sherwood@arm.com>
16302 * reload.c (complex_word_subreg_p): New function.
16303 (reload_inner_reg_of_subreg, push_reload): Use it.
16305 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16306 Alan Hayward <alan.hayward@arm.com>
16307 David Sherwood <david.sherwood@arm.com>
16309 * lra-constraints.c (process_alt_operands): Reject matched
16310 operands whose sizes aren't ordered.
16311 (match_reload): Refer to this check here.
16313 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16314 Alan Hayward <alan.hayward@arm.com>
16315 David Sherwood <david.sherwood@arm.com>
16317 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
16318 that the mode size is in the set {1, 2, 4, 8, 16}.
16320 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16321 Alan Hayward <alan.hayward@arm.com>
16322 David Sherwood <david.sherwood@arm.com>
16324 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
16325 Use plus_constant instead of gen_rtx_PLUS.
16327 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16328 Alan Hayward <alan.hayward@arm.com>
16329 David Sherwood <david.sherwood@arm.com>
16331 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
16332 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
16333 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
16334 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
16335 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
16336 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
16337 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
16338 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
16339 * config/i386/i386.c (ix86_push_rounding): ...this new function.
16340 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
16342 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
16343 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
16344 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
16345 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
16346 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
16347 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
16348 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
16349 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
16350 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
16351 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
16353 * expr.c (emit_move_resolve_push): Treat the input and result
16354 of PUSH_ROUNDING as a poly_int64.
16355 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
16356 (emit_push_insn): Likewise.
16357 * lra-eliminations.c (mark_not_eliminable): Likewise.
16358 * recog.c (push_operand): Likewise.
16359 * reload1.c (elimination_effects): Likewise.
16360 * rtlanal.c (nonzero_bits1): Likewise.
16361 * calls.c (store_one_arg): Likewise. Require the padding to be
16362 known at compile time.
16364 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16365 Alan Hayward <alan.hayward@arm.com>
16366 David Sherwood <david.sherwood@arm.com>
16368 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
16369 Use plus_constant instead of gen_rtx_PLUS.
16371 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16372 Alan Hayward <alan.hayward@arm.com>
16373 David Sherwood <david.sherwood@arm.com>
16375 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
16376 rather than an int.
16378 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16379 Alan Hayward <alan.hayward@arm.com>
16380 David Sherwood <david.sherwood@arm.com>
16382 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
16383 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
16384 via stack temporaries. Treat the mode size as polynomial too.
16386 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16387 Alan Hayward <alan.hayward@arm.com>
16388 David Sherwood <david.sherwood@arm.com>
16390 * expr.c (expand_expr_real_2): When handling conversions involving
16391 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
16392 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
16393 as a poly_uint64 too.
16395 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16396 Alan Hayward <alan.hayward@arm.com>
16397 David Sherwood <david.sherwood@arm.com>
16399 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
16401 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16402 Alan Hayward <alan.hayward@arm.com>
16403 David Sherwood <david.sherwood@arm.com>
16405 * combine.c (can_change_dest_mode): Handle polynomial
16406 REGMODE_NATURAL_SIZE.
16407 * expmed.c (store_bit_field_1): Likewise.
16408 * expr.c (store_constructor): Likewise.
16409 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
16410 and polynomial REGMODE_NATURAL_SIZE.
16411 (gen_lowpart_common): Likewise.
16412 * reginfo.c (record_subregs_of_mode): Likewise.
16413 * rtlanal.c (read_modify_subreg_p): Likewise.
16415 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16416 Alan Hayward <alan.hayward@arm.com>
16417 David Sherwood <david.sherwood@arm.com>
16419 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
16420 numbers of elements.
16422 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16423 Alan Hayward <alan.hayward@arm.com>
16424 David Sherwood <david.sherwood@arm.com>
16426 * match.pd: Cope with polynomial numbers of vector elements.
16428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16429 Alan Hayward <alan.hayward@arm.com>
16430 David Sherwood <david.sherwood@arm.com>
16432 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
16433 in a POINTER_PLUS_EXPR.
16435 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16436 Alan Hayward <alan.hayward@arm.com>
16437 David Sherwood <david.sherwood@arm.com>
16439 * omp-simd-clone.c (simd_clone_subparts): New function.
16440 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
16441 (ipa_simd_modify_function_body): Likewise.
16443 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16444 Alan Hayward <alan.hayward@arm.com>
16445 David Sherwood <david.sherwood@arm.com>
16447 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
16448 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
16449 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
16450 (expand_vector_condition, vector_element): Likewise.
16451 (subparts_gt): New function.
16452 (get_compute_type): Use subparts_gt.
16453 (count_type_subparts): Delete.
16454 (expand_vector_operations_1): Use subparts_gt instead of
16455 count_type_subparts.
16457 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16458 Alan Hayward <alan.hayward@arm.com>
16459 David Sherwood <david.sherwood@arm.com>
16461 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
16462 (vect_compile_time_alias): ...this new function. Do the calculation
16463 on poly_ints rather than trees.
16464 (vect_prune_runtime_alias_test_list): Update call accordingly.
16466 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16467 Alan Hayward <alan.hayward@arm.com>
16468 David Sherwood <david.sherwood@arm.com>
16470 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
16472 (vect_schedule_slp_instance): Likewise.
16474 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16475 Alan Hayward <alan.hayward@arm.com>
16476 David Sherwood <david.sherwood@arm.com>
16478 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
16479 constant and extern definitions for variable-length vectors.
16480 (vect_get_constant_vectors): Note that the number of units
16481 is known to be constant.
16483 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16484 Alan Hayward <alan.hayward@arm.com>
16485 David Sherwood <david.sherwood@arm.com>
16487 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
16488 of units as polynomial. Choose between WIDE and NARROW based
16491 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16492 Alan Hayward <alan.hayward@arm.com>
16493 David Sherwood <david.sherwood@arm.com>
16495 * tree-vect-stmts.c (simd_clone_subparts): New function.
16496 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
16498 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16499 Alan Hayward <alan.hayward@arm.com>
16500 David Sherwood <david.sherwood@arm.com>
16502 * tree-vect-stmts.c (vectorizable_call): Treat the number of
16503 vectors as polynomial. Use build_index_vector for
16504 IFN_GOMP_SIMD_LANE.
16506 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16507 Alan Hayward <alan.hayward@arm.com>
16508 David Sherwood <david.sherwood@arm.com>
16510 * tree-vect-stmts.c (get_load_store_type): Treat the number of
16511 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
16512 for variable-length vectors.
16513 (vectorizable_mask_load_store): Treat the number of units as
16514 polynomial, asserting that it is constant if the condition has
16515 already been enforced.
16516 (vectorizable_store, vectorizable_load): Likewise.
16518 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16519 Alan Hayward <alan.hayward@arm.com>
16520 David Sherwood <david.sherwood@arm.com>
16522 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
16523 of units as polynomial. Punt if we can't tell at compile time
16524 which vector contains the final result.
16526 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16527 Alan Hayward <alan.hayward@arm.com>
16528 David Sherwood <david.sherwood@arm.com>
16530 * tree-vect-loop.c (vectorizable_induction): Treat the number
16531 of units as polynomial. Punt on SLP inductions. Use an integer
16532 VEC_SERIES_EXPR for variable-length integer reductions. Use a
16533 cast of such a series for variable-length floating-point
16536 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16537 Alan Hayward <alan.hayward@arm.com>
16538 David Sherwood <david.sherwood@arm.com>
16540 * tree.h (build_index_vector): Declare.
16541 * tree.c (build_index_vector): New function.
16542 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
16543 of units as polynomial, forcibly converting it to a constant if
16544 vectorizable_reduction has already enforced the condition.
16545 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
16546 to create a {1,2,3,...} vector.
16547 (vectorizable_reduction): Treat the number of units as polynomial.
16548 Choose vectype_in based on the largest scalar element size rather
16549 than the smallest number of units. Enforce the restrictions
16552 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16553 Alan Hayward <alan.hayward@arm.com>
16554 David Sherwood <david.sherwood@arm.com>
16556 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
16557 number of units as polynomial.
16559 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16560 Alan Hayward <alan.hayward@arm.com>
16561 David Sherwood <david.sherwood@arm.com>
16563 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
16564 * target.def (autovectorize_vector_sizes): Return the vector sizes
16565 by pointer, using vector_sizes rather than a bitmask.
16566 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
16567 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
16568 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
16570 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
16571 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
16572 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
16573 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
16574 * omp-general.c (omp_max_vf): Likewise.
16575 * omp-low.c (omp_clause_aligned_alignment): Likewise.
16576 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
16577 * tree-vect-loop.c (vect_analyze_loop): Likewise.
16578 * tree-vect-slp.c (vect_slp_bb): Likewise.
16579 * doc/tm.texi: Regenerate.
16580 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
16582 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
16583 the vector size as a poly_uint64 rather than an unsigned int.
16584 (current_vector_size): Change from an unsigned int to a poly_uint64.
16585 (get_vectype_for_scalar_type): Update accordingly.
16586 * tree.h (build_truth_vector_type): Take the size and number of
16587 units as a poly_uint64 rather than an unsigned int.
16588 (build_vector_type): Add a temporary overload that takes
16589 the number of units as a poly_uint64 rather than an unsigned int.
16590 * tree.c (make_vector_type): Likewise.
16591 (build_truth_vector_type): Take the number of units as a poly_uint64
16592 rather than an unsigned int.
16594 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16595 Alan Hayward <alan.hayward@arm.com>
16596 David Sherwood <david.sherwood@arm.com>
16598 * target.def (get_mask_mode): Take the number of units and length
16599 as poly_uint64s rather than unsigned ints.
16600 * targhooks.h (default_get_mask_mode): Update accordingly.
16601 * targhooks.c (default_get_mask_mode): Likewise.
16602 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
16603 * doc/tm.texi: Regenerate.
16605 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16606 Alan Hayward <alan.hayward@arm.com>
16607 David Sherwood <david.sherwood@arm.com>
16609 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
16610 * omp-general.c (omp_max_vf): Likewise.
16611 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
16612 (expand_omp_simd): Handle polynomial safelen.
16613 * omp-low.c (omplow_simd_context): Add a default constructor.
16614 (omplow_simd_context::max_vf): Change from int to poly_uint64.
16615 (lower_rec_simd_input_clauses): Update accordingly.
16616 (lower_rec_input_clauses): Likewise.
16618 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16619 Alan Hayward <alan.hayward@arm.com>
16620 David Sherwood <david.sherwood@arm.com>
16622 * tree-vectorizer.h (vect_nunits_for_cost): New function.
16623 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
16624 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
16625 (vect_analyze_slp_cost): Likewise.
16626 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
16627 (vect_model_load_cost): Likewise.
16629 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16630 Alan Hayward <alan.hayward@arm.com>
16631 David Sherwood <david.sherwood@arm.com>
16633 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
16634 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
16635 from an unsigned int * to a poly_uint64_pod *.
16636 (calculate_unrolling_factor): New function.
16637 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
16639 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16640 Alan Hayward <alan.hayward@arm.com>
16641 David Sherwood <david.sherwood@arm.com>
16643 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
16644 from an unsigned int to a poly_uint64.
16645 (_loop_vec_info::slp_unrolling_factor): Likewise.
16646 (_loop_vec_info::vectorization_factor): Change from an int
16648 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
16649 (vect_get_num_vectors): New function.
16650 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
16651 (vect_get_num_copies): Use vect_get_num_vectors.
16652 (vect_analyze_data_ref_dependences): Change max_vf from an int *
16653 to an unsigned int *.
16654 (vect_analyze_data_refs): Change min_vf from an int * to a
16656 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
16657 than an unsigned HOST_WIDE_INT.
16658 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
16659 (vect_analyze_data_ref_dependence): Change max_vf from an int *
16660 to an unsigned int *.
16661 (vect_analyze_data_ref_dependences): Likewise.
16662 (vect_compute_data_ref_alignment): Handle polynomial vf.
16663 (vect_enhance_data_refs_alignment): Likewise.
16664 (vect_prune_runtime_alias_test_list): Likewise.
16665 (vect_shift_permute_load_chain): Likewise.
16666 (vect_supportable_dr_alignment): Likewise.
16667 (dependence_distance_ge_vf): Take the vectorization factor as a
16668 poly_uint64 rather than an unsigned HOST_WIDE_INT.
16669 (vect_analyze_data_refs): Change min_vf from an int * to a
16671 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
16672 vfm1 as a poly_uint64 rather than an int. Make the same change
16673 for the returned bound_scalar.
16674 (vect_gen_vector_loop_niters): Handle polynomial vf.
16675 (vect_do_peeling): Likewise. Update call to
16676 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
16677 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
16679 * tree-vect-loop.c (vect_determine_vectorization_factor)
16680 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
16681 (vect_get_known_peeling_cost): Likewise.
16682 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
16683 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
16684 (vect_transform_loop): Likewise. Use the lowest possible VF when
16685 updating the upper bounds of the loop.
16686 (vect_min_worthwhile_factor): Make static. Return an unsigned int
16687 rather than an int.
16688 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
16689 polynomial unroll factors.
16690 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
16691 (vect_make_slp_decision): Likewise.
16692 (vect_supported_load_permutation_p): Likewise, and polynomial
16694 (vect_analyze_slp_cost): Handle polynomial vf.
16695 (vect_slp_analyze_node_operations): Likewise.
16696 (vect_slp_analyze_bb_1): Likewise.
16697 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
16698 than an unsigned HOST_WIDE_INT.
16699 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
16700 (vectorizable_load): Handle polynomial vf.
16701 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
16703 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
16705 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16706 Alan Hayward <alan.hayward@arm.com>
16707 David Sherwood <david.sherwood@arm.com>
16709 * match.pd: Handle bit operations involving three constants
16710 and try to fold one pair.
16712 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16714 * tree-vect-loop-manip.c: Include gimple-fold.h.
16715 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
16716 niters_maybe_zero parameters. Handle other cases besides a step of 1.
16717 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
16718 Add a path that uses a step of VF instead of 1, but disable it
16720 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
16721 and niters_no_overflow parameters. Update calls to
16722 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
16723 Create a new SSA name if the latter choses to use a ste other
16724 than zero, and return it via niters_vector_mult_vf_var.
16725 * tree-vect-loop.c (vect_transform_loop): Update calls to
16726 vect_do_peeling, vect_gen_vector_loop_niters and
16727 slpeel_make_loop_iterate_ntimes.
16728 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
16729 (vect_gen_vector_loop_niters): Update declarations after above changes.
16731 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
16733 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
16734 128-bit round to integer instructions.
16735 (ceil<mode>2): Likewise.
16736 (btrunc<mode>2): Likewise.
16737 (round<mode>2): Likewise.
16739 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16741 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
16742 unaligned VSX load/store on P8/P9.
16743 (expand_block_clear): Allow the use of unaligned VSX
16744 load/store on P8/P9.
16746 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16748 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
16750 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
16751 swap associated with both a load and a store.
16753 2018-01-02 Andrew Waterman <andrew@sifive.com>
16755 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
16756 * config/riscv/riscv.md (clear_cache): Use it.
16758 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
16760 * web.c: Remove out-of-date comment.
16762 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16764 * expr.c (fixup_args_size_notes): Check that any existing
16765 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
16766 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
16767 (emit_single_push_insn): ...here.
16769 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16771 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
16772 (const_vector_encoded_nelts): New function.
16773 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
16774 (const_vector_int_elt, const_vector_elt): Declare.
16775 * emit-rtl.c (const_vector_int_elt_1): New function.
16776 (const_vector_elt): Likewise.
16777 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
16778 of CONST_VECTOR_ELT.
16780 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16782 * expr.c: Include rtx-vector-builder.h.
16783 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
16784 directly on the tree encoding.
16785 (const_vector_from_tree): Likewise.
16786 * optabs.c: Include rtx-vector-builder.h.
16787 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
16788 sequence of "u" values.
16789 * vec-perm-indices.c: Include rtx-vector-builder.h.
16790 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
16791 directly on the vec_perm_indices encoding.
16793 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16795 * doc/rtl.texi (const_vector): Describe new encoding scheme.
16796 * Makefile.in (OBJS): Add rtx-vector-builder.o.
16797 * rtx-vector-builder.h: New file.
16798 * rtx-vector-builder.c: Likewise.
16799 * rtl.h (rtx_def::u2): Add a const_vector field.
16800 (CONST_VECTOR_NPATTERNS): New macro.
16801 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
16802 (CONST_VECTOR_DUPLICATE_P): Likewise.
16803 (CONST_VECTOR_STEPPED_P): Likewise.
16804 (CONST_VECTOR_ENCODED_ELT): Likewise.
16805 (const_vec_duplicate_p): Check for a duplicated vector encoding.
16806 (unwrap_const_vec_duplicate): Likewise.
16807 (const_vec_series_p): Check for a non-duplicated vector encoding.
16808 Say that the function only returns true for integer vectors.
16809 * emit-rtl.c: Include rtx-vector-builder.h.
16810 (gen_const_vec_duplicate_1): Delete.
16811 (gen_const_vector): Call gen_const_vec_duplicate instead of
16812 gen_const_vec_duplicate_1.
16813 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
16814 (gen_const_vec_duplicate): Use rtx_vector_builder.
16815 (gen_const_vec_series): Likewise.
16816 (gen_rtx_CONST_VECTOR): Likewise.
16817 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
16818 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
16819 Build a new vector rather than modifying a CONST_VECTOR in-place.
16820 (handle_special_swappables): Update call accordingly.
16821 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
16822 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
16823 Build a new vector rather than modifying a CONST_VECTOR in-place.
16824 (handle_special_swappables): Update call accordingly.
16826 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16828 * simplify-rtx.c (simplify_const_binary_operation): Use
16829 CONST_VECTOR_ELT instead of XVECEXP.
16831 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16833 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
16834 the selector elements to be different from the data elements
16835 if the selector is a VECTOR_CST.
16836 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
16837 ssizetype for the selector.
16839 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16841 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
16842 before testing each element individually.
16843 * tree-vect-generic.c (lower_vec_perm): Likewise.
16845 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16847 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
16848 * selftest-run-tests.c (selftest::run_tests): Call it.
16849 * vector-builder.h (vector_builder::operator ==): New function.
16850 (vector_builder::operator !=): Likewise.
16851 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
16852 (vec_perm_indices::all_from_input_p): New function.
16853 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
16854 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
16855 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
16856 instead of reading the VECTOR_CST directly. Detect whether both
16857 vector inputs are the same before constructing the vec_perm_indices,
16858 and update the number of inputs argument accordingly. Use the
16859 utility functions added above. Only construct sel2 if we need to.
16861 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16863 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
16864 the broadcast of the low byte.
16865 (expand_mult_highpart): Use an explicit encoding for the permutes.
16866 * optabs-query.c (can_mult_highpart_p): Likewise.
16867 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
16868 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
16869 (vectorizable_bswap): Likewise.
16870 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
16871 explicit encoding for the power-of-2 permutes.
16872 (vect_permute_store_chain): Likewise.
16873 (vect_grouped_load_supported): Likewise.
16874 (vect_permute_load_chain): Likewise.
16876 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16878 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
16879 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
16880 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
16881 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
16882 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
16883 (vect_gen_perm_mask_any): Likewise.
16885 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16887 * int-vector-builder.h: New file.
16888 * vec-perm-indices.h: Include int-vector-builder.h.
16889 (vec_perm_indices): Redefine as an int_vector_builder.
16890 (auto_vec_perm_indices): Delete.
16891 (vec_perm_builder): Redefine as a stand-alone class.
16892 (vec_perm_indices::vec_perm_indices): New function.
16893 (vec_perm_indices::clamp): Likewise.
16894 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
16895 (vec_perm_indices::new_vector): New function.
16896 (vec_perm_indices::new_expanded_vector): Update for new
16897 vec_perm_indices class.
16898 (vec_perm_indices::rotate_inputs): New function.
16899 (vec_perm_indices::all_in_range_p): Operate directly on the
16900 encoded form, without computing elided elements.
16901 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
16902 encoding. Update for new vec_perm_indices class.
16903 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
16904 the given vec_perm_builder.
16905 (expand_vec_perm_var): Update vec_perm_builder constructor.
16906 (expand_mult_highpart): Use vec_perm_builder instead of
16907 auto_vec_perm_indices.
16908 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
16909 vec_perm_indices instead of auto_vec_perm_indices. Use a single
16910 or double series encoding as appropriate.
16911 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
16912 vec_perm_indices instead of auto_vec_perm_indices.
16913 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16914 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
16915 (vect_permute_store_chain): Likewise.
16916 (vect_grouped_load_supported): Likewise.
16917 (vect_permute_load_chain): Likewise.
16918 (vect_shift_permute_load_chain): Likewise.
16919 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
16920 (vect_transform_slp_perm_load): Likewise.
16921 (vect_schedule_slp_instance): Likewise.
16922 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
16923 (vectorizable_mask_load_store): Likewise.
16924 (vectorizable_bswap): Likewise.
16925 (vectorizable_store): Likewise.
16926 (vectorizable_load): Likewise.
16927 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
16928 vec_perm_indices instead of auto_vec_perm_indices. Use
16929 tree_to_vec_perm_builder to read the vector from a tree.
16930 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
16931 vec_perm_builder instead of a vec_perm_indices.
16932 (have_whole_vector_shift): Use vec_perm_builder and
16933 vec_perm_indices instead of auto_vec_perm_indices. Leave the
16934 truncation to calc_vec_perm_mask_for_shift.
16935 (vect_create_epilog_for_reduction): Likewise.
16936 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
16937 from auto_vec_perm_indices to vec_perm_indices.
16938 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
16939 instead of changing individual elements.
16940 (aarch64_vectorize_vec_perm_const): Use new_vector to install
16941 the vector in d.perm.
16942 * config/arm/arm.c (expand_vec_perm_d::perm): Change
16943 from auto_vec_perm_indices to vec_perm_indices.
16944 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
16945 instead of changing individual elements.
16946 (arm_vectorize_vec_perm_const): Use new_vector to install
16947 the vector in d.perm.
16948 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
16949 Update vec_perm_builder constructor.
16950 (rs6000_expand_interleave): Likewise.
16951 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
16952 (rs6000_expand_interleave): Likewise.
16954 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16956 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
16957 to qimode could truncate the indices.
16958 * optabs.c (expand_vec_perm_var): Likewise.
16960 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
16962 * Makefile.in (OBJS): Add vec-perm-indices.o.
16963 * vec-perm-indices.h: New file.
16964 * vec-perm-indices.c: Likewise.
16965 * target.h (vec_perm_indices): Replace with a forward class
16967 (auto_vec_perm_indices): Move to vec-perm-indices.h.
16968 * optabs.h: Include vec-perm-indices.h.
16969 (expand_vec_perm): Delete.
16970 (selector_fits_mode_p, expand_vec_perm_var): Declare.
16971 (expand_vec_perm_const): Declare.
16972 * target.def (vec_perm_const_ok): Replace with...
16973 (vec_perm_const): ...this new hook.
16974 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
16975 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
16976 * doc/tm.texi: Regenerate.
16977 * optabs.def (vec_perm_const): Delete.
16978 * doc/md.texi (vec_perm_const): Likewise.
16979 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
16980 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
16981 expand_vec_perm for constant permutation vectors. Assert that
16982 the mode of variable permutation vectors is the integer equivalent
16983 of the mode that is being permuted.
16984 * optabs-query.h (selector_fits_mode_p): Declare.
16985 * optabs-query.c: Include vec-perm-indices.h.
16986 (selector_fits_mode_p): New function.
16987 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
16988 is defined, instead of checking whether the vec_perm_const_optab
16989 exists. Use targetm.vectorize.vec_perm_const instead of
16990 targetm.vectorize.vec_perm_const_ok. Check whether the indices
16991 fit in the vector mode before using a variable permute.
16992 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
16993 vec_perm_indices instead of an rtx.
16994 (expand_vec_perm): Replace with...
16995 (expand_vec_perm_const): ...this new function. Take the selector
16996 as a vec_perm_indices rather than an rtx. Also take the mode of
16997 the selector. Update call to shift_amt_for_vec_perm_mask.
16998 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
16999 Use vec_perm_indices::new_expanded_vector to expand the original
17000 selector into bytes. Check whether the indices fit in the vector
17001 mode before using a variable permute.
17002 (expand_vec_perm_var): Make global.
17003 (expand_mult_highpart): Use expand_vec_perm_const.
17004 * fold-const.c: Includes vec-perm-indices.h.
17005 * tree-ssa-forwprop.c: Likewise.
17006 * tree-vect-data-refs.c: Likewise.
17007 * tree-vect-generic.c: Likewise.
17008 * tree-vect-loop.c: Likewise.
17009 * tree-vect-slp.c: Likewise.
17010 * tree-vect-stmts.c: Likewise.
17011 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
17013 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
17014 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
17015 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
17016 (aarch64_vectorize_vec_perm_const): ...this new function.
17017 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17018 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17019 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
17020 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
17021 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17022 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17023 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
17025 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
17026 check for NEON modes.
17027 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
17028 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
17029 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
17030 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
17032 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
17033 the old VEC_PERM_CONST conditions.
17034 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
17035 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
17036 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
17037 (ia64_vectorize_vec_perm_const_ok): Merge into...
17038 (ia64_vectorize_vec_perm_const): ...this new function.
17039 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
17040 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
17041 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
17042 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
17043 * config/mips/mips.c (mips_expand_vec_perm_const)
17044 (mips_vectorize_vec_perm_const_ok): Merge into...
17045 (mips_vectorize_vec_perm_const): ...this new function.
17046 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
17047 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
17048 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
17049 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
17050 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
17051 (rs6000_expand_vec_perm_const): Delete.
17052 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
17054 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17055 (altivec_expand_vec_perm_const_le): Take each operand individually.
17056 Operate on constant selectors rather than rtxes.
17057 (altivec_expand_vec_perm_const): Likewise. Update call to
17058 altivec_expand_vec_perm_const_le.
17059 (rs6000_expand_vec_perm_const): Delete.
17060 (rs6000_vectorize_vec_perm_const_ok): Delete.
17061 (rs6000_vectorize_vec_perm_const): New function.
17062 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
17063 an element count and rtx array.
17064 (rs6000_expand_extract_even): Update call accordingly.
17065 (rs6000_expand_interleave): Likewise.
17066 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
17067 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
17068 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
17069 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
17070 (rs6000_expand_vec_perm_const): Delete.
17071 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17072 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17073 (altivec_expand_vec_perm_const_le): Take each operand individually.
17074 Operate on constant selectors rather than rtxes.
17075 (altivec_expand_vec_perm_const): Likewise. Update call to
17076 altivec_expand_vec_perm_const_le.
17077 (rs6000_expand_vec_perm_const): Delete.
17078 (rs6000_vectorize_vec_perm_const_ok): Delete.
17079 (rs6000_vectorize_vec_perm_const): New function. Remove stray
17080 reference to the SPE evmerge intructions.
17081 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
17082 an element count and rtx array.
17083 (rs6000_expand_extract_even): Update call accordingly.
17084 (rs6000_expand_interleave): Likewise.
17085 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
17086 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
17088 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17090 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17092 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
17093 vector mode and that that mode matches the mode of the data
17095 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
17096 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
17097 directly using expand_vec_perm_1 when forcing selectors into
17099 (expand_vec_perm_var): New function, split out from expand_vec_perm.
17101 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17103 * optabs-query.h (can_vec_perm_p): Delete.
17104 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
17105 * optabs-query.c (can_vec_perm_p): Split into...
17106 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
17107 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
17108 particular selector is valid.
17109 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17110 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17111 (vect_grouped_load_supported): Likewise.
17112 (vect_shift_permute_load_chain): Likewise.
17113 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
17114 (vect_transform_slp_perm_load): Likewise.
17115 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17116 (vectorizable_bswap): Likewise.
17117 (vect_gen_perm_mask_checked): Likewise.
17118 * fold-const.c (fold_ternary_loc): Likewise. Don't take
17119 implementations of variable permutation vectors into account
17120 when deciding which selector to use.
17121 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
17122 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
17123 with a false third argument.
17124 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
17125 to test whether the constant selector is valid and can_vec_perm_var_p
17126 to test whether a variable selector is valid.
17128 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17130 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
17131 * optabs-query.c (can_vec_perm_p): Likewise.
17132 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
17133 instead of vec_perm_indices.
17134 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
17135 (vect_gen_perm_mask_checked): Likewise,
17136 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
17137 (vect_gen_perm_mask_checked): Likewise,
17139 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17141 * optabs-query.h (qimode_for_vec_perm): Declare.
17142 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
17143 (qimode_for_vec_perm): ...this new function.
17144 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
17146 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17148 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
17149 does not have a conditional at the top.
17151 2018-01-02 Richard Biener <rguenther@suse.de>
17153 * ipa-inline.c (big_speedup_p): Fix expression.
17155 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
17158 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
17161 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
17165 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
17166 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
17167 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
17168 cond_taken_branch_cost 3->4.
17170 2018-01-01 Jakub Jelinek <jakub@redhat.com>
17172 PR tree-optimization/83581
17173 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
17174 TODO_cleanup_cfg if any changes have been made.
17176 PR middle-end/83608
17177 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
17178 convert_modes if target mode has the right side, but different mode
17181 PR middle-end/83609
17182 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
17183 last argument when extracting from CONCAT. If either from_real or
17184 from_imag is NULL, use expansion through memory. If result is not
17185 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
17186 the parts directly to inner mode, if even that fails, use expansion
17189 PR middle-end/83623
17190 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
17191 check for bswap in mode rather than HImode and use that in expand_unop
17194 Copyright (C) 2018 Free Software Foundation, Inc.
17196 Copying and distribution of this file, with or without modification,
17197 are permitted in any medium without royalty provided the copyright
17198 notice and this notice are preserved.