* doc/install.texi (Prerequisites): Update link for MPC.
[official-gcc.git] / gcc / ChangeLog
blob9864c31bff4fb0dec9d4f550763d6ba35119bbbe
1 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
3         * doc/install.texi (Prerequisites): Update link for MPC.
5 2018-09-01  Michael Matz  <matz@suse.de>
7         PR tree-optimization/87074
8         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
9         PHIs for outer-loop uses.
11 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
13         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
14         * doc/invoke.texi (C Dialect Options): Ditto.
16 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
17         
18         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
20 2018-08-31  Richard Biener  <rguenther@suse.de>
22         PR tree-optimization/87168
23         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
24         (rpo_elim::eliminate_avail): When OP was not visited it must
25         be available.
27 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
29         * tree-vrp.c (copy_value_range): Convert param "from" from
30         "value_range *" to "const value_range *".
31         (range_is_null): Likewise for param "vr".
32         (range_int_cst_p): Likewise.
33         (range_int_cst_singleton_p): Likewise.
34         (symbolic_range_p): Likewise.
35         (value_ranges_intersect_p): Likewise for both params.
36         (value_range_nonnegative_p): Likewise for param "vr".
37         (value_range_constant_singleton): Likewise.
38         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
39         (extract_range_into_wide_ints): Likewise for param "vr".
40         (extract_range_from_multiplicative_op): Likewise for params "vr0"
41         and "vr1".
42         (vrp_can_optimize_bit_op): Likewise.
43         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
44         "vr1_".
45         (extract_range_from_unary_expr): Likewise.
46         (debug_value_range): Likewise for param "vr".
47         (value_range::dump): Add "const" qualifier.
48         (vrp_prop::check_array_ref): Convert local "vr" from
49         "value_range *" to "const value_range *".
50         (vrp_prop::check_mem_ref): Likewise.
51         (vrp_prop::visit_stmt): Likewise for local "old_vr".
52         (vrp_intersect_ranges_1): Likewise for param "vr_1".
53         (vrp_intersect_ranges): Likewise.
54         (simplify_stmt_for_jump_threading): Likewise for local "vr".
55         (vrp_prop::vrp_finalize): Likewise.
56         * tree-vrp.h (value_range::dump): Add "const" qualifier.
57         (vrp_intersect_ranges): Add "const" qualifier to params as above.
58         (extract_range_from_unary_expr): Likewise.
59         (value_range_constant_singleton): Likewise.
60         (symbolic_range_p): Likewise.
61         (copy_value_range): Likewise.
62         (extract_range_from_binary_expr_1): Likewise.
63         (range_int_cst_p): Likewise.
64         (vrp_set_zero_nonzero_bits): Likewise.
65         (range_int_cst_singleton_p): Likewise.
67 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
69         * config/aarch64/arm_neon.h (vabsd_s64): New.
70         (vnegd_s64): Likewise.
72 2018-08-31  Martin Jambor  <mjambor@suse.cz>
74         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
76 2018-08-31  Martin Liska  <mliska@suse.cz>
78         * ipa-icf.c (sem_item::add_type): Use
79         sem_item::m_type_hash_cache.
80         * ipa-icf.h: Move the cache from sem_item_optimizer
81         to sem_item.
83 2018-08-31  Nathan Sidwell  <nathan@acm.org>
85         * doc/extend.texi (Backwards Compatibility): Remove implicit
86         extern C leeway of () being (...).
88 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
90         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
92 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
94         PR target/86684
95         PR target/87149
96         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
98 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
100         PR middle-end/87138
101         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
102         gen_int_mode.  Formatting fixes.
104 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
106         * target.def (custom_function_descriptors): Improve documentation.
107         * doc/tm.texi.in (Trampolines): Expand discussion of function
108         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
109         beginning of the section.
110         * doc/tm.texi: Regenerated.
112 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
114         * cfg.h (class auto_edge_flag): Spell out the template-id of the
115         base class in the initializer list.  This is a workaround for
116         building with older GCC.
117         (class auto_bb_flag): Likewise.
119 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
121         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
122         (altivec_vcmpequ<VI_char>_p): Remove star.
123         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
124         vector load modes.
125         (expand_strncmp_vec_sequence): New function.
126         (emit_final_str_compare_vec): New function.
127         (expand_strn_compare): Add support for vector strncmp.
128         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
129         length specification to bytes.
130         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
131         (vcmpnezb_p): New pattern.
132         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
133         for option -mstring-compare-inline-limit.
135 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
137         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
138         (PTA_SKYLAKE): Add PTA_AES.
139         (PTA_GOLDMONT): Likewise.
141 2018-08-29  Jan Hubicka  <jh@suse.cz>
143         PR lto/86517
144         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
145         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
147 2018-08-29  Jan Hubicka  <jh@suse.cz>
149         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
150         TYPE_STUB_DECL.
151         (hash_tree): Do not visit TYPE_STUB_DECL.
152         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
153         stream TYPE_STUB_DECL.
154         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
155         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
156         after free_lang_data.
157         (type_in_anonymous_namespace_p): Likewise.
159 2018-08-29  Jan Hubicka  <jh@suse.cz>
161         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
162         comment that it has to be even number.
163         (class sreal): Change m_sig type to int32_t.
164         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
165         int64_t for temporary calculations.
166         (sreal_verify_basics): Drop one bit from minimum and maximum.
168 2018-08-30  Richard Biener  <rguenther@suse.de>
170         PR tree-optimization/87147
171         * tree-ssa-sccvn.c (SSA_VISITED): New function.
172         (visit_phi): When the degenerate result is from the backedge and
173         we didn't visit its definition yet drop to VARYING.
174         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
176 2018-08-29  Jan Hubicka  <jh@suse.cz>
178         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
179         DECL_VINDEX.
180         (hash_tree): Likewise.
182 2018-08-29  Jan Hubicka  <jh@suse.cz>
184         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
185         and TYPE_NEXT_REF_TO.
187 2018-08-29  Jan Hubicka  <jh@suse.cz>
189         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
190         comment that it has to be even number.
191         (class sreal): Change m_sig type to int32_t.
192         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
193         int64_t for temporary calculations.
194         (sreal_verify_basics): Drop one bit from minimum and maximum.
196 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
198         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
200 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
202         PR middle-end/86995
203         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
204         if to_add is negative.
206 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
208         PR middle-end/87053
209         * builtins.c (c_strlen): Improve range checks.
211 2018-08-29  Martin Sebor  <msebor@redhat.com>
212             Jeff Law  <law@redhat.com>
214         PR tree-optimization/86714
215         PR tree-optimization/86711
216         * builtins.c (c_strlen): Add arguments to call to string_constant.
217         * expr.c (string_constant): Add argument.  Detect missing nul
218         terminator and outermost declaration it's missing in.
219         * expr.h (string_constant): Add argument.
220         * fold-const.c (read_from_constant_string): Add arguments to call to
221         string_constant.
222         (c_getstr): Likewise.
223         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
224         to string_constant.
225         * tree-ssa-strlen.c (get_stridx): Likewise.
227 2018-08-29  Jan Hubicka  <jh@suse.cz>
229         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
230         Do not stream DECL_VINDEX.
231         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
232         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
233         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
235 2018-08-29  Richard Biener  <rguenther@suse.de>
237         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
238         virtual operands that are not default defs to honor region
239         boundaries.
240         (rpo_vn_valueize): Remove ineffective code here.
242 2018-08-29  Richard Biener  <rguenther@suse.de>
244         PR tree-optimization/87132
245         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
246         when skipping defs reachable over backedges.
248 2018-08-29  Richard Biener  <rguenther@suse.de>
250         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
251         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
252         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
253         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
254         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
255         (vn_reference_lookup_3): Remove use of const_parms.
256         (free_rpo_vn): Do not free const_parms.
257         (do_rpo_vn): Do not call init_const_parms.
258         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
259         SSA_NAME_POINTS_TO_READONLY_MEMORY.
260         (call_may_clobber_ref_p_1): Likewise.
262 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
264         PR other/86726
265         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
266         (-O): Ditto.
267         (-ftree-scev-cprop): Document.
269 2018-08-29  Jan Hubicka  <jh@suse.cz>
271         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
272         parameters.
273         (sreal constructor): Update.
274         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
275         sreal:operator/): Update.
277 2018-08-29  Martin Liska  <mliska@suse.cz>
279         * tree-switch-conversion.c (switch_conversion::expand):
280         Strenghten assumption about gswitch statements.
282 2018-08-29  Richard Biener  <rguenther@suse.de>
284         PR tree-optimization/87117
285         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
286         re-value-number released SSA VDEFs.
288 2018-08-29  Richard Biener  <rguenther@suse.de>
290         PR tree-optimization/87126
291         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
293 2018-08-28  Jim Wilson  <jimw@sifive.com>
295         * config/riscv/pic.md: Rewrite.
296         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
297         invalid address.
298         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
299         (SOFTF, default_load, softload, softstore): New.
301 2018-08-28  Jeff Law  <law@redhat.com>
303         * fold-const.c (fold_binary_loc): Remove recently added assert.
305 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
307         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
308         to OP parmeter of generated function.
310 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
312         PR tree-optimization/87009
313         * match.pd: Add boolean optimizations.
315 2018-08-28  Martin Sebor  <msebor@redhat.com>
317         PR middle-end/86631
318         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
319         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
320         (pass_walloca::gate): Use it.
321         (alloca_call_type): Same.
322         (pass_walloca::execute): Same.
323         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
325 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
327         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
328         GCC_VERSION for usage of "__gcc_dump_printf__" format from
329         >= 3005 to >= 9000.
331 2018-08-28  Richard Biener  <rguenther@suse.de>
333         PR tree-optimization/87124
334         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
335         constants before looking up avail.
337 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
339         PR middle-end/87099
340         * calls.c (maybe_warn_nonstring_arg): Punt early if
341         warn_stringop_overflow is zero.  Don't call get_range_strlen
342         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
343         Swap comparison operands to have constants on rhs.  Only use
344         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
345         increment lenrng[0].
347 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
349         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
350         use of tree_to_shwi.  Remove duplicated test for the size being
351         a whole number of bytes.
353 2018-08-28  Richard Biener  <rguenther@suse.de>
355         PR tree-optimization/87117
356         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
357         Handle removed stmt without LHS (GIMPLE_NOP).
359 2018-08-28  Richard Biener  <rguenther@suse.de>
361         PR tree-optimization/87117
362         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
363         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
365 2018-08-28  Richard Biener  <rguenther@suse.de>
367         PR tree-optimization/87117
368         * tree-ssa-pre.c (compute_avail): Do not make expressions
369         with predicated values available.
370         (get_expr_value_id): Assert we do not run into predicated value
371         expressions.
373 2018-08-28  Richard Biener  <rguenther@suse.de>
375         PR tree-optimization/87117
376         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
377         get virtual operands.
378         (get_expr_operands): Handle STRING_CST like other decls.
380 2018-08-28  Martin Liska  <mliska@suse.cz>
382         * tree.h: Update documentation of fndecl_built_in_p
383         functions.
386 2018-08-27  Jeff Law  <law@redhat.com>
387         PR tree-optimization/87110
388         * tree-ssa-dse.c (compute_trims): Handle non-constant
389         TYPE_SIZE_UNIT.
391 2018-08-27  Martin Sebor  <msebor@redhat.com>
393         PR tree-optimization/86914
394         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
396 2018-08-27  Martin Sebor  <msebor@redhat.com>
398         PR tree-optimization/87112
399         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
400         the type of the bound argument.
402 2018-08-27  Jeff Law  <law@redhat.com>
404         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
405         type does not have a TYPE_SIZE_UNIT.
407 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
409         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
410         with include of backend.h.
412 2018-08-27  Richard Biener  <rguenther@suse.de>
414         PR tree-optimization/86927
415         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
416         use const cond reduction code.
418 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
420         PR tree-optimization/85758
421         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
423 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
425         PR c++/87091
426         * diagnostic-show-locus.c (class layout_range): Update for
427         conversion of show_caret_p to a tri-state.
428         (layout_range::layout_range): Likewise.
429         (make_range): Likewise.
430         (layout::maybe_add_location_range): Likewise.
431         (layout::should_print_annotation_line_p): Don't show annotation
432         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
433         (layout::get_state_at_point): Update for conversion of
434         show_caret_p to a tri-state.  Bail out early for
435         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
436         underlining or source colorization.
437         (gcc_rich_location::add_location_if_nearby): Update for conversion
438         of show_caret_p to a tri-state.
439         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
440         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
441         Likewise.
442         (selftest::test_one_liner_labels): Likewise.
443         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
444         conversion of show_caret_p to a tri-state.
445         * pretty-print.c (text_info::set_location): Likewise.
446         * pretty-print.h (text_info::set_location): Likewise.
447         * substring-locations.c (format_warning_n_va): Likewise.
448         * tree-diagnostic.c (default_tree_printer): Likewise.
449         * tree-pretty-print.c (newline_and_indent): Likewise.
451 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
453         PR c++/87091
454         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
455         line above for line-insertion fix-it hints.
456         (selftest::test_fixit_insert_containing_newline): Update the
457         expected results, and add a test with line-numbering enabled.
459 2018-08-27  Martin Liska  <mliska@suse.cz>
461         PR sanitizer/86962
462         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
463         params with DECL_HAS_VALUE_EXPR_P.
465 2018-08-27  Martin Liska  <mliska@suse.cz>
467         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
468         selected expansion strategy.
470 2018-08-27  Martin Liska  <mliska@suse.cz>
472         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
473         * builtins.c (is_builtin_fn): Likewise.
474         * attribs.c (diag_attr_exclusions): Use new function
475         fndecl_built_in_p and remove check for FUNCTION_DECL if
476         possible.
477         (builtin_mathfn_code): Likewise.
478         (fold_builtin_expect): Likewise.
479         (fold_call_expr): Likewise.
480         (fold_builtin_call_array): Likewise.
481         (fold_call_stmt): Likewise.
482         (set_builtin_user_assembler_name): Likewise.
483         (is_simple_builtin): Likewise.
484         * calls.c (gimple_alloca_call_p): Likewise.
485         (maybe_warn_nonstring_arg): Likewise.
486         * cfgexpand.c (expand_call_stmt): Likewise.
487         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
488         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
489         (cgraph_node::verify_node): Likewise.
490         * cgraphclones.c (build_function_decl_skip_args): Likewise.
491         (cgraph_node::create_clone): Likewise.
492         * config/arm/arm.c (arm_insert_attributes): Likewise.
493         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
494         * dse.c (scan_insn): Likewise.
495         * expr.c (expand_expr_real_1): Likewise.
496         * fold-const.c (operand_equal_p): Likewise.
497         (fold_binary_loc): Likewise.
498         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
499         * gimple-low.c (lower_stmt): Likewise.
500         * gimple-pretty-print.c (dump_gimple_call): Likewise.
501         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
502         * gimple.c (gimple_build_call_from_tree): Likewise.
503         (gimple_call_builtin_p): Likewise.
504         (gimple_call_combined_fn): Likewise.
505         * gimplify.c (gimplify_call_expr): Likewise.
506         (gimple_boolify): Likewise.
507         (gimplify_modify_expr): Likewise.
508         (gimplify_addr_expr): Likewise.
509         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
510         * ipa-cp.c (determine_versionability): Likewise.
511         * ipa-fnsummary.c (compute_fn_summary): Likewise.
512         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
513         * ipa-split.c (visit_bb): Likewise.
514         (split_function): Likewise.
515         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
516         * lto-cgraph.c (input_node): Likewise.
517         * lto-streamer-out.c (write_symbol): Likewise.
518         * omp-low.c (setjmp_or_longjmp_p): Likewise.
519         (lower_omp_1): Likewise.
520         * predict.c (strip_predict_hints): Likewise.
521         * print-tree.c (print_node): Likewise.
522         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
523         * trans-mem.c (is_tm_irrevocable): Likewise.
524         (is_tm_load): Likewise.
525         (is_tm_simple_load): Likewise.
526         (is_tm_store): Likewise.
527         (is_tm_simple_store): Likewise.
528         (is_tm_abort): Likewise.
529         (tm_region_init_1): Likewise.
530         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
531         * tree-cfg.c (verify_gimple_call): Likewise.
532         (move_stmt_r): Likewise.
533         (stmt_can_terminate_bb_p): Likewise.
534         * tree-eh.c (lower_eh_constructs_2): Likewise.
535         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
536         * tree-inline.c (remap_gimple_stmt): Likewise.
537         (copy_bb): Likewise.
538         (estimate_num_insns): Likewise.
539         (fold_marked_statements): Likewise.
540         * tree-sra.c (scan_function): Likewise.
541         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
542         (optimize_stack_restore): Likewise.
543         (pass_fold_builtins::execute): Likewise.
544         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
545         (mark_all_reaching_defs_necessary_1): Likewise.
546         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
547         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
548         (pass_forwprop::execute): Likewise.
549         * tree-ssa-loop-im.c (stmt_cost): Likewise.
550         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
551         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
552         * tree-ssa-strlen.c (get_string_length): Likewise.
553         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
554         (find_func_aliases_for_call): Likewise.
555         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
556         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
557         * tree-tailcall.c (find_tail_calls): Likewise.
558         * tree.c (need_assembler_name_p): Likewise.
559         (free_lang_data_in_decl): Likewise.
560         (get_call_combined_fn): Likewise.
561         * ubsan.c (is_ubsan_builtin_p): Likewise.
562         * varasm.c (incorporeal_function_p): Likewise.
563         * tree.h (DECL_BUILT_IN): Remove and replace with
564         fndecl_built_in_p.
565         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
566         (fndecl_built_in_p): New.
568 2018-08-27  Martin Liska  <mliska@suse.cz>
570         PR tree-optimization/86847
571         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
572         Dump also subtree probability.
573         (switch_decision_tree::do_jump_if_equal): New function.
574         (switch_decision_tree::emit_case_nodes): Handle special
575         situations in balanced tree that can be emitted much simpler.
576         Fix calculation of probabilities that happen in tree expansion.
577         * tree-switch-conversion.h (struct cluster): Add
578         is_single_value_p.
579         (struct simple_cluster): Likewise.
580         (struct case_tree_node): Add new function has_child.
581         (do_jump_if_equal): New.
583 2018-08-27  Martin Liska  <mliska@suse.cz>
585         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
586         Add new argument to bit_test_cluster constructor.
587         (bit_test_cluster::emit): Set bits really number of values
588         handlel by a test.
589         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
590         probability argument.
591         * tree-switch-conversion.h (struct bit_test_cluster):
592         Add m_handles_entire_switch.
594 2018-08-27  Martin Liska  <mliska@suse.cz>
596         PR tree-optimization/86702
597         * tree-switch-conversion.c (jump_table_cluster::emit):
598         Make probabilities even for values in jump table
599         according to number of cases handled.
600         (switch_decision_tree::compute_cases_per_edge): Pass
601         argument to reset_out_edges_aux function.
602         (switch_decision_tree::analyze_switch_statement): Likewise.
603         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
604         Make it static.
606 2018-08-27  Martin Liska  <mliska@suse.cz>
608         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
609         cfun argument explicitly.
610         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
611         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
612         function gimple_switch_default_bb.
613         (convert_switch_statements):
614         (expand_builtins):
615         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
616         * stmt.c (label_to_block_fn): Use label_to_block and pass
617         cfun argument explicitly and use gimple_switch_label_bb.
618         (expand_case): Likewise.
619         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
620         cfun argument explicitly. Likewise.
621         (make_edges_bb): Likewise.
622         (make_cond_expr_edges): Likewise.
623         (get_cases_for_edge): Likewise.
624         (make_gimple_switch_edges): Likewise.
625         (label_to_block_fn): Likewise.
626         (label_to_block): Likewise.
627         (make_goto_expr_edges): Likewise.
628         (make_gimple_asm_edges): Likewise.
629         (main_block_label): Likewise.
630         (group_case_labels_stmt): Likewise.
631         (find_taken_edge_computed_goto): Likewise.
632         (find_taken_edge_switch_expr): Likewise.
633         (gimple_verify_flow_info): Likewise.
634         (gimple_redirect_edge_and_branch): Likewise.
635         (gimple_switch_label_bb): New function.
636         (gimple_switch_default_bb): Likewise.
637         (gimple_switch_edge): Likewise.
638         (gimple_switch_default_edge): Likewise.
639         * tree-cfg.h (label_to_block_fn): Remove and replace ...
640         (label_to_block): ... with this.
641         (gimple_switch_label_bb): New.
642         (gimple_switch_default_bb): Likewise.
643         (gimple_switch_edge): Likewise.
644         (gimple_switch_default_edge): Likewise.
645         * tree-cfgcleanup.c (convert_single_case_switch): Use
646         new gimple functions and pass new argument to label_to_block.
647         (cleanup_control_flow_bb):
648         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
649         cfun argument explicitly.
650         (make_eh_edges): Likewise.
651         (redirect_eh_dispatch_edge): Likewise.
652         (lower_resx): Likewise.
653         (lower_eh_dispatch): Likewise.
654         (maybe_remove_unreachable_handlers): Likewise.
655         (unsplit_eh): Likewise.
656         (cleanup_empty_eh): Likewise.
657         (verify_eh_edges): Likewise.
658         (verify_eh_dispatch_edge): Likewise.
659         * tree-ssa-dom.c (record_edge_info): Likewise.
660         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
661         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
662         (thread_through_normal_block): Likewise.
663         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
664         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
665         * tree-switch-conversion.c (switch_conversion::collect): Use new
666         gimple functions.
667         (switch_conversion::check_final_bb): Likewise.
668         (switch_conversion::gather_default_values): Pass new argument
669         to label_to_block.
670         (switch_conversion::build_constructors): Likewise.
671         (switch_decision_tree::compute_cases_per_edge): Use new
672         gimple_switch_edge function.
673         (switch_decision_tree::analyze_switch_statement): Pass new argument
674         to label_to_block.
675         (switch_decision_tree::try_switch_expansion): Use
676         gimple_switch_default_edge.
677         * tree-vrp.c (find_switch_asserts): Pass new argument
678         to label_to_block.
679         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
680         (vr_values::simplify_switch_using_ranges): Likewise.
682 2018-08-27  Richard Biener  <rguenther@suse.de>
684         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
685         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
687         * tree-ssa-sccvn.h (struct vn_pval): New structure.
688         (struct vn_nary_op_s): Add unwind_to member.  Add
689         predicated_values flag and put result into a union together
690         with a linked list of vn_pval.
691         (struct vn_ssa_aux): Add name member to make maintaining
692         a map of SSA name to vn_ssa_aux possible.  Remove no longer
693         needed info, dfsnum, low, visited, on_sccstack, use_processed
694         and range_info_anti_range_p members.
695         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
696         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
697         New functions.
698         (vn_valueize): New global.
699         (vn_context_bb): Likewise.
700         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
701         VN_INFO_PTR_INFO): Remove.
702         * tree-ssa-sccvn.c: ... (rewrite)
703         (pass_fre::execute): For -O2+ initialize loops and run
704         RPO VN in optimistic mode (iterating).  For -O1 and -Og
705         run RPO VN in non-optimistic mode.
706         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
707         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
708         * doc/invoke.texi (sccvn-max-scc-size): Remove.
709         (rpo-vn-max-loop-depth): Document.
710         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
711         when valuezing the VUSE signals we walked out of the region.
712         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
713         (phi_translate): Set VN context block to use for availability
714         lookup.
715         (compute_avail): Likewise.
716         (pre_valueize): New function.
717         (pass_pre::execute): Adjust to the RPO VN API.
719         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
720         (propagate_constants_for_unrolling): Remove.
721         (tree_unroll_loops_completely): Perform value-numbering
722         on the unrolled bodies loop parent.
724 2018-08-27  Richard Biener  <rguenther@suse.de>
726         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
727         for partial antic compute.
729 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
731         PR rtl-optimization/87065
732         * combine.c (simplify_if_then_else): Formatting fix.
733         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
734         check.
735         (known_cond): Don't return const_true_rtx for vector modes.  Use
736         CONST0_RTX instead of const0_rtx.  Formatting fixes.
738 2018-08-27  Martin Liska  <mliska@suse.cz>
740         PR gcov-profile/87069
741         * gcov.c (process_file): Record files already processed
742         and warn about a file being processed multiple times.
744 2018-08-27  Martin Liska  <mliska@suse.cz>
746         PR driver/83193
747         * config/aarch64/aarch64.c (aarch64_override_options_internal):
748         Set default values for x_aarch64_*_string strings.
749         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
750         prefix.  For -mabi do not print '=ABI' in help and use
751         <option_value> format for -msve-vector-bits and -moverride
752         options.
754 2018-08-26  Jeff Law  <law@redhat.com>
756         * config/mips/frame-header-opt.c: Include "backend.h" rather than
757         "cfg.h"
759 2018-08-26  Marek Polacek  <polacek@redhat.com>
761         PR c++/87029, Implement -Wredundant-move.
762         * doc/invoke.texi: Document -Wredundant-move.
764 2018-08-25  Martin Sebor  <msebor@redhat.com>
766         PR tree-optimization/87059
767         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
768         to the same type as the other.
769         * fold-const.c (fold_binary_loc): Assert expectation.
771 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
773         * config/darwin.c (machopic_legitimize_pic_address): Clean up
774         extraneous parentheses, dead code section and formatting.
776 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
778         PR c++/87091
779         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
780         wide enough for jumps in the line-numbering to be visible.
781         (layout::print_gap_in_line_numbering): New member function.
782         (layout::calculate_line_spans): When using line numbering, merge
783         line spans that are only 1 line apart.
784         (diagnostic_show_locus): When printing line numbers, show gaps in
785         line numbering directly, rather than printing headers.
786         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
787         line-numbering with multiple line spans.
788         (selftest::test_fixit_insert_containing_newline_2): Add test of
789         line-numbering, in which the spans are close enough to be merged.
791 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
793         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
794         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
795         * tree-vrp.c (range_is_nonnull): Remove.
796         (range_includes_zero_p): Accept value_range instead of min/max.
797         (extract_range_from_binary_expr_1): Do not early bail on
798         POINTER_PLUS_EXPR.
799         Use range_includes_zero_p instead of range_is_nonnull.
800         (extract_range_from_unary_expr): Use range_includes_zero_p instead
801         of range_is_nonnull.
802         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
803         special case VR_ANTI_RANGE.
804         (vrp_finalize): Same.
805         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
806         instead of min/max.
807         (range_is_nonnull): Remove.
808         * vr-values.c (vrp_stmt_computes_nonzero): Use
809         range_includes_zero_p instead of range_is_nonnull.
810         (extract_range_basic): Pass value_range to range_includes_zero_p
811         instead of range_is_nonnull.
813 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
815         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
816         * emit-rtl.h (rtl_data): Remove return_bnd.
817         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
818         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
819         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
820         (POINTER_BOUNDS_MODE): Remove definition.
821         (make_pointer_bounds_mode): Remove.
822         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
823         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
824         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
825         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
826         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
827         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
828         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
830         * config/i386/i386-modes.def (BND32, BND64): Remove.
831         * config/i386/i386.c (dbx_register_map): Remove bound registers.
832         (dbx64_register_map): Ditto.
833         (svr4_dbx_register_map): Ditto.
834         (indirect_thunk_bnd_needed): Remove.
835         (indirect_thunks_bnd_used): Ditto.
836         (indirect_return_bnd_needed): Ditto.
837         (indirect_return_via_cx_bnd): Ditto.
838         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
839         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
840         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
841         (output_indirect_thunk_function): Remove handling of
842         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
843         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
844         (ix86_save_reg): Remove handling of crtl->return_bnd.
845         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
846         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
847         and UNSPEC_BNDLX_ADDR.
848         (ix86_output_indirect_branch_via_reg): Remove handling of
849         indirect_thunk_prefix_bnd.
850         (ix86_output_indirect_branch_via_push): Ditto.
851         (ix86_output_function_return): Ditto.
852         (ix86_output_indirect_function_return): Ditto.
853         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
854         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
855         (CALL_USED_REGISTERS): Ditto.
856         (REG_ALLOC_ORDER): Update for removal of bound registers.
857         (HI_REGISTER_NAMES): Ditto.
858         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
859         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
860         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
861         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
862         (FIRST_PSEUDO_REG): Update.
863         (BND): Remove mode iterator.
864         * config/i386/predicates.md (bnd_mem_operator): Remove.
866 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
868         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
869         vectors.
871 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
873         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
874         the case in which the permute needs only a single element and
875         repeats for every vector of the result.  Extend that case to
876         handle variable-length vectors.
877         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
879 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
881         PR debug/79342
882         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
883         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
885 2018-08-24  Richard Biener  <rguenther@suse.de>
887         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
888         bb_flags_allocated members.
889         (auto_flag): New RAII class for allocating flags.
890         (auto_edge_flag): New RAII class for allocating edge flags.
891         (auto_bb_flag): New RAII class for allocating bb flags.
892         * cfgloop.c (verify_loop_structure): Allocate temporary edge
893         flag dynamically.
894         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
895         in favor of temporarily allocated BB flag.
896         * hsa-brig.c: Re-order includes.
897         * hsa-dump.c: Likewise.
898         * hsa-regalloc.c: Likewise.
899         * print-rtl.c: Likewise.
900         * profile-count.c: Likewise.
902 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
904         PR target/86989
905         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
906         the TOC register.
908 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
910         PR 87073/bootstrap
911         * wide-int-range.cc (wide_int_range_div): Do not ignore result
912         from wide_int_range_multiplicative_op.
914 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
916         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
917         "permutaion".
919 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
921         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
922         to 'expanded'.
924 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
926         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
927         full GENERIC expression used for replacement.
929 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
931         * tree-vrp.c (abs_extent_range): Remove.
932         (extract_range_into_wide_ints): Pass wide ints by reference.
933         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
934         Pass wide ints by reference in all calls to
935         extract_range_into_wide_ints.
936         * wide-int-range.cc (wide_int_range_div): New.
937         * wide-int-range.h (wide_int_range_div): New.
938         (wide_int_range_includes_zero_p): New.
939         (wide_int_range_zero_p): New.
941 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
943         * config/aarch64/aarch64.md (arches): New enum.
944         (arch): New enum attr.
945         (arch_enabled): New attr.
946         (enabled): Now uses arch_enabled only.
947         (simd, sve, fp16): Removed attribute.
948         (fp): Attr now defined in terms of 'arch'.
949         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
950         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
951         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
952         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
953         attributes into 'arch'.
954         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
955         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
956         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
957         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
958         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
959         'simd' attribute into 'arch'.
960         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
961         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
962         Convert use of 'fp' attribute to 'arch'.
963         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
964         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
965         into 'arch'.
966         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
967         (different modes) Merge 'fp' and 'simd' into 'arch'.
968         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
969         'simd' into 'arch'.
971 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
973         PR rtl-optimization/87026
974         * expmed.c (canonicalize_comparison): If we can no longer create
975         pseudoregisters, don't.
977 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
979         PR target/86951
980         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
981         prototype.
982         * config/arm/arm.c (speculation_barrier_libfunc): New static
983         variable.
984         (arm_init_libfuncs): Initialize it.
985         (arm_emit_speculation_barrier): New function.
986         * config/arm/arm.md (speculation_barrier): Call
987         arm_emit_speculation_barrier for architectures that do not have
988         DSB or ISB.
989         (speculation_barrier_insn): Only match on Armv7 or later.
991 2018-08-23  Richard Biener  <rguenther@suse.de>
993         PR middle-end/87024
994         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
995         calls.
997 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
999         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1000         of single-vector TBLs.
1001         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1002         one input is given.
1004 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
1006         PR target/85910
1007         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1008         aarch64_evpc_tbl guard.
1010 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1012         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1013         behaviour.
1015 2018-08-22  Martin Sebor  <msebor@redhat.com>
1017         PR middle-end/87052
1018         * tree-pretty-print.c (pretty_print_string): Add argument.
1019         (dump_generic_node): Call to pretty_print_string with string size.
1021 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
1023         PR rtl-optimization/86771
1024         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1025         of two SETs into those two SETs, one to be placed at i2, if that SETs
1026         destination is modified between i2 and i3.
1028 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1030         PR tree-optimization/86725
1031         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1032         function.
1033         (vect_analyze_scalar_cycles_1): Check it.
1035 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1037         PR tree-optimization/86725
1038         * tree-vect-loop.c (vect_is_simple_reduction): When treating
1039         an outer loop phi as a double reduction, make sure that the
1040         single user of the phi result is an inner loop phi.
1042 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1044         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1045         grouped stores with gaps to a strided group.
1047 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1049         * tree-vect-stmts.c (get_group_load_store_type)
1050         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1051         first statement in a group.
1053 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1055         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1056         the sequence used in gcc/gcc.c.
1058 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1060         PR other/704
1061         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1062         building it.
1064 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1066         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1067         Darwin10-specific unwinder-shim.
1068         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1069         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC): 
1070         New to cater for Darwin10 Rosetta.
1072 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1074         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1075         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1077 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1079         PR bootstrap/81033
1080         PR target/81733
1081         PR target/52795
1082         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1083         (dwarf2out_switch_text_section): Generate a local label for the
1084         second function sub-section and apply it as the second FDE start
1085         label.
1086         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1087         second sub-section start.
1089 2018-08-22  Richard Biener  <rguenther@suse.de>
1091         PR tree-optimization/86988
1092         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1094 2018-08-22  Richard Biener  <rguenther@suse.de>
1096         PR tree-optimization/86945
1097         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1099 2018-08-22  Alexandre Oliva <oliva@adacore.com>
1101         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1102         a comment about how uses of r2 for .sdata2 come about.
1104 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
1106         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1108 2018-08-21  Marek Polacek  <polacek@redhat.com>
1110         PR c++/86981, Implement -Wpessimizing-move.
1111         * doc/invoke.texi: Document -Wpessimizing-move.
1113 2018-08-21  Jan Hubicka  <jh@suse.cz>
1115         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1116         * tree.h (is_redundant_typedef): Remove.
1117         * dwarf2out.c (is_redundant_typedef): Turn into static function.
1119 2018-08-21  Jan Hubicka  <jh@suse.cz>
1121         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1122         when possible.
1124 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
1126         * expmed.c (extract_low_bits): Reject invalid subregs early.
1128 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1130         PR middle-end/86121
1131         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1132         behaviour.
1134 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1136         * config/vxworks.h: Guard vxworks_asm_out_constructor and
1137         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1138         * config/vxworks.c: Likewise.
1140 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1142         * config/vxworks.c: Set targetm.have_ctors_dtors
1143         if HAVE_INITFINI_ARRAY_SUPPORT.
1144         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1145         if HAVE_INITFINI_ARRAY_SUPPORT.
1147 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1149         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1150         default search path for VxWorks < 7.
1152 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1154         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1155         (get_format_string): Refer to c_getstr.
1157 2018-08-21  Tom de Vries  <tdevries@suse.de>
1159         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1160         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1161         (debuginfo_early_stop): Declare.
1162         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1163         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1164         (debuginfo_early_stop): New function.
1165         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1166         and debuginfo_early_stop.
1167         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1168         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1169         (general_init): Call debuginfo_early_init.
1170         (finalize): Call debuginfo_fini.
1171         (do_compile): Call debuginfo_init.
1172         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1173         -fdump-early-debug.
1174         (@item -fdump-debug, @item -fdump-earlydebug): Add.
1176 2018-08-21  Tom de Vries  <tdevries@suse.de>
1178         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1179         flag_dump_noaddr and flag_dump_unnumbered.
1181 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
1183         * wide-int-range.cc (wide_int_range_abs): New.
1184         (wide_int_range_order_set): Rename from wide_int_range_min_max.
1185         * wide-int-range.h (wide_int_range_abs): New.
1186         (wide_int_range_min_max): New.
1187         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1188         case to call wide_int_range_abs.
1189         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1190         (extract_range_from_abs_expr): Delete.
1192 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
1194         PR target/87033
1195         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1196         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1197         for indexed loads.
1199 2018-08-20  Nathan Sidwell  <nathan@acm.org>
1200             Jeff Law <law@redhat.com>
1202         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1203         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1205 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
1207         PR other/84889
1208         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1209         (decl_attributes): Likewise.
1210         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1211         instance.
1212         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1213         * diagnostic-core.h (class auto_diagnostic_group): New class.
1214         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1215         (diagnostic_report_diagnostic): Handle the first diagnostics within
1216         a group.
1217         (emit_diagnostic): Add auto_diagnostic_group instance.
1218         (inform): Likewise.
1219         (inform_n): Likewise.
1220         (warning): Likewise.
1221         (warning_at): Likewise.
1222         (warning_n): Likewise.
1223         (pedwarn): Likewise.
1224         (permerror): Likewise.
1225         (error): Likewise.
1226         (error_n): Likewise.
1227         (error_at): Likewise.
1228         (sorry): Likewise.
1229         (fatal_error): Likewise.
1230         (internal_error): Likewise.
1231         (internal_error_no_backtrace): Likewise.
1232         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1233         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1234         * diagnostic.h (struct diagnostic_context): Add fields
1235         "diagnostic_group_nesting_depth",
1236         "diagnostic_group_emission_count", "begin_group_cb",
1237         "end_group_cb".
1238         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1239         Add auto_diagnostic_group instance(s).
1240         (find_explicit_erroneous_behavior): Likewise.
1241         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1242         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1243         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1244         (gimplify_va_arg_expr): Likewise.
1245         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1246         (HSA_SORRY_AT): Likewise.
1247         * ipa-devirt.c (compare_virtual_tables): Likewise.
1248         (warn_odr): Likewise.
1249         * multiple_target.c (expand_target_clones): Likewise.
1250         * opts-common.c (cmdline_handle_error): Likewise.
1251         * reginfo.c (globalize_reg): Likewise.
1252         * substring-locations.c (format_warning_n_va): Likewise.
1253         * tree-inline.c (expand_call_inline): Likewise.
1254         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1255         * tree-ssa-loop-niter.c
1256         (do_warn_aggressive_loop_optimizations): Likewise.
1257         * tree-ssa-uninit.c (warn_uninit): Likewise.
1258         * tree.c (warn_deprecated_use): Likewise.
1260 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
1262         PR target/87014
1263         * config/i386/i386.md (eh_return): Always update EH return
1264         address in word_mode.
1266 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
1268         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1269         TARGET_SPLIT_COMPLEX_ARG is defined.
1271 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1273         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1275 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1277         PR target/86984
1278         * expr.c (expand_assignment): Assert that bitpos is positive.
1279         (store_field): Likewise
1280         (expand_expr_real_1): Make sure that bitpos is positive.
1281         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1282         integer overflow.
1284 2018-08-20  Nathan Sidwell  <nathan@acm.org>
1286         * Makefile.in (CPP_ID_DATA_H): Delete.
1287         (CPP_INTERNAL_H): Don't add it.
1288         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1289         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1291 2018-08-20  Richard Biener  <rguenther@suse.de>
1293         PR tree-optimization/78655
1294         * tree-vrp.c (extract_range_from_binary_expr_1): Make
1295         pointer + offset nonnull if either operand is nonnull work.
1297 2018-08-20  Tom de Vries  <tdevries@suse.de>
1299         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1300         unless the referenced die describes the added property using
1301         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
1302         Otherwise, add a DW_AT_location to the referenced die.
1304 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
1306         PR target/86994
1307         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1308         register_operand when calling ix86_set_reg_reg_cost.
1309         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1310         Set *total to 0 for operands that satisfy x86_64_immediate_operand
1311         predicate and to 1 otherwise.
1313 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
1315         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1316         emit a diagnostic that it is not supported and reset the option.
1317         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1318         supported and consume the option.  (ASM_FINAL_SPEC): New.
1320 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
1322         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1323         a sentence.
1325 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
1327         C-SKY port: Documentation
1329         * doc/extend.texi (C-SKY Function Attributes): New section.
1330         * doc/invoke.texi (Option Summary): Add C-SKY options.
1331         (C-SKY Options): New section.
1332         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1334 2018-08-17  Jojo  <jijie_rong@c-sky.com>
1335             Huibin Wang  <huibin_wang@c-sky.com>
1336             Sandra Loosemore  <sandra@codesourcery.com>
1337             Chung-Lin Tang  <cltang@codesourcery.com>
1339         C-SKY port: Backend implementation
1341         * config/csky/*: New.
1342         * common/config/csky/*: New.
1344 2018-08-17  Jojo  <jijie_rong@c-sky.com>
1345             Huibin Wang  <huibin_wang@c-sky.com>
1346             Sandra Loosemore  <sandra@codesourcery.com>
1347             Chung-Lin Tang  <cltang@codesourcery.com>
1348             Andrew Jenner  <andrew@codesourcery.com>
1350         C-SKY port: Configury
1352         * config.gcc (csky-*-*): New.
1353         * configure.ac: Add csky to targets for dwarf2 debug_line support.
1354         * configure: Regenerated.
1356 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
1358         * dump-context.h: Include "dumpfile.h".
1359         (dump_context::dump_printf_va): Convert final param from va_list
1360         to va_list *.  Convert from ATTRIBUTE_PRINTF to
1361         ATTRIBUTE_GCC_DUMP_PRINTF.
1362         (dump_context::dump_printf_loc_va): Likewise.
1363         * dumpfile.c: Include "stringpool.h".
1364         (make_item_for_dump_printf_va): Delete.
1365         (make_item_for_dump_printf): Delete.
1366         (class dump_pretty_printer): New class.
1367         (dump_pretty_printer::dump_pretty_printer): New ctor.
1368         (dump_pretty_printer::emit_items): New member function.
1369         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1370         function.
1371         (dump_pretty_printer::emit_item): New member function.
1372         (dump_pretty_printer::stash_item): New member function.
1373         (dump_pretty_printer::format_decoder_cb): New member function.
1374         (dump_pretty_printer::decode_format): New member function.
1375         (dump_context::dump_printf_va): Reimplement in terms of
1376         dump_pretty_printer.
1377         (dump_context::dump_printf_loc_va): Convert final param from va_list
1378         to va_list *.
1379         (dump_context::begin_scope): Reimplement call to
1380         make_item_for_dump_printf.
1381         (dump_printf): Update for change to dump_printf_va.
1382         (dump_printf_loc): Likewise.
1383         (selftest::test_capture_of_dump_calls): Convert "stmt" from
1384         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
1385         with %T, %E, and %G.
1386         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
1387         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
1388         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
1389         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
1390         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
1391         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
1392         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
1393         within a dump_printf_loc call to "%wu".
1394         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
1395         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
1396         missing space after "=".
1397         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
1398         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
1399         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
1400         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
1401         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
1402         duplicate "vectorized" from message.
1404 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1406         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
1407         polyNxK_t element's TYPE_STRING_FLAG.
1409 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
1411         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
1412         (they were unnamed before).  Fix comments.
1414 2018-08-17  Nathan Sidwell  <nathan@acm.org>
1416         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
1418 2018-08-17  Richard Biener  <rguenther@suse.de>
1420         PR tree-optimization/86841
1421         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1423 2018-08-17  Martin Liska  <mliska@suse.cz>
1425         * common.opt: Remove Warn, Init and Report for options with
1426         Ignore/Deprecated flag. Warning is done automatically for
1427         Deprecated flags.
1428         * config/i386/i386.opt: Likewise.
1429         * config/ia64/ia64.opt: Likewise.
1430         * config/rs6000/rs6000.opt: Likewise.
1431         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
1432         Remove usage of flag_check_pointer_bounds.
1433         * lto-wrapper.c (merge_and_complain): Do not handle
1434         OPT_fcheck_pointer_bounds.
1435         (append_compiler_options): Likewise.
1436         * opt-functions.awk: Do not handle Deprecated.
1437         * optc-gen.awk: Check that Var, Report and Init are not
1438         used for an option with Ignore/Deprecated flag.
1439         * opts-common.c (decode_cmdline_option): Do not report
1440         CL_ERR_DEPRECATED.
1441         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
1442         options.
1443         * opts.h (struct cl_option): Remove cl_deprecated flag.
1444         (CL_ERR_DEPRECATED): Remove error enum value.
1446 2018-08-17  Richard Biener  <rguenther@suse.de>
1448         PR middle-end/86505
1449         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
1450         across a va-arg-pack using call adjust its return value accordingly.
1452 2018-08-16  Martin Sebor  <msebor@redhat.com>
1454         PR tree-optimization/86853
1455         * gimple-ssa-sprintf.c (struct format_result): Rename member.
1456         (struct fmtresult): Add member and initialize it in ctors.
1457         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
1458         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
1459         (format_directive): Set POSUNDER4K when MAYFAIL is set.
1460         (parse_directive): Handle %C same as %c.
1461         (sprintf_dom_walker::compute_format_length): Adjust.
1462         (is_call_safe): Adjust.
1464 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1466         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
1467         for determining how to count the elements.
1468         * builtins.h (c_strlen): Adjust prototype.
1469         * expr.c (string_constant): Add new parameter mem_size.
1470         Set *mem_size appropriately.
1471         * expr.h (string_constant): Adjust protoype.
1472         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
1473         * gimple-fold.h (get_range_strlen): Adjust prototype.
1474         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
1475         (format_string): Call get_string_length with eltsize.
1477 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
1479         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
1480         to emit the span, rather than setting it as the prefix.
1482 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
1484         * diagnostic-show-locus.c (layout::start_annotation_line): Add
1485         "margin_char" parameter, defaulting to space.  Use it in place
1486         of pp_space for the initial part of the margin.
1487         (layout::print_leading_fixits): Use '+' when filling the margin
1488         of line-insertion fix-it hints.
1490 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1492         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
1493         Delete.
1495 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1497         * config/rs6000/altivec.md: Don't set length attribute to the default
1498         value.
1499         * config/rs6000/darwin.md: Ditto.
1500         * config/rs6000/dfp.md: Ditto.
1501         * config/rs6000/htm.md: Ditto.
1502         * config/rs6000/rs6000.md: Ditto.
1503         * config/rs6000/sync.md: Ditto.
1504         * config/rs6000/vsx.md: Ditto.
1506 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1508         * config/rs6000/altivec.md: Don't set length attribute to the default
1509         value, for branch instructions.
1510         * config/rs6000/darwin.md: Ditto.
1511         * config/rs6000/rs6000.md: Ditto.
1513 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1515         * config/rs6000/rs6000.md (length): Always define as const_int 4.
1516         (unnamed conditional branch define_insn): Set length to 4 or 8
1517         depending on offset.
1518         (<bd>_<mode>): Similar, for alternative 0.
1519         (<bd>tf_<mode>): Ditto.
1521 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
1523         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
1525 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
1527         * doc/rtl.texi: Replace old RTX class names with new names.
1530 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
1532         * expmed.h (canonicalize_comparison): New declaration.
1533         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
1534         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
1535         * optabs.c (prepare_cmp_insn): Likewise.
1536         * rtl.h (unsigned_condition_p): New function which checks if a
1537         comparison operator is unsigned.
1539 2018-08-16  Nathan Sidwell  <nathan@acm.org>
1541         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
1542         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
1544 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
1546         PR target/84711
1547         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
1548         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
1549         (mov<mov>): ..this and enable unconditionally.
1551 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
1553         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
1555 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
1557         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
1558         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
1559         "Common" with "Target".
1561 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
1563         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
1564         * doc/invoke.texi (mmitigate-rop): Remove.
1565         * config/i386/i386.c: Do not include "regrename.h".
1566         (ix86_rop_should_change_byte_p, reg_encoded_number)
1567         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
1568         Remove.
1569         (ix86_reorg): Remove call to ix86_mitigate_rop.
1570         * config/i386/i386.md (attr "modrm_class"): Remove.
1571         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
1572         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
1573         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
1575 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
1577         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
1578         allow folding of mergeh() and mergel() for the float and double types.
1579         (fold_mergehl_helper): Rework to handle building a permute tree
1580         for float vectors.
1582 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
1584         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
1585         for TARGET_SSE.
1587 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
1589         * common.opt (fdiagnostics-show-labels): New option.
1590         * diagnostic-show-locus.c (class layout_range): Add field
1591         "m_label".
1592         (class layout): Add field "m_show_labels_p".
1593         (layout_range::layout_range): Add param "label" and use it to
1594         initialize m_label.
1595         (make_range): Pass in NULL for new "label" param of layout_range's
1596         ctor.
1597         (layout::layout): Initialize m_show_labels_p.
1598         (layout::maybe_add_location_range): Pass in loc_range->m_label
1599         when constructing layout_range instances.
1600         (struct line_label): New struct.
1601         (layout::print_any_labels): New member function.
1602         (layout::print_line): Call it if label-printing is enabled.
1603         (selftest::test_one_liner_labels): New test.
1604         (selftest::test_diagnostic_show_locus_one_liner): Call it.
1605         * diagnostic.c (diagnostic_initialize): Initialize
1606         context->show_labels_p.
1607         * diagnostic.h (struct diagnostic_context): Add field
1608         "show_labels_p".
1609         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1610         -fno-diagnostics-show-labels.
1611         * dwarf2out.c (gen_producer_string): Add
1612         OPT_fdiagnostics_show_labels to the ignored options.
1613         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
1614         param.
1615         (gcc_rich_location::maybe_add_expr): Likewise.
1616         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
1617         label" param, defaulting to NULL.
1618         (gcc_rich_location::add_expr): Add "label" param.
1619         (gcc_rich_location::maybe_add_expr): Likewise.
1620         (class text_range_label): New class.
1621         (class range_label_for_type_mismatch): New class.
1622         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
1623         of format_warning_va.
1624         (fmtwarn_n): Likewise for new params of format_warning_n_va.
1625         * lto-wrapper.c (merge_and_complain): Add
1626         OPT_fdiagnostics_show_labels to the "pick one setting" options.
1627         (append_compiler_options): Likewise to the dropped options.
1628         (append_diag_options): Likewise to the passed-on options.
1629         * opts.c (common_handle_option): Handle the new option.
1630         * selftest-diagnostic.c
1631         (test_diagnostic_context::test_diagnostic_context): Enable
1632         show_labels_p.
1633         * substring-locations.c: Include "gcc-rich-location.h".
1634         (format_warning_n_va): Add "fmt_label" and "param_label" params
1635         and use them as appropriate.
1636         (format_warning_va): Add "fmt_label" and "param_label" params,
1637         passing them on to format_warning_n_va.
1638         (format_warning_at_substring): Likewise.
1639         (format_warning_at_substring_n): Likewise.
1640         * substring-locations.h (format_warning_va): Add "fmt_label" and
1641         "param_label" params.
1642         (format_warning_n_va): Likewise.
1643         (format_warning_at_substring): Likewise.
1644         (format_warning_at_substring_n): Likewise.
1645         * toplev.c (general_init): Initialize global_dc->show_labels_p.
1647 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
1649         PR testsuite/86519
1650         * builtins.c (expand_builtin_memcmp): Do not expand the call
1651         when overflow is detected.
1653 2018-08-15  Martin Sebor  <msebor@redhat.com>
1655         PR tree-optimization/71625
1656         * config/aarch64/aarch64-builtins.c
1657         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
1659 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
1661         * config/s390/s390.c (s390_reorg): Remove loop.
1663 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
1665         * config/darwin.c
1666          (darwin_function_switched_text_sections): Delete.
1667         * gcc/config/darwin.h
1668          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
1670 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
1672         PR target/81685
1673         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
1674         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
1675         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
1677 2018-08-15  Martin Liska  <mliska@suse.cz>
1679         PR tree-optimization/86925
1680         * predict.c (expr_expected_value_1): When taking
1681         later predictor, assign also probability.
1682         Use fold_build2_initializer_loc in order to fold
1683         the expression in -frounding-math.
1685 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
1687         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
1688         patterns.
1689         (expand_vec_perm_1): Try the new method.
1691 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
1693         PR target/86547
1694         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
1695         Check whether lra_live_max_point is 0 before dividing.
1697 2018-08-14  Martin Sebor  <msebor@redhat.com>
1699         PR tree-optimization/86650
1700         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
1701         (vrp_prop::check_mem_ref): Same.
1703 2018-08-13  Liu Hao <lh_mouse@126.com>
1705         * pretty-print.c (eat_esc_sequence): Swap the foreground and
1706         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
1707         and clear it thereafter, as it only works for DBCS.
1709 2018-08-13  Liu Hao <lh_mouse@126.com>
1711         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
1712         handle returned by _get_osf_handle().
1714 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
1716         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
1717         for folding vec_perm.
1719 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
1721         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
1722         Add support for gimple-folding of vec_pack() and vec_unpack()
1723         intrinsics.
1725 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
1727         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
1728         vec_xst variants to the list.
1729         (rs6000_gimple_fold_builtin): Add support for folding unaligned
1730         vector loads and stores.
1732 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
1734         * config.gcc (rs6000-ibm-aix4.x): Delete.
1735         (rs6000-ibm-aix5.1): Delete.
1736         (rs6000-ibm-aix5.2): Delete.
1737         (rs6000-ibm-aix5.3): Delete.
1738         * config/rs6000/aix43.h: Delete.
1739         * config/rs6000/aix51.h: Delete.
1740         * config/rs6000/aix52.h: Delete.
1741         * config/rs6000/t-aix43: Delete.
1743 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
1745         * config/s390/s390.c (s390_decompose_constant_pool_ref):
1746         New function.
1747         (s390_decompose_address): Factor out constant pool ref
1748         decomposition.
1750 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1752         * config/nds32/nds32-predicates.c
1753         (nds32_can_use_bclr_p): Change return type as bool.
1754         (nds32_can_use_bset_p): Ditto.
1755         (nds32_can_use_btgl_p): Ditto.
1756         (nds32_can_use_bitci_p): Ditto.
1757         * config/nds32/nds32-protos.h
1758         (nds32_can_use_bclr_p): Change declaration.
1759         (nds32_can_use_bset_p): Ditto.
1760         (nds32_can_use_btgl_p): Ditto.
1761         (nds32_can_use_bitci_p): Ditto.
1763 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1765         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
1766         Support -msched-prolog-epilog option.
1767         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
1769 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1771         * common/config/nds32/nds32-common.c
1772         (nds32_option_optimization_table): Enalbe -malways-align.
1774 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1776         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
1777         extra_headers.
1778         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
1779         OPT_misr_secure_ case.
1780         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
1781         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
1782         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
1783         secure attribute.
1784         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
1785         (nds32_isr_info): New field security_level.
1786         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
1787         * config/nds32/nds32.md (return_internal): Consider critical attribute.
1788         * config/nds32/nds32.opt (misr-secure): New option.
1789         * config/nds32/nds32_init.inc: New file.
1790         * config/nds32/nds32_isr.h: New file.
1792 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
1794         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
1795         Update comment for atomic instructions.
1796         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
1797         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
1798         Remove.
1799         (atomic_loaddi): Revise fence expansion to only emit fence prior to
1800         load for __ATOMIC_SEQ_CST model.
1801         (atomic_loaddi_1): Remove float register target.
1802         (atomic_storedi): Handle CONST_INT values.
1803         (atomic_storedi_1): Remove float register source.  Add special case
1804         for zero value.
1805         (memory_barrier): New expander and insn.
1807 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
1809         PR tree-optimization/86835
1810         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
1811         new_stmt after def_gsi, make sure to insert new_square_stmt after
1812         that stmt, not 2 stmts before it.
1814 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
1816         PR target/82418
1817         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
1818         instead of SWI48.
1820 2018-08-10  Martin Liska  <mliska@suse.cz>
1822         PR target/83610
1823         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
1824         function type.
1825         * builtins.c (expand_builtin_expect_with_probability):
1826         New function.
1827         (expand_builtin_expect_with_probability): New function.
1828         (build_builtin_expect_predicate): Add new argumnet probability
1829         for BUILT_IN_EXPECT_WITH_PROBABILITY.
1830         (fold_builtin_expect):
1831         (fold_builtin_2):
1832         (fold_builtin_3):
1833         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
1834         * builtins.h (fold_builtin_expect): Set new argument.
1835         * doc/extend.texi: Document __builtin_expect_with_probability.
1836         * doc/invoke.texi: Likewise.
1837         * gimple-fold.c (gimple_fold_call): Pass new argument.
1838         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
1839         also BUILT_IN_EXPECT_WITH_PROBABILITY.
1840         * predict.c (get_predictor_value): New function.
1841         (expr_expected_value): Add new argument probability. Assume
1842         that predictor and probability are always non-null.
1843         (expr_expected_value_1): Likewise.  For __builtin_expect and
1844         __builtin_expect_with_probability set probability.  Handle
1845         combination in binary expressions.
1846         (tree_predict_by_opcode): Simplify code by simply calling
1847         get_predictor_value.
1848         (pass_strip_predict_hints::execute): Add handling of
1849         BUILT_IN_EXPECT_WITH_PROBABILITY.
1850         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
1851         new predictor.
1852         * tree.h (DECL_BUILT_IN_P): New function.
1854 2018-08-10  Martin Liska  <mliska@suse.cz>
1856         PR tree-optimization/85799
1857         * passes.def: Add argument for pass_strip_predict_hints.
1858         * predict.c (class pass_strip_predict_hints): Add new argument
1859         early_p.
1860         (strip_predictor_early): New function.
1861         (pass_strip_predict_hints::execute): Call the function to
1862         strip predictors.
1863         (strip_predict_hints): New function.
1864         * predict.def: Fix comment.
1866 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
1868         * Makefile.in: Clarify which tm.texi to copy over to assert the
1869         right to grant a GFDL license for all.
1871 2018-08-09  Jeff Law  <law@redhat.com>
1873         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
1874         unused variable.
1876 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
1878         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
1879         prototype.
1881 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
1883         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
1884         reductions for variable-length vectors.
1886 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
1888         PR other/84889
1889         * common.opt (fdiagnostics-show-line-numbers): New option.
1890         * diagnostic-show-locus.c (class layout): Add fields
1891         "m_show_line_numbers_p" and "m_linenum_width";
1892         (num_digits): New function.
1893         (test_num_digits): New function.
1894         (layout::layout): Initialize new fields.  Update m_x_offset
1895         logic to handle any left margin.
1896         (layout::print_source_line): Print line number when requested.
1897         (layout::start_annotation_line): New member function.
1898         (layout::print_annotation_line): Call it.
1899         (layout::print_leading_fixits): Likewise.
1900         (layout::print_trailing_fixits): Likewise.  Update calls to
1901         move_to_column for new parameter.
1902         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
1903         it to potentially call start_annotation_line.
1904         (layout::show_ruler): Call start_annotation_line.
1905         (selftest::test_line_numbers_multiline_range): New selftest.
1906         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
1907         and selftest::test_line_numbers_multiline_range.
1908         * diagnostic.c (diagnostic_initialize): Initialize
1909         show_line_numbers_p.
1910         * diagnostic.h (struct diagnostic_context): Add field
1911         "show_line_numbers_p".
1912         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1913         -fno-diagnostics-show-line-numbers.
1914         * dwarf2out.c (gen_producer_string): Add
1915         OPT_fdiagnostics_show_line_numbers to the ignored options.
1916         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
1917         one setting" options.
1918         (append_compiler_options): Likewise to the dropped options.
1919         (append_diag_options): Likewise to the passed-on options.
1920         * opts.c (common_handle_option): Handle the new option.
1921         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
1923 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1925         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
1926         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
1927         third argument of type "const signed char" to descriptions of
1928         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
1929         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
1930         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
1931         __builtin_bcdsub_ov functions.
1933 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
1935         PR tree-optimization/86858
1936         * tree-vect-loop.c (vect_is_simple_reduction): Restore
1937         flow_bb_inside_loop_p calls.
1939 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
1941         PR tree-optimization/86871
1942         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
1943         instead of gimple_assign_lhs.
1945 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
1947         PR target/86887
1948         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
1949         register constraint to operand 0.
1950         (add<mode>3_carryinC): Likewise.
1951         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
1953 2018-08-09  Martin Liska  <mliska@suse.cz>
1955         PR c/86895
1956         * common.opt: Remove extra line.
1958 2018-08-09  Martin Liska  <mliska@suse.cz>
1960         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
1961         at the end of a line, make first letter capital and end up
1962         a sentence with a dot.
1963         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
1964         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
1965         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
1966         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
1967         (PARAM_MAX_ISL_OPERATIONS): Likewise.
1968         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
1969         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
1970         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
1971         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
1972         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
1973         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
1974         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
1975         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
1976         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
1977         (PARAM_TREE_REASSOC_WIDTH): Likewise.
1978         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
1979         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
1980         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
1982 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
1984         PR target/84332
1985         * config/s390/s390.c (s390_option_override_internal): Reduce the
1986         stack-clash-protection-probe-interval param if it would be too big
1987         for z900.
1989 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
1991         PR target/46179
1992         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
1993         * config/m68k/m68k.c (handle_move_double): Don't call
1994         m68k_final_prescan_insn.
1995         (m68k_adjust_decorated_operand): Renamed from
1996         m68k_final_prescan_insn, remove first and third operand and
1997         simplify.
1998         (print_operand): Call it.
1999         (print_operand_address): Call it.
2001 2018-08-08  Nathan Sidwell  <nathan@acm.org>
2003         * diagnostic.c (diagnostic_report_current_module): Use
2004         linemap_included_from & linemap_included_from_linemap.
2006 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
2008         * config/aarch64/aarch64-cores.def: Add phecda core.
2009         * config/aarch64/aarch64-tune.md: Regenerate.
2010         * doc/invoke.texi: Add phecda core.
2012 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
2014         PR target/85295
2015         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2016         definitions.
2017         * config/s390/s390.md ("movti"): Add more alternatives for
2018         constant to GPR copies.
2020 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
2022         * config/s390/s390.c: Fix whitespace damage throughout the file.
2023         * config/s390/s390.h: Likewise.
2024         * config/s390/tpf.h: Likewise.
2026 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
2028         * config/s390/s390.c (s390_loadrelative_operand_p):
2029         Remove TARGET_CPU_ZARCH usages.
2030         (s390_rtx_costs): Likewise.
2031         (s390_legitimate_constant_p): Likewise.
2032         (s390_cannot_force_const_mem): Likewise.
2033         (legitimate_reload_constant_p): Likewise.
2034         (s390_preferred_reload_class): Likewise.
2035         (legitimize_pic_address): Likewise.
2036         (legitimize_tls_address): Likewise.
2037         (s390_split_branches): Removed.
2038         (s390_add_execute): Removed.
2039         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2040         (s390_mainpool_start): Likewise.
2041         (s390_mainpool_finish): Likewise.
2042         (s390_mainpool_cancel): Removed.
2043         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2044         (s390_chunkify_cancel): Likewise.
2045         (s390_return_addr_rtx): Likewise.
2046         (s390_register_info): Remove split_branches_pending_p uages.
2047         (s390_optimize_register_info): Likewise.
2048         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2049         split_branches_pending_p usages.
2050         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2051         (s390_load_got): Likewise.
2052         (s390_expand_split_stack_prologue): Likewise.
2053         (output_asm_nops): Likewise.
2054         (s390_function_profiler): Likewise.
2055         (s390_emit_call): Likewise.
2056         (s390_conditional_register_usage): Likewise.
2057         (s390_optimize_prologue): Likewise.
2058         (s390_reorg): Remove TARGET_CPU_ZARCH and
2059         split_branches_pending_p usages.
2060         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2061         usages.
2062         (s390_output_indirect_thunk_function): Likewise.
2063         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2064         (TARGET_CPU_ZARCH_P): Removed.
2065         (struct machine_function): Remove split_branches_pending_p.
2066         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2068 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
2070         * common/config/s390/s390-common.c (processor_flags_table):
2071         Remove flags.
2072         * config.gcc: Remove with_arch/with_tune support.
2073         * config/s390/2064.md: Remove cpu attribute comparisons.
2074         * config/s390/driver-native.c (s390_host_detect_local_cpu):
2075         Remove MTN.
2076         * config/s390/linux.h (ASM_SPEC):
2077         Remove -march support.
2078         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2079         Use a table to get an arch level.
2080         * config/s390/s390-opts.h (enum processor_type):
2081         Remove enum values.
2082         * config/s390/s390.c
2083         (processor_table): Remove entries, add arch_level values.
2084         (s390_issue_rate): Remove cases.
2085         (s390_option_override): Adjust
2086         s390_option_override_internal() call.
2087         (s390_option_override_internal): Remove deprecation warning.
2088         (s390_valid_target_attribute_tree): Adjust
2089         s390_option_override_internal() call.
2090         * config/s390/s390.h (struct s390_processor):
2091         Share with s390-c.c, add arch_level field.
2092         * config/s390/s390.md:
2093         Remove occurrences in cpu attribute.
2094         * config/s390/s390.opt: Remove -march/-mtune support.
2095         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2096         * doc/invoke.texi: Remove deprecation warning.
2098 2018-08-08  Luis Machado  <luis.machado@linaro.org>
2100         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2101         global.
2102         (qdf24xx_tunings): Set vector cost structure to
2103         qdf24xx_vector_cost.
2105         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2106         <register_sextend>: Set to 3.
2108 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
2110         PR target/86838
2111         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2112         * config/aarch64/aarch64-simd.md
2113         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2114         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2115         (aarch64_frecpx<mode>): ...this new pattern.
2116         * config/aarch64/aarch64-simd-builtins.def: Remove comment
2117         about aarch64_frecp<FRECP:frecp_suffix><mode>.
2119 2018-08-07  Martin Liska  <mliska@suse.cz>
2121         PR middle-end/83023
2122         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2123         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2124         * predict.def (PRED_MALLOC_NONNULL): New predictor.
2125         * doc/extend.texi: Document that malloc attribute adds
2126         hit to compiler.
2128 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
2130         PR target/86785
2131         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2132         Define to speculation_safe_value_not_needed.
2134 2018-08-06  Jeff Law  <law@redhat.com>
2136         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2137         the vr_values instance to cprop_into_stmt.
2138         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2139         (cprop_operand): Also query EVRP to determine if OP is a constant.
2141 2018-08-06  Nathan Sidwell  <nathan@acm.org>
2143         * diagnostic.c (diagnostic_report_current_module): Reroll
2144         included-at loop.  Translate text.
2146 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
2148         * function-tests.c (selftest::test_expansion_to_rtl): Call
2149         free_after_compilation.
2151 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2153         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2155 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
2157         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2158         loops with memory block operations from getting unrolled.
2160 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
2162         PR target/86807
2163         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2164         Define to speculation_safe_value_not_needed.
2166 2018-08-06  Jeff Law  <law@redhat.com>
2168         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2169         assert.
2171 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2173         PR target/86662
2174         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2175         with all enabled __intN types.
2177         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2179 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2181         * alias.c (record_set): Check for clobber high.
2182         * cfgexpand.c (expand_gimple_stmt): Likewise.
2183         * combine-stack-adj.c (single_set_for_csa): Likewise.
2184         * combine.c (find_single_use_1): Likewise.
2185         (set_nonzero_bits_and_sign_copies): Likewise.
2186         (get_combine_src_dest): Likewise.
2187         (is_parallel_of_n_reg_sets): Likewise.
2188         (try_combine): Likewise.
2189         (record_dead_and_set_regs_1): Likewise.
2190         (reg_dead_at_p_1): Likewise.
2191         (reg_dead_at_p): Likewise.
2192         * dce.c (deletable_insn_p): Likewise.
2193         (mark_nonreg_stores_1): Likewise.
2194         (mark_nonreg_stores_2): Likewise.
2195         * df-scan.c (df_find_hard_reg_defs): Likewise.
2196         (df_uses_record): Likewise.
2197         (df_get_call_refs): Likewise.
2198         * dwarf2out.c (mem_loc_descriptor): Likewise.
2199         * haifa-sched.c (haifa_classify_rtx): Likewise.
2200         * ira-build.c (create_insn_allocnos): Likewise.
2201         * ira-costs.c (scan_one_insn): Likewise.
2202         * ira.c (equiv_init_movable_p): Likewise.
2203         (rtx_moveable_p): Likewise.
2204         (interesting_dest_for_shprep): Likewise.
2205         * jump.c (mark_jump_label_1): Likewise.
2206         * postreload-gcse.c (record_opr_changes): Likewise.
2207         * postreload.c (reload_cse_simplify): Likewise.
2208         (struct reg_use): Add source expr.
2209         (reload_combine): Check for clobber high.
2210         (reload_combine_note_use): Likewise.
2211         (reload_cse_move2add): Likewise.
2212         (move2add_note_store): Likewise.
2213         * print-rtl.c (print_pattern): Likewise.
2214         * recog.c (decode_asm_operands): Likewise.
2215         (store_data_bypass_p): Likewise.
2216         (if_test_bypass_p): Likewise.
2217         * regcprop.c (kill_clobbered_value): Likewise.
2218         (kill_set_value): Likewise.
2219         * reginfo.c (reg_scan_mark_refs): Likewise.
2220         * reload1.c (maybe_fix_stack_asms): Likewise.
2221         (eliminate_regs_1): Likewise.
2222         (elimination_effects): Likewise.
2223         (mark_not_eliminable): Likewise.
2224         (scan_paradoxical_subregs): Likewise.
2225         (forget_old_reloads_1): Likewise.
2226         * reorg.c (find_end_label): Likewise.
2227         (try_merge_delay_insns): Likewise.
2228         (redundant_insn): Likewise.
2229         (own_thread_p): Likewise.
2230         (fill_simple_delay_slots): Likewise.
2231         (fill_slots_from_thread): Likewise.
2232         (dbr_schedule): Likewise.
2233         * resource.c (update_live_status): Likewise.
2234         (mark_referenced_resources): Likewise.
2235         (mark_set_resources): Likewise.
2236         * rtl.c (copy_rtx): Likewise.
2237         * rtlanal.c (reg_referenced_p): Likewise.
2238         (single_set_2): Likewise.
2239         (noop_move_p): Likewise.
2240         (note_stores): Likewise.
2241         * sched-deps.c (sched_analyze_reg): Likewise.
2242         (sched_analyze_insn): Likewise.
2244 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2246         * cse.c (invalidate_reg): New function extracted from...
2247         (invalidate): ...here.
2248         (canonicalize_insn): Check for clobber high.
2249         (invalidate_from_clobbers): invalidate clobber highs.
2250         (invalidate_from_sets_and_clobbers): Likewise.
2251         (count_reg_usage): Check for clobber high.
2252         (insn_live_p): Likewise.
2253         * cselib.c (cselib_expand_value_rtx_1):Likewise.
2254         (cselib_invalidate_regno): Check for clobber in setter.
2255         (cselib_invalidate_rtx): Pass through setter.
2256         (cselib_invalidate_rtx_note_stores):
2257         (cselib_process_insn): Check for clobber high.
2258         * cselib.h (cselib_invalidate_rtx): Add operand.
2260 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2262         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2263         (mark_not_eliminable): Likewise.
2264         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2265         * lra-lives.c (process_bb_lives): Check for clobber high.
2266         * lra.c (new_insn_reg): Remember clobber highs.
2267         (collect_non_operand_hard_regs): Check for clobber high.
2268         (lra_set_insn_recog_data): Likewise.
2269         (add_regs_to_insn_regno_info): Likewise.
2270         (lra_update_insn_regno_info): Likewise.
2272 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2274         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2275         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2277 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2279         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2280         (copy_insn_1): Likewise.
2281         (gen_hard_reg_clobber_high): New gen function.
2282         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2283         * genemit.c (gen_exp): Likewise.
2284         (gen_emit_seq): Pass through info.
2285         (gen_insn): Check for CLOBBER_HIGH.
2286         (gen_expand): Pass through info.
2287         (gen_split): Likewise.
2288         (output_add_clobbers): Likewise.
2289         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2290         (remove_clobbers): Likewise.
2291         * rtl.h (gen_hard_reg_clobber_high): New declaration.
2293 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2295         * doc/rtl.texi (clobber_high): Add.
2296         (parallel): Add in clobber high
2297         * rtl.c (rtl_check_failed_code3): Add function.
2298         * rtl.def (CLOBBER_HIGH): Add expression.
2299         * rtl.h (RTL_CHECKC3): Add macro.
2300         (rtl_check_failed_code3): Add declaration.
2301         (XC3EXP): Add macro.
2303 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
2305         PR target/86386
2306         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2307         cfun->machine->max_used_stack_alignment if needed.
2309 2018-08-04  Martin Sebor  <msebor@redhat.com>
2311         PR tree-optimization/86571
2312         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2313         NaN output to 4.
2315 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
2317         PR target/86799
2318         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2319         Define.
2321 2018-08-03  Jeff Law  <law@redhat.com>
2323         PR target/86795
2324         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2325         Define to speculation_safe_value_not_needed.
2327 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
2329         * doc/gcov.texi (-x): Remove duplicate "to".
2330         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2331         (-Wif-not-aligned): Remove duplicate "is".
2332         (-flto): Remove duplicate "the".
2333         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2334         duplicate "v5.00.b".
2335         (MSP430 Options): Remove duplicate "and" from the description
2336         of "-mgprel-sec=regexp".
2337         (x86 Options): Remove duplicate copies of "vmldLog102" and
2338         vmlsLog104 from description of "-mveclibabi=type".
2340 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
2342         * internal-fn.h (first_commutative_argument): Declare.
2343         * internal-fn.c (first_commutative_argument): New function.
2344         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2345         restrictions for pattern statements.  Use first_commutative_argument
2346         to look for commutative operands in calls to internal functions.
2348 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
2350         * Makefile.in (wide-int-range.o): New.
2351         * tree-vrp.c: Move all the wide_int_* functions to...
2352         * wide-int-range.cc: ...here.
2353         * tree-vrp.h: Move all the wide_int_* prototypes to...
2354         * wide-int-range.h: ...here.
2356 2018-08-03  Tom de Vries  <tdevries@suse.de>
2358         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2359         UI_NONE.
2360         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2361         * except.c (output_function_exception_table): Do early exit if
2362         targetm_common.except_unwind_info (&global_options) == UI_NONE.
2364 2018-08-03  Martin Liska  <mliska@suse.cz>
2366         * predict.c (dump_prediction): Change to 2 digits
2367         in fraction part.
2369 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
2371         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2372         neon_dup_q to...
2373         (falkor_am_1_gtov_gtov): ... a new insn reservation.
2375 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
2377         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2378         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2379         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2380         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2381         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2383 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
2385         * diagnostic-show-locus.c (diagnostic_show_locus): Use
2386         pp_take_prefix when saving the existing prefix.
2387         * diagnostic.c (diagnostic_append_note): Likewise.
2388         * langhooks.c (lhd_print_error_function): Likewise.
2389         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
2390         param's type.  Free the existing prefix.
2391         (pp_take_prefix): New function.
2392         (pretty_printer::pretty_printer): Drop the prefix parameter.
2393         Rename the length parameter to match the comment.
2394         (pretty_printer::~pretty_printer): Free the prefix.
2395         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
2396         parameter.
2397         (struct pretty_printer): Drop the "const" from "prefix" field's
2398         type and clarify memory management.
2399         (pp_set_prefix): Drop the "const" from the 2nd param.
2400         (pp_take_prefix): New decl.
2402 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
2404         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
2405         for word_mode_ok here instead of passing as argument.
2406         (expand_block_compare): Change select_block_compare_mode() call.
2407         (expand_strncmp_gpr_sequence): New function.
2408         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2410 2018-08-02  Jeff Law  <law@redhat.com>
2412         PR target/86790
2413         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2414         Define to speculation_safe_value_not_needed.
2416         PR target/86784
2417         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2418         Define to speculation_safe_value_not_needed.
2420 2018-08-02  Tom de Vries  <tdevries@suse.de>
2422         PR target/86660
2423         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2424         function.  Return UI_TARGET unconditionally.
2425         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
2426         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2428 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
2430         * genemit.c (print_overload_test): Fix typo.
2432 2018-08-02  Richard Biener  <rguenther@suse.de>
2434         PR tree-optimization/86816
2435         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
2436         which checks for value availability before querying it.
2437         (gvn_uses_equal): Use it.
2438         (same_succ_hash): Likewise.
2439         (gimple_equal_p): Likewise.
2441 2018-08-02  Nick Clifton  <nickc@redhat.com>
2443         PR target/86813
2444         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2445         Define to speculation_safe_value_not_needed.
2447         PR target/86810
2448         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2449         Define to speculation_safe_value_not_needed.
2451         PR target/86810
2452         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2453         Define to speculation_safe_value_not_needed.
2455         PR target/86803
2456         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2457         Define to speculation_safe_value_not_needed.
2459         PR target/86797
2460         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2461         Define to speculation_safe_value_not_needed.
2463         PR target/86791
2464         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2465         Define to speculation_safe_value_not_needed.
2467         PR target/86789
2468         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2469         Define to speculation_safe_value_not_needed.
2471         PR target/86787
2472         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2473         Define to speculation_safe_value_not_needed.
2475         PR target/86782
2476         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2477         speculation_safe_value_not_needed.
2479         PR target/86781
2480         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
2481         to speculation_safe_value_not_needed.
2483 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
2485         * doc/md.texi: Expand the documentation of instruction names
2486         to mention port-local uses.  Document '@' in pattern names.
2487         * read-md.h (overloaded_instance, overloaded_name): New structs.
2488         (mapping): Declare.
2489         (md_reader::handle_overloaded_name): New member function.
2490         (md_reader::get_overloads): Likewise.
2491         (md_reader::m_first_overload): New member variable.
2492         (md_reader::m_next_overload_ptr): Likewise.
2493         (md_reader::m_overloads_htab): Likewise.
2494         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
2495         m_next_overload_ptr and m_overloads_htab.
2496         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
2497         (get_mode_token, get_code_token, get_int_token): New functions.
2498         (map_attr_string): Add an optional argument that passes back
2499         the associated iterator.
2500         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
2501         (md_reader::handle_overloaded_name, add_overload_instance): New
2502         functions.
2503         (apply_iterators): Handle '@' names.  Report an error if '@'
2504         is used without iterators.
2505         (initialize_iterators): Initialize the new iterator_group fields.
2506         * genopinit.c (handle_overloaded_code_for)
2507         (handle_overloaded_gen): New functions.
2508         (main): Use them to print declarations of maybe_code_for_* and
2509         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
2510         * genemit.c (print_overload_arguments, print_overload_test)
2511         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
2512         (main): Use it to print definitions of maybe_code_for_* and
2513         maybe_gen_* functions.
2514         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
2515         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
2516         instead of explicit mode checks.
2517         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
2518         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
2519         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
2520         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
2521         (aarch64_expand_compare_and_swap): Likewise
2522         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
2523         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
2524         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
2525         (aarch64_constant_pool_reload_icode): Delete.
2526         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
2527         instead of aarch64_constant_pool_reload_icode.  Use
2528         code_for_aarch64_reload_mov instead of explicit mode checks.
2529         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
2530         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
2531         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
2532         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
2533         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
2534         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
2535         (aarch64_atomic_load_op_code): Delete.
2536         (aarch64_emit_atomic_load_op): Likewise.
2537         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
2538         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
2539         instead of aarch64_emit_atomic_load_op.
2540         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
2541         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
2542         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
2543         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
2544         character before the pattern name.
2545         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2546         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
2547         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
2548         (aarch64_frecps<mode>): Likewise.
2549         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
2550         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
2551         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
2552         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
2553         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
2555 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
2557         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
2558         Allow HFmode constants if TARGET_FP_F16INST.
2560 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
2562         PR target/86014
2563         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
2564         No longer check last store for clobber of address register.
2566 2018-08-02  Martin Liska  <mliska@suse.cz>
2568         PR gcov-profile/86817
2569         * gcov.c (process_all_functions): New function.
2570         (main): Call it.
2571         (process_file): Move functions processing to
2572         process_all_functions.
2574 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
2576         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
2577         "const" to the "gimple *" and "rtx_insn *" parameters.
2578         * dumpfile.h (dump_user_location_t::dump_user_location_t):
2579         Likewise.
2580         (dump_location_t::dump_location_t): Likewise.
2582 2018-08-01  Martin Sebor  <msebor@redhat.com>
2584         PR tree-optimization/86650
2585         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
2586         rather than a "gcall *".  Directly pass the data of interest
2587         to percent_K_format, rather than building a temporary CALL_EXPR
2588         to hold it.
2589         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
2590         (gimple_fold_builtin_strncat): Adjust.
2591         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
2592         gcall* argument with gimple*.
2593         * gimple-ssa-warn-restrict.c (check_call): Same.
2594         (wrestrict_dom_walker::before_dom_children): Same.
2595         (builtin_access::builtin_access): Same.
2596         (check_bounds_or_overlap): Same
2597         (maybe_diag_overlap): Same.
2598         (maybe_diag_offset_bounds): Same.
2599         * tree-diagnostic.c (default_tree_printer): Move usage of
2600         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
2601         to this callsite.
2602         * tree-pretty-print.c (percent_K_format): Add argument.
2603         * tree-pretty-print.h: Add argument.
2604         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
2605         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
2606         (maybe_diag_stxncpy_trunc): Same.
2607         (handle_builtin_stxncpy): Same.
2608         (handle_builtin_strcat): Same.
2610 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2612         * match.pd: Optimise pointer range checks.
2614 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2616         PR tree-optimization/86758
2617         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
2618         to remove pattern statements.
2620 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2622         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
2623         result of dfs_enumerate_from when constructing stmt_vec_infos,
2624         instead of additionally calling get_loop_body.
2626 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2628         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
2629         parameter.
2630         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
2631         When creating an iv, assert that the step is not known to be zero.
2632         (vect_setup_realignment): Update call accordingly.
2633         * tree-vect-stmts.c (vectorizable_store): Likewise.
2634         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
2636 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2638         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
2639         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
2640         (vectorizable_reduction): Likewise.
2641         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2642         (vect_detect_hybrid_slp_stmts): Likewise.
2643         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2645 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
2647         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
2648         (wide_int_set_zero_nonzero_bits): ...this.
2649         (zero_nonzero_bits_from_vr): Rename to...
2650         (vrp_set_zero_nonzero_bits): ...this.
2651         (extract_range_from_multiplicative_op_1): Abstract wide int
2652         code...
2653         (wide_int_range_multiplicative_op): ...here.
2654         (extract_range_from_binary_expr_1): Extract wide int binary
2655         operations into their own functions.
2656         (wide_int_range_lshift): New.
2657         (wide_int_range_can_optimize_bit_op): New.
2658         (wide_int_range_shift_undefined_p): New.
2659         (wide_int_range_bit_xor): New.
2660         (wide_int_range_bit_ior): New.
2661         (wide_int_range_bit_and): New.
2662         (wide_int_range_trunc_mod): New.
2663         (extract_range_into_wide_ints): New.
2664         (vrp_shift_undefined_p): New.
2665         (extract_range_from_multiplicative_op): New.
2666         (vrp_can_optimize_bit_op): New.
2667         * tree-vrp.h (value_range::dump): New.
2668         (wide_int_range_multiplicative_op): New.
2669         (wide_int_range_lshift):New.
2670         (wide_int_range_shift_undefined_p): New.
2671         (wide_int_range_bit_xor): New.
2672         (wide_int_range_bit_ior): New.
2673         (wide_int_range_bit_and): New.
2674         (wide_int_range_trunc_mod): New.
2675         (zero_nonzero_bits_from_bounds): Rename to...
2676         (wide_int_set_zero_nonzero_bits): ...this.
2677         (zero_nonzero_bits_from_vr): Rename to...
2678         (vrp_set_zero_nonzero_bits): ...this.
2679         (range_easy_mask_min_max): Rename to...
2680         (wide_int_range_can_optimize_bit_op): this.
2681         * vr-values.c (simplify_bit_ops_using_ranges): Rename
2682         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
2684 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2686         * tree-vectorizer.h (vect_orig_stmt): New function.
2687         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
2688         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
2689         (vect_create_epilog_for_reduction): Likewise.
2690         (vectorizable_live_operation): Likewise.
2691         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2692         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
2693         * tree-vect-stmts.c (vectorizable_call): Likewise.
2694         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
2696 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2698         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
2699         argument.
2700         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
2701         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
2702         (vect_transform_loop): Likewise.
2703         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2705 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2707         * tree-vectorizer.h (vect_schedule_slp): Return void.
2708         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2709         (vect_schedule_slp): Likewise.
2711 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2713         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
2714         argument.
2715         (vect_transform_loop): Update calls accordingly.  Schedule SLP
2716         instances before the main loop, if any exist.
2718 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2720         PR tree-optimization/86749
2721         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
2722         If the lhs is used in a COND_EXPR, check that it is being used
2723         as the "then" or "else" value.
2725 2018-08-01  Tom de Vries  <tdevries@suse.de>
2727         PR target/86800
2728         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2729         speculation_safe_value_not_needed.
2731 2018-08-01  Richard Biener  <rguenther@suse.de>
2733         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
2734         as base and offset.
2736 2018-08-01  Martin Liska  <mliska@suse.cz>
2738         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
2739         format how successful transformation is dumped.
2740         (gimple_mod_pow2_value_transform): Likewise.
2741         (gimple_mod_subtract_transform): Likewise.
2742         (gimple_stringops_transform): Likewise.
2744 2018-08-01  Martin Liska  <mliska@suse.cz>
2746         PR value-prof/35543
2747         * value-prof.c (interesting_stringop_to_profile_p):
2748         Simplify the code and add BUILT_IN_MEMMOVE.
2749         (gimple_stringops_transform): Likewise.
2751 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
2753         * config/aarch64/aarch64-simd.md
2754         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
2755         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
2756         use GPI iterator instead of SI mode.
2758 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
2760         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
2761         rs6000_speculation_barrier.
2762         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
2763         new barrier pattern name.
2765 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
2767         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
2768         (speculation_barrier): New insn.
2770 2018-08-01  Richard Biener  <rguenther@suse.de>
2772         PR bootstrap/86724
2773         * graphite.h: Include isl/id.h and isl/space.h to allow build
2774         with ISL 0.20.
2776 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
2778         PR target/86651
2779         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2780         mode for COFF targets.
2781         * defaults.h (TARGET_COFF): Define.
2782         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
2783         TARGET_COFF): Define.
2784         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
2785         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
2786         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
2788 2018-07-31  Alexandre Oliva <oliva@adacore.com>
2790         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
2791         * gimple-streamer-out.c (output_bb): Save it.
2792         * lto-streamer-in.c (input_struct_function_base): Restore
2793         instance discriminator if available.  Create map on demand.
2794         * lto-streamer-out.c (output_struct_function_base): Save it if
2795         available.
2796         * final.c (decl_to_instance_map): Document LTO strategy.
2798 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
2799             Olivier Hainque  <hainque@adacore.com>
2801         * debug.h (decl_to_instance_map_t): New type.
2802         (decl_to_instance_map): Declare.
2803         (maybe_create_decl_to_instance_map): New inline function.
2804         * final.c (bb_discriminator, last_bb_discriminator): New statics,
2805         to track basic block discriminators.
2806         (final_start_function_1): Initialize them.
2807         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
2808         bb_discriminator.
2809         (decl_to_instance_map): New variable.
2810         (map_decl_to_instance, maybe_set_discriminator): New functions.
2811         (notice_source_line): Set discriminator.
2813 2018-07-31  Ian Lance Taylor  <iant@golang.org>
2815         * targhooks.c (default_have_speculation_safe_value): Add
2816         ATTRIBUTE_UNUSED.
2818 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
2820         * dump-context.h: Include "pretty-print.h".
2821         (dump_context::refresh_dumps_are_enabled): New decl.
2822         (dump_context::emit_item): New decl.
2823         (class dump_context): Add fields "m_test_pp" and
2824         "m_test_pp_flags".
2825         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2826         (temp_dump_context::get_dumped_text): New decl.
2827         (class temp_dump_context): Add field "m_pp".
2828         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
2829         (dump_context::refresh_dumps_are_enabled): ...and add a test for
2830         m_test_pp.
2831         (set_dump_file): Update for above change.
2832         (set_alt_dump_file): Likewise.
2833         (dump_loc): New overload, taking a pretty_printer *.
2834         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
2835         to any test pretty-printer.
2836         (make_item_for_dump_gimple_stmt): New function, adapted from
2837         optinfo::add_gimple_stmt.
2838         (dump_context::dump_gimple_stmt): Call it, and use the result,
2839         eliminating the direct usage of dump_file and alt_dump_file in
2840         favor of indirectly using them via emit_item.
2841         (make_item_for_dump_gimple_expr): New function, adapted from
2842         optinfo::add_gimple_expr.
2843         (dump_context::dump_gimple_expr): Call it, and use the result,
2844         eliminating the direct usage of dump_file and alt_dump_file in
2845         favor of indirectly using them via emit_item.
2846         (make_item_for_dump_generic_expr): New function, adapted from
2847         optinfo::add_tree.
2848         (dump_context::dump_generic_expr): Call it, and use the result,
2849         eliminating the direct usage of dump_file and alt_dump_file in
2850         favor of indirectly using them via emit_item.
2851         (make_item_for_dump_printf_va): New function, adapted from
2852         optinfo::add_printf_va.
2853         (make_item_for_dump_printf): New function.
2854         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
2855         and use the result, eliminating the direct usage of dump_file and
2856         alt_dump_file in favor of indirectly using them via emit_item.
2857         (make_item_for_dump_dec): New function.
2858         (dump_context::dump_dec): Call it, and use the result,
2859         eliminating the direct usage of dump_file and alt_dump_file in
2860         favor of indirectly using them via emit_item.
2861         (make_item_for_dump_symtab_node): New function, adapted from
2862         optinfo::add_symtab_node.
2863         (dump_context::dump_symtab_node): Call it, and use the result,
2864         eliminating the direct usage of dump_file and alt_dump_file in
2865         favor of indirectly using them via emit_item.
2866         (dump_context::begin_scope): Reimplement, avoiding direct usage
2867         of dump_file and alt_dump_file in favor of indirectly using them
2868         via emit_item.
2869         (dump_context::emit_item): New member function.
2870         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2871         Set up test pretty-printer on the underlying context.  Call
2872         refresh_dumps_are_enabled.
2873         (temp_dump_context::~temp_dump_context): Call
2874         refresh_dumps_are_enabled.
2875         (temp_dump_context::get_dumped_text): New member function.
2876         (selftest::verify_dumped_text): New function.
2877         (ASSERT_DUMPED_TEXT_EQ): New macro.
2878         (selftest::test_capture_of_dump_calls): Run all tests twice, with
2879         and then without optinfo enabled.  Add uses of
2880         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
2881         * dumpfile.h: Update comment for the dump_* API.
2882         * optinfo-emit-json.cc
2883         (selftest::test_building_json_from_dump_calls): Update for new
2884         param for temp_dump_context ctor.
2885         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
2886         and "m_owned" field.
2887         (optinfo_item::~optinfo_item): Likewise.
2888         (optinfo::add_item): New member function.
2889         (optinfo::emit): Update comment.
2890         (optinfo::add_string): Delete.
2891         (optinfo::add_printf): Delete.
2892         (optinfo::add_printf_va): Delete.
2893         (optinfo::add_gimple_stmt): Delete.
2894         (optinfo::add_gimple_expr): Delete.
2895         (optinfo::add_tree): Delete.
2896         (optinfo::add_symtab_node): Delete.
2897         (optinfo::add_dec): Delete.
2898         * optinfo.h (class dump_context): New forward decl.
2899         (optinfo::add_item): New decl.
2900         (optinfo::add_string): Delete.
2901         (optinfo::add_printf): Delete.
2902         (optinfo::add_printf_va): Delete.
2903         (optinfo::add_gimple_stmt): Delete.
2904         (optinfo::add_gimple_expr): Delete.
2905         (optinfo::add_tree): Delete.
2906         (optinfo::add_symtab_node): Delete.
2907         (optinfo::add_dec): Delete.
2908         (optinfo::add_poly_int): Delete.
2909         (optinfo_item::optinfo_item): Remove "owned" param.
2910         (class optinfo_item): Remove field "m_owned".
2912 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2914         PR middle-end/86705
2915         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
2916         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
2917         requested variable alignment.
2918         (expand_one_ssa_partition): Likewise.
2919         (expand_one_var): Likewise.
2921 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2923         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2924         to speculation_safe_value_not_needed.
2926 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2928         * targhooks.h (speculation_safe_value_not_needed): New prototype.
2929         * targhooks.c (speculation_safe_value_not_needed): New function.
2930         * target.def (have_speculation_safe_value): Update documentation.
2931         * doc/tm.texi: Regenerated.
2933 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2935         * config/aarch64/iterators.md (ALLI_TI): New iterator.
2936         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
2937         expand.
2938         (despeculate_copy<ALLI:mode>_insn): New insn.
2939         (despeculate_copyti_insn): New insn.
2940         (despeculate_simple<ALLI:mode>): New insn
2941         (despeculate_simpleti): New insn.
2942         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
2943         function.
2944         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
2945         aarch64_speculation_safe_value.
2946         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
2948 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2950         * config/aarch64/aarch64-speculation.cc: New file.
2951         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
2952         before pass_reorder_blocks.
2953         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
2954         prototype.
2955         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
2956         X14 and X15 when tracking speculation.
2957         * config/aarch64/aarch64.md (register name constants): Add
2958         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
2959         (unspec): Add UNSPEC_SPECULATION_TRACKER.
2960         (speculation_barrier): New insn attribute.
2961         (cmp<mode>): Allow SP in comparisons.
2962         (speculation_tracker): New insn.
2963         (speculation_barrier): Add speculation_barrier attribute.
2964         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
2965         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
2966         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
2968 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2970         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
2971         aarch64_track_speculation is true.
2972         (tb<optab><mode>1): Likewise.
2973         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
2974         generate CB[N]Z when tracking speculation.
2975         (aarch64_split_compare_and_swap): Likewise.
2976         (aarch64_split_atomic_op): Likewise.
2978 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2980         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
2982 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2984         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
2985         (speculation_barrier): New insn.
2987 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2989         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
2990         * config/arm/arm.md (speculation_barrier): New expand.
2991         (speculation_barrier_insn): New pattern.
2993 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2995         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
2996         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
2997         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
2998         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
2999         list.
3000         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3001         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3002         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3003         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3004         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3005         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3006         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3007         * builtins.c (expand_speculation_safe_value): New function.
3008         (expand_builtin): Call it.
3009         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3010         * doc/extend.texi: Document __builtin_speculation_safe_value.
3011         * doc/md.texi: Document "speculation_barrier" pattern.
3012         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3013         TARGET_HAVE_SPECULATION_SAFE_VALUE.
3014         * doc/tm.texi: Regenerated.
3015         * target.def (have_speculation_safe_value, speculation_safe_value): New
3016         hooks.
3017         * targhooks.c (default_have_speculation_safe_value): New function.
3018         (default_speculation_safe_value): New function.
3019         * targhooks.h (default_have_speculation_safe_value): Add prototype.
3020         (default_speculation_safe_value): Add prototype.
3022 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
3024         * dump-context.h (dump_context::dump_loc): New decl.
3025         * dumpfile.c (dump_context::dump_loc): New member function.
3026         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3027         and dump_gimple_stmt.
3028         (dump_context::dump_gimple_expr_loc): Likewise, using
3029         dump_gimple_expr.
3030         (dump_context::dump_generic_expr_loc): Likewise, using
3031         dump_generic_expr.
3032         (dump_context::dump_printf_loc_va): Likewise, using
3033         dump_printf_va.
3034         (dump_context::begin_scope): Explicitly using the global function
3035         "dump_loc", rather than the member function.
3037 2018-07-31  Martin Sebor  <msebor@redhat.com>
3039         PR tree-optimization/86741
3040         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3042 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
3044         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3045         depend on whether prefetch instructions will be emitted or not.
3046         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3047         will be emitted or not.
3048         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3049         (TARGET_SETMEM_PFD): New macros.
3051 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3053         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3054         (NULL_STMT_VEC_INFO): Delete.
3055         (stmt_vec_info::operator*): Likewise.
3056         (stmt_vec_info::operator gimple *): Likewise.
3057         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3058         of NULL_STMT_VEC_INFO.
3059         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3060         (vect_reassociating_reduction_p): Likewise.
3061         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3062         (vectorizable_store): Likewise.
3063         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3064         (vec_info::free_stmt_vec_infos): Likewise.
3066 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3068         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3069         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3071 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3073         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3074         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3075         (vec_info::free_stmt_vec_info): New private member functions.
3076         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3077         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3078         * tree-parloops.c (gather_scalar_reductions): Remove calls to
3079         set_stmt_vec_info_vec and free_stmt_vec_infos.
3080         * tree-vect-loop.c (_loop_vec_info): Remove call to
3081         set_stmt_vec_info_vec.
3082         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3083         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3084         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3085         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3086         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
3087         assignments in {vec_info::,}new_stmt_vec_info that are redundant
3088         with the clearing in the xcalloc.
3089         (stmt_vec_info_vec): Delete.
3090         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3091         (vectorize_loops): Likewise.
3092         (vec_info::~vec_info): Remove argument from call to
3093         free_stmt_vec_infos.
3094         (vec_info::add_stmt): Remove vinfo argument from call to
3095         new_stmt_vec_info.
3097 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3099         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3100         rather than a gimple stmt.
3101         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
3102         information for pattern statements when passed the original
3103         statement; instead wait to be passed the pattern statement itself.
3104         Don't call set_vinfo_for_stmt here.
3105         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3106         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3107         stmt_vec_infos here.
3108         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3109         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3110         stmt_vec_infos entry.
3112 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3114         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3115         * tree-vectorizer.c (vec_info::replace_stmt): New function.
3116         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3117         * tree-vect-stmts.c (vectorizable_call): Likewise.
3118         (vectorizable_simd_clone_call): Likewise.
3120 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3122         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3123         * tree-vectorizer.c (vec_info::remove_stmt): New function.
3124         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3125         * tree-vect-loop.c (vect_transform_loop): Likewise.
3126         * tree-vect-slp.c (vect_schedule_slp): Likewise.
3127         * tree-vect-stmts.c (vect_remove_stores): Likewise.
3129 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3131         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3132         (vect_dr_stmt): Delete.
3133         * tree-vectorizer.c (vec_info::lookup_dr): New function.
3134         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3135         of DR_VECT_AUX.
3136         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3137         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3138         (vect_verify_datarefs_alignment, vect_peeling_supportable)
3139         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3140         (vect_analyze_data_refs): Likewise.
3141         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
3142         argument.
3143         (vect_find_same_alignment_drs): Likewise.
3144         (vect_slp_analyze_node_dependences): Update calls accordingly.
3145         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
3146         instead of DR_VECT_AUX.
3147         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3148         of a vector data references.  Use vec_info::lookup_dr instead of
3149         DR_VECT_AUX.
3150         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3151         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
3152         instead of DR_VECT_AUX.
3154 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3156         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3157         dr_vec_info.
3158         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3159         accordingly.
3160         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3161         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3162         (vect_gen_prolog_loop_niters): Likewise.
3164 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3166         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3167         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3168         (vect_known_alignment_in_bytes, vect_dr_behavior)
3169         (vect_get_scalar_dr_size): Take references as dr_vec_infos
3170         instead of data_references.  Update calls to other routines for
3171         which the same change has been made.
3172         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3173         dr_vec_infos instead of stmt_vec_infos.
3174         (vect_analyze_data_ref_dependence): Update call accordingly.
3175         (vect_slp_analyze_data_ref_dependence)
3176         (vect_record_base_alignments): Use DR_VECT_AUX.
3177         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3178         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3179         (vector_alignment_reachable_p, vect_get_data_access_cost)
3180         (vect_peeling_supportable, vect_analyze_group_access_1)
3181         (vect_analyze_group_access, vect_analyze_data_ref_access)
3182         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3183         (vect_compile_time_alias, vect_small_gap_p)
3184         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3185         (vect_supportable_dr_alignment): Take references as dr_vec_infos
3186         instead of data_references.  Update calls to other routines for
3187         which the same change has been made.
3188         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3189         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3190         (vect_slp_analyze_and_verify_node_alignment)
3191         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3192         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3193         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
3194         above changes.
3195         (_vect_peel_info::dr): Replace with...
3196         (_vect_peel_info::dr_info): ...this new field.
3197         (vect_peeling_hash_get_most_frequent)
3198         (vect_peeling_hash_choose_best_peeling): Update accordingly.
3199         (vect_peeling_hash_get_lowest_cost):
3200         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
3201         routines for which the same change has been made.
3202         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
3203         data_reference.
3204         * tree-vect-loop-manip.c (get_misalign_in_elems)
3205         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
3206         above changes.
3207         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3208         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3209         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3210         (get_group_load_store_type, get_negative_load_store_type)
3211         (vect_get_data_ptr_increment, vectorizable_store)
3212         (vectorizable_load): Likewise.
3213         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3214         Update calls to other routines for which the same change has been made.
3216 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3218         * tree-vectorizer.h (vec_info::move_dr): New member function.
3219         (dataref_aux): Rename to...
3220         (dr_vec_info): ...this and add "dr" and "stmt" fields.
3221         (_stmt_vec_info::dr_aux): Update accordingly.
3222         (_stmt_vec_info::data_ref_info): Delete.
3223         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3224         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3225         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3226         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3227         of data_ref.
3228         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
3229         (STMT_VINFO_DR_INFO): New macro.
3230         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3231         (set_dr_misalignment): Update after rename of dataref_aux.
3232         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
3233         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3234         initialization of STMT_VINFO_DATA_REF.
3235         * tree-vectorizer.c (vec_info::move_dr): New function.
3236         * tree-vect-patterns.c (vect_recog_bool_pattern)
3237         (vect_recog_mask_conversion_pattern)
3238         (vect_recog_gather_scatter_pattern): Use it.
3239         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3240         the "dr" and "stmt" fields of dr_vec_info instead of
3241         STMT_VINFO_DATA_REF.
3243 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3245         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3246         (is_pattern_stmt_p): Use it.
3247         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3248         on pattern statements.
3250 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3252         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3253         original stmt as a stmt_vec_info rather than a gimple stmt.
3254         (vect_pattern_recog_1): Take the statement directly as a
3255         stmt_vec_info, rather than via a gimple_stmt_iterator.
3256         Update call to vect_mark_pattern_stmts.
3257         (vect_pattern_recog): Update calls accordingly.
3259 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3261         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3262         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3263         a vect_def_type for the first argument.
3264         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3265         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
3266         operand if it isn't defined by a vectorized statement.
3267         (vect_build_gather_load_calls): Remove the mask_dt argument and
3268         update calls to vect_get_vec_def_for_stmt_copy.
3269         (vectorizable_bswap): Likewise the dt argument.
3270         (vectorizable_call): Update calls to vectorizable_bswap and
3271         vect_get_vec_def_for_stmt_copy.
3272         (vectorizable_simd_clone_call, vectorizable_assignment)
3273         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3274         (vectorizable_comparison): Update calls to
3275         vect_get_vec_def_for_stmt_copy.
3276         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
3277         vect_is_simple_use.
3278         (vect_get_loop_based_defs): Remove dt argument and update call
3279         to vect_get_vec_def_for_stmt_copy.
3280         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3281         and vect_get_vec_def_for_stmt_copy.
3282         (vectorizable_load): Update calls to vect_build_gather_load_calls
3283         and vect_get_vec_def_for_stmt_copy.
3284         * tree-vect-loop.c (vect_create_epilog_for_reduction)
3285         (vectorizable_reduction, vectorizable_live_operation): Update calls
3286         to vect_get_vec_def_for_stmt_copy.
3288 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3290         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3291         and gimple stmt arguments with a stmt_vec_info.
3292         (vect_record_base_alignments): Update calls accordingly.
3293         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3294         and gimple stmt arguments with a stmt_vec_info.
3295         (vect_build_slp_tree_1): Remove vinfo argument and update call
3296         to vect_record_max_nunits.
3297         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3298         and vect_record_max_nunits.
3300 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3302         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3303         file and take a stmt_vec_info instead of a gimple stmt.
3304         (supportable_widening_operation, vect_finish_replace_stmt)
3305         (vect_finish_stmt_generation, vect_get_store_rhs)
3306         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3307         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3308         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3309         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3310         (vect_create_data_ref_ptr, bump_vector_ptr)
3311         (vect_permute_store_chain, vect_setup_realignment)
3312         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3313         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3314         (vectorizable_reduction, vectorizable_induction)
3315         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3316         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3317         than gimple stmts as arguments.
3318         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3319         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3320         (can_group_stmts_p, vect_check_gather_scatter)
3321         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3322         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3323         (vect_permute_load_chain, vect_shift_permute_load_chain)
3324         (vect_transform_grouped_load)
3325         (vect_record_grouped_load_vectors): Likewise.
3326         * tree-vect-loop.c (vect_fixup_reduc_chain)
3327         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3328         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3329         (vectorizable_reduction, vectorizable_induction)
3330         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3331         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3332         (vect_get_load_store_mask): Likewise.
3333         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3334         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3335         * tree-vect-stmts.c (vect_mark_relevant)
3336         (is_simple_and_all_uses_invariant)
3337         (exist_non_indexing_operands_for_use_p, process_use)
3338         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3339         (vect_get_vec_def_for_operand, vect_get_vec_defs)
3340         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3341         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3342         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3343         (get_negative_load_store_type, get_load_store_type)
3344         (vect_check_load_store_mask, vect_check_store_rhs)
3345         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3346         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3347         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3348         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3349         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3350         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3351         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3352         (supportable_widening_operation): Likewise.
3354 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3356         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3357         a stmt_vec_info instead of a gcall.
3358         (vect_check_gather_scatter): Update call accordingly.
3359         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3360         of a gphi.
3361         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3362         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3363         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3364         instead of a gimple stmt.
3365         (vect_transform_loop): Update calls accordingly.
3366         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3367         stmt_vec_infos instead of gimple stmts.
3368         (vect_analyze_slp_instance): Update use accordingly.
3369         * tree-vect-stmts.c (read_vector_array, write_vector_array)
3370         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3371         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3372         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3373         (vect_gen_widened_results_half, vect_get_loop_based_defs)
3374         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3375         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3376         down to subroutines.
3378 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3380         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3381         of the worklist from a vector of gimple stmts to a vector of
3382         stmt_vec_infos.
3383         * tree-vect-stmts.c (vect_mark_relevant, process_use)
3384         (vect_mark_stmts_to_be_vectorized): Likewise
3386 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3388         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
3389         statement before passing it to vect_analyze_stmt.
3390         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
3391         the chain of phi vector definitions.  Track the exit phi via its
3392         stmt_vec_info.
3393         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
3394         STMT_VINFO_REDUC_DEF.
3395         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
3396         stmt_vec_infos to handle the statement chains.
3397         (vect_get_slp_defs): Record the first statement in the node
3398         using a stmt_vec_info.
3399         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
3400         statements here and pass their stmt_vec_info down to subroutines.
3401         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
3402         down to vect_finish_stmt_generation.
3403         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
3404         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
3405         stmt_vec_infos to subroutines.
3406         (vect_remove_stores): Use stmt_vec_infos to handle the statement
3407         chains.
3409 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3411         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
3412         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
3413         (vect_permute_store_chain, vect_setup_realignment)
3414         (vect_permute_load_chain, vect_shift_permute_load_chain)
3415         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
3416         stmts internally, and when passing values to other vectorizer routines.
3417         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3418         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
3419         (vect_analyze_loop_operations, get_initial_def_for_reduction)
3420         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
3421         (vectorizable_reduction, vectorizable_induction)
3422         (vectorizable_live_operation, vect_transform_loop_stmt)
3423         (vect_transform_loop): Likewise.
3424         * tree-vect-patterns.c (vect_reassociating_reduction_p)
3425         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
3426         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
3427         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3428         (vect_slp_analyze_node_operations_1): Likewise.
3429         * tree-vect-stmts.c (vect_mark_relevant, process_use)
3430         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
3431         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
3432         (vect_finish_stmt_generation_1, get_group_load_store_type)
3433         (get_load_store_type, vect_build_gather_load_calls)
3434         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3435         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3436         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3437         (vectorizable_store, vectorizable_load, vectorizable_condition)
3438         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
3439         (supportable_widening_operation): Likewise.
3440         (vect_get_vector_types_for_stmt): Likewise.
3441         * tree-vectorizer.h (vect_dr_behavior): Likewise.
3443 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3445         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3446         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
3447         (vect_permute_store_chain, vect_permute_load_chain)
3448         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
3449         repeated stmt_vec_info lookups.
3450         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3451         (vect_update_ivs_after_vectorizer): Likewise.
3452         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
3453         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3454         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
3455         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3456         (vect_bb_slp_scalar_cost): Likewise.
3457         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
3459 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3461         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
3462         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
3463         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
3464         to get gassigns and gcalls, rather than operating on generc gimple
3465         stmts.
3466         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
3467         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
3468         (vectorizable_load, vect_analyze_stmt): Likewise.
3469         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
3471 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3473         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
3474         return stmt_vec_infos rather than gimple stmts.  Do not accept
3475         null arguments.
3476         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
3477         of a gimple stmt.
3478         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3479         Update use of get_later_stmt.
3480         (vect_get_constant_vectors): Update call accordingly.
3481         (vect_schedule_slp_instance): Likewise
3482         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
3483         (vect_slp_analyze_instance_dependence): Likewise.
3484         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
3486 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3488         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
3489         (stmt_info_for_cost::stmt_info): ...this new field.
3490         (add_stmt_costs): Update accordingly.
3491         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3492         (vect_get_known_peeling_cost): Likewise.
3493         (vect_estimate_min_profitable_iters): Likewise.
3494         * tree-vect-stmts.c (record_stmt_cost): Likewise.
3496 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3498         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
3499         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3500         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3501         accordingly.
3502         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
3504 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3506         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
3507         a gimple stmt to a stmt_vec_info.
3508         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3510 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3512         * tree-vectorizer.h (vec_info::grouped_stores): Change from
3513         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3514         (_loop_vec_info::reduction_chains): Likewise.
3515         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
3516         accordingly.
3517         * tree-vect-slp.c (vect_analyze_slp): Likewise.
3519 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3521         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
3522         a gimple stmt to a stmt_vec_info.
3523         (_stmt_vec_info::next_element): Likewise.
3524         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
3525         (vect_slp_analyze_and_verify_node_alignment)
3526         (vect_analyze_group_access_1, vect_analyze_group_access)
3527         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
3528         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
3529         (vect_supportable_dr_alignment): Update accordingly.
3530         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
3531         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
3532         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
3533         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3534         * tree-vect-slp.c (vect_build_slp_tree_1)
3535         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
3536         (vect_split_slp_store_group, vect_analyze_slp_instance)
3537         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
3538         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
3539         (get_group_load_store_type, get_load_store_type)
3540         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
3541         (vect_transform_stmt, vect_remove_stores): Likewise.
3543 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3545         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
3546         than a gimple stmt.
3547         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3548         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
3549         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
3550         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
3551         (vector_alignment_reachable_p, vect_get_data_access_cost)
3552         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
3553         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
3554         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3555         (vect_analyze_group_access_1, vect_analyze_group_access)
3556         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
3557         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
3558         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
3559         result of vect_dr_stmt and use the stmt_vec_info instead of
3560         the associated gimple stmt.
3561         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3562         (vect_gen_prolog_loop_niters): Likewise.
3563         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3565 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3567         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
3568         to a vec<stmt_vec_info>.
3569         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
3570         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
3571         vec<stmt_vec_info>.
3572         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
3573         to a vec<stmt_vec_info>.
3574         (bst_traits::value_type, bst_traits::value_type): Likewise.
3575         (bst_traits::hash): Update accordingly.
3576         (vect_get_and_check_slp_defs): Change the stmts parameter from
3577         a vec<gimple *> to a vec<stmt_vec_info>.
3578         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
3579         (vect_build_slp_tree): Likewise.
3580         (vect_build_slp_tree_2): Likewise.  Update uses of
3581         SLP_TREE_SCALAR_STMTS.
3582         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
3583         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
3584         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
3585         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
3586         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
3587         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
3588         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
3589         (vect_get_constant_vectors, vect_get_slp_defs)
3590         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
3591         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
3592         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
3593         instead of gimple stmts.
3594         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
3595         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
3596         (vect_slp_analyze_instance_dependence): Update uses of
3597         SLP_TREE_SCALAR_STMTS.
3598         (vect_slp_analyze_and_verify_node_alignment): Likewise.
3599         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
3600         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
3601         (get_initial_defs_for_reduction): Likewise.
3602         (vect_create_epilog_for_reduction): Likewise.
3603         (vectorize_fold_left_reduction): Likewise.
3604         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
3605         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
3606         (can_vectorize_live_stmts): Likewise.
3608 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3610         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
3611         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3612         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
3613         than gimple stmts.
3614         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
3615         of a gimple stmt.
3616         (gather_scalar_reductions): Update after above interface changes.
3617         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
3618         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
3619         than gimple stmts.
3620         (vect_force_simple_reduction): Likewise.
3621         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
3622         LOOP_VINFO_REDUCTIONS.
3623         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3625 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3627         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
3628         a gimple stmt to a stmt_vec_info.
3629         * tree-vect-loop.c (vect_active_double_reduction_p)
3630         (vect_force_simple_reduction, vectorizable_reduction): Update
3631         accordingly.
3633 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3635         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
3636         vec<gimple *> to a vec<stmt_vec_info>.
3637         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
3638         the reduction_phis argument from a vec<gimple *> to a
3639         vec<stmt_vec_info>.
3640         (vectorizable_reduction): Likewise the phis local variable that
3641         is passed to vect_create_epilog_for_reduction.  Update for new type
3642         of SLP_TREE_VEC_STMTS.
3643         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
3644         (vectorizable_live_operation): Likewise.
3645         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
3646         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
3648 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3650         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
3651         a gimple stmt to a stmt_vec_info.
3652         (vectorizable_condition, vectorizable_live_operation)
3653         (vectorizable_reduction, vectorizable_induction): Pass back the
3654         vectorized statement as a stmt_vec_info.
3655         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
3656         use of STMT_VINFO_VEC_STMT.
3657         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
3658         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
3659         as stmt_vec_infos rather than gimple stmts.
3660         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
3661         to a stmt_vec_info.
3662         (vectorizable_live_operation): Likewise.
3663         (vectorizable_reduction, vectorizable_induction): Likewise,
3664         updating use of STMT_VINFO_VEC_STMT.
3665         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
3666         of STMT_VINFO_VEC_STMT.
3667         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
3668         (vectorizable_simd_clone_call, vectorizable_conversion)
3669         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3670         (vectorizable_store, vectorizable_load, vectorizable_condition)
3671         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
3672         from a gimple stmt to a stmt_vec_info.
3673         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
3674         pointer to a stmt_vec_info to the vectorizable_* routines.
3676 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3678         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
3679         a gimple stmt to a stmt_vec_info.
3680         (is_pattern_stmt_p): Update accordingly.
3681         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
3682         (vect_record_grouped_load_vectors): Likewise.
3683         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3684         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
3685         (vect_model_reduction_cost): Likewise.
3686         (vect_create_epilog_for_reduction): Likewise.
3687         (vectorizable_reduction, vectorizable_induction): Likewise.
3688         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3689         Return the stmt_vec_info for the pattern statement.
3690         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
3691         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
3692         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3693         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
3694         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3695         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
3696         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
3697         (free_stmt_vec_info, vect_is_simple_use): Likewise.
3699 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3701         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
3702         (vect_finish_stmt_generation): Likewise.
3703         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3704         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
3705         (vect_build_gather_load_calls): Use the return value of the above
3706         functions instead of a separate call to vinfo_for_stmt.  Use narrow
3707         scopes for the input gimple stmt and wider scopes for the associated
3708         stmt_vec_info.  Use vec_info::lookup_def when setting these
3709         stmt_vec_infos from an SSA_NAME definition.
3710         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3711         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3712         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3713         (vectorizable_store, vectorizable_load, vectorizable_condition)
3714         (vectorizable_comparison): Likewise.
3715         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
3716         (vectorizable_reduction): Likewise.
3718 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3720         * tree-vectorizer.h (vect_is_simple_use): Add an optional
3721         stmt_vec_info * parameter before the optional gimple **.
3722         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3723         (process_use, vect_get_vec_def_for_operand_1): Update callers.
3724         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
3725         * tree-vect-loop.c (vectorizable_reduction): Likewise.
3726         (vectorizable_live_operation): Likewise.
3727         * tree-vect-patterns.c (type_conversion_p): Likewise.
3728         (vect_look_through_possible_promotion): Likewise.
3729         (vect_recog_rotate_pattern): Likewise.
3730         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3732 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3734         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
3735         a typedef to a wrapper class.
3736         (NULL_STMT_VEC_INFO): New macro.
3737         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
3738         (stmt_vec_info::operator*): New function.
3739         (stmt_vec_info::operator gimple *): Likewise.
3740         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
3741         (add_stmt_costs): Likewise.
3742         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
3743         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3744         (vect_get_known_peeling_cost): Likewise.
3745         (vect_estimate_min_profitable_iters): Likewise.
3746         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3747         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
3748         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3749         (vectorizable_store, free_stmt_vec_infos): Likewise.
3750         (new_stmt_vec_info): Change return type of xcalloc to
3751         _stmt_vec_info *.
3753 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3755         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
3756         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
3757         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
3758         a single_imm_use-based sequence.
3759         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
3761 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3763         * tree-vectorizer.h (vec_info::lookup_def): Declare.
3764         * tree-vectorizer.c (vec_info::lookup_def): New function.
3765         * tree-vect-patterns.c (vect_get_internal_def): Use it.
3766         (vect_widened_op_tree): Likewise.
3767         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3768         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
3769         (vectorizable_reduction): Likewise.
3770         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
3771         of a gimple *.
3772         (vect_is_slp_reduction): Update calls accordingly.  Use
3773         vec_info::lookup_def.
3774         (vect_is_simple_reduction): Likewise
3775         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
3777 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3779         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
3780         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
3781         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
3782         of vinfo_for_stmt.
3783         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
3784         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
3785         (vect_update_vf_for_slp, vect_analyze_loop_operations)
3786         (vect_is_slp_reduction, vectorizable_induction)
3787         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
3788         * tree-vect-patterns.c (vect_init_pattern_stmt):
3789         (vect_determine_min_output_precision_1, vect_determine_precisions)
3790         (vect_pattern_recog): Likewise.
3791         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
3792         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
3793         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
3794         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3795         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
3796         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
3797         info field from a loop to a loop_vec_info.
3799 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3801         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
3802         (vec_info::add_stmt): Declare.
3803         * tree-vectorizer.c (vec_info::add_stmt): New function.
3804         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
3805         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
3806         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3807         (vectorizable_induction): Likewise.
3808         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
3809         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3810         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
3811         (vectorizable_load): Likewise.
3812         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3813         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
3814         (vect_recog_gather_scatter_pattern): Likewise.
3815         (append_pattern_def_seq): Likewise.  Remove a check that is
3816         performed by add_stmt itself.
3818 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3820         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
3821         which make_ssa_name was called with new_stmt before new_stmt
3822         had been created.
3824 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3826         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
3827         split out from...
3828         (vect_is_slp_reduction): ...here...
3829         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
3830         that are already known to be false.
3832 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3834         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
3835         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
3836         STMT_VINFO_NUM_SLP_USES when it's true.
3837         (vect_free_slp_instance): Add a final_p parameter and pass it to
3838         vect_free_slp_tree.
3839         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
3840         (vect_analyze_slp_instance): Likewise.
3841         (vect_slp_analyze_operations): Likewise.
3842         (vect_slp_analyze_bb_1): Likewise.
3843         * tree-vectorizer.c (vec_info): Likewise.
3844         * tree-vect-loop.c (vect_transform_loop): Likewise.
3846 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3848         * tree-vect-loop.c (vectorizable_reduction): Assert that the
3849         function is not called for second and subsequent members of
3850         a reduction group.
3852 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3854         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
3855         cases for nested loops from here to ...
3856         (vect_create_epilog_for_reduction): ...here.  Only call
3857         vect_is_simple_use for inner-loop reductions.
3859 2018-07-31  Martin Liska  <mliska@suse.cz>
3861         PR gcov-profile/85338
3862         PR gcov-profile/85350
3863         PR gcov-profile/85372
3864         * profile.c (struct location_triplet): New.
3865         (struct location_triplet_hash): Likewise.
3866         (output_location): Do not output a BB that
3867         is already recorded for a line.
3868         (branch_prob): Use streamed_locations.
3870 2018-07-31  Martin Liska  <mliska@suse.cz>
3872         PR gcov-profile/85370
3873         * coverage.c (coverage_begin_function): Do not mark target
3874         clones as artificial functions.
3876 2018-07-31  Martin Liska  <mliska@suse.cz>
3878         PR gcov-profile/83813
3879         PR gcov-profile/84758
3880         PR gcov-profile/85217
3881         PR gcov-profile/85332
3882         * profile.c (branch_prob): Do not record GOTO expressions
3883         for GIMPLE statements which locations are already streamed.
3885 2018-07-31  Olivier Hainque  <hainque@adacore.com>
3887         * gcc.c (handle_spec_function): Accept a soft_matched_part
3888         argument, as do_spec_1.  Pass it down to ...
3889         (eval_spec_function): Accept a soft_matched_part argument,
3890         and pass it down to ...
3891         (do_spec_2): Accept a soft_matched_part argument, and pass
3892         it down to do_spec_1.
3893         (do_spec_1): Pass soft_matched_part to handle_spec_function.
3894         (handle_braces): Update call to handle_spec_function.
3895         (driver::set_up_specs): Update calls to do_spec_2.
3896         (compare_debug_dump_opt_spec_function): Likewise.
3897         (compare_debug_self_opt_spec_function): Likewise.
3899 2018-07-31  Olivier Hainque  <hainque@adacore.com>
3901         * common.opt (nolibc): New option.
3902         * doc/invoke.texi (Link Options): Document it.
3903         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
3904         * config/alpha/linux.h: Likewise.
3905         * config/arc/elf.h: Likewise.
3906         * config/arm/uclinux-elf.h: Likewise.
3907         * config/arm/unknown-elf.h: Likewise.
3908         * config/avr/avrlibc.h: Likewise.
3909         * config/bfin/bfin.h: Likewise.
3910         * config/bfin/linux.h: Likewise.
3911         * config/bfin/uclinux.h: Likewise.
3912         * config/darwin.h: Likewise.
3913         * config/darwin10.h: Likewise.
3914         * config/darwin12.h: Likewise.
3915         * config/gnu-user.h: Likewise.
3916         * config/lm32/uclinux-elf.h: Likewise.
3917         * config/pa/pa-hpux11.h: Likewise.
3918         * config/pa/pa64-hpux.h: Likewise.
3919         * config/sparc/sparc.h: Likewise.
3921 2018-07-31  Olivier Hainque  <hainque@adacore.com>
3923         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
3924         undefined variables.
3926 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
3928         PR target/86640
3929         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
3930         instead of GEN_INT.
3932 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3934         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3935         terminated string literal.
3937 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
3939         PR rtl-optimization/85160
3940         * combine.c (is_just_move): New function.
3941         (try_combine): Allow combining two instructions into two if neither of
3942         the original instructions was a move.
3944 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
3946         PR target/86673
3947         * doc/extend.texi (Global Register Variables): Discourage use of type
3948         qualifiers.
3949         (Local Register Variables): Likewise.
3951 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
3953         PR tree-optimization/86506
3954         * hwint.h (ceil_log2): Resync with hwint.c implementation.
3956 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
3958         PR target/86547
3959         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
3960         hard_regno, make sure no insn between `from` and `to` clobbers it.
3962 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
3963             Tom de Vries  <tdevries@suse.de>
3965         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
3966         (PTX_DEFAULT_RUNTIME_DIM): ... this.
3967         (nvptx_goacc_validate_dims): Set default worker and gang dims to
3968         PTX_DEFAULT_RUNTIME_DIM.
3969         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
3971 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
3973         * config/pa/pa.c (pa_output_addr_vec): Align address table.
3974         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
3975         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
3977 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
3979         * config/rs6000/constraints.md (wG constraint): Delete, no longer
3980         used.
3981         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
3982         predicate to reflect toc fusion has been deleted.
3983         (toc_fusion_mem_raw): Delete, no longer used.
3984         (toc_fusion_mem_wrapped): Likewise.
3985         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
3986         fusion mask bit.
3987         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
3988         Delete, no longer used.
3989         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
3990         meant to be used for toc fusion.
3991         (rs6000_debug_print_mode): Delete toc fusion debugging.
3992         (rs6000_debug_reg_global): Likewise.
3993         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
3994         fusion and secondary reload support that were never used.
3995         (rs6000_option_override_internal): Delete TOC fusion, that was only
3996         partially defined, and it did not work unless you also used the
3997         -mcmodel= switch.
3998         (rs6000_legitimate_address_p): Delete TOC fusion support.
3999         (rs6000_opt_masks): Likewise.
4000         (fusion_wrap_memory_address): Delete function, no longer used.
4001         (fusion_split_address); Delete TOC fusion support.
4002         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4003         longer used with toc fusion being deleted.
4004         (TARGET_TOC_FUSION_FP): Likewise.
4005         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4006         UNSPEC.
4007         (toc fusion spliter): Delete TOC fusion support.
4008         (toc_fusionload_<mode>): Likewise.
4009         (toc_fusionload_di): Likewise.
4010         (fusion_gpr_load_<mode>): Delete generator function, this insn no
4011         longer needs to be named.  Rename predicate to delete TOC fusion.
4012         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4013         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4014         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4015         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4016         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4018 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4020         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4021         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
4022         __int128 in built-in function prototypes.
4023         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4024         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4026 2018-07-27  Martin Sebor  <msebor@redhat.com>
4028         PR tree-optimization/86696
4029         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4030         types, including enums.
4031         (handle_char_store): Be prepared for the above function to fail.
4033 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
4035         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4036         when optimization level is lower than 2 or optimize for size.
4038 2018-07-26  Martin Sebor  <msebor@redhat.com>
4040         PR tree-optimization/86043
4041         PR tree-optimization/86042
4042         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4043         (get_string_cst_length): Rename...
4044         (get_min_string_length): ...to this.  Add argument.
4045         (handle_char_store): Extend to handle multi-character stores by
4046         MEM_REF.
4047         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
4048         * tree.h (initializer_zerop): Add argument.
4050 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
4052         PR middle-end/86660
4053         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4054         declare target to variables if they have always,{to,from,tofrom} map
4055         kinds.
4057 2018-07-26  Martin Liska  <mliska@suse.cz>
4059         PR lto/86548
4060         * lto-wrapper.c: Add linker_output as prefix
4061         for ltrans_output_file.
4063 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
4065         PR rtl-optimization/85805
4066         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4067         value for hard registers if that was written in the same mode.
4069 2018-07-26  Martin Liska  <mliska@suse.cz>
4071         PR gcov-profile/86536
4072         * gcov.c (format_gcov): Use printf format %.*f directly
4073         and do not handle special values.
4075 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4077         * common/config/arc/arc-common.c (arc_option_optimization_table):
4078         Update default optimizations for size.
4080 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4082         * config/arc/arc.md (movsf_insn): Add short instruction selection.
4083         * config/arc/constraints.md (CfZ): New constraint.
4084         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4085         (subsf3_fpu): Likewise.
4086         (cmpsf_fpu): Likewise.
4087         (cmpsf_fpu_uneq): Likewise.
4089 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4091         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4092         accesses as well.
4093         (arc_is_uncached_mem_p): uncached applies to both the variable and
4094         the pointer.
4096 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4098         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4099         register names.
4101 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
4103         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4104         field "m_scopes" from vec to auto_vec.
4106 2018-07-25  Martin Liska  <mliska@suse.cz>
4108         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4109         return type.
4111 2018-07-25  Richard Biener  <rguenther@suse.de>
4113         PR debug/86654
4114         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4115         special wrt context_die late.
4116         (gen_subprogram_die): Re-use DIEs in local scope.
4118 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
4120         PR tree-optimization/86644
4121         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
4123 2018-07-25  Martin Liska  <mliska@suse.cz>
4125         PR middle-end/86645
4126         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4127         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4129 2018-07-25  Martin Liska  <mliska@suse.cz>
4131         PR sanitizer/79635
4132         * params.def: Explain ASan abbreviation and provide
4133         a documentation link.
4135 2018-07-24  Martin Sebor  <msebor@redhat.com>
4137         PR tree-optimization/86622
4138         PR tree-optimization/86532
4139         * builtins.h (string_length): Declare.
4140         * builtins.c (c_strlen): Correct handling of non-constant offsets.
4141         (check_access): Be prepared for non-constant length ranges.
4142         (string_length): Make extern.
4143         * expr.c (string_constant): Only handle the minor non-constant
4144         array index.  Use string_constant to compute the length of
4145         a generic string constant.
4147 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
4149         PR tree-optimization/86618
4150         * tree-vect-stmts.c (vectorizable_call): Don't take the address
4151         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4153 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
4155         PR tree-optimization/86636
4156         * json.cc (json::object::set): Fix comment.  Add assertions.
4157         (json::array::append): Move here from json.h.  Add comment and an
4158         assertion.
4159         (json::string::string): Likewise.
4160         * json.h (json::array::append): Move to json.cc.
4161         (json::string::string): Likewise.
4162         * optinfo-emit-json.cc
4163         (optrecord_json_writer::impl_location_to_json): Assert that we
4164         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4165         wrapper around it.  Expand the location once, rather than three
4166         times.
4167         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4168         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4169         wrappers.
4170         (optrecord_json_writer::optinfo_to_json): Likewise, in four
4171         places.  Fix some overlong lines.
4173 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
4175         * config/aarch64/aarch64-simd.md
4176         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4177         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4178         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4179         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4180         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4181         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4182         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4183         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4184         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4186 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
4188         PR middle-end/86627
4189         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4190         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
4191         and abs_d == d, do the power of two handling if profitable.
4193 2018-07-24  Richard Biener  <rguenther@suse.de>
4195         * match.pd: Add BIT_FIELD_REF canonicalizations.
4197 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4199         PR c/86617
4200         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4202 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4204         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4205         terminated STRING_CST object.
4207 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4209         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4211 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
4213         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4214         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4215         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4216         the elements into a register.
4217         (rs6000_split_v4si_init_di_reg): Delete.
4218         (rs6000_split_v4si_init): Delete.
4219         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4220         (vsx_init_v4si): Rewrite as a define_expand.
4222 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
4224         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4225         zero_extend argument from memory): New.
4227 2018-07-22  Martin Sebor  <msebor@redhat.com>
4229         PR bootstrap/86621
4230         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4231         diagnosing calls with unknown arguments unless -Walloca-larger-than
4232         is restricted to less than PTRDIFF_MAX bytes.
4234 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
4236         * doc/gcov.texi (Invoking Gcov): Editorial changes.
4238 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
4240         * pretty-print.c (text_info::set_location): Remove redundant
4241         "line_table" parameter from call to rich_location::set_range.
4243 2018-07-20  Martin Sebor  <msebor@redhat.com>
4245         PR middle-end/82063
4246         * builtins.c (expand_builtin_alloca): Adjust.
4247         * calls.c (alloc_max_size): Simplify.
4248         * cgraphunit.c (cgraph_node::expand): Adjust.
4249         * common.opt (larger_than_size, warn_frame_larger_than): Remove
4250         variables.
4251         (frame_larger_than_size): Same.
4252         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4253         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4254         Initialize.
4255         * doc/invoke.texi (GCC Command Options): Document option arguments.
4256         Explain byte-size arguments and suffixes.
4257         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4258         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4259         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4260         * doc/options.texi (UInteger): Expand.
4261         (Host_Wide_Int, ByteSize): Document new properties.
4262         * final.c (final_start_function_1): Include sizes in an error message.
4263         * function.c (frame_offset_overflow): Same.
4264         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4265         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4266         Diagnose unbounded alloca calls only for limits of less than
4267         PTRDIFF_MAX.
4268         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
4269         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
4270         for alloca(0).
4271         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
4272         only for limits of less than PTRDIFF_MAX.
4273         * langhooks-def.h (lhd_handle_option): Change function argument
4274         to HOST_WIDE_INT.
4275         * langhooks.c (lhd_handle_option): Same.
4276         * langhooks.h (handle_option): Same.
4277         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4278         ByteSize flags.
4279         (var_type, var_type_struct): Same.
4280         (var_set): Handle ByteSize flag.
4281         * optc-gen.awk: Add comments to output to ease debugging.  Make
4282         use of HOST_WIDE_INT where appropriate.
4283         * opts-gen-save.awk:  Use %lx to format unsigned long.
4284         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4285         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4286         arguments.  Parse bytes-size suffixes.
4287         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4288         (enum_value_to_arg): Same.
4289         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
4290         (handle_option): Adjust.
4291         (generate_option): Change function argument to HOST_WIDE_INT.
4292         (cmdline_handle_error): Adjust.
4293         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4294         (set_option): Change function argument to HOST_WIDE_INT.
4295         (option_enabled): Handle cl_host_wide_int.
4296         (get_option_state): Handle CLVC_SIZE.
4297         (control_warning_option): Same.
4298         * opts.c (common_handle_option): Change function argument to
4299         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
4300         OPT_Wvla_larger_than_.
4301         * opts.h (enum cl_var_type): Add an enumerator.
4302         * stor-layout.c (layout_decl): Print a more meaningful warning.
4303         * toplev.c (output_stack_usage): Adjust.
4305 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
4307         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4308         call to inline_expand_builtin_string_cmp.
4309         (expand_builtin_strcmp): Likewise.
4310         (expand_builtin_strncmp): Likewise.
4311         (inline_string_cmp): Delete the last parameter, change char_type_node
4312         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4313         two operands.
4314         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4315         the inlining expansion on target where the type of the call has same or
4316         narrower precision than unsigned char.
4318 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
4320         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4321         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4322         * common.opt (fsave-optimization-record): New option.
4323         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4324         * doc/invoke.texi (-fsave-optimization-record): New option.
4325         * dumpfile.c: Include "optinfo-emit-json.h".
4326         (struct kv_pair): Move to coretypes.h.
4327         (optgroup_options): Make non-static.
4328         (dump_context::end_scope): Call
4329         optimization_records_maybe_pop_dump_scope.
4330         * dumpfile.h (optgroup_options): New decl.
4331         * json.cc: New file.
4332         * json.h: New file.
4333         * optinfo-emit-json.cc: New file.
4334         * optinfo-emit-json.h: New file.
4335         * optinfo.cc: Include "optinfo-emit-json.h".
4336         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4337         (optinfo_enabled_p): Check optimization_records_enabled_p.
4338         (optinfo_wants_inlining_info_p): Likewise.
4339         * optinfo.h: Update comment.
4340         * profile-count.c (profile_quality_as_string): New function.
4341         * profile-count.h (profile_quality_as_string): New decl.
4342         (profile_count::quality): New accessor.
4343         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4344         and optinfo_emit_json_cc_tests.
4345         * selftest.h (selftest::json_cc_tests): New decl.
4346         (selftest::optinfo_emit_json_cc_tests): New decl.
4347         * toplev.c: Include "optinfo-emit-json.h".
4348         (compile_file): Call optimization_records_finish.
4349         (do_compile): Call optimization_records_start.
4350         * tree-ssa-live.c: Include optinfo.h.
4351         (remove_unused_scope_block_p): Retain inlining information if
4352         optinfo_wants_inlining_info_p returns true.
4354 2018-07-20  Richard Biener  <rguenther@suse.de>
4356         PR debug/86585
4357         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4358         to cover -flto-partition=none.
4360 2018-07-20  Martin Liska  <mliska@suse.cz>
4362         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4363         (get_decl_source_range): Remove unused function.
4365 2018-07-20  Richard Biener  <rguenther@suse.de>
4367         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4368         (struct vn_phi_s): Likewise.
4369         (struct vn_reference_s): Likewise.
4370         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4371         for searching the slot of an entry known to be in the hash itself.
4372         (vn_phi_hasher::equal): Likewise.
4373         (vn_reference_hasher::equal): Likewise.
4374         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4375         globals.
4376         (optimistic_info, current_info): Remove, keeping only valid_info.
4377         (vn_reference_lookup_1): Remove fallback lookup.
4378         (vn_reference_lookup_2): Likewise.
4379         (vn_nary_op_lookup_1): Likewise.
4380         (vn_phi_lookup): Likewise.
4381         (vn_nary_build_or_lookup_1): Make sure to not chain the built
4382         hash element.
4383         (vn_reference_insert): Adjust, chain the inserted hash element
4384         at last_inserted_ref.
4385         (vn_reference_insert_pieces): Likewise.
4386         (visit_reference_op_call): Likewise.
4387         (vn_nary_op_insert_into): Chain the inserted hash element at
4388         last_inserted_nary.
4389         (vn_nary_op_insert_pieces): Adjust.
4390         (vn_nary_op_insert): Likewise.
4391         (vn_nary_op_insert_stmt): Likewise.
4392         (vn_phi_insert): Adjust, chain the inserted hash element at
4393         last_inserted_phi.
4394         (process_scc): Remove clearing and copying the optimistic
4395         table.  Instead remove elements inserted during an optimistic
4396         iteration from the single table we maintain.
4397         (init_scc_vn): Adjust.
4398         (free_scc_vn): Likewise.
4399         (sccvn_dom_walker::record_cond): Likewise.
4400         (sccvn_dom_walker::after_dom_children): Likewise.
4402 2018-07-19  Martin Sebor  <msebor@redhat.com>
4404         PR tree-optimization/84047
4405         PR tree-optimization/83776
4406         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
4407         (check_array_bounds): Call it.
4409 2018-07-19  Martin Sebor  <msebor@redhat.com>
4411         * align.h (align_flags): Use member initialization.
4413 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
4415         * Makefile.in (OBJS): Add optinfo.o.
4416         * coretypes.h (class symtab_node): New forward decl.
4417         (struct cgraph_node): New forward decl.
4418         (class varpool_node): New forward decl.
4419         * dump-context.h: New file.
4420         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4421         "tree-pass.h".
4422         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4423         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4424         (set_alt_dump_file): Likewise.
4425         (dump_context::~dump_context): New dtor.
4426         (dump_gimple_stmt): Move implementation to...
4427         (dump_context::dump_gimple_stmt): ...this new member function.
4428         Add the stmt to any pending optinfo, creating one if need be.
4429         (dump_gimple_stmt_loc): Move implementation to...
4430         (dump_context::dump_gimple_stmt_loc): ...this new member function.
4431         Start a new optinfo and add the stmt to it.
4432         (dump_gimple_expr): Move implementation to...
4433         (dump_context::dump_gimple_expr): ...this new member function.
4434         Add the stmt to any pending optinfo, creating one if need be.
4435         (dump_gimple_expr_loc): Move implementation to...
4436         (dump_context::dump_gimple_expr_loc): ...this new member function.
4437         Start a new optinfo and add the stmt to it.
4438         (dump_generic_expr): Move implementation to...
4439         (dump_context::dump_generic_expr): ...this new member function.
4440         Add the tree to any pending optinfo, creating one if need be.
4441         (dump_generic_expr_loc): Move implementation to...
4442         (dump_context::dump_generic_expr_loc): ...this new member
4443         function.  Add the tree to any pending optinfo, creating one if
4444         need be.
4445         (dump_printf): Move implementation to...
4446         (dump_context::dump_printf_va): ...this new member function.  Add
4447         the text to any pending optinfo, creating one if need be.
4448         (dump_printf_loc): Move implementation to...
4449         (dump_context::dump_printf_loc_va): ...this new member function.
4450         Start a new optinfo and add the stmt to it.
4451         (dump_dec): Move implementation to...
4452         (dump_context::dump_dec): ...this new member function.  Add the
4453         value to any pending optinfo, creating one if need be.
4454         (dump_context::dump_symtab_node): New member function.
4455         (dump_context::get_scope_depth): New member function.
4456         (dump_context::begin_scope): New member function.
4457         (dump_context::end_scope): New member function.
4458         (dump_context::ensure_pending_optinfo): New member function.
4459         (dump_context::begin_next_optinfo): New member function.
4460         (dump_context::end_any_optinfo): New member function.
4461         (dump_context::s_current): New global.
4462         (dump_context::s_default): New global.
4463         (dump_scope_depth): Delete global.
4464         (dumpfile_ensure_any_optinfo_are_flushed): New function.
4465         (dump_symtab_node): New function.
4466         (get_dump_scope_depth): Reimplement in terms of dump_context.
4467         (dump_begin_scope): Likewise.
4468         (dump_end_scope): Likewise.
4469         (selftest::temp_dump_context::temp_dump_context): New ctor.
4470         (selftest::temp_dump_context::~temp_dump_context): New dtor.
4471         (selftest::verify_item): New function.
4472         (ASSERT_IS_TEXT): New macro.
4473         (ASSERT_IS_TREE): New macro.
4474         (ASSERT_IS_GIMPLE): New macro.
4475         (selftest::test_capture_of_dump_calls): New test.
4476         (selftest::dumpfile_c_tests): Call it.
4477         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
4478         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
4479         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
4480         descriptive comment.
4481         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
4482         (dump_node, dump_bb): Move these unrelated decls.
4483         (class dump_manager): Add leading comment.
4484         * optinfo.cc: New file.
4485         * optinfo.h: New file.
4487 2018-07-19  Michael Collison  <michael.collison@arm.com>
4488             Richard Henderson <rth@redhat.com>
4490         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
4491         (subti): Handle op1 zero.
4492         (subvti4, usub4ti4): New.
4493         (*sub<GPI>3_compare1_imm): New.
4494         (sub<GPI>3_carryinCV): New.
4495         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
4496         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
4498 2018-07-19  Michael Collison  <michael.collison@arm.com>
4499             Richard Henderson <rth@redhat.com>
4501         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
4502         (addti3): Create simpler code if low part is already known to be 0.
4503         (addvti4, uaddvti4): New.
4504         (*add<GPI>3_compareC_cconly_imm): New.
4505         (*add<GPI>3_compareC_cconly): New.
4506         (*add<GPI>3_compareC_imm): New.
4507         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
4508         handle constants within this pattern..
4509         (*add<GPI>3_compareV_cconly_imm): New.
4510         (*add<GPI>3_compareV_cconly): New.
4511         (*add<GPI>3_compareV_imm): New.
4512         (add<GPI>3_compareV): New.
4513         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
4514         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
4515         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
4516         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
4517         with 'comparison' operator.
4518         (*add<GPI>3_compareV_cconly_imm): Ditto.
4519         (*add<GPI>3_compareV_cconly): Ditto.
4520         (*add<GPI>3_compareV_imm): Ditto.
4521         (add<GPI>3_compareV): Ditto.
4522         (add<mode>3_carryinC): Ditto.
4523         (*add<mode>3_carryinC_zero): Ditto.
4524         (*add<mode>3_carryinC): Ditto.
4525         (add<mode>3_carryinV): Ditto.
4526         (*add<mode>3_carryinV_zero): Ditto.
4527         (*add<mode>3_carryinV): Ditto.
4529 2018-07-19  Michael Collison  <michael.collison@arm.com>
4530             Richard Henderson <rth@redhat.com>
4532         * config/aarch64/aarch64-modes.def (CC_V): New.
4533         * config/aarch64/aarch64-protos.h
4534         (aarch64_addti_scratch_regs): Declare
4535         (aarch64_subvti_scratch_regs): Declare.
4536         (aarch64_expand_subvti): Declare.
4537         (aarch64_gen_unlikely_cbranch): Declare
4538         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
4539         for signed overflow using CC_Vmode.
4540         (aarch64_get_condition_code_1): Handle CC_Vmode.
4541         (aarch64_gen_unlikely_cbranch): New function.
4542         (aarch64_addti_scratch_regs): New function.
4543         (aarch64_subvti_scratch_regs): New function.
4544         (aarch64_expand_subvti): New function.
4546 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4548         * config/aarch64/aarch64-option-extensions.def: New entry for profile
4549         extension.
4550         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
4551         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
4552         extension.
4554 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4556         PR target/83009
4557         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4558         address check not strict.
4560 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4562         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
4563         Umq with Umn.
4564         (store_pair_lanes<mode>): Likewise.
4565         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
4566         enum value 'ADDR_QUERY_LDP_STP_N'.
4567         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
4568         (aarch64_print_address_internal): Add declaration.
4569         (aarch64_print_ldpstp_address): Remove.
4570         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
4571         (aarch64_print_operand): Change printing of 'y'.
4572         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
4573         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
4574         'true' rather than '1'.
4575         * config/aarch64/constraints.md (Uml): Likewise.
4576         (Uml): Rename to Umn.
4577         (Umq): Remove.
4579 2018-07-19  Richard Biener  <rguenther@suse.de>
4581         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
4582         a trailing array.
4583         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
4584         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
4585         (vn_reference_hasher): Likewise.
4586         (struct vn_tables_s): Remove obstack and alloc-pool members.
4587         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
4588         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
4589         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
4590         (vn_reference_insert_pieces): Likewise.
4591         (alloc_vn_nary_op_noinit): Adjust.
4592         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
4593         (vn_phi_eq): Adjust.
4594         (shared_lookup_phiargs): Remove.
4595         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
4596         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
4597         (visit_reference_op_call): Likewise.
4598         (copy_nary, copy_phi, copy_reference): Remove.
4599         (process_scc): Rewind the obstack when iterating.  Do not
4600         copy the elements to valid_info but just move them from one
4601         hashtable to the other.
4602         (allocate_vn_table): Adjust.
4603         (free_vn_table): Likewise.
4604         (init_scc_vn): Likewise.
4605         (free_scc_vn): Likewise.
4607 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
4609         PR target/86560
4610         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
4611         indirect_return as function type attribute.
4612         (ix86_attribute_table): Change indirect_return to function
4613         type attribute.
4614         * doc/extend.texi: Update indirect_return attribute.
4616 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
4618         * wide-int.h (widest2_int): New.
4619         * gimple-fold.c (arith_overflowed_p): Use it.
4620         * tree.h (widest2_int_cst): New.
4621         * tree-vrp.c (wide_int_binop_overflow): Rename from
4622         vrp_int_const_binop.
4623         Rewrite to work on trees.
4624         (extract_range_from_multiplicative_op_1): Abstract code to...
4625         (wide_int_range_min_max): ...here.
4626         (wide_int_range_cross_product): ...and here.
4627         (extract_range_from_binary_expr_1): Abstract overflow code to...
4628         (wide_int_range_mult_wrapping): ...here.
4629         * tree-vrp.h (wide_int_range_cross_product): New.
4630         (wide_int_range_mult_wrapping): New.
4632 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
4633             Julia Koval  <julia.koval@intel.com>
4635         * config/i386/x86-tune-costs.h (skylake_memcpy,
4636         skylake_memset): Replace rep_prefix with unrolling for size 512.
4638 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
4640         PR middle-end/86544
4641         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
4642         comparision with EQ_EXPR in last stmt.
4644 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4646         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
4647         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
4648         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
4649         previously known as "PowerPC AltiVec Built-in Functions".  Move
4650         some material to new subsubsections "PowerPC AltiVec Built-in
4651         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
4652         ISA 2.07".
4653         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
4654         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
4655         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
4656         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
4658 2018-07-18  Richard Biener  <rguenther@suse.de>
4660         PR tree-optimization/86557
4661         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
4662         EXACT_DIV_EXPR.
4664 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
4666         * config/s390/s390.c (s390_function_profiler): Generate CFI.
4668 2018-07-17  Jeff Law  <law@redhat.com>
4670         * config/arm/arm.c (get_label_padding): Update for recent
4671         changes to label_to_alignment.
4673         PR tree-optimization/86010
4674         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
4676         * config/mips/mips.c (vr4130_align_insns): Update for recent
4677         changes to label_to_alignment.
4679         * config/frv/frv.c (frv_label_align): Update for recent changes
4680         to label_to_alignment.
4682         * config/nios2/nios2.c (nios2_label_align): Update for recent
4683         changes which dropped ALIGN_LABELS_LOG.
4685 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
4687         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
4688         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
4690 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
4692         * config/arc/arc.c (arc_label_align): Use align_labels instead of
4693         deprecated align_labels_log.
4695 2018-07-17  Richard Biener  <rguenther@suse.de>
4697         PR lto/86456
4698         * dwarf2out.c (init_sections_and_labels): Always generate
4699         a debug_line_str_section for early LTO debug.
4700         (dwarf2out_finish): Reset debug_line_str_hash output early.
4701         Bump counter for extra dwarf5 .debug_loc labels to not conflict
4702         with fat LTO part.
4703         (dwarf2out_early_finish): Output debug_line_str.
4705 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
4707         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
4708         index register on z196 or later.
4710 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
4712         * config/s390/s390.c (s390_default_align): Set default function
4713         alignment to 16.
4714         (s390_override_options_after_change): Call s390_default align.
4715         (s390_option_override_internal): Call s390_default_align.
4716         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
4718 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
4720         PR middle-end/86542
4721         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
4722         to _looptemp_ clauses, other than the first two.
4724 2018-07-17  Martin Liska  <mliska@suse.cz>
4726         * opts.c: Do not enable OPT_falign_* for -Os.
4728 2018-07-17  Martin Liska  <mliska@suse.cz>
4730         * align.h (MAX_CODE_ALIGN): New.
4731         (MAX_CODE_ALIGN_VALUE): New.
4732         * common/config/i386/i386-common.c (ix86_handle_option):
4733         (MAX_CODE_ALIGN): Moved to align.h.
4734         * final.c (MAX_CODE_ALIGN): Likewise.
4735         * opts.c (parse_and_check_align_values):
4736         (MAX_CODE_ALIGN): Likewise.
4737         (MAX_CODE_ALIGN_VALUE): Likewise.
4739 2018-07-17  Martin Liska  <mliska@suse.cz>
4741         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
4742         in order to fulfil coding style.
4743         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
4744         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4745         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4746         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
4747         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
4748         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
4749         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
4750         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
4751         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4753 2018-07-17  Martin Liska  <mliska@suse.cz>
4755         * align.h: New file.
4756         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
4757         directly.
4758         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
4759         align_flags of label_to_alignment.
4760         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
4761         align_flags class.
4762         * config/m68k/m68k.c: Do not use removed align_labels_value and
4763         align_loops_value.
4764         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
4765         (LOOP_ALIGN): Likewise.
4766         (LABEL_ALIGN): Likewise.
4767         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4768         Remove not used macro.
4769         (rs6000_loop_align): Change return type to align_flags.
4770         (rs6000_loop_align_max_skip): Remove.
4771         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
4772         Change return type to align_flags.
4773         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4774         Remove not used macro.
4775         (rs6000_loop_align):  Change return type to align_flags.
4776         (rs6000_loop_align_max_skip): Remove.
4777         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
4778         * config/rx/rx-protos.h (rx_align_for_label): Make it
4779         static function.
4780         * config/rx/rx.c (rx_align_for_label): Change return type
4781         to align_flags.
4782         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
4783         macro definitions.
4784         into align_flags class.
4785         (LABEL_ALIGN): Likewise.
4786         (LOOP_ALIGN): Likewise.
4787         * config/s390/s390.c (s390_label_align): Use align_flags
4788         class member.
4789         (s390_asm_output_function_label): Likewise.
4790         * config/sh/sh.c (sh_override_options_after_change):
4791         Use align_flags class directly without macros.
4792         (find_barrier): Likewise.
4793         (barrier_align): Likewise.
4794         (sh_loop_align): Likewise.
4795         * config/spu/spu.c (spu_option_override):
4796         Use align_flags_tuple::get_value instead of removed macros.
4797         (spu_sched_init): Likewise.
4798         * config/spu/spu.h (GTY): Likewise.
4799         * config/visium/visium.c (visium_option_override):
4800         Set "8" as default secondary alignment.
4801         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
4802         in order to guarantee secondary alignment of 8.
4803         * coretypes.h: Include align.h header file.
4804         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
4805         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
4806         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
4807         * doc/tm.texi.in: Likewise.
4808         * final.c (struct label_alignment): Remove not used structure.
4809         (LABEL_ALIGN): Change type to align_flags.
4810         (LOOP_ALIGN): Likewise.
4811         (JUMP_ALIGN): Likewise.
4812         (default_loop_align_max_skip): Remove.
4813         (default_label_align_max_skip): Likewise.
4814         (default_jump_align_max_skip): Likewise.
4815         (default_label_align_after_barrier_max_skip):
4816         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
4817         (LABEL_TO_MAX_SKIP): Remove.
4818         (label_to_alignment): Return align_flags type instead of integer.
4819         (label_to_max_skip): Remove.
4820         (align_fuzz): Use align_flags type.
4821         (compute_alignments): Use align_flags type and use align_flags::max
4822         to combine multiple alignments.
4823         (grow_label_align): Grow vec instead of C array.
4824         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
4825         (shorten_branches):  Use align_flags type and use align_flags::max
4826         to combine multiple alignments.
4827         (final_scan_insn_1): Remove usage of secondary alignment that comes
4828         from label alignment, but instead use proper secondary alignment
4829         which is computed in grow_label_align.
4830         * flags.h (struct align_flags_tuple): Move to align.h.
4831         (struct align_flags): Likewise.
4832         (state_align_loops): Rename to align_loops.
4833         (state_align_jumps): Rename to align_jumps.
4834         (state_align_labels): Rename to align_labels.
4835         (state_align_functions): Rename to align_functions.
4836         (align_loops_log): Remove.
4837         (align_jumps_log): Remove.
4838         (align_labels_log): Remove.
4839         (align_functions_log): Remove.
4840         (align_loops_max_skip): Remove.
4841         (align_jumps_max_skip): Remove.
4842         (align_labels_max_skip): Remove.
4843         (align_functions_max_skip): Remove.
4844         (align_loops_value): Remove.
4845         (align_jumps_value): Remove.
4846         (align_labels_value): Remove.
4847         (align_functions_value): Remove.
4848         * output.h (label_to_alignment): Change return type to align_flags.
4849         (label_to_max_skip): Remove.
4850         * target.def: Remove loop_align_max_skip, label_align_max_skip,
4851         jump_align_max_skip macros.
4852         * targhooks.h (default_loop_align_max_skip): Remove.
4853         (default_label_align_max_skip): Likewise.
4854         (default_jump_align_max_skip): Likewise.
4855         (default_label_align_after_barrier_max_skip): Remove.
4856         * toplev.c (read_log_maxskip): Use ::normalize function.
4857         (parse_N_M): Remove not used argument and also call ::normalize.
4858         (parse_alignment_opts): Do not pass unused arguments.
4859         * varasm.c (assemble_start_function): Use directly align_functions
4860         instead of removed macros.
4861         * system.h: Do not poison removed macros.
4863 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
4865         PR middle-end/86539
4866         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
4867         and cond temporaries don't have reference type if iterator has
4868         pointer type.  For init use &for_pre_body instead of pre_p if
4869         for_pre_body is non-empty.
4871 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
4873         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
4874         double-double modes to SFmode directly directly.
4875         (trunc<mode>sf2_fprs): Delete.
4877 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
4879         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
4880         for conversions between IFmode and the decimal floating point modes.
4881         (init_float128_ieee): Use the correct names for conversions between
4882         KFmode and the decimal floating point modes.
4884 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
4886         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
4887         for the conversions between TDmode and IFmode.
4888         (init_float128_ieee): Use more correct names for the conversions
4889         between TDmode and KFmode.
4891 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
4893         PR tree-optimization/86526
4894         * builtins.c (expand_builtin_memcmp): Formatting fixes.
4895         (inline_expand_builtin_string_cmp): Likewise.
4896         (inline_string_cmp): Likewise.  Use c_readstr instead of
4897         builtin_memcpy_read_str.  Add unit_mode temporary.
4899 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4901         PR middle-end/86528
4902         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
4903         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
4905 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4907         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
4908         Alphabetize prototypes of built-in functions, separating out
4909         built-in functions that are listed in this section but should be
4910         described elsewhere.
4912 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
4914         PR target/86511
4915         * expmed.c (emit_store_flag): Do not emit setcc followed by a
4916         conditional move when trapping comparison was split to a
4917         non-trapping one (and vice versa).
4919 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
4921         * config/s390/s390.c (s390_function_profiler): Generate nops
4922         instead of profiler call sequences.
4923         * config/s390/s390.opt: Add the new option.
4925 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
4927         * config/s390/s390.c (s390_function_profiler): Generate
4928         __mcount_loc section.
4929         * config/s390/s390.opt: Add the new option.
4931 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
4933         * common.opt: Add the new warning.
4934         * config/s390/s390.c (s390_function_profiler): Emit "brasl
4935         %r0,__fentry__" when -mfentry is specified.
4936         (s390_option_override_internal): Disallow -mfentry for 31-bit
4937         CPUs.
4938         * config/s390/s390.opt: Add the new option.
4940 2018-07-16  Richard Biener  <rguenther@suse.de>
4942         PR lto/86523
4943         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
4944         for function-local FUNCTION_DECL and RESULT_DECL immediately.
4946 2018-07-16  Martin Liska  <mliska@suse.cz>
4948         PR ipa/86529
4949         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
4950         to ::get_create.
4952 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
4954         * config/arc/arcHS.md: Update ARCHS scheduling rules.
4956 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
4958         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
4959         for ARCHS4x.
4960         * config/arc/arc-cpus.def (hs4x): New cpu.
4961         (hs4xd): Likewise.
4962         * config/arc/arc-tables.opt: Regenerate.
4963         * config/arc/arc.c (arc_sched_issue_rate): New function.
4964         (TARGET_SCHED_ISSUE_RATE): Define.
4965         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
4966         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
4967         fpu_cvt.
4968         (attr tune): Add ARCHS4x tune values.
4969         (attr tune_dspmpy): Define.
4970         (*tst): Correct instruction type.
4971         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
4972         * config/arc/arcHS4x.md: New file.
4973         * config/arc/fpu.md: Update instruction type attributes.
4974         * config/arc/t-multilib: Regenerate.
4976 2018-07-16  Tom de Vries  <tdevries@suse.de>
4978         PR debug/86455
4979         * var-tracking.c (vt_initialize): Fix pre_dec handling.
4981 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4983         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
4984         early clobber.
4986 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
4988         PR tree-optimization/86514
4989         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
4990         conversion to a boolean type from a type with greater precision.
4992 2018-07-16  Tom de Vries  <tdevries@suse.de>
4994         * var-tracking.c (vt_initialize): Print adjusted insn slim if
4995         dump_flags request TDF_SLIM.
4997 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
4999         * fold-const.c (int_const_binop_1): Abstract...
5000         (wide_int_binop): ...wide int code here.
5001         (poly_int_binop): ...poly int code here.
5002         Abstract the rest of int_const_binop_1 into int_const_binop.
5003         * fold-const.h (wide_int_binop): New.
5004         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5005         Remove useless PLUS/MINUS_EXPR case.
5006         (zero_nonzero_bits_from_vr): Move wide int code...
5007         (zero_nonzero_bits_from_bounds): ...here.
5008         (extract_range_from_binary_expr_1): Move mask optimization code...
5009         (range_easy_mask_min_max): ...here.
5010         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5011         (range_easy_mask_min_max): New.
5013 2018-07-15  Jeff Law  <law@redhat.com>
5015         PR target/85993
5016         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5017         block.
5019 2018-07-14  Jim Wilson  <jimw@sifive.com>
5021         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5023 2018-07-14  Paul Koning  <ni1d@arrl.net>
5025         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5027 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
5029         * lto-streamer-out.c (copy_function_or_variable): Dump info about
5030         copying section.
5032 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
5033             Steve Munroe  <munroesj52@gmail.com>
5035         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5036         (_mm_andnot_si128): Likewise.
5037         (_mm_or_si128): Likewise.
5038         (_mm_xor_si128): Likewise.
5040 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
5042         PR middle-end/78809
5043         * builtins.c (expand_builtin_memcmp): Inline the calls first
5044         when result_eq is false.
5045         (expand_builtin_strcmp): Inline the calls first.
5046         (expand_builtin_strncmp): Likewise.
5047         (inline_string_cmp): New routine. Expand a string compare
5048         call by using a sequence of char comparison.
5049         (inline_expand_builtin_string_cmp): New routine. Inline expansion
5050         a call to str(n)cmp/memcmp.
5051         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5052         New option.
5053         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5055 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
5057         * config/arm/driver-arm.c: Include arm-native.h.
5058         (host_detect_local_cpu): Use auto-generated data tables.
5059         (vendors, arm_cpu_table): Delete.  Move part information to ...
5060         * config/arm/arm-cpus.in: ... here.
5061         * config/arm/parsecpu.awk (gen_native): New function.
5062         (vendor, part): New CPU fields.
5063         (END): Add support for building the native CPU detection tables.
5064         * config/arm/t-arm (arm-native.h): Add build rule.
5065         (driver-arm.o): Add dependency on arm-native.h.
5067 2018-07-13  Richard Biener  <rguenther@suse.de>
5069         PR middle-end/85974
5070         * match.pd (addr1 - addr2): Allow either of the operand to
5071         have a conversion.
5073 2018-07-13  Tom de Vries  <tdevries@suse.de>
5075         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5076         in remap_ssa_name.
5078 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
5080         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5081         arrays instead of numbered variables.
5083 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
5085         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5086         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5088 2018-07-13  Richard Biener  <rguenther@suse.de>
5090         PR debug/86452
5091         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5092         instead of get_context_die.
5094 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
5095             Richard Biener  <rguenther@suse.de>
5097         PR middle-end/86489
5098         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5099         that the loop latch destination where phi is defined.
5101 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
5103         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5104         (riscv_expand_epilogue): Add assertion to check interrupt mode.
5105         (riscv_set_current_function): Extract getting interrupt type to new
5106         function.
5107         (riscv_get_interrupt_type): New function.
5108         (riscv_merge_decl_attributes): New function, checking interrupt type is
5109         same.
5110         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5112 2018-07-12  Paul Koning  <ni1d@arrl.net>
5114         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5115         directive.
5117 2018-07-12  Paul Koning  <ni1d@arrl.net>
5119         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5120         zero reference, add doloop_end instead.
5121         * doc/md.texi (decrement_and_branch_until_zero): Remove.
5122         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
5123         detail for doloop_end.
5125 2018-07-12  Martin Sebor  <msebor@redhat.com>
5127         PR c/86453
5128         * attribs.c (decl_attributes): Reject conflicting attributes before
5129         calling attribute handlers.
5131 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
5133         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5134          parameter.
5135         (gcc::dump_manager::get_dump_file_name): likewise.
5136         (dump_begin): Likewise.
5137         * dumpfile.h (dump_begin): Update prototype.
5138         (gcc::dump_manager::get_dump_file_name,
5139         gcc::dump_manager::get_dump_file_name): Update prototype.
5141 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5143         * internal-fn.h (vectorizable_internal_fn_p): New function.
5144         * tree-vect-slp.c (compatible_calls_p): Likewise.
5145         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
5146         to internal functions.
5147         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5149 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5151         * fold-const.h (inverse_conditions_p): Declare.
5152         * fold-const.c (inverse_conditions_p): New function.
5153         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
5154         that test the inverse condition of a conditional internal function.
5155         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5156         * internal-fn.c (internal_fn_mask_index): Handle conditional
5157         internal functions.
5158         (vectorized_internal_fn_supported_p): New function.
5159         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5160         (any_pred_load_store): Replace with...
5161         (need_to_predicate): ...this new variable.
5162         (redundant_ssa_names): New variable.
5163         (ifcvt_can_use_mask_load_store): Move initial checks to...
5164         (ifcvt_can_predicate): ...this new function.  Handle tree codes
5165         for which a conditional internal function exists.
5166         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5167         instead of ifcvt_can_use_mask_load_store.  Update after variable
5168         name change.
5169         (predicate_load_or_store): New function, split out from
5170         predicate_mem_writes.
5171         (check_redundant_cond_expr): New function.
5172         (value_available_p): Likewise.
5173         (predicate_rhs_code): Likewise.
5174         (predicate_mem_writes): Rename to...
5175         (predicate_statements): ...this.  Use predicate_load_or_store
5176         and predicate_rhs_code.
5177         (combine_blocks, tree_if_conversion): Update after above name changes.
5178         (ifcvt_local_dce): Handle redundant_ssa_names.
5179         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5180         general conditional functions.
5181         * tree-vect-stmts.c (vectorizable_call): Likewise.
5183 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5184             Alan Hayward  <alan.hayward@arm.com>
5185             David Sherwood  <david.sherwood@arm.com>
5187         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5188         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5189         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5190         plus and minus and convert them into IFN_COND_FMA-based sequences.
5191         (convert_mult_to_fma): Handle conditional plus and minus.
5193 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5195         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5196         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5197         (cond_fnms_optab): New optabs.
5198         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5199         internal functions.
5200         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5201         * internal-fn.h (get_conditional_internal_fn): Declare.
5202         (get_unconditional_internal_fn): Likewise.
5203         * internal-fn.c (cond_ternary_direct): New macro.
5204         (expand_cond_ternary_optab_fn): Likewise.
5205         (direct_cond_ternary_optab_supported_p): Likewise.
5206         (FOR_EACH_COND_FN_PAIR): Likewise.
5207         (get_conditional_internal_fn): New function.
5208         (get_unconditional_internal_fn): Likewise.
5209         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5210         (gimple_match_op::gimple_match_op): Add a new overload for 5
5211         operands.
5212         (gimple_match_op::set_op): Likewise.
5213         (gimple_resimplify5): Declare.
5214         * genmatch.c (decision_tree::gen): Generate simplifications for
5215         5 operands.
5216         * gimple-match-head.c (gimple_simplify): Define an overload for
5217         5 operands.  Handle calls with 5 arguments in the top-level overload.
5218         (convert_conditional_op): Handle conversions from unconditional
5219         internal functions to conditional ones.
5220         (gimple_resimplify5): New function.
5221         (build_call_internal): Pass a fifth operand.
5222         (maybe_push_res_to_seq): Likewise.
5223         (try_conditional_simplification): Try converting conditional
5224         internal functions to unconditional internal functions.
5225         Handle 3-operand unconditional forms.
5226         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5227         Define ternary equivalents of the current rules for binary conditional
5228         internal functions.
5229         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5230         ternary operations.
5231         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5232         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5233         (optab): Handle them.
5234         (SVE_COND_FP_TERNARY): New int iterator.
5235         (sve_fmla_op, sve_fmad_op): New int attributes.
5236         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5237         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5238         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5240 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5242         * target.def (preferred_else_value): New target hook.
5243         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5244         * doc/tm.texi: Regenerate.
5245         * targhooks.h (default_preferred_else_value): Declare.
5246         * targhooks.c (default_preferred_else_value): New function.
5247         * internal-fn.h (conditional_internal_fn_code): Declare.
5248         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5249         (get_conditional_internal_fn): Use it.
5250         (conditional_internal_fn_code): New function.
5251         * gimple-match.h (gimple_match_cond): New struct.
5252         (gimple_match_op): Add a cond member function.
5253         (gimple_match_op::gimple_match_op): Update all forms to take a
5254         gimple_match_cond.
5255         * genmatch.c (expr::gen_transform): Use the same condition as res_op
5256         for the suboperation, but don't specify a particular else_value.
5257         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5258         (visit_nary_op, visit_reference_op_load): Pass
5259         gimple_match_cond::UNCOND to the gimple_match_op constructor.
5260         * gimple-match-head.c: Include tree-eh.h
5261         (convert_conditional_op): New function.
5262         (maybe_resimplify_conditional_op): Likewise.
5263         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5264         (gimple_resimplify2): Likewise.
5265         (gimple_resimplify3): Likewise.
5266         (gimple_resimplify4): Likewise.
5267         (maybe_push_res_to_seq): Return null for conditional operations.
5268         (try_conditional_simplification): New function.
5269         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
5270         constructor.
5271         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5272         IFN_COND_* call.
5273         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5274         function.
5275         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5277 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
5279         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5280         DECL_FCONTEXT
5281         (hash_tree): Do not hash DECL_FCONTEXT
5282         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5283         Do not stream DECL_FCONTEXT.
5284         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5285         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5287 2018-07-12  Richard Biener  <rguenther@suse.de>
5289         PR debug/86462
5290         * dwarf2out.c (gen_block_die): Only output blocks when they have
5291         at least one !DECL_IGNORED_P variable.
5293 2018-07-12  Richard Biener  <rguenther@suse.de>
5295         PR target/84829
5296         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5297         Remove -mieee-fp handling.
5299 2018-07-12  Richard Biener  <rguenther@suse.de>
5301         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5302         left-over from last patch.
5304 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
5306         PR tree-optimization/86492
5307         * gimple-ssa-store-merging.c
5308         (imm_store_chain_info::coalesce_immediate_stores): Call
5309         check_no_overlap even for the merge_overlapping case.  Formatting fix.
5311 2018-07-12  Richard Biener  <rguenther@suse.de>
5313         PR middle-end/86479
5314         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5315         move possibly trapping operations into the conditional.
5317 2018-07-12  Richard Biener  <rguenther@suse.de>
5319         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5320         (vn_lookup_simplify_result): Remove recursion limit applied
5321         here.
5322         (vn_nary_build_or_lookup_1): Adjust.
5323         (try_to_simplify): Likewise.
5324         * gimple-match-head.c (gimple_resimplify1): Instead apply one
5325         here.
5326         (gimple_resimplify2): Likewise.
5327         (gimple_resimplify3): Likewise.
5328         (gimple_resimplify4): Likewise.
5330 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
5332         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5333         Use __mmask64 type instead of __mmask8 for __M argument.
5334         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5335         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5336         __U argument.
5337         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5338         __mmask16 for __M argument.
5339         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5340         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5341         to __mmask16 instead of __mmask8.
5342         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5343         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5344         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5345         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5346         instead of __mmask16 for __U argument.
5347         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5348         __mmask16 instead of __mmask8 for __U argument.
5349         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5350         __U argument.
5351         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5352         __mmask16.
5353         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5354         argument.
5355         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5356         __U argument.
5357         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5358         __mmask16.
5359         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5360         of __mmask16.
5361         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5362         __U argument.
5363         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5364         __U argument.
5365         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5366         __U argument.
5367         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5368         __U argument.
5369         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5370         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5371         return type as well as __M argument type and all casts from __mmask8
5372         to __mmask32.
5373         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5374         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5375         return type as well as __M argument type and all casts from __mmask8
5376         to __mmask16.
5377         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5378         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5379         return type as well as __M argument type and all casts from __mmask8
5380         to __mmask32.
5381         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5382         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5383         return type as well as __M argument type and all casts from __mmask8
5384         to __mmask16.
5385         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5386         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
5387         __mmask16.
5389 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
5391         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
5392         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
5393         for __U argument.
5395 2018-07-11  Paul Koning  <ni1d@arrl.net>
5397         * doc/md.texi (define_subst): Document how multiple occurrences of
5398         the same argument in the replacement pattern are handled.
5400 2018-07-11  Paul Koning  <ni1d@arrl.net>
5402         * doc/extend.texi (Common Variable Attributes): Move "mode" into
5403         alphabetical order.
5404         (Common Type Attributes): Add "mode" attribute.
5406 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
5408         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
5409         stream DECL_ORIGINAL_TYPE.
5410         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
5411         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
5412         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
5413         Do not walk original type.
5414         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
5415         external decls.
5416         (write_ts_decl_non_common_tree_pointers): Do not stream
5417         DECL_ORIGINAL_TYPE
5418         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
5419         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
5421 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
5423         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5424         thread twice from the same starting edge.
5426 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
5428         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
5429         * gimple.c (gimple_call_nonnull_result_p): ...here...
5430         (gimple_call_nonnull_arg): ...and here.
5431         * gimple.h (gimple_call_nonnull_result_p): New.
5432         (gimple_call_nonnull_arg): New.
5434 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
5436         * config/arm/arm-cpus.in: Move information from fpu field of each
5437         cpu definition to the isa field.
5438         * config/arm/parsecpu.awk (fpu): Delete match rule.
5439         (gen_comm_data): Don't add bits from the CPU's FPU entry.
5441 2018-07-11  Richard Biener  <rguenther@suse.de>
5443         PR debug/86457
5444         * dwarf2out.c (init_sections_and_labels): Use
5445         output_asm_line_debug_info consistently.
5446         (dwarf2out_early_finish): Likewise.
5447         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
5448         type units.
5450 2018-07-11  Richard Biener  <rguenther@suse.de>
5452         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
5453         Rework father_bb setting in a way to avoid propagating constants
5454         multiple times on a loop body.
5456 2018-07-10  Mark Wielaard  <mark@klomp.org>
5458         PR debug/86459
5459         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
5461 2018-07-10  Richard Biener  <rguenther@suse.de>
5463         * hash-map.h (hash_map::iterator::operator*): Return
5464         references to key and value.
5466 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
5468         PR c++/86443
5469         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
5470         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
5471         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
5472         (gimplify_omp_for): For composite loops, move outer
5473         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
5474         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
5475         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
5476         TREE_LIST for both the original class iterator and the "last" helper
5477         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
5478         loop, remember has_decl_expr from outer composite loops for the
5479         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
5481 2018-07-09  Martin Sebor  <msebor@redhat.com>
5483         PR middle-end/77357
5484         PR middle-end/86428
5485         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
5486         accessing implicitly initialized array elements.
5487         * expr.c (string_constant): Handle string initializers of
5488         character arrays within aggregates.
5489         * gimple-fold.c (fold_array_ctor_reference): Add argument.
5490         Store element offset.  As a special case, handle zero size.
5491         (fold_nonarray_ctor_reference): Same.
5492         (fold_ctor_reference): Add argument.  Store subobject offset.
5493         * gimple-fold.h (fold_ctor_reference): Add argument.
5495 2018-07-09  Paul Koning  <ni1d@arrl.net>
5497         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
5498         (pdp11_insn_cost): New function.
5499         (pdp11_md_asm_adjust): New function.
5500         (TARGET_INVALID_WITHIN_DOLOOP): Define.
5501         (pdp11_rtx_costs): Update to match machine better.
5502         (output_addr_const_pdp11): Correct format mismatch warnings.
5503         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
5504         * config/pdp11/pdp11.md: General change to add base_cost and/or
5505         length attributes for use by new pdp11_insn_cost function.
5506         (MIN_BRANCH): Correct definition.
5507         (MIN_SOB): Ditto.
5508         (doloop_end): Use standard pattern name for looping pattern.
5509         (doloop_end_nocc): New.
5510         (movsf): Add another constraint alternative.
5511         (zero_extendqihi2): Add constraint alternatives for not in place
5512         extend.
5513         (zero_extendhisi2): Remove.
5514         (shift patterns): Add CC handling variants.
5515         (bswaphi2): New.
5516         (bswapsi2): New.
5517         (rothi3): New.
5518         (define_peephole2): New peephole to recognize mov that sets CC for
5519         subsequent test.
5521 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5523         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
5524         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
5525         wi::add.
5527 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
5529         PR c/86420
5530         * real.c (real_nextafter): Return true if result is denormal.
5532 2018-07-09  Martin Liska  <mliska@suse.cz>
5534         * common.opt: Add back wrongly removed attribute.
5536 2018-07-09  Richard Biener  <rguenther@suse.de>
5538         PR debug/86413
5539         * dwarf2out.c (gen_block_die): For an early generated DIE
5540         always output high/low PC attributes.
5542 2018-07-09  Tom de Vries  <tdevries@suse.de>
5544         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
5545         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
5546         onto VAR_DECL with abstract origin.
5548 2018-07-07  Jim Wilson  <jimw@sifive.com>
5550         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
5552 2018-07-07  Tom de Vries  <tdevries@suse.de>
5554         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
5556 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
5558         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
5559         overflow_type.
5560         (combine_bound): Use wide-int overflow calculation instead of
5561         rolling our own.
5562         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
5563         overflow_type.
5564         * fold-const.c (int_const_binop_2): Same.
5565         (extract_muldiv_1): Same.
5566         (fold_div_compare): Same.
5567         (fold_abs_const): Same.
5568         * match.pd: Same.
5569         * poly-int.h (add): Same.
5570         (sub): Same.
5571         (neg): Same.
5572         (mul): Same.
5573         * predict.c (predict_iv_comparison): Same.
5574         * profile-count.c (slow_safe_scale_64bit): Same.
5575         * simplify-rtx.c (simplify_const_binary_operation): Same.
5576         * tree-chrec.c (tree_fold_binomial): Same.
5577         * tree-data-ref.c (split_constant_offset_1): Same.
5578         * tree-if-conv.c (idx_within_array_bound): Same.
5579         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
5580         * tree-ssa-phiopt.c (minmax_replacement): Same.
5581         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
5582         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
5583         * vr-values.c (vr_values::adjust_range_with_scev): Same.
5584         * wide-int.cc (wi::add_large): Same.
5585         (wi::mul_internal): Same.
5586         (wi::sub_large): Same.
5587         (wi::divmod_internal): Same.
5588         * wide-int.h: Change overflow type to overflow_type for neg, add,
5589         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
5590         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
5591         mul_internal, divmod_internal.
5592         (overflow_type): New enum.
5593         (accumulate_overflow): New.
5595 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
5597         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
5598         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
5600 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
5602         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
5603         argument is checked for zero before entering loop, avoid checking again.
5605 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
5607         * gimplify.h (generic_expr_could_trap_p): Set as global function.
5608         * gimplify.h (generic_expr_could_trap_p): Likwise.
5609         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
5611 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
5613         PR tree-optimization/86401
5614         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
5615         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
5616         (fold_bit_and_mask): ... here.  New helper function for match.pd.
5617         * fold-const.h (fold_bit_and_mask): Declare.
5618         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
5620 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
5622         PR target/86324
5623         * target.def (translate_mode_attribute): New hook.
5624         * targhooks.h (default_translate_mode_attribute): Declare.
5625         * targhooks.c (default_translate_mode_attribute): New function.
5626         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
5627         * doc/tm.texi: Regenerate.
5628         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
5629         (rs6000_translate_mode_attribute): New function.
5631 2018-07-06  Paul Koning  <ni1d@arrl.net>
5633         * doc/md.texi (define_split): Document DONE and FAIL.
5634         (define_peephole2): Ditto.
5636 2018-07-05  Jeff Law  <law@redhat.com>
5638         PR tree-optimization/86010
5639         * tree-ssa-dse.c (compute_trims): More aggressively trim at
5640         both the head and tail of mem* and str* calls.
5642 2018-07-05  Jim Wilson  <jimw@sifive.com>
5644         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
5646 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
5648         * config/aarch64/aarch64-simd.md: correct flags text for
5649         MIN_EXPR replacement.
5651 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
5653         * configure: Regenerated.
5655 2018-07-05  Carl Love  <cel@us.ibm.com>
5657         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
5658         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
5659         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
5660         VSX_BUILTIN_DOUBLEL_V4SF.
5662 2018-07-05  Martin Sebor  <msebor@redhat.com>
5664         PR c++/86400
5665         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
5666         than its domain to compute its the upper bound of a char array.
5668 2018-07-05  Nathan Sidwell  <nathan@acm.org>
5670         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
5671         * doc/cpp.texi: Update comment.
5672         * doc/tm.texi: Rebuilt.
5673         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
5674         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
5675         * doc/extend.texi (Backwards Compatibility): Clarify it is system
5676         headers affected by extern "C".
5677         * system.h: Poison NO_IMPLICIT_EXTERN_C.
5678         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
5679         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
5680         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
5681         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
5682         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
5683         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
5684         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
5685         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
5686         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
5687         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
5688         config/sparc/sp64-elf.h, config/spu/spu.h,
5689         config/stormy16/stormy16.h, config/v850/v850.h,
5690         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
5691         define NO_IMPLICIT_EXTERN_C.
5692         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
5694 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
5696         PR target/84711
5697         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5698         instead of GET_MODE_SIZE when comparing Units.
5700 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
5702         PR target/84711
5703         * rtlanal.c (set_noop_p): Constrain on mode change,
5704         include hard-reg-set.h
5706 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
5708         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
5710 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
5712         Revert
5713         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
5715         PR sanitizer/84250
5716         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5717         libasan.
5718         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5720 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
5722         PR sanitizer/84250
5723         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5724         libasan.
5725         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5727 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
5729         PR middle-end/86380
5730         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
5732 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
5734         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
5735         neg_*_op* variables.
5737 2018-07-04  Martin Liska  <mliska@suse.cz>
5739         * tree-switch-conversion.c: Define
5740         max_ratio_for_speed and max_ratio_for_size constants.
5742 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
5743             Martin Liska  <mliska@suse.cz>
5745         PR middle-end/66240
5746         PR target/45996
5747         PR c/84100
5748         * common.opt: Rename align options with 'str_' prefix.
5749         * common/config/i386/i386-common.c (set_malign_value): New
5750         function.
5751         (ix86_handle_option): Use it to set -falign-* options/
5752         * config/aarch64/aarch64-protos.h (struct tune_params): Change
5753         type from int to string.
5754         * config/aarch64/aarch64.c: Update default values from int
5755         to string.
5756         * config/alpha/alpha.c (alpha_override_options_after_change):
5757         Likewise.
5758         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
5759         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5760         max skip conditionally.
5761         * config/i386/freebsd.h (SUBALIGN_LOG): New.
5762         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5763         max skip conditionally.
5764         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5765         max skip conditionally.
5766         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
5767         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5768         max skip conditionally.
5769         * config/i386/i386.c (struct ptt): Change type from int to
5770         string.
5771         (ix86_default_align): Set default values.
5772         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
5773         max skip conditionally.
5774         * config/i386/iamcu.h (SUBALIGN_LOG): New.
5775         (ASM_OUTPUT_MAX_SKIP_ALIGN):
5776         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
5777         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5778         max skip conditionally.
5779         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
5780         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
5781         * config/i386/x86-64.h (SUBALIGN_LOG): New.
5782         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5783         max skip conditionally.
5784         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5785         * config/ia64/ia64.c (ia64_option_override): Set default values
5786         for alignment options.
5787         * config/m68k/m68k.c: Handle new str_align_* options.
5788         * config/mips/mips.c (mips_set_compression_mode): Change
5789         type of constants.
5790         (mips_option_override): Set default values for options.
5791         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5792         Likewise.
5793         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5794         Likewise.
5795         * config/rx/rx.c (rx_option_override): Likewise.
5796         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
5797         (LABEL_ALIGN): Use align_labels_log.
5798         (LOOP_ALIGN): Use align_loops_align.
5799         * config/s390/s390.c (s390_asm_output_function_label): Use new
5800         macros.
5801         * config/sh/sh.c (sh_override_options_after_change):
5802         Change type of constants.
5803         * config/spu/spu.c (spu_sched_init): Likewise.
5804         * config/sparc/sparc.c (sparc_option_override): Set default
5805         values for options.
5806         * config/visium/visium.c (visium_option_override): Likewise.
5807         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
5808         emit p2align format with last argument if it's not needed.
5809         * doc/invoke.texi: Document extended format of -falign-*.
5810         * final.c: Use align_labels alignment.
5811         * flags.h (struct target_flag_state): Change type to use
5812         align_flags.
5813         (struct align_flags_tuple): New.
5814         (struct align_flags): Likewise.
5815         (align_loops_log): Redefine macro to use new types.
5816         (align_loops_max_skip): Redefine macro to use new types.
5817         (align_jumps_log): Redefine macro to use new types.
5818         (align_jumps_max_skip): Redefine macro to use new types.
5819         (align_labels_log): Redefine macro to use new types.
5820         (align_labels_max_skip): Redefine macro to use new types.
5821         (align_functions_log): Redefine macro to use new types.
5822         (align_loops): Redefine macro to use new types.
5823         (align_jumps): Redefine macro to use new types.
5824         (align_labels): Redefine macro to use new types.
5825         (align_functions): Redefine macro to use new types.
5826         (align_functions_max_skip): Redefine macro to use new types.
5827         (align_loops_value): New macro.
5828         (align_jumps_value): New macro.
5829         (align_labels_value): New macro.
5830         (align_functions_value): New macro.
5831         * function.c (invoke_set_current_function_hook): Propagate
5832         alignment values from flags to global variables default in
5833         topleev.h.
5834         * ipa-icf.c (sem_function::equals_wpa): Use
5835         cl_optimization_option_eq instead of memcmp.
5836         * lto-streamer.h (cl_optimization_stream_out): Support streaming
5837         of string types.
5838         (cl_optimization_stream_in): Likewise.
5839         * optc-save-gen.awk: Support strings in cl_optimization.
5840         * opth-gen.awk: Likewise.
5841         * opts.c (finish_options): Remove error checking of invalid
5842         value ranges.
5843         (MAX_CODE_ALIGN): Remove.
5844         (MAX_CODE_ALIGN_VALUE): Likewise.
5845         (parse_and_check_align_values): New function.
5846         (check_alignment_argument): Likewise.
5847         (common_handle_option): Use check_alignment_argument.
5848         * opts.h (parse_and_check_align_values): Declare.
5849         * toplev.c (init_alignments): Remove.
5850         (read_log_maxskip): New.
5851         (parse_N_M): Likewise.
5852         (parse_alignment_opts): Likewise.
5853         (backend_init_target): Remove usage of init_alignments.
5854         * toplev.h (parse_alignment_opts): Declare.
5855         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
5856         argument.
5857         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
5858         * tree.c (cl_option_hasher::equal): New.
5859         * varasm.c: Use new global macros.
5861 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
5863         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
5864         Use a simpler align directive also if MAXSKIP = ALIGN-1.
5865         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5866         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5867         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5868         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5869         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
5870         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
5871         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
5872         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5873         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5874         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5875         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5877 2018-07-04  Martin Liska  <mliska@suse.cz>
5878             Jonathan Wakely  <jwakely@redhat.com>
5880         * coverage.c: Use correct type.
5881         * doc/invoke.texi: Language correction.
5883 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
5885         PR target/85620
5886         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
5887         ENDBRANCH for non-tail call which may return via indirect branch.
5888         * doc/extend.texi: Document indirect_return attribute.
5890 2018-07-03  Martin Sebor  <msebor@redhat.com>
5892         PR tree-optimization/86274
5893         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
5894         precondition.
5895         (format_floating): Correct handling of infinities and NaNs.
5897 2018-07-03  Martin Sebor  <msebor@redhat.com>
5899         * print-tree.c (print_real_cst): New function.
5900         (print_node_brief): Call it.
5901         (print_node): Ditto.
5903 2018-07-03  Jeff Law  <law@redhat.com>
5905         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
5906         into a single pattern.
5908         * config/h8300/h8300.md (ors code_iterator): New.
5909         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
5910         a single pattern and single splitter.
5911         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
5912         (iorqi3_1, xorqi3_1): Likewise.
5913         (iorqi3, xorqi3 expanders): Similarly.
5915         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
5916         (movmd_internal) into a single pattern using the P mode iterator.
5917         (movmd splitters): Similarly.
5918         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
5919         (movsd splitters): Similarly.
5921         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
5922         ADDB, ADDW and ADDL into a single ADD attribute which selects the
5923         right table based on the size of the operand.
5924         * config/h8300/h8300.md (length_table): Corresponding changes. All
5925         references to "addb", "addw" and "addl" changed to "add".
5926         (btst patterns): Merge two variants into a single pattern.
5927         (tstqi, tsthi): Likewise.
5928         (addhi3_incdec, addsi3_incdec): Likewise.
5929         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
5930         (mulhi3, mulsi3): Likewise.
5931         (udivhi3, udivsi3): Likewise.
5932         (divhi3, divsi3): Likewise.
5933         (andorqi3, andorhi3, andorsi3): Likewise.
5935 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
5937         PR target/85694
5938         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
5939         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
5941 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5943         PR tree-optimization/85694
5944         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
5945         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
5946         UNSPEC_URHADD.
5947         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
5948         (<u>avg<mode>3_ceil): New patterns.
5950 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
5952         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
5953         scan-tree-dump directive.
5954         * gcc.dg/vect/slp-perm-2.c: Likewise.
5955         * gcc.dg/vect/slp-perm-3.c: Likewise.
5956         * gcc.dg/vect/slp-perm-5.c: Likewise.
5957         * gcc.dg/vect/slp-perm-6.c: Likewise.
5958         * gcc.dg/vect/slp-perm-7.c: Likewise.
5959         * gcc.dg/vect/slp-perm-8.c: Likewise.
5961 2018-07-03  Marek Polacek  <polacek@redhat.com>
5963         PR middle-end/86202
5964         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
5966 2018-07-03  Richard Biener  <rguenther@suse.de>
5968         PR ipa/86389
5969         * tree-ssa-structalias.c (find_func_clobbers): Properly
5970         handle indirect calls.
5972 2018-07-03  Jeff Law  <law@redhat.com>
5974         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
5975         (shifts): New code iterator.
5976         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
5977         expander.  Fix HImode handling on H8/SX.
5978         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
5979         (subqi3, subhi3, subsi3 expanders): Likewise.
5980         (andqi3, andhi3, andsi3 expanders): Likewise.
5981         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
5982         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
5983         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
5984         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
5985         (zero_extendqihi2, zero_extendqisi2): Likewise.
5986         (extendqihi2, extendqisi2): Likewise.
5987         (rotlqi3, rotlhi3, rotlsi3): Likewise.
5988         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
5989         (rotlqi3_1, rotlhi3_1): Likewise.
5990         (logicalhi3_sn, logicalsi3_sn): Likewise.
5991         (logicalhi3, logicalsi3): Likewise.
5993 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5995         * tree-vect-patterns.c (vect_recog_rotate_pattern)
5996         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5997         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
5998         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
5999         type to append_pattern_def_seq instead of creating a stmt_vec_info
6000         directly.
6001         (build_mask_conversion): Likewise.  Remove vinfo argument.
6002         (vect_add_conversion_to_patterm): Likewise, renaming to...
6003         (vect_add_conversion_to_pattern): ...this.
6004         (vect_recog_mask_conversion_pattern): Update call to
6005         build_mask_conversion.  Pass the vector type to
6006         append_pattern_def_seq here too.
6007         (vect_recog_gather_scatter_pattern): Update call to
6008         vect_add_conversion_to_pattern.
6010 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6012         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6013         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6014         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6015         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6016         STMT_VINFO_PATTERN_DEF_SEQ to null here.
6017         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6018         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6019         append_pattern_def_seq instead of new_pattern_def_seq.
6020         (vect_recog_divmod_pattern): Do both of the above.
6021         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6022         is null.
6024 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6026         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6027         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6028         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6029         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6030         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6031         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6032         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6033         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6034         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6035         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6036         parameter with a single stmt_vec_info.
6037         (vect_recog_func_ptr): Likewise.
6038         (vect_recog_gather_scatter_pattern): Likewise, folding in...
6039         (vect_try_gather_scatter_pattern): ...this.
6040         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6041         the stmt_vec_info of the statement to be matched.  Don't clear
6042         STMT_VINFO_RELATED_STMT.
6043         (vect_pattern_recog): Update call accordingly.
6045 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6047         PR tree-optimization/85694
6048         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6049         (uavgM3_ceil): Document new optabs.
6050         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6051         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6052         functions.
6053         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6054         (savg_ceil_optab): New optabs.
6055         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6056         (vect_vect_recog_func_ptrs): Add it.
6057         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6058         constant directly from the associated lhs.
6060 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6062         * tree-vect-patterns.c (vect_split_statement): New function.
6063         (vect_convert_input): Use it to try to split an existing cast.
6065 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6067         * poly-int.h (print_hex): New function.
6068         * dumpfile.h (dump_dec, dump_hex): Declare.
6069         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6070         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6071         min_input_precision, operation_precision and operation_sign.
6072         * tree-vect-patterns.c (vect_get_range_info): New function.
6073         (vect_same_loop_or_bb_p, vect_single_imm_use)
6074         (vect_operation_fits_smaller_type): Delete.
6075         (vect_look_through_possible_promotion): Add an optional
6076         single_use_p parameter.
6077         (vect_recog_over_widening_pattern): Rewrite to use new
6078         stmt_vec_info infomration.  Handle one operation at a time.
6079         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6080         (vect_truncatable_operation_p, vect_set_operation_type)
6081         (vect_set_min_input_precision): New functions.
6082         (vect_determine_min_output_precision_1): Likewise.
6083         (vect_determine_min_output_precision): Likewise.
6084         (vect_determine_precisions_from_range): Likewise.
6085         (vect_determine_precisions_from_users): Likewise.
6086         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6087         (vect_vect_recog_func_ptrs): Put over_widening first.
6088         Add cast_forwprop.
6089         (vect_pattern_recog): Call vect_determine_precisions.
6091 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6093         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6094         statements that have been replaced by further pattern statements.
6095         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6097 2018-07-03  Richard Biener  <rguenther@suse.de>
6099         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6100         always set *dt.  Dump vectype in vectype overload.
6101         * dumpfile.h (dump_gimple_expr): New function.
6102         (dump_gimple_expr_loc): Likewise.
6103         * dumpfile.c (dump_gimple_expr): New function.
6104         (dump_gimple_expr_loc): Likewise.
6106 2018-07-02  Jeff Law  <law@redhat.com>
6108         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6109         the H8/300, H8/300H and H8/S variants into a single pattern.
6110         (movhi_h8300, movqi_h8300hs): Similarly.
6111         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6112         (QHI mode iterator): New.
6114         * config/h8300/h8300.md: Remove trailing whitespace.
6116 2018-07-02  Jim Wilson  <jimw@sifive.com>
6118         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6119         instead of emit_insn for interrupt returns.
6120         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6121         (riscv_sret, riscv_uret): Likewise.
6123 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
6125         * pretty-print.c (selftest::test_pp_format): Move save and restore
6126         of quotes to class auto_fix_quotes, and add an instance.
6127         * selftest.c: Include "intl.h".
6128         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6129         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6130         * selftest.h (selftest::auto_fix_quotes): New class.
6132 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
6134         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6135         (aarch64_sve_prepare_conditional_op): Remove.
6136         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6137         Allow aarch64_simd_reg_or_zero as select operand; remove
6138         the aarch64_sve_prepare_conditional_op call.
6139         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6140         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6141         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6142         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6143         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6144         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6145         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6146         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6147         and a splitters to match all of the *_any patterns.
6148         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6150         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6151         (SVE_COND_FP_BINARY_REV): Remove.
6152         (sve_int_op_rev, sve_fp_op_rev): New.
6153         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6154         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6155         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6156         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6157         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6158         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6159         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6160         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6161         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6163         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6164         Remove match_dup 1 from the inner unspec.
6165         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6167         * config/aarch64/aarch64.md (movprfx): New attr.
6168         (length): Default movprfx to 8.
6169         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6170         (*madd<SVE_I>, *msub<SVE_I): Likewise.
6171         (*<su>mul<SVE_I>3_highpart): Likewise.
6172         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6173         (*v<ASHIFT><SVE_I>3): Likewise.
6174         (*<su><MAXMIN><SVE_I>3): Likewise.
6175         (*<su><MAXMIN><SVE_F>3): Likewise.
6176         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6177         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6178         (*div<SVE_F>4): Likewise.
6180 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
6182         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6183         in dump string.
6185 2018-07-02  Richard Biener  <rguenther@suse.de>
6187         PR tree-optimization/86363
6188         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6189         memset argument refers to a non-variable address.
6191 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
6193         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6194         {PLUS,MINUS}_EXPR code to...
6195         (adjust_symbolic_bound): ...here,
6196         (combine_bound): ...here,
6197         (set_value_range_with_overflow): ...and here.
6199 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
6201         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6202         code...
6203         (extract_range_from_abs_expr): ...here.
6205 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
6207         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6208         -fno-omit-frame-pointer when not optimizing.
6210 2018-07-02  Martin Liska  <mliska@suse.cz>
6212         PR ipa/86279
6213         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6214         (propagate_nothrow): Likewise.
6216 2018-07-02  Martin Liska  <mliska@suse.cz>
6218         PR ipa/86323
6219         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6221 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
6223         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6224         function in r262149, changing "loc" param from source_location to
6225         const dump_location_t &.
6226         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6227         declaration, as above.
6229 2018-07-01  Paul Koning  <ni1d@arrl.net>
6231         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6232         -munit-asm, -mgnu-asm, -mdec-asm.
6233         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6234         (pdp11_output_labelref): New.
6235         (pdp11_output_def): New.
6236         (pdp11_output_addr_vec_elt): New.
6237         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
6238         %# and %@ format codes.
6239         (pdp11_option_override): New.
6240         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6241         (pdp11_output_ident): New.
6242         (pdp11_asm_named_section): New.
6243         (pdp11_asm_init_sections): New.
6244         (pdp11_file_start): New.
6245         (pdp11_file_end): New.
6246         (output_ascii): Use .ascii/.asciz for -mdec-asm.
6247         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
6248         %o, like %c but octal.
6249         (pdp11_option_override): New.
6250         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6251         -mdec-asm.
6252         (DATA_SECTION_ASM_OP): Ditto.
6253         (READONLY_DATA_SECTION_ASM_OP): New.
6254         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6255         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6256         (ASM_OUTPUT_LABELREF): Ditto.
6257         (ASM_OUTPUT_DEF): Ditto.
6258         (ASM_OUTPUT_EXTERNAL): New.
6259         (ASM_OUTPUT_SOURCE_FILENAME): New.
6260         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6261         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6262         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
6263         %# and %@ format codes.
6264         * config/pdp11/pdp11.opt (mgnu-asm): New.
6265         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6266         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6267         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6269 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
6271         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6272         dereferencing path[] beyond its length.
6273         (debug_path): New.
6274         (debug_all_paths): New.
6275         (rewire_first_differing_edge): New.
6276         (adjust_paths_after_duplication): New.
6277         (duplicate_thread_path): Call adjust_paths_after_duplication.
6278         Add new argument.
6279         (thread_through_all_blocks): Add new argument to
6280         duplicate_thread_path.
6282 2018-06-30  Jim Wilson  <jimw@sifive.com>
6284         * config/riscv/predicates.md (p2m1_shift_operand): New.
6285         (high_mask_shift_operand): New.
6286         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6287         pattern using p2m1_shift_operand.
6288         (lshsi3_zero_extend_3+2): New combiner pattern using
6289         high_mask_shift_operand.
6291 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6293         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6294         split out from...
6295         (vect_recog_rotate_pattern): ...here.
6296         (vect_convert_input): Try to insert casts of invariants in the
6297         preheader.
6298         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6299         preheader to be empty.
6301 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6303         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6304         vector type.  If given, install it in the new statement's
6305         STMT_VINFO_VECTYPE.
6306         (vect_element_precision): New function.
6307         (vect_unpromoted_value): New struct.
6308         (vect_unpromoted_value::vect_unpromoted_value): New function.
6309         (vect_unpromoted_value::set_op): Likewise.
6310         (vect_look_through_possible_promotion): Likewise.
6311         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6312         (vect_widened_op_tree, vect_convert_input): Likewise.
6313         (vect_convert_inputs, vect_convert_output): Likewise.
6314         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6315         to handle the optional cast of the multiplication result and
6316         vect_widened_op_tree to detect the widened multiplication itself.
6317         Do not require the input and output of promotion casts to have
6318         the same sign, but base the signedness of the operation on the
6319         input rather than the result.  If the pattern includes two
6320         promotions, check that those promotions have the same sign.
6321         Do not restrict the MULT_EXPR handling to a double-width result;
6322         handle quadruple-width results and wider.  Use vect_convert_inputs
6323         to convert the inputs to the common type.
6324         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
6325         to handle the optional cast of the ABS result.  Also allow a sign
6326         change or a sign extension between the ABS and MINUS.
6327         Use vect_widened_op_tree to detect the widened subtraction and use
6328         vect_convert_inputs to convert the inputs to the common type.
6329         (vect_handle_widen_op_by_const): Delete.
6330         (vect_recog_widen_op_pattern): New function.
6331         (vect_recog_widen_mult_pattern): Use it.
6332         (vect_recog_widen_shift_pattern): Likewise.
6333         (vect_recog_widen_sum_pattern): Use
6334         vect_look_through_possible_promotion to handle the promoted
6335         PLUS_EXPR operand.
6337 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6339         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6340         the containing gimple_seq *.
6341         * gimple-iterator.h (gsi_for_stmt): Declare it.
6342         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6343         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6344         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6345         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6346         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6347         checks.
6348         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6349         split out from...
6350         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
6351         statement being replaced is part of an existing pattern
6352         definition sequence, inserting the new pattern statements before
6353         the original one.
6354         (vect_pattern_recog_1): Don't return a bool.  If the statement
6355         is already part of a pattern, instead apply pattern matching
6356         to the pattern definition statements.  Don't clear the
6357         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6358         (vect_pattern_recog): Don't break after the first match;
6359         continue processing the pattern definition statements instead.
6360         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6362 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6364         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6365         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6366         (vect_recog_widen_sum_pattern): Use it.
6368 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6370         * tree-vect-loop.c (vectorizable_reduction): Assert that the
6371         phi is not a pattern statement and has not been replaced by
6372         a pattern statement.
6373         * tree-vect-patterns.c (type_conversion_p): Don't check
6374         STMT_VINFO_IN_PATTERN_P.
6375         (vect_recog_vector_vector_shift_pattern): Likewise.
6376         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6377         the pattern statement rather than the original statement; check
6378         directly for a WIDEN_MULT_EXPR here.
6379         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6380         vect_is_simple_use to return the pattern statement rather
6381         than the original statement; use is_pattern_stmt_p to check
6382         for such a pattern statement.
6383         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6384         to return the pattern statement rather than the original statement;
6385         don't do the same transformation here.
6386         (vect_is_simple_use): If the defining statement has been replaced
6387         by a pattern statement, return the pattern statement instead.
6388         Remove the corresponding (local) transformation from the vectype
6389         overload.
6391 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6393         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
6394         end and default to null.
6395         * tree-vect-loop.c (vect_create_epilog_for_reduction)
6396         (vectorizable_reduction): Update calls accordingly, dropping the
6397         gimple ** argument if the passed-back statement isn't needed.
6398         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
6399         (vect_recog_rotate_pattern): Likewise.
6400         (vect_recog_mask_conversion_pattern): Likewise.
6401         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6402         (vect_mask_constant_operand_p): Likewise.
6403         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
6404         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
6405         (get_group_load_store_type, get_load_store_type): Likewise.
6406         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
6407         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
6408         (vectorizable_conversion, vectorizable_assignment): Likewise.
6409         (vectorizable_shift, vectorizable_operation): Likewise.
6410         (vectorizable_store, vect_is_simple_cond): Likewise.
6411         (vectorizable_condition, vectorizable_comparison): Likewise.
6412         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
6413         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
6414         and move it to the end.  Cope with null def_stmt_outs.
6416 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6418         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
6420 2018-06-29  Jeff Law  <law@redhat.com>
6422         * config/v850/v850.c (v850_legitimate_address_p): Handle large
6423         displacements for TARGET_V850E2V3 and newer.
6424         (TARGET_LRA_P): Remove.  Defaults to LRA now.
6425         * config/v850/v850.md (sign23byte_load): Remove.
6426         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
6427         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
6429 2018-06-29  Martin Liska  <mliska@suse.cz>
6431         PR lto/85759
6432         * coverage.c (coverage_init): Mangle full path name.
6433         * doc/invoke.texi: Document the change.
6434         * gcov-io.c (mangle_path): New.
6435         * gcov-io.h (mangle_path): Likewise.
6436         * gcov.c (mangle_name): Use mangle_path for path mangling.
6438 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6440         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
6441         if starting source register is not even.
6443 2018-06-29  Martin Liska  <mliska@suse.cz>
6445         PR tree-optimization/86263
6446         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
6447         Make edge redirection.
6449 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
6451         * dumpfile.c (dump_loc): Add indentation based on scope depth.
6452         (dump_scope_depth): New variable.
6453         (get_dump_scope_depth): New function.
6454         (dump_begin_scope): New function.
6455         (dump_end_scope): New function.
6456         * dumpfile.h (get_dump_scope_depth): New declaration.
6457         (dump_begin_scope): New declaration.
6458         (dump_end_scope): New declaration.
6459         (class auto_dump_scope): New class.
6460         (AUTO_DUMP_SCOPE): New macro.
6461         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
6462         AUTO_DUMP_SCOPE.
6464 2018-06-29  Richard Biener  <rguenther@suse.de>
6466         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
6467         compute_all_dependences succeeds.
6468         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
6469         exceed --param loop-max-datarefs-for-datadeps.
6471 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
6473         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
6475 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
6477         PR target/86348
6478         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
6479         alternative 0 in preferred_for_speed attribute.
6481 2018-06-28  Paul Koning  <ni1d@arrl.net>
6483         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
6484         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
6485         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
6486         * config/pdp11/pdp11.md: Correct "length" attribute calculation
6487         for shift insn patterns.
6489 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
6491         * cgraph.c (cgraph_node::get_body): Replace assignments to
6492         "dump_file" with calls to set_dump_file.
6493         * dumpfile.c (alt_dump_file): Make static, and group with...
6494         (alt_flags): ...this definition.
6495         (dumps_are_enabled): New variable.
6496         (refresh_dumps_are_enabled): New function.
6497         (set_dump_file): New function.
6498         (set_alt_dump_file): New function.
6499         (gcc::dump_manager::dump_start): Replace assignments to
6500         "dump_file" and "alt_dump_file" with calls to set_dump_file and
6501         set_alt_dump_file.
6502         (gcc::dump_manager::dump_finish): Likewise.
6503         * dumpfile.h (alt_dump_file): Delete decl.
6504         (dumps_are_enabled): New variable decl.
6505         (set_dump_file): New function decl.
6506         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
6507         global.
6508         * tree-nested.c (lower_nested_functions): Replace assignments to
6509         "dump_file" with calls to set_dump_file.
6511 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
6513         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
6514         goto_locus of each outgoing edge of each basic block.
6516 2018-06-28  Richard Biener  <rguenther@suse.de>
6518         * dwarf2out.c (decl_scope_table): Remove.
6519         (push_decl_scope): Likewise.
6520         (pop_decl_scope): Likewise.
6521         (gen_type_die_for_member): Do not call push/pop_decl_scope.
6522         (gen_struct_or_union_type_die): Likewise.
6523         (gen_tagged_type_die): Likewise.
6524         (dwarf2out_init): Do not initialize decl_scope_table.
6525         (dwarf2out_c_finalize): Do not free it.
6527 2018-06-28  Richard Biener  <rguenther@suse.de>
6529         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
6530         deciding whether to not re-use a DIE.
6532 2018-06-28  Richard Biener  <rguenther@suse.de>
6534         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
6535         DW_AT_abstract_origin attribute.
6537 2018-06-28  Martin Liska  <mliska@suse.cz>
6539         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6540         Use newly introduced constants.
6541         * tree-switch-conversion.h (struct jump_table_cluster):
6542         Define max_ratio_for_size and max_ratio_for_speed.
6544 2018-06-28  Martin Liska  <mliska@suse.cz>
6546         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6547         Add new checking assert to catch invalid state.
6548         (jump_table_cluster::can_be_handled): Handle single case
6549         clusters.
6550         (jump_table_cluster::is_beneficial): Bail out for such case.
6551         (bit_test_cluster::find_bit_tests):
6552         Add new checking assert to catch invalid state.
6553         (bit_test_cluster::can_be_handled): Handle single case
6554         clusters.
6555         (bit_test_cluster::is_beneficial): Bail out for such case.
6556         (switch_decision_tree::analyze_switch_statement):
6557         Fix comment.
6559 2018-06-28  Martin Liska  <mliska@suse.cz>
6561         * common.opt: Introduce -completion option.
6562         * gcc.c (driver_handle_option): Handle it.
6563         (driver::main): Print completions if completion
6564         is set.
6565         * opt-suggestions.c (option_proposer::get_completions):
6566         New function.
6567         (option_proposer::suggest_completion): Likewise.
6568         (option_proposer::find_param_completions): Likewise.
6569         (verify_autocompletions): Likewise.
6570         (test_completion_valid_options): Likewise.
6571         (test_completion_valid_params): Likewise.
6572         (in_completion_p): Likewise.
6573         (empty_completion_p): Likewise.
6574         (test_completion_partial_match): Likewise.
6575         (test_completion_garbage): Likewise.
6576         (opt_proposer_c_tests): Likewise.
6577         * opt-suggestions.h: Declare new functions.
6578         * opts.c (common_handle_option): Handle OPT__completion_.
6579         * selftest-run-tests.c (selftest::run_tests): Add
6580         opt_proposer_c_tests.
6581         * selftest.c (assert_str_startswith): New.
6582         * selftest.h (assert_str_startswith): Likewise.
6583         (opt_proposer_c_tests): New.
6584         (ASSERT_STR_STARTSWITH): Likewise.
6586 2018-06-28  Martin Liska  <mliska@suse.cz>
6588         * Makefile.in: Add opt-suggestions.o.
6589         * gcc-main.c: Include opt-suggestions.h.
6590         * gcc.c (driver::driver): Likewise.
6591         (driver::~driver): Remove m_option_suggestions.
6592         (driver::build_option_suggestions): Moved to option_proposer.
6593         (driver::suggest_option): Likewise.
6594         (driver::handle_unrecognized_options): Use option_proposer.
6595         * gcc.h (class driver): Add new memver m_option_proposer.
6596         * opt-suggestions.c: New file.
6597         * opt-suggestions.h: New file.
6599 2018-06-28  Martin Liska  <mliska@suse.cz>
6601         * vec.h (class auto_string_vec): New (moved from auto_argvec).
6602         (auto_string_vec::~auto_string_vec): Likewise.
6604 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
6606         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
6607         prevent_decl_creation_for_types fields up and add reset_location field.
6608         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
6609         statement if id->reset_location is true.
6610         (copy_edges_for_bb): Do not set goto_locus on the new edges if
6611         id->reset_location is true.
6612         (copy_phis_for_bb): Force input_location on the arguments if
6613         id->reset_location is true.
6614         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
6615         is set on the function to be inlined.
6617 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
6619         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
6621 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
6623         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
6624         registers for Pmode.
6625         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
6626         hard registers for the clobbered pseudo.
6628 2018-06-27  Paul Koning  <ni1d@arrl.net>
6630         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6631         mutually exclusive options.
6632         * config/pdp11/constraints.md (h): New constraint.
6633         (O): Update definition to match shift code generation.
6634         (D): New constraint.
6635         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
6636         (CCFP): Remove.
6637         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
6638         function.
6639         (output_jump): Change arguments.
6640         (pdp11_fixed_cc_regs): New function.
6641         (pdp11_cc_mode): Ditto.
6642         (pdp11_expand_shift): Ditto.
6643         (pdp11_assemble_shift): Ditto.
6644         (pdp11_small_shift): Ditto.
6645         (pdp11_branch_cost): Remove.
6646         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
6647         from output.
6648         (pdp11_register_move_cost): Update for CC registers.
6649         (pdp11_rtx_costs): Add case for LSHIFTRT.
6650         (pdp11_output_jump): Add CCNZ mode conditional branches.
6651         (notice_update_cc_on_set): Remove.
6652         (pdp11_cc_mode): New function.
6653         (simple_memory_operand): Correct pre/post decrement case.
6654         (no_side_effect_operand): New function.
6655         (pdp11_regno_reg_class): Add CC_REGS class.
6656         (pdp11_fixed_cc_regs): New function.
6657         (pdp11_small_shift): New function.
6658         (pdp11_expand_shift): New function to expand shift insns.
6659         (pdp11_assemble_shift): New function to output shifts.
6660         (pdp11_branch_cost): Remove.
6661         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
6662         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
6663         (WCHAR_TYPE): Ditto.
6664         (PTRDIFF_TYPE): Ditto.
6665         (ADJUST_INSN_LENGTH): New macro.
6666         (FIXED_REGISTERS): Add CC registers.
6667         (CALL_USED_REGISTERS): Ditto.
6668         (reg_class): Ditto.
6669         (REG_CLASS_NAMES): Ditto.
6670         (REG_CLASS_CONTENTS): Ditto.
6671         (SELECT_CC_MODE): Use new function.
6672         (TARGET_FLAGS_REGNUM): New macro.
6673         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
6674         (cc0_reg_rtx): Remove.
6675         (CC_STATUS_MDEP): Remove.
6676         (CC_STATUS_MDEFP_INIT): Remove.
6677         (CC_IN_FPU): Remove.
6678         (NOTICE_UPDATE_CC): Remove.
6679         (REGISTER_NAMES): Add CC registers.
6680         (BRANCH_COST): Change to constant 1.
6681         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
6682         handling.
6683         * config/pdp11/pdp11.opt (mbcopy): Remove.
6684         (mbcopy-builtin): Remove.
6685         (mbranch-cheap): Remove.
6686         (mbranch-expensive): Remove.
6687         * config/pdp11/predicates.md (expand_shift_operand): Update to
6688         match shift code generation.
6689         (ccnz_operator): New predicate.
6690         * doc/invoke.texi (PDP-11 Options): Remove deleted options
6691         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
6692         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
6693         exclusive options.
6694         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
6695         description of O constraint.
6697 2018-06-27  Jeff Law  <law@redhat.com>
6698             Austin Law  <austinklaw@gmail.com>
6700         * config/v850/v850.md (addsi3_set_flags): New pattern.
6701         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
6702         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
6703         (zero_extendhisi2_v850_set_flags): Likewise.
6704         (zero_extendqisi2_v850_set_flags): Likewise.
6705         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
6706         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
6707         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
6709         * config/v850/v850-protos.h (notice_update_cc): Remove.
6710         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
6711         (v850_print_operand): Handle 'D' and "d".
6712         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
6713         Add handling of arithmetic/logical operations compared against zero.
6714         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
6715         Do not look at v850_compare_op, instead get mode from last argument.
6716         (v850_gen_compare): Remove
6717         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
6718         after reload for prologue insns.
6719         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
6720         patterns.
6721         (construct_save_jarl): Likewise.
6722         (TARGET_FLAGS_REGNUM): Define.
6723         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
6724         (NOTICE_UPDATE_CC): Remove.
6725         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
6726         than cc0.  Conditionalize on reload_completed.
6727         (cmpsi_insn, setfcc_insn): Likewise.
6728         (tst1 splitter): Turn into define_and_split which sets the flags
6729         after reload.
6730         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
6731         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
6732         (cstoresf4, cstoredf4): Clobber the flags.
6733         (cmpsi, cmpsf, cmpdf): Remove expanders.
6734         (setf_insn): Remove pattern.
6735         (addsi3): Turn into define_and_split which clobbers the flags after
6736         reload and a suitable pattern (addsi3_clobber_flags) for use after
6737         reload.
6738         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
6739         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
6740         (ashrsi3, ashrsi3_v850e2): Likewise.
6741         (bins): Clobber the flags.
6742         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
6743         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
6744         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
6745         (call_value_internal_short, call_value_internal_long): Likewise.
6746         (callt_save_interrupt, callt_return_interrupt): Likewise.
6747         (save_interrupt, return_interrupt): Likewise.
6748         (callt_save_all_interrupt, save_all_interrupt): Likewise.
6749         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
6750         (restore_all_interrupt, _restore_all_interrupt): Likewise.
6751         (All FP comparisons): Only allow after reload has completed.
6752         (trfsr): Likewise.
6753         (divh, divhu): Tweak output template.
6754         (branch_z_normal, branch_z_invert): Remove
6755         (branch_nz_normal, branch_nz_invert): Likewise.
6756         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
6758         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
6759         * config/v850/v850.c (notice_update_cc): Remove.
6760         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
6761         (CC_NO_CARRY): Likewise.
6762         (NOTICE_UPDATE_CC): Define to nothing.
6763         * config/v850/v850.md: Remove block comment on cc0 handling
6764         Remove "cc" attribute from all patterns.  Remove cc_status handling
6765         from all patterns.  Minor formatting fixes.
6767 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6769         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
6770         (cortex-a76.cortex-a55): Likewise.
6771         * config/aarch64/aarch64-tune.md: Regenerate.
6772         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
6773         cortex-a76.cortex-a55.
6775 2018-06-27  Jeff Law  <law@redhat.com>
6777         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
6778         (MULTILIB_DIRNAMES): Similarly.
6780 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
6782         * gimple.h (gimple_return_retbnd): Delete.
6783         (gimple_return_set_retbnd): Likewise.
6784         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
6785         gimple_return_set_retbnd.
6786         * gimple-pretty-print.c (dump_gimple_return): Remove call to
6787         gimple_return_retbnd and adjust.
6788         * tree-inline.h (struct copy_body_data): Remove retbnd field.
6789         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
6790         Explicitly return NULL in a couple more cases.  Move assertion
6791         on debug statements and remove unreachable code.
6792         (reset_debug_binding): Do not test id->retbnd.
6793         (expand_call_inline): Do not set it.
6795 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
6797         * configure.ac: Add --disable-gcov option.
6798         * configure: Regenerate.
6799         * Makefile.in: Honour @enable_gcov@.
6800         * doc/install.texi: Document --disable-gcov.
6802 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6804         * config/arm/arm-cpus.in (cortex-a76): New entry.
6805         (cortex-a76.cortex-a55): Likewise.
6806         * config/arm/arm-tables.opt: Regenerate.
6807         * config/arm/arm-tune.md: Likewise.
6808         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
6809         * doc/invoke.texi (ARM Options): Document cortex-a76 and
6810         cortex-a76.cortex-a55.
6812 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
6814         PR target/85769
6815         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
6817 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
6819         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
6820         comment.
6821         (EPILOGUE_USES): Likewise.
6823 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
6825         * tree-inline.c (remap_location): New function extracted from...
6826         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
6827         (copy_phis_for_bb): ...here.  Call remap_location.
6828         (copy_cfg_body): Adjust call to copy_edges_for_bb.
6830 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
6832         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
6833         unaligned vsx for 16B memset.
6835 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
6837         PR target/86285
6838         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
6839         ieee128_float_type_node to long_double_type_node unless
6840         TARGET_LONG_DOUBLE_128 is set.
6842 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
6844         * cfgloop.c (get_loop_location): Convert return type from
6845         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
6846         by implicit construction from rtx_insn *, and using
6847         dump_user_location_t::from_function_decl for the fallback case.
6848         * cfgloop.h (get_loop_location): Convert return type from
6849         location_t to dump_user_location_t.
6850         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
6851         dump_printf_loc to pass in a dump_location_t rather than a
6852         location_t, via the gimple stmt.
6853         * coverage.c (get_coverage_counts): Update calls to
6854         dump_printf_loc to pass in dump_location_t rather than a
6855         location_t.
6856         * doc/optinfo.texi (Dump types): Convert example of
6857         dump_printf_loc from taking "locus" to taking "insn".  Update
6858         description of the "_loc" calls to cover dump_location_t.
6859         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
6860         "selftest.h".
6861         (dump_user_location_t::dump_user_location_t): New constructors,
6862         from gimple *stmt and rtx_insn *.
6863         (dump_user_location_t::from_function_decl): New function.
6864         (dump_loc): Make static.
6865         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
6866         const dump_location_t &.
6867         (dump_generic_expr_loc): Delete.
6868         (dump_printf_loc): Convert param "loc" from location_t to
6869         const dump_location_t &.
6870         (selftest::test_impl_location): New function.
6871         (selftest::dumpfile_c_tests): New function.
6872         * dumpfile.h: Include "profile-count.h".
6873         (class dump_user_location_t): New class.
6874         (struct dump_impl_location_t): New struct.
6875         (class dump_location_t): New class.
6876         (dump_printf_loc): Convert 2nd param from source_location to
6877         const dump_location_t &.
6878         (dump_generic_expr_loc): Delete.
6879         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
6880         const dump_location_t &.
6881         * gimple-fold.c (fold_gimple_assign): Update call to
6882         dump_printf_loc to pass in a dump_location_t rather than a
6883         location_t, via the gimple stmt.
6884         (gimple_fold_call): Likewise.
6885         * gimple-loop-interchange.cc
6886         (loop_cand::analyze_iloop_reduction_var): Update for change to
6887         check_reduction_path.
6888         (tree_loop_interchange::interchange): Update for change to
6889         find_loop_location.
6890         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
6891         change in return-type of find_loop_location.
6892         (graphite_regenerate_ast_isl): Likewise.
6893         * graphite-optimize-isl.c (optimize_isl): Likewise.
6894         * graphite.c (graphite_transform_loops): Likewise.
6895         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
6896         pass in a dump_location_t rather than a location_t, via the
6897         gimple stmt.
6898         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6899         * ipa.c (walk_polymorphic_call_targets): Likewise.
6900         * loop-unroll.c (report_unroll): Convert "locus" param from
6901         location_t to dump_location_t.
6902         (decide_unrolling): Update for change to get_loop_location's
6903         return type.
6904         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
6905         location_t to dump_user_location_t.
6906         (grid_find_single_omp_among_assignments_1): Updates calls to
6907         dump_printf_loc to pass in a dump_location_t rather than a
6908         location_t, via the gimple stmt.
6909         (grid_parallel_clauses_gridifiable): Convert "tloc" from
6910         location_t to dump_location_t.  Updates calls to dump_printf_loc
6911         to pass in a dump_location_t rather than a location_t, via the
6912         gimple stmt.
6913         (grid_inner_loop_gridifiable_p): Likewise.
6914         (grid_dist_follows_simple_pattern): Likewise.
6915         (grid_gfor_follows_tiling_pattern): Likewise.
6916         (grid_target_follows_gridifiable_pattern): Likewise.
6917         (grid_attempt_target_gridification): Convert initialization
6918         of local "grid" from memset to zero-initialization; FIXME: does
6919         this require C++11?  Update call to dump_printf_loc to pass in a
6920         optinfo_location rather than a location_t, via the gimple stmt.
6921         * profile.c (read_profile_edge_counts): Updates call to
6922         dump_printf_loc to pass in a dump_location_t rather than a
6923         location_t
6924         (compute_branch_probabilities): Likewise.
6925         * selftest-run-tests.c (selftest::run_tests): Call
6926         dumpfile_c_tests.
6927         * selftest.h (dumpfile_c_tests): New decl.
6928         * tree-loop-distribution.c (pass_loop_distribution::execute):
6929         Update for change in return type of find_loop_location.
6930         * tree-parloops.c (parallelize_loops): Likewise.
6931         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
6932         "locus" from location_t to dump_user_location_t.
6933         (canonicalize_loop_induction_variables): Likewise.
6934         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
6935         for change in return type of find_loop_location.
6936         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
6937         to dump_printf_loc to pass in a dump_location_t rather than a
6938         location_t, via the stmt.
6939         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
6940         Likewise.
6941         * tree-vect-loop-manip.c (find_loop_location): Convert return
6942         type from source_location to dump_user_location_t.
6943         (vect_do_peeling): Update for above change.
6944         (vect_loop_versioning): Update for change in type of
6945         vect_location.
6946         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
6947         from location_t to dump_user_location_t.
6948         (vect_estimate_min_profitable_iters): Update for change in type
6949         of vect_location.
6950         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
6951         location_t to dump_location_t.
6952         (vect_slp_bb): Update for change in type of vect_location.
6953         * tree-vectorizer.c (vect_location): Convert from source_location
6954         to dump_user_location_t.
6955         (try_vectorize_loop_1): Update for change in vect_location's type.
6956         (vectorize_loops): Likewise.
6957         (increase_alignment): Likewise.
6958         * tree-vectorizer.h (vect_location): Convert from source_location
6959         to dump_user_location_t.
6960         (find_loop_location): Convert return type from source_location to
6961         dump_user_location_t.
6962         (check_reduction_path): Convert 1st param from location_t to
6963         dump_user_location_t.
6964         * value-prof.c (check_counter): Update call to dump_printf_loc to
6965         pass in a dump_user_location_t rather than a location_t; update
6966         call to error_at for change in type of "locus".
6967         (check_ic_target): Update call to dump_printf_loc to
6968         pass in a dump_user_location_t rather than a location_t, via the
6969         call_stmt.
6971 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
6973         * config/s390/s390.h (enum processor_flags): Do not use
6974         default tune parameter when -march was specified.
6976 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
6978         PR target/86314
6979         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
6980         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
6981         operands.
6983 2018-06-26  Richard Biener  <rguenther@suse.de>
6985         PR tree-optimization/86287
6986         PR bootstrap/86316
6987         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
6988         (vect_analyze_loop): Initialize n_stmts.
6990 2018-06-26  Richard Biener  <rguenther@suse.de>
6992         PR middle-end/86271
6993         * fold-const.c (fold_convertible_p): Pointer extension
6994         isn't valid.
6996 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
6998         PR debug/86064
6999         * dwarf2out.c (loc_list_has_views): Adjust comments.
7000         (dw_loc_list): Split single cross-partition range with
7001         nonzero locview.
7003 2018-06-25  Jeff Law  <law@redhat.com>
7005         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7006         on -mbig-switch by default.
7008         * config/v850/predicates.md (const_float_1_operand): Fix match_code
7009         test.
7010         (const_float_0_operand): Remove unused predicate.
7011         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7012         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7013         (recipsf2): New expander.  Original pattern now called
7014         (recipsf2_insn).
7015         (recipdf2, recipdf2_insn): Similarly.
7016         (rsqrtsf2, rsqrtsf2_insn): Similarly
7017         (rsqrtdf2, rsqrtdf2_insn): Similarly
7019 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
7021         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7022         Simplify logic for FreeBSD (twice).
7024 2018-06-25  Martin Sebor  <msebor@redhat.com>
7026         PR tree-optimization/86204
7027         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7028         a strnlen result if it's less than the length of the string.
7030 2018-06-25  Martin Sebor  <msebor@redhat.com>
7032         PR tree-optimization/85700
7033         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7034         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7035         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7037 2018-06-25  Martin Sebor  <msebor@redhat.com>
7039         * doc/extend.texi (Zero-length arrays): Update and clarify.
7041 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
7043         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7044         added IEEE/IBM long double multilib support on PowerPC little
7045         endian Linux systems.
7046         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7047         (MULTILIB_DEFAULTS): Likewise.
7048         * config/rs6000/rs6000.c (rs6000_option_override_internal):
7049         Likewise.
7050         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7051         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7052         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7054 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
7056         PR middle-end/86311
7057         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7058         (REORDER_45): Likewise.
7060 2018-06-25  Jeff Law  <law@redhat.com>
7062         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7063         dividend to 32 bits.  Adjust length.
7064         (udivmodhi4): Cleanup output template.  Fix length.
7066 2018-06-25  Carl Love  <cel@us.ibm.com>
7068         * config/rs6000/vsx.md: Change word selector to prefered location.
7070 2018-06-25  Richard Biener  <rguenther@suse.de>
7072         PR tree-optimization/86304
7073         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7074         epilogue-if-converted loops as well.
7076 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
7078         * lto-section-out.c (lto_begin_section): Do not print section
7079         name for noaddr and unnumbered dumps.
7081 2018-06-25  Richard Biener  <rguenther@suse.de>
7083         * tree-vectorizer.h (struct vec_info_shared): New structure
7084         with parts split out from struct vec_info and loop_nest from
7085         struct _loop_vec_info.
7086         (struct vec_info): Adjust accordingly.
7087         (struct _loop_vec_info): Likewise.
7088         (LOOP_VINFO_LOOP_NEST): Adjust.
7089         (LOOP_VINFO_DATAREFS): Likewise.
7090         (LOOP_VINFO_DDRS): Likewise.
7091         (struct _bb_vec_info): Likewise.
7092         (BB_VINFO_DATAREFS): Likewise.
7093         (BB_VINFO_DDRS): Likewise.
7094         (struct _stmt_vec_info): Add dr_aux member.
7095         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7096         (DR_MISALIGNMENT_UNINITIALIZED): New.
7097         (set_dr_misalignment): Adjust.
7098         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7099         (vect_analyze_loop): Adjust prototype.
7100         (vect_analyze_loop_form): Likewise.
7101         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7102         Compute dependences lazily.
7103         (vect_record_base_alignments): Use shared datarefs/ddrs.
7104         (vect_verify_datarefs_alignment): Likewise.
7105         (vect_analyze_data_refs_alignment): Likewise.
7106         (vect_analyze_data_ref_accesses): Likewise.
7107         (vect_analyze_data_refs): Likewise.
7108         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7109         constructor parameter for shared part.
7110         (vect_analyze_loop_form): Pass in shared part and adjust.
7111         (vect_analyze_loop_2): Pass in storage for the number of
7112         stmts.  Move loop nest finding to the caller.  Compute
7113         datarefs lazily.
7114         (vect_analyze_loop): Pass in shared part.
7115         (vect_transform_loop): Verify shared datarefs are unchanged.
7116         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7117         constructor parameter for shared part.
7118         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7119         (vect_slp_bb): Verify shared datarefs are unchanged before
7120         transform.
7121         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7122         change.
7123         (new_stmt_vec_info): Initialize DR_AUX misalignment to
7124         DR_MISALIGNMENT_UNINITIALIZED.
7125         * tree-vectorizer.c (vec_info::vec_info): Add constructor
7126         parameter for shared part.
7127         (vec_info::~vec_info): Adjust.
7128         (vec_info_shared::vec_info_shared): New.
7129         (vec_info_shared::~vec_info_shared): Likewise.
7130         (vec_info_shared::save_datarefs): Likewise.
7131         (vec_info_shared::check_datarefs): Likewise.
7132         (try_vectorize_loop_1): Construct shared part live for analyses
7133         of a single loop for multiple vector sizes.
7134         * tree-parloops.c (gather_scalar_reductions): Adjust.
7136 2018-06-25  Richard Biener  <rguenther@suse.de>
7138         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7139         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7140         (vect_analyze_data_refs): Remove similar code from here and
7141         simplify accordingly.
7143 2018-06-25  Richard Biener  <rguenther@suse.de>
7145         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7146         for reverse storage order accesses rather than asserting
7147         they cannot happen here.
7149 2018-06-25  Tom de Vries  <tdevries@suse.de>
7151         PR debug/86257
7152         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7153         Use data16 instead of .byte for insn prefix.
7155 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
7157         PR C++/86082
7158         * parser.c (make_char_string_pack): Pass this literal chars
7159         through cpp_interpret_string.
7160         (cp_parser_userdef_numeric_literal): Check the result of
7161         make_char_string_pack.
7163 2018-06-24  Maya Rashish  <coypu@sdf.org>
7165         * ginclude/stddef.h: Simplify conditions around avoiding
7166         re-definition of __size_t.
7168 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7170         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7171         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7173 2018-06-22  Maya Rashish  <coypu@sdf.org>
7175         * doc/invoke.texi (mno-fancy-math-387): Update for changes
7176         made to OpenBSD and NetBSD through the years.
7178 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7180         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7181         behavior of vec_pack (vector double, vector double) to match
7182         behavior of vec_float2 (vector double, vector double).
7184 2018-06-22  Olivier Hainque  <hainque@adacore.com>
7186         * gimplify.c (gimplify_function_tree): Prevent creation
7187         of a trampoline for the address of the current function
7188         passed to entry/exit instrumentation hooks.
7190 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
7192         PR target/86222
7193         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7194         correctly.
7196 2018-06-22  Martin Liska  <mliska@suse.cz>
7198         PR tree-optimization/86263
7199         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7200         Bail out if is_enabled is false.
7201         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7202         New declaration.
7203         (jump_table_cluster::is_enabled): New function.
7205 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7207         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7208         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7209         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7210         (lto_input_ts_binfo_tree_pointers): Likewise.
7211         * tree-streamer-out.c (streamer_write_tree_bitfields,
7212         write_ts_binfo_tree_pointers): Likewise.
7213         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7215 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7217         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7219 2018-06-22  Martin Liska  <mliska@suse.cz>
7221         * symbol-summary.h (get): Make it pure and inline move
7222         functionality from ::get function.
7223         (get): Remove and inline into ::get and ::get_create.
7224         (get_create): Move code from ::get function.
7226 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7228         PR target/85994
7229         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7230         -x assembler-with-cpp.
7232 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7234         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7235         _FILE_OFFSET_BITS=64 for C++.
7237 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
7239         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7240         conversion insn that shows up when pr85657-3.c is compiled using
7241         IEEE 128-bit long double.
7242         (neg<mode>2_internal): Use the correct mode to check whether the
7243         mode is IBM extended.
7244         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7245         multiply and divide external functions from being created more
7246         than once.
7248 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7250         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7251         functions.
7252         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
7253         the edge can be forwarded.
7254         (cfg_layout_merge_blocks): Likewise.
7256 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7258         * except.c (finish_eh_generation): Commit edge insertions only after
7259         the EH edges have been redirected from post-landing to landing pads.
7261 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7263         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7264         create_tmp_var_for to create the FRAME decl.
7265         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7267 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7269         * tree-inline.c (copy_edges_for_bb): Minor tweak.
7270         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7271         debug statement when resetting its value.
7272         (expand_call_inline): Copy the locus of the call onto the assignment
7273         of the return value, if any.  Use local variable in more cases.
7275 2018-06-21  Martin Liska  <mliska@suse.cz>
7277         * ipa-pure-const.c (propagate_nothrow): Use
7278         funct_state_summaries->get.
7279         (dump_malloc_lattice): Likewise.
7280         (propagate_malloc): Likewise.
7282 2018-06-21  Richard Biener  <rguenther@suse.de>
7284         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7285         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7286         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7287         comment.
7288         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7289         BLOCK_ABSTRACT_ORIGIN unconditionally.
7291 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
7293         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7294         deleting it.
7295         * ipa-reference.c (ipa_reference_c_finalize): Delete
7296         ipa_ref_opt_sum_summaries and set it to NULL.
7298 2018-06-21  Tom de Vries  <tdevries@suse.de>
7300         PR tree-optimization/85859
7301         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7302         test with comment from bb_no_side_effects_p.
7304 2018-06-21  Richard Biener  <rguenther@suse.de>
7306         PR tree-optimization/86232
7307         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7308         max for constant niter.
7310 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7312         * config/aarch64/aarch64-simd.md
7313         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7315 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7317         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7318         Make opernads of the unspec commutative.
7320 2018-06-21  Richard Biener  <rguenther@suse.de>
7322         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7323         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7324         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7325         (vect_analyze_data_ref_dependence): Re-order checks to deal with
7326         NULL DR_STEP.
7327         (vect_record_base_alignments): Do not record base alignment
7328         for gathers or scatters.
7329         (vect_compute_data_ref_alignment): Drop return value that is always
7330         true.  Bail out early for gathers or scatters.
7331         (vect_enhance_data_refs_alignment): Bail out early for gathers
7332         or scatters.
7333         (vect_find_same_alignment_drs): Likewise.
7334         (vect_analyze_data_refs_alignment): Remove dead code.
7335         (vect_slp_analyze_and_verify_node_alignment): Likewise.
7336         (vect_analyze_data_refs): For possible gathers or scatters do
7337         not create an alternate DR, just check their possible validity
7338         and mark them.  Adjust DECL_NONALIASED handling to not rely
7339         on DR_BASE_ADDRESS.
7340         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7341         update inits of gathers or scatters.
7342         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7343         Also copy gather/scatter flag to pattern vinfo.
7345 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7347         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7348         behavior of vec_packsu (vector unsigned long long, vector unsigned
7349         long long) to match behavior of vec_packs with same signature.
7351 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
7352             Thomas Schwinge <thomas@codesourcery.com>
7353             Cesar Philippidis  <cesar@codesourcery.com>
7355         * gimplify.c (gimplify_scan_omp_clauses): Add support for
7356         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7357         (gimplify_adjust_omp_clauses): Likewise.
7358         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7359         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7360         (gimplify_omp_target_update): Update handling of acc update and
7361         enter/exit data.
7362         * omp-low.c (install_var_field): Remove unused parameter
7363         base_pointers_restrict.
7364         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7365         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7366         FINALIZE}
7367         (omp_target_base_pointers_restrict_p): Delete.
7368         (scan_omp_target): Update call to scan_sharing_clauses.
7369         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7370         FINALIZE}.
7371         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7372         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7373         (convert_local_omp_clauses): Likewise.
7374         * tree-pretty-print.c (dump_omp_clause): Likewise.
7375         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
7376         FINALIZE}.
7377         (omp_clause_code_name): Likewise.
7379 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
7381         PR debug/86194
7382         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7383         be narrowed.
7385         PR tree-optimization/86231
7386         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
7387         anti-range don't overwrite *vr0min before using it to compute *vr0max.
7389 2018-06-20  Tom de Vries  <tdevries@suse.de>
7391         PR tree-optimization/86097
7392         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
7393         iv type if signedness of iv type is not the same as that of *nit.
7395 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
7397         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
7398         EDGE_EH edges, verify they are all EDGE_EH.
7400 2018-06-20  Maya Rashish  <coypu@sdf.org>
7402         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
7404 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7406         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
7407         * config/aarch64/aarch64.c (xgene1_tunings): Add
7408         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
7409         (aarch64_mode_valid_for_sched_fusion_p):
7410         Allow 16-byte modes.
7411         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
7412         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
7413         128-bit modes.
7414         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
7415         New pattern.
7416         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
7417         * config/aarch64/iterators.md (VQ2): New mode iterator.
7419 2018-06-20  Martin Liska  <mliska@suse.cz>
7421         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7422         Change default ratio from 10 to 8.
7424 2018-06-20  Martin Liska  <mliska@suse.cz>
7426         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7427         New.
7428         (bit_test_cluster::find_bit_tests): Likewise.
7429         (switch_decision_tree::analyze_switch_statement): Find clusters.
7430         * tree-switch-conversion.h (struct jump_table_cluster): Document
7431         hierarchy.
7433 2018-06-20  Martin Liska  <mliska@suse.cz>
7435         * tree-switch-conversion.c (switch_conversion::collect):
7436         Record m_uniq property.
7437         (switch_conversion::expand): Bail out for special conditions.
7438         (group_cluster::~group_cluster): New.
7439         (group_cluster::group_cluster): Likewise.
7440         (group_cluster::dump): Likewise.
7441         (jump_table_cluster::emit): New.
7442         (switch_decision_tree::fix_phi_operands_for_edges): New.
7443         (struct case_node): Remove struct.
7444         (jump_table_cluster::can_be_handled): New.
7445         (case_values_threshold): Moved to header.
7446         (reset_out_edges_aux): Likewise.
7447         (jump_table_cluster::is_beneficial): New.
7448         (bit_test_cluster::can_be_handled): Likewise.
7449         (add_case_node): Remove.
7450         (bit_test_cluster::is_beneficial): New.
7451         (case_bit_test::cmp): New.
7452         (bit_test_cluster::emit): New.
7453         (expand_switch_as_decision_tree_p): Remove.
7454         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
7455         (fix_phi_operands_for_edge): Likewise.
7456         (switch_decision_tree::analyze_switch_statement): New.
7457         (compute_cases_per_edge): Move ...
7458         (switch_decision_tree::compute_cases_per_edge): ... here.
7459         (try_switch_expansion): Likewise.
7460         (switch_decision_tree::try_switch_expansion): Likewise.
7461         (record_phi_operand_mapping): Likewise.
7462         (switch_decision_tree::record_phi_operand_mapping): Likewise.
7463         (emit_case_decision_tree): Likewise.
7464         (switch_decision_tree::emit): Likewise.
7465         (balance_case_nodes): Likewise.
7466         (switch_decision_tree::balance_case_nodes): Likewise.
7467         (dump_case_nodes): Likewise.
7468         (switch_decision_tree::dump_case_nodes): Likewise.
7469         (emit_jump): Likewise.
7470         (switch_decision_tree::emit_jump): Likewise.
7471         (emit_cmp_and_jump_insns): Likewise.
7472         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
7473         (emit_case_nodes): Likewise.
7474         (switch_decision_tree::emit_case_nodes): Likewise.
7475         (conditional_probability): Remove.
7476         * tree-switch-conversion.h (enum cluster_type): New.
7477         (PRINT_CASE): New.
7478         (struct cluster): Likewise.
7479         (cluster::cluster): Likewise.
7480         (struct simple_cluster): Likewise.
7481         (simple_cluster::simple_cluster): Likewise.
7482         (struct group_cluster): Likewise.
7483         (struct jump_table_cluster): Likewise.
7484         (struct bit_test_cluster): Likewise.
7485         (struct min_cluster_item): Likewise.
7486         (struct case_tree_node): Likewise.
7487         (case_tree_node::case_tree_node): Likewise.
7488         (jump_table_cluster::case_values_threshold): Likewise.
7489         (struct case_bit_test): Likewise.
7490         (struct switch_decision_tree): Likewise.
7491         (struct switch_conversion): Likewise.
7492         (switch_decision_tree::reset_out_edges_aux): Likewise.
7494 2018-06-20  Martin Liska  <mliska@suse.cz>
7496         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
7497         (hoist_edge_and_branch_if_true): Likewise.
7498         (expand_switch_using_bit_tests_p): Likewise.
7499         (struct case_bit_test): Likewise.
7500         (case_bit_test_cmp): Likewise.
7501         (emit_case_bit_tests): Likewise.
7502         (switch_conversion::switch_conversion): New class.
7503         (struct switch_conv_info): Remove old struct.
7504         (collect_switch_conv_info): More to ...
7505         (switch_conversion::collect): ... this.
7506         (check_range): Likewise.
7507         (switch_conversion::check_range): Likewise.
7508         (check_all_empty_except_final): Likewise.
7509         (switch_conversion::check_all_empty_except_final): Likewise.
7510         (check_final_bb): Likewise.
7511         (switch_conversion::check_final_bb): Likewise.
7512         (create_temp_arrays): Likewise.
7513         (switch_conversion::create_temp_arrays): Likewise.
7514         (free_temp_arrays): Likewise.
7515         (gather_default_values): Likewise.
7516         (switch_conversion::gather_default_values): Likewise.
7517         (build_constructors): Likewise.
7518         (switch_conversion::build_constructors): Likewise.
7519         (constructor_contains_same_values_p): Likewise.
7520         (switch_conversion::contains_same_values_p): Likewise.
7521         (array_value_type): Likewise.
7522         (switch_conversion::array_value_type): Likewise.
7523         (build_one_array): Likewise.
7524         (switch_conversion::build_one_array): Likewise.
7525         (build_arrays): Likewise.
7526         (switch_conversion::build_arrays): Likewise.
7527         (gen_def_assigns): Likewise.
7528         (switch_conversion::gen_def_assigns): Likewise.
7529         (prune_bbs): Likewise.
7530         (switch_conversion::prune_bbs): Likewise.
7531         (fix_phi_nodes): Likewise.
7532         (switch_conversion::fix_phi_nodes): Likewise.
7533         (gen_inbound_check): Likewise.
7534         (switch_conversion::gen_inbound_check): Likewise.
7535         (process_switch): Use the newly created class.
7536         (switch_conversion::expand): New.
7537         (switch_conversion::~switch_conversion): New.
7538         * tree-switch-conversion.h: New file.
7540 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7542         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
7543         tree-vect-patterns.c.
7544         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
7545         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
7546         (vect_recog_sad_pattern): Likewise.
7547         (vect_recog_widen_sum_pattern): Likewise.
7548         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
7549         (vect_recog_widen_shift_pattern): Remove the type_in argument.
7550         (vect_recog_rotate_pattern): Likewise.
7551         (vect_recog_mult_pattern): Likewise.
7552         (vect_recog_vector_vector_shift_pattern): Likewise.
7553         (vect_recog_divmod_pattern): Likewise.
7554         (vect_recog_mixed_size_cond_pattern): Likewise.
7555         (vect_recog_bool_pattern): Likewise.
7556         (vect_recog_mask_conversion_pattern): Likewise.
7557         (vect_try_gather_scatter_pattern): Likewise.
7558         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
7559         (vect_recog_over_widening_pattern): Likewise.
7560         (vect_recog_gather_scatter_pattern): Likewise.
7561         (vect_recog_func_ptr): Move from tree-vectorizer.h
7562         (vect_vect_recog_func_ptrs): Move further down the file.
7563         (vect_recog_func): Likewise.  Remove the third argument.
7564         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
7565         (vect_pattern_recog_1): Expect the pattern function to do any
7566         necessary target tests.  Also expect it to provide a vector type.
7567         Remove the type_in handling.
7569 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7571         * tree-vect-patterns.c (vect_pattern_detected): New function.
7572         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
7573         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
7574         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
7575         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
7576         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7577         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7578         (vect_recog_mask_conversion_pattern)
7579         (vect_try_gather_scatter_pattern): Likewise.
7581 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7583         * tree-vect-patterns.c (vect_get_internal_def): New function.
7584         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7585         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
7586         (search_type_for_mask_1): Use it.
7588 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7590         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7591         redundant WIDEN_SUM_EXPR handling.
7592         (vect_recog_sad_pattern): Likewise.
7594 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7596         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7597         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
7598         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
7599         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
7600         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
7602 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7604         * tree-vect-stmts.c (vectorizable_call): Make sure that we
7605         use the stmt_vec_info of the original bb statement for the
7606         new zero assignment, even if the call is part of a pattern.
7608 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7610         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
7611         that the sequence is attached to the original statement rather
7612         than the pattern statement.
7613         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
7614         PATTERN_DEF_SEQ from the original statement rather than
7615         the main pattern statement.
7616         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
7617         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
7618         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
7620 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7622         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
7623         definition statements before the early exit for statements that aren't
7624         live or relevant.
7625         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
7626         split out from...
7627         (vect_transform_loop): ...here.  Process pattern definition
7628         statements without first checking whether the main pattern
7629         statement is live or relevant.
7631 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
7633         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
7634         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
7636 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
7638         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
7639         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
7640         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
7641         (expand_block_compare): Change select_block_compare_mode call.
7642         (expand_strncmp_align_check): Use new functions, fix comment.
7643         (emit_final_str_compare_gpr): New function.
7644         (expand_strn_compare): Refactor and clean up code.
7645         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
7647 2018-06-19  Tony Reix  <tony.reix@atos.com>
7648             Damien Bergamini  <damien.bergamini@atos.com>
7649             David Edelsohn  <dje.gcc@gmail.com>
7651         * collect2.c (static_obj): New variable.
7652         (static_libs): New variable.
7653         (is_in_list): Uncomment declaration.
7654         (main): Track AIX libraries linked statically.
7655         (is_in_list): Uncomment definition.
7656         (scan_prog_file): Don't add AIX shared libraries initializer
7657         to constructor list if linking statically.
7659 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
7661         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
7662         constant.
7663         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
7665 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
7667         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
7668         blocks.
7670 2018-06-19  Martin Liska  <mliska@suse.cz>
7672         * config/i386/i386.c (ix86_can_inline_p): Do not use
7673         ipa_fn_summaries::get_create.
7674         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
7675         get.
7676         (devirtualization_time_bonus): Likewise.
7677         (ipcp_propagate_stage): Likewise.
7678         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7679         (edge_set_predicate): Likewise.
7680         (evaluate_conditions_for_known_args): Likewise.
7681         (evaluate_properties_for_edge): Likewise.
7682         (ipa_call_summary::reset): Tranform to ...
7683         (ipa_call_summary::~ipa_call_summary): ... this.
7684         (ipa_fn_summary::reset): Transform to ...
7685         (ipa_fn_summary::~ipa_fn_summary): ... this.
7686         (ipa_fn_summary_t::remove): Rename to ...
7687         (ipa_fn_summary_t::remove_callees): ... this.
7688         (ipa_fn_summary_t::duplicate): Use placement new
7689         instead of memory copy.
7690         (ipa_call_summary_t::duplicate): Likewise.
7691         (ipa_call_summary_t::remove): Remove.
7692         (dump_ipa_call_summary): Change get_create to get.
7693         (ipa_dump_fn_summary): Dump only when summary exists.
7694         (analyze_function_body): Use symbol_summary::get instead
7695         of get_create.
7696         (compute_fn_summary): Likewise.
7697         (estimate_edge_devirt_benefit): Likewise.
7698         (estimate_edge_size_and_time): Likewise.
7699         (inline_update_callee_summaries): Likewise.
7700         (remap_edge_change_prob): Likewise.
7701         (remap_edge_summaries): Likewise.
7702         (ipa_merge_fn_summary_after_inlining): Likewise.
7703         (write_ipa_call_summary): Likewise.
7704         (ipa_fn_summary_write): Likewise.
7705         (ipa_free_fn_summary): Likewise.
7706         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
7707         (struct ipa_call_summary): Likewise.
7708         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
7709         of get_create.
7710         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
7711         (estimate_size_after_inlining): Likewise.
7712         (estimate_growth): Likewise.
7713         (growth_likely_positive): Likewise.
7714         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7715         (inline_call): Likewise.
7716         * ipa-inline.c (caller_growth_limits): Likewise.
7717         (can_inline_edge_p): Likewise.
7718         (can_inline_edge_by_limits_p): Likewise.
7719         (compute_uninlined_call_time): Likewise.
7720         (compute_inlined_call_time): Likewise.
7721         (want_inline_small_function_p): Likewise.
7722         (edge_badness): Likewise.
7723         (update_caller_keys): Likewise.
7724         (update_callee_keys): Likewise.
7725         (inline_small_functions): Likewise.
7726         (inline_to_all_callers_1): Likewise.
7727         (dump_overall_stats): Likewise.
7728         (early_inline_small_functions): Likewise.
7729         (early_inliner): Likewise.
7730         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7731         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7732         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7733         * ipa-split.c (execute_split_functions): Likewise.
7734         * symbol-summary.h: Likewise.
7735         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7737 2018-06-19  Richard Biener  <rguenther@suse.de>
7739         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
7740         (vectorize_loops): ... here.  Fix dbgcnt handling.
7741         (try_vectorize_loop): Wrap try_vectorize_loop_1.
7743 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
7745         PR target/86197
7746         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
7747         ieee128 argument takes up only one (vector) register, not two (floating
7748         point) registers.
7750 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
7752         * gimplify.c (gimplify_init_constructor): Really never clear for an
7753         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
7755 2018-06-19  Richard Biener  <rguenther@suse.de>
7757         PR tree-optimization/86179
7758         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
7759         after failed recognition.
7761 2018-06-18  Martin Sebor  <msebor@redhat.com>
7763         PR middle-end/85602
7764         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
7765         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
7766         Handle integer subtraction.
7767         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
7768         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
7770 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
7772         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
7773         param from rtx to rtx_insn *.
7774         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
7775         param.
7776         (frv_ifcvt_modify_insn): Likwise.
7777         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
7778         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
7779         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
7780         as_a <rtx_insn *> cast to local "unprotected_region" once
7781         it's been established that it's not NULL or pc_rtx.
7782         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
7783         param "sethi" from rtx to rtx_insn *.
7784         (nds32_group_float_insns): Likewise for param "insn".
7785         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
7786         param.
7787         (vax_output_int_subtract): Likewise.
7788         * config/vax/vax.c (vax_output_int_add): Likewise for param
7789         "insn".
7790         (vax_output_int_subtract): Likewise.
7791         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
7792         (emit_pattern_after): Likewise for param "after".
7793         (emit_insn_after): Likewise.
7794         (emit_jump_insn_after): Likewise.
7795         (emit_call_insn_after): Likewise.
7796         (emit_debug_insn_after): Likewise.
7797         (emit_pattern_before): Likewise for param "before".
7798         (emit_insn_before): Likewise.
7799         (emit_jump_insn_before): Likewise.
7800         * final.c (get_insn_template): Likewise for param "insn", removing
7801         a cast.
7802         * output.h (get_insn_template): Likewise for 2nd param.
7803         * rtl.h (emit_insn_before): Likewise.
7804         (emit_jump_insn_before): Likewise.
7805         (emit_debug_insn_before_noloc): Likewise.
7806         (emit_insn_after): Likewise.
7807         (emit_jump_insn_after): Likewise.
7808         (emit_call_insn_after): Likewise.
7809         (emit_debug_insn_after): Likewise.
7810         (set_insn_deleted): Likewise for param.
7812 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
7814         PR target/85358
7815         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
7816         floating point modes, so that IFmode is numerically greater than
7817         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
7818         to declare the ordering.  This prevents IFmode from being
7819         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
7820         machine.  Include rs6000-modes.h to share the fractional values
7821         between genmodes* and the rest of the compiler.
7822         (IFmode): Likewise.
7823         (KFmode): Likewise.
7824         (TFmode): Likewise.
7825         * config/rs6000/rs6000-modes.h: New file.
7826         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
7827         meaning of rs6000_long_double_size so that 126..128 selects an
7828         appropriate 128-bit floating point type.
7829         (rs6000_option_override_internal): Likewise.
7830         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
7831         (TARGET_LONG_DOUBLE_128): Change the meaning of
7832         rs6000_long_double_size so that 126..128 selects an appropriate
7833         128-bit floating point type.
7834         (LONG_DOUBLE_TYPE_SIZE): Update comment.
7835         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
7836         source and destination to match the standard usage.
7837         (truncifkf2): Likewise.
7838         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
7839         ISA 2.07 to use an explicit clobber, instead of passing in a
7840         temporary.
7841         (copysign<mode>3_soft): Likewise.
7843 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
7845         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7846         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
7847         (vect_slp_analyze_instance_dependence): Likewise.
7848         (vect_enhance_data_refs_alignment): Likewise.
7849         (vect_analyze_data_refs_alignment): Likewise.
7850         (vect_slp_analyze_and_verify_instance_alignment
7851         (vect_analyze_data_ref_accesses): Likewise.
7852         (vect_prune_runtime_alias_test_list): Likewise.
7853         (vect_analyze_data_refs): Likewise.
7854         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
7855         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
7856         (vect_analyze_scalar_cycles_1): Likewise.
7857         (vect_get_loop_niters): Likewise.
7858         (vect_analyze_loop_form_1): Likewise.
7859         (vect_update_vf_for_slp): Likewise.
7860         (vect_analyze_loop_operations): Likewise.
7861         (vect_analyze_loop): Likewise.
7862         (vectorizable_induction): Likewise.
7863         (vect_transform_loop): Likewise.
7864         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
7865         * tree-vect-slp.c (vect_analyze_slp): Likewise.
7866         (vect_make_slp_decision): Likewise.
7867         (vect_detect_hybrid_slp): Likewise.
7868         (vect_slp_analyze_operations): Likewise.
7869         (vect_slp_bb): Likewise.
7870         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
7871         (vectorizable_bswap): Likewise.
7872         (vectorizable_call): Likewise.
7873         (vectorizable_simd_clone_call): Likewise.
7874         (vectorizable_conversion): Likewise.
7875         (vectorizable_assignment): Likewise.
7876         (vectorizable_shift): Likewise.
7877         (vectorizable_operation): Likewise.
7878         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
7880 2018-06-18  Martin Sebor  <msebor@redhat.com>
7882         PR tree-optimization/81384
7883         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
7884         * builtins.c (expand_builtin_strnlen): New function.
7885         (expand_builtin): Call it.
7886         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
7887         * builtins.def (BUILT_IN_STRNLEN): New.
7888         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
7889         Warn for bounds in excess of maximum object size.
7890         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
7891         single-value ranges.  Handle strnlen.
7892         (handle_builtin_strlen): Handle strnlen.
7893         (strlen_check_and_optimize_stmt): Same.
7894         * doc/extend.texi (Other Builtins): Document strnlen.
7896 2018-06-18  Maya Rashish  <coypu@sdf.org>
7898         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
7899         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
7900         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
7902         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
7903         here to ...
7904         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
7906 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7908         * tree.c (escaped_string::escape): Replace cast to char * by
7909         const_cast<char *> (unescaped).
7911 2018-06-18  Nick Clifton  <nickc@redhat.com>
7913         PR 84195
7914         * tree.c (escaped_string): New class.  Converts an unescaped
7915         string into its escaped equivalent.
7916         (warn_deprecated_use): Use the new class to convert the
7917         deprecation message, if present.
7918         (test_escaped_strings): New self test.
7919         (test_c_tests): Add test_escaped_strings.
7920         * doc/extend.texi (deprecated): Add a note that the
7921         deprecation message is affected by the -fmessage-length
7922         option, and that control characters will be escaped.
7923         (#pragma GCC error): Document this pragma.
7924         (#pragma GCC warning): Likewise.
7925         * doc/invoke.texi (-fmessage-length): Document this option's
7926         effect on the #warning and #error preprocessor directives and
7927         the deprecated attribute.
7929 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7931         * tree.c (decl_value_expr_lookup): Revert latest change.
7932         (decl_value_expr_insert): Likewise.
7934 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
7936         * gimplify.c (nonlocal_vlas): Delete.
7937         (nonlocal_vla_vars): Likewise.
7938         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
7939         referenced VLAs.
7940         (gimplify_body): Do not create and destroy nonlocal_vlas.
7941         * tree-nested.c: Include diagnostic.h.
7942         (use_pointer_in_frame): Tweak.
7943         (lookup_field_for_decl): Add assertion and declare the transformation.
7944         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
7945         internal error when the reference is in a wrong context.  Do not
7946         create a debug decl by default.
7947         (note_nonlocal_block_vlas): Delete.
7948         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
7949         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
7950         create a debug decl by default.
7951         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
7952         call is in a wrong context.
7953         (fixup_vla_decls): New function.
7954         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
7955         debug variables were created.
7956         * tree.c (decl_value_expr_lookup): Add checking assertion.
7957         (decl_value_expr_insert): Likewise.
7959 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
7961         PR middle-end/82479
7962         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
7963         * tree-scalar-evolution.c (interpret_expr): Likewise.
7964         (expression_expensive_p): Likewise.
7965         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
7966         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
7967         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
7968         (ssa_defined_by_minus_one_stmt_p): New.
7970 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
7972         PR middle-end/64946
7973         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
7974         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
7975         * dojump.c (do_jump): Likewise.
7976         * expr.c (expand_expr_real_2): Check operand type's sign.
7977         * fold-const.c (const_unop): Handle ABSU_EXPR.
7978         (fold_abs_const): Likewise.
7979         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
7980         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
7981         (strip_sign_op_1): Likesise.
7982         * match.pd: Add new pattern to generate ABSU_EXPR.
7983         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
7984         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7985         * tree-eh.c (operation_could_trap_helper_p): Likewise.
7986         * tree-inline.c (estimate_operator_cost): Likewise.
7987         * tree-pretty-print.c (dump_generic_node): Likewise.
7988         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
7989         * tree.def (ABSU_EXPR): New.
7991 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
7993         PR middle-end/86095
7994         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
7995         documented as preserved for backward compatibility only.
7996         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
7998         PR rtl-optimization/86108
7999         * bb-reorder.c (create_forwarder_block): Renamed to ...
8000         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
8001         jump from new landing pad to the second part.
8002         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8003         Adjust callers.
8005 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
8007         PR middle-end/85878
8008         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8009         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8010         Only call store_expr for halves if the mode is the same.
8012         PR middle-end/86123
8013         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8014         Fix up comment formatting.
8016 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8018         * typed-splay-tree.h (typed_splay_tree::remove): New function.
8019         (typed_splay_tree::closure,
8020         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8021         (typed_splay_tree::typed_splay_tree,
8022         typed_splay_tree::operator =): Declared private.
8023         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8024         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8025         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8026         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8027         typed_splay_tree::splay_tree_splay,
8028         typed_splay_tree::splay_tree_foreach_helper,
8029         typed_splay_tree::splay_tree_insert,
8030         typed_splay_tree::splay_tree_remove,
8031         typed_splay_tree::splay_tree_lookup,
8032         typed_splay_tree::splay_tree_predecessor,
8033         typed_splay_tree::splay_tree_successor,
8034         typed_splay_tree::splay_tree_min,
8035         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8036         (typed_splay_tree::root, typed_splay_tree::comp,
8037         typed_splay_tree::delete_key,
8038         typed_splay_tree::delete_value): New data members.
8039         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8040         typed_splay_tree::remove.
8042 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
8044         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8045         -mginv and -mno-ginv to the assembler.
8046         * config/mips/mips.opt (-mcrc): New option.
8047         (-mginv): Likewise.
8048         * doc/invoke.text (-mcrc): Document.
8049         (-mginv): Likewise.
8051 2018-06-15  Nick Clifton  <nickc@redhat.com>
8053         PR 84195
8054         * tree.c (escaped_string): New class.  Converts an unescaped
8055         string into its escaped equivalent.
8056         (warn_deprecated_use): Use the new class to convert the
8057         deprecation message, if present.
8058         (test_escaped_strings): New self test.
8059         (test_c_tests): Add test_escaped_strings.
8060         * doc/extend.texi (deprecated): Add a note that the
8061         deprecation message is affected by the -fmessage-length
8062         option, and that control characters will be escaped.
8063         (#pragma GCC error): Document this pragma.
8064         (#pragma GCC warning): Likewise.
8065         * doc/invoke.texi (-fmessage-length): Document this option's
8066         effect on the #warning and #error preprocessor directives and
8067         the deprecated attribute.
8069 2018-06-15  Richard Biener  <rguenther@suse.de>
8071         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8072         here, also noting vector size used.
8073         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
8074         size used in MSG_OPTIMIZED_LOCATIONS dump.
8075         (pass_slp_vectorize::execute): Adjust.
8077 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
8079         PR target/85968
8080         * config/arc/arc.c (arc_return_address_register): Fix
8081         if-condition.
8083 2018-06-15  Richard Biener  <rguenther@suse.de>
8085         PR middle-end/86159
8086         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8087         leave useless conversion stripping to force_gimple_operand_gsi.
8088         (gimplify_build2): Likewise.
8089         (gimplify_build1): Likewise.
8091 2018-06-15  Richard Biener  <rguenther@suse.de>
8093         PR middle-end/86076
8094         * tree-cfg.c (move_stmt_op): unshare invariant addresses
8095         before adjusting their block.
8097 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8099         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8100         multilibs for *-*-rtems*.
8101         * config/riscv/t-rtems: New file.
8103 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
8105         PR middle-end/86122
8106         * match.pd ((A +- CST1) +- CST2): Punt if last resort
8107         unsigned_type_for returns NULL.
8109         PR target/85945
8110         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8111         subregs of multi-word pseudos unless the float mode has word size.
8113 2018-06-14  Richard Biener  <rguenther@suse.de>
8115         PR middle-end/86139
8116         * tree-vect-generic.c (build_word_mode_vector_type): Remove
8117         duplicate and harmful type_hash_canon.
8118         * tree.c (type_hash_canon): Assert we didn't find ourselves.
8120 2018-06-14  Richard Biener  <rguenther@suse.de>
8122         PR ipa/86124
8123         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8124         NULL cgraph_node.
8126 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8128         * config/rtems.h (STDINT_LONG32): Define.
8130 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
8131             Prachi Godbole  <prachi.godbole@imgtec.com>
8133         * config/mips/mips-cpus.def: Define P6600.
8134         * config/mips/mips-tables.opt: Regenerate.
8135         * config/mips/mips.c (mips_ucbranch_type): New enum.
8136         (mips_rtx_cost_data): Add support for P6600.
8137         (mips_issue_rate): Likewise.
8138         (mips_multipass_dfa_lookahead): Likewise.
8139         (mips_avoid_hazard): Likewise.
8140         (mips_reorg_process_insns): Likewise.
8141         (mips_classify_branch_p6600): New function.
8142         * config/mips/mips.h (TUNE_P6600): New define.
8143         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8144         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8145         * config/mips/mips.md: Include p6600.md.
8146         (processor): Add p6600.
8147         * config/mips/p6600.md: New file.
8148         * doc/invoke.texi: Add p6600 to supported architectures.
8150 2018-06-13  Martin Sebor  <msebor@redhat.com>
8152         PR tree-optimization/86114
8153         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8154         of integer types.
8155         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8157 2018-06-13  Richard Biener  <rguenther@suse.de>
8159         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8160         Properly set vector type of the intermediate stmt.
8161         * tree-vect-stmts.c (vectorizable_operation): The destination
8162         var always has vectype_out type.
8164 2018-06-13  Jeff Law  <law@redhat.com>
8166         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8167         integer 0 for argument to print_rtl_with_bb.
8168         (rl78_reorg): Likewise.
8170 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
8172         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8173         from rtx to rtx_insn *.
8174         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8175         "label".
8176         (add_sched_insns_for_speculation): Likewise for local "target",
8177         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8178         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8179         from rtx_insn ** to rtx_code_label **.
8180         (reorg_emit_nops): Likewise.
8181         (c6x_reorg): Likewise for local "call_labels".
8182         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8183         rtx to rtx_insn *.
8184         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8185         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8186         the loops over LABEL_REFS.
8187         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8188         braf_label.
8189         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8190         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8191         (split_branches): Strengthen local "olabel" from rtx to
8192         rtx_insn *, adding a safe_as_a cast.
8193         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8194         to "rtx_insn *".
8195         (add_insn_after): Likewise for first two params.
8196         (add_insn_before): Likewise.
8197         (remove_insn): Likewise for param.
8198         (emit_pattern_before_noloc): Likewise for second and third params.
8199         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8200         (emit_call_insn_before_noloc): Likewise.
8201         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8202         to "rtx_insn *".
8203         (emit_barrier_before): Likewise.
8204         (emit_label_before): Strengthen "label" param from "rtx" to
8205         "rtx_code_label *".  Strengthen "before" param from "rtx" to
8206         "rtx_insn *".
8207         (emit_insn_after_1): Strengthen "after" param from "rtx" to
8208         "rtx_insn *".
8209         (emit_pattern_after_noloc): Likewise.
8210         (emit_insn_after_noloc): Likewise.
8211         (emit_jump_insn_after_noloc): Likewise.
8212         (emit_call_insn_after_noloc): Likewise.
8213         (emit_debug_insn_after_noloc): Likewise.
8214         (emit_barrier_after): Likewise.
8215         (emit_label_after): Likewise for both params.
8216         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
8217         "loc" param from "int" to "location_t".
8218         (emit_insn_after_setloc): Likewise.
8219         (emit_jump_insn_after_setloc): Likewise.
8220         (emit_call_insn_after_setloc): Likewise.
8221         (emit_debug_insn_after_setloc): Likewise.
8222         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
8223         "loc" param from "int" to "location_t".
8224         (emit_pattern_before): Convert NULL_RTX to NULL.
8225         (emit_insn_before_setloc): Convert "loc" param from "int" to
8226         "location_t".
8227         (emit_jump_insn_before_setloc): Likewise.
8228         (emit_call_insn_before_setloc): Likewise.
8229         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8230         rtx_insn *.  Convert "loc" param from "int" to "location_t".
8231         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8232         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8233         Convert 3rd param from "int" to "location_t".
8234         (emit_barrier_before, emit_barrier_after, next_real_insn):
8235         Strengthen param from rtx to rtx_insn *.
8236         (emit_label_before): Strengthen 1st param from "rtx" to
8237         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
8238         "rtx_insn *".
8239         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8240         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8241         Strengthen 2nd param from "rtx" to "rtx_insn *".
8242         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8243         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8244         Likewise. Convert 3rd param from "int" to "location_t".
8245         (emit_label_after): Strengthen 1st param from "rtx" to
8246         "rtx_code_label *".
8247         (next_real_insn, remove_insn): Strengthen param from "rtx" to
8248         "rtx_insn *".
8249         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8250         from "rtx" to "rtx_insn *".
8252 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
8254         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8255         bodies streamed in with -Q.
8256         * dumpfile.c (dump_files): Add lto-stream-out dump file.
8257         * dumpfile.h (tree_dump_index): Add lto_stream_out.
8258         * gimple-streamer-out.c: Include gimple-pretty-print.h
8259         (output_bb): Dump stmts streamed.
8260         * lto-section-out.c: Include print-tree.h
8261         (lto_begin_section): Dump sections created.
8262         (lto_output_decl_index): Dump decl encoded.
8263         * lto-streamer-out.c: Include print-tree.h
8264         (create_output_block): Dump output block created.
8265         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8266         (output_function): Dump function output.
8267         (output_constructor): Dump constructor streamed.
8268         (write_global_stream): Output indexes encoded.
8269         (produce_asm_for_decls): Dump streams encoded.
8270         * lto-streamer.c (streamer_dump_file): New global var.
8271         * lto-streamer.h (streamer_dump_file): Declare.
8272         * passes.c (ipa_write_summaries): Initialize streamer dump.
8273         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8274         in.
8276 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
8278         PR target/86048
8279         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8280         offsets for register save directives.  Emit a second batch of save
8281         directives, if need be, when the function accesses prior frames.
8283 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8285         * config/arc/fpu.md (fmasf4): Force operand to register.
8286         (fnmasf4): Likewise.
8288 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8290         * config/arc/arc-protos.h (arc_pad_return): Remove.
8291         * config/arc/arc.c (machine_function): Remove force_short_suffix
8292         and size_reason.
8293         (arc_print_operand): Adjust printing of '&'.
8294         (arc_verify_short): Remove conditional printing of short suffix.
8295         (arc_final_prescan_insn): Remove reference to size_reason.
8296         (pad_return): New function.
8297         (arc_reorg): Call pad_return.
8298         (arc_pad_return): Remove.
8299         (arc_init_machine_status): Remove reference to force_short_suffix.
8300         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8301         (attr length): When attribute iscompact is true force to 2
8302         regardless; in the case of maybe check if we want to force the
8303         instruction to have 4 bytes length.
8304         (nopv): Change it to generate 4 byte long nop as well.
8305         (blockage): New pattern.
8306         (simple_return): Remove call to arc_pad_return.
8307         (p_return_i): Likewise.
8309 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8311         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8313 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8315         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8316         ARC cores.
8318 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8320         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8321         for ARC700 and ARCv2.
8323 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
8325         PR target/86076
8326         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8327         operands[2] instead of operands[1].
8330 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
8332         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8333         case, check whether the outer register overlaps an unallocatable
8334         register, not just whether it fits the required class.
8336 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
8338         * poly-int.h (can_div_trunc_p): Add new overload in which all values
8339         are poly_ints.
8340         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8341         (memrefs_conflict_p): Likewise.
8342         (init_alias_analysis): Likewise.
8343         * cfgexpand.c (expand_debug_expr): Likewise.
8344         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8345         * cse.c (fold_rtx): Likewise.
8346         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8347         * expr.c (emit_block_move_hints): Likewise.
8348         (clear_storage_hints, push_block, emit_push_insn): Likewise.
8349         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8350         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8351         (emit_group_store): Likewise.
8352         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
8353         to read the PRE/POST_MODIFY increment.
8354         * calls.c (store_one_arg): Use strip_offset.
8355         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8356         poly_int_rtx_p.
8357         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8358         by a VEC_SELECT.
8359         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8360         (simplify_binary_operation_1): Extend CONST_INT handling to
8361         poly_int_rtx_p.
8362         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8363         than a HOST_WIDE_INT.
8364         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8365         poly_int64.
8366         (adjust_mems, add_stores): Update accodingly.
8367         (vt_canonicalize_addr): Track polynomial offsets.
8368         (emit_note_insn_var_location): Likewise.
8369         (vt_add_function_parameter): Likewise.
8370         (vt_initialize): Likewise.
8372 2018-06-12  Jeff Law  <law@redhat.com>
8374         * config.gcc (alpha*-*-freebsd*): Remove.
8375         * config/alpha/freebsd.h: Remove.
8377 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
8379         PR other/69968
8380         * spellcheck-tree.c (levenshtein_distance): Rename to...
8381         (get_edit_distance): ...this, and update for underlying renaming.
8382         * spellcheck-tree.h (levenshtein_distance): Rename to...
8383         (get_edit_distance): ...this.
8384         * spellcheck.c (levenshtein_distance): Rename to...
8385         (get_edit_distance): ...this.  Convert from Levenshtein distance
8386         to Damerau-Levenshtein distance by supporting transpositions of
8387         adjacent characters.  Rename "v1" to "v_next" and "v0" to
8388         "v_one_ago".
8389         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
8390         (selftest::test_edit_distance_unit_test_oneway): ...this, and
8391         update for underlying renaming.
8392         (selftest::levenshtein_distance_unit_test): Rename to...
8393         (selftest::test_get_edit_distance_unit): ...this, and update for
8394         underlying renaming.
8395         (selftest::test_find_closest_string): Add example from PR 69968
8396         where transposition helps
8397         (selftest::test_metric_conditions): Update for renaming.
8398         (selftest::test_metric_conditions): Likewise.
8399         (selftest::spellcheck_c_tests): Likewise.
8400         * spellcheck.h (levenshtein_distance): Rename both overloads to...
8401         (get_edit_distance): ...this.
8402         (best_match::consider): Update for renaming.
8404 2018-06-12  Martin Sebor  <msebor@redhat.com>
8406         PR tree-optimization/85259
8407         * builtins.c (compute_objsize): Handle constant offsets.
8408         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
8409         true iff a warning has been issued.
8410         * gimple.h (gimple_nonartificial_location): New function.
8411         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
8412         gimple_nonartificial_location and handle -Wno-system-headers.
8413         (handle_builtin_stxncpy): Same.
8415 2018-06-12  Martin Sebor  <msebor@redhat.com>
8417         PR c/85931
8418         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
8420 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
8422         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8423         BUILTIN_VEC_XST entries for pointer to double and long long.
8425 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
8427         PR target/85990
8428         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8429         Update comments.
8430         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8431         Likewise.
8433 2018-06-12  Martin Liska  <mliska@suse.cz>
8435         * doc/options.texi: Document IntegerRange.
8437 2018-06-12  Martin Liska  <mliska@suse.cz>
8439         * config/i386/i386.opt: Make MPX-related options as Deprecated.
8440         * opt-functions.awk: Handle Deprecated flag.
8441         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
8442         and report error.
8443         (read_cmdline_option): Report warning for a deprecated option.
8444         * opts.h (struct cl_option): Add new field cl_deprecated.
8445         (CL_ERR_DEPRECATED): New.
8447 2018-06-12  Martin Liska  <mliska@suse.cz>
8449         * doc/options.texi: Document Deprecated option flag.
8451 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8453         * config/arc/arc-arch.h (arc_extras): New enum.
8454         (arc_cpu_t):Add field extra.
8455         (arc_cpu_types): Consider the extras.
8456         * config/arc/arc-cpus.def: Add extras info.
8457         * config/arc/arc-opts.h (processor_type): Consider extra field.
8458         * config/arc/arc.c (arc_override_options): Handle extra field.
8460 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8462         * config/arc/arc-arch.h: Update ARC_OPTX macro.
8463         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
8464         field.
8465         * config/arc/arc.c (arc_init): Update pic warning.
8466         (irq_range): Update irq range parsing warnings.
8467         (arc_override_options): Update various warning messages.
8468         (arc_handle_aux_attribute): Likewise.
8470 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
8472         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
8474 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8476         * doc/sourcebuild.texi: Document usage of line number 0 in verify
8477         compiler messages directives.
8479 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
8481         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
8482         * config/mips/mips-tables.opt: Regenerate.
8483         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
8484         mips64r6.
8485         * doc/invoke.texi: Document -march=i6500.
8487 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
8489         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
8490         (i6400_gpmul): Add cpu_unit.
8491         (i6400_gpdiv): Likewise.
8492         (i6400_msa_add_d): Update reservations.
8493         (i6400_msa_int_add) Likewise.
8494         (i6400_msa_short_logic3) Likewise.
8495         (i6400_msa_short_logic2) Likewise.
8496         (i6400_msa_short_logic) Likewise.
8497         (i6400_msa_move) Likewise.
8498         (i6400_msa_cmp) Likewise.
8499         (i6400_msa_short_float2) Likewise.
8500         (i6400_msa_div_d) Likewise.
8501         (i6400_msa_long_logic1) Likewise.
8502         (i6400_msa_long_logic2) Likewise.
8503         (i6400_msa_mult) Likewise.
8504         (i6400_msa_long_float2) Likewise.
8505         (i6400_msa_long_float4) Likewise.
8506         (i6400_msa_long_float5) Likewise.
8507         (i6400_msa_long_float8) Likewise.
8508         (i6400_fpu_fadd): Include frint type.
8509         (i6400_fpu_store): New define_insn_reservation.
8510         (i6400_fpu_load): Likewise.
8511         (i6400_fpu_move): Likewise.
8512         (i6400_fpu_fcmp): Likewise.
8513         (i6400_fpu_fmadd): Likewise.
8514         (i6400_int_mult): Include imul3nc type and update reservation.
8515         (i6400_int_div): Include idiv3 type and update reservation.
8516         (i6400_int_load): Update to check type not move_type.
8517         (i6400_int_store): Likewise.
8518         (i6400_int_prefetch): Set zero latency.
8520 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
8522         * gcc.c: Document new %@{...} sequence.
8523         (LINK_COMMAND_SPEC): Use it for the -L switches.
8524         (cpp_unique_options): Use it for the -I switches.
8525         (at_file_argbuf): New global variable.
8526         (in_at_file): Likewise.
8527         (alloc_args): Create at_file_argbuf.
8528         (clear_args): Truncate at_file_argbuf.
8529         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
8530         (open_at_file): New function.
8531         (close_at_file): Likewise.
8532         (create_at_file): Delete.
8533         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
8534         <'o'>: Likewise.
8535         <'@'>: New case.
8536         (validate_switches_from_spec): Deal with %@{...} sequence.
8537         (validate_switches): Likewise.
8538         (driver::finalize): Call clear_args.
8540 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
8542         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
8544 2018-06-11  Martin Sebor  <msebor@redhat.com>
8546         * doc/invoke.texi (-Wall): List -Wc++17-compat.
8547         (Wno-class-memaccess): Add @opindex.
8548         (Wno-templates, Wno-multiple-inheritance): Same.
8549         (Wno-virtual-inheritance, Wno-namespaces): Same.
8550         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
8551         (Wno-format-overflow, Wno-format-truncation): Same.
8552         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
8553         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
8554         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
8555         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
8556         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
8557         (Wno-misspelled-isr): Same.
8559 2018-06-11  Martin Sebor  <msebor@redhat.com>
8561         * PR tree-optimization/86083
8562         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
8564 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
8566         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
8568 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
8570         PR target/85755
8571         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
8572         on the correct operand.
8573         (*movdi_internal64): Ditto.
8575 2018-06-11  Martin Liska  <mliska@suse.cz>
8577         PR tree-optimization/86089
8578         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
8580 2018-06-11  Julia Koval  <julia.koval@intel.com>
8582         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
8583         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
8584         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
8586 2018-06-11  Olivier Hainque  <hainque@adacore.com>
8588         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
8589         for Ada with strict dwarf2.
8591 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
8593         PR target/85755
8594         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
8595         addresses.
8597 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
8599         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
8601 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
8603         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
8604         TARGET_ELF.
8606 2018-06-08  Martin Liska  <mliska@suse.cz>
8608         * tree-cfg.h (debug_function): Fix argument type to match
8609         implementation.
8611 2018-06-08  Martin Liska  <mliska@suse.cz>
8613         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
8614         Remove usage of MPX-related (and removed) fields.
8615         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
8617 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
8619         * cfg.c (debug): Use TDF_NONE rather than 0.
8620         * cfghooks.c (debug): Likewise.
8621         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
8622         (struct dump_option_value_info): Convert to...
8623         (struct kv_pair): ...this template type.
8624         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
8625         rather than 0.
8626         (optinfo_verbosity_options): Likewise.
8627         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
8628         OPTGROUP_NONE.
8629         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
8630         than int for "optgroup_flags" param.
8631         (dump_generic_expr_loc): Use dump_flags_t rather than int for
8632         "dump_kind" param.
8633         (dump_dec): Likewise.
8634         (dump_finish): Use TDF_NONE rather than 0.
8635         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
8636         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
8637         than 0.  Update for change to option_ptr.
8638         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
8639         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
8640         0.  Update for changes to optinfo_verbosity_options and
8641         optgroup_options.
8642         (opt_info_switch_p): Convert optgroup_flags from int to
8643         optgroup_flags_t.
8644         (dump_basic_block): Use dump_flags_t rather than int
8645         for "dump_kind" param.
8646         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
8647         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
8648         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
8649         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
8650         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
8651         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
8652         TDF_NONE): Convert from macros to...
8653         (enum dump_flag): ...this new enum.
8654         (dump_flags_t): Update to use enum.
8655         (operator|, operator&, operator~, operator|=, operator&=):
8656         Implement for dump_flags_t.
8657         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
8658         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
8659         Convert from macros to...
8660         (enum optgroup_flag): ...this new enum.
8661         (optgroup_flags_t): New typedef.
8662         (operator|, operator|=): Implement for optgroup_flags_t.
8663         (struct dump_file_info): Convert field "alt_flags" to
8664         dump_flags_t.  Convert field "optgroup_flags" to
8665         optgroup_flags_t.
8666         (dump_basic_block): Use dump_flags_t rather than int for param.
8667         (dump_generic_expr_loc): Likewise.
8668         (dump_dec): Likewise.
8669         (dump_register): Convert param "optgroup_flags" to
8670         optgroup_flags_t.
8671         (opt_info_enable_passes): Likewise.
8672         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
8673         than 0.
8674         * gimple-pretty-print.c (debug): Likewise.
8675         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
8676         (merged_store_group::apply_stores): Likewise.
8677         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
8678         * gimple.c (verify_gimple_pp): Likewise.
8679         * graphite-poly.c (print_pbb_body): Likewise.
8680         * passes.c (pass_manager::register_one_dump_file): Convert
8681         local "optgroup_flags" to optgroup_flags_t.
8682         * print-tree.c (print_node): Use TDF_NONE rather than 0.
8683         (debug): Likewise.
8684         (debug_body): Likewise.
8685         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
8686         to optgroup_flags_t.
8687         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
8688         than 0.
8689         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
8690         (convert_mult_to_fma): Likewise.
8691         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
8692         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
8693         * tree-vect-data-refs.c (dump_lower_bound): Convert param
8694         "dump_kind" to dump_flags_t.
8696 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
8698         * config/rs6000/rs6000.c (min, max): Delete.
8700 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
8702         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
8703         -mabi=spe and -mabi=no-spe.
8705 2018-06-08  Martin Liska  <mliska@suse.cz>
8707         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
8708         where we expect an existing summary.
8710 2018-06-08  Martin Liska  <mliska@suse.cz>
8712         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
8713         * ipa-inline.h (estimate_edge_growth): Likewise.
8715 2018-06-08  Martin Liska  <mliska@suse.cz>
8717         * cgraph.c (function_version_hasher::hash): Use
8718         cgraph_node::get_uid ().
8719         (function_version_hasher::equal):
8720         * cgraph.h (cgraph_node::get_uid): New method.
8721         * ipa-inline.c (update_caller_keys): Use
8722         cgraph_node::get_uid ().
8723         (update_callee_keys): Likewise.
8724         * ipa-utils.c (searchc): Likewise.
8725         (ipa_reduced_postorder): Likewise.
8726         * lto-cgraph.c (input_node): Likewise.
8727         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
8728         * symbol-summary.h (symtab_insertion): Likewise.
8729         (symtab_removal): Likewise.
8730         (symtab_duplication): Likewise.
8731         * tree-pretty-print.c (dump_function_header): Likewise.
8732         * tree-sra.c (convert_callers_for_node): Likewise.
8734 2018-06-08  Martin Liska  <mliska@suse.cz>
8736         * cgraph.c (symbol_table::create_edge): Always assign a new
8737         unique number.
8738         (symbol_table::free_edge): Do not recycle numbers.
8739         * cgraph.h (cgraph_edge::get): New method.
8740         * symbol-summary.h (symtab_removal): Use it.
8741         (symtab_duplication): Likewise.
8742         (call_summary::hashable_uid): Remove.
8744 2018-06-08  Martin Liska  <mliska@suse.cz>
8746         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
8747         (initialize_growth_caches): Remove.
8748         (free_growth_caches): Likewise.
8749         (do_estimate_edge_time): Use edge_growth_cache.
8750         (do_estimate_edge_size): Likewise.
8751         (do_estimate_edge_hints): Likewise.
8752         * ipa-inline.c (reset_edge_caches): Likewise.
8753         (recursive_inlining): Likewise.
8754         (inline_small_functions): Likewise.
8755         * ipa-inline.h (initialize_growth_caches): Remove.
8756         (estimate_edge_size): Likewise.
8757         (estimate_edge_time): Likewise.
8758         (estimate_edge_hints): Likewise.
8759         (reset_edge_growth_cache): Likewise.
8760         * symbol-summary.h (call_summary::remove): New method.
8762 2018-06-08  Martin Liska  <mliska@suse.cz>
8764         * ipa-cp.c (class edge_clone_summary): New summary.
8765         (grow_edge_clone_vectors): Remove.
8766         (ipcp_edge_duplication_hook): Remove.
8767         (class edge_clone_summary_t): New call_summary class.
8768         (ipcp_edge_removal_hook): Remove.
8769         (edge_clone_summary_t::duplicate): New function.
8770         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
8771         (create_specialized_node): Likewise.
8772         (ipcp_driver): Initialize edge_clone_summaries and do not
8773         register hooks.
8775 2018-06-08  Martin Liska  <mliska@suse.cz>
8777         * symbol-summary.h (get): New function.
8778         (call_summary::m_initialize_when_cloning): New class member.
8780 2018-06-08  Martin Liska  <mliska@suse.cz>
8782         * cgraph.c (cgraph_node::remove): Do not recycle uid.
8783         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
8784         (symbol_table::allocate_cgraph_symbol): Do not set uid.
8785         * passes.c (uid_hash_t): Record removed_nodes by their uids.
8786         (remove_cgraph_node_from_order): Use the removed_nodes set.
8787         (do_per_function_toporder): Likwise.
8788         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
8789         instead of summary_uid.
8790         (symtab_removal): Likewise.
8791         (symtab_duplication): Likewise.
8793 2018-06-08  Martin Liska  <mliska@suse.cz>
8795         * ipa-cp.c (ipcp_store_bits_results): Use
8796         ipcp_transformation_sum.
8797         (ipcp_store_vr_results): Likewise.
8798         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
8799         to ...
8800         (ipcp_transformation_initialize): ... this.
8801         (ipa_set_node_agg_value_chain):
8802         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
8803         (write_ipcp_transformation_info): Likewise.
8804         (read_ipcp_transformation_info): Likewise.
8805         (ipcp_update_bits): Likewise.
8806         (ipcp_update_vr): Likewise.
8807         (ipcp_transform_function): Likewise.
8808         * ipa-prop.h: Rename ipcp_transformation_summary to
8809         ipcp_transformation.
8810         (class ipcp_transformation_t): New function summary.
8811         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
8812         (ipa_get_agg_replacements_for_node): Likewise.
8814 2018-06-08  Martin Liska  <mliska@suse.cz>
8816         * ipa-pure-const.c (struct funct_state_d): Do it class instead
8817         of struct.
8818         (class funct_state_summary_t): New function_summary class.
8819         (has_function_state): Remove.
8820         (get_function_state): Likewise.
8821         (set_function_state): Likewise.
8822         (add_new_function): Likewise.
8823         (funct_state_summary_t::insert): New function.
8824         (duplicate_node_data): Remove.
8825         (remove_node_data): Remove.
8826         (funct_state_summary_t::duplicate): New function.
8827         (register_hooks): Create new funct_state_summaries.
8828         (pure_const_generate_summary): Use it.
8829         (pure_const_write_summary): Likewise.
8830         (pure_const_read_summary): Likewise.
8831         (propagate_pure_const): Likewise.
8832         (propagate_nothrow): Likewise.
8833         (dump_malloc_lattice): Likewise.
8834         (propagate_malloc): Likewise.
8835         (execute): Do not register hooks, just remove summary
8836         instead.
8837         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
8838         constructor.
8840 2018-06-08  Martin Liska  <mliska@suse.cz>
8842         * ipa-reference.c (remove_node_data): Remove.
8843         (duplicate_node_data): Likewise.
8844         (class ipa_ref_var_info_summary_t): New class.
8845         (class ipa_ref_opt_summary_t): Likewise.
8846         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
8847         (get_reference_optimization_summary): Use
8848         ipa_ref_opt_sum_summaries.
8849         (set_reference_vars_info): Remove.
8850         (set_reference_optimization_summary): Likewise.
8851         (ipa_init): Create summaries.
8852         (init_function_info): Use function summary.
8853         (ipa_ref_opt_summary_t::duplicate): New function.
8854         (ipa_ref_opt_summary_t::remove): New function.
8855         (get_read_write_all_from_node): Fix GNU coding style.
8856         (propagate): Use function summary.
8857         (write_node_summary_p): Fix GNU coding style.
8858         (stream_out_bitmap): Likewise.
8859         (ipa_reference_read_optimization_summary): Use function summary.
8860         (ipa_reference_c_finalize): Do not release hooks.
8862 2018-06-08  Martin Liska  <mliska@suse.cz>
8864         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
8865         (analyze_function_body): Extract multiple calls of get_create.
8866         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8867         * ipa-inline.c (recursive_inlining): Use ::get method.
8868         * ipa-inline.h (estimate_edge_growth): Likewise.
8870 2018-06-08  Martin Liska  <mliska@suse.cz>
8872         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
8873         HSA_INVALID.
8874         (hsa_function_summary::hsa_function_summary): Use the new enum
8875         value.
8876         (hsa_gpu_implementation_p): Use hsa_summaries::get.
8877         * hsa-gen.c (hsa_get_host_function): Likewise.
8878         (get_brig_function_name): Likewise.
8879         * ipa-hsa.c (process_hsa_functions): Likewise.
8880         (ipa_hsa_write_summary): Likewise.
8881         * symbol-summary.h (symtab_duplication): Use ::get function/
8882         (get): New function.
8884 2018-06-08  Martin Liska  <mliska@suse.cz>
8886         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
8887         of get.
8888         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
8889         (hsa_register_kernel): Likewise.
8890         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
8891         * hsa-gen.c (hsa_get_host_function): Likewise.
8892         (get_brig_function_name): Likewise.
8893         (generate_hsa): Likewise.
8894         (pass_gen_hsail::execute): Likewise.
8895         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
8896         (devirtualization_time_bonus): Likewise.
8897         (ipcp_propagate_stage): Likewise.
8898         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8899         (edge_set_predicate): Likewise.
8900         (evaluate_conditions_for_known_args): Likewise.
8901         (evaluate_properties_for_edge): Likewise.
8902         (ipa_fn_summary::reset): Likewise.
8903         (ipa_fn_summary_t::duplicate): Likewise.
8904         (dump_ipa_call_summary): Likewise.
8905         (ipa_dump_fn_summary): Likewise.
8906         (analyze_function_body): Likewise.
8907         (compute_fn_summary): Likewise.
8908         (estimate_edge_devirt_benefit): Likewise.
8909         (estimate_edge_size_and_time): Likewise.
8910         (estimate_calls_size_and_time): Likewise.
8911         (estimate_node_size_and_time): Likewise.
8912         (inline_update_callee_summaries): Likewise.
8913         (remap_edge_change_prob): Likewise.
8914         (remap_edge_summaries): Likewise.
8915         (ipa_merge_fn_summary_after_inlining): Likewise.
8916         (ipa_update_overall_fn_summary): Likewise.
8917         (read_ipa_call_summary): Likewise.
8918         (inline_read_section): Likewise.
8919         (write_ipa_call_summary): Likewise.
8920         (ipa_fn_summary_write): Likewise.
8921         (ipa_free_fn_summary): Likewise.
8922         * ipa-hsa.c (process_hsa_functions): Likewise.
8923         (ipa_hsa_write_summary): Likewise.
8924         (ipa_hsa_read_section): Likewise.
8925         * ipa-icf.c (sem_function::merge): Likewise.
8926         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8927         (do_estimate_edge_time): Likewise.
8928         (estimate_size_after_inlining): Likewise.
8929         (estimate_growth): Likewise.
8930         (growth_likely_positive): Likewise.
8931         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8932         (inline_call): Likewise.
8933         * ipa-inline.c (caller_growth_limits): Likewise.
8934         (can_inline_edge_p): Likewise.
8935         (can_inline_edge_by_limits_p): Likewise.
8936         (compute_uninlined_call_time): Likewise.
8937         (compute_inlined_call_time): Likewise.
8938         (want_inline_small_function_p): Likewise.
8939         (edge_badness): Likewise.
8940         (update_caller_keys): Likewise.
8941         (update_callee_keys): Likewise.
8942         (recursive_inlining): Likewise.
8943         (inline_small_functions): Likewise.
8944         (inline_to_all_callers_1): Likewise.
8945         (dump_overall_stats): Likewise.
8946         (early_inline_small_functions): Likewise.
8947         (early_inliner): Likewise.
8948         * ipa-inline.h (estimate_edge_growth): Likewise.
8949         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8950         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8951         * ipa-prop.h (IPA_NODE_REF): Likewise.
8952         (IPA_EDGE_REF): Likewise.
8953         * ipa-pure-const.c (malloc_candidate_p): Likewise.
8954         (propagate_malloc): Likewise.
8955         * ipa-split.c (execute_split_functions): Likewise.
8956         * symbol-summary.h: Rename get to get_create.
8957         (get): Likewise.
8958         (get_create): Likewise.
8959         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8961 2018-06-08  Martin Liska  <mliska@suse.cz>
8963         * symbol-summary.h (release): Move definition out of class
8964         declaration.
8965         (symtab_removal): Likewise.
8966         (symtab_duplication): Likewise.
8968 2018-06-08  Martin Liska  <mliska@suse.cz>
8970         * symbol-summary.h (function_summary): Move constructor
8971         implementation out of class declaration.
8972         (release): Likewise.
8973         (symtab_insertion): Likewise.
8974         (symtab_removal): Likewise.
8975         (symtab_duplication): Likewise.
8976         (get): Likewise.
8978 2018-06-08  Martin Liska  <mliska@suse.cz>
8980         * Makefile.in: Remove support for MPX (macros, related functions,
8981         fields in cgraph_node, ...).
8982         * builtin-types.def (BT_BND): Likewise.
8983         (BT_FN_BND_CONST_PTR): Likewise.
8984         (BT_FN_CONST_PTR_BND): Likewise.
8985         (BT_FN_VOID_PTR_BND): Likewise.
8986         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
8987         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
8988         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
8989         (expand_builtin_mempcpy_with_bounds): Likewise.
8990         (expand_builtin_memset_with_bounds): Likewise.
8991         (expand_builtin_memset_args): Likewise.
8992         (std_expand_builtin_va_start): Likewise.
8993         (expand_builtin): Likewise.
8994         (expand_builtin_with_bounds): Likewise.
8995         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
8996         (DEF_LIB_BUILTIN_CHKP): Likewise.
8997         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
8998         (DEF_CHKP_BUILTIN): Likewise.
8999         (BUILT_IN_MEMCPY): Likewise.
9000         (BUILT_IN_MEMMOVE): Likewise.
9001         (BUILT_IN_MEMPCPY): Likewise.
9002         (BUILT_IN_MEMSET): Likewise.
9003         (BUILT_IN_STPCPY): Likewise.
9004         (BUILT_IN_STRCAT): Likewise.
9005         (BUILT_IN_STRCHR): Likewise.
9006         (BUILT_IN_STRCPY): Likewise.
9007         (BUILT_IN_STRLEN): Likewise.
9008         (BUILT_IN_MEMCPY_CHK): Likewise.
9009         (BUILT_IN_MEMMOVE_CHK): Likewise.
9010         (BUILT_IN_MEMPCPY_CHK): Likewise.
9011         (BUILT_IN_MEMSET_CHK): Likewise.
9012         (BUILT_IN_STPCPY_CHK): Likewise.
9013         (BUILT_IN_STRCAT_CHK): Likewise.
9014         (BUILT_IN_STRCPY_CHK): Likewise.
9015         * calls.c (store_bounds): Likewise.
9016         (emit_call_1): Likewise.
9017         (special_function_p): Likewise.
9018         (maybe_warn_nonstring_arg): Likewise.
9019         (initialize_argument_information): Likewise.
9020         (finalize_must_preallocate): Likewise.
9021         (compute_argument_addresses): Likewise.
9022         (expand_call): Likewise.
9023         * cfgexpand.c (expand_call_stmt): Likewise.
9024         (expand_return): Likewise.
9025         (expand_gimple_stmt_1): Likewise.
9026         (pass_expand::execute): Likewise.
9027         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9028         (cgraph_node::remove): Likewise.
9029         (cgraph_node::dump): Likewise.
9030         (cgraph_node::verify_node): Likewise.
9031         * cgraph.h (chkp_function_instrumented_p): Likewise.
9032         (symtab_node::get_alias_target): Likewise.
9033         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9034         (cgraph_local_p): Likewise.
9035         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9036         (cgraph_edge::rebuild_references): Likewise.
9037         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9038         (walk_polymorphic_call_targets): Likewise.
9039         (cgraph_node::expand_thunk): Likewise.
9040         (symbol_table::output_weakrefs): Likewise.
9041         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9042         (ix86_handle_option): Likewise.
9043         * config/i386/constraints.md: Likewise.
9044         * config/i386/i386-builtin-types.def (BND): Likewise.
9045         (VOID): Likewise.
9046         (PVOID): Likewise.
9047         (ULONG): Likewise.
9048         * config/i386/i386-builtin.def (BDESC_END): Likewise.
9049         (BDESC_FIRST): Likewise.
9050         (BDESC): Likewise.
9051         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9052         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9053         * config/i386/i386.c (enum reg_class): Likewise.
9054         (ix86_target_string): Likewise.
9055         (ix86_option_override_internal): Likewise.
9056         (ix86_conditional_register_usage): Likewise.
9057         (ix86_valid_target_attribute_inner_p): Likewise.
9058         (ix86_set_indirect_branch_type): Likewise.
9059         (ix86_set_current_function): Likewise.
9060         (ix86_function_arg_regno_p): Likewise.
9061         (init_cumulative_args): Likewise.
9062         (ix86_function_arg_advance): Likewise.
9063         (ix86_function_arg): Likewise.
9064         (ix86_pass_by_reference): Likewise.
9065         (ix86_function_value_regno_p): Likewise.
9066         (ix86_function_value_1): Likewise.
9067         (ix86_function_value_bounds): Likewise.
9068         (ix86_return_in_memory): Likewise.
9069         (ix86_setup_incoming_vararg_bounds): Likewise.
9070         (ix86_va_start): Likewise.
9071         (indirect_thunk_need_prefix): Likewise.
9072         (print_reg): Likewise.
9073         (ix86_print_operand): Likewise.
9074         (ix86_expand_call): Likewise.
9075         (ix86_output_function_return): Likewise.
9076         (reg_encoded_number): Likewise.
9077         (BDESC_VERIFYS): Likewise.
9078         (ix86_init_mpx_builtins): Likewise.
9079         (ix86_init_builtins): Likewise.
9080         (ix86_emit_cmove): Likewise.
9081         (ix86_emit_move_max): Likewise.
9082         (ix86_expand_builtin): Likewise.
9083         (ix86_builtin_mpx_function): Likewise.
9084         (ix86_get_arg_address_for_bt): Likewise.
9085         (ix86_load_bounds): Likewise.
9086         (ix86_store_bounds): Likewise.
9087         (ix86_load_returned_bounds): Likewise.
9088         (ix86_store_returned_bounds): Likewise.
9089         (ix86_class_likely_spilled_p): Likewise.
9090         (ix86_hard_regno_mode_ok): Likewise.
9091         (x86_order_regs_for_local_alloc): Likewise.
9092         (ix86_mitigate_rop): Likewise.
9093         (ix86_bnd_prefixed_insn_p): Likewise.
9094         (ix86_mpx_bound_mode): Likewise.
9095         (ix86_make_bounds_constant): Likewise.
9096         (ix86_initialize_bounds): Likewise.
9097         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9098         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9099         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9100         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9101         (TARGET_CHKP_BOUND_MODE): Likewise.
9102         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9103         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9104         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9105         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9106         * config/i386/i386.h (TARGET_MPX): Likewise.
9107         (TARGET_MPX_P): Likewise.
9108         (VALID_BND_REG_MODE): Likewise.
9109         (FIRST_BND_REG): Likewise.
9110         (LAST_BND_REG): Likewise.
9111         (enum reg_class): Likewise.
9112         (BND_REG_P): Likewise.
9113         (BND_REGNO_P): Likewise.
9114         (BNDmode): Likewise.
9115         (ADJUST_INSN_LENGTH): Likewise.
9116         * config/i386/i386.md: Likewise.
9117         * config/i386/i386.opt: Likewise.
9118         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9119         (defined): Likewise.
9120         (LINK_MPX): Likewise.
9121         (MPX_SPEC): Likewise.
9122         (LIBMPX_SPEC): Likewise.
9123         (LIBMPXWRAPPERS_SPEC): Likewise.
9124         (CHKP_SPEC): Likewise.
9125         * config/i386/predicates.md: Likewise.
9126         * dbxout.c (dbxout_type): Likewise.
9127         * doc/extend.texi: Likewise.
9128         * doc/invoke.texi: Likewise.
9129         * doc/md.texi: Likewise.
9130         * doc/tm.texi: Likewise.
9131         * doc/tm.texi.in: Likewise.
9132         * dwarf2out.c (is_base_type): Likewise.
9133         (gen_formal_types_die): Likewise.
9134         (gen_subprogram_die): Likewise.
9135         (gen_type_die_with_usage): Likewise.
9136         (gen_decl_die): Likewise.
9137         (dwarf2out_late_global_decl): Likewise.
9138         * expr.c (expand_assignment): Likewise.
9139         (emit_storent_insn): Likewise.
9140         (store_expr_with_bounds): Likewise.
9141         (store_expr): Likewise.
9142         (expand_expr_real_1): Likewise.
9143         * expr.h (store_expr_with_bounds): Likewise.
9144         * function.c (use_register_for_decl): Likewise.
9145         (struct bounds_parm_data): Likewise.
9146         (assign_parms_augmented_arg_list): Likewise.
9147         (assign_parm_find_entry_rtl): Likewise.
9148         (assign_parm_is_stack_parm): Likewise.
9149         (assign_parm_load_bounds): Likewise.
9150         (assign_bounds): Likewise.
9151         (assign_parms): Likewise.
9152         (expand_function_start): Likewise.
9153         * gcc.c (CHKP_SPEC): Likewise.
9154         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9155         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9156         (wrestrict_dom_walker::check_call): Likewise.
9157         * gimple.c (gimple_build_call_from_tree): Likewise.
9158         * gimple.h (enum gf_mask): Likewise.
9159         (gimple_call_with_bounds_p): Likewise.
9160         (gimple_call_set_with_bounds): Likewise.
9161         * gimplify.c (gimplify_init_constructor): Likewise.
9162         * ipa-cp.c (initialize_node_lattices): Likewise.
9163         (propagate_constants_across_call): Likewise.
9164         (find_more_scalar_values_for_callers_subset): Likewise.
9165         * ipa-hsa.c (process_hsa_functions): Likewise.
9166         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9167         * ipa-icf.c (sem_function::merge): Likewise.
9168         * ipa-inline.c (early_inliner): Likewise.
9169         * ipa-pure-const.c (warn_function_noreturn): Likewise.
9170         (warn_function_cold): Likewise.
9171         (propagate_pure_const): Likewise.
9172         * ipa-ref.h (enum GTY): Likewise.
9173         * ipa-split.c (find_retbnd): Likewise.
9174         (consider_split): Likewise.
9175         (split_function): Likewise.
9176         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9177         * ipa.c (walk_polymorphic_call_targets): Likewise.
9178         (symbol_table::remove_unreachable_nodes): Likewise.
9179         (process_references): Likewise.
9180         (cgraph_build_static_cdtor_1): Likewise.
9181         * lto-cgraph.c (lto_output_node): Likewise.
9182         (output_refs): Likewise.
9183         (compute_ltrans_boundary): Likewise.
9184         (input_overwrite_node): Likewise.
9185         (input_node): Likewise.
9186         (input_cgraph_1): Likewise.
9187         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9188         * passes.c (pass_manager::execute_early_local_passes): Likewise.
9189         (class pass_chkp_instrumentation_passes): Likewise.
9190         (make_pass_chkp_instrumentation_passes): Likewise.
9191         * passes.def: Likewise.
9192         * rtl.h (struct GTY): Likewise.
9193         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9194         * stor-layout.c (layout_type): Likewise.
9195         * symtab.c: Likewise.
9196         * target.def: Likewise.
9197         * targhooks.c (default_chkp_bound_type): Likewise.
9198         (default_chkp_bound_mode): Likewise.
9199         (default_builtin_chkp_function): Likewise.
9200         (default_chkp_function_value_bounds): Likewise.
9201         (default_chkp_make_bounds_constant): Likewise.
9202         (default_chkp_initialize_bounds): Likewise.
9203         * targhooks.h (default_chkp_bound_type): Likewise.
9204         (default_chkp_bound_mode): Likewise.
9205         (default_builtin_chkp_function): Likewise.
9206         (default_chkp_function_value_bounds): Likewise.
9207         (default_chkp_make_bounds_constant): Likewise.
9208         (default_chkp_initialize_bounds): Likewise.
9209         * toplev.c (compile_file): Likewise.
9210         (process_options): Likewise.
9211         * tree-core.h (DEF_BUILTIN): Likewise.
9212         (DEF_BUILTIN_CHKP): Likewise.
9213         * tree-inline.c (declare_return_variable): Likewise.
9214         (remap_gimple_stmt): Likewise.
9215         (copy_bb): Likewise.
9216         (initialize_inlined_parameters): Likewise.
9217         (expand_call_inline): Likewise.
9218         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9219         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9220         (make_pass_ipa_chkp_produce_thunks): Likewise.
9221         (make_pass_chkp): Likewise.
9222         (make_pass_chkp_opt): Likewise.
9223         (make_pass_chkp_instrumentation_passes): Likewise.
9224         * tree-pretty-print.c (dump_generic_node): Likewise.
9225         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9226         * tree-ssa-dce.c (propagate_necessity): Likewise.
9227         (eliminate_unnecessary_stmts): Likewise.
9228         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9229         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9230         * tree-ssa-sccvn.h: Likewise.
9231         * tree-ssa-strlen.c (get_string_length): Likewise.
9232         (valid_builtin_call): Likewise.
9233         (adjust_last_stmt): Likewise.
9234         (handle_builtin_strchr): Likewise.
9235         (handle_builtin_strcpy): Likewise.
9236         (handle_builtin_stxncpy): Likewise.
9237         (handle_builtin_memcpy): Likewise.
9238         (handle_builtin_strcat): Likewise.
9239         (strlen_check_and_optimize_stmt): Likewise.
9240         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9241         * tree-streamer-in.c: Likewise.
9242         * tree-streamer.c (record_common_node): Likewise.
9243         * tree.c (tree_code_size): Likewise.
9244         (wide_int_to_tree_1): Likewise.
9245         (type_contains_placeholder_1): Likewise.
9246         (build_common_tree_nodes): Likewise.
9247         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9248         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9249         (POINTER_BOUNDS_P): Likewise.
9250         (BOUNDED_TYPE_P): Likewise.
9251         (BOUNDED_P): Likewise.
9252         (CALL_WITH_BOUNDS_P): Likewise.
9253         (pointer_bounds_type_node): Likewise.
9254         * value-prof.c (gimple_ic): Likewise.
9255         * var-tracking.c (vt_add_function_parameters): Likewise.
9256         * varasm.c (make_decl_rtl): Likewise.
9257         (assemble_start_function): Likewise.
9258         (output_constant): Likewise.
9259         (maybe_assemble_visibility): Likewise.
9260         * varpool.c (ctor_for_folding): Likewise.
9261         * chkp-builtins.def: Remove.
9262         * ipa-chkp.c: Remove.
9263         * ipa-chkp.h: Remove.
9264         * rtl-chkp.c: Remove.
9265         * rtl-chkp.h: Remove.
9266         * tree-chkp-opt.c: Remove.
9267         * tree-chkp.c: Remove.
9268         * tree-chkp.h: Remove.
9270 2018-06-07  Carl Love  <cel@us.ibm.com>
9272         * config/rs6000/vsx.md (vextract_fp_from_shorth,
9273         vextract_fp_from_shortl): Add BE support.
9275 2018-06-07  Paul Koning  <ni1d@arrl.net>
9277         * compare-elim.c (try_merge_compare): Don't merge compare if
9278         address contains a side effect.
9279         (try_eliminate_compare): Likewise.
9281 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
9283         * config.gcc: Support "tremont".
9284         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9285         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9286         PROCESSOR_TREMONT.
9287         * config/i386/i386.c (m_TREMONT): Define.
9288         (processor_target_table): Add "tremont".
9289         (PTA_TREMONT): Define.
9290         (ix86_lea_outperforms): Add TARGET_TREMONT.
9291         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9292         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9293         and M_INTEL_GOLDMONT_PLUS.
9294         (fold_builtin_cpu): Add "tremont".
9295         (ix86_add_stmt_cost): Add TARGET_TREMONT.
9296         (ix86_option_override_internal): Add "tremont".
9297         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9298         (processor_type): Add PROCESSOR_TREMONT.
9299         * config/i386/x86-tune.def: Add m_TREMONT.
9300         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9302 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9304         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9305         symbol defined for msp430i* devices to be lower case.
9307 2018-06-07  Richard Biener  <rguenther@suse.de>
9309         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9310         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
9311         Properly wrap signed arithmetic if overflow wraps.
9313 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
9315         PR tree-optimization/69615
9316         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9317         of a cast from a same precision integral SSA_NAME in a bb dominated
9318         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
9319         cast to utype if rhs2 has already a compatible type.
9321 2018-06-07  Richard Biener  <rguenther@suse.de>
9323         PR tree-optimization/85935
9324         * graphite-scop-detection.c (find_params_in_bb): Analyze
9325         condition operands with respect to the correct loop.  Assert
9326         the analysis doesn't fail.
9328 2018-06-04  Carl Love  <cel@us.ibm.com>
9330         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9331         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
9332         as it is slightly cheaper.
9333         (first_match_or_eos_index_<mode>):
9334         Calculate index using natural element order.
9335         (first_match_index_<mode>):
9336         Calculate index using natural element order.
9337         (first_match_or_eos_index_<mode>):
9338         Calculate index using natural order.
9339         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9340         for BE and LE modes.
9341         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9342         P9V_BUILTIN_VCLZLSBB_V16QI.
9343         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9344         specific.
9346 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9348         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9349         indentation and line wrap for many prototypes.  Add missing
9350         @smallexample directives around block of prototypes for vec_xl and
9351         vec_xst.
9353 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
9355         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9356         track if we pass or return IEEE 128-bit floating point.
9357         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9358         C++ mangling that is compatible with GCC 8.1.
9359         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9360         (init_cumulative_args): Note if we pass or return IEEE 128-bit
9361         floating point types.
9362         (rs6000_function_arg_advance_1): Likewise.
9363         (rs6000_mangle_type): Optionally generate mangled names that match
9364         what GCC 8.1 generated for IEEE 128-bit floating point types.
9365         (rs6000_globalize_decl_name): If we have an external function that
9366         passes or returns IEEE 128-bit types, generate a weak reference
9367         from the mangled name used in GCC 8.1 to the current mangled
9368         name.
9369         (rs6000_init_builtins): Make __ibm128 use the long double type if
9370         long double is IBM extended double.  Make __float128 use the long
9371         double type if long double is IEEE 128-bit.
9373         PR target/85657
9374         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9375         macro for __ibm128 built-in functions.
9376         (PACK_IF): Add __ibm128 pack/unpack functions.
9377         (UNPACK_IF): Likewise.
9378         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9379         enable long double built-in functions if long double is IEEE
9380         128-bit floating point.
9381         (rs6000_invalid_builtin): Update long double built-in function
9382         error message.
9383         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9384         functions, adjust the built-in function to use the long double
9385         built-in function if __ibm128 and long double are the same type.
9386         * doc/extend.texi (PowerPC builtins): Update documention for
9387         __builtin_{,un}pack_longdouble.  Add documentation for
9388         __builtin_{,un}pack_ibm128.
9390 2018-06-06  Jim Wilson  <jimw@sifive.com>
9392         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
9393         (struct machine_function): New field interrupt_mode.
9394         (riscv_handle_type_attribute): New function.  Add forward declaration.
9395         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
9396         (riscv_expand_epilogue): Check interrupt_mode field.
9397         (riscv_set_current_function): Check interrupt attribute args and
9398         set interrupt_mode field.
9399         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
9400         (riscv_sret, riscv_uret): New.
9401         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
9402         new arguments to interrupt attribute.
9404 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
9406         PR target/63177
9407         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
9408         Don't handle -mcpu=power8 if -mpower9-vector is also used.
9410 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9412         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
9413         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
9414         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9415         several redundant entries.
9417 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
9419         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
9420         type from "rtx" to "rtx_insn *".
9421         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9422         for local "call_insn", removing cast.
9423         (ix86_expand_call): Likewise, introducing a "call_insn" local.
9425 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
9427         PR tree-optimization/86066
9428         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
9429         for BIT_INSERT_EXPR stores.
9431 2018-06-06  Richard Biener  <rguenther@suse.de>
9433         PR tree-optimization/86062
9434         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9435         component refs ontop
9436         of to be offsetted base.
9438 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9440         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
9441         to be static and remove check on interrupt attribute name.
9443 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9445         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9446         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
9448 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
9450         PR target/79924
9451         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
9452         second argument.
9453         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
9454         Remove second argument, change how error is called.
9455         (aarch64_layout_arg): Remove second argument from
9456         aarch64_err_no_fpadvsimd call.
9457         (aarch64_init_cumulative_args): Ditto.
9458         (aarch64_gimplify_va_arg_expr): Ditto.
9459         * config/aarch64/aarch64.md (mov<mode>): Ditto.
9461 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
9463         * config/i386/i386.md (simple_return_indirect_internal): New expander.
9464         (*simple_return_indirect_internal<mode>): Rename from
9465         simple_return_indirect_internal.  Use W mode iterator.
9466         (rstorssp): New expander.
9467         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
9468         (clrssbsy): New expander.
9469         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
9471 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9473         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
9474         __typeof__.
9475         (cmse_check_pointed_object): Likewise.
9477 2018-06-05  Martin Liska  <mliska@suse.cz>
9479         PR gcov-profile/47618
9480         * doc/invoke.texi: Document how -fprofile-dir format
9481         is extended.
9483 2018-06-05  Richard Biener  <rguenther@suse.de>
9485         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
9486         removal pretend DOM info isn't available so we do not update
9487         it and only remove edges, not dominated blocks.  Actually free
9488         DOM info in case we removed something.  Remove unreachable blocks.
9489         (mfb_keep_latches): Work with either DOM info or marked backedges.
9490         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
9491         first.  Mark backedges if DOM info isn't available.
9492         (Re-)compute DOM info after cleanup_control_flow_pre.
9494 2018-06-05  Richard Biener  <rguenther@suse.de>
9496         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
9497         (locus_discrim_hasher::hash): Adjust.
9498         (locus_discrim_hasher::equal): Likewise.
9499         (next_discriminator_for_locus): Work on line directly.
9500         (same_line_p): Pass in expanded locus1 as well.
9501         (assign_discriminators): Avoid redundant location expansions.
9503 2018-06-05  Richard Biener  <rguenther@suse.de>
9505         PR tree-optimization/86046
9506         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
9507         if required after clearing TREE_ADDRESSABLE.
9509 2018-06-05  Richard Biener  <rguenther@suse.de>
9511         PR tree-optimization/86047
9512         * tree-ssa-loop.c (for_each_index): Glob handling of all
9513         decls and constants and really handle all of them.
9515 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9517         PR target/81497
9518         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
9519         qualifier_void_pointer and qualifier_const_void_pointer.
9520         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
9521         (arm_init_builtins): Handle the above.
9522         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
9523         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
9524         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
9525         void intrinsics.
9527 2018-06-05  Martin Liska  <mliska@suse.cz>
9529         * auto-profile.c (read_autofdo_file): Do not use
9530         gcov_ctr_summary struct.
9531         (afdo_callsite_hot_enough_for_early_inline): Likewise.
9532         * coverage.c (struct counts_entry): Likewise.
9533         (read_counts_file): Read just single summary entry.
9534         (get_coverage_counts): Use gcov_summary struct.
9535         * coverage.h (get_coverage_counts): Likewise.
9536         * gcov-dump.c (dump_working_sets): Likewise.
9537         (tag_summary): Dump just single summary.
9538         * gcov-io.c (gcov_write_summary): Write just histogram
9539         summary.
9540         (gcov_read_summary): Read just single summary.
9541         (compute_working_sets): Use gcov_summary struct.
9542         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
9543         of GCOV_COUNTERS_SUMMABLE.
9544         (GCOV_COUNTERS_SUMMABLE): Remove.
9545         (GCOV_FIRST_VALUE_COUNTER): Replace with
9546         GCOV_COUNTER_V_INTERVAL.
9547         (struct gcov_ctr_summary): Remove.
9548         (struct gcov_summary): Directly use fields of former
9549         gcov_ctr_summary.
9550         (compute_working_sets): Use gcov_summary struct.
9551         * gcov.c (read_count_file): Do not use ctrs fields.
9552         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
9553         struct.
9554         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
9555         struct.
9556         * profile.c: Likewise.
9557         * profile.h: Likewise.
9559 2018-06-05  Martin Liska  <mliska@suse.cz>
9561         PR gcov-profile/84846
9562         * gcov.c (output_lines): Print working directory only
9563         in intermediate format.
9565 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
9567         * config/s390/s390-builtin-types.def: Add void function type.
9568         * config/s390/s390-builtins.def: Use the function type for the
9569         tbeginc builtin.
9571 2018-06-04  Jim Wilson  <jimw@sifive.com>
9573         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
9574         to int.
9575         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
9576         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
9577         handle EH_RETURN_DATA_REGNO registers properly.
9578         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
9579         (riscv_expand_epilogue): Update comment.  Change argument name and
9580         type.  Update code to use new name and type.  Pass new args to
9581         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
9582         EXCEPTION_RETURN.
9583         * config/riscv/riscv.md (NORMAL_RETURN): New.
9584         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
9585         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
9586         (eh_return): Call gen_eh_return_internal and emit barrier.
9587         (eh_return_internal): Call riscv_expand_epilogue.
9589 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
9591         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
9592         bit_insertion field and declare can_be_merged_into method.
9593         (merged_store_group::can_be_merged_into): New method.
9594         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
9595         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
9596         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
9598 2018-06-04  Richard Biener  <rguenther@suse.de>
9600         PR tree-optimization/85955
9601         * builtins.c (fold_builtin_sincos): Convert pointers to
9602         destination to appropriate type before dereferencing.
9604 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
9606         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
9608 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
9610         * expr.c (expand_expr_real_1): Force the operand into memory if
9611         its TYPE_MODE is BLKmode and if there is no integer mode for
9612         the number of bits being extracted.
9614 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
9616         PR target/85832
9617         PR target/86036
9618         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9619         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
9621 2018-06-04  Richard Biener  <rguenther@suse.de>
9623         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
9624         (cleanup_tree_cfg_noloop): ... single caller.  Do
9625         start_recording_case_labels later.
9627 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
9629         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
9630         to _IMMINTRIN_H_INCLUDED.
9631         * config/i386/pconfigintrin.h: Ditto.
9632         * config/i386/waitpkgintrin.h: Ditto.
9633         * config/i386/immintrin.h: Add includes for sgxintrin.h,
9634         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
9635         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
9636         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
9637         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
9638         waitpkgintrin.h and cldemoteintrin.h.
9640 2018-06-04  Richard Biener  <rguenther@suse.de>
9642         PR tree-optimization/86038
9643         * tracer.c (find_best_successor): Check probability for
9644         being initialized, bail out if not.
9646 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
9648         PR target/86003
9649         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
9650         of bits to ignore when comparing architectures.
9652 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
9654         PR tree-optimization/69615
9655         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
9656         maximum or minimum of the type, try to merge it also as if
9657         range1 is + [-, x - 1] or + [x + 1, -].
9659         PR c++/86025
9660         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
9662 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
9664         PR tree-optimization/86034
9665         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
9666         the unsigned bitfield type in a bit insertion sequence if it does not
9667         have a larger precision than the bitfield size.
9668         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
9670 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
9672         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
9674 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
9676         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
9677         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
9678         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
9679         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
9681 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
9683         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
9684         Disable -fdelete-null-pointer-checks for ELF toolchain.
9686 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
9687             Kito Cheng  <kito.cheng@gmail.com>
9689         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
9690         (nds32le-*-*, nds32be-*-*): Integrate checking process.
9691         (nds32*-*-*): Add glibc and uclibc conditions.
9692         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
9693         (TARGET_EXCEPT_UNWIND_INFO): Define.
9694         * config/nds32/elf.h: New file.
9695         * config/nds32/linux.h: New file.
9696         * config/nds32/nds32-elf.opt: New file.
9697         * config/nds32/nds32-linux.opt: New file.
9698         * config/nds32/nds32-fp-as-gp.c
9699         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
9700         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
9701         TARGET_LINUX_ABI.
9702         (nds32_asm_file_end): Ditto.
9703         (nds32_print_operand): Ditto.
9704         (nds32_insert_attributes): Ditto.
9705         (nds32_init_libfuncs): New function.
9706         (TARGET_HAVE_TLS): Define.
9707         (TARGET_INIT_LIBFUNCS): Define.
9708         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
9709         spec content.
9710         (TARGET_ELF): Apply different mcmodel setting.
9711         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
9712         been migrated into elf.h and linux.h files.
9713         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
9714         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
9715         (mcmodel): The content has been migrated into nds32-elf.opt and
9716         nds32-linux.opt files.
9717         * config/nds32/t-elf: New file.
9718         * config/nds32/t-linux: New file.
9720 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
9721             Shiva Chen  <shiva0217@gmail.com>
9723         * config/nds32/constants.md (unspec_volatile_element): Add
9724         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
9725         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
9726         optimization.
9727         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
9728         (make_pass_nds32_fp_as_gp): Declare.
9729         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
9730         optmization pass.
9731         (nds32_asm_function_end_prologue): Remove unused asm output.
9732         (nds32_asm_function_begin_epilogue): Remove unused asm output.
9733         (nds32_asm_file_start): Output necessary fp_as_gp information.
9734         (nds32_option_override): Adjust register usage.
9735         (nds32_expand_prologue): Consider fp_as_gp situation.
9736         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
9737         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
9738         (epilogue): Ditto.
9739         (return): Ditto.
9740         (simple_return): Ditto.
9741         (omit_fp_begin): Output special directive for fp_as_gp.
9742         (omit_fp_end): Output special directive for fp_as_gp.
9743         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
9744         mforbid-fp-as-gp): New options.
9746 2018-06-01  Mark Wielaard  <mark@klomp.org>
9748         * dwarf2out.c (dwarf2out_finish): Remove generation of
9749         DW_AT_loclists_base.
9751 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
9753         * gimple-ssa-store-merging.c: Include gimple-fold.h.
9754         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
9755         (struct merged_store_group): Add bit_insertion field.
9756         (dump_char_array): Use standard hexadecimal format.
9757         (merged_store_group::merged_store_group): Set bit_insertion to false.
9758         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
9759         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
9760         also print the mask in the dump file.
9761         (pass_store_merging::gate): Minor tweak.
9762         (imm_store_chain_info::coalesce_immediate): Fix wrong association
9763         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
9764         stores with INTEGER_CST stores.
9765         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
9766         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
9767         and use it throughout.  Generate bit insertion sequences if need be.
9768         (pass_store_merging::process_store): Remove redundant condition.
9769         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
9771 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
9773         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
9774         the 128-bit floating point types.  Fix function comment.
9776 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9778         * config/aarch64/aarch64-simd.md
9779         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
9780         mnemonics.
9781         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
9782         mnemonics.
9784 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
9786         PR tree-optimization/85989
9787         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
9788         variable.
9789         (backprop::intersect_uses): Check it when deciding whether this
9790         is a backedge reference.
9791         (backprop::process_block): Add each phi to m_visited_phis
9792         after visiting it, then clear it at the end.
9794 2018-06-01  Richard Biener  <rguenther@suse.de>
9796         * tree-vectorizer.h (vect_dr_stmt): New function.
9797         (vect_get_load_cost): Adjust.
9798         (vect_get_store_cost): Likewise.
9799         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
9800         Use vect_dr_stmt instead of DR_SMTT.
9801         (vect_record_base_alignments): Likewise.
9802         (vect_calculate_target_alignment): Likewise.
9803         (vect_compute_data_ref_alignment): Likewise and make static.
9804         (vect_update_misalignment_for_peel): Likewise.
9805         (vect_verify_datarefs_alignment): Likewise.
9806         (vector_alignment_reachable_p): Likewise.
9807         (vect_get_data_access_cost): Likewise.  Pass down
9808         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
9809         (vect_get_peeling_costs_all_drs): Likewise.
9810         (vect_peeling_hash_get_lowest_cost): Likewise.
9811         (vect_enhance_data_refs_alignment): Likewise.
9812         (vect_find_same_alignment_drs): Likewise.
9813         (vect_analyze_data_refs_alignment): Likewise.
9814         (vect_analyze_group_access_1): Likewise.
9815         (vect_analyze_group_access): Likewise.
9816         (vect_analyze_data_ref_access): Likewise.
9817         (vect_analyze_data_ref_accesses): Likewise.
9818         (vect_vfa_segment_size): Likewise.
9819         (vect_small_gap_p): Likewise.
9820         (vectorizable_with_step_bound_p): Likewise.
9821         (vect_prune_runtime_alias_test_list): Likewise.
9822         (vect_analyze_data_refs): Likewise.
9823         (vect_supportable_dr_alignment): Likewise.
9824         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9825         (vect_gen_prolog_loop_niters): Likewise.
9826         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9827         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
9828         modify DR_STMT.
9829         (vect_recog_mask_conversion_pattern): Likewise.
9830         (vect_try_gather_scatter_pattern): Likewise.
9831         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
9832         to vect_get_store_cost.
9833         (vect_get_store_cost): Get stmt_info instead of DR.
9834         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
9835         (vect_get_load_cost): Get stmt_info instead of DR.
9837 2018-06-01  Richard Biener  <rguenther@suse.de>
9839         PR middle-end/86017
9840         * gimple-fold.c (var_decl_component_p): Also allow offsetted
9841         vars wrapped in MEM_REFs.
9843 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
9845         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9846         Fix subreg tests so that we only return a choice between
9847         GENERAL_REGS and FP_REGS if the original classes included both.
9849 2018-06-01  Richard Biener  <rguenther@suse.de>
9851         PR ipa/85960
9852         * tree-ssa-structalias.c (get_function_part_constraint):
9853         Handle NULL fi->decl.
9854         (find_func_aliases_for_call): Properly handle indirect
9855         fi from direct call.
9856         (find_func_clobbers): Likewise.
9857         (ipa_pta_execute): Likewise.
9858         (create_variable_info_for): For functions that are ifunc_resolver
9859         resolve to a varinfo that contains the result of the resolver call.
9860         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
9861         aliases.
9863 2018-05-31  Michael Collison  <michael.collison@arm.com>
9865         * config/aarch64/aarch64.md:
9866         (*fix_to_zero_extenddfdi2): New pattern.
9867         * gcc.target/aarch64/fix_extend1.c: New testcase.
9869 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
9871         PR middle-end/78809
9872         PR middle-end/83026
9873         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
9874         and BUILT_IN_STRNCMP_EQ.
9875         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
9876         BUILT_IN_STRNCMP_EQ.
9877         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
9878         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9879         (gimple_fold_builtin): Likewise.
9880         * tree-ssa-strlen.c (compute_string_length): New function.
9881         (determine_min_obsize): New function.
9882         (handle_builtin_string_cmp): New function to handle calls to
9883         string compare functions.
9884         (strlen_optimize_stmt): Add handling to builtin string compare
9885         calls.
9886         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
9887         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9888         * tree.c (build_common_builtin_nodes): Add new defines of
9889         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
9891 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
9893         PR target/85984
9894         * bb-reorder.c (pass_partition_blocks::gate): Return false for
9895         functions with naked attribute.
9897 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
9899         * config/i386/sse.md (avx_vec_concat<mode>):
9900         Substitute concat_tg_mode mode attribute with xtg_mode.
9901         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
9902         (concat_tg_mode): Remove mode attribute.
9904 2018-05-31  Martin Sebor  <msebor@redhat.com>
9906         PR c/82063
9907         * calls.c (alloc_max_size): Correct a logic error/typo.
9908         Treat excessive arguments as infinite.  Warn for invalid arguments.
9909         * doc/invoke.texi (-Walloc-size-larger-than): Update.
9911 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
9913         PR target/85829
9914         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
9915         and movx for Haswell.
9917 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
9918             Cesar Philippidis  <cesar@codesourcery.com>
9920         PR middle-end/85879
9921         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
9922         when emitting error on private/firstprivate reductions.
9923         * omp-low.c (lower_omp_target): Avoid reference-type processing
9924         on pointers for firstprivate clause.
9926 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
9928         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
9929         (st1x2): Likewise.
9930         (st1x3): Likewise.
9931         * config/aarch64/aarch64-simd.md
9932         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
9933         (aarch64_ld1_x3_<mode>): Likewise
9934         (aarch64_st1x2<VALLDIF:mode>): Likewise
9935         (aarch64_st1_x2_<mode>): Likewise
9936         (aarch64_st1x3<VALLDIF:mode>): Likewise
9937         (aarch64_st1_x3_<mode>): Likewise
9938         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
9939         (vld1_s8_x3): Likewise.
9940         (vld1_u16_x3): Likewise.
9941         (vld1_s16_x3): Likewise.
9942         (vld1_u32_x3): Likewise.
9943         (vld1_s32_x3): Likewise.
9944         (vld1_u64_x3): Likewise.
9945         (vld1_s64_x3): Likewise.
9946         (vld1_f16_x3): Likewise.
9947         (vld1_f32_x3): Likewise.
9948         (vld1_f64_x3): Likewise.
9949         (vld1_p8_x3): Likewise.
9950         (vld1_p16_x3): Likewise.
9951         (vld1_p64_x3): Likewise.
9952         (vld1q_u8_x3): Likewise.
9953         (vld1q_s8_x3): Likewise.
9954         (vld1q_u16_x3): Likewise.
9955         (vld1q_s16_x3): Likewise.
9956         (vld1q_u32_x3): Likewise.
9957         (vld1q_s32_x3): Likewise.
9958         (vld1q_u64_x3): Likewise.
9959         (vld1q_s64_x3): Likewise.
9960         (vld1q_f16_x3): Likewise.
9961         (vld1q_f32_x3): Likewise.
9962         (vld1q_f64_x3): Likewise.
9963         (vld1q_p8_x3): Likewise.
9964         (vld1q_p16_x3): Likewise.
9965         (vld1q_p64_x3): Likewise.
9966         (vst1_s64_x2): Likewise.
9967         (vst1_u64_x2): Likewise.
9968         (vst1_f64_x2): Likewise.
9969         (vst1_s8_x2): Likewise.
9970         (vst1_p8_x2): Likewise.
9971         (vst1_s16_x2): Likewise.
9972         (vst1_p16_x2): Likewise.
9973         (vst1_s32_x2): Likewise.
9974         (vst1_u8_x2): Likewise.
9975         (vst1_u16_x2): Likewise.
9976         (vst1_u32_x2): Likewise.
9977         (vst1_f16_x2): Likewise.
9978         (vst1_f32_x2): Likewise.
9979         (vst1_p64_x2): Likewise.
9980         (vst1q_s8_x2): Likewise.
9981         (vst1q_p8_x2): Likewise.
9982         (vst1q_s16_x2): Likewise.
9983         (vst1q_p16_x2): Likewise.
9984         (vst1q_s32_x2): Likewise.
9985         (vst1q_s64_x2): Likewise.
9986         (vst1q_u8_x2): Likewise.
9987         (vst1q_u16_x2): Likewise.
9988         (vst1q_u32_x2): Likewise.
9989         (vst1q_u64_x2): Likewise.
9990         (vst1q_f16_x2): Likewise.
9991         (vst1q_f32_x2): Likewise.
9992         (vst1q_f64_x2): Likewise.
9993         (vst1q_p64_x2): Likewise.
9994         (vst1_s64_x3): Likewise.
9995         (vst1_u64_x3): Likewise.
9996         (vst1_f64_x3): Likewise.
9997         (vst1_s8_x3): Likewise.
9998         (vst1_p8_x3): Likewise.
9999         (vst1_s16_x3): Likewise.
10000         (vst1_p16_x3): Likewise.
10001         (vst1_s32_x3): Likewise.
10002         (vst1_u8_x3): Likewise.
10003         (vst1_u16_x3): Likewise.
10004         (vst1_u32_x3): Likewise.
10005         (vst1_f16_x3): Likewise.
10006         (vst1_f32_x3): Likewise.
10007         (vst1_p64_x3): Likewise.
10008         (vst1q_s8_x3): Likewise.
10009         (vst1q_p8_x3): Likewise.
10010         (vst1q_s16_x3): Likewise.
10011         (vst1q_p16_x3): Likewise.
10012         (vst1q_s32_x3): Likewise.
10013         (vst1q_s64_x3): Likewise.
10014         (vst1q_u8_x3): Likewise.
10015         (vst1q_u16_x3): Likewise.
10016         (vst1q_u32_x3): Likewise.
10017         (vst1q_u64_x3): Likewise.
10018         (vst1q_f16_x3): Likewise.
10019         (vst1q_f32_x3): Likewise.
10020         (vst1q_f64_x3): Likewise.
10021         (vst1q_p64_x3): Likewise.
10023 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10025         * config/msp430/msp430.c (msp430_output_labelref): Prepend
10026         user_label_prefix to name.
10028         * tree-core.h: Update comment about the format of NAME string
10029         passed to handler in attribute_spec.
10031         * config/msp430/msp430.md: Remove erroneous subreg expression from
10032         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10033         zero_extend{q,h}isi2.
10035 2018-05-30  Borislav Petkov  <bp@suse.de>
10037         * doc/extend.texi: Document some architecture specific
10038         constraints and sort entries.
10040 2018-05-30  Martin Sebor  <msebor@redhat.com>
10042         PR middle-end/85369
10043         * builtins.c (expand_builtin_stpcpy_1): New function.
10044         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10045         only if the former succeeds.
10047 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
10049         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10050         in saphira.
10052 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10054         * doc/invoke.texi (-flinker-output): Document
10056 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10058         * passes.c (ipa_write_summaries): Only modify statements if body
10059         is in memory.
10060         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10061         incrementally linking.
10062         (ipa_passes): Likewise.
10063         * lto-cgraph.c (lto_output_node): When incrementally linking do not
10064         pass down resolution info.
10065         * common.opt (flag_incremental_link): Update info.
10066         * gcc.c (plugin specs): Turn flinker-output=* to
10067         -plugin-opt=-linker-output-known
10068         * toplev.c (compile_file): Also cut compilation when doing incremental
10069         link.
10070         * flag-types. (enum lto_partition_model): Add
10071         LTO_LINKER_OUTPUT_NOLTOREL.
10072         (invoke.texi): Add -flinker-output docs.
10073         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10074         link same way as WPA; do not stream in dead initializers.
10076         * dwarf2out.c (dwarf2out_die_ref_for_decl,
10077         darf2out_register_external_decl): Support incremental link.
10079 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10081         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10083 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10085         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10086         it down to simple_object_copy_lto_debug_sections.
10087         (run_gcc): Determine incremental LTO link time and configure
10088         lto1 into non-wpa mode, disable renaming of debug sections.
10090 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10092         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10093         descriptions of various incorrectly documented functions.
10095 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10097         Revert:
10098         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10099         address check not strict.
10101 2018-05-30  Richard Biener  <rguenther@suse.de>
10103         PR tree-optimization/85964
10104         * tracer.c (better_p): Drop initialized count check, we only
10105         call the function with initialized counts now.
10106         (find_best_successor): Do find a best edge if one
10107         has uninitialized count.
10108         (find_best_predecessor): Likewise.  Do BB frequency check only
10109         if count is initialized.
10111 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
10113         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10114         (aarch64_ldrstr_offset_compare): New.
10115         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10116         load/store orderings.
10117         (aarch64_gen_adjusted_ldpstp): Likewise.
10119 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
10121         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10122         Check for subset of GENERAL_REGS and FP_REGS.
10123         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10124         r=w alternative.
10126 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
10128         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10129         and wi::to_poly_offset.  Add the current offset and then check
10130         whether the sum fits, rather than using an unchecked addition of
10131         a checked term.  Check for a shwi rather than a uhwi.
10132         * expr.c (get_bit_range): Use tree_to_poly_uint64.
10133         (store_constructor): Use poly_int_tree_p.
10134         (expand_expr_real_1): Likewise.
10135         * function.c (assign_temp): Likewise.
10136         * fold-const.c (const_binop): Use poly_int_tree_p and
10137         wi::to_poly_offset.
10138         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
10139         division.
10140         * ipa-icf-gimple.c (func_checker::compare_operand): Use
10141         to_poly_offset for MEM offsets.
10142         * ipa-icf.c (sem_variable::equals): Likewise.
10143         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10144         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10145         wi::to_poly_offset for BIT_FIELD_REF offsets.
10146         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10147         wi::to_poly_offset.
10148         * var-tracking.c (emit_note_insn_var_location): Use
10149         tree_to_poly_uint64.
10151 2018-05-29  Jim Wilson  <jimw@sifive.com>
10153         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10155 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
10157         PR target/85950
10158         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10159         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10160         sequence.
10161         (sse4_1_round<mode>2): Use nonimmediate_operand
10162         for operand 1 predicate.
10164 2018-05-29  Martin Sebor  <msebor@redhat.com>
10165             Richard Biener  <rguenther@suse.de>
10167         PR testsuite/85888
10168         * calls.c (get_size_range): Call determine_value_range instead
10169         of get_value_range..
10170         * tree-vrp.h (determine_value_range): Declared new function.
10171         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10173 2018-05-29  Richard Biener  <rguenther@suse.de>
10175         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10176         sure to use non-pattern stmts for get_earlier_stmt arguments.
10177         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10178         called on pattern stmts.
10179         (get_later_stmt): Likewise.
10181 2018-05-29  Martin Liska  <mliska@suse.cz>
10183         PR gcov-profile/85759
10184         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10185         env variables.
10187 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
10189         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10190         VEC_UNPACK_*_EXPR.
10191         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10192         VEC_PACK_*_EXPR.
10194         PR target/85918
10195         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10196         VEC_PACK_FLOAT_EXPR): New tree codes.
10197         * tree-pretty-print.c (op_code_prio): Handle
10198         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10199         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10200         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10201         * tree-inline.c (estimate_operator_cost): Likewise.
10202         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10203         * fold-const.c (const_binop): Likewise.
10204         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10205         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10206         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10207         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10208         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10209         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10210         * expr.c (expand_expr_real_2): Likewise.
10211         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10212         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10213         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10214         optabs.
10215         * optabs.c (expand_widen_pattern_expr): For
10216         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10217         sign from result type rather than operand's type.
10218         (expand_binop_directly): For vec_packu_float_optab and
10219         vec_packs_float_optab allow result type to be different from operand's
10220         type.
10221         * optabs-tree.c (optab_for_tree_code): Handle
10222         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10223         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
10224         * tree-vect-generic.c (expand_vector_operations_1):  Handle
10225         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10226         VEC_PACK_FLOAT_EXPR.
10227         * tree-vect-stmts.c (supportable_widening_operation): Handle
10228         FIX_TRUNC_EXPR.
10229         (supportable_narrowing_operation): Handle FLOAT_EXPR.
10230         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10231         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10232         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
10233         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10234         mode attributes.
10235         (vec_pack<floatprefix>_float_<mode>): New expander.
10236         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10237         attributes.
10238         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10239         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10240         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10241         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10242         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10243         Document.
10244         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10245         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10246         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10247         VEC_PACK_FLOAT_EXPR): Document.
10249 2018-05-29  Richard Biener  <rguenther@suse.de>
10251         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10252         member.
10253         (stmt_vec_info_vec): Make pointer.
10254         (init_stmt_vec_info_vec): Remove.
10255         (free_stmt_vec_info_vec): Likewise.
10256         (set_stmt_vec_info_vec): New function.
10257         (free_stmt_vec_infos): Likewise.
10258         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10259         (set_vinfo_for_stmt): Likewise.
10260         (get_earlier_stmt): Likewise.
10261         (get_later_stmt): Likewise.
10262         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10263         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10264         (vec_info::~vec_info): Free stmt_vec_infos.
10265         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10266         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10267         (pass_slp_vectorize::execute): Likewise.
10268         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10269         (free_stmt_vec_info_vec): Likewise.
10270         (set_stmt_vec_info_vec): New function.
10271         (free_stmt_vec_infos): Likewise.
10272         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10273         the global stmt_vec_info_vec.
10274         * tree-parloops.c (gather_scalar_reductions): Use
10275         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10276         vector.
10278 2018-05-29  Richard Biener  <rguenther@suse.de>
10280         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10282 2018-05-29  Martin Liska  <mliska@suse.cz>
10283             David Malcolm  <dmalcolm@redhat.com>
10285         * vec.c (test_reverse): New.
10286         (vec_c_tests): Add new test.
10287         * vec.h (vl_ptr>::reverse): New function.
10289 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
10291         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10293         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10294         and later.
10296 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10298         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10300 2018-05-28  Richard Biener  <rguenther@suse.de>
10302         PR tree-optimization/85933
10303         * tree-vect-data-refs.c (vect_record_base_alignments): Only
10304         look at stmts marked as vectorizable.
10306 2018-05-28  Richard Biener  <rguenther@suse.de>
10308         PR tree-optimization/85934
10309         * tree-vect-generic.c (expand_vector_operations_1): Hoist
10310         vector boolean check before scalar optimization.
10312 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
10314         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10315         for armv5te.
10317 2018-05-28  Mark Wielaard  <mark@klomp.org>
10319         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10320         if it is an expression containing a minus sign.
10322 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
10324         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10326 2018-05-27  Paul Koning  <ni1d@arrl.net>
10328         * config/pdp11/pdp11.md (truncsihi2): Remove.
10330 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
10331             Chung-Ju Wu  <jasonwucj@gmail.com>
10333         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10334         implementation.
10335         (unaligned_store_dw): Ditto.
10336         * config/nds32/nds32-memory-manipulation.c
10337         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10338         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10339         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10340         (emit_setmem_word_loop): Rename to ...
10341         (emit_setmem_doubleword_loop): ... this.
10342         (nds32_gen_dup_4_byte_to_word_value): New function.
10343         (nds32_gen_dup_8_byte_to_double_word_value): New function.
10344         (nds32_expand_setmem_loop): Refine implementation.
10345         (nds32_expand_setmem_loop_v3m): Ditto.
10346         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10347         pattern.
10349 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
10351         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10353 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
10355         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10356         (nds32_init_machine_status): Initialize machine->attr_naked_p and
10357         machine->attr_no_prologue_p.
10358         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10359         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10360         (nds32_expand_epilogue): Consider attr_naked_p.
10361         (nds32_expand_epilogue_v3pop): Likewise.
10362         (nds32_can_use_return_insn): Likewise.
10363         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10364         attr_no_prologue_p fields.
10365         * config/nds32/nds32.opt (mret-in-naked-func): New option.
10367 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
10369         PR target/85918
10370         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10371         attributes.
10372         * config/i386/sse.md
10373         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10374         Rename to ...
10375         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10376         ... this.
10377         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10378         Rename to ...
10379         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10380         ... this.
10381         (*<floatsuffix>floatv2div2sf2): Rename to ...
10382         (*float<floatunssuffix>v2div2sf2): ... this.
10383         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10384         (float<floatunssuffix>v2div2sf2_mask): ... this.
10385         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10386         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
10387         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
10388         to ...
10389         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
10390         ... this.
10391         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10392         Rename to ...
10393         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10394         ... this.
10395         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10396         Rename to ...
10397         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10398         ... this.
10399         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
10400         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
10401         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
10402         gen_ufix_truncv8dfv8si2.
10403         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
10404         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
10405         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
10406         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
10407         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
10408         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
10409         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
10410         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
10412 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
10414         PR target/85900
10415         PR target/85345
10416         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
10418 2018-05-25  Jim Wilson  <jimw@sifive.com>
10420         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
10421         * config/riscv/riscv.c (struct machine_function): Add
10422         interrupt_handler_p and attribute_checked_p fields.
10423         (riscv_attribute_table): Add interrupt.
10424         (riscv_interrupt_type_p): New.
10425         (riscv_save_reg_p): Save extra regs for interrupt handler.
10426         (riscv_use_save_libcall): Return false  for interrupt handler.
10427         (riscv_first_stack_step): Add forward declaration.
10428         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
10429         for interrupt handler with large frame.  Use it for saved reg list.
10430         (riscv_expand_prologue): Move flag_stack_usage_info support to
10431         eliminate duplication.
10432         (riscv_expand_epilogue): Generate mret for interrupt handler.
10433         (riscv_epilogue_uses): New.
10434         (riscv_can_use_return_insn): Return false for interrupt handler.
10435         (riscv_function_ok_for_sibcall): Likewise.
10436         (riscv_set_current_function): Add interrupt handler support.
10437         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
10438         * config/riscv/riscv.md (UNSPECV_MRET): New.
10439         (GP_REGNUM): New.
10440         (riscv_frflags, riscv_fsflags): Use tab after opcode.
10441         (riscv_mret): New.
10442         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
10444 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
10446         PR tree-optimization/85712
10447         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
10448         this candidate has already been replaced in-situ by a copy.
10450 2018-05-25  Jason Merrill  <jason@redhat.com>
10452         PR c++/80485 - inline function non-zero address.
10453         * symtab.c (nonzero_address): Check DECL_COMDAT.
10455 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
10457         PR target/83628
10458         * config/alpha/alpha.md (ashlsi3): New insn pattern.
10459         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
10460         extension of SImode operation.  Use const123_operand predicate.
10461         (*saddsi_1): Remove.
10462         (*saddl_se_1): Ditto.
10463         (*ssubsi_1): Ditto.
10464         (*ssubl_se_1): Ditto.
10465         * config/alpha/predicates.md (const123_operand): New predicate.
10466         * config/alpha/constraints.md (P): Use IN_RANGE.
10468 2018-05-25  Richard Biener  <rguenther@suse.de>
10470         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
10471         defaulted to true.
10472         (ref_maybe_used_by_stmt_p): Likewise.
10473         (stmt_may_clobber_ref_p): Likewise.
10474         (stmt_may_clobber_ref_p_1): Likewise.
10475         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
10476         and pass it along.
10477         (ref_maybe_used_by_stmt_p): Likewise.
10478         (stmt_may_clobber_ref_p): Likewise.
10479         (stmt_may_clobber_ref_p_1): Likewise.
10480         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
10481         the alias oracle to disambiguate DRs with stmts DR analysis
10482         couldn't handle.
10483         (vect_analyze_data_refs): Do not give up on not analyzable
10484         DRs for BB vectorization.  Remove code truncating the dataref
10485         vector.
10487 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
10489         PR target/85832
10490         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10491         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
10492         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
10494 2018-05-25  Richard Biener  <rguenther@suse.de>
10496         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
10497         function, combining stmt data ref gathering and fatal analysis
10498         parts.
10499         (vect_analyze_data_refs): Remove now redudnant code and simplify.
10500         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
10501         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
10502         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
10503         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
10505 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
10507         PR tree-optimization/85720
10508         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
10509         SCC if all partitions are builtins.
10510         (version_loop_by_alias_check): New parameter.  Generate cancelable
10511         runtime alias check if all partitions are builtins.
10512         (distribute_loop): Update call to above function.
10514 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
10516         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
10517         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
10518         (parm_default_def_partition_arg): Ditto.
10519         (set_parm_default_def_partition): Ditto.
10520         (get_parm_default_def_partitions): Ditto and make it static.
10521         (get_undefined_value_partitions): Ditto and make it static.
10522         (remove_ssa_form): Refactor call to init_var_map here.
10523         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
10524         computation for loop region.
10525         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
10526         (register_default_def): Delete.
10527         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
10528         (parm_default_def_partition_arg): Ditto.
10529         (set_parm_default_def_partition): Ditto.
10530         (get_parm_default_def_partitions): Ditto and make it static.
10531         (get_undefined_value_partitions): Ditto and make it static.
10532         (coalesce_with_default, coalesce_with_default): Update comment.
10533         (create_coalesce_list_for_region): New func factored out from
10534         create_outofssa_var_map.
10535         (populate_coalesce_list_for_outofssa): New func factored out from
10536         create_outofssa_var_map and coalesce_ssa_name.
10537         (create_outofssa_var_map): Delete.
10538         (coalesce_ssa_name): Refactor to support live range computation.
10539         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
10540         (get_parm_default_def_partitions): Delete.
10541         (get_undefined_value_partitions): Ditto.
10542         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
10543         computation for loop region.
10544         (new_tree_live_info, loe_visit_block): Ditto.
10545         (live_worklist, set_var_live_on_entry): Ditto.
10546         (calculate_live_on_exit, verify_live_on_entry): Ditto.
10547         * tree-ssa-live.h (struct _var_map): New fields.
10548         (init_var_map): Change decl.
10549         (region_contains_p): New.
10551 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
10553         * tree-ssa-live.h (live_merge_and_clear): Delete.
10555 2018-05-25  Richard Biener  <rguenther@suse.de>
10557         PR c++/85912
10558         * tree-dump.c (dequeue_and_dump): Remove access to removed
10559         operand 2 of a SWITCH_EXPR.
10561 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10563         * doc/sourcebuild.texi (vect_double_cond_arith): Include
10564         multiplication and division.
10565         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
10566         (cond_udiv@var{m}, cond_umod@var{m}): Document.
10567         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
10568         (cond_udiv_optab, cond_umod_optab): New optabs.
10569         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
10570         (IFN_COND_RDIV): New internal functions.
10571         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
10572         TRUNC_MOD_EXPR and RDIV_EXPR.
10573         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
10574         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
10575         New unspecs.
10576         (SVE_INT_BINARY): Include mult.
10577         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
10578         (optab, sve_int_op): Handle mult.
10579         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
10580         UNSPEC_COND_DIV.
10581         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
10582         for SVE_INT_BINARY_SD.
10584 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10586         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
10587         (optab, sve_int_op): Handle div and udiv.
10588         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
10589         for SVE_INT_BINARY_SD.
10590         (*<optab><mode>3): New insn for the same.
10592 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10594         * tree-vect-patterns.c: Include predict.h.
10595         (vect_recog_divmod_pattern): Restrict check for division support
10596         to when optimizing for size.
10598 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10600         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
10601         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
10602         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
10603         (gimple_match_op::set_op): Likewise.
10604         (gimple_resimplify4): Declare.
10605         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
10606         (expr::gen_transform): Likewise.
10607         (decision_tree::gen): Generate a simplification routine for 4 operands.
10608         * gimple-match-head.c (gimple_simplify): Add an overload for
10609         4 operands.  In the top-level function, handle up to 4 call
10610         arguments and call gimple_resimplify4.
10611         (gimple_resimplify4): New function.
10612         (build_call_internal): Pass a fourth operand.
10613         (maybe_push_to_seq): Likewise.
10614         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
10615         Fold VEC_COND_EXPRs of an operation and a default value into
10616         an IFN_COND_* function if possible.
10617         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
10618         New unspecs.
10619         (SVE_COND_FP_BINARY): Include them.
10620         (optab, sve_fp_op): Handle them.
10621         (SVE_INT_BINARY_REV): New code iterator.
10622         (SVE_COND_FP_BINARY_REV): New int iterator.
10623         (commutative): New int attribute.
10624         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
10625         Declare.
10626         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
10627         function.
10628         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
10629         (*cond_<optab><mode>): New patterns for reversed operands.
10631 2018-05-25  Richard Biener  <rguenther@suse.de>
10633         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
10634         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
10635         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
10636         (STMT_VINFO_GROUPED_ACCESS): Adjust.
10637         * tree-vect-data-refs.c (everywhere): Adjust users.
10638         * tree-vect-loop.c (everywhere): Likewise.
10639         * tree-vect-slp.c (everywhere): Likewise.
10640         * tree-vect-stmts.c (everywhere): Likewise.
10641         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10643 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10645         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
10646         Rename to...
10647         (gcc_cv_as_section_exclude): ... this.
10648         Try Solaris as #exclude syntax.
10649         * configure: Regenerate.
10650         * config.in: Regenerate.
10651         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
10652         SECTION_EXCLUDE.
10653         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
10654         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
10656         * varasm.c (default_elf_asm_named_section): Don't check if
10657         HAVE_GAS_SECTION_EXCLUDE is defined.
10659 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10661         * doc/md.texi: Update the documentation of the cond_* optabs
10662         to mention the new final operand.  Fix GET_MODE_NUNITS call.
10663         Describe the scalar case too.
10664         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
10665         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
10666         instead of 2.
10667         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
10668         (get_conditional_internal_fn): Update comment.
10669         * tree-vect-loop.c (vectorizable_reduction): Pass the original
10670         accumulator value as a final argument to conditional functions.
10671         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
10672         a define_expand and add an "else" operand.  Assert for now that
10673         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
10674         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
10675         (*cond_<optab><mode>): New patterns.
10676         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
10677         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10678         (UNSPEC_COND_EOR): Delete.
10679         (optab): Remove associated mappings.
10680         (SVE_INT_BINARY): New code iterator.
10681         (sve_int_op): Remove int attribute and add "minus" to the code
10682         attribute.
10683         (SVE_COND_INT_OP): Delete.
10684         (SVE_COND_FP_OP): Rename to...
10685         (SVE_COND_FP_BINARY): ...this.
10687 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10689         * optabs.c (can_reuse_operands_p): New function.
10690         (maybe_legitimize_operands): Try to reuse the results for
10691         earlier operands.
10693 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
10695         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
10696         Add {q} suffix to insn mnemonic.
10698 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10700         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
10701         (msp430_warn_func_return): New.
10703 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
10705         * fold-const.c (tree_nonzero_bits): New function.
10706         * fold-const.h (tree_nonzero_bits): Likewise.
10707         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
10708         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
10710 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
10712         PR target/85900
10713         PR target/85345
10714         * varasm.c (assemble_alias): Check ifunc_resolver only on
10715         FUNCTION_DECL.
10717 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
10719         PR target/85903
10720         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
10721         when memory input operand is handled.
10723 2018-05-24  Luis Machado  <luis.machado@linaro.org>
10725         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
10726         global.
10727         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
10729 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
10731         * match.pd: Delay FMA folds until after vectorization.
10733 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10735         PR target/83009
10736         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10737         address check not strict.
10739 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
10741         * gimple-match.h (gimple_match_op): New class.
10742         (mprts_hook): Replace parameters with a gimple_match_op *.
10743         (maybe_build_generic_op): Likewise.
10744         (gimple_simplified_result_is_gimple_val): Replace parameters with
10745         a const gimple_match_op *.
10746         (gimple_simplify): Replace code_helper * and tree * parameters with
10747         a gimple_match_op * parameter.
10748         (gimple_resimplify1): Replace code_helper *, tree and tree *
10749         parameters with a gimple_match_op * parameter.
10750         (gimple_resimplify2): Likewise.
10751         (gimple_resimplify3): Likewise.
10752         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
10753         parameters with a gimple_match_op * parameter.
10754         * gimple-match-head.c (gimple_simplify): Change prototypes of
10755         auto-generated functions to take a gimple_match_op * instead of
10756         separate code_helper * and tree * parameters.  Make the same
10757         change in the top-level overload and update calls to the
10758         gimple_resimplify routines.  Update calls to the auto-generated
10759         functions and to maybe_push_res_to_seq in the publicly-facing
10760         operation-specific gimple_simplify overloads.
10761         (gimple_match_op::MAX_NUM_OPS): Define.
10762         (gimple_resimplify1): Replace rcode and ops with a single res_op
10763         parameter.  Update call to gimple_simplify.
10764         (gimple_resimplify2): Likewise.
10765         (gimple_resimplify3): Likewise.
10766         (mprts_hook): Replace parameters with a gimple_match_op *.
10767         (maybe_build_generic_op): Likewise.
10768         (build_call_internal): Replace type, nargs and ops with
10769         a gimple_match_op *.
10770         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
10771         with a single gimple_match_op *.  Update calls to mprts_hook,
10772         build_call_internal and gimple_simplified_result_is_gimple_val.
10773         Factor out code that is common to the tree_code and combined_fn cases.
10774         * genmatch.c (expr::gen_transform): Replace tem_code and
10775         tem_ops with a gimple_match_op called tem_op.  Update calls
10776         to the gimple_resimplify functions and maybe_push_res_to_seq.
10777         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
10778         res_ops.  Update call to the gimple_resimplify functions.
10779         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
10780         (decision_tree::gen): Make the functions take a gimple_match_op *
10781         called res_op instead of separate res_code and res_ops parameters.
10782         Update call accordingly.
10783         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
10784         and ops with a single res_op parameter.  Update calls to
10785         maybe_build_generic_op and maybe_push_res_to_seq.
10786         (fold_stmt_1): Update calls to gimple_simplify and
10787         replace_stmt_with_simplification.
10788         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
10789         and gimple_simplified_result_is_gimple_val.
10790         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
10791         gimple_simplify.
10792         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
10793         with a gimple_match_op *.
10794         (vn_nary_build_or_lookup): Likewise.  Update call to
10795         vn_nary_build_or_lookup_1.
10796         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
10797         gimple_match_op *.  Update calls to the gimple_resimplify routines
10798         and to gimple_simplified_result_is_gimple_val.
10799         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
10800         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
10801         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
10802         (visit_nary_op): Likewise.
10803         (visit_reference_op_load): Likewise.
10805 2018-05-23  Luis Machado  <luis.machado@linaro.org>
10807         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
10808         modifier for printing the step amount.
10810 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
10812         PR target/78849
10813         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
10814         types.
10816 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
10818         * doc/sourcebuild.texi (Endianness): New subsubsection.
10820 2018-05-23  Luis Machado  <luis.machado@linaro.org>
10822         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10823         <prefetch_dynamic_strides>: New const bool field.
10824         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10825         prefetch_dynamic_strides.
10826         (exynosm1_prefetch_tune): Likewise.
10827         (thunderxt88_prefetch_tune): Likewise.
10828         (thunderx_prefetch_tune): Likewise.
10829         (thunderx2t99_prefetch_tune): Likewise.
10830         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
10831         false.
10832         (aarch64_override_options_internal): Update to set
10833         PARAM_PREFETCH_DYNAMIC_STRIDES.
10834         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10835         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10836         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10837         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10838         prefetch-dynamic-strides setting.
10840 2018-05-23  Luis Machado  <luis.machado@linaro.org>
10842         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10843         <minimum_stride>: New const int field.
10844         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10845         minimum_stride field defaulting to -1.
10846         (exynosm1_prefetch_tune): Likewise.
10847         (thunderxt88_prefetch_tune): Likewise.
10848         (thunderx_prefetch_tune): Likewise.
10849         (thunderx2t99_prefetch_tune): Likewise.
10850         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
10851         <default_opt_level>: Set to 3.
10852         (aarch64_override_options_internal): Update to set
10853         PARAM_PREFETCH_MINIMUM_STRIDE.
10854         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10855         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10856         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10857         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10858         stride is constant and is below the minimum stride threshold.
10860 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10862         * config/arm/arm-cpus.in (mode26): Delete.
10863         (armv4): Delete mode26 reference.
10864         * config/arm/arm.c (arm_configure_build_target): Delete use of
10865         isa_bit_mode26.
10867 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
10869         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
10870         New insn pattern.
10871         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
10872         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
10873         for non-SSE modes.
10874         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
10875         (floatunsdidf2): Ditto.
10877 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
10879         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
10880         (fixuns_trunc<mode>si2_avx512f): Ditto.
10881         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
10882         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
10883         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
10885 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
10887         PR rtl-optimization/79985
10888         * df-scan.c (df_insn_refs_collect): Remove special case for
10889         global registers and asm statements.
10891 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
10893         * extend.texi (Global Register Variables): Rewrite the bullet list.
10894         Note that the register is available for allocation. Note that access
10895         via inline asm must use constraints. Add note about async-signal
10896         handlers. Remove paragraph about automagic register selection.
10898 2018-05-23  Richard Biener  <rguenther@suse.de>
10900         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
10901         of fixed offset from memset VN.
10903 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
10905         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
10906         first_interp field.
10907         (alloc_cand_and_find_basis): Initialize first_interp field.
10908         (slsr_process_mul): Modify first_interp field.
10909         (slsr_process_add): Likewise.
10910         (slsr_process_cast): Modify first_interp field for each new
10911         interpretation.
10912         (slsr_process_copy): Likewise.
10913         (dump_candidate): Dump first_interp field.
10914         (replace_mult_candidate): Process all interpretations, not just
10915         subsequent ones.
10916         (replace_rhs_if_not_dup): Likewise.
10917         (replace_one_candidate): Likewise.
10919 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
10921         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
10922         Add new boolean.
10923         (aarch64_needs_frame_chain): New function.
10924         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
10926 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
10928         PR target/84882
10929         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
10930         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
10931         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
10932         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
10933         as true for strict-align.
10934         (aarch64_can_inline_p): Perform checks even when callee has no
10935         attributes to check for strict alignment.
10936         * doc/extend.texi (AArch64 Function Attributes): Document
10937         no-strict-align.
10938         * doc/invoke.texi: (AArch64 Options): Likewise.
10940 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
10942         PR tree-optimization/85853
10943         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
10944         the handling of the root of the node to...
10945         (vect_slp_analyze_node_operations_1): ...this new function,
10946         and run the whole thing with the child nodes' def types
10947         set according to their SLP node's def type.
10949 2018-05-23  Richard Biener  <rguenther@suse.de>
10951         PR middle-end/85874
10952         * tree-data-ref.c (create_runtime_alias_checks): Defer
10953         and ignore overflow warnings.
10955 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
10957         PR tree-optimization/85822
10958         * tree-vrp.c (is_masked_range_test): Fix handling of negative
10959         constants.
10961 2018-05-23  Richard Biener  <rguenther@suse.de>
10963         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10964         memset constants via native_interpret_expr.
10966 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
10968         PR target/85345
10969         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
10970         attribute.
10971         (cgraph_node::create_alias): Likewise.
10972         (cgraph_node::get_availability): Check ifunc_resolver instead
10973         of looking up ifunc attribute.
10974         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10975         * varasm.c (do_assemble_alias): Likewise.
10976         (assemble_alias): Likewise.
10977         (default_binds_local_p_3): Likewise.
10978         * cgraph.h (cgraph_node): Add ifunc_resolver.
10979         (cgraph_node::only_called_directly_or_aliased_p): Return false
10980         for IFUNC resolver.
10981         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
10982         attribute.
10983         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
10984         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
10985         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
10986         instead of looking up ifunc attribute.
10988 2018-05-22  Luis Machado  <luis.machado@linaro.org>
10990         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
10992 2018-05-22  Martin Sebor  <msebor@redhat.com>
10994         PR middle-end/85359
10995         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
10996         only when expasion succeeds.
10997         (expand_builtin_strcmp): Same.
10998         (expand_builtin_strncmp): Same.
11000 2018-05-22  Martin Sebor  <msebor@redhat.com>
11002         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11004 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
11005             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11007         * config/aarch64/aarch64-ldpstp.md: Replace uses of
11008         aarch64_mem_pair_operand with memory_operand and delete operand swapping
11009         code.
11010         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11011         Add check for legitimate_address.
11012         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11013         (aarch64_swap_ldrstr_operands): New.
11014         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11015         Define prototype.
11017 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
11018             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11020         * config/aarch64/aarch64.md: New patterns to generate stp
11021         and ldp.
11022         (store_pair_sw, store_pair_dw): New patterns to generate stp for
11023         single words and double words.
11024         (load_pair_sw, load_pair_dw): Likewise.
11025         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11026         Delete.
11027         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11028         Delete.
11029         * config/aarch64/aarch64-ldpstp.md: Modify peephole
11030         for different mode ldpstp and add peephole for merged zero stores.
11031         Likewise for loads.
11032         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11033         Add size check.
11034         (aarch64_gen_store_pair): Rename calls to match new patterns.
11035         (aarch64_gen_load_pair): Rename calls to match new patterns.
11036         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11037         (load_pair<DREG:mode><DREG2:mode>): ... This.
11038         (store_pair<mode>): Rename to...
11039         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11040         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11041         New mode iterators.
11042         (V_INT_EQUIV): Handle SImode.
11043         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11044         New predicate.
11046 2018-05-22  Martin Sebor  <msebor@redhat.com>
11048         PR c/85623
11049         * calls.c (maybe_warn_nonstring_arg): Use string length to set
11050         or ajust the presumed bound on an operation to avoid unnecessary
11051         warnings.
11053 2018-05-22  Martin Sebor  <msebor@redhat.com>
11055         PR tree-optimization/85826
11056         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11057         assuming that a DECL necesarily has a constant size.
11059 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
11061         PR middle-end/85862
11062         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11064 2018-05-22  Richard Biener  <rguenther@suse.de>
11066         PR tree-optimization/85834
11067         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11068         non-constant and non-zero memset arguments.
11070 2018-05-22  Martin Liska  <mliska@suse.cz>
11072         PR ipa/85607
11073         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11075 2018-05-22  Richard Biener  <rguenther@suse.de>
11077         PR tree-optimization/85863
11078         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11079         comparisons when vectype is specified.
11080         (vectorizable_condition): Do not specify vectype for
11081         vect_is_simple_cond when SLP vectorizing.
11083 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
11085         PR target/85657
11086         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11087         define __ibm128 as long double.
11088         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11089         as a distinct type when IEEE 128-bit support is enabled.
11090         (init_float128_ieee): Fix up conversions between IFmode and IEEE
11091         128-bit types to use the correct functions.
11092         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11093         convert between 128-bit floating point types that have different
11094         modes but the same representation, instead of using gen_lowpart to
11095         makean alias.
11096         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11097         KFmode.
11098         (IFKF_reg): New attributes to give the register constraints for
11099         IFmode and KFmode.
11100         (extend<mode>tf2_internal): New insns to mark an explicit
11101         conversion between 128-bit floating point types that have a
11102         different mode but share the same representation.
11104 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
11106         PR tree-optimization/85814
11107         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11108         a null return from get_strinfo when unsharing the next
11109         strinfo in the chain.
11111 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
11113         PR gcc/84923
11114         * varasm.c (weak_finish): Clean up weak_decls.
11116 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11118         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11119         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11120         UNSPEC_UADALP values.
11121         * config/aarch64/iterators.md (ABAL): New int iterator.
11122         (ABDL2): Likewise.
11123         (ADALP): Likewise.
11124         (sur): Add mappings for the above.
11125         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11126         New define_insn.
11127         (aarch64_<sur>abal<mode>_4): Likewise.
11128         (aarch64_<sur>adalp<mode>_3): Likewise.
11129         (<sur>sadv16qi): New define_expand.
11131 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
11133         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11134         (*movdf_internal): Ditto.
11135         (*rcpsf2_sse): Ditto.
11136         (*rsqrtsf2_sse): Ditto.
11137         (*sqrt<mode>2_sse): Ditto.
11139 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
11141         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11142         eor3q<mode>4.
11143         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11144         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11145         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11146         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11147         vbcaxq_s64): New.
11148         * config/aarch64/arm_neon.h: Likewise.
11149         * config/aarch64/iterators.md (VQ_I): New.
11151 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
11153         * config.gcc: Add arc/t-multilib-linux to tmake_file for
11154         arc*-*-linux*.
11155         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11156         MULTILIB_DIRNAMES
11158 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
11160         * config/nds32/constraints.md (S): New constraint.
11161         * config/nds32/nds32.md (call_internal): Use constraint S.
11162         (call_value_internal): Likewise.
11163         (sibcall_internal): Likewise.
11164         (sibcall_value_internal): Likewise.
11166 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
11167             Chung-Ju Wu  <jasonwucj@gmail.com>
11169         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11170         into consideration.
11172 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
11173             Chung-Ju Wu  <jasonwucj@gmail.com>
11175         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11176         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11177         (nds32_rtx_costs_impl): Simplify.
11178         (nds32_address_cost_impl): Simplify.
11179         (nds32_init_rtx_costs): New function.
11180         (nds32_rtx_costs_speed_prefer): Likewise.
11181         (nds32_rtx_costs_size_prefer): Likewise.
11182         (nds32_address_cost_speed_prefer): Likewise.
11183         (nds32_address_cost_speed_fwprop): Likewise.
11184         (nds32_address_cost_size_prefer): Likewise.
11185         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11186         * config/nds32/nds32.c (nds32_option_override): Use
11187         nds32_init_rtx_costs function.
11189 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
11191         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11192         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11193         (TARGET_PIPELINE_N8): Likewise.
11194         (TARGET_PIPELINE_N10): Likewise.
11195         (TARGET_PIPELINE_N13): Likewise.
11196         (TARGET_PIPELINE_GRAYWOLF): Likewise.
11198 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
11200         * config/nds32/nds32-fpu.md: Update copyright year.
11202 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11204         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11206 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11208         * config/nds32/nds32.c
11209         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11210         * config/nds32/nds32.opt (minline-asm-r15): New option.
11212 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11214         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11215         MASK_HW_ABS.
11216         * config/nds32/nds32.md (abssi2): New pattern.
11218 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
11220         * config/i386/i386.md (rex64namesuffix): New mode attribute.
11221         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11222         Merge insn pattern from sse_cvtsi2ss<round_name> and
11223         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11224         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11225         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11226         using SWI48 mode iterator.
11227         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11228         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11229         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11230         pattern from sse_cvttss2si<round_saeonly_name>
11231         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11232         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11233         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11234         using SWI48 mode iterator.
11235         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11236         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11237         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11238         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11239         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11240         using SWI48 mode iterator.
11241         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11242         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11243         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11244         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11245         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11246         SWI48 mode iterator.
11247         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11248         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11249         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11250         pattern from sse_cvttsd2si<round_saeonly_name>
11251         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11253 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11255         * config/nds32/nds32-md-auxiliary.c
11256         (nds32_valid_smw_lwm_base_p): Refine.
11257         (nds32_output_smw_single_word): Refine.
11258         (nds32_output_smw_double_word): New.
11259         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11261 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11263         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11264         (nds32_output_stack_pop): Refine.
11265         (nds32_expand_unaligned_load): Refine.
11266         (nds32_expand_unaligned_store): Refine.
11268 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
11269             Chung-Ju Wu  <jasonwucj@gmail.com>
11271         * config/nds32/constants.md: Add TP_REGNUM constant.
11272         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11273         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11274         UNSPEC_ADD32.
11275         * config/nds32/nds32-doubleword.md: Consider flag_pic.
11276         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11277         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11278         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11279         and PIC code generation.
11280         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11281         code generation.
11282         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11283         optimization.
11284         * config/nds32/nds32.md: Support TLS and PIC.
11285         * config/nds32/nds32.c: Support TLS and PIC.
11286         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11287         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11288         predicate.
11290 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11292         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11293         mode with E_ prefix.
11295 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
11296             Chung-Ju Wu  <jasonwucj@gmail.com>
11298         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11299         * config/nds32/nds32-md-auxiliary.c
11300         (symbolic_reference_mentioned_p): New.
11301         (nds32_legitimize_ict_address): New.
11302         (nds32_expand_ict_move): New.
11303         (nds32_indirect_call_referenced_p): New.
11304         (nds32_symbol_binds_local_p): Delete.
11305         (nds32_long_call_p): Modify.
11306         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11307         * config/nds32/nds32-protos.h
11308         (symbolic_reference_mentioned_p): Declare.
11309         (nds32_legitimize_ict_address): Declare.
11310         (nds32_expand_ict_move): Declare.
11311         (nds32_indirect_call_referenced_p): Declare.
11312         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11313         (nds32_relax_group): Use nds32_ict_const_p as condition.
11314         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11315         (nds32_asm_file_start): Output ict_model directive in asm code.
11316         (nds32_legitimate_address_p): Consider indirect call.
11317         (nds32_print_operand): Consider indirect call.
11318         (nds32_print_operand_address): Consider indirect call.
11319         (nds32_insert_attributes): Handle "indirect_call" attribute.
11320         (TARGET_LEGITIMATE_ADDRESS_P): Define.
11321         (TARGET_LEGITIMATE_CONSTANT_P): Define.
11322         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11323         (TARGET_DELEGITIMIZE_ADDRESS): Define.
11324         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11325         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11326         (TARGET_ICT_MODEL_SMALL): Define.
11327         (TARGET_ICT_MODEL_LARGE): Define.
11328         * config/nds32/nds32.md (movsi): Consider ict model.
11329         (call, call_value): Consider ict model.
11330         (sibcall, sibcall_value): Consider ict model.
11331         * config/nds32/nds32.opt (mict-model): New option.
11332         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11333         model.
11335 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
11336             Monk Chiang  <sh.chiang04@gmail.com>
11337             Jim Wilson <jimw@sifive.com>
11339         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11340         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
11341         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11342         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11343         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
11344         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11345         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11346         compute save_libcall_adjustment properly.
11347         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11348         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11349         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11350         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11351         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11352         (ABI_SPEC): Handle mabi=ilp32e.
11353         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11354         (RVE): Add RVE mask.
11355         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11356         <-march>: Add rv32e as an example.
11358 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
11360         PR c++/82899
11361         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11362         (intra_create_variable_infos): Handle C++ constructors.
11364 2018-05-18  Martin Liska  <mliska@suse.cz>
11366         * passes.def: Remove a redundant pass.
11368 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
11370         PR bootstrap/85838
11371         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11373 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11375         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11376         (ARMv4): Update.
11377         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11378         (ARMv6m): Update.
11379         (armv2, armv2a, armv3, armv3m): Delete architectures.
11380         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11381         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11382         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11383         Delete cpus.
11384         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11385         (*mulsidi3adddi): Likewise.
11386         (mulsidi3): Likewise.
11387         (*mulsidi3_nov6): Likewise.
11388         (umulsidi3): Likewise.
11389         (umulsidi3_nov6): Likewise.
11390         (umaddsidi4): Likewise.
11391         (*umulsidi3adddi): Likewise.
11392         (smulsi3_highpart): Likewise.
11393         (*smulsi3_highpart_nov6): Likewise.
11394         (umulsi3_highpart): Likewise.
11395         (*umulsi3_highpart_nov6): Likewise.
11396         * config/arm/arm.h (arm_arch3m): Delete.
11397         * config/arm/arm.c (arm_arch3m): Delete.
11398         (arm_option_override_internal): Update armv3-related comment.
11399         (arm_configure_build_target): Delete use of isa_bit_mode32.
11400         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
11401         (arm_rtx_costs_internal): Delete check of arm_arch3m.
11402         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
11403         (mulsa3): Likewise.
11404         (mulusa3): Likewise.
11405         * config/arm/arm-protos.h (arm_arch3m): Delete.
11406         * config/arm/arm-tables.opt: Regenerate.
11407         * config/arm/arm-tune.md: Likewise.
11408         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
11409         deleted architectures.
11411 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11413         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
11414         (armv5t, armv5te): New features.
11415         (ARMv5, ARMv5e): Delete fgroups.
11416         (ARMv5t, ARMv5te): Adjust for above changes.
11417         (ARMv6m): Likewise.
11418         (armv5, armv5e): Delete arches.
11419         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
11420         arm_arch5.
11421         (*call_reg_arm): Likewise.
11422         (*call_value_reg_armv5): Likewise.
11423         (*call_value_reg_arm): Likewise.
11424         (*call_symbol): Likewise.
11425         (*call_value_symbol): Likewise.
11426         (*sibcall_insn): Likewise.
11427         (*sibcall_value_insn): Likewise.
11428         (clzsi2): Likewise.
11429         (prefetch): Likewise.
11430         (define_split and define_peephole2 dependent on arm_arch5):
11431         Likewise.
11432         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
11433         arm_arch5e.
11434         (TARGET_ARM_QBIT): Likewise.
11435         (TARGET_DSP_MULTIPLY): Likewise.
11436         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
11437         (arm_arch5, arm_arch5e): Delete.
11438         (arm_arch5t, arm_arch5te): Declare.
11439         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
11440         (arm_arch5t): Declare.
11441         (arm_option_reconfigure_globals): Update for the above.
11442         (arm_options_perform_arch_sanity_checks): Update comment, replace
11443         use of arm_arch5 with arm_arch5t.
11444         (use_return_insn): Likewise.
11445         (arm_emit_call_insn): Likewise.
11446         (output_return_instruction): Likewise.
11447         (arm_final_prescan_insn): Likewise.
11448         (arm_coproc_builtin_available): Likewise.
11449         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
11450         arm_arch5e with arm_arch5t and arm_arch5te.
11451         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
11452         (arm_arch5t, arm_arch5te): Declare.
11453         * config/arm/arm-tables.opt: Regenerate.
11454         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
11455         * config/arm/t-multilib: Likewise.
11456         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
11457         instead of arm_arch5.
11458         (*call_reg_thumb1): Likewise.
11459         (*call_value_reg_thumb1_v5): Likewise.
11460         (*call_value_reg_thumb1): Likewise.
11461         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
11462         unreachable path.
11463         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
11465 2018-05-18  Martin Liska  <mliska@suse.cz>
11467         PR gcov-profile/84846
11468         * doc/gcov.texi: Document -t option of gcov tool.
11470 2018-05-18  Martin Liska  <mliska@suse.cz>
11472         PR gcov-profile/84846
11473         * gcov.c (print_usage): Add new -t option.
11474         (process_args): Handle the option.
11475         (generate_results): Use stdout as output when requested by
11476         the option.
11478 2018-05-18  Martin Liska  <mliska@suse.cz>
11480         PR gcov-profile/84846
11481         * coverage.c (coverage_init): Write PWD to .gcno file.
11482         * doc/gcov.texi: Document how working directory is printed.
11483         * gcov-dump.c (dump_gcov_file): Print PWD.
11484         * gcov.c (output_intermediate_file): Likewise.
11485         (read_graph_file): Read PWD string.
11486         (output_lines): Print PWD.
11488 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11490         PR middle-end/85817
11491         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
11492         for retval and return false if all args to phi are zero.
11494 2018-05-18  Richard Biener  <rguenther@suse.de>
11496         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
11497         method.
11498         (evrp_dom_walker::before_dom_children): Call it.
11500 2018-05-18  Richard Biener  <rguenther@suse.de>
11502         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
11503         results when processing array refs with variable index.
11505 2018-05-18  Toon Moene  <toon@moene.org>
11507         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
11508         directly after that of -floop-interchange. Indicate that both
11509         options are enabled by default when specifying -O3.
11511 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11513         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
11514         iterator.  Delete separate integer-mode vec_set<mode> expander.
11515         (aarch64_simd_vec_setv2di): Delete.
11516         (vec_setv2di): Delete.
11517         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
11518         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
11519         the "w, r" alternative.
11521 2018-05-18  Martin Liska  <mliska@suse.cz>
11523         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
11524         * tree-pass.h (make_pass_lower_switch_O0): New function.
11525         * tree-switch-conversion.c (node_has_low_bound): Remove.
11526         (node_has_high_bound): Likewise.
11527         (node_is_bounded): Likewise.
11528         (class pass_lower_switch): Make it a template type and create
11529         two instances.
11530         (pass_lower_switch::execute): Add template argument.
11531         (make_pass_lower_switch): New function.
11532         (make_pass_lower_switch_O0): New function.
11533         (do_jump_if_equal): Remove.
11534         (emit_case_nodes): Simplify to just handle all 3 cases and leave
11535         all the hard work to tree optimization passes.
11537 2018-05-18  Martin Liska  <mliska@suse.cz>
11539         * dbgcnt.c (limit_low): Renamed from limit.
11540         (limit_high): New variable.
11541         (dbg_cnt_is_enabled): Check for upper limit.
11542         (dbg_cnt): Adjust dumping.
11543         (dbg_cnt_set_limit_by_index): Add new argument for high
11544         value.
11545         (dbg_cnt_set_limit_by_name): Likewise.
11546         (dbg_cnt_process_single_pair): Parse new format.
11547         (dbg_cnt_process_opt): Use strtok.
11548         (dbg_cnt_list_all_counters): Remove 'value' and add
11549         'limit_high'.
11550         * doc/invoke.texi: Document changes.
11552 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
11554         * doc/sourcebuild.texi (scalar_all_fma): Document.
11555         * tree.def (FMA_EXPR): Delete.
11556         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
11557         * internal-fn.c (ternary_direct): New macro.
11558         (expand_ternary_optab_fn): Likewise.
11559         (direct_ternary_optab_supported_p): Likewise.
11560         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
11561         * builtins.c (fold_builtin_fma): Delete.
11562         (fold_builtin_3): Don't call it.
11563         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
11564         * expr.c (expand_expr_real_2): Likewise.
11565         * fold-const.c (operand_equal_p): Likewise.
11566         (fold_ternary_loc): Likewise.
11567         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
11568         * gimple.c (DEFTREECODE): Likewise.
11569         * gimplify.c (gimplify_expr): Likewise.
11570         * optabs-tree.c (optab_for_tree_code): Likewise.
11571         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
11572         * tree-eh.c (operation_could_trap_p): Likewise.
11573         (stmt_could_throw_1_p): Likewise.
11574         * tree-inline.c (estimate_operator_cost): Likewise.
11575         * tree-pretty-print.c (dump_generic_node): Likewise.
11576         (op_code_prio): Likewise.
11577         * tree-ssa-loop-im.c (stmt_cost): Likewise.
11578         * tree-ssa-operands.c (get_expr_operands): Likewise.
11579         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
11580         * fold-const-call.h (fold_fma): Delete.
11581         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
11582         CFN_FNMA and CFN_FNMS.
11583         (fold_fma): Delete.
11584         * genmatch.c (combined_fn): New enum.
11585         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
11586         (commutative_op): New function.
11587         (commutate): Use it.  Handle more than 2 operands.
11588         (dt_operand::gen_gimple_expr): Use commutative_op.
11589         (parser::parse_expr): Allow :c to be used with non-binary
11590         operators if the commutative operand is known.
11591         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
11592         CFN_FMS, CFN_FNMA and CFN_FNMS.
11593         (backprop::process_assign_use): Remove FMA_EXPR handling.
11594         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
11595         (gen_hsa_fma): New function.
11596         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
11597         IFN_FNMA and IFN_FNMS.
11598         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
11599         * gimple-fold.h (follow_all_ssa_edges): Declare.
11600         * gimple-fold.c (follow_all_ssa_edges): New function.
11601         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
11602         gimple_build interface and use follow_all_ssa_edges to fold the result.
11603         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
11604         instead of checking for optabs directly.
11605         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
11606         rather than FMA_EXPRs.
11607         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
11608         call to IFN_FMA instead of an FMA_EXPR.
11610 2018-05-17  Jim Wilson  <jimw@sifive.com>
11612         * expr.c (do_tablejump): When converting index to Pmode, if we have a
11613         sign extended promoted subreg, and the range does not have the sign bit
11614         set, then do a sign extend.
11616         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
11617         test, check for sign extended subreg and/or constant operands, and
11618         do a sign extend in that case.
11620 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
11622         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
11623         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
11624         Add untyped.
11625         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
11626         Change logics_shift_reg to logics_shift_imm.
11627         (thunderx2t99_fp_loadpair_basic): Delete.
11628         (thunderx2t99_fp_storepair_basic): Delete.
11629         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
11630         (thunderx2t99_asimd_polynomial): Delete.
11631         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
11632         and neon_fp_mul_d_scalar_q.
11633         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
11634         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
11635         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
11636         (thunderx2t99_asimd_lut): Add missing tbl types.
11637         (thunderx2t99_asimd_ext): Delete.
11638         (thunderx2t99_asimd_load1_1_mult): Delete.
11639         (thunderx2t99_asimd_load1_2_mult): Delete.
11640         (thunderx2t99_asimd_load1_ldp): New.
11641         (thunderx2t99_asimd_load1): New.
11642         (thunderx2t99_asimd_load2): Add missing *load2* types.
11643         (thunderx2t99_asimd_load3): New.
11644         (thunderx2t99_asimd_load4): New.
11645         (thunderx2t99_asimd_store1_1_mult): Delete.
11646         (thunderx2t99_asimd_store1_2_mult): Delete.
11647         (thunderx2t99_asimd_store2_mult): Delete.
11648         (thunderx2t99_asimd_store2_onelane): Delete.
11649         (thunderx2t99_asimd_store_stp): New.
11650         (thunderx2t99_asimd_store1): New.
11651         (thunderx2t99_asimd_store2): New.
11652         (thunderx2t99_asimd_store3): New.
11653         (thunderx2t99_asimd_store4): New.
11655 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
11657         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
11658         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
11660 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
11661             Segher Boessenkool  <segher@kernel.crashing.org>
11663         PR target/85698
11664         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
11665         operand.
11667 2018-05-17  Richard Biener  <rguenther@suse.de>
11669         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
11670         for pruning loop and prune defs feeding only already visited PHIs.
11672 2018-05-17  Richard Biener  <rguenther@suse.de>
11674         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
11676 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
11677             Richard Biener  <rguenther@suse.de>
11679         PR tree-optimization/85793
11680         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
11681         for VMAT_ELEMENTWISE.
11683 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
11685         * internal-fn.h (lookup_internal_fn): Declare
11686         * internal-fn.c (lookup_internal_fn): New function.
11687         * gimple.c (gimple_build_call_from_tree): Handle calls to
11688         internal functions.
11689         * gimple-pretty-print.c (dump_gimple_call): Print "." before
11690         internal function names.
11691         * tree-pretty-print.c (dump_generic_node): Likewise.
11692         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
11694 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
11696         * gimple-fold.h (gimple_build): Make the function forms take
11697         combined_fn rather than built_in_function.
11698         (gimple_simplify): Likewise.
11699         * gimple-match-head.c (gimple_simplify): Likewise.
11700         * gimple-fold.c (gimple_build): Likewise.
11701         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
11702         rather than gimple_build_call_internal.
11703         (get_initial_defs_for_reduction): Likewise.
11704         (vect_create_epilog_for_reduction): Likewise.
11705         (vectorizable_live_operation): Likewise.
11707 2018-05-17  Martin Liska  <mliska@suse.cz>
11709         * gimple-ssa-sprintf.c (format_directive): Do not use
11710         space in between 'G_' and '('.
11712 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
11714         PR target/85323
11715         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
11716         even if the mask is not all ones.
11718         PR target/85323
11719         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
11720         vector.
11721         (ix86_gimple_fold_builtin): Likewise.
11723         PR target/85323
11724         * config/i386/i386.c: Include tree-vector-builder.h.
11725         (ix86_vector_shift_count): New function.
11726         (ix86_fold_builtin): Fold shift builtins by scalar count.
11727         (ix86_gimple_fold_builtin): Likewise.
11729         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
11730         _mm512_setzero): New intrinsics.
11732 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
11733             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11735         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
11736         code generation for cases where splatting a value is not useful.
11737         * simplify-rtx.c (simplify_ternary_operation): Simplify
11738         vec_merge across a vec_duplicate and a paradoxical subreg forming
11739         a vector mode to a vec_concat.
11741 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
11743         * config.gcc: Support "goldmont-plus".
11744         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11745         "goldmont-plus".
11746         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11747         PROCESSOR_GOLDMONT_PLUS.
11748         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
11749         (processor_target_table): Add "goldmont-plus".
11750         (PTA_GOLDMONT_PLUS): Define.
11751         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
11752         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
11753         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
11754         (fold_builtin_cpu): Add "goldmont-plus".
11755         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
11756         (ix86_option_override_internal): Add "goldmont-plus".
11757         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
11758         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
11759         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
11760         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
11762 2018-05-17  Richard Biener  <rguenther@suse.de>
11764         PR tree-optimization/85757
11765         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
11766         remove defs that only feed that PHI from further processing.
11768 2018-05-16  Jim Wilson  <jimw@sifive.com>
11770         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
11771         asterisk to name.
11772         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
11774 2018-05-16  Mark Wielaard  <mark@klomp.org>
11776         * dwarf2out.c (count_index_strings): New function.
11777         (output_indirect_strings): Call count_index_strings and generate
11778         header for dwarf_version >= 5.
11780 2018-05-16  Mark Wielaard  <mark@klomp.org>
11782         * dwarf2out.c (dwarf_FORM): New function.
11783         (set_indirect_string): Use dwarf_FORM.
11784         (reset_indirect_string): Likewise.
11785         (size_of_die): Likewise.
11786         (value_format): Likewise.
11787         (output_die): Likewise.
11788         (add_skeleton_AT_string): Likewise.
11789         (output_macinfo_op): Likewise.
11790         (index_string): Likewise.
11791         (output_index_string_offset): Likewise.
11792         (output_index_string): Likewise.
11793         (count_index_strings): Likewise.
11795 2018-05-16  Carl Love  <cel@us.ibm.com>
11797         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11798         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
11800 2018-05-16  Martin Jambor  <mjambor@suse.cz>
11802         * ipa-prop.c (ipa_free_all_edge_args): Remove.
11803         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
11805 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
11807         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
11808         (fnma<mode>4): Likewise.
11809         (fms<mode>4): Likewise.
11810         (fnms<mode>4): Likewise.
11811         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
11812         (aarch64_fnma<mode>4): Likewise.
11813         (aarch64_fms<mode>4): Likewise.
11814         (aarch64_fnms<mode>4): Likewise.
11815         (aarch64_fnmadd<mode>4): Likewise.
11817 2018-05-16  Jason Merrill  <jason@redhat.com>
11819         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
11821 2018-05-16  Richard Biener  <rguenther@suse.de>
11823         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
11824         (dump_stmt_cost): Declare.
11825         (add_stmt_cost): Dump cost we add.
11826         (add_stmt_costs): New function.
11827         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
11828         No longer exported.
11829         (vect_analyze_stmt): Adjust prototype.
11830         (vectorizable_condition): Likewise.
11831         (vectorizable_live_operation): Likewise.
11832         (vectorizable_reduction): Likewise.
11833         (vectorizable_induction): Likewise.
11834         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
11835         cost vector to pass to vectorizable_ and record afterwards.
11836         (vect_model_reduction_cost): Take cost vector argument and adjust.
11837         (vect_model_induction_cost): Likewise.
11838         (vectorizable_reduction): Likewise.
11839         (vectorizable_induction): Likewise.
11840         (vectorizable_live_operation): Likewise.
11841         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
11842         SLP_TREE_NUMBER_OF_VEC_STMTS.
11843         (vect_analyze_slp_cost_1): Remove.
11844         (vect_analyze_slp_cost): Likewise.
11845         (vect_slp_analyze_node_operations): Take visited args and
11846         a target cost vector.  Avoid processing already visited stmt sets.
11847         (vect_slp_analyze_operations): Use a local cost vector to gather
11848         costs and register those of non-discarded instances.
11849         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
11850         (vect_schedule_slp_instance): Remove copying of
11851         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
11852         zero.
11853         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
11854         adding cost.  Record cost entry location.
11855         (vect_prologue_cost_for_slp_op): Function to compute cost of
11856         a constant or invariant generated for SLP vect in the prologue,
11857         split out from vect_analyze_slp_cost_1.
11858         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
11859         (vect_model_promotion_demotion_cost): Likewise.
11860         (vect_model_store_cost): Likewise, make static.
11861         (vect_model_load_cost): Likewise.
11862         (vectorizable_bswap): Add cost vector arg and adjust.
11863         (vectorizable_call): Likewise.
11864         (vectorizable_simd_clone_call): Likewise.
11865         (vectorizable_conversion): Likewise.
11866         (vectorizable_assignment): Likewise.
11867         (vectorizable_shift): Likewise.
11868         (vectorizable_operation): Likewise.
11869         (vectorizable_store): Likewise.
11870         (vectorizable_load): Likewise.
11871         (vectorizable_condition): Likewise.
11872         (vectorizable_comparison): Likewise.
11873         (can_vectorize_live_stmts): Likewise.
11874         (vect_analyze_stmt): Likewise.
11875         (vect_transform_stmt): Adjust calls to vectorizable_*.
11876         * tree-vectorizer.c: Include gimple-pretty-print.h.
11877         (dump_stmt_cost): New function.
11879 2018-05-16  Richard Biener  <rguenther@suse.de>
11881         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
11882         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
11883         * tree-ssa-dse.c: Include tree-ssa-loop.h.
11884         (check_name): New callback.
11885         (dse_classify_store): Track cycles via a visited bitmap of PHI
11886         defs and simplify handling of in-loop and across loop dead stores
11887         and properly fail for loop-variant refs.  Handle byte-tracking with
11888         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
11889         limiting the walk.
11891 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
11893         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
11894         (vect_get_mask_type_for_stmt): Likewise.
11895         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
11896         split out from...
11897         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
11898         to determine the statement's vector type and the vector type that
11899         should be used for calculating nunits.  Deal with cases in which
11900         the type has to be deferred.
11901         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
11902         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
11903         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
11904         (vect_determine_vf_for_stmt): New functions, split out from...
11905         (vect_determine_vectorization_factor): ...here.
11906         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
11907         (vect_get_mask_type_for_stmt): New functions, split out from
11908         vect_determine_vectorization_factor.
11910 2018-05-16  Richard Biener  <rguenther@suse.de>
11912         * tree-cfg.c (verify_gimple_assign_ternary): Properly
11913         verify the [VEC_]COND_EXPR embedded comparison.
11915 2018-05-15  Martin Sebor  <msebor@redhat.com>
11917         PR tree-optimization/85753
11918         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
11919         RECORD_TYPE in addition to ARRAY_TYPE.
11921 2018-05-15  Martin Sebor  <msebor@redhat.com>
11923         PR middle-end/85643
11924         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
11926 2018-05-15  Richard Biener  <rguenther@suse.de>
11928         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
11929         add by_clobber_p one.  Change algorithm to collect all defs
11930         representing uses we need to walk and try reducing them to
11931         a single one before failing.
11932         (dse_dom_walker::dse_optimize_stmt): Adjust.
11934 2018-05-13  Mark Wielaard  <mark@klomp.org>
11936         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
11937         (size_of_loc_descr): Likewise.
11938         (output_loc_operands): Likewise.
11939         (output_loc_operands_raw): Likewise.
11940         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
11941         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
11942         (hash_loc_operands): Likewise.
11943         (compare_loc_operands): Likewise.
11945 2018-05-14  Mark Wielaard  <mark@klomp.org>
11947         * dwarf2out.c (count_index_addrs): New function.
11948         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
11950 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11952         PR tree-optimization/83648
11953         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
11954         return value as malloc candidate.
11956 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11958         PR ipa/85734
11959         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
11960         param as true in call to suggest_attribute.
11962 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
11964         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
11965         -mreadonly-in-sdata.
11967 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11969         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
11970         New pattern.
11971         (aarch64_crypto_aesd_fused): Likewise.
11973 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
11975         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
11976         (movsi_aarch64): Likewise.
11977         (load_pairsi): Likewise.
11978         (load_pairdi): Likewise.
11979         (store_pairsi): Likewise.
11980         (store_pairdi): Likewise.
11981         (load_pairsf): Likewise.
11982         (load_pairdf): Likewise.
11983         (store_pairsf): Likewise.
11984         (store_pairdf): Likewise.
11985         (zero_extend): Likewise.
11986         (trunc): Swap alternatives.
11987         (fcvt_target): Add '?' to prefer w over r.
11989 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
11991         PR target/85756
11992         * config/i386/i386.md: Disallow non-commutative arithmetics in
11993         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
11994         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
11995         in the peephole2 before it.
11997 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
11999         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12000         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12001         (ix86_handle_option): Handle -mcldemote.
12002         * config.gcc: New header.
12003         * config/i386/cldemoteintrin.h: New file.
12004         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12005         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12006         -mcldemote.
12007         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12008         OPTION_MASK_ISA_CLDEMOTE.
12009         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12010         (ix86_valid_target_attribute_inner_p): Ditto.
12011         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12012         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12013         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12014         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12015         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12016         (cldemote): New.
12017         * config/i386/i386.opt: Add -mcldemote.
12018         * config/i386/x86intrin.h: New header.
12019         * doc/invoke.texi: Add -mcldemote.
12021 2018-05-14  Richard Biener  <rguenther@suse.de>
12023         * doc/match-and-simplify.texi: Adjust :s documentation.
12025 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
12027         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12028         intended memcpy size.
12029         (REORDER_45): Likewise.
12031 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
12033         * sort.cc: New file.
12034         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12035         * vec.c (qsort_chk): Use gcc_qsort.
12036         * Makefile.in (OBJS-libcommon): Add sort.o.
12037         (build/sort.o): New target.  Use it...
12038         (BUILD_RTL): ... here, and...
12039         (build/gencfn-macros): ... here, and...
12040         (build/genmatch): ... here.
12042 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12043             Chung-Ju Wu  <jasonwucj@gmail.com>
12045         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12046         * config/nds32/nds32-graywolf.md: New file.
12047         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12048         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12049         pipeline.
12050         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12051         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12052         * config/nds32/nds32.md (pipeline_model): Add graywolf.
12053         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12054         * config/nds32/pipelines.md: Include n15 settings.
12056 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12057             Chung-Ju Wu  <jasonwucj@gmail.com>
12059         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12060         * config/nds32/nds32-n13.md: New file.
12061         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12062         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12063         pipeline.
12064         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12065         * config/nds32/nds32.md (pipeline_model): Add n13.
12066         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12067         * config/nds32/pipelines.md: Include n13 settings.
12069 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12070             Chung-Ju Wu  <jasonwucj@gmail.com>
12072         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12073         * config/nds32/nds32-n10.md: New file.
12074         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12075         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12076         pipeline.
12077         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12078         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12079         * config/nds32/nds32.md (pipeline_model): Add n10.
12080         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12081         * config/nds32/pipelines.md: Include n10 settings.
12083 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
12084             Kito Cheng  <kito.cheng@gmail.com>
12085             Chung-Ju Wu  <jasonwucj@gmail.com>
12087         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12088         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12089         Add enum values for DSP extension instructions.
12090         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12091         New constraints.
12092         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12093         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12094         New code iterators.
12095         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12096         * config/nds32/nds32-dspext.md: New file for DSP implementation.
12097         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12098         * config/nds32/nds32-intrinsic.md: Likewise.
12099         * config/nds32/nds32_intrinsic.h: Likewise.
12100         * config/nds32/nds32-md-auxiliary.c: Likewise.
12101         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12102         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12103         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12104         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12105         * config/nds32/nds32-protos.h: New declarations for DSP extension.
12106         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12107         TYPE_DMAC in switch statement.
12108         * config/nds32/nds32.c: New checking and implementation for DSP
12109         extension instructions.
12110         * config/nds32/nds32.h: Likewise.
12111         * config/nds32/nds32.md: Likewise.
12112         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12113         * config/nds32/predicates.md: Implement new predicates for DSP
12114         extension.
12116 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
12118         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12119         Reformat alternatives and attributes so it is easier to identify
12120         which constraints/attributes go with which instruction.
12121         (mov<mode>_hardfloat32, FMOVE64): Likewise.
12122         (mov<mode>_softfloat32, FMOVE64): Likewise.
12123         (mov<mode>_hardfloat64, FMOVE64): Likewise.
12124         (mov<mode>_softfloat64, FMOVE64): Likewise.
12126 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12128         * doc/extend.texi (PowerPC Built-in Functions): Rename this
12129         subsection.
12130         (Basic PowerPC Built-in Functions): The new name of the
12131         subsection previously known as "PowerPC Built-in Functions".
12132         (Basic PowerPC Built-in Functions Available on all Configurations):
12133         New subsubsection.
12134         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12135         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12136         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12137         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12139 2018-05-11  Martin Jambor  <mjambor@suse.cz>
12141         PR ipa/85655
12142         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12143         single const.
12145 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
12147         PR target/85733
12148         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12150 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
12152         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12153         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12154         (ix86_handle_option): Handle -mwaitpkg.
12155         * config.gcc: New header.
12156         * config/i386/cpuid.h (bit_WAITPKG): New bit.
12157         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12158         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12159         function type.
12160         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12161         OPTION_MASK_ISA_WAITPKG.
12162         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12163         (ix86_option_override_internal): Add PTA_WAITPKG.
12164         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12165         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12166         IX86_BUILTIN_TPAUSE.
12167         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12168         __builtin_ia32_umwait and __builtin_ia32_tpause.
12169         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12170         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12171         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12172         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12173         UNSPECV_TPAUSE): New.
12174         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12175         * config/i386/i386.opt: Add -mwaitpkg.
12176         * config/i386/waitpkgintrin.h: New file.
12177         * config/i386/x86intrin.h: New header.
12178         * doc/invoke.texi: Add -mwaitpkg.
12180 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
12182         PR target/85606
12183         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12184         equivalent.
12185         (cortex-m0): Use armv6s-m isa.
12186         (cortex-m0plus): Likewise.
12187         (cortex-m1): Likewise.
12188         (cortex-m0.small-multiply): Likewise.
12189         (cortex-m0plus.small-multiply): Likewise.
12190         (cortex-m1.small-multiply): Likewise.
12192 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
12193             Jakub Jelinek  <jakub@redhat.com>
12195         PR tree-optimization/85692
12196         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12197         source permute as well.
12199 2018-05-11  Martin Liska  <mliska@suse.cz>
12201         PR sanitizer/85556
12202         * doc/extend.texi: Document LLVM style format for no_sanitize
12203         attribute.
12205 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
12207         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12208         mode_supports_vsx_dform_quad to mode_supports_dq_form.
12209         (mode_supports_vsx_dform_quad): Likewise.
12210         (mode_supports_vmx_dform): Move these functions to be next to the
12211         other mode_supports functions.
12212         (mode_supports_dq_form): Likewise.
12213         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12214         mode_supports_dq_form.
12215         (reg_offset_addressing_ok_p): Likewise.
12216         (offsettable_ok_by_alignment): Likewise.
12217         (rs6000_legitimate_offset_address_p): Likewise.
12218         (legitimate_lo_sum_address_p): Likewise.
12219         (rs6000_legitimize_address): Likewise.
12220         (rs6000_legitimize_reload_address): Likewise.
12221         (rs6000_secondary_reload_inner): Likewise.
12222         (rs6000_preferred_reload_class): Likewise.
12223         (rs6000_output_move_128bit): Likewise.
12225 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
12227         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12228         Generate SImode target register for null target.
12229         <case IX86_BUILTIN_XGETBV>: Ditto.
12230         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12231         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12233 2018-05-10  Carl Love  <cel@us.ibm.com>
12235         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12236         dcbtt and dcbtstt if operands[2] is 0.
12238 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
12240         PR target/85693
12241         * config/i386/sse.md (usadv64qi): New expander.
12243 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
12245         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12246         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12247         -maltivec=be support.
12248         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12249         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12250         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12251         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12252         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12253         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12254         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12255         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12256         altivec_vsumsws): Adjust.
12257         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12258         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12259         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12260         support.
12261         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12262         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12263         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12264         (altivec_lve<VI_char>x): Delete expand.
12265         (*altivec_lve<VI_char>x_internal): Rename to...
12266         (altivec_lve<VI_char>x): ... this.
12267         (altivec_lvxl_<mode>): Delete expand.
12268         (*altivec_lvxl_<mode>_internal): Rename to ...
12269         (altivec_lvxl_<mode>): ... this.
12270         (altivec_stvxl_<mode>): Delete expand.
12271         (*altivec_stvxl_<mode>_internal): Rename to ...
12272         (altivec_stvxl_<mode>): ... this.
12273         (altivec_stve<VI_char>x): Delete expand.
12274         (*altivec_stve<VI_char>x_internal): Rename to ...
12275         (altivec_stve<VI_char>x): ... this.
12276         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12277         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12278         reduc_plus_scal_<mode>): Adjust.
12279         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12280         comment.
12281         (rs6000_cpu_cpp_builtins): Adjust.
12282         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12283         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12284         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12285         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12286         -maltivec=be support.
12287         (rs6000_split_vec_extract_var): Adjust.
12288         (rs6000_split_v4si_init): Adjust.
12289         (swap_selector_for_mode): Delete.
12290         (altivec_expand_lvx_be, altivec_expand_stvx_be,
12291         altivec_expand_stvex_be): Delete.
12292         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12293         -maltivec=be support.
12294         (rs6000_gimple_fold_builtin): Ditto.
12295         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12296         Adjust.
12297         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12298         (TARGET_DIRECT_MOVE_64BIT): Adjust.
12299         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12300         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12301         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12302         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12303         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12304         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12305         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12306         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12307         anonymous split): Adjust.
12308         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12309         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12311 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
12313         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12314         when --with-gxx-include-dir is also specified.
12315         * configure: Regenerate.
12317 2018-05-09  Jim Wilson  <jimw@sifive.com>
12319         PR target/84797
12320         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12321         * config/riscv/t-withmultilib: New.
12322         * config/riscv/withmultilib.h: New.
12323         * doc/install.texi: Document RISC-V --with-multilib-list support.
12325 2018-05-09  Richard Biener  <rguenther@suse.de>
12327         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12328         vector.
12329         (vect_bb_vectorization_profitable_p): Adjust.  Compute
12330         actual scalar cost using the cost vector and the add_stmt_cost
12331         machinery.
12333 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
12335         PR rtl-optimization/85645
12336         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12337         in the REG_CFA_REGISTER note for LR, don't leave it empty.
12339 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
12341         PR rtl-optimization/85645
12342         * shrink-wrap.c (spread_components): Return a boolean saying if
12343         anything was changed.
12344         (try_shrink_wrapping_separate): Iterate spread_components until
12345         nothing changes anymore.
12347 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
12349         PR rtl-optimization/85645
12350         * regrename.c (build_def_use): Also kill the chains that include the
12351         destination of a REG_CFA_REGISTER note.
12353 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
12355         PR rtl-optimization/85645
12356         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12357         insn that has a REG_CFA_REGISTER note.
12359 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
12361         * cfgexpand.c (expand_clobber): New function.
12362         (expand_gimple_stmt_1): Use it.
12363         * tree-vect-stmts.c (vect_clobber_variable): New function,
12364         split out from...
12365         (vectorizable_simd_clone_call): ...here.
12366         (vectorizable_store): Emit a clobber either side of an
12367         IFN_STORE_LANES sequence.
12368         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12370 2018-05-09  Tom de Vries  <tom@codesourcery.com>
12372         PR target/85626
12373         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12374         (define_insn "trap_if_false"): Add exit after trap.
12376 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
12378         PR rtl-optimization/85638
12379         * bb-reorder.c: Include common/common-target.h.
12380         (create_forwarder_block): New function extracted from...
12381         (fix_up_crossing_landing_pad): ...here.  Rename into...
12382         (dw2_fix_up_crossing_landing_pad): ...this.
12383         (sjlj_fix_up_crossing_landing_pad): New function.
12384         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12385         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12386         from both partitions and exit the loop after one iteration.
12388 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12390         Revert:
12391         * doc/extend.texi (PowerPC Built-in Functions): Rename this
12392         subsection.
12393         (Basic PowerPC Built-in Functions): The new name of the
12394         subsection previously known as "PowerPC Built-in Functions".
12395         (Basic PowerPC Built-in Functions Available on all Configurations):
12396         New subsubsection.
12397         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12398         subsubsection.
12399         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12400         subsubsection.
12401         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12402         subsubsection.
12403         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12404         subsubsection.
12406 2018-05-08  Jim Wilson  <jimw@sifive.com>
12408         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
12409         (LD_EMUL_SUFFIX): New.
12410         (LINK_SPEC): Use it.
12412 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12414         * doc/extend.texi (PowerPC Built-in Functions): Rename this
12415         subsection.
12416         (Basic PowerPC Built-in Functions): The new name of the
12417         subsection previously known as "PowerPC Built-in Functions".
12418         (Basic PowerPC Built-in Functions Available on all Configurations):
12419         New subsubsection.
12420         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12421         subsubsection.
12422         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12423         subsubsection.
12424         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12425         subsubsection.
12426         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12427         subsubsection.
12429 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
12431         PR target/85683
12432         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
12433         after cmpelim optimization.
12435 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
12437         * config.gcc: Support "goldmont".
12438         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
12439         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12440         PROCESSOR_GOLDMONT.
12441         * config/i386/i386.c (m_GOLDMONT): Define.
12442         (processor_target_table): Add "goldmont".
12443         (PTA_GOLDMONT): Define.
12444         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
12445         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
12446         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
12447         (fold_builtin_cpu): Add "goldmont".
12448         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
12449         (ix86_option_override_internal): Add "goldmont".
12450         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
12451         (processor_type): Add PROCESSOR_GOLDMONT.
12452         * config/i386/i386.md: Add CPU "glm".
12453         * config/i386/glm.md: New file.
12454         * config/i386/x86-tune.def: Add m_GOLDMONT.
12455         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
12457 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
12459         PR target/85572
12460         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
12461         E_V4DImode.
12462         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
12463         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
12464         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
12466         PR target/85317
12467         * config/i386/i386.c (ix86_fold_builtin): Handle
12468         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
12470         PR target/85480
12471         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
12472         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
12474 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
12476         PR target/85658
12477         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
12478         (check_arch): Likewise.
12479         (check_fpu): Return the result rather than printing it.
12480         (end arch): Fix operator precedence.
12481         (end cpu): Likewise.
12482         (END): Print the result from check_fpu.
12484 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
12485             Alan Hayward  <alan.hayward@arm.com>
12486             David Sherwood  <david.sherwood@arm.com>
12488         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
12489         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
12490         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
12491         (*fcmuo<mode>_and): New patterns.
12493 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
12495         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
12496         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
12497         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
12498         (cmp_op, sve_imm_con): New code attributes.
12499         (SVE_COND_INT_CMP, imm_con): Delete.
12500         (cmp_op): Remove above unspecs from int attribute.
12501         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
12502         to...
12503         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
12504         comparison-specific unspecs.
12505         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
12506         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
12507         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
12508         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
12509         (*vec_fcm<cmp_op><mode>): Rename to...
12510         (*fcm<cmp_op><mode>): ...this and adjust likewise.
12511         (*vec_fcmuo<mode>): Rename to...
12512         (*fcmuo<mode>): ...this and adjust likewise.
12513         (*pred_fcm<cmp_op><mode>): New pattern.
12514         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
12515         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
12516         functions.
12517         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
12518         and UNORDERED.
12519         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
12520         (aarch64_emit_sve_predicated_cond): New function.
12521         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
12522         (aarch64_emit_unspec_cond_or): Replace with...
12523         (aarch64_emit_sve_or_conds): ...this new function.  Use
12524         aarch64_emit_sve_ptrue_op for the individual comparisons and
12525         aarch64_emit_binop to OR them together.
12526         (aarch64_emit_inverted_unspec_cond): Replace with...
12527         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
12528         aarch64_emit_sve_ptrue_op for the comparison and
12529         aarch64_emit_unop to invert the result.
12530         (aarch64_expand_sve_vec_cmp_float): Update after the above
12531         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
12533 2018-05-07  Nathan Sidwell  <nathan@acm.org>
12535         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
12536         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
12537         (Backwards Compatibility): Likewise.
12539 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12541         PR bootstrap/85681
12542         Revert:
12543         2018-05-07  Luis Machado  <luis.machado@linaro.org>
12545         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12546         <prefetch_dynamic_strides>: New const bool field.
12547         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12548         prefetch_dynamic_strides.
12549         (exynosm1_prefetch_tune): Likewise.
12550         (thunderxt88_prefetch_tune): Likewise.
12551         (thunderx_prefetch_tune): Likewise.
12552         (thunderx2t99_prefetch_tune): Likewise.
12553         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12554         to false.
12555         (aarch64_override_options_internal): Update to set
12556         PARAM_PREFETCH_DYNAMIC_STRIDES.
12557         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12558         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12559         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12560         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12561         prefetch-dynamic-strides setting.
12563         2018-05-07  Luis Machado  <luis.machado@linaro.org>
12565         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12566         <minimum_stride>: New const int field.
12567         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12568         minimum_stride field.
12569         (exynosm1_prefetch_tune): Likewise.
12570         (thunderxt88_prefetch_tune): Likewise.
12571         (thunderx_prefetch_tune): Likewise.
12572         (thunderx2t99_prefetch_tune): Likewise.
12573         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12574         (aarch64_override_options_internal): Update to set
12575         PARAM_PREFETCH_MINIMUM_STRIDE.
12576         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12577         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12578         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12579         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12580         stride is constant and is below the minimum stride threshold.
12582 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12584         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
12585         to 512.
12587 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12589         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12590         <prefetch_dynamic_strides>: New const bool field.
12591         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12592         prefetch_dynamic_strides.
12593         (exynosm1_prefetch_tune): Likewise.
12594         (thunderxt88_prefetch_tune): Likewise.
12595         (thunderx_prefetch_tune): Likewise.
12596         (thunderx2t99_prefetch_tune): Likewise.
12597         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12598         to false.
12599         (aarch64_override_options_internal): Update to set
12600         PARAM_PREFETCH_DYNAMIC_STRIDES.
12601         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12602         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12603         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12604         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12605         prefetch-dynamic-strides setting.
12607 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12609         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12610         <minimum_stride>: New const int field.
12611         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12612         minimum_stride field.
12613         (exynosm1_prefetch_tune): Likewise.
12614         (thunderxt88_prefetch_tune): Likewise.
12615         (thunderx_prefetch_tune): Likewise.
12616         (thunderx2t99_prefetch_tune): Likewise.
12617         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12618         (aarch64_override_options_internal): Update to set
12619         PARAM_PREFETCH_MINIMUM_STRIDE.
12620         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12621         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12622         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12623         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12624         stride is constant and is below the minimum stride threshold.
12626 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
12628         PR c++/85659
12629         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
12630         the type is addressable.  Don't force op into register if it has
12631         BLKmode.
12633 2018-05-05  Roland McGrath  <mcgrathr@google.com>
12635         PR other/77609
12636         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
12637         any section for which we don't know a specific type it should have,
12638         regardless of name.  Previously this was done only for the exact
12639         names ".init_array", ".fini_array", and ".preinit_array".
12640         (default_elf_asm_named_section): Add comment about
12641         relationship with default_section_type_flags and SECTION_NOTYPE.
12642         (get_section): Don't consider it a type conflict if one side has
12643         SECTION_NOTYPE and the other doesn't, as long as neither has the
12644         SECTION_BSS et al used in the default_section_type_flags logic.
12646 2018-05-05  Tom de Vries  <tom@codesourcery.com>
12648         PR target/85653
12649         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
12650         (workaround_barsyncs): New function.
12651         (nvptx_reorg): Use workaround_barsyncs.
12652         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12653         (define_expand "nvptx_membar_cta"): New define_expand.
12654         (define_insn "*nvptx_membar_cta"): New insn.
12656 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
12658         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
12659         To improve optimization opportunities.
12660         * builtin-types.def: The new needed builtin types for the above.
12662 2018-05-04  Richard Biener  <rguenther@suse.de>
12664         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
12665         * gimple-ssa-store-merging.c
12666         (imm_store_chain_info::output_merged_store): Remove redundant create,
12667         release split_store vector contents on failure.
12668         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
12669         scalar stmt vector on cache hit.
12671 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
12673         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
12674         Xilinx FP support.
12675         * config.gcc (powerpc-xilinx-eabi*): Remove.
12676         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
12677         support.
12678         (fusion_addis_mem_combo_load): Ditto.
12679         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
12680         FP support.
12681         (rs6000_cpu_cpp_builtins): Ditto.
12682         * config/rs6000/rs6000-linux.c
12683         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
12684         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
12685         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
12686         support.
12687         (rs6000_setup_reg_addr_masks): Ditto.
12688         (rs6000_init_hard_regno_mode_ok): Ditto.
12689         (rs6000_option_override_internal): Ditto.
12690         (legitimate_lo_sum_address_p): Ditto.
12691         (rs6000_legitimize_address): Ditto.
12692         (rs6000_legitimize_reload_address): Ditto.
12693         (rs6000_legitimate_address_p): Ditto.
12694         (abi_v4_pass_in_fpr): Ditto.
12695         (setup_incoming_varargs): Ditto.
12696         (rs6000_gimplify_va_arg): Ditto.
12697         (rs6000_split_multireg_move): Ditto.
12698         (rs6000_savres_strategy): Ditto.
12699         (rs6000_emit_prologue_components): Ditto.
12700         (rs6000_emit_epilogue_components): Ditto.
12701         (rs6000_emit_prologue): Ditto.
12702         (rs6000_emit_epilogue): Ditto.
12703         (rs6000_elf_file_end): Ditto.
12704         (rs6000_function_value): Ditto.
12705         (rs6000_libcall_value): Ditto.
12706         * config/rs6000/rs6000.h: Ditto.
12707         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
12708         (TARGET_MINMAX): ... this.  New.
12709         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
12710         * config/rs6000/rs6000.md: Remove Xilinx FP support.
12711         (*movsi_internal1_single): Delete.
12712         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
12713         mfpu=, mxilinx-fpu): Delete.
12714         * config/rs6000/singlefp.h: Delete.
12715         * config/rs6000/sysv4.h: Remove Xilinx FP support.
12716         * config/rs6000/t-rs6000: Ditto.
12717         * config/rs6000/t-xilinx: Delete.
12718         * config/rs6000/titan.md: Adjust for fp_type removal.
12719         * config/rs6000/vsx.md: Remove Xilinx FP support.
12720         (VStype_simple): Delete.
12721         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
12722         * config/rs6000/xfpu.h: Delete.
12723         * config/rs6000/xfpu.md: Delete.
12724         * config/rs6000/xilinx.h: Delete.
12725         * config/rs6000/xilinx.opt: Delete.
12726         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
12727         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
12729 2018-05-04  Tom de Vries  <tom@codesourcery.com>
12731         PR libgomp/85639
12732         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
12733         if ignore == 0.
12735 2018-05-04  Richard Biener  <rguenther@suse.de>
12737         PR middle-end/85627
12738         * tree-complex.c (update_complex_assignment): We are always in SSA form.
12739         (expand_complex_div_wide): Likewise.
12740         (expand_complex_operations_1): Likewise.
12741         (expand_complex_libcall): Preserve EH info of the original stmt.
12742         (tree_lower_complex): Handle removed blocks.
12743         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
12744         on complex multiplication and division libcall builtins.
12746 2018-05-04  Richard Biener  <rguenther@suse.de>
12748         PR middle-end/85574
12749         * fold-const.c (negate_expr_p): Restrict negation of operand
12750         zero of a division to when we know that can happen without
12751         overflow.
12752         (fold_negate_expr_1): Likewise.
12754 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
12756         PR libstdc++/85466
12757         * real.h (real_nextafter): Declare.
12758         * real.c (real_nextafter): New function.
12759         * fold-const-call.c (fold_const_nextafter): New function.
12760         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
12761         CASE_CFN_NEXTTOWARD.
12762         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
12763         even when arg1_mode is different from arg0_mode.
12765 2018-05-03  Nathan Sidwell  <nathan@acm.org>
12767         * doc/extend.texi (Deprecated Features): Remove
12768         -ffriend-injection.
12769         (Backwards Compatibility): Likewise.
12770         * doc/invoke.texi (C++ Language Options): Likewise.
12771         (C++ Dialect Options): Likewise.
12773 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
12775         PR target/85530
12776         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
12777         _mm512_mask_mullox_epi64): New intrinsics.
12779 2018-05-03  Tom de Vries  <tom@codesourcery.com>
12781         PR testsuite/85106
12782         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12783         dump files): Add offload-tree.
12785 2018-05-03  Richard Biener  <rguenther@suse.de>
12787         PR tree-optimization/85615
12788         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
12789         to loops not nested in BBs loop father to avoid creating multi-entry
12790         loops.
12792 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12794         PR tree-optimization/70291
12795         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
12796         arguments.  Change return type to tree.  Emit libcall as a new
12797         statement rather than replacing existing one when inplace_p is true.
12798         (expand_complex_multiplication_components): New function.
12799         (expand_complex_multiplication): Expand floating-point complex
12800         multiplication using the above.
12801         (expand_complex_division): Rename inner_type parameter to type.
12802         Update expand_complex_libcall call-site.
12803         (expand_complex_operations_1): Update expand_complex_multiplication
12804         and expand_complex_division call-sites.
12806 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
12808         PR target/85582
12809         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12810         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12811         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
12812         the highest significant bit of the shift count mask is clear.  In
12813         check whether and[sq]i3 is needed verify that all significant bits
12814         of the shift count other than the highest are set.
12816 2018-05-02  Tom de Vries  <tom@codesourcery.com>
12818         PR libgomp/82428
12819         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
12820         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
12821         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
12822         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
12823         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
12824         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
12825         __builtin_goacc_parlevel_size.
12827 2018-05-02  Richard Biener  <rguenther@suse.de>
12829         PR tree-optimization/85597
12830         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
12831         do not use split vect_get_vec_defs call but call vect_get_slp_defs
12832         directly.
12834 2018-05-02  Tom de Vries  <tom@codesourcery.com>
12836         PR testsuite/85106
12837         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12838         dump files): Add ltrans-tree.
12840 2018-05-02  Tom de Vries  <tom@codesourcery.com>
12842         PR testsuite/85106
12843         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12844         dump files): Add wpa-ipa.
12846 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
12848         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
12849         powerpc*-*-linux*paired* target.
12850         * config/rs6000/750cl.h: Delete.
12851         * config/rs6000/paired.h: Delete.
12852         * config/rs6000/paired.md: Delete.
12853         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
12854         float support.
12855         * config/rs6000/rs6000-builtin.def: Remove paired float support.
12856         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
12857         comment.  Remove paired float support.
12858         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
12859         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
12860         VECTOR_PAIRED.
12861         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
12862         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
12863         declarations.
12864         * config/rs6000/rs6000.c: Remove paired float support.
12865         (paired_expand_vector_init, paired_expand_vector_move,
12866         paired_emit_vector_compare, paired_emit_vector_cond_expr,
12867         (paired_expand_lv_builtin, paired_expand_stv_builtin,
12868         paired_expand_builtin, paired_expand_predicate_builtin,
12869         paired_init_builtins): Delete.
12870         * config/rs6000/rs6000.h: Remove paired float support.
12871         * config/rs6000/rs6000.md: Remove paired float support.
12872         (move_from_CR_ov_bit): Delete.
12873         * config/rs6000/rs6000.opt (mpaired): Delete.
12874         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
12875         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
12877 2018-05-02  Richard Biener  <rguenther@suse.de>
12879         PR middle-end/85567
12880         * gimplify.c (gimplify_save_expr): When in SSA form allow
12881         SAVE_EXPRs to compute to SSA vars.
12883 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
12885         PR target/85582
12886         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12887         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12888         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
12889         clobber operands[2], instead use a new pseudo.  Formatting fixes.
12891 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
12893         PR tree-optimization/85586
12894         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
12895         exit early for statements in the same group if the accesses are
12896         not strided.
12898 2018-05-02  Tom de Vries  <tom@codesourcery.com>
12900         PR lto/85451
12901         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
12902         error message.
12904 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
12906         PR tree-optimization/85143
12907         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
12909 2018-05-01  Tom de Vries  <tom@codesourcery.com>
12911         PR lto/85451
12912         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
12913         not found" error message.
12915 2018-05-01  Tom de Vries  <tom@codesourcery.com>
12917         PR other/83786
12918         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
12919         * vec.c (test_ordered_remove_if): New function.
12920         (vec_c_tests): Call test_ordered_remove_if.
12921         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
12922         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
12923         * tree-vect-patterns.c (vect_pattern_recog_1): Use
12924         VEC_ORDERED_REMOVE_IF.
12926 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12928         PR tree-optimization/82665
12929         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
12930         pointer subtraction where arguments come from a memchr call.
12932 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
12934         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
12935         --push-state --as-needed and --pop-state instead of --as-needed and
12936         --no-as-needed if ld supports it.
12937         * configure: Regenerated.
12939         PR web/85578
12940         * doc/install.texi2html: Replace _002d with - and _002a with * in
12941         generated html files using sed.
12943 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12945         PR c++/85523
12946         * gcc-rich-location.c (blank_line_before_p): New function.
12947         (use_new_line): New function.
12948         (gcc_rich_location::add_fixit_insert_formatted): New function.
12949         * gcc-rich-location.h
12950         (gcc_rich_location::add_fixit_insert_formatted): New function.
12952 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12954         * selftest.c (assert_streq): Rename "expected" and "actual" to
12955         "val1" and "val2".  Extend NULL-handling to cover both inputs
12956         symmetrically, while still requiring both to be non-NULL for a pass.
12957         * selftest.h (assert_streq): Rename "expected" and "actual" to
12958         "val1" and "val2".
12959         (ASSERT_EQ): Likewise.
12960         (ASSERT_EQ_AT): Likewise.
12961         (ASSERT_KNOWN_EQ): Likewise.
12962         (ASSERT_KNOWN_EQ_AT): Likewise.
12963         (ASSERT_NE): Likewise.
12964         (ASSERT_MAYBE_NE): Likewise.
12965         (ASSERT_MAYBE_NE_AT): Likewise.
12966         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
12967         the assertion to pass.
12968         (ASSERT_STREQ_AT): Likewise.
12970 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
12972         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
12973         interaction with -pie.
12975 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12977         * selftest.h: Fix alphabetization of per-source-file selftest
12978         declarations.
12980 2018-04-30  Jason Merrill  <jason@redhat.com>
12982         PR c++/61982 - dead stores to destroyed objects.
12983         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
12984         of clobber.
12986 2018-04-30  Jason Merrill  <jason@redhat.com>
12988         * tree.c (build_clobber): New.
12989         * tree.h: Declare it.
12990         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
12992 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12994         * diagnostic-show-locus.c (layout::layout): Update for
12995         location_get_source_line returning a char_span.
12996         (struct char_span): Move to input.h.
12997         (struct correction): Update for fields in char_span becoming
12998         private.
12999         (struct source_line): Update for location_get_source_line
13000         returning a char_span.
13001         (layout::print_line): Likewise.
13002         * edit-context.c (edited_file::print_content): Likewise.
13003         (edited_file::print_diff_hunk): Likewise.
13004         (edited_file::print_run_of_changed_lines): Likewise.
13005         (edited_file::get_num_lines): Likewise.
13006         (edited_line::edited_line): Likewise.
13007         * final.c (asm_show_source): Likewise.
13008         * input.c (location_get_source_line): Convert return type
13009         from const char * to char_span, losing the final "line_len"
13010         param.
13011         (dump_location_info): Update for the above.
13012         (get_substring_ranges_for_loc): Likewise.  Use a char_span
13013         when handling the literal within the line.
13014         (test_reading_source_line): Update for location_get_source_line
13015         returning a char_span.
13016         * input.h (class char_span): Move here from
13017         diagnostic-show-locus.c, converting from a struct to a class.
13018         Make data members private.
13019         (char_span::operator bool): New.
13020         (char_span::length): New.
13021         (char_span::get_buffer): New.
13022         (char_span::operator[]): New.
13023         (char_span::subspan): Make const.
13024         (char_span::xstrdup): New.
13025         (location_get_source_line): Convert return type from const char *
13026         to char_span, losing the final "line_size" param.
13028 2018-04-30  Jan Hubicka  <jh@suse.cz>
13030         * lto-wrapper.c (ltrans_priorities): New static var.
13031         (cmp_priority): New.
13032         (run_gcc): Read priorities and if doing parallel build order
13033         the Makefile by them.
13035 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13037         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13039 2018-04-30  Richard Biener  <rguenther@suse.de>
13041         * tree-cfg.c (verify_address): Remove base argument, add
13042         flag whether to check TREE_ADDRESSABLE and do that.
13043         (verify_expr): Remove.
13044         (verify_types_in_gimple_reference): Add pieces from verify_expr.
13045         (verify_gimple_assign_single): Likewise.
13046         (verify_gimple_switch): Likewise.
13047         (verify_expr_location_1): Dereference tp once.  Add (disabled)
13048         piece from verify_expr.
13049         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13051 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13053         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13055 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13057         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13058         (small_data_pattern): Likewise.
13059         (arc_rewrite_small_data): Likewise.
13060         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13061         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13062         (get_symbol_alignment): New function.
13063         (legitimate_small_data_address_p): Likewise.
13064         (legitimate_scaled_address): Update, call
13065         legitimate_small_data_address_p.
13066         (output_sdata): New static variable.
13067         (arc_print_operand): Update how we handle small data operands.
13068         (arc_print_operand_address): Likewise.
13069         (arc_legitimate_address_p): Update, use
13070         legitimate_small_data_address_p.
13071         (arc_rewrite_small_data_p): Remove.
13072         (arc_rewrite_small_data_1): Likewise.
13073         (arc_rewrite_small_data): Likewise.
13074         (small_data_pattern): Likewise.
13075         (compact_sda_memory_operand): Update to use
13076         legitimate_small_data_address_p and get_symbol_alignment.
13077         (prepare_move_operands): Don't rewite sdata pattern.
13078         (prepare_extend_operands): Remove.
13079         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13080         pattern.
13081         (zero_extendqisi2): Likewise.
13082         (zero_extendhisi2): Likewise.
13083         (extendqihi2): Likewise.
13084         (extendqisi2): Likewise.
13085         (extendhisi2): Likewise.
13086         (addsi3): Likewise.
13087         (subsi3): Likewise.
13088         (andsi3): Likewise.
13089         * config/arc/constraints.md (Usd): Change it to memory constraint.
13091 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13093         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13094         as source of std instructions.
13095         * config/arc/arc.md (movsi_insn): Update pattern predicate to
13096         allow 6-bit constants as source for store instructions.
13097         (movdi_insn): Update instruction pattern to allow 6-bit constants
13098         as source for store instructions.
13100 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
13102         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13104 2018-04-30  Nathan Sidwell  <nathan@acm.org>
13105             Sandra Loosemore <sandra@codesourcery.com>
13107         * dumpfile.c (dump_open): Allow '-' for stdout.
13108         * doc/invoke.texi (Developer Options): Document dump filename
13109         determination early.  Document stdin/stdout selection.
13111 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
13113         Microblaze Target: PIC data text relative
13115         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13116         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13117         Add declaration.
13118         * config/microblaze/microblaze.h (microblaze_constant_address_p):
13119         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13120         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13121         New addressing mode for data-text relative position indepenedent code.
13122         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13123         'ADDRESS_SYMBOLIC_TXT_REL'.
13124         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13125         (microblaze_legitimate_pic_operand): Exclude function calls from
13126         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13127         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13128         addresses cases.
13129         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13130         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13131         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13132         for 'address + offset'.
13133         (microblaze_expand_prologue): Add new function prologue call for
13134         'r20' assignation.
13135         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13136         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13137         table in case of TARGET_PIC_DATA_TEXT_REL.
13138         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13139         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13140         Add new macros 'UNSPEC_TEXT',
13141         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13142         + exclude function calls from 'UNSPEC_PLT' in case of data text
13143         relative mode.
13144         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13145         new target hook for generating address diff vector tables in case of
13146         flag_pic.
13147         * doc/tm.texi : Regenerate.
13148         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13149         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13150         of addr diff vector generation.
13151         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13152         target hook definition.
13153         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13154         Add default function for generate_pic_addr_diff_vec -> flag_pic.
13155         * doc/invoke.texi (Add new pic option): Add new microblaze pic
13156         option for data text relative.
13158 2018-04-30  Richard Biener  <rguenther@suse.de>
13160         * tree-chrec.h (evolution_function_is_constant_p): Remove
13161         redundant check.
13162         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13164 2018-04-30  Richard Biener  <rguenther@suse.de>
13166         PR bootstrap/85571
13167         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13169 2018-04-30  Richard Biener  <rguenther@suse.de>
13171         PR tree-optimization/28364
13172         PR tree-optimization/85275
13173         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13174         copying first exit test.
13176 2018-04-28  Mark Wielaard  <mark@klomp.org>
13178         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13179         dwarf_version >= 5.
13180         (dwarf_AT): Handle DW_AT_addr_base.
13181         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13183 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
13185         PR target/84431
13186         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13187         (*ashl<dwi>3_doubleword_mask_1): Ditto.
13188         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13189         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13191 2018-04-28  Richard Biener  <rguenther@suse.de>
13193         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13194         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13195         to reflect use.  Only add interesting stmts.
13197 2018-04-27  Martin Jambor  <mjambor@suse.cz>
13199         PR ipa/85549
13200         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13201         the jump function allows for passing through aggregate values.
13203 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
13205         * input.h (in_system_header_at): Convert from macro to inline
13206         function.
13207         (from_macro_expansion_at): Likewise.
13208         (from_macro_definition_at): Likewise.
13210 2018-04-27  Jeff Law  <law@redhat.com>
13212         * config.gcc: Mark tile* targets as deprecated/obsolete.
13214 2018-04-27  Richard Biener  <rguenther@suse.de>
13216         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13217         fix for ILP32.
13219 2018-04-27  Richard Biener  <rguenther@suse.de>
13221         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13223 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
13225         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13226         with Yd constraint. Set "preferred_for_speed" attribute from
13227         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13228         with Yd constraint.
13229         (*movdi_internal): Ditto.
13230         (movti_interunit splitters): Remove
13231         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13232         (movdi_interunit splitters): Ditto.
13233         * config/i386/constraints.md (Ye): Remove.
13234         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13236 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13238         PR target/85512
13239         * config/aarch64/constraints.md (Usg): Limit to 31.
13240         (Usj): Limit to 63.
13242 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
13244         PR tree-optimization/85529
13245         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13246         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13247         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13248         zero extension or masking of the MSB bit.
13249         (optimize_range_tests): Add FIRST_BB argument, pass it through
13250         to optimize_range_tests_var_bound.
13251         (maybe_optimize_range_tests, reassociate_bb): Adjust
13252         optimize_range_tests callers.
13254 2018-04-26  Richard Biener  <rguenther@suse.de>
13255             Jakub Jelinek  <jakub@redhat.com>
13257         * cgraph.h (symbol_table): Just declare debug method here.
13258         * symtab.c (symbol_table::debug): Define.
13260 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
13262         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13264 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
13266         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13267         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13268         (*movdi_internal): Substitute Yi and Yj constraint with x
13269         and Ym and Yn constraint with y constraint.  Update "isa"
13270         attribute and set "preferred_for_speed" attribute from
13271         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13272         (*movsi_internal): Ditto.
13273         (*movdf_internal): Ditto.
13274         (*movsf_internal): Ditto.
13275         (*zero_extendsidi2): Ditto.
13276         * config/i386/sse.md (vec_set<mode>_0): Ditto.
13277         (sse2_loadld): Ditto.
13278         (*vec_extract<ssevecmodelower>_0): Ditto.
13279         (*vec_extractv4si_0_zext_sse4): Ditto.
13280         (vec_concatv2di): Ditto.
13281         (*vec_dup<mode>): Ditto.
13282         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13283         * config/i386/constraints.md (Yi): Remove.
13284         (Yj): Remove.
13285         (Ym): Remove.
13286         (Yn): Remove.
13288 2018-04-26  Nathan Sidwell  <nathan@acm.org>
13290         * dumpfile.c (dump_open): New.
13291         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13292         (dump_finish): Detect stdio/stderr by value not name.
13294 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
13296         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13298 2018-04-26  Tom de Vries  <tom@codesourcery.com>
13300         PR target/84952
13301         * config/nvptx/nvptx.c (verify_neutering_jumps)
13302         (verify_neutering_labels): New function
13303         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13305 2018-04-26  Tom de Vries  <tom@codesourcery.com>
13307         PR target/84025
13308         * config/nvptx/nvptx.c (needs_neutering_p): New function.
13309         (nvptx_single): Use needs_neutering_p to skip over insns that do not
13310         need neutering.
13312 2018-04-26  Richard Biener <rguenther@suse.de>
13313             Tom de Vries  <tom@codesourcery.com>
13315         PR lto/85422
13316         * lto-streamer-out.c (output_function): Fixup loops if required to match
13317         discovery done in the reader.
13319 2018-04-26  Richard Biener  <rguenther@suse.de>
13321         PR tree-optimization/85116
13322         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13323         have a loop exit from the single latch predecessor.  Remove
13324         case of header with just condition.
13325         (ch_base::copy_headers): Exclude infinite loops from any
13326         processing.
13327         (pass_ch::execute): Record exits.
13329 2018-04-26  Richard Biener  <rguenther@suse.de>
13331         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13332         prologue cost vector and pass it to vect_get_load_cost.
13333         (vect_get_peeling_costs_all_drs): Likewise.
13334         (vect_peeling_hash_get_lowest_cost): Likewise.
13335         (vect_enhance_data_refs_alignment): Likewise.
13337 2018-04-26  Richard Biener  <rguenther@suse.de>
13339         PR middle-end/85450
13340         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13341         checking of integer<->pointer conversions.
13342         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13343         sign-/zero-extending pointer types.
13344         (expand_omp_for_static_chunk): Likewise.
13346 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
13347             Jean Lee  <xiaoyur347@gmail.com>
13349         * config/mips/mips.c (mips_asan_shadow_offset): New function.
13350         (TARGET_ASAN_SHADOW_OFFSET): Define.
13351         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13352         true for -fsanitize=address.
13354 2018-04-25  Mark Wielaard  <mark@klomp.org>
13356         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13357         shorter ones.
13359 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
13361         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13362         than "alu", remove explicit "memory" and "imm_disp" attributes.
13363         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13365         PR middle-end/85414
13366         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13367         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13368         gen_lowpart_no_emit.
13370 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
13372         PR target/85473
13373         * config/i386/i386.c (ix86_expand_builtin): Change memory
13374         operand to XI, extend p0 to Pmode.
13375         * config/i386/i386.md: Change unspec volatile and operand
13376         1 mode to XI, change operand 0 mode to P.
13378 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
13380         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13381         GET_MODE_MASK before any checking.
13382         (nds32_can_use_bset_p): Likewise.
13383         (nds32_can_use_btgl_p): Likewise.
13385 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
13387         * config/nds32/nds32-doubleword.md: New define_split pattern for
13388         illegal register number.
13390 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
13392         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
13394 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
13396         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
13398 2018-04-25  Richard Biener  <rguenther@suse.de>
13400         * lto-streamer.h (LTO_major_version): Bump to 8.
13402 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
13404         * BASE-VER: Set to 9.0.0.
13406 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
13408         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
13409         in __abskf2 and __powikf2.
13411 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13413         PR target/85512
13414         * config/aarch64/constraints.md (Usg, Usj): New constraints.
13415         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
13416         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
13417         Use the above on operand 2.  Reindent.
13418         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
13420 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
13422         PR target/85485
13423         * common/config/i386/i386-common.c (ix86_handle_option): Don't
13424         handle OPT_mcet.
13425         * config/i386/i386.opt (mcet): Removed.
13426         * doc/install.texi: Remove -mcet documentation.
13427         * doc/invoke.texi: Likewise.
13429 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
13431         PR target/85485
13432         * doc/install.texi: Remove -mcet from bootstrap-cet.
13434 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
13436         PR target/85511
13437         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
13438         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
13439         if TARGET_64BIT.
13441         PR target/85503
13442         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
13443         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
13444         containing a CONST_VECTOR.
13446 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
13448         * doc/install.texi: Update newlib dependency for nvptx.
13450 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
13452         PR target/85508
13453         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
13454         instead of INTVAL when shifting x left.
13456 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
13458         PR tree-optimization/85478
13459         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
13460         vect_grouped_store_supported for single element vectors.
13462 2018-04-24  Richard Biener  <rguenther@suse.de>
13464         PR target/85491
13465         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
13466         load cost increase to the case of non-constant step.
13468 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
13470         PR target/84828
13471         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
13472         destination if any_malformed_asm.
13474 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
13476         PR middle-end/85496
13477         * expr.c (store_field): In the bitfield case, if the value comes from
13478         a function call and is returned in registers by means of a PARALLEL,
13479         do not change the mode of the temporary unless BLKmode and VOIDmode.
13481 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
13483         PR rtl-optimization/85423
13484         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
13485         dependencies to debug insns when the previous insn is non-debug.
13487 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
13489         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
13490         enums into a single definition.
13491         (fls): Fix predicates and printing.
13492         (seti): Likewise.
13494 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
13496         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
13497         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
13498         and short u6 immediate.
13499         (check_if_valid_sleep_operand): Remove.
13500         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
13502 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13504         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
13505         flag_always_save_lp condition.
13506         * config/nds32/nds32.opt (malways-save-lp): New option.
13508 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
13510         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
13511         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
13512         * config/nds32/nds32.h
13513         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
13514         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
13516 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
13518         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
13519         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
13521 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
13522             Chung-Ju Wu  <jasonwucj@gmail.com>
13524         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
13525         Declare.
13526         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
13527         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
13529 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13531         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
13533 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13535         * config/nds32/nds32-protos.h (nds32_data_alignment,
13536         nds32_local_alignment): Declare.
13537         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
13538         nds32_local_alignment): New functions.
13539         (TARGET_CONSTANT_ALIGNMENT): Define.
13540         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
13542 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13544         * config/nds32/nds32.c
13545         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
13546         (TARGET_MODES_TIEABLE_P): Likewise.
13548 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13550         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
13551         level Ofast and Og.
13553 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
13554             Chung-Ju Wu  <jasonwucj@gmail.com>
13556         * config/nds32/constants.md (unspec_volatile_element): Add enum values
13557         for unaligned access.
13558         * config/nds32/nds32-intrinsic.c: Implementation of expanding
13559         unaligned access.
13560         * config/nds32/nds32-intrinsic.md: Likewise.
13561         * config/nds32/nds32_intrinsic.h: Likewise.
13562         * config/nds32/nds32.h (nds32_builtins): Likewise.
13563         * config/nds32/nds32.opt (munaligned-access): New option.
13564         * config/nds32/nds32.c (nds32_asm_file_start): Display
13565         flag_unaligned_access status.
13567 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
13569         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
13570         -mno-relax is present.
13571         * config/riscv/linux.h (LINK_SPEC): Ditto.
13573 2018-04-20  Martin Sebor  <msebor@redhat.com>
13575         PR c/85365
13576         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
13577         for null pointers.
13578         (gimple_fold_builtin_stxcpy_chk): Same.
13579         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
13581 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
13583         PR target/85456
13584         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
13585         __powikf2 when long double is IEEE 128-bit.
13587 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
13589         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
13590         step to make sure stack always aligned.
13592 2018-04-20  Carl Love  <cel@us.ibm.com>
13594         PR target/83402
13595         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
13596         size check for arg0.
13598 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13599             Tom de Vries  <tom@codesourcery.com>
13601         PR target/85445
13602         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
13603         Emit insns for calls too.
13604         (nvptx_find_par): Always look for worker-level predecessor insn.
13605         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
13606         calls.
13607         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
13608         (nvptx_process_pars): Propagate frames for calls.
13610 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
13612         PR target/85469
13613         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
13614         Removed.
13615         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
13616         (ix86_handle_option): Don't handle OPT_mibt.
13617         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
13618         __SHSTK__.
13619         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
13620         has_ibt and ibt.
13621         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
13622         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
13623         (ix86_target_macros): Define __CET__ with flag_cf_protection
13624         for -fcf-protection.
13625         * config/i386/i386.c (isa2_opts): Remove -mibt.
13626         * config/i386/i386.h (TARGET_IBT): Removed.
13627         (TARGET_IBT_P): Likewise.
13628         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
13629         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
13630         * config/i386/i386.opt (mcet): Update help message.
13631         (mshstk): Likewise.
13632         (mibt): Removed.
13633         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
13634         -mcet as an alias for -mshstk.
13636 2018-04-20  Richard Biener <rguenther@suse.de>
13638         PR middle-end/85475
13639         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
13640         complexity by forcing a single use of the multiply operand.
13642 2018-04-20  Martin Jambor  <mjambor@suse.cz>
13644         ipa/85449
13645         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
13646         recursion dependency to only apply to non-clones.
13648 2018-04-20  Martin Jambor  <mjambor@suse.cz>
13650         ipa/85447
13651         * ipa-cp.c (create_specialized_node): Check that clones of
13652         self-recursive edges exist during IPA-CP.
13654 2018-04-19  Toon Moene  <toon@moene.org>
13656         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
13657         by -O3.
13659 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
13661         PR tree-optimization/85467
13662         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
13663         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
13664         VECTOR_CST element to type.
13666 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
13668         PR target/85397
13669         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
13670         * config/i386/i386.md (builtin_setjmp_setup): Removed.
13671         (builtin_longjmp): Likewise.
13672         (save_stack_nonlocal): New pattern.
13673         (restore_stack_nonlocal): Likewise.
13675 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
13677         PR target/85404
13678         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13679         Replace ASM_OUTPUT_LABEL with fprintf.
13681 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
13683         PR target/85417
13684         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13685         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
13686         * config/i386/i386-c.c (ix86_target_macros_internal): Also
13687         define __IBT__ and __SHSTK__ for -fcf-protection.
13688         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
13689         TARGET_IBT.
13690         (ix86_trampoline_init): Likewise.
13691         (x86_output_mi_thunk): Likewise.
13692         (ix86_notrack_prefixed_insn_p): Likewise.
13693         (ix86_option_override_internal): Don't disallow -fcf-protection.
13694         * config/i386/i386.md (rdssp<mode>): Also enable for
13695         -fcf-protection.
13696         (incssp<mode>): Likewise.
13697         (nop_endbr): Likewise.
13698         * config/i386/i386.opt (mcet): Change help message to built-in
13699         functions only.
13700         (mibt): Likewise.
13701         (mshstk): Likewise.
13702         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
13703         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
13704         enable CET built-in functions.
13706 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
13708         * common/config/i386/i386-common.c
13709         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
13710         OPTION_MASK_ISA_MOVDIRI_UNSET,
13711         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
13712         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
13713         * config.gcc (movdirintrin.h): New header.
13714         * config/i386/cpuid.h (bit_MOVDIRI,
13715         bit_MOVDIR64B): New bits.
13716         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
13717         and -mmvodir64b.
13718         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
13719         (VOID, PVOID, PCVOID)): New function types.
13720         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
13721         __builtin_ia32_directstoreu_u64,
13722         __builtin_ia32_movdir64b): New builtins.
13723         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
13724         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
13725         and -mmovdiri.
13726         (ix86_valid_target_attribute_inner_p): Ditto.
13727         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
13728         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
13729         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
13730         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
13731         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
13732         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
13733         (movdiri<mode>, movdir64b_<mode>): New.
13734         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
13735         * config/i386/immintrin.h: Include movdirintrin.h.
13736         * config/i386/movdirintrin.h: New file.
13737         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
13739 2018-04-19  Richard Biener  <rguenther@suse.de>
13741         PR middle-end/85455
13742         * cfg.c (clear_bb_flags): When loop state says we have
13743         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
13745 2018-04-19  Richard Biener  <rguenther@suse.de>
13747         PR tree-optimization/84737
13748         * tree-vect-data-refs.c (vect_copy_ref_info): New function
13749         copying restrict info.
13750         (vect_setup_realignment): Use it.
13751         * tree-vectorizer.h (vect_copy_ref_info): Declare.
13752         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
13753         the first DR to all generated stores.
13754         (vectorizable_load): Likewise for loads.
13756 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
13758         PR tree-optimization/85446
13759         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
13760         the integral and pointer types to have the same precision.
13762         * doc/install.texi: Document --disable-cet being the default and
13763         --enable-cet=auto.
13765 2018-04-18  Martin Liska  <mliska@suse.cz>
13767         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
13768         style.
13770 2018-04-18  Martin Liska  <mliska@suse.cz>
13772         Revert
13773         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
13775         PR ipa/83983
13776         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13777         arguments if they are comparable.
13779 2018-04-18  Martin Liska  <mliska@suse.cz>
13781         Revert
13782         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
13784         PR lto/84805
13785         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13786         incomplete types.
13788 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
13790         PR target/85388
13791         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
13792         ENDBR after calling __morestack.
13794 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
13796         PR jit/85384
13797         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
13798         by using gcc_base_ver to generate a gcc_driver_version, and use
13799         it when generating GCC_DRIVER_NAME.
13800         * configure: Regenerate.
13802 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
13804         PR target/81084
13805         * config.gcc: Obsolete powerpc*-*-*spe*.
13807 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
13809         PR debug/84637
13810         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
13811         (stabstr_D): Change type of unum from unsigned int to
13812         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
13813         type.
13815 2018-04-17  Jim Wilson  <jimw@sifive.com>
13817         PR 84856
13818         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
13819         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
13820         Set arg_pointer_offset after using pretend_args_size.
13822 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
13824         PR rtl-optimization/85431
13825         * dse.c (record_store): Ignore zero width stores.
13827         PR sanitizer/85230
13828         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
13829         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
13830         __builtin_stack_restore rather than after it.
13831         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
13832         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
13833         argument instead of virtual_dynamic_stack_rtx.
13835 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13837         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
13838         New prototype.
13839         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
13840         Add note to error message to explain internal mapping of overloaded
13841         built-in function name to non-overloaded built-in function name.
13842         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
13843         function.
13845 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
13847         PR target/85424
13848         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
13849         where the inputs overlap with the output.
13851 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
13853         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
13854         (=v, v) alternative and explicit "memory" attribute.
13855         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
13856         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13857         attributes.
13858         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
13859         "sselog1" type instead of "sselog".
13860         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
13861         "sselog".  Remove explicit "memory" attribute.
13862         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
13863         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13864         attributes.
13865         (vec_extract_hi_v32hi): Merge all alternatives into one, use
13866         "sselog1" type instead of "sselog".  Remove explicit "memory"
13867         attribute.
13868         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
13869         use "sselog1" type instead of "sselog".  Remove explicit "memory"
13870         attribute.
13871         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
13872         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13873         attributes.
13874         (vec_extract_hi_v64qi): Merge all alternatives into one, use
13875         "sselog1" type instead of "sselog".  Remove explicit "memory"
13876         attribute.
13877         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
13878         use "sselog1" type instead of "sselog".  Remove explicit "memory"
13879         attribute.
13881         PR target/85430
13882         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
13884         PR middle-end/85414
13885         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
13886         on a SUBREG.
13888 2018-04-17  Martin Jambor  <mjambor@suse.cz>
13890         PR ipa/85421
13891         * ipa-cp.c (create_specialized_node): Call
13892         expand_all_artificial_thunks if necessary.
13894 2018-04-17  Martin Liska  <mliska@suse.cz>
13896         PR lto/85405
13897         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
13898         in message, remote space in between '_G' and '('.
13900 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
13902         PR target/85281
13903         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
13904         avx512f_vmcmp<mode>3<round_saeonly_name>,
13905         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
13906         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
13907         avx512f_rndscale<mode><round_saeonly_name>,
13908         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
13909         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
13910         Use %<iptr>2 instead of %2 for -masm=intel.
13911         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
13912         avx512f_vcvttss2usi<round_saeonly_name>,
13913         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
13914         -masm=intel.
13915         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
13916         avx512f_vcvttsd2usi<round_saeonly_name>,
13917         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
13918         Use %q1 instead of %1 for -masm=intel.
13919         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
13920         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
13921         of %3 for -masm=intel.
13922         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
13923         -masm=intel.
13924         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
13925         -masm=intel.
13926         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
13927         -masm=intel.
13928         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
13929         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
13930         %g1.
13931         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
13932         -masm=intel.
13933         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
13934         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
13935         %g1 and one with %0 and %1.
13936         (avx512er_vmrcp28<mode><round_saeonly_name>,
13937         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
13938         %1 for -masm=intel.
13939         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
13940         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
13941         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
13942         of %0 and %{%4%} for -masm=intel.
13943         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
13944         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
13945         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
13946         order of %0 and %{%5%}%{z%} for -masm=intel.
13948 2018-04-17  Jan Hubicka  <jh@suse.cz>
13950         PR lto/85405
13951         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
13953 2018-04-17  Martin Liska  <mliska@suse.cz>
13955         PR ipa/85329
13956         * multiple_target.c (create_dispatcher_calls): Set apostrophes
13957         for target_clone error message.  Make default implementation
13958         clone to be a local declaration.
13959         (separate_attrs): Add new argument and check for an empty
13960         string.
13961         (expand_target_clones): Handle it.
13962         (ipa_target_clone): Make redirection just for target_clones
13963         functions.
13965 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
13966             Tom de Vries  <tom@codesourcery.com>
13968         PR middle-end/84955
13969         * omp-expand.c (expand_oacc_for): Add dummy false branch for
13970         tiled basic blocks without omp continue statements.
13972 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
13974         PR target/83660
13975         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
13976         vec_extract expression as having side effects to make sure it gets
13977         a cleanup point.
13979 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
13981         PR target/85403
13982         * config/i386/i386.c (get_builtin_code_for_version): Check
13983         error_mark_node.
13985 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
13987         PR target/84331
13988         * config.gcc: Support "skylake".
13989         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13990         PROCESSOR_SKYLAKE.
13991         * config/i386/i386.c (m_SKYLAKE): Define.
13992         (processor_target_table): Add "skylake".
13993         (ix86_option_override_internal): Add "skylake".
13994         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
13995         PROCESSOR_CANNONLAKE.
13996         (get_builtin_code_for_version): Fix priority for
13997         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
13998         PROCESSOR_SKYLAKE-AVX512.
13999         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14000         (processor_type): Add PROCESSOR_SKYLAKE.
14002 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
14003             Jason Merrill  <jason@redhat.com>
14005         PR c++/85112
14006         * convert.c (convert_to_integer_1): Use direct recursion for
14007         enumeral types and types with a precision less than the number
14008         of bits in their mode.
14010 2018-04-16  Julia Koval  <julia.koval@intel.com>
14012         PR target/84413
14013         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14014         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14016 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
14018         PR target/85293
14019         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14020         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14021         and -mno-direct-move.
14023 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
14025         PR target/83402
14026         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14027         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14028         Ensure negative shifts result in {0}.
14030 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
14032         PR rtl-optimization/79916
14033         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14034         regs (if any) to define how to gnerate SD moves when LRA is in
14035         progress.
14037 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
14039         PR rtl-optimization/85393
14040         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14041         * except.c (expand_dw2_landing_pad_for_region): Make static.
14042         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14043         a label and unconditional jump to old_bb, rather than
14044         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14045         basic block.
14047         PR rtl-optimization/85376
14048         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14049         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14050         instead of a specific value.
14052 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
14053             Bin Cheng  <bin.cheng@arm.com>
14055         PR tree-optimization/82965
14056         PR tree-optimization/83991
14057         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14058         by_profile_only parameter.
14059         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14060         information if the loop was predicted to iterate too many times.
14061         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14063 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
14065         PR lto/71991
14066         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14067         always inline.
14069 2018-04-13  Martin Liska  <mliska@suse.cz>
14070             Jakub Jelinek  <jakub@redhat.com>
14072         PR middle-end/81657
14073         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14074         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14075         * builtins.c (expand_builtin_memory_copy_args): Use
14076         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14077         handle dest_addr == pc_rtx.
14079 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
14081         PR target/85291
14082         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14083         asked to not generate direct moves.
14084         (fix_trunc<mode>si2_stfiwx): Similar.
14085         (fix_trunc<mode>si2_internal): Similar.
14087 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14089         PR debug/83157
14090         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14091         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14092         lookup if dest in some wider mode is known to be const0_rtx and
14093         if so, record permanent equivalence for it to be ZERO_EXTEND of
14094         the narrower mode destination.
14096 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
14098         * lto-streamer-out.c (output_function): Revert 259346.
14099         * omp-expand.c (expand_oacc_for): Likewise.
14101 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
14103         PR rtl-optimization/85354
14104         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14105         * sel-sched.c (sel_global_init): ... here.
14107 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
14109         PR target/85238
14110         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14111         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14112         mode for PE-COFF targets.
14113         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14114         (i386_pe_asm_lto_end): Likewise.
14115         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14116         (TARGET_ASM_LTO_END): Likewise.
14117         * config/i386/winnt.c (saved_debug_info_level): New static variable.
14118         (i386_pe_asm_lto_start): New function.
14119         (i386_pe_asm_lto_end): Likewise.
14121 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
14122             Richard Biener  <rguenther@suse.de>
14124         PR middle-end/84955
14125         * lto-streamer-out.c (output_function): Fix CFG loop state before
14126         streaming out.
14127         * omp-expand.c (expand_oacc_for): Handle calls to internal
14128         functions like regular functions.
14130 2018-04-12  Richard Biener  <rguenther@suse.de>
14132         PR lto/85371
14133         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14134         for the early LTO debug to properly generate references to it
14135         during DIE emission.  Do not re-use that for the skeleton for
14136         split-dwarf.
14137         (dwarf2out_early_finish): Likewise.
14139 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14141         PR target/85328
14142         * config/i386/sse.md
14143         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14144         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14145         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14146         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14147         and output is a reg, avoid creating invalid lowpart subreg, but
14148         instead split into a 512-bit move.  Don't split if not AVX512VL,
14149         input is xmm16+ reg and output is a mem.
14150         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14151         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14152         xmm16+ reg and output is a mem.
14154 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14156         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14157         also for flag_dwarf2_cfi_asm.
14159 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14161         PR rtl-optimization/85342
14162         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14163         a bool scalar var inside of the loop instead.  Don't try to update
14164         recog_data.operand after failed apply_change_group.
14166 2018-04-12  Tom de Vries  <tom@codesourcery.com>
14168         PR target/85296
14169         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14170         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
14171         array with flexible array member as array without given dimension.
14172         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14173         argument for undefined param to true.
14175 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
14177         PR target/85321
14178         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14179         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14180         from PowerPC section.
14181         * config/rs6000/sysv4.opt (mcall-): Improve help text.
14182         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14183         help text that is too long.
14184         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14185         help text that is too long.
14186         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14187         help text that is too long.
14189 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
14191         * config/alpha/alpha.md (stack_probe_internal): Rename
14192         from "probe_stack".  Update all callers.
14194 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14196         PR rtl-optimization/84566
14197         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14198         sched_macro_fuse_insns.
14200 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14202         PR target/84301
14203         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14204         (compute_block_dependences): ... from here.
14206 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14208         PR tree-optimization/85331
14209         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14210         from int to HOST_WIDE_INT.
14212 2018-04-11  Martin Jambor  <mjambor@suse.cz>
14214         PR ipa/84149
14215         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14216         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14217         not the same as the source val.
14218         (cgraph_edge_brings_value_p): New parameter.
14219         (gather_edges_for_value): Pass destination value to
14220         cgraph_edge_brings_value_p.
14221         (perhaps_add_new_callers): Likewise.
14222         (get_info_about_necessary_edges): Likewise and exclude values brought
14223         only by self-recursive edges.
14224         (create_specialized_node): Redirect only clones of self-calling edges.
14225         (+self_recursive_pass_through_p): New function.
14226         (find_more_scalar_values_for_callers_subset): Use it.
14227         (find_aggregate_values_for_callers_subset): Likewise.
14228         (known_aggs_to_agg_replacement_list): Removed.
14229         (decide_whether_version_node): Re-calculate known constants for all
14230         remaining context clones.
14232 2018-04-11  Richard Biener  <rguenther@suse.de>
14234         PR lto/85339
14235         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14236         from early DWARF output.
14237         (dwarf2out_early_finish): Output line info unconditionally into
14238         early DWARF and add reference to it.
14240 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14242         PR target/85281
14243         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14244         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14245         other than V2DFmode using iptr mode attribute.
14246         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14248 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14250         PR rtl-optimization/84659
14251         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14253 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14255         PR debug/85302
14256         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14257         SIZEP is NULL.
14258         (output_loc_list): Pass address of a dummy size variable even in the
14259         locview handling loop.
14260         (index_location_lists): Add comment on why skip_loc_list_entry can't
14261         call size_of_locs.
14263 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14265         PR target/85261
14266         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14267         into register.
14269 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
14271         PR target/85321
14272         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14273         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14274         and -mstring-compare-inline-limit.
14276 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
14278         PR target/85287
14279         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14280         for stack clash protection in a register whenever we need it to be in
14281         a register.
14283 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
14285         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14286         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14288 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
14290         PR target/85321
14291         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14292         the help text.
14293         (mlong-double-): Ditto.
14294         * config/rs6000/sysv4.opt (msdata=): Ditto.
14295         (mtls-size=): Ditto.
14297 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14299         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14300         erroneous entries for
14301         "vector int vec_ldl (int, long int *)", and
14302         "vector unsigned int vec_ldl (int, unsigned long int *)".
14303         Add comments and entries for
14304         "vector bool char vec_ldl (int, bool char *)",
14305         "vector bool short vec_ldl (int, bool short *)",
14306         "vector bool int vec_ldl (int, bool int *)",
14307         "vector bool long long vec_ldl (int, bool long long *)",
14308         "vector pixel vec_ldl (int, pixel *)",
14309         "vector long long vec_ldl (int, long long *)",
14310         "vector unsigned long long vec_ldl (int, unsigned long long *)".
14311         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14312         type tree bool_long_long_type_node and correct definition of
14313         bool_V2DI_type_node to make reference to this new type tree.
14314         (rs6000_mangle_type): Replace erroneous reference to
14315         bool_long_type_node with bool_long_long_type_node.
14316         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14317         comments to emphasize sign distinctions for char and int types and
14318         replace RS6000_BTI_bool_long constant with
14319         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
14320         use of RS6000_BTI_pixel.
14321         (bool_long_type_node): Remove this macro definition.
14322         (bool_long_long_type_node): New macro definition
14324 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
14326         PR rtl-optimization/85300
14327         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14328         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14329         simplify_unary_operation fails.
14331 2018-04-10  Martin Liska  <mliska@suse.cz>
14333         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14334         cgraph_edge and ipa_ref.
14336 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
14338         PR target/85177
14339         PR target/85255
14340         * config/i386/sse.md
14341         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14342         computation of the VEC_MERGE selector from mask.
14343         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14344         Fix decoding of the VEC_MERGE selector into mask.
14346 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
14348         PR tree-optimization/85286
14349         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14351 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
14353         * final.c (final_1): Set insn_last_address as well as
14354         insn_current_address.
14356 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14358         PR target/85173
14359         * explow.c (emit_stack_probe): Call validize_mem on memory location
14360         before passing it to gen_probe_stack.  Create address operand and
14361         legitimize it for the probe_stack_address case.
14363 2018-04-09  Jan Hubicka  <jh@suse.cz>
14365         PR lto/85078
14366         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14367         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14368         * tree.c (free_lang_data_in_type): Fix handling of binfos;
14369         walk basetypes.
14370         (free_lang_data): Rebuild type inheritance graph.
14372 2018-04-09  Martin Sebor  <msebor@redhat.com>
14374         * invoke.texi (-finline-small-functions): Mention other optimization
14375         options.
14376         (-findirect-inlining, -fpartial-inlining): Same.
14377         (-finline-functions-called-once): Same.
14378         (-freorder-blocks-and-partition): Same.
14380 2018-04-09  Jan Hubicka  <jh@suse.cz>
14382         PR rtl/84058
14383         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14384         jumps; choose last target that matches the criteria (i.e.
14385         no partition changes for non-crossing jumps).
14386         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
14387         support for redirecting crossing jumps to non-crossing.
14389 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
14391         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
14392         also for naked functions.
14394 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
14396         * config/arc/arc.md (add_shift): New pattern.
14397         (add_shift2): Likewise.
14398         (sub_shift): Likewise.
14399         (sub_shift_cmp0_noout): Likewise.
14400         (compare_si_ashiftsi): Likewise.
14401         (xbfu_cmp0_noout): New combine pattern.
14402         (xbfu_cmp0"): Likewise.
14403         (movsi_set_cc_insn): Place the predicable variant first.
14404         (commutative_binary_cmp0_noout): Remove clobber.
14405         (commutative_binary_cmp0): New pattern.
14406         (noncommutative_binary_cmp0): Likewise.
14407         (noncommutative_binary_cmp0_noout): Likewise.
14408         (noncommutative_binary_comparison_result_used): Removed.
14409         (rsub_cmp0): New pattern.
14410         (rsub_cmp0_noout): Likewise.
14411         (extzvsi): Changed, keep only meaningful variants.
14412         (SQH, SEZ): New iterators.
14413         (SQH_postfix): New mode attribute.
14414         (SEZ_prefix): New code attribute.
14415         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
14416         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
14417         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
14418         of numerical value.
14419         (noncommutative_operator): Check the availability of barrel
14420         shifter option.
14422 2018-04-09  Richard Biener  <rguenther@suse.de>
14424         PR tree-optimization/85284
14425         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
14426         Only use the niter constraining form of simple_iv when the exit
14427         is always executed.
14429 2018-04-09  Tom de Vries  <tom@codesourcery.com>
14431         PR target/84041
14432         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14433         (define_expand "*memory_barrier"): New define_expand.
14434         (define_insn "memory_barrier"): New insn.
14436 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
14438         PR rtl-optimization/80463
14439         PR rtl-optimization/83972
14440         PR rtl-optimization/83480
14442         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
14443         correct producer for the insn.
14444         (tidy_control_flow): Fixup seqnos in case of debug insns.
14446 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
14448         PR rtl-optimization/83913
14450         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
14451         different sched-times when merging exprs.
14453 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
14455         PR rtl-optimization/83962
14457         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
14458         tidy_fallthru_edge and tidy_control_flow.
14460 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
14462         PR rtl-optimization/83530
14464         * sel-sched.c (force_next_insn): New global variable.
14465         (remove_insn_for_debug): When force_next_insn is true, also leave only
14466         next insn in the ready list.
14467         (sel_sched_region): When the region wasn't scheduled, make another pass
14468         over it with force_next_insn set to 1.
14470 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
14472         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
14473         into tm_file.
14474         * config/nds32/constants.md (unspec_volatile_element): Add enum values
14475         for interrupt control.
14476         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14477         functions for interrupt control.
14478         * config/nds32/nds32-intrinsic.md: Likewise.
14479         * config/nds32/nds32_intrinsic.h: Likewise.
14480         * config/nds32/nds32.h (nds32_builtins): Likewise.
14482 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
14484         * config/nds32/nds32.c (nds32_init_machine_status,
14485         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
14486         strict_aligned_p field.
14487         (nds32_expand_to_rtl_hook): New function.
14488         (TARGET_EXPAND_TO_RTL_HOOK): Define.
14489         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
14491 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14492             Chung-Ju Wu  <jasonwucj@gmail.com>
14494         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
14495         * config/nds32/nds32-n7.md: New file.
14496         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
14497         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
14498         pipeline.
14499         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
14500         * config/nds32/nds32.md (pipeline_model): Add n7.
14501         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
14502         * config/nds32/pipelines.md: Include n7 settings.
14504 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14505             Chung-Ju Wu  <jasonwucj@gmail.com>
14507         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
14508         * config/nds32/nds32-e8.md: New file.
14509         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
14510         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
14511         pipeline.
14512         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
14513         * config/nds32/nds32.md (pipeline_model): Add e8.
14514         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
14515         * config/nds32/pipelines.md: Include e8 settings.
14517 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14518             Chung-Ju Wu  <jasonwucj@gmail.com>
14520         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
14521         * config/nds32/nds32-n8.md: New file.
14522         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
14523         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
14524         pipeline.
14525         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
14526         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
14527         * config/nds32/nds32.md (pipeline_model): Add n8.
14528         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
14529         * config/nds32/pipelines.md: Include n8 settings.
14531 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14532             Chung-Ju Wu  <jasonwucj@gmail.com>
14534         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
14535         * config/nds32/nds32-n9-2r1w.md: New file.
14536         * config/nds32/nds32-n9-3r2w.md: New file.
14537         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
14538         nds32_register_ports): New or modify for cpu n9.
14539         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
14540         pipeline.
14541         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
14542         * config/nds32/nds32-utils.c: New file.
14543         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
14544         TARGET_MUL_SLOW): Define.
14545         * config/nds32/nds32.md (pipeline_model): New attribute.
14546         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
14547         New options that support cpu n9.
14548         * config/nds32/pipelines.md: Include n9 settings.
14549         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
14551 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
14553         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
14554         information if necessary.
14555         (output_cond_branch_compare_zero): Likewise.
14556         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
14557         (nds32_target_alignment): Refine for alignment.
14558         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
14559         (FUNCTION_BOUNDARY): Modify.
14560         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
14561         align case.
14562         * config/nds32/nds32.opt (malways-align, malign-functions): New.
14564 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
14566         * config/nds32/constants.md (unspec_volatile_element): Add values for
14567         TLB operation and data prefetch.
14568         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14569         functions for TLB operation and data prefetch.
14570         * config/nds32/nds32-intrinsic.md: Likewise.
14571         * config/nds32/nds32_intrinsic.h: Likewise.
14572         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
14573         (nds32_print_operand): Likewise.
14574         * config/nds32/nds32.h (nds32_builtins): Likewise.
14576 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
14577         Andrew Pinski <pinsika@gcc.gnu.org>
14579         PR middle-end/82976
14580         * match.pd: Use constant_boolean_node of correct type instead of
14581         boolean_true_node or boolean_false_node for simplifying
14582         pointer comparisons to zero.
14584 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
14586         PR tree-optimization/80021
14587         * tree.c (verify_type_variant): Make error call in verify_variant_match
14588         translatable and remove final full stop.
14590 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14592         * config/nds32/constants.md (unspec_volatile_element): Add
14593         UNSPEC_VOLATILE_EH_RETURN.
14594         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
14595         nds32_output_stack_pop): Support dwarf exception handling process.
14596         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
14597         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
14598         exception handling process.
14599         (nds32_compute_stack_frame): Likewise.
14600         (nds32_return_addr_rtx): Likewise.
14601         (nds32_initial_elimination_offset): Likewise.
14602         (nds32_expand_prologue): Likewise.
14603         (nds32_expand_epilogue): Likewise.
14604         (nds32_dynamic_chain_address): New function.
14605         * config/nds32/nds32.h (machine_function): Add fields for dwarf
14606         exception handling.
14607         (DYNAMIC_CHAIN_ADDRESS): Define.
14608         (EH_RETURN_DATA_REGNO): Define.
14609         (EH_RETURN_STACKADJ_RTX): Define.
14610         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
14611         patterns for dwarf exception handling.
14613 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14615         * config/nds32/nds32.h: Clean up obsolete macros.
14617 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14619         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14620         Add enum values for particular instructions.
14621         * config/nds32/nds32-intrinsic.c: Implementation of expanding
14622         particular intrinsic functions.
14623         * config/nds32/nds32-intrinsic.md: Likewise.
14624         * config/nds32/nds32_intrinsic.h: Likewise.
14625         * config/nds32/nds32.h (nds32_builtins): Likewise.
14626         * config/nds32/nds32.md (type): Add pbsad and pbsada.
14627         (btst, ave): New patterns for particular instructions.
14629 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14631         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14632         Add enum values for atomic load/store and memory sync.
14633         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
14634         and memory sync.
14635         * config/nds32/nds32-intrinsic.md: Likewise.
14636         * config/nds32/nds32_intrinsic.h: Likewise.
14637         * config/nds32/nds32.h (nds32_builtins): Likewise.
14639 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
14641         PR tree-optimization/85257
14642         * fold-const.c (native_encode_vector): If not all elts could fit
14643         and off is -1, return 0 rather than offset.
14644         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
14645         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
14646         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
14647         adjust buffer in native_interpret_expr call.
14649 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14651         * config/nds32/constants.md (unspec_volatile_element): Add cache
14652         control enum values.
14653         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
14654         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
14655         * config/nds32/nds32.c (nds32_cctl_names): New.
14656         (nds32_print_operand): Handle cache control register names.
14657         * config/nds32/nds32.h (nds32_builtins): New enum values.
14658         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
14659         macros.
14660         * config/nds32/nds32.md (type): Add mmu.
14661         * config/nds32/pipelines.md (simple_insn): Add mmu.
14663 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14665         * config/nds32/nds32.md (type): Remove call.
14666         * config/nds32/pipelines.md (simple_insn): Likewise.
14668 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14670         * config/nds32/constants.md (unspec_volatile_element): Add
14671         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
14672         UNSPEC_VOLATILE_FMFCFG.
14673         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
14674         description for fmfcfg and fmfcsr.
14675         (bdesc_1arg): Add fmtcsr.
14676         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
14677         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
14678         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
14679         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
14680         unspec_fmfcfg): New patterns.
14681         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
14682         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
14683         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
14684         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
14685         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
14686         __nds32__fmfcfg): Define.
14688 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14690         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
14691         intrinsic register names.
14692         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
14693         intrinsic register enum values and macros.
14695 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14697         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
14698         for load/store addressing form.
14699         (nds32_print_operand_address): Likewise.
14701 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
14703         PR target/85196
14704         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
14705         based on LABEL_REF.  Remove useless assertion.
14706         (pic_address_needs_scratch): Fix formatting.
14707         (sparc_legitimize_pic_address): Minor tweaks.
14708         (sparc_delegitimize_address): Adjust assertion accordingly.
14709         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
14710         into symbolic_operand.
14711         (movsi_high_pic_label_ref): Likewise.
14712         (movsi_lo_sum_pic_label_ref): Likewise.
14713         (movdi_pic_label_ref): Likewise.
14714         (movdi_high_pic_label_ref): Likewise.
14715         (movdi_lo_sum_pic_label_ref): Likewise.
14717 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
14719         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
14720         custom LIB_SPEC setup.
14722 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
14723             Kito Cheng  <kito.cheng@gmail.com>
14725         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
14726         * config/riscv/freebsd.h: New.
14728 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
14730         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
14731         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
14732         file.
14734 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
14735             Kito Cheng  <kito.cheng@gmail.com>
14737         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
14738         nds32_output_call, nds32_symbol_binds_local_p): New functions.
14739         * config/nds32/nds32-protos.h (nds32_output_call,
14740         nds32_output_return): Declare.
14741         * config/nds32/nds32.md: Refine all the call and return patterns.
14743 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
14745         PR debug/85252
14746         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
14747         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
14749         PR rtl-optimization/84872
14750         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
14751         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
14752         EDGE_CROSSING edge.
14754 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
14756         * expr.c (copy_blkmode_to_reg): Revert 254862.
14757         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
14759 2018-04-06  Richard Biener  <rguenther@suse.de>
14761         PR middle-end/85244
14762         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
14763         after seeing a component reference with an adjacent field.  Treat
14764         refs to arrays at struct end of external decls similar to
14765         refs to unconstrained commons.
14767 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
14769         PR sanitizer/85213
14770         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
14771         look through SAVE_EXPRs with non-side-effects argument.  Adjust
14772         recursive calls.
14773         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
14774         save_p here.
14776 2018-04-06  Richard Biener  <rguenther@suse.de>
14778         PR middle-end/85180
14779         * alias.c (find_base_term): New wrapper around find_base_term
14780         unwinding CSELIB_VAL_PTR changes.
14781         (find_base_term): Do not restore CSELIB_VAL_PTR during the
14782         recursion.
14784 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14786         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
14787         instructions.
14788         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
14789         constant definitions.
14790         ("nop"): lr 0,0 -> nopr r0
14791         ("nop_lr0", "nop_lr1"): New insn definitions.
14793 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
14795         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
14796         NDS32_V3PUSH_AVAILABLE_P macro.
14798 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
14799             Chung-Ju Wu  <jasonwucj@gmail.com>
14801         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
14802         (nds32*-*-*): Add float and fpu_config into supported_defaults.
14803         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
14804         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
14805         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
14806         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
14807         * config/nds32/constraints.md: New constraints and checking for hard
14808         float configuration.
14809         * config/nds32/iterators.md: New mode iterator and attribute for hard
14810         float configuration.
14811         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
14812         patterns.
14813         * config/nds32/nds32-fpu.md: New file.
14814         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
14815         deal with hard float code generation.
14816         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
14817         ARCH_V3S.
14818         (abi_type, float_reg_number): New enum type.
14819         * config/nds32/nds32-predicates.c: New predicates for hard float.
14820         * config/nds32/nds32-protos.h: Declare functions for hard float.
14821         * config/nds32/nds32.c: Implementation for hard float configuration.
14822         * config/nds32/nds32.h: Definitions for hard float configuration.
14823         * config/nds32/nds32.md: Include hard float machine description and
14824         modify patterns for hard float configuration.
14825         * config/nds32/nds32.opt: New options for hard float configuration.
14826         * config/nds32/predicates.md: New predicates for hard float
14827         configuration.
14829 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
14831         * common/config/nds32/nds32-common.c
14832         (nds32_option_optimization_table): Enable -mreleax-hint by default.
14834 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
14836         PR middle-end/85195
14837         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
14838         CONSTRUCTOR_ELT (ctor, ...)->value.
14840 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
14842         PR target/85193
14843         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
14845 2018-04-05  Tom de Vries  <tom@codesourcery.com>
14847         PR target/85204
14848         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
14849         cond jump.
14851 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
14852             Kito Cheng  <kito.cheng@gmail.com>
14854         * config/nds32/constraints.md (U33): Fine-tune checking condition.
14855         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
14856         * config/nds32/nds32.h (nds32_16bit_address_type): Add
14857         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
14859 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
14860             Kito Cheng  <kito.cheng@gmail.com>
14862         * config/nds32/constraints.md (Ufe): New memory constraint.
14863         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
14864         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
14865         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
14866         operands.
14867         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
14868         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
14870 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14872         * config/nds32/nds32.md: Use optimize_size in the condition for
14873         alu-shift instructions.
14875 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14877         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
14879 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14881         * config/nds32/nds32.md (negsi2): Refine pattern.
14883 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
14884             Chung-Ju Wu  <jasonwucj@gmail.com>
14886         * config/nds32/iterators.md (shift_rotate): New code iterator.
14887         (shift): New code attribute.
14888         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
14889         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
14890         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
14891         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
14892         bit-wise operations.
14893         (andsi3, *andsi3): Ditto.
14894         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
14895         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
14896         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
14897         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
14898         nds32_ior_operand, nds32_xor_operand): New predicates.
14900 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14902         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
14903         (addsi3, subsi3): ... this.
14905 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14907         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
14909 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14911         * config/nds32/nds32.md: Adjust indention.
14913 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
14915         * config/nds32/nds32.md (feature): New attribute.
14917 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14919         * config/nds32/nds32.md (subtype): New attribute.
14921 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14923         PR target/85203
14924         * config/arm/arm-builtins.c (arm_expand_builtin): Change
14925         expansion to perform a bitwise AND of the argument followed by a
14926         boolean negation of the result.
14928 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
14930         PR rtl-optimization/84878
14931         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
14932         the basic block.  Assert the use reference is not artificial and that
14933         it has an associated insn.
14935 2018-04-04  Michael Matz  <matz@suse.de>
14937         * builtins.c (compute_objsize): Pass correct operand
14938         to array_at_struct_end_p.
14940 2018-04-04  Richard Biener  <rguenther@suse.de>
14942         PR lto/85176
14943         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
14944         from contexts for DINFO_LEVEL_TERSE and below.
14946 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
14948         * config/nds32/nds32-doubleword.md (move_<mode>): Require
14949         resiter_operand condition.
14950         * config/nds32/nds32.md (*move<mode>): Ditto.
14952 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
14953             Monk Chiang  <sh.chiang04@gmail.com>
14955         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
14957 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
14959         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
14961 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
14962             Kito Cheng  <kito.cheng@gmail.com>
14964         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
14965         nds32_cond_code_str, output_cond_branch,
14966         output_cond_branch_compare_zero, nds32_expand_cbranch,
14967         nds32_expand_cstore, nds32_expand_movcc,
14968         nds32_output_cbranchsi4_equality_zero,
14969         nds32_output_cbranchsi4_equality_reg,
14970         nds32_output_cbranchsi4_equality_reg_or_const_int,
14971         nds32_output_cbranchsi4_greater_less_zero: New functions.
14972         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
14973         nds32_expand_cstore, nds32_expand_movcc,
14974         nds32_output_cbranchsi4_equality_zero,
14975         nds32_output_cbranchsi4_equality_reg,
14976         nds32_output_cbranchsi4_equality_reg_or_const_int,
14977         nds32_output_cbranchsi4_greater_less_zero): Declare.
14978         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
14979         nds32_rimm11s_operand): New predicates.
14980         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
14981         * config/nds32/nds32.md: Rewrite all the branch and conditional move
14982         patterns.
14984 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
14986         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
14987         * config/nds32/nds32.md: Ditto.
14988         * config/nds32/pipelines.md: Ditto.
14990 2018-04-04  Richard Biener  <rguenther@suse.de>
14992         PR tree-optimization/85168
14993         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
14994         propagating abnormals.
14996 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
14998         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15000 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15001             Kito Cheng  <kito.cheng@gmail.com>
15003         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15004         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15005         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15006         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15007         * config/nds32/nds32.md (sibcall_internal): New.
15008         (sibcall_register): Remove.
15009         (sibcall_immediate): Remove.
15010         (sibcall_value_internal): New.
15011         (sibcall_value_register): Remove.
15012         (sibcall_value_immediate): Remove.
15013         * config/nds32/predicates.md (nds32_general_register_operand): New.
15014         (nds32_call_address_operand): New.
15016 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
15018         PR rtl-optimization/85167
15019         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15020         bb_defs if *split_p, instead preinitialize it to NULL.
15022         PR tree-optimization/85156
15023         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15024         evaluating the argument multiple times.
15026 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
15028         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15029         than vector.
15030         (_mm_cvtpd_ps): Likewise.
15031         (_mm_cvttpd_epi32): Likewise.
15032         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15033         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15034         vector, pixel, and bool following altivec.h include.
15036 2018-04-03  Martin Sebor  <msebor@redhat.com>
15038         * doc/extend.texi (Common Function Attributes): Clarify.
15039         (const attribute): Likewise.
15040         (pure attribute): Likewise.
15042 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
15044         PR target/85169
15045         * config/i386/i386.c (ix86_expand_vector_set): Use
15046         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
15048 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
15050         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15051         instructions when changing rounding bits to preserve precision bits
15052         in the x87 control word.
15054 2018-04-03  Martin Liska  <mliska@suse.cz>
15056         PR tree-optimization/82491
15057         * rtl.h (strip_offset_and_add): Replace += suboffset with
15058         poly_uint64 () + suboffset.
15060 2018-03-29  Martin Liska  <mliska@suse.cz>
15061             Martin Jambor  <mjambor@suse.cz>
15063         PR ipa/84947
15064         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15065         param_type is not an integral or pointer type.
15067 2018-04-03  Richard Biener  <rguenther@suse.de>
15069         * sese.h (recompute_all_dominators): Remove.
15071 2018-04-02  Martin Sebor  <msebor@redhat.com>
15073         * doc/invoke.texi (-Wrestrict): Fix typos.
15075 2018-04-02  Jim Wilson  <jimw@sifive.com>
15077         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15078         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15079         (<optab>di3, <optab>si3_extend): Likewise.
15080         (<optab>si3_mask, <optab>si3_mask_1): New.
15081         (<optab>di3_mask, <optab>di3_mask_1): New.
15082         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15083         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15084         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15086 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
15088         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15089         example.
15091 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
15093         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15094         (nds32_canonicalize_comparison): New function.
15096 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15097             Kito Cheng  <kito.cheng@gmail.com>
15098             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
15100         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15101         * config/nds32/constants.md (unspec_volatile_element): Add
15102         UNSPEC_VOLATILE_RELAX_GROUP.
15103         * config/nds32/nds32-relax-opt.c: New file.
15104         * config/nds32/nds32-predicates.c
15105         (nds32_symbol_load_store_p): New function.
15106         * config/nds32/nds32-protos.h
15107         (nds32_symbol_load_store_p): Declare function.
15108         (make_pass_nds32_relax_opt): Declare new rtl pass function.
15109         * config/nds32/nds32.c
15110         (nds32_register_pass): New function to register pass.
15111         (nds32_register_passes): New function to register passes.
15112         * config/nds32/nds32.md (relax_group): New pattern.
15113         * config/nds32/nds32.opt (mrelax-hint): New option.
15114         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15116 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
15118         * config/nds32/t-nds32: Modify files dependency.
15120 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15122         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15123         (PROFILE_HOOK): Define its implementation.
15125 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15127         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15128         type and 32-bit size.
15130 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
15132         PR middle-end/85090
15133         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15134         (V_128_256): New mode iterator.
15135         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15136         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15137         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15138         of V.
15139         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15140         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15142 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
15144         PR target/83315
15145         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15146         NaN inputs correctly.
15148 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
15150         PR target/80546
15151         * config/rs6000/vsx.md (??r): New mode attribute.
15152         (*vsx_mov<mode>_64bit): Use it.
15153         (*vsx_mov<mode>_32bit): Likewise.
15155 2018-03-30  Martin Sebor  <msebor@redhat.com>
15157         PR tree-optimization/84818
15158         * builtins.c (check_access): Use warning_n.
15160 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15162         PR target/83822
15163         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15164         condition.
15165         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15166         condition.
15168 2018-03-30  Julia Koval  <julia.koval@intel.com>
15170         PR target/84413
15171         * x86-tune.def (movx, partial_reg_dependency): Enable for
15172         m_SKYLAKE_AVX512.
15174 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
15176         PR inline-asm/84985
15177         * lra-constraints.c (process_alt_operands): Move setting
15178         this_alternative_matches below.
15180 2018-03-29  Martin Liska  <mliska@suse.cz>
15182         PR lto/84995.
15183         * doc/invoke.texi: Document how LTO works with debug info.
15184         Describe auto-load support of binutils.  Mention 'x86-64'
15185         as valid option value of -march option.
15187 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
15189         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15191         PR c/85094
15192         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15193         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15194         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15195         checking.
15197 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
15199         PR target/84912
15200         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15201         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15202         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15203         for RS6000_BTM_POWERPC64.
15204         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15205         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15206         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15207         definition.
15208         (DIVDE): Use it.
15209         (DIVDEU): Likewise.
15211 2018-03-28  Carl Love  <cel@us.ibm.com>
15213         Revert
15214         2017-09-27  Carl Love  <cel@us.ibm.com>
15216         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15217         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15218         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15219         fctiw instruction.
15221 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15223         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15224         instead of __vector bool.
15225         (_mm_max_pu8): Likewise.
15226         (_mm_min_pi16): Likewise.
15228 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
15230         PR target/84912
15231         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15232         (DIVWEUO): Likewise.
15233         (DIVDEO): Likewise.
15234         (DIVDEUO): Likewise.
15235         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15236         DIVWEUO and DIVDEUO.
15237         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15238         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15239         (div_extend): Likewise.
15240         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15241         builtin function.
15242         (__builtin_divweuo): Likewise.
15243         (__builtin_divdeo): Likewise.
15244         (__builtin_divdeuo): Likewise.
15246 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
15248         PR target/85095
15249         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15250         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15252         PR tree-optimization/82004
15253         * gimple-match-head.c (optimize_pow_to_exp): New function.
15254         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15255         Don't fold to exp if optimize_pow_to_exp is false.
15257 2018-03-28  Martin Liska  <mliska@suse.cz>
15259         PR other/84819
15260         * calls.c (initialize_argument_information): Fix trailing space.
15261         * common.opt: Fix typo and provide better explanation for
15262         -fsanitize-coverage option.
15263         * config/i386/i386.opt: Fix typo.
15265 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
15266             Martin Liska  <mliska@suse.cz>
15268         PR sanitizer/85081
15269         * gimplify.c (asan_poison_variable): Don't do the check for
15270         gimplify_omp_ctxp here.
15271         (gimplify_decl_expr): Do it here.
15272         (gimplify_target_expr): Likewise.
15274 2018-03-28  Martin Liska  <mliska@suse.cz>
15276         PR target/84988
15277         * config/i386/i386.c (ix86_function_arg_advance): Do not call
15278         chkp_type_bounds_count if MPX is not enabled.
15280 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
15282         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15284 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
15286         PR target/84914
15287         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15288         function to create the function decl for complex long double
15289         multiply and divide for -mabi=ieeelongdouble.
15290         (init_float128_ieee): Call it.
15292 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
15294         PR target/85044
15295         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15296         -fcf-protection=branch -mibt.
15297         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15299 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15301         PR target/81863
15302         * config/arm/arm.c (arm_valid_symbolic_address): Handle
15303         arm_word_relocations.
15305 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
15307         PR target/85056
15308         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15309         extern array declarations.
15311 2018-03-27  Richard Biener  <rguenther@suse.de>
15313         PR middle-end/84067
15314         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15315         explicit single_use checks.
15317 2018-03-27  Richard Biener  <rguenther@suse.de>
15319         PR tree-optimization/85082
15320         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15321         Valueize the VUSE.
15323 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15325         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15326         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15327         Turn on fasynchronous-unwind-tables and funwind-tables.
15329 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
15331         PR target/85073
15332         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15333         (*bmi_blsr_<mode>_ccz): Ditto.
15335 2018-03-26  Tom de Vries  <tom@codesourcery.com>
15337         PR tree-optimization/85063
15338         * omp-general.c (offloading_function_p): New function.  Factor out
15339         of ...
15340         * omp-offload.c (pass_omp_target_link::gate): ... here.
15341         * omp-general.h (offloading_function_p): Declare.
15342         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15343         with attribute omp declare target for offloading functions.
15345 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
15347         PR tree-optimization/84005
15348         * tree-data-ref.h (get_base_for_alignment): Declare.
15349         * tree-data-ref.c (get_base_for_alignment_1): New function.
15350         (get_base_for_alignment): Likewise.
15351         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15352         get_base_for_alignment to find a suitable base object, instead
15353         of always using drb->base_address.
15355 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
15357         PR inline-asm/85022
15358         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15359         known size by default.
15361 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
15363         PR inline-asm/85030
15364         * lra-constraints.c (process_alt_operands): Don't match BLKmode
15365         and non BLKmode operands.
15367 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15369         PR target/85026
15370         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15371         Clean up attributes.
15373 2018-03-23  Richard Biener  <rguenther@suse.de>
15375         PR debug/85020
15376         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15377         we are going to emit early debug for LTO.
15379 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
15381         PR inline-asm/85034
15382         * function.c (match_asm_constraints_1): Don't optimize if input
15383         doesn't satisfy general_operand predicate for output's mode.
15385         PR inline-asm/85022
15386         * alias.c (write_dependence_p): Don't require for x_canonicalized
15387         non-VOIDmode if x has VOIDmode.
15389         PR sanitizer/85029
15390         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
15391         just don't try to optimize it rather than assert it never happens.
15393 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15395         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
15396         macro expansions for definition of ST_INTERNAL_<mode> and
15397         LD_INTERNAL_<mode> builtins.
15398         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
15399         Remove prototype.
15400         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
15401         function.
15402         (altivec_expand_st_builtin): Likewise.
15403         (altivec_expand_builtin): Remove calls to deleted functions.
15404         (rs6000_address_for_altivec): Delete this function.
15405         * config/rs6000/vector.md: Remove expands for
15406         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
15408 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
15410         PR target/84826
15411         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
15412         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
15413         re-computing once computed.
15414         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
15415         (arm_init_machine_status): Initialize
15416         machine->static_chain_stack_bytes.
15418 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15420         PR target/84760
15421         * doc/extend.texi: Add four new prototypes for vec_ld.
15422         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15423         definitions for more logical presentation.
15424         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
15425         entries for V1TI variants of __builtin_altivec_ld builtin.
15426         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
15427         handling of V1TI variant of LVX icode pattern.
15428         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
15429         (rs6000_gimple_fold_builtin): Likewise.
15430         (altivec_init_builtins): Add code to define
15431         __builtin_altivec_lvx_v1ti function.
15433 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
15435         PR inline-asm/84941
15436         * function.c (match_asm_constraints_1): Don't do the optimization
15437         if input isn't a REG, SUBREG, MEM or constant.
15439 2018-03-22  Tom de Vries  <tom@codesourcery.com>
15441         PR tree-optimization/84956
15442         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
15443         bb_has_abnormal_pred.
15445 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
15447         PR sanitizer/85018
15448         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
15449         DECL_INITIAL (decl) to decl at the end.
15450         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
15451         adjust the comment.
15453 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
15455         * doc/extend.texi (__builtin_tgmath): Document when complex
15456         integer types are treated as _Complex _Float64.
15458 2018-03-21  Tom de Vries  <tom@codesourcery.com>
15460         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
15462 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
15464         PR tree-optimization/84960
15465         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
15466         if it is ENTRY block, move them into single succ of ENTRY in that case.
15468 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
15470         PR tree-optimization/84811
15471         * poly-int.h (poly_span_traits): Remove the T3 parameter and
15472         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
15473         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
15474         (known_subrange_p): Update accordingly.  Cast each value involved
15475         in the size comparison, rather than casting the result of the
15476         subtraction.
15478 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
15480         PR tree-optimization/84982
15481         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
15482         by flipping the least significant bit rather than all bits from
15483         bitpos to bitpos + bitsize - 1.
15485 2018-03-21  Nathan Sidwell  <nathan@acm.org>
15487         * doc/extend.texi (Deprecated Features): Remove mention of
15488         long-deleted deprecations.
15490 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15492         PR jit/84288
15493         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
15494         * configure: Regenerate.
15496 2018-03-21  Tom de Vries  <tom@codesourcery.com>
15498         PR tree-optimization/83126
15499         * tree-parloops.c (num_phis): New function.
15500         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
15502 2018-03-21  Nathan Sidwell  <nathan@acm.org>
15504         * doc/extend.texi (Deprecated Features): Update deprecated flags,
15505         mention anon-struct/union members and trailing attributes.
15507 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
15509         PR tree-optimization/84969
15510         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
15511         builtin memset partitions if they set different rhs values.
15513 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
15515         PR rtl-optimization/84989
15516         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
15517         VEC_DUPLICATE with scalar result mode.
15519 2018-03-21  Martin Liska  <mliska@suse.cz>
15521         PR ipa/84963
15522         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
15523         not intended return statement.
15525 2018-03-21  Martin Liska  <mliska@suse.cz>
15527         PR target/84988
15528         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
15529         (chkp_find_bound_slots_1): Limit number of iterations.
15531 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
15533         PR target/84838
15534         * Minor grammar fixes for x86 options.
15536 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
15538         PR debug/84875
15539         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
15540         holding REG_CFA_RESTORE notes, instead turn them into a USE.
15542 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
15544         PR target/83789
15545         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
15546         (altivec_lvx_<mode>_1op): Likewise.
15547         (altivec_stvx_<mode>_2op): Likewise.
15548         (altivec_stvx_<mode>_1op): Likewise.
15549         (altivec_lvx_<VM2:mode>): New define_expand.
15550         (altivec_stvx_<VM2:mode>): Likewise.
15551         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
15552         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15553         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
15554         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15555         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
15556         (rs6000_gen_lvx): Likewise.
15557         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
15558         (altivec_expand_stv_builtin): Likewise.
15559         (altivec_expand_builtin): Likewise.
15560         * config/rs6000/vector.md: Likewise.
15562 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15564         PR target/82518
15565         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
15566         BYTES_BIG_ENDIAN.
15568 2018-03-20  Richard Biener  <rguenther@suse.de>
15570         PR target/84986
15571         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
15572         sign-conversions as zero, fall back to standard scalar_stmt
15573         cost for the rest.
15575 2018-03-20  Martin Liska  <mliska@suse.cz>
15577         PR ipa/84825
15578         * predict.c (rebuild_frequencies): Handle case when we have
15579         PROFILE_ABSENT, but flag_guess_branch_prob is false.
15581 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
15583         PR target/84990
15584         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
15585         flag_section_anchors.
15586         * varasm.c (use_blocks_for_decl_p): Remove hack for
15587         dw2_force_const_mem.
15589         PR target/84845
15590         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
15591         to ...
15592         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
15593         be created, use lowpart_subreg of operands[0] rather than operands[0]
15594         itself.
15595         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
15596         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
15597         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
15598         and n constraint instead of aarch64_shift_imm_di and Usd.
15599         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
15600         (*aarch64_<optab>_reg_minus<mode>3): ... this.
15602 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
15604         PR target/82989
15605         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
15606         to favor GPR over NEON registers.
15607         (<shift>di3_neon): Likewise.
15609 2018-03-20  Tom de Vries  <tom@codesourcery.com>
15611         PR target/84952
15612         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
15613         (nvptx_process_pars): Emit bar.sync asap and alap.
15615 2018-03-20  Tom de Vries  <tom@codesourcery.com>
15617         PR target/84954
15618         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
15619         seen_label if seen_label is already set.
15621 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
15623         PR target/84945
15624         * config/i386/i386.c (fold_builtin_cpu): For features above 31
15625         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
15626         Use 1U instead of 1.  Formatting fixes.
15628         PR c/84953
15629         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
15630         instead of TREE_TYPE (s1) for the return value.
15632 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
15634         PR tree-optimization/84946
15635         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
15636         bitsize + bitsize in poly_uint64 rather than poly_int64.
15638         PR sanitizer/78651
15639         * dwarf2asm.c: Include fold-const.c.
15640         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
15641         of decl rather than decl itself.
15643         PR rtl-optimization/84643
15644         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
15646 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
15648         PR sanitizer/78651
15649         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
15650         calling assemble_variable.
15652 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
15654         PR target/81647
15655         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
15656         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
15658 2018-03-19  Jim Wilson  <jimw@sifive.com>
15660         PR bootstrap/84856
15661         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
15662         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
15663         (riscv_first_stack_step): Likewise.
15664         (riscv_option_override): Use STACK_BOUNDARY instead of
15665         MIN_STACK_BOUNDARY.
15666         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
15667         MIN_STACK_BOUNDARY.
15668         (BIGGEST_ALIGNMENT): Set to 128.
15669         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
15670         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
15671         STACK_BOUNDARY.
15673 2018-03-19  Richard Biener  <rguenther@suse.de>
15675         PR tree-optimization/84933
15676         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
15677         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
15679 2018-03-19  Richard Biener  <rguenther@suse.de>
15681         PR tree-optimization/84859
15682         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
15683         (cond_if_else_store_replacement): Perform sinking operation on
15684         single-store BBs regardless of MAX_STORES_TO_SINK setting.
15685         Generalize what a BB with a single eligible store is.
15687 2018-03-19  Richard Biener  <rguenther@suse.de>
15689         PR tree-optimization/84929
15690         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
15691         chrec_is_positive against non-chrec arg.
15693 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
15695         PR target/84711
15696         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
15698 2018-03-18  Martin Liska  <mliska@suse.cz>
15700         PR rtl-optimization/84635
15701         * regrename.c (build_def_use): Use matches_mode only when
15702         matches >= 0.
15704 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
15706         PR tree-optimization/84913
15707         * tree-vect-loop.c (vectorizable_reduction): Don't try to
15708         vectorize chains of COND_EXPRs.
15710 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
15712         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
15714 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
15716         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
15718 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
15720         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
15722 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
15723             Kito Cheng  <kito.cheng@gmail.com>
15725         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
15726         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
15727         (nds32_adjust_reg_alloc_order): New function.
15728         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
15730 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
15732         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
15733         nds32_print_operand, nds32_print_operand_address): Use
15734         HOST_WIDE_INT_PRINT_DEC instead.
15736 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
15738         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
15740 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
15742         PR target/84902
15743         * config/i386/i386.c (initial_ix86_tune_features,
15744         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
15745         unsigned long long.
15746         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
15747         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
15748         rather than 1u << ix86_tune.  Formatting fix.
15749         (ix86_option_override_internal): Change ix86_arch_mask from
15750         unsigned int to unsigned HOST_WIDE_INT, initialize to
15751         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
15752         (ix86_function_specific_restore): Likewise.
15754 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
15756         PR target/84899
15757         * postreload.c (reload_combine_recognize_pattern): Perform
15758         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
15759         truncate_int_for_mode the result for the destination's mode.
15761         PR c/84909
15762         * hsa-gen.c (mem_type_for_type): Fix comment typo.
15763         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
15764         Likewise.
15765         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15766         Likewise.
15768 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
15770         PR target/84876
15771         * lra-assigns.c (lra_split_hard_reg_for): Don't use
15772         regno_allocno_class_array and sorted_pseudos.
15773         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
15774         insns where regno is used.
15776 2018-03-16  Martin Liska  <mliska@suse.cz>
15778         PR ipa/84833
15779         * multiple_target.c (create_dispatcher_calls): Redirect
15780         reference in the symbol table.
15782 2018-03-16  Martin Liska  <mliska@suse.cz>
15784         PR ipa/84722
15785         * multiple_target.c (create_dispatcher_calls): Redirect also
15786         an alias.
15788 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
15790         PR c++/79937
15791         PR c++/82410
15792         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
15793         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
15794         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
15796 2018-03-16  Julia Koval  <julia.koval@intel.com>
15798         * doc/invoke.texi (Skylake Server): Add CLWB.
15799         Cannonlake): Remove CLWB.
15801 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
15803         PR tree-optimization/84841
15804         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
15805         1 << 3.
15806         (FLOAT_ONE_CONST_TYPE): Define.
15807         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
15808         (sort_by_operand_rank): Put entries with higher constant_type last
15809         rather than first to match comments.
15811 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
15813         * config/nios2/nios2.md (movsi_internal): Fix thinko in
15814         split predicate.
15816 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
15818         PR c++/79085
15819         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
15820         check and use address of target always.
15822 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
15824         PR target/84574
15825         * config/i386/i386.c (indirect_thunk_needed): Update comments.
15826         (indirect_thunk_bnd_needed): Likewise.
15827         (indirect_thunks_used): Likewise.
15828         (indirect_thunks_bnd_used): Likewise.
15829         (indirect_return_needed): New.
15830         (indirect_return_bnd_needed): Likewise.
15831         (output_indirect_thunk_function): Add a bool argument for
15832         function return.
15833         (output_indirect_thunk_function): Don't generate alias for
15834         function return thunk.
15835         (ix86_code_end): Call output_indirect_thunk_function to generate
15836         function return thunks.
15837         (ix86_output_function_return): Set indirect_return_bnd_needed
15838         and indirect_return_needed instead of indirect_thunk_bnd_needed
15839         and indirect_thunk_needed.
15841 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
15843         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
15844         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
15845         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
15847 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
15848             Paul Hua <paul.hua.gm@gmail.com>
15850         PR c/84852
15851         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
15853 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
15855         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
15856         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
15857         resp. SFmode cases.
15859 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
15861         PR target/84711
15862         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
15863         instead of GET_MODE_SIZE when comparing Units.
15865 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
15867         PR target/68256
15868         * varasm.c (hash_section): Return an unchangeble hash value
15869         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
15870         Return !aarch64_can_use_per_function_literal_pools_p ().
15872 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
15874         PR target/84860
15875         * optabs.c (emit_conditional_move): Pass address of cmode's copy
15876         rather than address of cmode as last argument to prepare_cmp_insn.
15878 2018-03-15  Julia Koval  <julia.koval@intel.com>
15880         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
15881         F_AVX512VNNI, F_AVX512BITALG): New.
15883 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
15885         PR target/83451
15886         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
15887         insn for floating-point loads and stores.
15889 2018-03-14  Carl Love  <cel@us.ibm.com>
15891         * config/rs6000/rs6000-c.c: Add macro definitions for
15892         ALTIVEC_BUILTIN_VEC_PERMXOR.
15893         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
15894         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
15895         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
15896         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
15897         UNSPEC_VPERMXOR.
15898         * config/doc/extend.texi: Add prototypes for vec_permxor.
15900 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
15902         PR c/84852
15903         * diagnostic-show-locus.c (class layout_point): Convert m_line
15904         from int to linenum_type.
15905         (line_span::comparator): Use linenum "compare" function when
15906         comparing line numbers.
15907         (test_line_span): New function.
15908         (layout_range::contains_point): Convert param "row" from int to
15909         linenum_type.
15910         (layout_range::intersects_line_p): Likewise.
15911         (layout::will_show_line_p): Likewise.
15912         (layout::print_source_line): Likewise.
15913         (layout::should_print_annotation_line_p): Likewise.
15914         (layout::print_annotation_line): Likewise.
15915         (layout::print_leading_fixits): Likewise.
15916         (layout::annotation_line_showed_range_p): Likewise.
15917         (struct line_corrections): Likewise for field m_row.
15918         (line_corrections::line_corrections): Likewise for param "row".
15919         (layout::print_trailing_fixits): Likewise.
15920         (layout::get_state_at_point): Likewise.
15921         (layout::get_x_bound_for_row): Likewise.
15922         (layout::print_line): Likewise.
15923         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
15924         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
15925         * input.c (selftest::test_linenum_comparisons): New function.
15926         (selftest::input_c_tests): Call it.
15927         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
15928         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
15929         * selftest.h (ASSERT_GT): New macro.
15930         (ASSERT_GT_AT): New macro.
15931         (ASSERT_LT): New macro.
15932         (ASSERT_LT_AT): New macro.
15934 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
15936         PR rtl-optimization/84780
15937         * combine.c (distribute_links): Don't make a link based on pc_rtx.
15939 2018-03-14  Martin Liska  <mliska@suse.cz>
15941         * tree.c (record_node_allocation_statistics): Use
15942         get_stats_node_kind.
15943         (get_stats_node_kind): New function extracted from
15944         record_node_allocation_statistics.
15945         (free_node): Use get_stats_node_kind.
15947 2018-03-14  Richard Biener  <rguenther@suse.de>
15949         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
15950         that the value-set of ANTIC_IN doesn't grow.
15952         Revert
15953         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15954         member.
15955         (BB_VISITED_WITH_VISITED_SUCCS): New define.
15956         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15958 2018-03-14  Julia Koval  <julia.koval@intel.com>
15960         * config.gcc (icelake-client, icelake-server): New.
15961         (icelake): Remove.
15962         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
15963         (initial_ix86_arch_features): Ditto.
15964         (PTA_SKYLAKE): Add SGX.
15965         (PTA_ICELAKE): Remove.
15966         (PTA_ICELAKE_CLIENT): New.
15967         (PTA_ICELAKE_SERVER): New.
15968         (ix86_option_override_internal): Split up icelake on icelake client and
15969         icelake server.
15970         (get_builtin_code_for_version): Ditto.
15971         (fold_builtin_cpu): Ditto.
15972         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
15973         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
15974         * config/i386/i386.h (processor_type): Ditto.
15975         * doc/invoke.texi: Ditto.
15977 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
15979         PR sanitizer/83392
15980         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
15981         INTEGER_CST offset, add it together with bitpos / 8 and
15982         sign extend based on POINTER_SIZE.
15984         PR target/84844
15985         Revert
15986         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
15988         PR target/78090
15989         * config/i386/constraints.md (Yc): New register constraint.
15990         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
15991         Use Yc constraint for alternative 2 of operand 0.  Remove
15992         preferred_for_speed attribute.
15994 2018-03-14  Richard Biener  <rguenther@suse.de>
15996         PR tree-optimization/84830
15997         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
15998         with the old one to avoid oscillations.
16000 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
16002         PR target/83712
16003         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16004         pseudos.
16005         (assign_by_spills): Return a flag of reload assignment failure.
16006         Do not process the reload assignment failures.  Do not spill other
16007         reload pseudos if they has the same reg class.  Update n if
16008         necessary.
16009         (lra_assign): Add a return arg.  Set up from the result of
16010         assign_by_spills call.
16011         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16012         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16013         usage_insns if it is not NULL.
16014         (spill_hard_reg_in_range): New function.
16015         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16016         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16017         function prototypes.
16018         (lra_assign): Change prototype.
16019         * lra.c (lra): Add code to deal with fails by splitting hard reg
16020         live ranges.
16022 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
16024         * config/riscv/riscv.opt (mrelax): New option.
16025         * config/riscv/riscv.c (riscv_file_start): Emit ".option
16026         "norelax" when riscv_mrelax is disabled.
16027         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16029 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16031         PR target/84743
16032         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16033         reassociation for int modes.
16035 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16037         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16038         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16039         for big-endian.
16040         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16041         * config/aarch64/aarch64-sve.md
16042         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16043         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16044         (*extend<mode><Vwide>2): Rename to...
16045         (aarch64_sve_extend<mode><Vwide>2): ...this.
16046         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16047         renaming the old pattern to...
16048         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
16049         unsigned packs.
16050         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16051         define_expand, renaming the old pattern to...
16052         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16053         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16054         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16055         account when deciding which SVE instruction the optab should use.
16056         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16058 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16060         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16061         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16062         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16063         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16064         (tlsdesc_small_<mode>): Turn a define_expand and use
16065         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
16066         (tlsdesc_small_advsimd_<mode>): ...this.
16067         (tlsdesc_small_sve_<mode>): New pattern.
16069 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16071         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16072         (UNSPEC_UMUL_HIGHPART): New constants.
16073         (MUL_HIGHPART): New int iteraor.
16074         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16075         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16076         define_expand.
16077         (*<su>mul<mode>3_highpart): New define_insn.
16079 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
16081         PR lto/84805
16082         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16083         incomplete types.
16085 2018-03-13  Martin Liska  <mliska@suse.cz>
16087         PR ipa/84658.
16088         * (sem_item_optimizer::sem_item_optimizer): Initialize new
16089         vector.
16090         (sem_item_optimizer::~sem_item_optimizer): Release it.
16091         (sem_item_optimizer::merge_classes): Register variable aliases.
16092         (sem_item_optimizer::fixup_pt_set): New function.
16093         (sem_item_optimizer::fixup_points_to_sets): Likewise.
16094         * ipa-icf.h: Declare new variables and functions.
16096 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
16098         PR middle-end/84834
16099         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16100         integer_pow2p@2 and test integer_pow2p in condition.
16101         (A < 0 ? C : 0): Similarly for @1.
16103         PR middle-end/84831
16104         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16105         characters starting at p contain '\0' character, don't look beyond
16106         that.
16108         PR target/84827
16109         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16110         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16112         PR target/84828
16113         * reg-stack.c (change_stack): Change update_end var from int to
16114         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16115         also call set_block_for_insn on the newly added insns and rescan.
16117         PR target/84786
16118         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16119         on the last operand.
16121         PR c++/84704
16122         * tree.c (stabilize_reference_1): Return save_expr (e) for
16123         STATEMENT_LIST even if it doesn't have side-effects.
16125 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
16127         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16129 2018-03-12  Renlin Li  <renlin.li@arm.com>
16131         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16132         aarch64_output_scalar_simd_mov_immediate.
16134 2018-03-12  Martin Sebor  <msebor@redhat.com>
16136         PR tree-optimization/83456
16137         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16138         for perfectly overlapping calls to memcpy.
16139         (gimple_fold_builtin_memory_chk): Same.
16140         (gimple_fold_builtin_strcpy): Handle no-warning.
16141         (gimple_fold_builtin_stxcpy_chk): Same.
16142         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16144 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
16146         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16147         parameter.  Use it for SFmode.
16148         (rs6000_function_arg_advance_1): Adjust.
16149         (rs6000_function_arg): Adjust.
16150         (rs6000_gimplify_va_arg): Pass false for that new parameter.
16152 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
16154         PR rtl-optimization/84169
16155         PR rtl-optimization/84780
16156         * combine.c (can_combine_p): Check for a 2-insn combination whether
16157         the destination register is used between the two insns, too.
16159 2018-03-12  Richard Biener  <rguenther@suse.de>
16161         PR tree-optimization/84803
16162         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16163         for refs DR analysis didn't process.
16165 2018-03-12  Richard Biener  <rguenther@suse.de>
16167         PR tree-optimization/84777
16168         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16169         force-vectorize loops ignore whether we are optimizing for size.
16171 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
16173         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16174         (TARGET_MD_ASM_ADJUST): Define.
16176 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
16177             Kito Cheng  <kito.cheng@gmail.com>
16178             Chung-Ju Wu  <jasonwucj@gmail.com>
16180         * config/nds32/nds32.c (nds32_compute_stack_frame,
16181         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16182         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16183         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16184         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16185         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16186         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16187         * config/nds32/nds32.md (prologue, epilogue): Use macro
16188         NDS32_V3PUSH_AVAILABLE_P to do checking.
16190 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
16192         PR debug/58150
16193         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16194         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16195         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
16196         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
16197         addition of most attributes on !orig_type_die or the attribute not
16198         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16200 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16201             Chung-Ju Wu  <jasonwucj@gmail.com>
16203         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16204         __NDS32_VH__ macro.
16205         * config/nds32/nds32.opt (mvh): New option.
16207 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16208             Chung-Ju Wu  <jasonwucj@gmail.com>
16210         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16211         function.
16212         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16213         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16214         definition.
16216 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16217             Chung-Ju Wu  <jasonwucj@gmail.com>
16219         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16220         function.
16221         * config/nds32/nds32-multiple.md (strlensi): New pattern.
16222         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16224 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
16225             Kito Cheng  <kito.cheng@gmail.com>
16226             Chung-Ju Wu  <jasonwucj@gmail.com>
16228         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16229         UNSPEC_FFMISM and UNSPEC_FLMISM.
16230         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16231         for ffb, ffmism and flmism.
16232         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16233         (unspec_ffmism): Ditto.
16234         (unspec_flmism): Ditto.
16235         (nds32_expand_builtin_impl): Check if string extension is available.
16236         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16237         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16239 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
16241         Reverting patch:
16242         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
16244         PR target/83712
16245         * lra-assigns.c (assign_by_spills): Return a flag of reload
16246         assignment failure.  Do not process the reload assignment
16247         failures.  Do not spill other reload pseudos if they has the same
16248         reg class.
16249         (lra_assign): Add a return arg.  Set up from the result of
16250         assign_by_spills call.
16251         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16252         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16253         usage_insns if it is not NULL.
16254         (spill_hard_reg_in_range): New function.
16255         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16256         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16257         function prototypes.
16258         (lra_assign): Change prototype.
16259         * lra.c (lra): Add code to deal with fails by splitting hard reg
16260         live ranges.
16262 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
16264         PR target/84807
16265         * config/i386/i386.opt: Replace Enforcment with Enforcement.
16267 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
16269         PR debug/84620
16270         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16271         (dw_val_node): Add val_symbolic_view.
16272         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16273         (symview_upper_bound): New.
16274         (new_line_info_table): Initialize symviews_since_reset.
16275         (dwarf2out_source_line): Count symviews_since_reset and set
16276         symview_upper_bound.
16277         (dw_val_equal_p): Handle symview.
16278         (add_AT_symview): New.
16279         (print_dw_val): Handle symview.
16280         (attr_checksum, attr_checksum_ordered): Likewise.
16281         (same_dw_val_p, size_of_die): Likewise.
16282         (value_format, output_die): Likewise.
16283         (add_high_low_attributes): Use add_AT_symview for entry_view.
16284         (dwarf2out_finish): Reset symview_upper_bound, clear
16285         zero_view_p.
16287 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
16289         PR target/83969
16290         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16291         Add strict argument and use it.
16292         (rs6000_split_multireg_move): Update for new strict argument.
16293         (mem_operand_gpr): Disallow all non-offsettable addresses.
16294         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16296 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
16298         PR target/84772
16299         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16300         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16301         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16303         PR c++/84767
16304         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16305         decl, use remap_type if we want to use the type.
16307 2018-03-09  Martin Sebor  <msebor@redhat.com>
16309         PR tree-optimization/84526
16310         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16311         Remove dead code.
16312         (builtin_access::generic_overlap): Be prepared to handle non-array
16313         base objects.
16315 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
16317         PR rtl-optimization/84682
16318         * lra-constraints.c (process_address_1): Check is_address flag
16319         for address constraints.
16320         (process_alt_operands): Likewise.
16321         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16322         preprocess_constraints.
16323         * recog.h (preprocess_constraints): Add oploc parameter.
16324         Adjust callers.
16325         * recog.c (preprocess_constraints): Test address_operand for
16326         CT_ADDRESS constraints.
16328 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
16330         PR target/83712
16331         * lra-assigns.c (assign_by_spills): Return a flag of reload
16332         assignment failure.  Do not process the reload assignment
16333         failures.  Do not spill other reload pseudos if they has the same
16334         reg class.
16335         (lra_assign): Add a return arg.  Set up from the result of
16336         assign_by_spills call.
16337         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16338         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16339         usage_insns if it is not NULL.
16340         (spill_hard_reg_in_range): New function.
16341         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16342         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16343         function prototypes.
16344         (lra_assign): Change prototype.
16345         * lra.c (lra): Add code to deal with fails by splitting hard reg
16346         live ranges.
16348 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16350         PR target/83193
16351         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16352         Accept complain bool parameter.  Only emit errors if it is true.
16353         (arm_parse_cpu_option_name): Likewise.
16354         (arm_target_thumb_only): Adjust callers of the above.
16355         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16356         prototype to take a default true bool parameter.
16357         (arm_parse_arch_option_name): Likewise.
16359 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
16360             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
16362         PR jit/64089
16363         PR jit/84288
16364         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16365         * configure: Regenerate.
16366         * configure.ac ("linker --version-script option"): New.
16367         ("linker soname option"): New.
16369 2018-03-09  Richard Biener  <rguenther@suse.de>
16371         PR tree-optimization/84775
16372         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16373         immediate uses of predicate stmts and mark them modified.
16375         Revert
16376         PR tree-optimization/84178
16377         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16378         to caller.
16379         (version_loop_for_if_conversion): Delay update_ssa call.
16380         (tree_if_conversion): Delay update_ssa until after predicate
16381         insertion.
16383 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
16385         PR target/84763
16386         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
16387         when the function accesses prior frames.
16389 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
16391         PR debug/84456
16392         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
16393         gen_llsym, otherwise call maybe_gen_llsym.
16395         PR inline-asm/84742
16396         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
16397         has ',' character inside of it.
16399 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16401         PR target/84748
16402         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
16403         as clobbering CC_REGNUM.
16405 2018-03-08  Richard Biener  <rguenther@suse.de>
16407         PR middle-end/84552
16408         * tree-scalar-evolution.c: Include tree-into-ssa.h.
16409         (follow_copies_to_constant): Do not follow SSA names registered
16410         for update.
16412 2018-03-08  Richard Biener  <rguenther@suse.de>
16414         PR tree-optimization/84178
16415         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16416         to caller.
16417         (version_loop_for_if_conversion): Delay update_ssa call.
16418         (tree_if_conversion): Delay update_ssa until after predicate
16419         insertion.
16421 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
16423         PR tree-optimization/84178
16424         * tree-if-conv.c (release_bb_predicate): Remove the
16425         the assertion that the stmts have NULL use_ops.
16426         Discard the statements, asserting that they haven't
16427         yet been added to a BB.
16429 2018-03-08  Richard Biener  <rguenther@suse.de>
16431         PR tree-optimization/84746
16432         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
16433         (phi_translate): Pass in destination ANTIC_OUT set.
16434         (phi_translate_1): Likewise.  For a simplified result lookup
16435         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
16436         (phi_translate_set): Adjust.
16437         (do_pre_regular_insertion): Likewise.
16438         (do_pre_partial_partial_insertion): Likewise.
16440 2018-03-08  Martin Liska  <mliska@suse.cz>
16442         PR gcov-profile/84735
16443         * doc/gcov.texi: Document usage of profile files.
16444         * gcov-io.h: Document changes in the format.
16446 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
16448         PR debug/84404
16449         PR debug/84408
16450         * dwarf2out.c (struct dw_line_info_table): Update comments for
16451         view == -1.
16452         (FORCE_RESET_NEXT_VIEW): New.
16453         (FORCE_RESETTING_VIEW_P): New.
16454         (RESETTING_VIEW_P): Check for -1 too.
16455         (ZERO_VIEW_P): Likewise.
16456         (new_line_info_table): Force-reset next view.
16457         (dwarf2out_begin_function): Likewise.
16458         (dwarf2out_source_line): Simplify zero_view_p initialization.
16459         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
16460         view directly.  Omit view when omitting .loc at line 0.
16462 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
16464         PR tree-optimization/84740
16465         * tree-switch-conversion.c (process_switch): Call build_constructors
16466         only if info.phi_count is non-zero.
16468         PR tree-optimization/84739
16469         * tree-tailcall.c (find_tail_calls): Check call arguments against
16470         DECL_ARGUMENTS (current_function_decl) rather than
16471         DECL_ARGUMENTS (func) when checking for tail recursion.
16473 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
16475         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
16476         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
16477         Volker Reichelt's entry and add entries for people that perform
16478         GCC fuzzy testing and report numerous bugs.
16480 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
16482         PR target/82411
16483         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
16484         readonly data in sdata, if that is disabled.
16485         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
16486         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
16487         -mreadonly-in-sdata option.
16489 2018-03-07  Martin Sebor  <msebor@redhat.com>
16491         PR tree-optimization/84468
16492         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
16493         basic block when looking for nul assignment.
16495 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
16497         PR target/84277
16498         * except.h (output_function_exception_table): Adjust prototype.
16499         * except.c (output_function_exception_table): Remove FNNAME parameter
16500         and add SECTION parameter.  Ouput one part of the table at a time.
16501         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
16502         the first part of the exception table and emit unwind directives.
16503         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
16504         (i386_pe_seh_cold_init): Likewise.
16505         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
16506         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
16507         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
16508         (ix86_output_call_insn): Emit a nop in one more case for SEH.
16509         * config/i386/winnt.c: Include except.h.
16510         (struct seh_frame_state): Add reg_offset, after_prologue and
16511         in_cold_section fields.
16512         (i386_pe_seh_end_prologue): Set seh->after_prologue.
16513         (i386_pe_seh_cold_init): New function.
16514         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
16515         to seh->in_cold_section.
16516         (seh_emit_push): Record the offset of the push.
16517         (seh_emit_save): Record the offet of the save.
16518         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
16519         Test seh->after_prologue to disregard the epilogue.
16520         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
16521         (i386_pe_end_cold_function): New function.
16523 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
16525         PR fortran/84565
16526         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
16527         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
16529         PR c++/84704
16530         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
16531         on tmp_var.
16532         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
16533         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
16535         PR middle-end/84723
16536         * multiple_target.c: Include tree-inline.h and intl.h.
16537         (expand_target_clones): Diagnose and fail if node->definition and
16538         !tree_versionable_function_p (node->decl).
16540 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
16542         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
16543         sprint_ul.
16544         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
16545         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16546         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
16548 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
16550         PR target/84710
16551         * combine.c (try_combine): Use reg_or_subregno instead of handling
16552         just paradoxical SUBREGs and REGs.
16554 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
16556         * config/arc/arc.c (arc_finalize_pic): Remove function.
16557         (arc_must_save_register): We use single base PIC register, remove
16558         checks to save/restore the PIC register.
16559         (arc_expand_prologue): Likewise.
16560         * config/arc/arc-protos.h (arc_set_default_type_attributes):
16561         Remove.
16562         (arc_verify_short): Likewise.
16563         (arc_attr_type): Likewise.
16564         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
16565         (walk_stores): Likewise.
16566         (arc_address_cost): Make it static.
16567         (arc_verify_short): Likewise.
16568         (branch_dest): Likewise.
16569         (arc_attr_type): Likewise.
16570         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
16571         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
16572         (arc_final_prescan_insn): Remove inserting the nops due to
16573         hardware hazards.  It is done in reorg step.
16574         (insn_length_variant_t): Remove.
16575         (insn_length_parameters_t): Likewise.
16576         (arc_insn_length_parameters): Likewise.
16577         (arc_get_insn_variants): Likewise.
16578         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
16580 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
16582         PR inline-asm/84683
16583         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
16584         assertion failure.
16586         PR tree-optimization/84687
16587         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
16588         on new_node->decl.
16589         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
16591 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16593         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
16594         Rename to ppc_speculation_barrier.
16595         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
16596         __builtin_ppc_speculation_barrier.
16598 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
16600         PR target/84700
16601         * combine.c (combine_simplify_rtx): Don't try to simplify if
16602         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
16603         are equal to x.
16605 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
16607         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
16608         to 32 bytes when compiling for POWER9.
16610 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
16612         PR target/84564
16613         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
16614         regparm >= 3 with no arg reg available also for calls with
16615         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
16617         PR target/84524
16618         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
16619         orig,vex.
16620         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
16622 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
16624         PR target/84264
16625         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
16627 2018-03-05  Richard Biener  <rguenther@suse.de>
16629         PR tree-optimization/84486
16630         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
16631         When inserting a __builtin_assume_aligned call set the LHS
16632         SSA name alignment info accordingly.
16634 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
16636         PR tree-optimization/84114
16637         * config/aarch64/aarch64.c (aarch64_reassociation_width)
16638         Avoid reassociation of FLOAT_MODE addition.
16640 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
16642         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
16643         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
16644         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
16645         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
16646         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
16647         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
16648         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
16649         and -mwbnoinvd.
16650         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
16651         __builtin_ia32_wbinvd): New builtins.
16652         (SPECIAL_ARGS2): New.
16653         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
16654         (SPECIAL_ARGS2): New.
16655         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
16656         (ix86_valid_target_attribute_inner_p): Ditto.
16657         (ix86_init_mmx_sse_builtins): Add special_args2.
16658         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
16659         TARGET_WBNOINVD_P): New.
16660         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
16661         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
16662         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
16663         * config/i386/immintrin.h (_wbinvd): New intrinsic.
16664         * config/i386/pconfigintrin.h: New file.
16665         * config/i386/wbnoinvdintrin.h: Ditto.
16666         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
16667         wbnoinvdintrin.h.
16668         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
16670 2018-03-05  Richard Biener  <rguenther@suse.de>
16672         PR tree-optimization/84670
16673         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16674         member.
16675         (BB_VISITED_WITH_VISITED_SUCCS): New define.
16676         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16677         (compute_antic_aux): Only assert the number of values in ANTIC_IN
16678         doesn't grow if all successors (recursively) were visited at least
16679         once.
16681 2018-03-05  Richard Biener  <rguenther@suse.de>
16683         PR tree-optimization/84650
16684         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
16685         if executed in the loop pipeline.
16687 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
16689         * doc/configfiles.texi (Configuration Files): Move info about
16690         conditionalizing $target-protos.h to...
16691         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
16692         differs from $target-protos.h.
16694 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
16695             Chung-Ju Wu  <jasonwucj@gmail.com>
16697         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
16698         * config/nds32/nds32-multiple.md (setmemsi): Define.
16699         * config/nds32/nds32-memory-manipulation.c
16700         (nds32_gen_dup_4_byte_to_word_value): New.
16701         (emit_setmem_word_loop): New.
16702         (emit_setmem_byte_loop): New.
16703         (nds32_expand_setmem_loop): New.
16704         (nds32_expand_setmem_loop_v3m): New.
16705         (nds32_expand_setmem_unroll): New.
16706         (nds32_expand_setmem): New.
16708 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
16709             Chung-Ju Wu  <jasonwucj@gmail.com>
16711         * config/nds32/nds32-memory-manipulation.c
16712         (nds32_emit_load_store): New.
16713         (nds32_emit_post_inc_load_store): New.
16714         (nds32_emit_mem_move): New.
16715         (nds32_emit_mem_move_block): New.
16716         (nds32_expand_movmemsi_loop_unknown_size): New.
16717         (nds32_expand_movmemsi_loop_known_size): New.
16718         (nds32_expand_movmemsi_loop): New.
16719         (nds32_expand_movmemsi_unroll): New.
16720         (nds32_expand_movmemqi): Rename ...
16721         (nds32_expand_movmemsi): ... to this.
16722         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
16723         (movmemsi): ... to this.
16724         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
16725         (nds32_expand_movmemsi): ... to this.
16727 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
16728             Monk Chiang  <sh.chiang04@gmail.com>
16729             Chung-Ju Wu  <jasonwucj@gmail.com>
16731         * config/nds32/nds32-protos.h
16732         (nds32_expand_load_multiple): New arguments.
16733         (nds32_expand_store_multiple): Ditto.
16734         (nds32_valid_multiple_load_store): Rename ...
16735         (nds32_valid_multiple_load_store_p): ... to this.
16736         * config/nds32/nds32-memory-manipulation.c
16737         (nds32_expand_load_multiple): Refine implementation.
16738         (nds32_expand_store_multiple): Ditto.
16739         * config/nds32/nds32-multiple.md
16740         (load_multiple): Update nds32_expand_load_multiple interface.
16741         (store_multiple): Update nds32_expand_store_multiple interface.
16742         * config/nds32/nds32-predicates.c
16743         (nds32_valid_multiple_load_store): Rename ...
16744         (nds32_valid_multiple_load_store_p): ... to this and refine
16745         implementation.
16746         * config/nds32/predicates.md
16747         (nds32_load_multiple_and_update_address_operation): New predicate.
16748         (nds32_store_multiple_and_update_address_operation): New predicate.
16750 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
16751             Chung-Ju Wu  <jasonwucj@gmail.com>
16753         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
16754         (combo): New attribute.
16755         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
16757 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
16759         * config/nds32/nds32.opt: Change -mcmodel= default value.
16761 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
16762             Monk Chiang  <sh.chiang04@gmail.com>
16763             Chung-Ju Wu  <jasonwucj@gmail.com>
16765         * config/nds32/constants.md (unspec_element): New enum.
16766         * config/nds32/constraints.md (Umw): New constraint.
16767         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
16768         * config/nds32/nds32-intrinsic.md: Likewise.
16769         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
16770         (nds32_valid_smw_lwm_base_p): New.
16771         (nds32_output_smw_single_word): New.
16772         (nds32_output_lmw_single_word): New.
16773         (nds32_expand_unaligned_load): New.
16774         (nds32_expand_unaligned_store): New.
16775         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
16776         (nds32_output_smw_single_word): Declare.
16777         (nds32_output_lmw_single_word): Declare.
16778         (nds32_expand_unaligned_load): Declare.
16779         (nds32_expand_unaligned_store): Declare.
16780         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
16781         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
16782         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
16783         NDS32_BUILTIN_UASTORE_DW.
16784         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
16785         predicate.
16787 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
16788             Kito Cheng  <kito.cheng@gmail.com>
16789             Chung-Ju Wu  <jasonwucj@gmail.com>
16791         * config/nds32/nds32-intrinsic.c
16792         (nds32_expand_builtin_null_ftype_reg): Delete.
16793         (nds32_expand_builtin_reg_ftype_imm): Ditto.
16794         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
16795         (nds32_read_argument): New.
16796         (nds32_legitimize_target): Ditto.
16797         (nds32_legitimize_argument): Ditto.
16798         (nds32_check_constant_argument): Ditto.
16799         (nds32_expand_unop_builtin): Ditto.
16800         (nds32_expand_unopimm_builtin): Ditto.
16801         (nds32_expand_binop_builtin): Ditto.
16802         (nds32_builtin_decl_impl): Ditto.
16803         (builtin_description): Ditto.
16804         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
16805         (nds32_init_builtins_impl): Ditto.
16806         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
16807         (nds32_builtin_decl): New.
16808         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
16809         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
16811 2018-03-02  Jeff Law  <law@redhat.com>
16813         * reorg.c (stop_search_p): Handle DEBUG_INSN.
16814         (redundant_insn, fill_simple_delay_slots): Likewise.
16815         (fill_slots_from_thread): Likewise.
16816         * resource.c (mark_referenced_resources): Likewise.
16817         (mark_set_resources, find_dead_or_set_registers): Likewise.
16819 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
16821         * substring-locations.h (format_warning_va): Formatting fix for
16822         ATTRIBUTE_GCC_DIAG.
16823         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
16824         argument.
16825         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
16826         * substring-locations.c: Include intl.h.
16827         (format_warning_va): Turned into small wrapper around
16828         format_warning_n_va, renamed to ...
16829         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
16830         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
16831         use ngettext.
16832         (format_warning_at_substring_n): New function.
16833         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
16834         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
16835         format_warning_at_substring with just a shorter name instead of
16836         const function pointer.
16837         (fmtwarn_n): New function.
16838         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
16839         appropriate, get rid of all the fmtstr temporaries, move conditionals
16840         with G_() wrapped string literals directly into fmtwarn arguments,
16841         cast dir.len to (int), formatting fixes.
16843 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
16845         * doc/invoke.texi: Remove "Cilk Plus" references.
16847 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
16848             Richard Biener  <rguenther@suse.de>
16850         PR ipa/84628
16851         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
16852         for error or warning attributes if CALL_FROM_THUNK_P is set.
16853         Formatting fixes.
16855 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
16857         PR target/56540
16858         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
16859         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
16861         PR target/56540
16862         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
16863         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
16865         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
16866         instead of -1U in last predictors element's probability member.
16868 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
16870         PR ipa/83983
16871         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16872         arguments if they are comparable.
16874 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
16876         PR tree-optimization/84634
16877         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
16878         masks and masked_loop_p with a single loop_masks, making sure it's
16879         null for bb vectorization.
16881 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
16883         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
16884         (vect_analyze_data_ref_access): Use loop->safe_len rather than
16885         loop->force_vectorize to check whether there is no alias.
16887 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
16889         PR target/84614
16890         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
16891         prototypes.
16892         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
16893         comments.
16894         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
16895         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
16896         instead of a loop around prev_real_insn.
16897         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
16898         prev_real_insn.
16900         PR inline-asm/84625
16901         * config/i386/i386.c (ix86_print_operand): Use conditional
16902         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
16903         zero vector.
16905 2018-03-02  Richard Biener  <rguenther@suse.de>
16907         PR tree-optimization/84427
16908         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
16909         (bitmap_set_subtract_values): Rewrite to handle multiple
16910         exprs per value.
16911         (clean): Likewise.
16912         (prune_clobbered_mems): Likewise.
16913         (phi_translate): Take edge instead of pred/phiblock.
16914         (phi_translate_1): Likewise.
16915         (phi_translate_set): Likewise.  Insert all translated
16916         exprs for a value into the set, keeping possibly multiple
16917         expressions per value.
16918         (compute_antic_aux): Adjust for phi_translate changes.
16919         When intersecting union the expressions and prune those
16920         not in the final value set, keeping possibly multiple
16921         expressions per value.  Do not use value-insertion
16922         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
16923         all expressions.  Add verification that the value-sets
16924         only shrink during iteration.
16925         (compute_partial_antic_aux): Adjust for the phi_translate changes.
16926         (do_pre_regular_insertion): Likewise.
16927         (do_pre_partial_partial_insertion): Likewise.
16929 2018-03-02  Richard Biener  <rguenther@suse.de>
16931         PR target/82005
16932         * config/darwin.c (saved_debug_info_level): New static global.
16933         (darwin_asm_lto_start): Disable debug info generation for LTO out.
16934         (darwin_asm_lto_end): Restore debug info generation settings.
16936 2018-03-01  Martin Liska  <mliska@suse.cz>
16938         PR sanitizer/82484
16939         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
16940         volatile arguments.
16942 2018-03-01  Richard Biener  <rguenther@suse.de>
16944         PR debug/84645
16945         * dwarf2out.c (gen_variable_die): Properly handle late VLA
16946         type annotation with LTO when debug was disabled at compile-time.
16948 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
16950         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
16951         XINT with INTVAL.
16952         (mips_final_postscan_insn): Likewise.
16954 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
16956         PR rtl-optimization/84528
16957         * alias.c (init_alias_target): Add commentary.
16958         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
16959         a unique base value if the frame pointer is not eliminated
16960         to the stack pointer.
16962 2018-03-01  Tom de Vries  <tom@codesourcery.com>
16964         PR rtl-optimization/83327
16965         * lra-int.h (hard_regs_spilled_into): Declare.
16966         * lra.c (hard_regs_spilled_into): Define.
16967         (init_reg_info): Init hard_regs_spilled_into.
16968         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
16969         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
16970         (process_bb_lives): Handle hard_regs_spilled_into.
16971         (lra_create_live_ranges_1): Before doing liveness propagation, clear
16972         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
16974 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
16976         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
16977         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
16978         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
16979         * config/rs6000/aix72.h: New file.
16981 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
16983         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
16984         instead of warning_at with conditional singular and plural messages
16985         where possible.
16987         PR target/52991
16988         * stor-layout.c (update_alignment_for_field): For
16989         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
16990         && !DECL_PACKED (field), do the alignment update, just use
16991         only desired_align instead of MAX (type_align, desired_align)
16992         as the alignment.
16993         (place_field): Don't do known_align < desired_align handling
16994         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
16995         is non-NULL, instead do it after rli->prev_field handling and
16996         only if not within a bitfield word.  For DECL_PACKED (field)
16997         use type_align of BITS_PER_UNIT.
16999 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
17001         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17002         superfluous parentheses and trailing spaces.
17004 2018-02-28  Richard Biener  <rguenther@suse.de>
17006         PR tree-optimization/84584
17007         * graphite-scop-detection.c (scop_detection::add_scop): Discard
17008         SCoPs with fake exit edge.
17010 2018-02-28  Martin Liska  <mliska@suse.cz>
17012         PR testsuite/84597
17013         * timevar.c (timer::print): Fix format to properly print 100%
17014         values.
17016 2018-02-28  Richard Biener  <rguenther@suse.de>
17018         PR middle-end/84607
17019         * genmatch.c (capture_info::walk_match): Do not mark
17020         captured expressions without operands as expr_p given
17021         they act more like predicates and should be subject to
17022         "lost tail" side-effect preserving.
17024 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
17026         PR rtl-optimization/81611
17027         * auto-inc-dec.c (attempt_change): Move dead note from
17028         mem_insn if it's the next use of regno
17029         (find_address): Take address use of reg holding
17030         non-incremented value.  Add parm to limit search to the named
17031         reg only.
17032         (merge_in_block): Attempt to use a mem insn that is the next
17033         use of the original regno.
17035 2018-02-27  Martin Sebor  <msebor@redhat.com>
17037         PR c++/83871
17038         * doc/invoke.texi (-Wmissing-attributes): New option.
17039         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17041 2018-02-27  Martin Sebor  <msebor@redhat.com>
17043         PR translation/84207
17044         * diagnostic-core.h (warning_n, error_n, inform_n): Change
17045         n argument to unsigned HOST_WIDE_INT.
17046         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17047         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
17048         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17049         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17051 2018-02-27  Richard Biener  <rguenther@suse.de>
17053         PR tree-optimization/84512
17054         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17055         Do not use the estimate returned from record_stmt_cost for
17056         the scalar iteration cost but sum properly using add_stmt_cost.
17058 2018-02-27  Richard Biener  <rguenther@suse.de>
17060         PR tree-optimization/84466
17061         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17062         Adjust last change to less strictly validate use operands.
17064 2018-02-27  Martin Liska  <mliska@suse.cz>
17066         PR gcov-profile/84548
17067         * gcov.c (process_file): Allow partial overlap and consider it
17068         also as group functions.
17069         (output_lines): Properly calculate range of lines for a group.
17071 2018-02-27  Martin Liska  <mliska@suse.cz>
17073         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17074         'ggc' suffixes.  Change first column width.
17075         (timer::print): Fix formatting of the column.
17077 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
17079         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17080         preserve inline entry blocks for the sake of debug inline
17081         entry point markers alone.
17082         (remove_unused_locals): Suggest in comments a better place to
17083         force the preservation of inline entry blocks that are
17084         otherwise unused, but do not preserve them.
17086 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17088         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17090 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17092         PR target/84039
17093         * config/i386/constraints.md (Bs): Replace
17094         ix86_indirect_branch_register with
17095         TARGET_INDIRECT_BRANCH_REGISTER.
17096         (Bw): Likewise.
17097         * config/i386/i386.md (indirect_jump): Likewise.
17098         (tablejump): Likewise.
17099         (*sibcall_memory): Likewise.
17100         (*sibcall_value_memory): Likewise.
17101         Peepholes of indirect call and jump via memory: Likewise.
17102         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17103         (*sibcall_value_GOT_32): Likewise.
17104         * config/i386/predicates.md (indirect_branch_operand): Likewise.
17105         (GOT_memory_operand): Likewise.
17106         (call_insn_operand): Likewise.
17107         (sibcall_insn_operand): Likewise.
17108         (GOT32_symbol_operand): Likewise.
17109         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17111 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
17113         PR rtl-optimization/83496
17114         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17115         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
17116         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17117         redundant insn, if any.
17118         (relax_delay_slots): Likewise.
17119         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17121 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
17123         PR tree-optimization/83965
17124         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17125         that grouped statements are part of a reduction chain.  Return
17126         true if the statement is not marked as a reduction itself but
17127         is part of a group.
17128         (vect_recog_dot_prod_pattern): Don't check whether the statement
17129         is part of a group here.
17130         (vect_recog_sad_pattern): Likewise.
17131         (vect_recog_widen_sum_pattern): Likewise.
17133 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
17135         PR debug/84545
17136         * final.c (rest_of_clean_state): Also look for calls inside sequences.
17138 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17140         PR target/84530
17141         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17142         the bool argument.
17143         (ix86_output_indirect_function_return): New prototype.
17144         (ix86_split_simple_return_pop_internal): Likewise.
17145         * config/i386/i386.c (indirect_return_via_cx): New.
17146         (indirect_return_via_cx_bnd): Likewise.
17147         (indirect_thunk_name): Handle return va CX_REG.
17148         (output_indirect_thunk_function): Create alias for
17149         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17150         (ix86_output_indirect_jmp): Remove the bool argument.
17151         (ix86_output_indirect_function_return): New function.
17152         (ix86_split_simple_return_pop_internal): Likewise.
17153         * config/i386/i386.md (*indirect_jump): Don't pass false
17154         to ix86_output_indirect_jmp.
17155         (*tablejump_1): Likewise.
17156         (simple_return_pop_internal): Change it to define_insn_and_split.
17157         Call ix86_split_simple_return_pop_internal to split it for
17158         -mfunction-return=.
17159         (simple_return_indirect_internal): Call
17160         ix86_output_indirect_function_return instead of
17161         ix86_output_indirect_jmp.
17163 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
17165         PR bootstrap/84405
17166         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17167         memset and value initialization afterwards.
17169 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
17171         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17173 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
17175         PR target/84521
17176         * common/config/aarch64/aarch64-common.c
17177         (aarch_option_optimization_table[]): Switch
17178         off fomit-frame-pointer
17180 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
17181             Chung-Ju Wu  <jasonwucj@gmail.com>
17183         * config/nds32/nds32-multiple.md (load_multiple): Disallow
17184         volatile memory.
17185         (store_multiple): Ditto.
17187 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
17189         * config.gcc: Add --with-cpu support for nds32 target.
17190         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17191         * config/nds32/nds32.opt: Add -mcpu= option.
17193 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
17195         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17196         isel=yes): Warn for these deprecated options.
17198 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
17200         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17201         ISA_2_5_MASKS_EMBEDDED.
17203 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
17205         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17206         p->max as pointers rather than using iterative_hash_expr.
17208 2018-02-23  Carl Love  <cel@us.ibm.com>
17210         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17211         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17212         BU_P8V_OVERLOAD_2.
17213         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17214         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17215         P8V_BUILTIN_VEC_VUNSIGNED2.
17217 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
17219         PR target/81572
17220         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17221         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17222         LRA_UNKNOWN_ALT.
17223         * lra-constraints.c (curr_insn_transform): Set up
17224         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
17225         LRA_UNKNOWN_ALT.
17226         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17227         * lra-eliminations.c (spill_pseudos): Ditto.
17228         (process_insn_for_elimination): Ditto.
17229         * lra-lives.c (reg_early_clobber_p): Use the new macros.
17230         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17231         LRA_NON_CLOBBERED_ALT.
17233 2018-02-22  Martin Sebor  <msebor@redhat.com>
17235         PR tree-optimization/84480
17236         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17237         to maybe_diag_stxncpy_trunc.  Call it.
17238         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17239         from gimple_fold_builtin_strcpy.  Print inlining stack.
17240         (handle_builtin_stxncpy): Print inlining stack.
17241         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17243 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
17245         PR target/84176
17246         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17247         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17248         and -fcheck-pointer-bounds are used together.
17249         (indirect_thunk_prefix): New enum.
17250         (indirect_thunk_need_prefix): New function.
17251         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
17252         "_nt" instead of "_bnd" for NOTRACK prefix.
17253         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17254         (output_indirect_thunk_function): Likewise.
17255         (): Likewise.
17256         (ix86_code_end): Update output_indirect_thunk_function calls.
17257         (ix86_output_indirect_branch_via_reg): Replace
17258         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17259         (ix86_output_indirect_branch_via_push): Likewise.
17260         (ix86_output_function_return): Likewise.
17261         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17262         incompatible with -fcf-protection=branch and
17263         -fcheck-pointer-bounds.
17265 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
17267         PR target/83335
17268         * config/aarch64/aarch64.c (aarch64_print_address_internal):
17269         Change gcc_assert call to output_operand_lossage.
17271 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
17273         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17275 2018-02-22  DJ Delorie  <dj@redhat.com>
17276             Sebastian Perta  <sebastian.perta@renesas.com>
17277             Oleg Endo  <olegendo@gcc.gnu.org>
17279         * config/rx/rx.c (rx_rtx_costs): New function.
17280         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17282 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17284         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17286 2018-02-22  Martin Liska  <mliska@suse.cz>
17288         PR driver/83193
17289         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17290         Add "native" as a possible value.
17292 2018-02-22  Martin Liska  <mliska@suse.cz>
17294         PR driver/83193
17295         * config/i386/i386.c (ix86_option_override_internal):
17296         Add "native" as a possible value for -march and -mtune.
17298 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
17300         PR target/84502
17301         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17302         to all type variants.
17304         PR tree-optimization/84503
17305         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17306         width as info->bitpos + info->bitsize - start.
17307         (merged_store_group::merge_overlapping): Simplify width computation.
17308         (check_no_overlap): New function.
17309         (imm_store_chain_info::try_coalesce_bswap): Compute expected
17310         start + width and last_order of the group, fail if check_no_overlap
17311         fails.
17312         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17313         to group if check_no_overlap fails.
17315 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
17317         * config/rs6000/altivec.md: Delete contraint arguments to
17318         define_expand, define_split, and define_peephole2, and in
17319         define_insn_and_split if always unused.
17320         * config/rs6000/darwin.md: Ditto.
17321         * config/rs6000/dfp.md: Ditto.
17322         * config/rs6000/rs6000.md: Ditto.
17323         * config/rs6000/sync.md: Ditto.
17324         * config/rs6000/vector.md: Ditto.
17325         * config/rs6000/vsx.md: Ditto.
17327 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
17329         * config/rs6000/altivec.md: Write output control strings as braced
17330         blocks instead of double-quoted strings.
17331         * config/rs6000/darwin.md: Ditto.
17332         * config/rs6000/rs6000.md: Ditto.
17333         * config/rs6000/vector.md: Ditto.
17334         * config/rs6000/vsx.md: Ditto.
17336 2018-02-21  Jason Merrill  <jason@redhat.com>
17338         PR c++/84314 - ICE with templates and fastcall attribute.
17339         * attribs.c (build_type_attribute_qual_variant): Remove assert.
17341 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
17343         * ipa-cp.c (determine_versionability): Fix comment typos.
17345 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
17347         PR c/84229
17348         * ipa-cp.c (determine_versionability): Do not version functions caling
17349         va_arg_pack.
17351 2018-02-21  Martin Liska  <mliska@suse.cz>
17353         PR driver/83193
17354         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17355         Add "native" as a possible value.
17356         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
17357         the macro when native cpu detection is available.
17359 2018-02-21  Martin Liska  <mliska@suse.cz>
17361         PR driver/83193
17362         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17363         Add "native" as a possible value.
17364         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17365         when native cpu detection is available.
17367 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
17368             Martin Sebor  <msebor@redhat.com>
17370         PR tree-optimization/84478
17371         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17372         false.
17373         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17374         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17375         support which is conservatively correct, for 2 only stay conservative
17376         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
17377         argument to the 2 argument get_range_strlen, adjust 6 arg
17378         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17379         false.
17380         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17381         (gimple_fold_builtin_strlen): Pass true as last argument to
17382         get_range_strlen.
17384 2018-02-20  Martin Sebor  <msebor@redhat.com>
17386         PR middle-end/84095
17387         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
17388         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
17389         (builtin_memref::builtin_memref): Factor out parts into
17390         set_base_and_offset and call it.
17392 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
17394         PR middle-end/84406
17395         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
17396         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
17397         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
17398         search at the associated MODE_INT.
17400 2018-02-20  Jeff Law  <law@redhat.com>
17402         PR middle-end/82123
17403         PR tree-optimization/81592
17404         PR middle-end/79257
17405         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
17406         for range data rather than using global data.
17407         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
17408         range data rather than using global data.
17409         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
17410         pass it to children as needed.
17411         (struct directive::fmtresult): Similarly.
17412         (struct directive::set_width): Similarly.
17413         (struct directive::set_precision): Similarly.
17414         (format_integer, format_directive, parse_directive): Similarly.
17415         (format_none): Accept unnamed vr_values parameter.
17416         (format_percent, format_floating, format_character): Similarly.
17417         (format_string, format_plain): Similarly.
17418         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
17419         the EVRP range analyzer for range data rather than using global data.
17420         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
17421         gimple-ssa-evrp-analyze.h
17422         (class sprintf_dom_walker): Add after_dom_children member function.
17423         Add evrp_range_analyzer member.
17424         (sprintf_dom_walker::before_dom_children): Call into the EVRP
17425         range analyzer as needed.
17426         (sprintf_dom_walker::after_dom_children): New member function.
17427         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
17428         if not optimizing.
17429         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
17430         (evrp_range_analyzer::pop_to_marker): Likewise.
17432 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
17434         PR tree-optimization/84419
17435         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
17436         with the required type if its current type is compatible but
17437         different.
17439 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
17441         PR middle-end/82004
17442         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
17443         after vectorization.
17445 2018-02-20  Martin Liska  <mliska@suse.cz>
17447         PR driver/83193
17448         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
17449         possible values if we don't have a hint.
17451 2018-02-20  Martin Liska  <mliska@suse.cz>
17453         PR c/84310
17454         PR target/79747
17455         * final.c (shorten_branches): Build align_tab array with one
17456         more element.
17457         * opts.c (finish_options): Add alignment option limit check.
17458         (MAX_CODE_ALIGN): Likewise.
17459         (MAX_CODE_ALIGN_VALUE): Likewise.
17460         * doc/invoke.texi: Document maximum allowed option value for
17461         all -falign-* options.
17463 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
17465         PR target/84146
17466         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
17467         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
17468         * var-tracking.c (emit_note_insn_var_location): Remove all references
17469         to NOTE_INSN_CALL_ARG_LOCATION.
17470         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
17471         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
17472         Use copy_rtx_if_shared.
17473         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
17474         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
17475         (dwarf2out_var_location): Remove handling of
17476         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
17477         on call_insn.
17478         * final.c (final_scan_insn): Remove all references to
17479         NOTE_INSN_CALL_ARG_LOCATION.
17480         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
17481         before dumping final insns.
17482         * except.c (emit_note_eh_region_end): Remove all references to
17483         NOTE_INSN_CALL_ARG_LOCATION.
17484         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
17485         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
17486         * config/arc/arc.c (hwloop_optimize): Likewise.
17487         * config/arm/arm.c (create_fix_barrier): Likewise.
17488         * config/s390/s390.c (s390_chunkify_start): Likewise.
17489         * config/sh/sh.c (find_barrier): Likewise.
17490         * config/i386/i386.c (rest_of_insert_endbranch,
17491         ix86_seh_fixup_eh_fallthru): Likewise.
17492         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
17493         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
17494         * config/frv/frv.c (frv_function_prologue): Likewise.
17495         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
17496         reg note.
17497         (note_outside_basic_block_p): Remove all references to
17498         NOTE_INSN_CALL_ARG_LOCATION.
17499         * gengtype.c (adjust_field_rtx_def): Likewise.
17500         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
17501         Likewise.
17502         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
17503         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
17505         PR c++/84444
17506         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
17507         is ADDR_EXPR.
17509         PR tree-optimization/84452
17510         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
17511         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
17512         is NULL.
17514 2018-02-19  Martin Liska  <mliska@suse.cz>
17516         PR sanitizer/82183
17517         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
17519 2018-02-19  Martin Liska  <mliska@suse.cz>
17520             Richard Sandiford  <richard.sandiford@linaro.org>
17522         PR tree-optimization/82491
17523         * gimple-fold.c (get_base_constructor): Make earlier bail out
17524         to prevent ubsan.
17526 2018-02-19  Carl Love  <cel@us.ibm.com>
17528         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
17529         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
17530         BU_P8V_OVERLOAD_1.
17531         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
17532         P8V_BUILTIN_VEC_NEG.
17534 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
17536         * config/rl78/rl78.md (movdf): New define expand.
17538 2018-02-19  Martin Liska  <mliska@suse.cz>
17540         PR other/80589
17541         * doc/invoke.texi: Fix typo.
17542         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
17544 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
17546         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
17547         handle rs6000_single_float and rs6000_double_float specially for
17548         e500 family CPUs.
17550 2018-02-16  Jeff Law  <law@redhat.com>
17552         * config/rx/rx.c (add_pop_cfi_notes): New function.;
17553         (pop_regs): Use it.
17555 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
17557         PR ipa/84425
17558         * ipa-inline.c (inline_small_functions): Fix a typo.
17560 2018-02-16  Nathan Sidwell  <nathan@acm.org>
17562         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
17564 2018-02-16  Carl Love  <cel@us.ibm.com>
17566         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
17567         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
17568         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
17569         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
17570         expansion to P8V_BUILTIN_VEC_FLOAT2.
17572 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
17574         PR rtl-optimization/70023
17575         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
17576         src_regno into account.
17578 2018-02-16  Carl Love  <cel@us.ibm.com>
17580         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
17581         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
17582         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
17583         * config/rs6000/rs6000.c: Remove case statements for
17584         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
17585         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
17586         and P9V_BUILTIN_VEC_VINSERT4B.
17587         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
17588         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
17589         * config/rs6000/vsx.md:
17590         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
17591         vec_insert4b.
17593 2018-02-16  Carl Love  <cel@us.ibm.com>
17595         * config/rs6000/altivec.h: Add builtin names vec_extract4b
17596         vec_insert4b.
17597         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
17598         definitions.
17599         * config/rs6000/rs6000-c.c: Add the definitions for
17600         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
17601         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
17602         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
17603         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
17604         definition for insert4b and define insn *insert3b_internal.
17605         * doc/extend.texi: Add documentation for vec_extract4b.
17607 2018-02-16  Nathan Sidwell  <nathan@acm.org>
17609         * doc/extend.texi (Backwards Compatibility): Mention friend
17610         injection.  Note for-scope is deprecated.
17611         * doc/invoke.texi (-ffriend-injection): Deprecate.
17613 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
17615         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
17616         that moved to I2, also allow destinations that are a paradoxical
17617         subreg (instead of a normal reg).
17619 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
17621         PR target/83831
17622         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
17623         to QImode.
17625 2018-02-16  Richard Biener  <rguenther@suse.de>
17627         PR tree-optimization/84037
17628         PR tree-optimization/84016
17629         PR target/82862
17630         * config/i386/i386.c (ix86_builtin_vectorization_cost):
17631         Adjust vec_construct for the fact we need additional higher latency
17632         128bit inserts for AVX256 and AVX512 vector builds.
17633         (ix86_add_stmt_cost): Scale vector construction cost for
17634         elementwise loads.
17636 2018-02-16  Richard Biener  <rguenther@suse.de>
17638         PR tree-optimization/84417
17639         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
17640         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
17641         (non_rewritable_lvalue_p): Likewise, use poly-ints.
17643 2018-02-16  Martin Liska  <mliska@suse.cz>
17645         PR sanitizer/84307
17646         * internal-fn.def (ASAN_CHECK): Set proper flags.
17647         (ASAN_MARK): Likewise.
17649 2018-02-16  Julia Koval  <julia.koval@intel.com>
17651         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
17652         from PTA_CANNONLAKE.
17654 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
17656         PR target/84272
17657         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
17658         Use ++iter rather than iter++ for std::list iterators.
17659         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
17660         defer deleting them until all nodes in the forest are processed.  Do
17661         free even leaf nodes.  Change to_process into auto_vec.
17663         PR bootstrap/84405
17664         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
17665         * vec.h (vec_default_construct): Use memset instead of placement new
17666         if BROKEN_VALUE_INITIALIZATION is defined.
17667         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
17668         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
17669         is defined.
17671         PR rtl-optimization/83723
17672         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
17673         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
17674         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
17675         recursive calls.
17676         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
17677         callers.
17678         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
17680 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
17682         PR rtl-optimization/81443
17683         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
17684         from inner REGs to paradoxical SUBREGs.
17686 2018-02-16  Richard Biener  <rguenther@suse.de>
17688         PR tree-optimization/84399
17689         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17690         For operands we can analyze at their definition make sure we can
17691         analyze them at each use as well.
17693 2018-02-16  Richard Biener  <rguenther@suse.de>
17695         PR tree-optimization/84190
17696         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
17697         volatile accesses if the decl isn't volatile.
17699 2018-02-15  Jason Merrill  <jason@redhat.com>
17701         PR c++/84314 - ICE with templates and fastcall attribute.
17702         * attribs.c (build_type_attribute_qual_variant): Don't clobber
17703         TYPE_CANONICAL on an existing type.
17705 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
17707         PR tree-optimization/84383
17708         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
17709         dstoff nor call operand_equal_p if dstbase is NULL.
17711         PR tree-optimization/84334
17712         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
17713         also a CONSTANT_CLASS_P, punt.
17715 2018-02-14  Jim Wilson  <jimw@sifive.com>
17717         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
17718         first SMALL_OPERAND check.  New local min_second_step.  Move assert
17719         to where locals are set.  Add TARGET_RVC support.
17720         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
17722 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
17724         * doc/invoke.texi: Correct -Wformat-overflow code sample.
17726 2018-02-14  Martin Sebor  <msebor@redhat.com>
17728         PR tree-optimization/83698
17729         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
17730         arrays constrain the offset range to their bounds.
17731         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
17732         (builtin_access::overlap): Avoid setting the size of overlap if it's
17733         already been set.
17734         (maybe_diag_overlap): Also consider arrays when deciding what values
17735         of offsets to include in diagnostics.
17737 2018-02-14  Martin Sebor  <msebor@redhat.com>
17739         PR c/84108
17740         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
17741         that correspond to the kind of a declaration.
17743 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
17745         PR target/83984
17746         * config/pa/pa.md: Load address of PIC label using the linkage table
17747         if the label is nonlocal.
17749 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17751         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
17752         warning message if user requests -maltivec=be.
17753         * doc/invoke.texi: Document deprecation of -maltivec=be.
17755 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
17757         PR target/84220
17758         * config/rs6000/rs6000-c.c: Update definitions for
17759         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
17760         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
17762 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17764         PR target/84239
17765         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
17766         add _get_ssp intrinsics. Remove argument from
17767         __builtin_ia32_rdssp[d|q].
17768         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
17769         * config/i386/i386-builtin.def: Remove argument from
17770         __builtin_ia32_rdssp[d|q].
17771         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
17772         ix86_expand_special_args_builtin for _rdssp[d|q].
17773         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
17774         Clear register before usage.
17775         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
17776         Add documentation for new _get_ssp and _inc_ssp intrinsics.
17778 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
17780         PR tree-optimization/84357
17781         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
17782         operand 1 of an ARRAY_REF too.
17784 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
17786         PR target/83831
17787         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
17788         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17789         declarations.
17790         (set_of_reg): New struct.
17791         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
17792         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
17793         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17794         functions.
17795         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
17796         Split into bitclr, bitset, bitinvert patterns if appropriate.
17797         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
17798         use rx_fuse_in_memory_bitop.
17799         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
17800         to named insn, correct maximum insn length.
17802 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
17804         PR target/79242
17805         * machmode.def: Define a complex mode for PARTIAL_INT.
17806         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
17807         MODE_PARTIAL_INT.
17808         * doc/rtl.texi: Document CSPImode.
17809         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
17810         handling.
17811         (msp430_hard_regno_nregs_with_padding): Likewise.
17813 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
17815         PR target/84279
17816         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
17818 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
17820         PR rtl-optimization/84169
17821         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
17822         we generated a parallel as new i3 and we split that to new i2 and i3
17823         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
17824         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
17825         those to i2, not i1.  Partially rewrite this scan code.
17827 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
17829         PR c/82210
17830         * stor-layout.c (place_field): For variable length fields, adjust
17831         offset_align afterwards not just based on the field's alignment,
17832         but also on the size.
17834         PR middle-end/84309
17835         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
17836         of exps and logs in the use_exp2 case.
17838 2018-02-13  Jeff Law  <law@redhat.com>
17840         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
17841         entry for "vector".
17843         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
17844         ARGS as unused.
17846 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
17848         PR debug/84342
17849         PR debug/84319
17850         * common.opt (gas-loc-support, gas-locview-support): New.
17851         (ginline-points, ginternal-reset-location-views): New.
17852         * doc/invoke.texi: Document them.  Use @itemx where intended.
17853         (gvariable-location-views): Adjust.
17854         * target.def (reset_location_view): New.
17855         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
17856         (TARGET_RESET_LOCATION_VIEW): New.
17857         * doc/tm.texi: Rebuilt.
17858         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
17859         (dwarf2out_default_as_locview_support): New.
17860         (output_asm_line_debug_info): Use option variables.
17861         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
17862         (output_loc_list): Likewise.
17863         (add_high_low_attributes): Check option variables.
17864         Don't output entry view attribute in strict mode.
17865         (gen_inlined_subroutine_die): Check option variables.
17866         (dwarf2out_inline_entry): Likewise.
17867         (init_sections_and_labels): Likewise.
17868         (dwarf2out_early_finish): Likewise.
17869         (maybe_reset_location_view): New, from...
17870         (dwarf2out_var_location): ... here.  Call it.
17871         * debug.h (dwarf2out_default_as_loc_support): Declare.
17872         (dwarf2out_default_as_locview_support): Declare.
17873         * hooks.c (hook_int_rtx_insn_0): New.
17874         * hooks.h (hook_int_rtx_insn_0): Declare.
17875         * toplev.c (process_options): Take -gas-loc-support and
17876         -gas-locview-support from dwarf2out.  Enable
17877         -gvariable-location-views by default only with locview
17878         assembler support.  Enable -ginternal-reset-location-views by
17879         default only if the target defines the corresponding hook.
17880         Enable -ginline-points by default if location views are
17881         enabled; force it disabled if statement frontiers are
17882         disabled.
17883         * tree-inline.c (expand_call_inline): Check option variables.
17884         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
17886 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
17888         PR tree-optimization/84321
17889         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
17890         handling.  Also check whether the anti-range contains any values
17891         that satisfy the mask; switch to a VR_RANGE if not.
17893 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
17895         PR sanitizer/84340
17896         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
17898 2018-02-13  Martin Jambor  <mjambor@suse.cz>
17900         PR c++/83990
17901         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
17902         of call statements, also set location of a load to a temporary.
17904 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
17906         * config/rl78/rl78.c (add_vector_labels): New function.
17907         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
17908         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
17909         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
17910         which checks that no arguments are passed.
17911         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
17912         * doc/extend.texi: Documentation for the new attribute.
17914 2018-02-13  Andreas Schwab  <schwab@suse.de>
17916         * config/riscv/linux.h (CPP_SPEC): Define.
17918 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
17920         PR target/84335
17921         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
17922         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
17923         OPTION_MASK_ISA_AES as first argument to def_builtin_const
17924         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
17925         instead of OPTION_MASK_ISA_PCLMUL as first argument to
17926         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
17927         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
17928         temporarily for AES and PCLMUL builtins.
17930         PR tree-optimization/84339
17931         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
17932         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
17933         Formatting fixes.
17935         PR middle-end/84309
17936         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
17937         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
17938         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
17939         inline function.
17940         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
17941         inline function.
17942         * omp-simd-clone.h: New file.
17943         * omp-simd-clone.c: Include omp-simd-clone.h.
17944         (expand_simd_clones): No longer static.
17945         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
17946         cgraph.h and omp-simd-clone.h.
17947         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
17948         (vect_recog_widen_shift_pattern): Formatting fix.
17949         (vect_pattern_recog_1): Don't check optab for calls.
17951         PR target/84336
17952         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
17953         operands[2] into a REG before using gen_lowpart on it.
17955 2018-02-12  Jeff Law  <law@redhat.com>
17957         PR target/83760
17958         * config/sh/sh.c (find_barrier): Consider a sibling call
17959         a barrier as well.
17961         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
17962         successfully back substituting a reg.
17964 2018-02-12  Richard Biener  <rguenther@suse.de>
17966         PR tree-optimization/84037
17967         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
17968         parameter, move visited init to caller.
17969         (vect_slp_analyze_operations): Separate cost from validity
17970         check, initialize visited once for all instances.
17971         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
17972         for all instances.
17973         * tree-vect-stmts.c (vect_model_simple_cost): Make early
17974         out an assert.
17975         (vect_model_promotion_demotion_cost): Likewise.
17976         (vectorizable_bswap): Guard cost modeling with !slp_node
17977         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
17978         SLP stmts.
17979         (vectorizable_call): Likewise.
17980         (vectorizable_conversion): Likewise.
17981         (vectorizable_assignment): Likewise.
17982         (vectorizable_shift): Likewise.
17983         (vectorizable_operation): Likewise.
17984         (vectorizable_store): Likewise.
17985         (vectorizable_load): Likewise.
17986         (vectorizable_condition): Likewise.
17987         (vectorizable_comparison): Likewise.
17989 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
17991         PR sanitizer/84307
17992         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
17993         (ASAN_MARK): Fix fnspec to account for return value, change pointer
17994         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
17996 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
17998         PR middle-end/83665
17999         * params.def (inline-min-speedup): Increase from 8 to 15.
18000         (max-inline-insns-auto): Decrease from 40 to 30.
18001         * ipa-split.c (consider_split): Add some buffer for function to
18002         be considered inlining candidate.
18003         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18004         default values.
18006 2018-02-12  Richard Biener  <rguenther@suse.de>
18008         PR tree-optimization/84037
18009         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18010         matched stmts if we cannot swap the non-matched ones.
18012 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
18014         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18015         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18016         _mm_maskz_scalef_round_ss): New intrinsics.
18017         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18018         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18019         __builtin_ia32_scalefss_round): Remove.
18020         (__builtin_ia32_scalefsd_mask_round,
18021         __builtin_ia32_scalefss_mask_round): New intrinsics.
18022         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18023         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18024         ((match_operand:VF_128 2 "<round_nimm_predicate>"
18025         "<round_constraint>")): Changed to ...
18026         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18027         "<round_scalar_constraint>")): ... this.
18028         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18029         %0, %1, %2<round_op3>}"): Changed to ...
18030         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18031         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18032         %2<round_scalar_mask_op3>}"): ... this.
18033         * config/i386/subst.md (round_scalar_nimm_predicate): New.
18035 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
18037         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18038         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18039         (_mm_maskz_sqrt_round_ss): New intrinsics.
18040         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18041         (__builtin_ia32_sqrtsd_mask_round)
18042         (__builtin_ia32_sqrtss_mask_round): New builtins.
18043         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18044         (__builtin_ia32_sqrtss_round): Remove.
18045         (__builtin_ia32_sqrtsd_mask_round)
18046         (__builtin_ia32_sqrtss_mask_round): New builtins.
18047         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18048         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18049         ((match_operand:VF_128 1 "vector_operand"
18050         "xBm,<round_constraint>")): Changed to ...
18051         ((match_operand:VF_128 1 "vector_operand"
18052         "xBm,<round_scalar_constraint>")): ... this.
18053         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18054         %0, %2, %<iptr>1<round_op3>}): Changed to ...
18055         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18056         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18057         %<iptr>1<round_scalar_mask_op3>}): ... this.
18058         ((set_attr "prefix" "<round_prefix>")): Changed to ...
18059         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18061 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
18063         PR target/84266
18064         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18065         Cast vec_cmpeq result to correct type.
18066         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18067         Cast vec_cmpgt result to correct type.
18069 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
18071         * final.c (final_scan_insn_1): Renamed from...
18072         (final_scan_insn): ... this.  New wrapper, to recover
18073         seen from the outermost call in recursive ones.
18074         * config/sparc/sparc.c (output_return): Drop seen from call.
18075         (output_sibcall): Likewise.
18076         * config/visium/visium.c (output_branch): Likewise.
18078 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
18080         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18081         function label.
18083 2018-02-10  Alan Modra  <amodra@gmail.com>
18085         PR target/84300
18086         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18087         Specify LR as an input.
18089 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
18091         PR sanitizer/83987
18092         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18093         remove_member_access_dummy_vars): New functions.
18094         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18095         lower_omp_1, execute_lower_omp): Use them.
18097         PR rtl-optimization/84308
18098         * shrink-wrap.c (spread_components): Release todo vector.
18100 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
18102         PR rtl-optimization/57193
18103         * ira-color.c (struct allocno_color_data): Add member
18104         conflict_allocno_hard_prefs.
18105         (update_conflict_allocno_hard_prefs): New.
18106         (bucket_allocno_compare_func): Add a preference based on
18107         conflict_allocno_hard_prefs.
18108         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18109         (color_allocnos): Remove a dead code.  Initiate
18110         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
18112 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
18114         PR target/84226
18115         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18116         constraint from =wa to wa.  Avoid a subreg on the output operand,
18117         instead use a pseudo and subreg it in a move.
18118         (p9_xxbrd_<mode>): Changed to ...
18119         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18120         (p9_xxbrd_v2df): New expander.
18121         (p9_xxbrw_<mode>): Changed to ...
18122         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18123         (p9_xxbrw_v4sf): New expander.
18125 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
18127         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18129 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
18131         PR target/83926
18132         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18133         multiply in 32-bit mode.
18134         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18135         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18136         mode.
18138 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
18140         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18141         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18142         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18143         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18145 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
18147         PR lto/84213
18148         * dwarf2out.c (is_trivial_indirect_ref): New function.
18149         (dwarf2out_late_global_decl): Do not generate a location
18150         attribute for variables that have a non-trivial DECL_VALUE_EXPR
18151         and that are not defined in the current unit.
18153 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
18155         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18156         instead of a libcall for UNORDERED.
18158 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
18160         PR target/82641
18161         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18162         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18164 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18166         PR target/PR84295
18167         * config/s390/s390.c (s390_set_current_function): Invoke
18168         s390_indirect_branch_settings also if fndecl didn't change.
18170 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
18172         * config/rs6000/rs6000.md (blockage): Set length to zero.
18174 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
18176         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18178 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
18180         PR sanitizer/84285
18181         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18182         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18183         -static-lib*san.
18185         PR debug/84252
18186         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18187         PARALLEL incoming that failed vt_get_decl_and_offset check.
18189         PR middle-end/84237
18190         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18191         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18192         TREE_READONLY bit.
18193         (get_variable_section): For decls in named .bss* sections pass true as
18194         second argument to bss_initializer_p.
18196 2018-02-09  Marek Polacek  <polacek@redhat.com>
18197             Jakub Jelinek  <jakub@redhat.com>
18199         PR c++/83659
18200         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18201         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
18202         Sync some changes from cxx_fold_indirect_ref.
18204 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
18206         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18207         markers.
18208         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18209         (BLOCK_INLINE_ENTRY_LABEL): New.
18210         (dwarf2out_var_location): Disregard inline entry markers.
18211         (inline_entry_data): New struct.
18212         (inline_entry_data_hasher): New hashtable type.
18213         (inline_entry_data_hasher::hash): New.
18214         (inline_entry_data_hasher::equal): New.
18215         (inline_entry_data_table): New variable.
18216         (add_high_low_attributes): Add DW_AT_entry_pc and
18217         DW_AT_GNU_entry_view attributes if a pending entry is found
18218         in inline_entry_data_table.  Add old entry_pc attribute only
18219         if debug nonbinding markers are disabled.
18220         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18221         markers are enabled.
18222         (block_within_block_p, dwarf2out_inline_entry): New.
18223         (dwarf2out_finish): Check that no entries remained in
18224         inline_entry_data_table.
18225         * final.c (reemit_insn_block_notes): Handle inline entry notes.
18226         (final_scan_insn, notice_source_line): Likewise.
18227         (rest_of_clean_state): Skip inline entry markers.
18228         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18229         markers.
18230         * gimple.c (gimple_build_debug_inline_entry): New.
18231         * gimple.h (enum gimple_debug_subcode): Add
18232         GIMPLE_DEBUG_INLINE_ENTRY.
18233         (gimple_build_debug_inline_entry): Declare.
18234         (gimple_debug_inline_entry_p): New.
18235         (gimple_debug_nonbind_marker_p): Adjust.
18236         * insn-notes.def (INLINE_ENTRY): New.
18237         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18238         inline entry marker notes.
18239         (print_insn): Likewise.
18240         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18241         (INSN_DEBUG_MARKER_KIND): Likewise.
18242         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18243         * tree-inline.c (expand_call_inline): Build and insert
18244         debug_inline_entry stmt.
18245         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18246         inline entry blocks early, if nonbind markers are enabled.
18247         (dump_scope_block): Dump fragment info.
18248         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18249         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18250         (gimple_build_debug_inline_entry): New.
18251         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18252         Enable/disable inline entry points too.
18253         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18254         (DEBUG_INSN): Describe inline entry markers.
18256         * common.opt (gvariable-location-views): New.
18257         (gvariable-location-views=incompat5): New.
18258         * config.in: Rebuilt.
18259         * configure: Rebuilt.
18260         * configure.ac: Test assembler for view support.
18261         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18262         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18263         * dwarf2out.c (var_loc_view): New typedef.
18264         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18265         (dwarf2out_locviews_in_attribute): New.
18266         (dwarf2out_locviews_in_loclist): New.
18267         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18268         (enum dw_line_info_opcode): Add LI_adv_address.
18269         (struct dw_line_info_table): Add view.
18270         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18271         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18272         (zero_view_p): New variable.
18273         (ZERO_VIEW_P): New macro.
18274         (output_asm_line_debug_info): New.
18275         (struct var_loc_node): Add view.
18276         (add_AT_view_list, AT_loc_list): New.
18277         (add_var_loc_to_decl): Add view param.  Test it against last.
18278         (new_loc_list): Add view params.  Record them.
18279         (AT_loc_list_ptr): Handle loc and view lists.
18280         (view_list_to_loc_list_val_node): New.
18281         (print_dw_val): Handle dw_val_class_view_list.
18282         (size_of_die): Likewise.
18283         (value_format): Likewise.
18284         (loc_list_has_views): New.
18285         (gen_llsym): Set vl_symbol too.
18286         (maybe_gen_llsym, skip_loc_list_entry): New.
18287         (dwarf2out_maybe_output_loclist_view_pair): New.
18288         (output_loc_list): Output view list or entries too.
18289         (output_view_list_offset): New.
18290         (output_die): Handle dw_val_class_view_list.
18291         (output_dwarf_version): New.
18292         (output_compilation_unit_header): Use it.
18293         (output_skeleton_debug_sections): Likewise.
18294         (output_rnglists, output_line_info): Likewise.
18295         (output_pubnames, output_aranges): Update version comments.
18296         (output_one_line_info_table): Output view numbers in asm comments.
18297         (dw_loc_list): Determine current endview, pass it to new_loc_list.
18298         Call maybe_gen_llsym.
18299         (loc_list_from_tree_1): Adjust.
18300         (add_AT_location_description): Create view list attribute if
18301         needed, check it's absent otherwise.
18302         (convert_cfa_to_fb_loc_list): Adjust.
18303         (maybe_emit_file): Call output_asm_line_debug_info for test.
18304         (dwarf2out_var_location): Reset views as needed.  Precompute
18305         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
18306         attribute.  Set view.
18307         (new_line_info_table): Reset next view.
18308         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18309         (dwarf2out_source_line): Likewise.  Output view resets and labels to
18310         the assembler, or select appropriate line info opcodes.
18311         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18312         (optimize_string_length): Catch it.  Adjust.
18313         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
18314         dw_val_class_view_list, and remove it if no longer needed.
18315         (hash_loc_list): Hash view numbers.
18316         (loc_list_hasher::equal): Compare them.
18317         (optimize_location_lists): Check whether a view list symbol is
18318         needed, and whether the locview attribute is present, and
18319         whether they match.  Remove the locview attribute if no longer
18320         needed.
18321         (index_location_lists): Call skip_loc_list_entry for test.
18322         (dwarf2out_finish): Call output_asm_line_debug_info for test.
18323         Use output_dwarf_version.
18324         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18325         (struct dw_val_node): Add val_view_list.
18326         * final.c (SEEN_NEXT_VIEW): New.
18327         (set_next_view_needed): New.
18328         (clear_next_view_needed): New.
18329         (maybe_output_next_view): New.
18330         (final_start_function): Rename to...
18331         (final_start_function_1): ... this.  Take pointer to FIRST,
18332         add SEEN parameter.  Emit param bindings in the initial view.
18333         (final_start_function): Reintroduce SEEN-less interface.
18334         (final): Rename to...
18335         (final_1): ... this.  Take SEEN parameter.  Output final pending
18336         next view at the end.
18337         (final): Reintroduce seen-less interface.
18338         (final_scan_insn): Output pending next view before switching
18339         sections or ending a block.  Mark the next view as needed when
18340         outputting variable locations.  Notify debug backend of section
18341         changes, and of location view changes.
18342         (rest_of_handle_final): Adjust.
18343         * toplev.c (process_options): Autodetect value for debug variable
18344         location views option.  Warn on incompat5 without -gdwarf-5.
18345         * doc/invoke.texi (gvariable-location-views): New.
18346         (gvariable-location-views=incompat5): New.
18347         (gno-variable-location-views): New.
18349 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
18351         PR tree-optimization/84136
18352         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18353         that the result of find_edge is non-NULL.
18355 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
18357         PR target/83008
18358         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18359         storing integer register in SImode.  Fix cost of 256 and 512
18360         byte aligned SSE register store.
18362 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
18364         * config/i386/i386.c (ix86_multiplication_cost): Fix
18365         multiplication cost for TARGET_AVX512DQ.
18367 2018-02-08  Marek Polacek  <polacek@redhat.com>
18369         PR tree-optimization/84238
18370         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18371         get_range_strlen.
18373 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
18375         PR tree-optimization/84265
18376         * tree-vect-stmts.c (vectorizable_store): Don't treat
18377         VMAT_CONTIGUOUS accesses as grouped.
18378         (vectorizable_load): Likewise.
18380 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
18382         PR tree-optimization/81635
18383         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18384         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18385         (test_round_for_mask): New functions.
18386         (wide_int_cc_tests): Call test_round_for_mask.
18387         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
18388         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
18389         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
18390         range returned by get_range_info.
18392 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
18394         PR ipa/81360
18395         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
18396         * symtab.c: Include builtins.h
18397         (symtab_node::output_to_lto_symbol_table_p): Move here
18398         from lto-streamer-out.c:output_symbol_p.
18399         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
18400         (output_symbol_p): Move all logic to symtab.c
18401         (produce_symtab): Update.
18403 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18405         * config/s390/s390-opts.h (enum indirect_branch): Define.
18406         * config/s390/s390-protos.h (s390_return_addr_from_memory)
18407         (s390_indirect_branch_via_thunk)
18408         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
18409         (enum s390_indirect_branch_type): Define.
18410         * config/s390/s390.c (struct s390_frame_layout, struct
18411         machine_function): Remove.
18412         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
18413         (indirect_branch_table_label_no, indirect_branch_table_name):
18414         Define variables.
18415         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
18416         (enum s390_indirect_branch_option): Define.
18417         (s390_return_addr_from_memory): New function.
18418         (s390_handle_string_attribute): New function.
18419         (s390_attribute_table): Add new attribute handler.
18420         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
18421         (s390_indirect_branch_via_thunk): New function.
18422         (s390_indirect_branch_via_inline_thunk): New function.
18423         (s390_function_ok_for_sibcall): When jumping via thunk disallow
18424         sibling call optimization for non z10 compiles.
18425         (s390_emit_call): Force indirect branch target to be a single
18426         register.  Add r1 clobber for non-z10 compiles.
18427         (s390_emit_epilogue): Emit return jump via return_use expander.
18428         (s390_reorg): Handle JUMP_INSNs as execute targets.
18429         (s390_option_override_internal): Perform validity checks for the
18430         new command line options.
18431         (s390_indirect_branch_attrvalue): New function.
18432         (s390_indirect_branch_settings): New function.
18433         (s390_set_current_function): Invoke s390_indirect_branch_settings.
18434         (s390_output_indirect_thunk_function):  New function.
18435         (s390_code_end): Implement target hook.
18436         (s390_case_values_threshold): Implement target hook.
18437         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
18438         macros.
18439         * config/s390/s390.h (struct s390_frame_layout)
18440         (struct machine_function): Move here from s390.c.
18441         (TARGET_INDIRECT_BRANCH_NOBP_RET)
18442         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
18443         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
18444         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
18445         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
18446         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
18447         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
18448         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
18449         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
18450         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
18451         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
18452         (mnemonic attribute): Add values which aren't recognized
18453         automatically.
18454         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
18455         pattern for branch conversion.  Fix mnemonic attribute.
18456         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
18457         indirect branch via thunk if requested.
18458         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
18459         ("*indirect_jump"): Disable for branch conversion using out of
18460         line thunks.
18461         ("indirect_jump_via_thunk<mode>_z10")
18462         ("indirect_jump_via_thunk<mode>")
18463         ("indirect_jump_via_inlinethunk<mode>_z10")
18464         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
18465         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
18466         ("casesi_jump_via_inlinethunk<mode>_z10")
18467         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
18468         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
18469         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
18470         ("*indirect2_jump"): Disable for branch conversion.
18471         ("casesi_jump"): Turn into expander and expand patterns for branch
18472         conversion.
18473         ("return_use"): New expander.
18474         ("*return"): Emit return via thunk and rename it to ...
18475         ("*return<mode>"): ... this one.
18476         * config/s390/s390.opt: Add new options and and enum for the
18477         option values.
18479 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
18481         * lra-constraints.c (match_reload): Unconditionally use
18482         gen_lowpart_SUBREG, rather than selecting between that
18483         and equivalent gen_rtx_SUBREG code.
18485 2018-02-08  Richard Biener  <rguenther@suse.de>
18487         PR tree-optimization/84233
18488         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
18489         changed flag instead of boguously re-using phi_inserted.
18491 2018-02-08  Martin Jambor  <mjambor@suse.cz>
18493         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
18494         static local variables.
18496 2018-02-08  Richard Biener  <rguenther@suse.de>
18498         PR tree-optimization/84278
18499         * tree-vect-stmts.c (vectorizable_store): When looking for
18500         smaller vector types to perform grouped strided loads/stores
18501         make sure the mode is supported by the target.
18502         (vectorizable_load): Likewise.
18504 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
18506         * config/aarch64/aarch64.c (aarch64_components_for_bb):
18507         Increase LDP/STP opportunities by adding adjacent callee-saves.
18509 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
18511         PR rtl-optimization/84068
18512         PR rtl-optimization/83459
18513         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
18515 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
18517         PR tree-optimization/84224
18518         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
18519         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
18520         non-zero arguments.
18522 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
18524         PR target/84113
18525         * config/rs6000/altivec.md (*restore_world): Remove LR use.
18526         * config/rs6000/predicates.md (restore_world_operation): Adjust op
18527         count, remove one USE.
18529 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
18531         * doc/install.texi (Configuration): Document the
18532         --with-long-double-format={ibm,ieee} PowerPC configuration
18533         options.
18535         PR target/84154
18536         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
18537         Convert from define_expand to be define_insn_and_split.  Rework
18538         float/double/_Float128 conversions to QI/HI/SImode to work with
18539         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
18540         conversions to QI/HImode types did a store and then a load to
18541         truncate the value.  For conversions to VSX registers, don't split
18542         the insn, instead emit the code directly.  Use the code iterator
18543         any_fix to combine signed and unsigned conversions.
18544         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
18545         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
18546         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18547         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
18548         (fix_<mode>di2_hw): Likewise.
18549         (fixuns_<mode>di2_hw): Likewise.
18550         (fix_<mode>si2_hw): Likewise.
18551         (fixuns_<mode>si2_hw): Likewise.
18552         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
18553         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18554         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
18555         fix<uns>_trunc<SFDF:mode>si2_p8.
18556         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
18557         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18558         (fix<uns>_<mode>_mem): Likewise.
18559         (fctiw<u>z_<mode>_mem): Likewise.
18560         (fix<uns>_<mode>_mem): Likewise.
18561         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
18562         the register allocator from doing a direct move to the GPRs to do
18563         a store, and instead use the ISA 3.0 store byte/half-word from
18564         vector register instruction.  For IEEE 128-bit floating point,
18565         also optimize stores of 32-bit ints.
18566         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
18568 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
18570         * genextract.c (push_pathstr_operand): New function to support
18571         [a-zA-Z].
18572         (walk_rtx): Call push_pathstr_operand.
18573         (print_path): Support [a-zA-Z].
18575 2018-02-07  Richard Biener  <rguenther@suse.de>
18577         PR tree-optimization/84037
18578         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
18579         (cse_and_gimplify_to_preheader): Declare.
18580         (vect_get_place_in_interleaving_chain): Likewise.
18581         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18582         ivexpr_map.
18583         (_loop_vec_info::~_loop_vec_info): Delete it.
18584         (cse_and_gimplify_to_preheader): New function.
18585         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
18586         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
18587         (vectorizable_load): Likewise.  For grouped stores always base
18588         the IV on the first element.
18589         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
18590         condition before gimplifying.
18592 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
18594         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
18595         *DIV_EXPR and *MOD_EXPR.
18597 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
18599         PR target/84248
18600         * config/i386/i386.c (ix86_option_override_internal): Mask out
18601         the CF_SET bit when checking -fcf-protection.
18603 2018-02-07  Tom de Vries  <tom@codesourcery.com>
18605         PR libgomp/84217
18606         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
18607         enough.
18609 2018-02-07  Richard Biener  <rguenther@suse.de>
18611         PR tree-optimization/84204
18612         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
18613         this place.
18615         PR tree-optimization/84205
18616         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
18617         special-case isl_ast_op_zdiv_r.
18619         PR tree-optimization/84223
18620         * graphite-scop-detection.c (gather_bbs::before_dom_children):
18621         Only add conditions from within the region.
18622         (gather_bbs::after_dom_children): Adjust.
18624 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
18626         PR target/84209
18627         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
18628         * config/avr/avr.md: Only post-reload split REG-REG moves if
18629         either register is GENERAL_REG_P.
18631 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
18633         PR tree-optimization/84235
18634         * tree-ssa-scopedtables.c
18635         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
18636         if the subtraction is performed in floating point type where NaNs are
18637         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
18638         build 1.  Formatting fix.
18640 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
18642         PR target/84146
18643         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
18644         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
18645         and skip it regardless of bb boundaries.  Use CALL_P macro,
18646         don't test INSN_P (insn) together with CALL_P or JUMP_P check
18647         unnecessarily, formatting fix.
18649 2018-02-06  Michael Collison  <michael.collison@arm.com>
18651         * config/arm/thumb2.md:
18652         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
18653         (*thumb_mov_notscc): Ditto.
18655 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
18657         PR target/84154
18658         * config/rs6000/rs6000.md (su code attribute): Use "u" for
18659         unsigned_fix, not "s".
18661 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18663         * configure.ac (gcc_fn_eh_frame_ro): New function.
18664         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
18665         correct .eh_frame permissions.
18666         * configure: Regenerate.
18668 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
18670         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
18671         irrelevant options.
18673 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18675         * config/rs6000/rs6000.c (rs6000_option_override_internal):
18676         Display warning message for -mno-speculate-indirect-jumps.
18678 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
18680         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
18681         Undocumented.
18682         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
18684 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
18686         PR tree-optimization/84225
18687         * tree-eh.c (find_trapping_overflow): Only call
18688         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
18690 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
18692         PR target/84145
18693         * config/i386/i386.c: Reimplement the check of possible options
18694         -mibt/-mshstk conbination. Change error messages.
18695         * doc/invoke.texi: Fix a typo: remove extra '='.
18697 2018-02-06  Marek Polacek  <polacek@redhat.com>
18699         PR tree-optimization/84228
18700         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
18702 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
18704         PR target/82641
18705         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
18706         emitted arch directives.
18707         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
18708         __ARM_FEATURE_COPROC before changing architectures.
18710 2018-02-06  Richard Biener  <rguenther@suse.de>
18712         * config/i386/i386.c (print_reg): Fix typo.
18713         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
18715 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
18717         * configure: Regenerate.
18719 2018-02-05  Martin Sebor  <msebor@redhat.com>
18721         PR tree-optimization/83369
18722         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
18723         inlining context.
18725 2018-02-05  Martin Liska  <mliska@suse.cz>
18727         * doc/invoke.texi: Cherry-pick upstream r323995.
18729 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
18731         * ira.c (ira_init_register_move_cost): Adjust comment.
18733 2018-02-05  Martin Liska  <mliska@suse.cz>
18735         PR gcov-profile/84137
18736         * doc/gcov.texi: Fix typo in documentation.
18738 2018-02-05  Martin Liska  <mliska@suse.cz>
18740         PR gcov-profile/83879
18741         * doc/gcov.texi: Document necessity of --dynamic-list-data when
18742         using dlopen functionality.
18744 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
18746         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
18747         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
18748         _mm_maskz_range_ss, _mm_mask_range_round_ss,
18749         _mm_maskz_range_round_ss): New intrinsics.
18750         (__builtin_ia32_rangesd128_round)
18751         (__builtin_ia32_rangess128_round): Remove.
18752         (__builtin_ia32_rangesd128_mask_round,
18753         __builtin_ia32_rangess128_mask_round): New builtins.
18754         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
18755         __builtin_ia32_rangess128_round): Remove.
18756         (__builtin_ia32_rangesd128_mask_round,
18757         __builtin_ia32_rangess128_mask_round): New builtins.
18758         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
18759         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
18760         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
18761         "<round_saeonly_constraint>")): Changed to ...
18762         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
18763         "<round_saeonly_scalar_constraint>")): ... this.
18764         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
18765         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
18766         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
18767         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
18768         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
18770 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
18772         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
18773         options.
18774         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
18775         Remove all values except native, 8540 and 8548.
18777 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
18779         * config/i386/i386.c (ix86_output_function_return): Pass
18780         INVALID_REGNUM, instead of -1, as invalid register number to
18781         indirect_thunk_name and output_indirect_thunk.
18783 2018-02-02  Julia Koval  <julia.koval@intel.com>
18785         * config.gcc: Add -march=icelake.
18786         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
18787         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
18788         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
18789         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
18790         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
18791         (processor_target_table): Add icelake.
18792         (ix86_option_override_internal): Handle new PTAs.
18793         (get_builtin_code_for_version): Handle icelake.
18794         (M_INTEL_COREI7_ICELAKE): New.
18795         (fold_builtin_cpu): Handle icelake.
18796         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
18797         * doc/invoke.texi: Add -march=icelake.
18799 2018-02-02  Julia Koval  <julia.koval@intel.com>
18801         * config/i386/i386.c (ix86_option_override_internal): Change flags type
18802         to wide_int_bitmask.
18803         * wide-int-bitmask.h: New.
18805 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
18807         PR target/84066
18808         * config/i386/i386.md: Replace Pmode with word_mode in
18809         builtin_setjmp_setup and builtin_longjmp to support x32.
18811 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
18813         PR target/56010
18814         PR target/83743
18815         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
18816         #include "opts.h".
18817         (rs6000_supported_cpu_names): New static variable.
18818         (linux_cpu_translation_table): Likewise.
18819         (elf_platform) <cpu>: Define new static variable and use it.
18820         Translate kernel AT_PLATFORM name to canonical name if needed.
18821         Error if platform name is unknown.
18823 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
18825         PR target/84089
18826         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
18828 2018-02-01  Jeff Law  <law@redhat.com>
18830         PR target/84128
18831         * config/i386/i386.c (release_scratch_register_on_entry): Add new
18832         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
18833         the scratch if RELEASE_VIA_POP is false.
18834         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
18835         If we have to save a temporary register, decrement SIZE appropriately.
18836         Pass new arguments to release_scratch_register_on_entry.
18837         (ix86_adjust_stack_and_probe): Likewise.
18838         (ix86_emit_probe_stack_range): Pass new arguments to
18839         release_scratch_register_on_entry.
18841 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
18843         PR rtl-optimization/84157
18844         * combine.c (change_zero_ext): Use REG_P predicate in
18845         front of HARD_REGISTER_P predicate.
18847 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
18849         * config/avr/avr.c (avr_option_override): Move disabling of
18850         -fdelete-null-pointer-checks to...
18851         * common/config/avr/avr-common.c (avr_option_optimization_table):
18852         ...here.
18854 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18856         PR tree-optimization/81635
18857         * tree-data-ref.c (split_constant_offset_1): For types that
18858         wrap on overflow, try to use range info to prove that wrapping
18859         cannot occur.
18861 2018-02-01  Renlin Li  <renlin.li@arm.com>
18863         PR target/83370
18864         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
18865         TAILCALL_ADDR_REGS.
18866         (aarch64_register_move_cost): Likewise.
18867         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
18868         TAILCALL_ADDR_REGS.
18869         (REG_CLASS_NAMES): Likewise.
18870         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
18871         TAILCALL_ADDR_REGS. Remove IP registers.
18872         * config/aarch64/aarch64.md (Ucs): Update register constraint.
18874 2018-02-01  Richard Biener  <rguenther@suse.de>
18876         * domwalk.h (dom_walker::dom_walker): Add additional constructor
18877         for specifying RPO order and allow NULL for that.
18878         * domwalk.c (dom_walker::dom_walker): Likewise.
18879         (dom_walker::walk): Handle NULL RPO order.
18880         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
18881         in RPO order.
18882         (rewrite_update_dom_walker): Likewise.
18883         (mark_def_dom_walker): Likewise.
18885 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18887         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
18888         (aarch64_maybe_expand_sve_subreg_move): Declare.
18889         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
18890         * config/aarch64/predicates.md (aarch64_any_register_operand): New
18891         predicate.
18892         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
18893         that are semantically a reverse operation.
18894         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
18895         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
18896         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
18897         functions.
18898         (aarch64_can_change_mode_class): For big-endian, forbid changes
18899         between two SVE modes if they have different element sizes.
18901 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18903         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
18904         the TImode handling for big-endian targets.
18906 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18908         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
18909         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
18910         not just bytes.
18911         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
18912         Remove BSWAP handing for big-endian targets and use the form of
18913         LD1RQ appropariate for the mode.
18915 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18917         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
18918         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
18919         duplicated element.
18921 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18923         PR tearget/83845
18924         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
18925         check for operands that need to go through aarch64_sve_reload_be.
18927 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
18929         PR tree-optimization/81661
18930         PR tree-optimization/84117
18931         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
18932         * tree-eh.c: Include gimplify.h.
18933         (find_trapping_overflow, replace_trapping_overflow,
18934         rewrite_to_non_trapping_overflow): New functions.
18935         * tree-vect-loop.c: Include tree-eh.h.
18936         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
18937         * tree-data-ref.c: Include tree-eh.h.
18938         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
18940 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
18942         PR rtl-optimization/84123
18943         * combine.c (change_zero_ext): Check if hard register satisfies
18944         can_change_dest_mode before calling gen_lowpart_SUBREG.
18946 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
18948         PR target/82444
18949         * ira.c (ira_init_register_move_cost): Remove assert.
18951 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
18953         PR rtl-optimization/84071
18954         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
18955         * doc/tm.texi: Regenerate.
18957 2018-01-31  Richard Biener  <rguenther@suse.de>
18959         PR tree-optimization/84132
18960         * tree-data-ref.c (analyze_miv_subscript): Properly
18961         check whether evolution_function_is_affine_multivariate_p
18962         before calling gcd_of_steps_may_divide_p.
18964 2018-01-31  Julia Koval  <julia.koval@intel.com>
18966         PR target/83618
18967         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
18968         * config/i386/i386.md (rdpid_rex64) New.
18969         (rdpid): Make 32bit only.
18971 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
18973         PR lto/84105
18974         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
18975         an IDENTIFIER_NODE for FUNCTION_TYPE's.
18977 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
18979         Revert
18980         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
18982         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18984 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
18986         PR rtl-optimization/84071
18987         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
18988         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
18990 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
18992         * config/arc/arc.c (arc_handle_aux_attribute): New function.
18993         (arc_attribute_table): Add 'aux' attribute.
18994         (arc_in_small_data_p): Consider aux like variables.
18995         (arc_is_aux_reg_p): New function.
18996         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
18997         (arc_get_aux_arg): New function.
18998         (prepare_move_operands): Handle aux-register access.
18999         (arc_handle_aux_attribute): New function.
19000         * doc/extend.texi (ARC Variable attributes): Add subsection.
19002 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
19004         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19005         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19006         (arc_attribute_table): Add 'uncached' attribute.
19007         (arc_print_operand): Print '.di' flag for uncached memory
19008         accesses.
19009         (arc_in_small_data_p): Do not consider for small data the uncached
19010         types.
19011         (arc_is_uncached_mem_p): New function.
19012         * config/arc/predicates.md (compact_store_memory_operand): Check
19013         for uncached memory accesses.
19014         (nonvol_nonimm_operand): Likewise.
19015         * doc/extend.texi (ARC Type Attribute): New subsection.
19017 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
19019         PR c/84100
19020         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19021         falign-loops=): Add Optimization flag.
19023 2018-01-30  Jeff Law  <law@redhat.com>
19025         PR target/84064
19026         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19027         INT_REGISTERS_SAVED.  Check it prior to calling
19028         get_scratch_register_on_entry.
19029         (ix86_adjust_stack_and_probe): Similarly.
19030         (ix86_emit_probe_stack_range): Similarly.
19031         (ix86_expand_prologue): Corresponding changes.
19033 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19035         PR target/40411
19036         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19037         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19039 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
19041         PR target/84112
19042         * lra-constraints.c (curr_insn_transform): Process AND in the
19043         address.
19045 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
19047         PR rtl-optimization/83986
19048         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19049         dependence against last_pending_memory_flush in addition to
19050         pending_jump_insns.
19052 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
19054         PR tree-optimization/81611
19055         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19056         copies.
19058 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19060         PR target/83758
19061         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19062         a reg rtx.
19064 2018-01-30  Richard Biener  <rguenther@suse.de>
19065             Jakub Jelinek  <jakub@redhat.com>
19067         PR tree-optimization/84111
19068         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19069         inner loops added during recursion, as they don't have up-to-date
19070         SSA form.
19072 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
19074         PR ipa/81360
19075         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19076         (can_inline_edge_by_limits_p): ... here.
19077         (can_early_inline_edge_p, check_callers,
19078         update_caller_keys, update_callee_keys, recursive_inlining,
19079         add_new_edges_to_heap, speculation_useful_p,
19080         inline_small_functions,
19081         inline_small_functions, flatten_function,
19082         inline_to_all_callers_1): Update.
19084 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
19086         * profile-count.c (profile_count::combine_with_ipa_count): Handle
19087         zeros correctly.
19089 2018-01-30  Richard Biener  <rguenther@suse.de>
19091         PR tree-optimization/83008
19092         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19093         invariant and constant vector uses in stmts when they need
19094         more than one stmt.
19096 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19098         PR bootstrap/84017
19099         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19100         * configure: Regenerate.
19102 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19104         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19105         pattern.
19106         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19107         Use gen_rtx_REG rather than gen_lowpart.
19109 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19111         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19112         rather than 0 when creating partial subregs.
19114 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19116         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19117         of usage.
19119 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
19121         PR target/81550
19122         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19123         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19124         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19125         flags.  This restores the settings used before the 2017-07-24.
19126         Turning off pre increment/decrement/modify allows IVOPTS to
19127         optimize DF/SF loops where the index is an int.
19129 2018-01-29  Richard Biener  <rguenther@suse.de>
19130             Kelvin Nilsen  <kelvin@gcc.gnu.org>
19132         PR bootstrap/80867
19133         * tree-vect-stmts.c (vectorizable_call): Don't call
19134         targetm.vectorize_builtin_md_vectorized_function if callee is
19135         NULL.
19137 2018-01-22  Carl Love  <cel@us.ibm.com>
19139         * doc/extend.tex: Fix typo in second arg in
19140         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19142 2018-01-29  Richard Biener  <rguenther@suse.de>
19144         PR tree-optimization/84086
19145         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19146         (flush_ssaname_freelist): When SSA names were released reset
19147         the SCEV hash table.
19149 2018-01-29  Richard Biener  <rguenther@suse.de>
19151         PR tree-optimization/84057
19152         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19153         removed paths when removing edges.
19155 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
19157         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19158         -mfunction-return=@var{choice}.
19160 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
19162         PR diagnostic/84034
19163         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19164         Handle CR like TAB.
19165         (layout::print_source_line): Likewise.
19166         (test_get_line_width_without_trailing_whitespace): Add test cases.
19168 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
19170         PR middle-end/84040
19171         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19172         debug insns.
19174 2018-01-26  Jim Wilson  <jimw@sifive.com>
19176         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19178         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19179         specified.
19181 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19183         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19184         and CMP + SUB-immediate -> SUBS.
19186 2018-01-26  Martin Sebor  <msebor@redhat.com>
19188         PR tree-optimization/83896
19189         * tree-ssa-strlen.c (get_string_len): Rename...
19190         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
19191         Avoid assuming length is constant.
19192         (handle_char_store): Use HOST_WIDE_INT for string length.
19194 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
19196         PR target/81763
19197         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19198         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19200 2018-01-26  Richard Biener  <rguenther@suse.de>
19202         PR rtl-optimization/84003
19203         * dse.c (record_store): Only record redundant stores when
19204         the earlier store aliases at least all accesses the later one does.
19206 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
19208         PR rtl-optimization/83985
19209         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19210         REG_CFA_RESTORE insns.
19211         (delete_unmarked_insns): Don't ignore separate shrink wrapping
19212         REG_CFA_RESTORE insns here.
19214         PR c/83989
19215         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19216         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19218 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19220         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19221         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19222         (arc_init): Likewise.
19223         (arc_override_options): Likewise.
19224         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19225         value.
19226         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19227         support.
19228         * config/arc/arc.h (TARGET_DBNZ): Define.
19229         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19230         properly set the tune attribute.
19231         (dbnz): Use TARGET_DBNZ guard.
19232         * config/arc/arc.opt (mtune): Add core3 option.
19234 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19236         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19237         recognize new pic like addresses.
19238         (arc_delegitimize_address): Clean up.
19240 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19242         * config/arc/arc-arches.def: Option mrf16 valid for all
19243         architectures.
19244         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19245         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19246         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19247         * config/arc/arc-tables.opt: Regenerate.
19248         * config/arc/arc.c (arc_conditional_register_usage): Handle
19249         reduced register file case.
19250         (arc_file_start): Set must have build attributes.
19251         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19252         mrf16 option value.
19253         * config/arc/arc.opt (mrf16): Add new option.
19254         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19255         * config/arc/genmultilib.awk: Handle new mrf16 option.
19256         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19257         * config/arc/t-multilib: Regenerate.
19258         * doc/invoke.texi (ARC Options): Document mrf16 option.
19260 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19262         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19263         * config/arc/arc.c (arc_handle_secure_attribute): New function.
19264         (arc_attribute_table): Add 'secure_call' attribute.
19265         (arc_print_operand): Print secure call operand.
19266         (arc_function_ok_for_sibcall): Don't optimize tail calls when
19267         secure.
19268         (arc_is_secure_call_p): New function.  * config/arc/arc.md
19269         (call_i): Add support for sjli instruction.
19270         (call_value_i): Likewise.
19271         * config/arc/constraints.md (Csc): New constraint.
19273 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19274             John Eric Martin  <John.Martin@emmicro-us.com>
19276         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19277         * config/arc/arc.c (_arc_jli_section): New struct.
19278         (arc_jli_section): New type.
19279         (rc_jli_sections): New static variable.
19280         (arc_handle_jli_attribute): New function.
19281         (arc_attribute_table): Add jli_always and jli_fixed attribute.
19282         (arc_file_end): New function.
19283         (TARGET_ASM_FILE_END): Define.
19284         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19285         (arc_add_jli_section): New function.
19286         (jli_call_scan): Likewise.
19287         (arc_reorg): Call jli_call_scan.
19288         (arc_output_addsi): Remove 'S' from printing asm operand.
19289         (arc_is_jli_call_p): New function.
19290         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19291         operand.
19292         (movhi_insn): Likewise.
19293         (movsi_insn): Likewise.
19294         (movsi_set_cc_insn): Likewise.
19295         (loadqi_update): Likewise.
19296         (load_zeroextendqisi_update): Likewise.
19297         (load_signextendqisi_update): Likewise.
19298         (loadhi_update): Likewise.
19299         (load_zeroextendhisi_update): Likewise.
19300         (load_signextendhisi_update): Likewise.
19301         (loadsi_update): Likewise.
19302         (loadsf_update): Likewise.
19303         (movsicc_insn): Likewise.
19304         (bset_insn): Likewise.
19305         (bxor_insn): Likewise.
19306         (bclr_insn): Likewise.
19307         (bmsk_insn): Likewise.
19308         (bicsi3_insn): Likewise.
19309         (cmpsi_cc_c_insn): Likewise.
19310         (movsi_ne): Likewise.
19311         (movsi_cond_exec): Likewise.
19312         (clrsbsi2): Likewise.
19313         (norm_f): Likewise.
19314         (normw): Likewise.
19315         (swap): Likewise.
19316         (divaw): Likewise.
19317         (flag): Likewise.
19318         (sr): Likewise.
19319         (kflag): Likewise.
19320         (ffs): Likewise.
19321         (ffs_f): Likewise.
19322         (fls): Likewise.
19323         (call_i): Remove 'S' asm letter, add jli instruction.
19324         (call_value_i): Likewise.
19325         * config/arc/arc.op (mjli-always): New option.
19326         * config/arc/constraints.md (Cji): New constraint.
19327         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19328         operand.
19329         (subsf3_fpx): Likewise.
19330         (mulsf3_fpx): Likewise.
19331         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19332         asm operand.
19333         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19334         function attrbutes.
19335         * doc/invoke.texi (ARC): Document mjli-always option.
19337 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
19339         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19340         avoid addition with 0 and use incw and decw where possible.
19342 2018-01-26  Richard Biener  <rguenther@suse.de>
19344         PR tree-optimization/81082
19345         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19346         association if it requires casting to unsigned.
19347         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19348         from fold_plusminus_mult_expr to catch important cases late when
19349         range info is available.
19351 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19353         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19354         * configure.ac (hidden_linkonce): New test.
19355         * configure: Regenerate.
19356         * config.in: Regenerate.
19358 2018-01-26  Julia Koval  <julia.koval@intel.com>
19360         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19361         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19362         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19363         _mm_mask_bitshuffle_epi64_mask): Fix type.
19364         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19365         USI_FTYPE_V4DI_V4DI_USI): Remove.
19366         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19367         __builtin_ia32_vpshufbitqmb256_mask,
19368         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19369         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19370         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19372 2018-01-26  Alan Modra  <amodra@gmail.com>
19374         PR target/84033
19375         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19376         UNSPEC_VBPERMQ.  Sort other unspecs.
19378 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
19380         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19382 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
19384         PR middle-end/83055
19385         * predict.c (drop_profile): Do not push/pop cfun; update also
19386         node->count.
19387         (handle_missing_profiles): Fix logic looking for zero profiles.
19389 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
19391         PR middle-end/83977
19392         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
19393         on functions with #pragma omp declare simd or functions with simd
19394         attribute.
19395         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
19396         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
19397         Remove trailing \n from warning_at calls.
19399 2018-01-25  Tom de Vries  <tom@codesourcery.com>
19401         PR target/84028
19402         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19403         for neutered workers.
19405 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
19407         PR target/68467
19408         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
19409         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
19411 2018-01-24  Jeff Law  <law@redhat.com>
19413         PR target/83994
19414         * i386.c (get_probe_interval): Move to earlier point.
19415         (ix86_compute_frame_layout): If -fstack-clash-protection and
19416         the frame is larger than the probe interval, then use pushes
19417         to save registers rather than reg->mem moves.
19418         (ix86_expand_prologue): Remove conditional for int_registers_saved
19419         assertion.
19421 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
19423         PR target/84014
19424         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
19425         min/max for never referenced object.
19427 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
19429         PR middle-end/83977
19430         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
19431         here.
19432         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
19433         attributes from DECL_ATTRIBUTES (decl) without affecting
19434         DECL_ATTRIBUTES (current_function_decl).
19435         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
19436         functions with non-NULL DECL_ABSTRACT_ORIGIN.
19438 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
19440         PR tree-optimization/83979
19441         * fold-const.c (fold_comparison): Use constant_boolean_node
19442         instead of boolean_{true,false}_node.
19444 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
19446         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
19447         with zero counts.
19449 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19451         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19452         Simplify the clause that sets the length attribute.
19453         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19454         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
19455         clause that sets the length attribute.
19456         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19458 2018-01-24  Tom de Vries  <tom@codesourcery.com>
19460         PR target/83589
19461         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
19462         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
19463         Add strict parameter.
19464         (prevent_branch_around_nothing): Insert dummy insn between branch to
19465         label and label with no ptx insn inbetween.
19466         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
19468 2018-01-24  Tom de Vries  <tom@codesourcery.com>
19470         PR target/81352
19471         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19472         for neutered threads in warp.
19473         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
19475 2018-01-24  Richard Biener  <rguenther@suse.de>
19477         PR tree-optimization/83176
19478         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
19479         operands.
19481 2018-01-24  Richard Biener  <rguenther@suse.de>
19483         PR tree-optimization/82819
19484         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
19485         code generating pluses that are no-ops in the target precision.
19487 2018-01-24  Richard Biener  <rguenther@suse.de>
19489         PR middle-end/84000
19490         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
19492 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
19494         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
19495         to merge probabilities.
19496         * predict.c (probably_never_executed): Also mark as cold functions
19497         with global 0 profile and guessed local profile.
19498         * profile-count.c (profile_probability::combine_with_count): New
19499         member function.
19500         * profile-count.h (profile_probability::operator*,
19501         profile_probability::operator*=, profile_probability::operator/,
19502         profile_probability::operator/=): Reduce precision to adjusted
19503         and set value to guessed on contradictory divisions.
19504         (profile_probability::combine_with_freq): Remove.
19505         (profile_probability::combine_wiht_count): Declare.
19506         (profile_count::force_nonzero):: Set to adjusted.
19507         (profile_count::probability_in):: Set quality to adjusted.
19508         * tree-ssa-tail-merge.c (replace_block_by): Use
19509         combine_with_count.
19511 2018-01-23  Andrew Waterman  <andrew@sifive.com>
19512             Jim Wilson  <jimw@sifive.com>
19514         * config/riscv/riscv.c (riscv_stack_boundary): New.
19515         (riscv_option_override): Set riscv_stack_boundary.  Handle
19516         riscv_preferred_stack_boundary_arg.
19517         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
19518         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
19519         (STACK_BOUNDARY): Set to riscv_stack_boundary.
19520         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
19521         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
19522         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
19524 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
19526         PR target/83905
19527         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
19528         of struct ix86_frame.
19529         (ix86_expand_epilogue): Likewise.  Add a local variable for
19530         the reg_save_offset field in struct ix86_frame.
19532 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
19534         PR tree-optimization/82604
19535         * tree-loop-distribution.c (enum partition_kind): New enum item
19536         PKIND_PARTIAL_MEMSET.
19537         (partition_builtin_p): Support above new enum item.
19538         (generate_code_for_partition): Ditto.
19539         (compute_access_range): Differentiate cases that equality can be
19540         proven at all loops, the innermost loops or no loops.
19541         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
19542         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
19543         (finalize_partitions, distribute_loop): Don't fuse partition of
19544         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
19545         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
19546         parloop is enabled.
19548 2018-01-23  Martin Liska  <mliska@suse.cz>
19550         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
19551         order to ignore the predictor.
19552         (PRED_POLYMORPHIC_CALL): Likewise.
19553         (PRED_RECURSIVE_CALL): Likewise.
19555 2018-01-23  Martin Liska  <mliska@suse.cz>
19557         * tree-profile.c (tree_profiling): Print function header to
19558         aware reader which function we are working on.
19559         * value-prof.c (gimple_find_values_to_profile): Do not print
19560         not interesting value histograms.
19562 2018-01-23  Martin Liska  <mliska@suse.cz>
19564         * profile-count.h (enum profile_quality): Add
19565         profile_uninitialized as the first value. Do not number values
19566         as they are zero based.
19567         (profile_count::verify): Update sanity check.
19568         (profile_probability::verify): Likewise.
19570 2018-01-23  Nathan Sidwell  <nathan@acm.org>
19572         * doc/invoke.texi (ffor-scope): Deprecate.
19574 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
19576         PR tree-optimization/83510
19577         * domwalk.c (set_all_edges_as_executable): New function.
19578         (dom_walker::dom_walker): Convert bool param
19579         "skip_unreachable_blocks" to enum reachability.  Move setup of
19580         edge flags to set_all_edges_as_executable and only do it when
19581         reachability is REACHABLE_BLOCKS.
19582         * domwalk.h (enum dom_walker::reachability): New enum.
19583         (dom_walker::dom_walker): Convert bool param
19584         "skip_unreachable_blocks" to enum reachability.
19585         (set_all_edges_as_executable): New decl.
19586         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
19587         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
19588         "reachability".
19589         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
19590         but converting true to REACHABLE_BLOCKS.
19591         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
19592         * tree-vrp.c
19593         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
19594         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
19595         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
19596         REACHABLE_BLOCKS.
19597         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
19598         if check_all_array_refs will be called.
19600 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
19602         * tree.c (selftest::test_location_wrappers): Add more test
19603         coverage.
19605 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
19607         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
19608         (selftest::test_bit_in_range): Likewise.
19610 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
19612         PR testsuite/83888
19613         * doc/sourcebuild.texi (vect_float): Say that the selector
19614         only describes the situation when -funsafe-math-optimizations is on.
19615         (vect_float_strict): Document.
19617 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
19619         PR tree-optimization/83965
19620         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
19621         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
19622         instead of checking only for a reduction.
19623         (vect_recog_widen_sum_pattern): Likewise.
19625 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
19627         * predict.c (probably_never_executed): Only use precise profile info.
19628         (compute_function_frequency): Skip after inlining hack since we now
19629         have quality checking.
19631 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
19633         * profile-count.h (profile_probability::very_unlikely,
19634         profile_probability::unlikely, profile_probability::even): Set
19635         precision to guessed.
19637 2018-01-23  Richard Biener  <rguenther@suse.de>
19639         PR tree-optimization/83963
19640         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
19641         Properly terminate dominator walk when crossing the exit edge not
19642         when visiting its source block.
19644 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
19646         PR c++/83918
19647         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
19648         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
19650 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
19652         PR tree-optimization/83957
19653         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
19654         semicolon after for body surrounded by braces.
19656         PR tree-optimization/83081
19657         * profile-count.h (profile_probability::split): New method.
19658         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
19659         Use profile_probability::split.
19660         (do_compare_rtx_and_jump): Fix adjustment of probabilities
19661         when splitting a single conditional jump into 2.
19663 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
19665         PR tree-optimization/69452
19666         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
19667         decl.
19669 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19671         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
19672         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
19673         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
19675 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19677         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
19678         declaration.
19679         * config/rl78/rl78.md (movdi): New define_expand.
19680         * config/rl78/rl78.c (rl78_split_movdi): New function.
19682 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
19684         PR target/83862
19685         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
19686         no longer used.
19687         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
19688         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
19689         128-bit to produce an UNSPEC move to get the double word with the
19690         signbit and then a shift directly to do signbit.
19691         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
19692         implementation with a new version that just does either a direct
19693         move or a regular move.  Move memory interface to separate insns.
19694         Move insns so they are next to the expander.
19695         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
19696         with signbit move.  Split big and little endian case.
19697         (signbit<mode>2_dm_mem_le): Likewise.
19698         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
19699         (signbit<mode>2_dm2): Likewise.
19701 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19703         * config/rl78/rl78.md (anddi3): New define_expand.
19705 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19707         * config/rl78/rl78.md (umindi3): New define_expand.
19709 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19711         * config/rl78/rl78.md (smindi3): New define_expand.
19713 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19715         * config/rl78/rl78.md (smaxdi3): New define_expand.
19717 2018-01-22  Carl Love  <cel@us.ibm.com>
19719         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
19720         LVX_V1TI): Add macro expansion.
19721         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
19722         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
19723         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
19724         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
19725         Change check to determine if the instruction is a byte reversing
19726         entry.  Fix typo in comment.
19727         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
19728         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
19729         Add def_builtin calls for new builtins.
19730         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
19731         Add define_insn expansion.
19733 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19735         * config/rl78/rl78.md (umaxdi3): New define_expand.
19737 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19739         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
19740         for non-QImode registers.
19742 2018-01-22  Richard Biener  <rguenther@suse.de>
19744         PR tree-optimization/83963
19745         * graphite-scop-detection.c (scop_detection::get_sese): Delay
19746         including the loop exit block.
19747         (scop_detection::merge_sese): Likewise.
19748         (scop_detection::add_scop): Do it here instead.
19750 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19752         * doc/sourcebuild.texi (arm_softfloat): Document.
19754 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
19756         PR gcc/77734
19757         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
19758         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
19759         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
19761 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19762             David Edelsohn  <dje.gcc@gmail.com>
19764         PR target/83946
19765         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19766         Change "crset eq" to "crset 2".
19767         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19768         (*call_indirect_aix<mode>_nospec): Likewise.
19769         (*call_value_indirect_aix<mode>_nospec): Likewise.
19770         (*call_indirect_elfv2<mode>_nospec): Likewise.
19771         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
19772         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
19773         change assembly output from . to $.
19774         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19775         (indirect_jump<mode>_nospec): Change assembly output from . to $.
19776         (*tablejump<mode>_internal1_nospec): Likewise.
19778 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
19780         PR target/80870
19781         * config/sh/sh_optimize_sett_clrt.cc:
19782         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
19784 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
19786         PR tree-optimization/83940
19787         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
19788         offset_dt to vect_constant_def rather than vect_unknown_def_type.
19789         (vect_check_load_store_mask): Add a mask_dt_out parameter and
19790         use it to pass back the definition type.
19791         (vect_check_store_rhs): Likewise rhs_dt_out.
19792         (vect_build_gather_load_calls): Add a mask_dt argument and use
19793         it instead of a call to vect_is_simple_use.
19794         (vectorizable_store): Update calls to vect_check_load_store_mask
19795         and vect_check_store_rhs.  Use the dt returned by the latter instead
19796         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
19797         instead of calls to vect_is_simple_use.  Pass the scalar rather
19798         than the vector operand to vect_is_simple_use when handling
19799         second and subsequent copies of an rhs value.
19800         (vectorizable_load): Update calls to vect_check_load_store_mask
19801         and vect_build_gather_load_calls.  Use the cached mask_dt and
19802         gs_info.offset_dt instead of calls to vect_is_simple_use.
19804 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
19806         PR middle-end/83945
19807         * tree-emutls.c: Include gimplify.h.
19808         (lower_emutls_2): New function.
19809         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
19810         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
19811         it before further processing.
19813         PR target/83930
19814         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
19815         UINTVAL (trueop1) instead of INTVAL (op1).
19817 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
19819         PR debug/81570
19820         PR debug/83728
19821         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
19822         INCOMING_FRAME_SP_OFFSET if not defined.
19823         (scan_trace): Add ENTRY argument.  If true and
19824         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
19825         emit a note to adjust the CFA offset.
19826         (create_cfi_notes): Adjust scan_trace callers.
19827         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
19828         INCOMING_FRAME_SP_OFFSET in the CIE.
19829         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
19830         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
19831         Likewise.
19832         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
19833         * doc/tm.texi: Regenerated.
19835 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19837         PR rtl-optimization/83147
19838         * lra-constraints.c (remove_inheritance_pseudos): Use
19839         lra_substitute_pseudo_within_insn.
19841 2018-01-19  Tom de Vries  <tom@codesourcery.com>
19842             Cesar Philippidis  <cesar@codesourcery.com>
19844         PR target/83920
19845         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
19847 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
19849         PR target/83790
19850         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
19851         spaces for function labels.
19853 2018-01-19  Martin Liska  <mliska@suse.cz>
19855         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
19856         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
19857         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
19858         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
19859         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
19860         (PRED_CONST_RETURN): Change from 69 to 65.
19861         (PRED_NULL_RETURN): Change from 91 to 71.
19862         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
19863         (PRED_LOOP_GUARD): Change from 66 to 73.
19865 2018-01-19  Martin Liska  <mliska@suse.cz>
19867         * predict.c (predict_insn_def): Add new assert.
19868         (struct branch_predictor): Change type to signed integer.
19869         (test_prediction_value_range): Amend test to cover
19870         PROB_UNINITIALIZED.
19871         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
19872         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
19873         (PRED_LOOP_ITERATIONS_MAX): Likewise.
19874         (PRED_LOOP_IV_COMPARE): Likewise.
19875         * predict.h (PROB_UNINITIALIZED): Define new constant.
19877 2018-01-19  Martin Liska  <mliska@suse.cz>
19879         * predict.c (dump_prediction): Add new format for
19880         analyze_brprob.py script which is enabled with -details
19881         suboption.
19882         * profile-count.h (precise_p): New function.
19884 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
19886         PR tree-optimization/83922
19887         * tree-vect-loop.c (vect_verify_full_masking): Return false if
19888         there are no statements that need masking.
19889         (vect_active_double_reduction_p): New function.
19890         (vect_analyze_loop_operations): Use it when handling phis that
19891         are not in the loop header.
19893 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
19895         PR tree-optimization/83914
19896         * tree-vect-loop.c (vectorizable_induction): Don't convert
19897         init_expr or apply the peeling adjustment for inductions
19898         that are nested within the vectorized loop.
19900 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19902         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
19903         instead of NEG.
19905 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
19907         PR sanitizer/81715
19908         PR testsuite/83882
19909         * function.h (gimplify_parameters): Add gimple_seq * argument.
19910         * function.c: Include gimple.h and options.h.
19911         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
19912         for the added local temporaries if needed.
19913         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
19914         if there are any parameter cleanups, wrap whole body into a
19915         try/finally with the cleanups.
19917 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
19919         PR target/82964
19920         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
19921         Use GET_MODE_CLASS for scalar floating point.
19923 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
19925         PR ipa/82256
19926         patch by PaX Team
19927         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
19928         Fix call of call_cgraph_insertion_hooks.
19930 2018-01-18  Martin Sebor  <msebor@redhat.com>
19932         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
19934 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
19936         PR ipa/83619
19937         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
19938         frequencies.
19940 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
19942         PR other/70268
19943         * common.opt: (-ffile-prefix-map): New option.
19944         * opts.c (common_handle_option): Defer it.
19945         * opts-global.c (handle_common_deferred_options): Handle it.
19946         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
19947         * file-prefix-map.h: New file.
19948         (remap_debug_filename, add_debug_prefix_map): ...here.
19949         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
19950         * final.c (debug_prefix_map, add_debug_prefix_map
19951         remap_debug_filename): Move to...
19952         * file-prefix-map.c: New file.
19953         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
19954         generalize, get rid of alloca(), use strrchr() instead of strchr().
19955         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
19956         Implement in terms of add_prefix_map().
19957         (remap_macro_filename, remap_debug_filename): Implement in term of
19958         remap_filename().
19959         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
19960         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
19961         * dbxout.c: Include file-prefix-map.h.
19962         * varasm.c: Likewise.
19963         * vmsdbgout.c: Likewise.
19964         * xcoffout.c: Likewise.
19965         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
19966         * doc/cppopts.texi (-fmacro-prefix-map): Document.
19967         * doc/invoke.texi (-ffile-prefix-map): Document.
19968         (-fdebug-prefix-map): Update description.
19970 2018-01-18  Martin Liska  <mliska@suse.cz>
19972         * config/i386/i386.c (indirect_thunk_name): Document that also
19973         lfence is emitted.
19974         (output_indirect_thunk): Document why both instructions
19975         (pause and lfence) are generated.
19977 2018-01-18  Richard Biener  <rguenther@suse.de>
19979         PR tree-optimization/83887
19980         * graphite-scop-detection.c
19981         (scop_detection::get_nearest_dom_with_single_entry): Remove.
19982         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
19983         (scop_detection::merge_sese): Re-implement with a flood-fill
19984         algorithm that properly finds a SESE region if it exists.
19986 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
19988         PR c/61240
19989         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
19990         pointer_diff optimizations use view_convert instead of convert.
19992 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19994         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19995         Generate different code for -mno-speculate-indirect-jumps.
19996         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19997         (*call_indirect_aix<mode>): Disable for
19998         -mno-speculate-indirect-jumps.
19999         (*call_indirect_aix<mode>_nospec): New define_insn.
20000         (*call_value_indirect_aix<mode>): Disable for
20001         -mno-speculate-indirect-jumps.
20002         (*call_value_indirect_aix<mode>_nospec): New define_insn.
20003         (*sibcall_nonlocal_sysv<mode>): Generate different code for
20004         -mno-speculate-indirect-jumps.
20005         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20007 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
20009         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20010         long double type, set the flags for noting the default long double
20011         type, even if we don't pass or return a long double type.
20013 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
20015         PR ipa/83051
20016         * ipa-inline.c (flatten_function): Do not overwrite final inlining
20017         failure.
20019 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
20021         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20022         support for merge[hl].
20023         (fold_mergehl_helper): New helper function.
20024         (tree-vector-builder.h): New #include for tree_vector_builder usage.
20025         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20026         (altivec_vmrglw_direct): Add xxmrglw insn.
20028 2018-01-17  Andrew Waterman  <andrew@sifive.com>
20030         * config/riscv/riscv.c (riscv_conditional_register_usage): If
20031         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20033 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
20035         PR lto/83121
20036         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20037         call the lto_location_cache before reading the
20038         DECL_SOURCE_LOCATION of the types.
20040 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
20041             Richard Sandiford  <richard.sandiford@linaro.org>
20043         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20044         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20045         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20046         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20047         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20048         Add declaration.
20049         * config/aarch64/constraints.md (aarch64_movti_operand):
20050         Limit immediates.
20051         * config/aarch64/predicates.md (Uti): Add new constraint.
20053 2018-01-17  Carl Love  <cel@us.ibm.com>
20055         * config/rs6000/vsx.md (define_expand xl_len_r,
20056         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20057         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20058         lxvll.
20059         (define_expand, define_insn): Move the shift left from  the
20060         define_insn to the define_expand for lxvl and stxvl instructions.
20061         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20062         and XL_LEN_R definitions to PURE.
20064 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
20066         * config/i386/i386.c (indirect_thunk_name): Declare regno
20067         as unsigned int.  Compare regno with INVALID_REGNUM.
20068         (output_indirect_thunk): Ditto.
20069         (output_indirect_thunk_function): Ditto.
20070         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
20071         in the call to output_indirect_thunk_function.
20073 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
20075         PR middle-end/83884
20076         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20077         rather than the size of inner_type to determine the stack slot size
20078         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20080 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
20082         PR target/83546
20083         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20084         to PTA_SILVERMONT.
20086 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
20088         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20089         endian Linux systems to optionally enable multilibs for selecting
20090         the long double type if the user configured an explicit type.
20091         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20092         have no long double multilibs if not defined.
20093         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20094         warn if the user used -mabi={ieee,ibm}longdouble and we built
20095         multilibs for long double.
20096         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20097         appropriate multilib option.
20098         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20099         multilib options.
20100         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20101         for building long double multilibs.
20102         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20104 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
20106         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20107         copies.
20109         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20110         64 bits.
20111         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20112         128 bits.
20114         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20115         variables.
20117         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20118         return value.
20120 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
20122         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20123         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20125 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20127         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20128         different rtl trees depending on TARGET_64BIT.
20129         (rs6000_gen_lvx): Likewise.
20131 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
20133         * config/visium/visium.md (nop): Tweak comment.
20134         (hazard_nop): Likewise.
20136 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20138         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20139         -mspeculate-indirect-jumps.
20140         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20141         for -mno-speculate-indirect-jumps.
20142         (*call_indirect_elfv2<mode>_nospec): New define_insn.
20143         (*call_value_indirect_elfv2<mode>): Disable for
20144         -mno-speculate-indirect-jumps.
20145         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20146         (indirect_jump): Emit different RTL for
20147         -mno-speculate-indirect-jumps.
20148         (*indirect_jump<mode>): Disable for
20149         -mno-speculate-indirect-jumps.
20150         (*indirect_jump<mode>_nospec): New define_insn.
20151         (tablejump): Emit different RTL for
20152         -mno-speculate-indirect-jumps.
20153         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20154         (tablejumpsi_nospec): New define_expand.
20155         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20156         (tablejumpdi_nospec): New define_expand.
20157         (*tablejump<mode>_internal1): Disable for
20158         -mno-speculate-indirect-jumps.
20159         (*tablejump<mode>_internal1_nospec): New define_insn.
20160         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20161         option.
20163 2018-01-16  Artyom Skrobov tyomitch@gmail.com
20165         * caller-save.c (insert_save): Drop unnecessary parameter.  All
20166         callers updated.
20168 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20169             Richard Biener  <rguenth@suse.de>
20171         PR libgomp/83590
20172         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20173         return early, inline manually is_gimple_sizepos.  Make sure if we
20174         call gimplify_expr we don't end up with a gimple constant.
20175         * tree.c (variably_modified_type_p): Don't return true for
20176         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
20177         * gimplify.h (is_gimple_sizepos): Remove.
20179 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20181         PR tree-optimization/83857
20182         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20183         vectorizable_live_operation for pure SLP statements.
20184         (vectorizable_live_operation): Handle PHIs.
20186 2018-01-16  Richard Biener  <rguenther@suse.de>
20188         PR tree-optimization/83867
20189         * tree-vect-stmts.c (vect_transform_stmt): Precompute
20190         nested_in_vect_loop_p since the scalar stmt may get invalidated.
20192 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20194         PR c/83844
20195         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20196         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20197         If off is not INTEGER_CST, issue a may not be aligned warning
20198         rather than isn't aligned.  Use isn%'t rather than isn't.
20199         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20200         into MULT_EXPR.
20201         <case MULT_EXPR>: Improve the case when bottom and one of the
20202         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20203         operand, in that case check if the other operand is multiple of
20204         bottom divided by the INTEGER_CST operand.
20206 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20208         PR target/83858
20209         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20210         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20211         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20212         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20213         * config/pa/pa.c (pa_function_arg_advance): Likewise.
20214         (pa_function_arg, pa_arg_partial_bytes): Likewise.
20215         (pa_function_arg_size): New function.
20217 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20219         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20220         in a separate statement.
20222 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20224         PR tree-optimization/83847
20225         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20226         group gathers and scatters.
20228 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20230         PR rtl-optimization/86620
20231         * params.def (max-sched-ready-insns): Bump minimum value to 1.
20233         PR rtl-optimization/83213
20234         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20235         to last if both are JUMP_INSNs.
20237         PR tree-optimization/83843
20238         * gimple-ssa-store-merging.c
20239         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20240         store_immediate_info for bswap/nop orig_stores.
20242 2018-01-15  Andrew Waterman  <andrew@sifive.com>
20244         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20245         !TARGET_MUL.
20246         <UDIV>: Increase cost if !TARGET_DIV.
20248 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
20250         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20251         (define_attr "cr_logical_3op"): New.
20252         (cceq_ior_compare): Adjust.
20253         (cceq_ior_compare_complement): Adjust.
20254         (*cceq_rev_compare): Adjust.
20255         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20256         (is_cracked_insn): Adjust.
20257         (insn_must_be_first_in_group): Adjust.
20258         * config/rs6000/40x.md: Adjust.
20259         * config/rs6000/440.md: Adjust.
20260         * config/rs6000/476.md: Adjust.
20261         * config/rs6000/601.md: Adjust.
20262         * config/rs6000/603.md: Adjust.
20263         * config/rs6000/6xx.md: Adjust.
20264         * config/rs6000/7450.md: Adjust.
20265         * config/rs6000/7xx.md: Adjust.
20266         * config/rs6000/8540.md: Adjust.
20267         * config/rs6000/cell.md: Adjust.
20268         * config/rs6000/e300c2c3.md: Adjust.
20269         * config/rs6000/e500mc.md: Adjust.
20270         * config/rs6000/e500mc64.md: Adjust.
20271         * config/rs6000/e5500.md: Adjust.
20272         * config/rs6000/e6500.md: Adjust.
20273         * config/rs6000/mpc.md: Adjust.
20274         * config/rs6000/power4.md: Adjust.
20275         * config/rs6000/power5.md: Adjust.
20276         * config/rs6000/power6.md: Adjust.
20277         * config/rs6000/power7.md: Adjust.
20278         * config/rs6000/power8.md: Adjust.
20279         * config/rs6000/power9.md: Adjust.
20280         * config/rs6000/rs64.md: Adjust.
20281         * config/rs6000/titan.md: Adjust.
20283 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20285         * config/i386/predicates.md (indirect_branch_operand): Rewrite
20286         ix86_indirect_branch_register logic.
20288 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20290         * config/i386/constraints.md (Bs): Update
20291         ix86_indirect_branch_register check.  Don't check
20292         ix86_indirect_branch_register with GOT_memory_operand.
20293         (Bw): Likewise.
20294         * config/i386/predicates.md (GOT_memory_operand): Don't check
20295         ix86_indirect_branch_register here.
20296         (GOT32_symbol_operand): Likewise.
20298 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20300         * config/i386/predicates.md (constant_call_address_operand):
20301         Rewrite ix86_indirect_branch_register logic.
20302         (sibcall_insn_operand): Likewise.
20304 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20306         * config/i386/constraints.md (Bs): Replace
20307         ix86_indirect_branch_thunk_register with
20308         ix86_indirect_branch_register.
20309         (Bw): Likewise.
20310         * config/i386/i386.md (indirect_jump): Likewise.
20311         (tablejump): Likewise.
20312         (*sibcall_memory): Likewise.
20313         (*sibcall_value_memory): Likewise.
20314         Peepholes of indirect call and jump via memory: Likewise.
20315         * config/i386/i386.opt: Likewise.
20316         * config/i386/predicates.md (indirect_branch_operand): Likewise.
20317         (GOT_memory_operand): Likewise.
20318         (call_insn_operand): Likewise.
20319         (sibcall_insn_operand): Likewise.
20320         (GOT32_symbol_operand): Likewise.
20322 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
20324         PR middle-end/83837
20325         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20326         type rather than type addr's type points to.
20327         (expand_omp_atomic_mutex): Likewise.
20328         (expand_omp_atomic): Likewise.
20330 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20332         PR target/83839
20333         * config/i386/i386.c (output_indirect_thunk_function): Use
20334         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20335         for  __x86_return_thunk.
20337 2018-01-15  Richard Biener  <rguenther@suse.de>
20339         PR middle-end/83850
20340         * expmed.c (extract_bit_field_1): Fix typo.
20342 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20344         PR target/83687
20345         * config/arm/iterators.md (VF): New mode iterator.
20346         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20347         Remove integer-related logic from pattern.
20348         (neon_vabd<mode>_3): Likewise.
20350 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
20352         PR middle-end/82694
20353         * common.opt (fstrict-overflow): No longer an alias.
20354         (fwrapv-pointer): New option.
20355         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20356         also for pointer types based on flag_wrapv_pointer.
20357         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20358         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20359         opts->x_flag_wrapv got set.
20360         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20361         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20362         POINTER_TYPE_OVERFLOW_UNDEFINED.
20363         * match.pd: Likewise in address comparison pattern.
20364         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20366 2018-01-15  Richard Biener  <rguenther@suse.de>
20368         PR lto/83804
20369         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20370         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
20371         Reset type names to their identifier if their TYPE_DECL doesn't
20372         have linkage (and thus is used for ODR and devirt).
20373         (save_debug_info_for_decl): Remove.
20374         (save_debug_info_for_type): Likewise.
20375         (add_tree_to_fld_list): Adjust.
20376         * tree-pretty-print.c (dump_generic_node): Make dumping of
20377         type names more robust.
20379 2018-01-15  Richard Biener  <rguenther@suse.de>
20381         * BASE-VER: Bump to 8.0.1.
20383 2018-01-14  Martin Sebor  <msebor@redhat.com>
20385         PR other/83508
20386         * builtins.c (check_access): Avoid warning when the no-warning bit
20387         is set.
20389 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
20391         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
20392         * ira-color (allocno_hard_regs_compare): Likewise.
20394 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
20396         PR target/83013
20397         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
20398         Use .pushsection/.popsection.
20400 2018-01-14  Martin Sebor  <msebor@redhat.com>
20402         PR c++/81327
20403         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
20405 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
20407         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
20408         entry from extra_headers.
20409         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
20410         extra_headers, make the list bitwise identical to the i?86-*-* one.
20412 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20414         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
20415         -mcmodel=large with -mindirect-branch=thunk,
20416         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
20417         -mfunction-return=thunk-extern.
20418         * doc/invoke.texi: Document -mcmodel=large is incompatible with
20419         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
20420         -mfunction-return=thunk and -mfunction-return=thunk-extern.
20422 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20424         * config/i386/i386.c (print_reg): Print the name of the full
20425         integer register without '%'.
20426         (ix86_print_operand): Handle 'V'.
20427         * doc/extend.texi: Document 'V' modifier.
20429 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20431         * config/i386/constraints.md (Bs): Disallow memory operand for
20432         -mindirect-branch-register.
20433         (Bw): Likewise.
20434         * config/i386/predicates.md (indirect_branch_operand): Likewise.
20435         (GOT_memory_operand): Likewise.
20436         (call_insn_operand): Likewise.
20437         (sibcall_insn_operand): Likewise.
20438         (GOT32_symbol_operand): Likewise.
20439         * config/i386/i386.md (indirect_jump): Call convert_memory_address
20440         for -mindirect-branch-register.
20441         (tablejump): Likewise.
20442         (*sibcall_memory): Likewise.
20443         (*sibcall_value_memory): Likewise.
20444         Disallow peepholes of indirect call and jump via memory for
20445         -mindirect-branch-register.
20446         (*call_pop): Replace m with Bw.
20447         (*call_value_pop): Likewise.
20448         (*sibcall_pop_memory): Replace m with Bs.
20449         * config/i386/i386.opt (mindirect-branch-register): New option.
20450         * doc/invoke.texi: Document -mindirect-branch-register option.
20452 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20454         * config/i386/i386-protos.h (ix86_output_function_return): New.
20455         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
20456         set function_return_type.
20457         (indirect_thunk_name): Add ret_p to indicate thunk for function
20458         return.
20459         (output_indirect_thunk_function): Pass false to
20460         indirect_thunk_name.
20461         (ix86_output_indirect_branch_via_reg): Likewise.
20462         (ix86_output_indirect_branch_via_push): Likewise.
20463         (output_indirect_thunk_function): Create alias for function
20464         return thunk if regno < 0.
20465         (ix86_output_function_return): New function.
20466         (ix86_handle_fndecl_attribute): Handle function_return.
20467         (ix86_attribute_table): Add function_return.
20468         * config/i386/i386.h (machine_function): Add
20469         function_return_type.
20470         * config/i386/i386.md (simple_return_internal): Use
20471         ix86_output_function_return.
20472         (simple_return_internal_long): Likewise.
20473         * config/i386/i386.opt (mfunction-return=): New option.
20474         (indirect_branch): Mention -mfunction-return=.
20475         * doc/extend.texi: Document function_return function attribute.
20476         * doc/invoke.texi: Document -mfunction-return= option.
20478 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20480         * config/i386/i386-opts.h (indirect_branch): New.
20481         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
20482         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
20483         with local indirect jump when converting indirect call and jump.
20484         (ix86_set_indirect_branch_type): New.
20485         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
20486         (indirectlabelno): New.
20487         (indirect_thunk_needed): Likewise.
20488         (indirect_thunk_bnd_needed): Likewise.
20489         (indirect_thunks_used): Likewise.
20490         (indirect_thunks_bnd_used): Likewise.
20491         (INDIRECT_LABEL): Likewise.
20492         (indirect_thunk_name): Likewise.
20493         (output_indirect_thunk): Likewise.
20494         (output_indirect_thunk_function): Likewise.
20495         (ix86_output_indirect_branch_via_reg): Likewise.
20496         (ix86_output_indirect_branch_via_push): Likewise.
20497         (ix86_output_indirect_branch): Likewise.
20498         (ix86_output_indirect_jmp): Likewise.
20499         (ix86_code_end): Call output_indirect_thunk_function if needed.
20500         (ix86_output_call_insn): Call ix86_output_indirect_branch if
20501         needed.
20502         (ix86_handle_fndecl_attribute): Handle indirect_branch.
20503         (ix86_attribute_table): Add indirect_branch.
20504         * config/i386/i386.h (machine_function): Add indirect_branch_type
20505         and has_local_indirect_jump.
20506         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
20507         to true.
20508         (tablejump): Likewise.
20509         (*indirect_jump): Use ix86_output_indirect_jmp.
20510         (*tablejump_1): Likewise.
20511         (simple_return_indirect_internal): Likewise.
20512         * config/i386/i386.opt (mindirect-branch=): New option.
20513         (indirect_branch): New.
20514         (keep): Likewise.
20515         (thunk): Likewise.
20516         (thunk-inline): Likewise.
20517         (thunk-extern): Likewise.
20518         * doc/extend.texi: Document indirect_branch function attribute.
20519         * doc/invoke.texi: Document -mindirect-branch= option.
20521 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
20523         PR ipa/83051
20524         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
20526 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
20528         * ipa-inline.c (want_inline_small_function_p): Return false if
20529         inlining has already failed with CIF_FINAL_ERROR.
20530         (update_caller_keys): Call want_inline_small_function_p before
20531         can_inline_edge_p.
20532         (update_callee_keys): Likewise.
20534 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20536         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
20537         New function.
20538         (rs6000_quadword_masked_address_p): Likewise.
20539         (quad_aligned_load_p): Likewise.
20540         (quad_aligned_store_p): Likewise.
20541         (const_load_sequence_p): Add comment to describe the outer-most loop.
20542         (mimic_memory_attributes_and_flags): New function.
20543         (rs6000_gen_stvx): Likewise.
20544         (replace_swapped_aligned_store): Likewise.
20545         (rs6000_gen_lvx): Likewise.
20546         (replace_swapped_aligned_load): Likewise.
20547         (replace_swapped_load_constant): Capitalize argument name in
20548         comment describing this function.
20549         (rs6000_analyze_swaps): Add a third pass to search for vector loads
20550         and stores that access quad-word aligned addresses and replace
20551         with stvx or lvx instructions when appropriate.
20552         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
20553         New function prototype.
20554         (rs6000_quadword_masked_address_p): Likewise.
20555         (rs6000_gen_lvx): Likewise.
20556         (rs6000_gen_stvx): Likewise.
20557         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
20558         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
20559         when memory address is aligned.
20560         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
20561         this split to select lvx instruction when memory address is aligned.
20562         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
20563         instruction when memory address is aligned.
20564         (*vsx_le_perm_load_v16qi): Likewise.
20565         (four unnamed splitters): Modify to select the stvx instruction
20566         when memory is aligned.
20568 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
20570         * predict.c (determine_unlikely_bbs): Handle correctly BBs
20571         which appears in the queue multiple times.
20573 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20574             Alan Hayward  <alan.hayward@arm.com>
20575             David Sherwood  <david.sherwood@arm.com>
20577         * tree-vectorizer.h (vec_lower_bound): New structure.
20578         (_loop_vec_info): Add check_nonzero and lower_bounds.
20579         (LOOP_VINFO_CHECK_NONZERO): New macro.
20580         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
20581         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
20582         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
20583         fields.  Make seg_len the distance travelled, not including the
20584         access size.
20585         (dr_direction_indicator): Declare.
20586         (dr_zero_step_indicator): Likewise.
20587         (dr_known_forward_stride_p): Likewise.
20588         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
20589         tree-ssanames.h.
20590         (runtime_alias_check_p): Allow runtime alias checks with
20591         variable strides.
20592         (operator ==): Compare access_size and align.
20593         (prune_runtime_alias_test_list): Rework for new distinction between
20594         the access_size and seg_len.
20595         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
20596         segment lengths.
20597         (get_segment_min_max): New function.
20598         (create_intersect_range_checks): Use it.
20599         (dr_step_indicator): New function.
20600         (dr_direction_indicator): Likewise.
20601         (dr_zero_step_indicator): Likewise.
20602         (dr_known_forward_stride_p): Likewise.
20603         * tree-loop-distribution.c (data_ref_segment_size): Return
20604         DR_STEP * (niters - 1).
20605         (compute_alias_check_pairs): Update call to the dr_with_seg_len
20606         constructor.
20607         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
20608         (vect_preserves_scalar_order_p): New function, split out from...
20609         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
20610         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
20611         (vect_vfa_access_size): New function.
20612         (vect_vfa_align): Likewise.
20613         (vect_compile_time_alias): Take access_size_a and access_b arguments.
20614         (dump_lower_bound): New function.
20615         (vect_check_lower_bound): Likewise.
20616         (vect_small_gap_p): Likewise.
20617         (vectorizable_with_step_bound_p): Likewise.
20618         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
20619         depencies if the vectorization factor is 1.  Convert the checks
20620         for nonzero steps into checks on the bounds of DR_STEP.  Try using
20621         a bunds check for variable steps if the minimum required step is
20622         relatively small. Update calls to the dr_with_seg_len
20623         constructor and to vect_compile_time_alias.
20624         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
20625         function.
20626         (vect_loop_versioning): Call it.
20627         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
20628         when retrying.
20629         (vect_estimate_min_profitable_iters): Account for any bounds checks.
20631 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20632             Alan Hayward  <alan.hayward@arm.com>
20633             David Sherwood  <david.sherwood@arm.com>
20635         * doc/sourcebuild.texi (vect_scatter_store): Document.
20636         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
20637         optabs.
20638         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
20639         Document.
20640         * genopinit.c (main): Add supports_vec_scatter_store and
20641         supports_vec_scatter_store_cached to target_optabs.
20642         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
20643         IFN_MASK_SCATTER_STORE.
20644         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
20645         functions.
20646         * internal-fn.h (internal_store_fn_p): Declare.
20647         (internal_fn_stored_value_index): Likewise.
20648         * internal-fn.c (scatter_store_direct): New macro.
20649         (expand_scatter_store_optab_fn): New function.
20650         (direct_scatter_store_optab_supported_p): New macro.
20651         (internal_store_fn_p): New function.
20652         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
20653         IFN_MASK_SCATTER_STORE.
20654         (internal_fn_mask_index): Likewise.
20655         (internal_fn_stored_value_index): New function.
20656         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
20657         for scatter stores.
20658         * optabs-query.h (supports_vec_scatter_store_p): Declare.
20659         * optabs-query.c (supports_vec_scatter_store_p): New function.
20660         * tree-vectorizer.h (vect_get_store_rhs): Declare.
20661         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
20662         true for scatter stores.
20663         (vect_gather_scatter_fn_p): Handle scatter stores too.
20664         (vect_check_gather_scatter): Consider using scatter stores if
20665         supports_vec_scatter_store_p.
20666         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
20667         scatter stores too.
20668         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20669         internal_fn_stored_value_index.
20670         (check_load_store_masking): Handle scatter stores too.
20671         (vect_get_store_rhs): Make public.
20672         (vectorizable_call): Use internal_store_fn_p.
20673         (vectorizable_store): Handle scatter store internal functions.
20674         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
20675         when deciding whether the end of the group has been reached.
20676         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
20677         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
20678         (mask_scatter_store<mode>): New insns.
20680 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20681             Alan Hayward  <alan.hayward@arm.com>
20682             David Sherwood  <david.sherwood@arm.com>
20684         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
20685         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
20686         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
20687         function.
20688         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
20689         Use vect_truncate_gather_scatter_offset if we can't treat the
20690         operation as a normal gather load or scatter store.
20691         (get_group_load_store_type): Take the gather_scatter_info
20692         as argument.  Try using a gather load or scatter store for
20693         single-element groups.
20694         (get_load_store_type): Update calls to get_group_load_store_type
20695         and vect_use_strided_gather_scatters_p.
20697 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20698             Alan Hayward  <alan.hayward@arm.com>
20699             David Sherwood  <david.sherwood@arm.com>
20701         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
20702         optional tree argument.
20703         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
20704         null target hooks.
20705         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
20706         but continue to use the current value as a fallback.
20707         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
20708         to compare the updates.
20709         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
20710         (get_load_store_type): Use it when handling a strided access.
20711         (vect_get_strided_load_store_ops): New function.
20712         (vect_get_data_ptr_increment): Likewise.
20713         (vectorizable_load): Handle strided gather loads.  Always pass
20714         a step to vect_create_data_ref_ptr and bump_vector_ptr.
20716 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20717             Alan Hayward  <alan.hayward@arm.com>
20718             David Sherwood  <david.sherwood@arm.com>
20720         * doc/md.texi (gather_load@var{m}): Document.
20721         (mask_gather_load@var{m}): Likewise.
20722         * genopinit.c (main): Add supports_vec_gather_load and
20723         supports_vec_gather_load_cached to target_optabs.
20724         * optabs-tree.c (init_tree_optimization_optabs): Use
20725         ggc_cleared_alloc to allocate target_optabs.
20726         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
20727         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
20728         functions.
20729         * internal-fn.h (internal_load_fn_p): Declare.
20730         (internal_gather_scatter_fn_p): Likewise.
20731         (internal_fn_mask_index): Likewise.
20732         (internal_gather_scatter_fn_supported_p): Likewise.
20733         * internal-fn.c (gather_load_direct): New macro.
20734         (expand_gather_load_optab_fn): New function.
20735         (direct_gather_load_optab_supported_p): New macro.
20736         (direct_internal_fn_optab): New function.
20737         (internal_load_fn_p): Likewise.
20738         (internal_gather_scatter_fn_p): Likewise.
20739         (internal_fn_mask_index): Likewise.
20740         (internal_gather_scatter_fn_supported_p): Likewise.
20741         * optabs-query.c (supports_at_least_one_mode_p): New function.
20742         (supports_vec_gather_load_p): Likewise.
20743         * optabs-query.h (supports_vec_gather_load_p): Declare.
20744         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
20745         and memory_type field.
20746         (NUM_PATTERNS): Bump to 15.
20747         * tree-vect-data-refs.c: Include internal-fn.h.
20748         (vect_gather_scatter_fn_p): New function.
20749         (vect_describe_gather_scatter_call): Likewise.
20750         (vect_check_gather_scatter): Try using internal functions for
20751         gather loads.  Recognize existing calls to a gather load function.
20752         (vect_analyze_data_refs): Consider using gather loads if
20753         supports_vec_gather_load_p.
20754         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
20755         (vect_get_gather_scatter_offset_type): Likewise.
20756         (vect_convert_mask_for_vectype): Likewise.
20757         (vect_add_conversion_to_patterm): Likewise.
20758         (vect_try_gather_scatter_pattern): Likewise.
20759         (vect_recog_gather_scatter_pattern): New pattern recognizer.
20760         (vect_vect_recog_func_ptrs): Add it.
20761         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20762         internal_fn_mask_index and internal_gather_scatter_fn_p.
20763         (check_load_store_masking): Take the gather_scatter_info as an
20764         argument and handle gather loads.
20765         (vect_get_gather_scatter_ops): New function.
20766         (vectorizable_call): Check internal_load_fn_p.
20767         (vectorizable_load): Likewise.  Handle gather load internal
20768         functions.
20769         (vectorizable_store): Update call to check_load_store_masking.
20770         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
20771         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
20772         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
20773         (aarch64_gather_scale_operand_d): New predicates.
20774         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
20775         (mask_gather_load<mode>): New insns.
20777 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20778             Alan Hayward  <alan.hayward@arm.com>
20779             David Sherwood  <david.sherwood@arm.com>
20781         * optabs.def (fold_left_plus_optab): New optab.
20782         * doc/md.texi (fold_left_plus_@var{m}): Document.
20783         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
20784         * internal-fn.c (fold_left_direct): Define.
20785         (expand_fold_left_optab_fn): Likewise.
20786         (direct_fold_left_optab_supported_p): Likewise.
20787         * fold-const-call.c (fold_const_fold_left): New function.
20788         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
20789         * tree-parloops.c (valid_reduction_p): New function.
20790         (gather_scalar_reductions): Use it.
20791         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
20792         (vect_finish_replace_stmt): Declare.
20793         * tree-vect-loop.c (fold_left_reduction_fn): New function.
20794         (needs_fold_left_reduction_p): New function, split out from...
20795         (vect_is_simple_reduction): ...here.  Accept reductions that
20796         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
20797         (vect_force_simple_reduction): Also store the reduction type in
20798         the assignment's STMT_VINFO_REDUC_TYPE.
20799         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
20800         (merge_with_identity): New function.
20801         (vect_expand_fold_left): Likewise.
20802         (vectorize_fold_left_reduction): Likewise.
20803         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
20804         scalar phi in place for it.  Check for target support and reject
20805         cases that would reassociate the operation.  Defer the transform
20806         phase to vectorize_fold_left_reduction.
20807         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
20808         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
20809         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
20811 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20813         * tree-if-conv.c (predicate_mem_writes): Remove redundant
20814         call to ifc_temp_var.
20816 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20817             Alan Hayward  <alan.hayward@arm.com>
20818             David Sherwood  <david.sherwood@arm.com>
20820         * target.def (legitimize_address_displacement): Take the original
20821         offset as a poly_int.
20822         * targhooks.h (default_legitimize_address_displacement): Update
20823         accordingly.
20824         * targhooks.c (default_legitimize_address_displacement): Likewise.
20825         * doc/tm.texi: Regenerate.
20826         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
20827         as an argument, moving assert of ad->disp == ad->disp_term to...
20828         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
20829         Try calling targetm.legitimize_address_displacement before expanding
20830         the address rather than afterwards, and adjust for the new interface.
20831         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
20832         Match the new hook interface.  Handle SVE addresses.
20833         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
20834         new hook interface.
20836 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20838         * Makefile.in (OBJS): Add early-remat.o.
20839         * target.def (select_early_remat_modes): New hook.
20840         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
20841         * doc/tm.texi: Regenerate.
20842         * targhooks.h (default_select_early_remat_modes): Declare.
20843         * targhooks.c (default_select_early_remat_modes): New function.
20844         * timevar.def (TV_EARLY_REMAT): New timevar.
20845         * passes.def (pass_early_remat): New pass.
20846         * tree-pass.h (make_pass_early_remat): Declare.
20847         * early-remat.c: New file.
20848         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
20849         function.
20850         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
20852 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20853             Alan Hayward  <alan.hayward@arm.com>
20854             David Sherwood  <david.sherwood@arm.com>
20856         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
20857         vfm1 with a bound_epilog parameter.
20858         (vect_do_peeling): Update calls accordingly, and move the prologue
20859         call earlier in the function.  Treat the base bound_epilog as 0 for
20860         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
20861         this base when peeling for gaps.
20862         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
20863         with fully-masked loops.
20864         (vect_estimate_min_profitable_iters): Handle the single peeled
20865         iteration in that case.
20867 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20868             Alan Hayward  <alan.hayward@arm.com>
20869             David Sherwood  <david.sherwood@arm.com>
20871         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
20872         single-element interleaving even if the size is not a power of 2.
20873         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
20874         accesses for single-element interleaving if the group size is
20875         not a power of 2.
20877 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20878             Alan Hayward  <alan.hayward@arm.com>
20879             David Sherwood  <david.sherwood@arm.com>
20881         * doc/md.texi (fold_extract_last_@var{m}): Document.
20882         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
20883         * optabs.def (fold_extract_last_optab): New optab.
20884         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
20885         * internal-fn.c (fold_extract_direct): New macro.
20886         (expand_fold_extract_optab_fn): Likewise.
20887         (direct_fold_extract_optab_supported_p): Likewise.
20888         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
20889         * tree-vect-loop.c (vect_model_reduction_cost): Handle
20890         EXTRACT_LAST_REDUCTION.
20891         (get_initial_def_for_reduction): Do not create an initial vector
20892         for EXTRACT_LAST_REDUCTION reductions.
20893         (vectorizable_reduction): Leave the scalar phi in place for
20894         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
20895         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
20896         epilogue code for EXTRACT_LAST_REDUCTION and defer the
20897         transform phase to vectorizable_condition.
20898         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
20899         split out from...
20900         (vect_finish_stmt_generation): ...here.
20901         (vect_finish_replace_stmt): New function.
20902         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
20903         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
20904         pattern.
20905         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
20907 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20908             Alan Hayward  <alan.hayward@arm.com>
20909             David Sherwood  <david.sherwood@arm.com>
20911         * doc/md.texi (extract_last_@var{m}): Document.
20912         * optabs.def (extract_last_optab): New optab.
20913         * internal-fn.def (EXTRACT_LAST): New internal function.
20914         * internal-fn.c (cond_unary_direct): New macro.
20915         (expand_cond_unary_optab_fn): Likewise.
20916         (direct_cond_unary_optab_supported_p): Likewise.
20917         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
20918         loops using EXTRACT_LAST.
20919         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
20920         (extract_last_<mode>): ...this optab.
20921         (vec_extract<mode><Vel>): Update accordingly.
20923 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20924             Alan Hayward  <alan.hayward@arm.com>
20925             David Sherwood  <david.sherwood@arm.com>
20927         * target.def (empty_mask_is_expensive): New hook.
20928         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
20929         * doc/tm.texi: Regenerate.
20930         * targhooks.h (default_empty_mask_is_expensive): Declare.
20931         * targhooks.c (default_empty_mask_is_expensive): New function.
20932         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
20933         if the target says that empty masks are expensive.
20934         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
20935         New function.
20936         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
20938 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20939             Alan Hayward  <alan.hayward@arm.com>
20940             David Sherwood  <david.sherwood@arm.com>
20942         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
20943         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
20944         (vect_use_loop_mask_for_alignment_p): New function.
20945         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
20946         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
20947         niters_skip argument.  Make sure that the first niters_skip elements
20948         of the first iteration are inactive.
20949         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
20950         Update call to vect_set_loop_masks_directly.
20951         (get_misalign_in_elems): New function, split out from...
20952         (vect_gen_prolog_loop_niters): ...here.
20953         (vect_update_init_of_dr): Take a code argument that specifies whether
20954         the adjustment should be added or subtracted.
20955         (vect_update_init_of_drs): Likewise.
20956         (vect_prepare_for_masked_peels): New function.
20957         (vect_do_peeling): Skip prologue peeling if we're using a mask
20958         instead.  Update call to vect_update_inits_of_drs.
20959         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20960         mask_skip_niters.
20961         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
20962         alignment.  Do not include the number of peeled iterations in
20963         the minimum threshold in that case.
20964         (vectorizable_induction): Adjust the start value down by
20965         LOOP_VINFO_MASK_SKIP_NITERS iterations.
20966         (vect_transform_loop): Call vect_prepare_for_masked_peels.
20967         Take the number of skipped iterations into account when calculating
20968         the loop bounds.
20969         * tree-vect-stmts.c (vect_gen_while_not): New function.
20971 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20972             Alan Hayward  <alan.hayward@arm.com>
20973             David Sherwood  <david.sherwood@arm.com>
20975         * doc/sourcebuild.texi (vect_fully_masked): Document.
20976         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
20977         default value to 0.
20978         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
20979         split out from...
20980         (vect_analyze_loop_2): ...here. Don't check the vectorization
20981         factor against the number of loop iterations if the loop is
20982         fully-masked.
20984 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20985             Alan Hayward  <alan.hayward@arm.com>
20986             David Sherwood  <david.sherwood@arm.com>
20988         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
20989         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
20990         (dump_groups): Update accordingly.
20991         (iv_use::mem_type): New member variable.
20992         (address_p): New function.
20993         (record_use): Add a mem_type argument and initialize the new
20994         mem_type field.
20995         (record_group_use): Add a mem_type argument.  Use address_p.
20996         Remove obsolete null checks of base_object.  Update call to record_use.
20997         (find_interesting_uses_op): Update call to record_group_use.
20998         (find_interesting_uses_cond): Likewise.
20999         (find_interesting_uses_address): Likewise.
21000         (get_mem_type_for_internal_fn): New function.
21001         (find_address_like_use): Likewise.
21002         (find_interesting_uses_stmt): Try find_address_like_use before
21003         calling find_interesting_uses_op.
21004         (addr_offset_valid_p): Use the iv mem_type field as the type
21005         of the addressed memory.
21006         (add_autoinc_candidates): Likewise.
21007         (get_address_cost): Likewise.
21008         (split_small_address_groups_p): Use address_p.
21009         (split_address_groups): Likewise.
21010         (add_iv_candidate_for_use): Likewise.
21011         (autoinc_possible_for_pair): Likewise.
21012         (rewrite_groups): Likewise.
21013         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21014         (determine_group_iv_cost): Update after split of USE_ADDRESS.
21015         (get_alias_ptr_type_for_ptr_address): New function.
21016         (rewrite_use_address): Rewrite address uses in calls that were
21017         identified by find_address_like_use.
21019 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21020             Alan Hayward  <alan.hayward@arm.com>
21021             David Sherwood  <david.sherwood@arm.com>
21023         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21024         TARGET_MEM_REFs.
21025         * gimple-expr.h (is_gimple_addressable: Likewise.
21026         * gimple-expr.c (is_gimple_address): Likewise.
21027         * internal-fn.c (expand_call_mem_ref): New function.
21028         (expand_mask_load_optab_fn): Use it.
21029         (expand_mask_store_optab_fn): Likewise.
21031 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21032             Alan Hayward  <alan.hayward@arm.com>
21033             David Sherwood  <david.sherwood@arm.com>
21035         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21036         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21037         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21038         (cond_umax@var{mode}): Document.
21039         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21040         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21041         (cond_umin_optab, cond_umax_optab): New optabs.
21042         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21043         (COND_IOR, COND_XOR): New internal functions.
21044         * internal-fn.h (get_conditional_internal_fn): Declare.
21045         * internal-fn.c (cond_binary_direct): New macro.
21046         (expand_cond_binary_optab_fn): Likewise.
21047         (direct_cond_binary_optab_supported_p): Likewise.
21048         (get_conditional_internal_fn): New function.
21049         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21050         Cope with reduction statements that are vectorized as calls rather
21051         than assignments.
21052         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21053         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21054         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21055         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21056         (UNSPEC_COND_EOR): New unspecs.
21057         (optab): Add mappings for them.
21058         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21059         (sve_int_op, sve_fp_op): New int attributes.
21061 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21062             Alan Hayward  <alan.hayward@arm.com>
21063             David Sherwood  <david.sherwood@arm.com>
21065         * optabs.def (while_ult_optab): New optab.
21066         * doc/md.texi (while_ult@var{m}@var{n}): Document.
21067         * internal-fn.def (WHILE_ULT): New internal function.
21068         * internal-fn.h (direct_internal_fn_supported_p): New override
21069         that takes two types as argument.
21070         * internal-fn.c (while_direct): New macro.
21071         (expand_while_optab_fn): New function.
21072         (convert_optab_supported_p): Likewise.
21073         (direct_while_optab_supported_p): New macro.
21074         * wide-int.h (wi::udiv_ceil): New function.
21075         * tree-vectorizer.h (rgroup_masks): New structure.
21076         (vec_loop_masks): New typedef.
21077         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21078         and fully_masked_p.
21079         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21080         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21081         (vect_max_vf): New function.
21082         (slpeel_make_loop_iterate_ntimes): Delete.
21083         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21084         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21085         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21086         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21087         internal-fn.h, stor-layout.h and optabs-query.h.
21088         (vect_set_loop_mask): New function.
21089         (add_preheader_seq): Likewise.
21090         (add_header_seq): Likewise.
21091         (interleave_supported_p): Likewise.
21092         (vect_maybe_permute_loop_masks): Likewise.
21093         (vect_set_loop_masks_directly): Likewise.
21094         (vect_set_loop_condition_masked): Likewise.
21095         (vect_set_loop_condition_unmasked): New function, split out from
21096         slpeel_make_loop_iterate_ntimes.
21097         (slpeel_make_loop_iterate_ntimes): Rename to..
21098         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
21099         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21100         (vect_do_peeling): Update call accordingly.
21101         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21102         loops.
21103         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21104         mask_compare_type, can_fully_mask_p and fully_masked_p.
21105         (release_vec_loop_masks): New function.
21106         (_loop_vec_info): Use it to free the loop masks.
21107         (can_produce_all_loop_masks_p): New function.
21108         (vect_get_max_nscalars_per_iter): Likewise.
21109         (vect_verify_full_masking): Likewise.
21110         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21111         retries, and free the mask rgroups before retrying.  Check loop-wide
21112         reasons for disallowing fully-masked loops.  Make the final decision
21113         about whether use a fully-masked loop or not.
21114         (vect_estimate_min_profitable_iters): Do not assume that peeling
21115         for the number of iterations will be needed for fully-masked loops.
21116         (vectorizable_reduction): Disable fully-masked loops.
21117         (vectorizable_live_operation): Likewise.
21118         (vect_halve_mask_nunits): New function.
21119         (vect_double_mask_nunits): Likewise.
21120         (vect_record_loop_mask): Likewise.
21121         (vect_get_loop_mask): Likewise.
21122         (vect_transform_loop): Handle the case in which the final loop
21123         iteration might handle a partial vector.  Call vect_set_loop_condition
21124         instead of slpeel_make_loop_iterate_ntimes.
21125         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21126         (check_load_store_masking): New function.
21127         (prepare_load_store_mask): Likewise.
21128         (vectorizable_store): Handle fully-masked loops.
21129         (vectorizable_load): Likewise.
21130         (supportable_widening_operation): Use vect_halve_mask_nunits for
21131         booleans.
21132         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21133         (vect_gen_while): New function.
21134         * config/aarch64/aarch64.md (umax<mode>3): New expander.
21135         (aarch64_uqdec<mode>): New insn.
21137 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21138             Alan Hayward  <alan.hayward@arm.com>
21139             David Sherwood  <david.sherwood@arm.com>
21141         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21142         (reduc_xor_scal_optab): New optabs.
21143         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21144         (reduc_xor_scal_@var{m}): Document.
21145         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21146         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21147         internal functions.
21148         * fold-const-call.c (fold_const_call): Handle them.
21149         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21150         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21151         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21152         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21153         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21154         (UNSPEC_XORV): New unspecs.
21155         (optab): Add entries for them.
21156         (BITWISEV): New int iterator.
21157         (bit_reduc_op): New int attributes.
21159 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21160             Alan Hayward  <alan.hayward@arm.com>
21161             David Sherwood  <david.sherwood@arm.com>
21163         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21164         * internal-fn.def (VEC_SHL_INSERT): New internal function.
21165         * optabs.def (vec_shl_insert_optab): New optab.
21166         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21167         (duplicate_and_interleave): Likewise.
21168         * tree-vect-loop.c: Include internal-fn.h.
21169         (neutral_op_for_slp_reduction): New function, split out from
21170         get_initial_defs_for_reduction.
21171         (get_initial_def_for_reduction): Handle option 2 for variable-length
21172         vectors by loading the neutral value into a vector and then shifting
21173         the initial value into element 0.
21174         (get_initial_defs_for_reduction): Replace the code argument with
21175         the neutral value calculated by neutral_op_for_slp_reduction.
21176         Use gimple_build_vector for constant-length vectors.
21177         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21178         but the first group_size elements have a neutral value.
21179         Use duplicate_and_interleave otherwise.
21180         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21181         Update call to get_initial_defs_for_reduction.  Handle SLP
21182         reductions for variable-length vectors by creating one vector
21183         result for each scalar result, with the elements associated
21184         with other scalar results stubbed out with the neutral value.
21185         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21186         Require IFN_VEC_SHL_INSERT for double reductions on
21187         variable-length vectors, or SLP reductions that have
21188         a neutral value.  Require can_duplicate_and_interleave_p
21189         support for variable-length unchained SLP reductions if there
21190         is no neutral value, such as for MIN/MAX reductions.  Also require
21191         the number of vector elements to be a multiple of the number of
21192         SLP statements when doing variable-length unchained SLP reductions.
21193         Update call to vect_create_epilog_for_reduction.
21194         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21195         and remove initial values.
21196         (duplicate_and_interleave): Make public.
21197         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21198         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21200 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21201             Alan Hayward  <alan.hayward@arm.com>
21202             David Sherwood  <david.sherwood@arm.com>
21204         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21205         (can_duplicate_and_interleave_p): New function.
21206         (vect_get_and_check_slp_defs): Take the vector of statements
21207         rather than just the current one.  Remove excess parentheses.
21208         Restriction rejectinon of vect_constant_def and vect_external_def
21209         for variable-length vectors to boolean types, or types for which
21210         can_duplicate_and_interleave_p is false.
21211         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21212         (duplicate_and_interleave): New function.
21213         (vect_get_constant_vectors): Use gimple_build_vector for
21214         constant-length vectors and suitable variable-length constant
21215         vectors.  Use duplicate_and_interleave for other variable-length
21216         vectors.  Don't defer the update when inserting new statements.
21218 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21219             Alan Hayward  <alan.hayward@arm.com>
21220             David Sherwood  <david.sherwood@arm.com>
21222         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21223         min_profitable_iters doesn't go negative.
21225 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21226             Alan Hayward  <alan.hayward@arm.com>
21227             David Sherwood  <david.sherwood@arm.com>
21229         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21230         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21231         * optabs.def (vec_mask_load_lanes_optab): New optab.
21232         (vec_mask_store_lanes_optab): Likewise.
21233         * internal-fn.def (MASK_LOAD_LANES): New internal function.
21234         (MASK_STORE_LANES): Likewise.
21235         * internal-fn.c (mask_load_lanes_direct): New macro.
21236         (mask_store_lanes_direct): Likewise.
21237         (expand_mask_load_optab_fn): Handle masked operations.
21238         (expand_mask_load_lanes_optab_fn): New macro.
21239         (expand_mask_store_optab_fn): Handle masked operations.
21240         (expand_mask_store_lanes_optab_fn): New macro.
21241         (direct_mask_load_lanes_optab_supported_p): Likewise.
21242         (direct_mask_store_lanes_optab_supported_p): Likewise.
21243         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21244         parameter.
21245         (vect_load_lanes_supported): Likewise.
21246         * tree-vect-data-refs.c (strip_conversion): New function.
21247         (can_group_stmts_p): Likewise.
21248         (vect_analyze_data_ref_accesses): Use it instead of checking
21249         for a pair of assignments.
21250         (vect_store_lanes_supported): Take a masked_p parameter.
21251         (vect_load_lanes_supported): Likewise.
21252         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21253         vect_store_lanes_supported and vect_load_lanes_supported.
21254         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21255         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21256         parameter.  Don't allow gaps for masked accesses.
21257         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
21258         and vect_load_lanes_supported.
21259         (get_load_store_type): Take a masked_p parameter and update
21260         call to get_group_load_store_type.
21261         (vectorizable_store): Update call to get_load_store_type.
21262         Handle IFN_MASK_STORE_LANES.
21263         (vectorizable_load): Update call to get_load_store_type.
21264         Handle IFN_MASK_LOAD_LANES.
21266 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21267             Alan Hayward  <alan.hayward@arm.com>
21268             David Sherwood  <david.sherwood@arm.com>
21270         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21271         modes for SVE.
21272         * config/aarch64/aarch64-protos.h
21273         (aarch64_sve_struct_memory_operand_p): Declare.
21274         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21275         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21276         (VPRED, vpred): Handle SVE structure modes.
21277         * config/aarch64/constraints.md (Utx): New constraint.
21278         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21279         (aarch64_sve_struct_nonimmediate_operand): New predicates.
21280         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21281         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21282         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21283         structure modes.  Split into pieces after RA.
21284         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21285         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21286         New patterns.
21287         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21288         SVE structure modes.
21289         (aarch64_classify_address): Likewise.
21290         (sizetochar): Move earlier in file.
21291         (aarch64_print_operand): Handle SVE register lists.
21292         (aarch64_array_mode): New function.
21293         (aarch64_sve_struct_memory_operand_p): Likewise.
21294         (TARGET_ARRAY_MODE): Redefine.
21296 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21297             Alan Hayward  <alan.hayward@arm.com>
21298             David Sherwood  <david.sherwood@arm.com>
21300         * target.def (array_mode): New target hook.
21301         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21302         * doc/tm.texi: Regenerate.
21303         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21304         * hooks.c (hook_optmode_mode_uhwi_none): New function.
21305         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21306         targetm.array_mode.
21307         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
21308         type sizes.
21310 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21311             Alan Hayward  <alan.hayward@arm.com>
21312             David Sherwood  <david.sherwood@arm.com>
21314         * fold-const.c (fold_binary_loc): Check the argument types
21315         rather than the result type when testing for a vector operation.
21317 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21319         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21320         * doc/tm.texi: Regenerate.
21322 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21323             Alan Hayward  <alan.hayward@arm.com>
21324             David Sherwood  <david.sherwood@arm.com>
21326         * doc/invoke.texi (-msve-vector-bits=): Document new option.
21327         (sve): Document new AArch64 extension.
21328         * doc/md.texi (w): Extend the description of the AArch64
21329         constraint to include SVE vectors.
21330         (Upl, Upa): Document new AArch64 predicate constraints.
21331         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21332         enum.
21333         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21334         (msve-vector-bits=): New option.
21335         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21336         SVE when these are disabled.
21337         (sve): New extension.
21338         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21339         modes.  Adjust their number of units based on aarch64_sve_vg.
21340         (MAX_BITSIZE_MODE_ANY_MODE): Define.
21341         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21342         aarch64_addr_query_type.
21343         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21344         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21345         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21346         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21347         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21348         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21349         (aarch64_simd_imm_zero_p): Delete.
21350         (aarch64_check_zero_based_sve_index_immediate): Declare.
21351         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21352         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21353         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21354         (aarch64_sve_float_mul_immediate_p): Likewise.
21355         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21356         rather than an rtx.
21357         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21358         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21359         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21360         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21361         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21362         (aarch64_regmode_natural_size): Likewise.
21363         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21364         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21365         left one place.
21366         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21367         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21368         for VG and the SVE predicate registers.
21369         (V_ALIASES): Add a "z"-prefixed alias.
21370         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21371         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21372         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21373         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21374         (REG_CLASS_NAMES): Add entries for them.
21375         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
21376         and the predicate registers.
21377         (aarch64_sve_vg): Declare.
21378         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21379         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21380         (REGMODE_NATURAL_SIZE): Define.
21381         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21382         SVE macros.
21383         * config/aarch64/aarch64.c: Include cfgrtl.h.
21384         (simd_immediate_info): Add a constructor for series vectors,
21385         and an associated step field.
21386         (aarch64_sve_vg): New variable.
21387         (aarch64_dbx_register_number): Handle VG and the predicate registers.
21388         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
21389         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
21390         (VEC_ANY_DATA, VEC_STRUCT): New constants.
21391         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
21392         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
21393         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
21394         (aarch64_get_mask_mode): New functions.
21395         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
21396         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
21397         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
21398         predicate modes and predicate registers.  Explicitly restrict
21399         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
21400         to store a vector mode if it is recognized by
21401         aarch64_classify_vector_mode.
21402         (aarch64_regmode_natural_size): New function.
21403         (aarch64_hard_regno_caller_save_mode): Return the original mode
21404         for predicates.
21405         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
21406         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
21407         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
21408         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
21409         functions.
21410         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
21411         does not overlap dest if the function is frame-related.  Handle
21412         SVE constants.
21413         (aarch64_split_add_offset): New function.
21414         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
21415         them aarch64_add_offset.
21416         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
21417         and update call to aarch64_sub_sp.
21418         (aarch64_add_cfa_expression): New function.
21419         (aarch64_expand_prologue): Pass extra temporary registers to the
21420         functions above.  Handle the case in which we need to emit new
21421         DW_CFA_expressions for registers that were originally saved
21422         relative to the stack pointer, but now have to be expressed
21423         relative to the frame pointer.
21424         (aarch64_output_mi_thunk): Pass extra temporary registers to the
21425         functions above.
21426         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
21427         IP0 and IP1 values for SVE frames.
21428         (aarch64_expand_vec_series): New function.
21429         (aarch64_expand_sve_widened_duplicate): Likewise.
21430         (aarch64_expand_sve_const_vector): Likewise.
21431         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
21432         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
21433         into the register, rather than emitting a SET directly.
21434         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
21435         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
21436         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
21437         (offset_9bit_signed_scaled_p): New functions.
21438         (aarch64_replicate_bitmask_imm): New function.
21439         (aarch64_bitmask_imm): Use it.
21440         (aarch64_cannot_force_const_mem): Reject expressions involving
21441         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
21442         (aarch64_classify_index): Handle SVE indices, by requiring
21443         a plain register index with a scale that matches the element size.
21444         (aarch64_classify_address): Handle SVE addresses.  Assert that
21445         the mode of the address is VOIDmode or an integer mode.
21446         Update call to aarch64_classify_symbol.
21447         (aarch64_classify_symbolic_expression): Update call to
21448         aarch64_classify_symbol.
21449         (aarch64_const_vec_all_in_range_p): New function.
21450         (aarch64_print_vector_float_operand): Likewise.
21451         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
21452         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
21453         and the FP immediates 1.0 and 0.5.
21454         (aarch64_print_address_internal): Handle SVE addresses.
21455         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
21456         (aarch64_regno_regclass): Handle predicate registers.
21457         (aarch64_secondary_reload): Handle big-endian reloads of SVE
21458         data modes.
21459         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
21460         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
21461         (aarch64_convert_sve_vector_bits): New function.
21462         (aarch64_override_options): Use it to handle -msve-vector-bits=.
21463         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21464         rather than an rtx.
21465         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
21466         Handle SVE vector and predicate modes.  Accept VL-based constants
21467         that need only one temporary register, and VL offsets that require
21468         no temporary registers.
21469         (aarch64_conditional_register_usage): Mark the predicate registers
21470         as fixed if SVE isn't available.
21471         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
21472         Return true for SVE vector and predicate modes.
21473         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
21474         rather than an unsigned int.  Handle SVE modes.
21475         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
21476         SVE modes.
21477         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
21478         if SVE is enabled.
21479         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21480         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21481         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21482         (aarch64_sve_float_mul_immediate_p): New functions.
21483         (aarch64_sve_valid_immediate): New function.
21484         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
21485         Explicitly reject structure modes.  Check for INDEX constants.
21486         Handle PTRUE and PFALSE constants.
21487         (aarch64_check_zero_based_sve_index_immediate): New function.
21488         (aarch64_simd_imm_zero_p): Delete.
21489         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
21490         vector modes.  Accept constants in the range of CNT[BHWD].
21491         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
21492         ask for an Advanced SIMD mode.
21493         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
21494         (aarch64_simd_vector_alignment): Handle SVE predicates.
21495         (aarch64_vectorize_preferred_vector_alignment): New function.
21496         (aarch64_simd_vector_alignment_reachable): Use it instead of
21497         the vector size.
21498         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
21499         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
21500         functions.
21501         (MAX_VECT_LEN): Delete.
21502         (expand_vec_perm_d): Add a vec_flags field.
21503         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
21504         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
21505         (aarch64_evpc_ext): Don't apply a big-endian lane correction
21506         for SVE modes.
21507         (aarch64_evpc_rev): Rename to...
21508         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
21509         (aarch64_evpc_rev_global): New function.
21510         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
21511         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
21512         MAX_VECT_LEN.
21513         (aarch64_evpc_sve_tbl): New function.
21514         (aarch64_expand_vec_perm_const_1): Update after rename of
21515         aarch64_evpc_rev.  Handle SVE permutes too, trying
21516         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
21517         than aarch64_evpc_tbl.
21518         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
21519         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
21520         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
21521         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
21522         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
21523         (aarch64_expand_sve_vcond): New functions.
21524         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
21525         of aarch64_vector_mode_p.
21526         (aarch64_dwarf_poly_indeterminate_value): New function.
21527         (aarch64_compute_pressure_classes): Likewise.
21528         (aarch64_can_change_mode_class): Likewise.
21529         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
21530         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
21531         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
21532         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
21533         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
21534         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
21535         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
21536         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
21537         constraints.
21538         (Dn, Dl, Dr): Accept const as well as const_vector.
21539         (Dz): Likewise.  Compare against CONST0_RTX.
21540         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
21541         of "vector" where appropriate.
21542         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
21543         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
21544         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
21545         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
21546         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
21547         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
21548         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
21549         (v_int_equiv): Extend to SVE modes.
21550         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
21551         mode attributes.
21552         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
21553         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
21554         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
21555         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
21556         (SVE_COND_FP_CMP): New int iterators.
21557         (perm_hilo): Handle the new unpack unspecs.
21558         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
21559         attributes.
21560         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
21561         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
21562         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
21563         (aarch64_equality_operator, aarch64_constant_vector_operand)
21564         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
21565         (aarch64_sve_nonimmediate_operand): Likewise.
21566         (aarch64_sve_general_operand): Likewise.
21567         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
21568         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
21569         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
21570         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
21571         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
21572         (aarch64_sve_float_arith_immediate): Likewise.
21573         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
21574         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
21575         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
21576         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
21577         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
21578         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
21579         (aarch64_sve_float_arith_operand): Likewise.
21580         (aarch64_sve_float_arith_with_sub_operand): Likewise.
21581         (aarch64_sve_float_mul_operand): Likewise.
21582         (aarch64_sve_vec_perm_operand): Likewise.
21583         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
21584         (aarch64_mov_operand): Accept const_poly_int and const_vector.
21585         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
21586         as well as const_vector.
21587         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
21588         in file.  Use CONST0_RTX and CONSTM1_RTX.
21589         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
21590         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
21591         Use aarch64_simd_imm_zero.
21592         * config/aarch64/aarch64-sve.md: New file.
21593         * config/aarch64/aarch64.md: Include it.
21594         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
21595         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
21596         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
21597         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
21598         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
21599         (sve): New attribute.
21600         (enabled): Disable instructions with the sve attribute unless
21601         TARGET_SVE.
21602         (movqi, movhi): Pass CONST_POLY_INT operaneds through
21603         aarch64_expand_mov_immediate.
21604         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
21605         CNT[BHSD] immediates.
21606         (movti): Split CONST_POLY_INT moves into two halves.
21607         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
21608         Split additions that need a temporary here if the destination
21609         is the stack pointer.
21610         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
21611         (*add<mode>3_poly_1): New instruction.
21612         (set_clobber_cc): New expander.
21614 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21616         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
21617         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
21618         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
21619         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
21620         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
21621         Change innermode from fixed_mode_size to machine_mode.
21622         (simplify_subreg): Update call accordingly.  Handle a constant-sized
21623         subreg of a variable-length CONST_VECTOR.
21625 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21626             Alan Hayward  <alan.hayward@arm.com>
21627             David Sherwood  <david.sherwood@arm.com>
21629         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
21630         (add_offset_to_base): New function, split out from...
21631         (create_mem_ref): ...here.  When handling a scale other than 1,
21632         check first whether the address is valid without the offset.
21633         Add it into the base if so, leaving the index and scale as-is.
21635 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
21637         PR c++/83778
21638         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
21639         fold_for_warn before checking if arg2 is INTEGER_CST.
21641 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
21643         * config/rs6000/predicates.md (load_multiple_operation): Delete.
21644         (store_multiple_operation): Delete.
21645         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
21646         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
21647         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
21648         guarded by TARGET_STRING.
21649         (rs6000_output_load_multiple): Delete.
21650         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
21651         OPTION_MASK_STRING / TARGET_STRING handling.
21652         (print_operand) <'N', 'O'>: Add comment that these are unused now.
21653         (const rs6000_opt_masks) <"string">: Change mask to 0.
21654         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
21655         (MASK_STRING): Delete.
21656         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
21657         parts.  Simplify.
21658         (load_multiple): Delete.
21659         (*ldmsi8): Delete.
21660         (*ldmsi7): Delete.
21661         (*ldmsi6): Delete.
21662         (*ldmsi5): Delete.
21663         (*ldmsi4): Delete.
21664         (*ldmsi3): Delete.
21665         (store_multiple): Delete.
21666         (*stmsi8): Delete.
21667         (*stmsi7): Delete.
21668         (*stmsi6): Delete.
21669         (*stmsi5): Delete.
21670         (*stmsi4): Delete.
21671         (*stmsi3): Delete.
21672         (movmemsi_8reg): Delete.
21673         (corresponding unnamed define_insn): Delete.
21674         (movmemsi_6reg): Delete.
21675         (corresponding unnamed define_insn): Delete.
21676         (movmemsi_4reg): Delete.
21677         (corresponding unnamed define_insn): Delete.
21678         (movmemsi_2reg): Delete.
21679         (corresponding unnamed define_insn): Delete.
21680         (movmemsi_1reg): Delete.
21681         (corresponding unnamed define_insn): Delete.
21682         * config/rs6000/rs6000.opt (mno-string): New.
21683         (mstring): Replace by deprecation warning stub.
21684         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
21686 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
21688         * regrename.c (regrename_do_replace): If replacing the same
21689         reg multiple times, try to reuse last created gen_raw_REG.
21691         PR debug/81155
21692         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
21693         main to workaround a bug in GDB.
21695 2018-01-12  Tom de Vries  <tom@codesourcery.com>
21697         PR target/83737
21698         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
21700 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
21702         PR rtl-optimization/80481
21703         * ira-color.c (get_cap_member): New function.
21704         (allocnos_conflict_by_live_ranges_p): Use it.
21705         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
21706         (setup_slot_coalesced_allocno_live_ranges): Ditto.
21708 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
21710         PR target/83628
21711         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
21712         (*saddl_se_1): Ditto.
21713         (*ssubsi_1): Ditto.
21714         (*ssubl_se_1): Ditto.
21716 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
21718         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
21719         rather than wi::to_widest for DR_INITs.
21720         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
21721         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
21722         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
21723         INTEGER_CSTs.
21724         (vect_analyze_group_access_1): Note that here.
21726 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
21728         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
21729         polynomial type sizes.
21731 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
21733         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
21734         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
21735         (gimple_add_tmp_var): Likewise.
21737 2018-01-12  Martin Liska  <mliska@suse.cz>
21739         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
21740         (gimple_alloc_sizes): Likewise.
21741         (dump_gimple_statistics): Use PRIu64 in printf format.
21742         * gimple.h: Change uint64_t to int.
21744 2018-01-12  Martin Liska  <mliska@suse.cz>
21746         * tree-core.h: Use uint64_t instead of int.
21747         * tree.c (tree_node_counts): Likewise.
21748         (tree_node_sizes): Likewise.
21749         (dump_tree_statistics): Use PRIu64 in printf format.
21751 2018-01-12  Martin Liska  <mliska@suse.cz>
21753         * Makefile.in: As qsort_chk is implemented in vec.c, add
21754         vec.o to linkage of gencfn-macros.
21755         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
21756         passing the info to record_node_allocation_statistics.
21757         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
21758         and pass the info.
21759         * ggc-common.c (struct ggc_usage): Add operator== and use
21760         it in operator< and compare function.
21761         * mem-stats.h (struct mem_usage): Likewise.
21762         * vec.c (struct vec_usage): Remove operator< and compare
21763         function. Can be simply inherited.
21765 2018-01-12  Martin Jambor  <mjambor@suse.cz>
21767         PR target/81616
21768         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
21769         * tree-ssa-math-opts.c: Include domwalk.h.
21770         (convert_mult_to_fma_1): New function.
21771         (fma_transformation_info): New type.
21772         (fma_deferring_state): Likewise.
21773         (cancel_fma_deferring): New function.
21774         (result_of_phi): Likewise.
21775         (last_fma_candidate_feeds_initial_phi): Likewise.
21776         (convert_mult_to_fma): Added deferring logic, split actual
21777         transformation to convert_mult_to_fma_1.
21778         (math_opts_dom_walker): New type.
21779         (math_opts_dom_walker::after_dom_children): New method, body moved
21780         here from pass_optimize_widening_mul::execute, added deferring logic
21781         bits.
21782         (pass_optimize_widening_mul::execute): Moved most of code to
21783         math_opts_dom_walker::after_dom_children.
21784         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
21785         * config/i386/i386.c (ix86_option_override_internal): Added
21786         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
21788 2018-01-12  Richard Biener  <rguenther@suse.de>
21790         PR debug/83157
21791         * dwarf2out.c (gen_variable_die): Do not reset old_die for
21792         inline instance vars.
21794 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
21796         PR target/81819
21797         * config/rx/rx.c (rx_is_restricted_memory_address):
21798         Handle SUBREG case.
21800 2018-01-12  Richard Biener  <rguenther@suse.de>
21802         PR tree-optimization/80846
21803         * target.def (split_reduction): New target hook.
21804         * targhooks.c (default_split_reduction): New function.
21805         * targhooks.h (default_split_reduction): Declare.
21806         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
21807         target requests first reduce vectors by combining low and high
21808         parts.
21809         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
21810         (get_vectype_for_scalar_type_and_size): Export.
21811         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
21812         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
21813         * doc/tm.texi: Regenerate.
21814         * config/i386/i386.c (ix86_split_reduction): Implement
21815         TARGET_VECTORIZE_SPLIT_REDUCTION.
21817 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
21819         PR target/83368
21820         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
21821         in PIC mode except for TARGET_VXWORKS_RTP.
21822         * config/sparc/sparc.c: Include cfgrtl.h.
21823         (TARGET_INIT_PIC_REG): Define.
21824         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
21825         (sparc_pic_register_p): New predicate.
21826         (sparc_legitimate_address_p): Use it.
21827         (sparc_legitimize_pic_address): Likewise.
21828         (sparc_delegitimize_address): Likewise.
21829         (sparc_mode_dependent_address_p): Likewise.
21830         (gen_load_pcrel_sym): Remove 4th parameter.
21831         (load_got_register): Adjust call to above.  Remove obsolete stuff.
21832         (sparc_expand_prologue): Do not call load_got_register here.
21833         (sparc_flat_expand_prologue): Likewise.
21834         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
21835         (sparc_use_pseudo_pic_reg): New function.
21836         (sparc_init_pic_reg): Likewise.
21837         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
21838         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
21840 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
21842         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
21843         Add item for branch_cost.
21845 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
21847         PR rtl-optimization/83565
21848         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
21849         not extend the result to a larger mode for rotate operations.
21850         (num_sign_bit_copies1): Likewise.
21852 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21854         PR target/40411
21855         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
21856         -symbolic.
21857         Use values-Xc.o for -pedantic.
21858         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
21860 2018-01-12  Martin Liska  <mliska@suse.cz>
21862         PR ipa/83054
21863         * ipa-devirt.c (final_warning_record::grow_type_warnings):
21864         New function.
21865         (possible_polymorphic_call_targets): Use it.
21866         (ipa_devirt): Likewise.
21868 2018-01-12  Martin Liska  <mliska@suse.cz>
21870         * profile-count.h (enum profile_quality): Use 0 as invalid
21871         enum value of profile_quality.
21873 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
21875         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
21876         -mext-string options.
21878 2018-01-12  Richard Biener  <rguenther@suse.de>
21880         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
21881         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
21882         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
21883         Likewise.
21884         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
21886 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
21888         * configure.ac (--with-long-double-format): Add support for the
21889         configuration option to change the default long double format on
21890         PowerPC systems.
21891         * config.gcc (powerpc*-linux*-*): Likewise.
21892         * configure: Regenerate.
21893         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
21894         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
21895         used without modification.
21897 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21899         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
21900         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
21901         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
21902         MISC_BUILTIN_SPEC_BARRIER.
21903         (rs6000_init_builtins): Likewise.
21904         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
21905         enum value.
21906         (speculation_barrier): New define_insn.
21907         * doc/extend.texi: Document __builtin_speculation_barrier.
21909 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
21911         PR target/83203
21912         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
21913         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
21914         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
21915         iterators.
21916         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
21917         integral modes instead of "ss" and "sd".
21918         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
21919         vectors with 32-bit and 64-bit elements.
21920         (vecdupssescalarmodesuffix): New mode attribute.
21921         (vec_dup<mode>): Use it.
21923 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
21925         PR target/83330
21926         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
21927         frame if argument is passed on stack.
21929 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
21931         PR target/82682
21932         * ree.c (combine_reaching_defs): Optimize also
21933         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
21934         reg2=any_extend(exp); reg1=reg2;, formatting fix.
21936 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
21938         PR middle-end/83189
21939         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
21941 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
21943         PR middle-end/83718
21944         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
21945         after they are computed.
21947 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
21949         PR tree-optimization/83695
21950         * gimple-loop-linterchange.cc
21951         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
21952         reset cached scev information after interchange.
21953         (pass_linterchange::execute): Remove call to scev_reset_htab.
21955 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21957         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
21958         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
21959         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
21960         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
21961         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
21962         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
21963         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
21964         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
21965         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
21966         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
21967         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
21968         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
21969         (V_lane_reg): Likewise.
21970         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
21971         New define_expand.
21972         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
21973         (vfmal_lane_low<mode>_intrinsic,
21974         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
21975         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
21976         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
21977         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
21978         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
21979         vfmsl_lane_high<mode>_intrinsic): New define_insns.
21981 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21983         * config/arm/arm-cpus.in (fp16fml): New feature.
21984         (ALL_SIMD): Add fp16fml.
21985         (armv8.2-a): Add fp16fml as an option.
21986         (armv8.3-a): Likewise.
21987         (armv8.4-a): Add fp16fml as part of fp16.
21988         * config/arm/arm.h (TARGET_FP16FML): Define.
21989         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
21990         when appropriate.
21991         * config/arm/arm-modes.def (V2HF): Define.
21992         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
21993         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
21994         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
21995         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
21996         vfmsl_low, vfmsl_high): New set of builtins.
21997         * config/arm/iterators.md (PLUSMINUS): New code iterator.
21998         (vfml_op): New code attribute.
21999         (VFMLHALVES): New int iterator.
22000         (VFML, VFMLSEL): New mode attributes.
22001         (V_reg): Define mapping for V2HF.
22002         (V_hi, V_lo): New mode attributes.
22003         (VF_constraint): Likewise.
22004         (vfml_half, vfml_half_selector): New int attributes.
22005         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22006         define_expand.
22007         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22008         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22009         New define_insn.
22010         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22011         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22012         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22013         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
22014         documentation.
22015         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22016         Document new effective target and option set.
22018 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22020         * config/arm/arm-cpus.in (armv8_4): New feature.
22021         (ARMv8_4a): New fgroup.
22022         (armv8.4-a): New arch.
22023         * config/arm/arm-tables.opt: Regenerate.
22024         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22025         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22026         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22027         Add matching rules for -march=armv8.4-a and extensions.
22028         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22030 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
22032         PR target/81821
22033         * config/rx/rx.md (BW): New mode attribute.
22034         (sync_lock_test_and_setsi): Add mode suffix to insn output.
22036 2018-01-11  Richard Biener  <rguenther@suse.de>
22038         PR tree-optimization/83435
22039         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22040         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22041         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22043 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22044             Alan Hayward  <alan.hayward@arm.com>
22045             David Sherwood  <david.sherwood@arm.com>
22047         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22048         field.
22049         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
22050         (aarch64_print_address_internal): Use it to check for a zero offset.
22052 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22053             Alan Hayward  <alan.hayward@arm.com>
22054             David Sherwood  <david.sherwood@arm.com>
22056         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22057         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22058         Return a poly_int64 rather than a HOST_WIDE_INT.
22059         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22060         rather than a HOST_WIDE_INT.
22061         * config/aarch64/aarch64.h (aarch64_frame): Protect with
22062         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
22063         hard_fp_offset, frame_size, initial_adjust, callee_offset and
22064         final_offset from HOST_WIDE_INT to poly_int64.
22065         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22066         to_constant when getting the number of units in an Advanced SIMD
22067         mode.
22068         (aarch64_builtin_vectorized_function): Check for a constant number
22069         of units.
22070         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22071         GET_MODE_SIZE.
22072         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22073         attribute instead of GET_MODE_NUNITS.
22074         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22075         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22076         GET_MODE_SIZE for fixed-size registers.
22077         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22078         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22079         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22080         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22081         (aarch64_print_operand, aarch64_print_address_internal)
22082         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22083         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22084         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22085         Handle polynomial GET_MODE_SIZE.
22086         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
22087         wider than SImode without modification.
22088         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22089         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22090         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22091         passing and returning SVE modes.
22092         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22093         rather than GEN_INT.
22094         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22095         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22096         (aarch64_allocate_and_probe_stack_space): Likewise.
22097         (aarch64_layout_frame): Cope with polynomial offsets.
22098         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22099         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
22100         polynomial offsets.
22101         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22102         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22103         poly_int64 rather than a HOST_WIDE_INT.
22104         (aarch64_get_separate_components, aarch64_process_components)
22105         (aarch64_expand_prologue, aarch64_expand_epilogue)
22106         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22107         (aarch64_anchor_offset): New function, split out from...
22108         (aarch64_legitimize_address): ...here.
22109         (aarch64_builtin_vectorization_cost): Handle polynomial
22110         TYPE_VECTOR_SUBPARTS.
22111         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22112         GET_MODE_NUNITS.
22113         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22114         number of elements from the PARALLEL rather than the mode.
22115         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22116         rather than GET_MODE_BITSIZE.
22117         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22118         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22119         (aarch64_expand_vec_perm_const_1): Handle polynomial
22120         d->perm.length () and d->perm elements.
22121         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
22122         Apply to_constant to d->perm elements.
22123         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22124         polynomial CONST_VECTOR_NUNITS.
22125         (aarch64_move_pointer): Take amount as a poly_int64 rather
22126         than an int.
22127         (aarch64_progress_pointer): Avoid temporary variable.
22128         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22129         the mode attribute instead of GET_MODE.
22131 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22132             Alan Hayward  <alan.hayward@arm.com>
22133             David Sherwood  <david.sherwood@arm.com>
22135         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22136         x exists before using it.
22137         (aarch64_add_constant_internal): Rename to...
22138         (aarch64_add_offset_1): ...this.  Replace regnum with separate
22139         src and dest rtxes.  Handle the case in which they're different,
22140         including when the offset is zero.  Replace scratchreg with an rtx.
22141         Use 2 additions if there is no spare register into which we can
22142         move a 16-bit constant.
22143         (aarch64_add_constant): Delete.
22144         (aarch64_add_offset): Replace reg with separate src and dest
22145         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
22146         Use aarch64_add_offset_1.
22147         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22148         an rtx rather than an int.  Take the delta as a poly_int64
22149         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
22150         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22151         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22152         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22153         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22154         and aarch64_add_sp.
22155         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22156         aarch64_add_constant.
22158 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22160         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22161         Use scalar_float_mode.
22163 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22165         * config/aarch64/aarch64-simd.md
22166         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22167         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22168         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22169         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22170         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22171         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22172         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22173         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22174         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22175         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22177 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22179         PR target/83514
22180         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22181         targ_options->x_arm_arch_string is non NULL.
22183 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
22185         * config/aarch64/aarch64.h
22186         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
22188 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
22190         PR target/82096
22191         * expmed.c (emit_store_flag_force): Swap if const op0
22192         and change VOIDmode to mode of op0.
22194 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22196         PR rtl-optimization/83761
22197         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22198         than bytes to mode_for_size.
22200 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22202         PR middle-end/83189
22203         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22204         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22205         profile.
22207 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22209         PR middle-end/83575
22210         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22211         when in layout mode.
22212         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22213         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22214         partition fixup.
22216 2018-01-10  Michael Collison  <michael.collison@arm.com>
22218         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22219         * config/aarch64/aarch64-option-extension.def: Add
22220         AARCH64_OPT_EXTENSION of 'fp16fml'.
22221         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22222         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22223         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22224         * config/aarch64/constraints.md (Ui7): New constraint.
22225         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22226         (VFMLA_SEL_W): Ditto.
22227         (f16quad): Ditto.
22228         (f16mac1): Ditto.
22229         (VFMLA16_LOW): New int iterator.
22230         (VFMLA16_HIGH): Ditto.
22231         (UNSPEC_FMLAL): New unspec.
22232         (UNSPEC_FMLSL): Ditto.
22233         (UNSPEC_FMLAL2): Ditto.
22234         (UNSPEC_FMLSL2): Ditto.
22235         (f16mac): New code attribute.
22236         * config/aarch64/aarch64-simd-builtins.def
22237         (aarch64_fmlal_lowv2sf): Ditto.
22238         (aarch64_fmlsl_lowv2sf): Ditto.
22239         (aarch64_fmlalq_lowv4sf): Ditto.
22240         (aarch64_fmlslq_lowv4sf): Ditto.
22241         (aarch64_fmlal_highv2sf): Ditto.
22242         (aarch64_fmlsl_highv2sf): Ditto.
22243         (aarch64_fmlalq_highv4sf): Ditto.
22244         (aarch64_fmlslq_highv4sf): Ditto.
22245         (aarch64_fmlal_lane_lowv2sf): Ditto.
22246         (aarch64_fmlsl_lane_lowv2sf): Ditto.
22247         (aarch64_fmlal_laneq_lowv2sf): Ditto.
22248         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22249         (aarch64_fmlalq_lane_lowv4sf): Ditto.
22250         (aarch64_fmlsl_lane_lowv4sf): Ditto.
22251         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22252         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22253         (aarch64_fmlal_lane_highv2sf): Ditto.
22254         (aarch64_fmlsl_lane_highv2sf): Ditto.
22255         (aarch64_fmlal_laneq_highv2sf): Ditto.
22256         (aarch64_fmlsl_laneq_highv2sf): Ditto.
22257         (aarch64_fmlalq_lane_highv4sf): Ditto.
22258         (aarch64_fmlsl_lane_highv4sf): Ditto.
22259         (aarch64_fmlalq_laneq_highv4sf): Ditto.
22260         (aarch64_fmlsl_laneq_highv4sf): Ditto.
22261         * config/aarch64/aarch64-simd.md:
22262         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22263         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22264         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22265         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22266         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22267         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22268         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22269         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22270         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22271         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22272         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22273         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22274         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22275         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22276         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22277         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22278         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22279         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22280         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22281         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22282         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22283         (vfmlsl_low_u32): Ditto.
22284         (vfmlalq_low_u32): Ditto.
22285         (vfmlslq_low_u32): Ditto.
22286         (vfmlal_high_u32): Ditto.
22287         (vfmlsl_high_u32): Ditto.
22288         (vfmlalq_high_u32): Ditto.
22289         (vfmlslq_high_u32): Ditto.
22290         (vfmlal_lane_low_u32): Ditto.
22291         (vfmlsl_lane_low_u32): Ditto.
22292         (vfmlal_laneq_low_u32): Ditto.
22293         (vfmlsl_laneq_low_u32): Ditto.
22294         (vfmlalq_lane_low_u32): Ditto.
22295         (vfmlslq_lane_low_u32): Ditto.
22296         (vfmlalq_laneq_low_u32): Ditto.
22297         (vfmlslq_laneq_low_u32): Ditto.
22298         (vfmlal_lane_high_u32): Ditto.
22299         (vfmlsl_lane_high_u32): Ditto.
22300         (vfmlal_laneq_high_u32): Ditto.
22301         (vfmlsl_laneq_high_u32): Ditto.
22302         (vfmlalq_lane_high_u32): Ditto.
22303         (vfmlslq_lane_high_u32): Ditto.
22304         (vfmlalq_laneq_high_u32): Ditto.
22305         (vfmlslq_laneq_high_u32): Ditto.
22306         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22307         (AARCH64_FL_FOR_ARCH8_4): New.
22308         (AARCH64_ISA_F16FML): New ISA flag.
22309         (TARGET_F16FML): New feature flag for fp16fml.
22310         (doc/invoke.texi): Document new fp16fml option.
22312 2018-01-10  Michael Collison  <michael.collison@arm.com>
22314         * config/aarch64/aarch64-builtins.c:
22315         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22316         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22317         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22318         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22319         (AARCH64_ISA_SHA3): New ISA flag.
22320         (TARGET_SHA3): New feature flag for sha3.
22321         * config/aarch64/iterators.md (sha512_op): New int attribute.
22322         (CRYPTO_SHA512): New int iterator.
22323         (UNSPEC_SHA512H): New unspec.
22324         (UNSPEC_SHA512H2): Ditto.
22325         (UNSPEC_SHA512SU0): Ditto.
22326         (UNSPEC_SHA512SU1): Ditto.
22327         * config/aarch64/aarch64-simd-builtins.def
22328         (aarch64_crypto_sha512hqv2di): New builtin.
22329         (aarch64_crypto_sha512h2qv2di): Ditto.
22330         (aarch64_crypto_sha512su0qv2di): Ditto.
22331         (aarch64_crypto_sha512su1qv2di): Ditto.
22332         (aarch64_eor3qv8hi): Ditto.
22333         (aarch64_rax1qv2di): Ditto.
22334         (aarch64_xarqv2di): Ditto.
22335         (aarch64_bcaxqv8hi): Ditto.
22336         * config/aarch64/aarch64-simd.md:
22337         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22338         (aarch64_crypto_sha512su0qv2di): Ditto.
22339         (aarch64_crypto_sha512su1qv2di): Ditto.
22340         (aarch64_eor3qv8hi): Ditto.
22341         (aarch64_rax1qv2di): Ditto.
22342         (aarch64_xarqv2di): Ditto.
22343         (aarch64_bcaxqv8hi): Ditto.
22344         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22345         (vsha512h2q_u64): Ditto.
22346         (vsha512su0q_u64): Ditto.
22347         (vsha512su1q_u64): Ditto.
22348         (veor3q_u16): Ditto.
22349         (vrax1q_u64): Ditto.
22350         (vxarq_u64): Ditto.
22351         (vbcaxq_u16): Ditto.
22352         * config/arm/types.md (crypto_sha512): New type attribute.
22353         (crypto_sha3): Ditto.
22354         (doc/invoke.texi): Document new sha3 option.
22356 2018-01-10  Michael Collison  <michael.collison@arm.com>
22358         * config/aarch64/aarch64-builtins.c:
22359         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22360         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22361         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22362         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22363         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22364         (AARCH64_ISA_SM4): New ISA flag.
22365         (TARGET_SM4): New feature flag for sm4.
22366         * config/aarch64/aarch64-simd-builtins.def
22367         (aarch64_sm3ss1qv4si): Ditto.
22368         (aarch64_sm3tt1aq4si): Ditto.
22369         (aarch64_sm3tt1bq4si): Ditto.
22370         (aarch64_sm3tt2aq4si): Ditto.
22371         (aarch64_sm3tt2bq4si): Ditto.
22372         (aarch64_sm3partw1qv4si): Ditto.
22373         (aarch64_sm3partw2qv4si): Ditto.
22374         (aarch64_sm4eqv4si): Ditto.
22375         (aarch64_sm4ekeyqv4si): Ditto.
22376         * config/aarch64/aarch64-simd.md:
22377         (aarch64_sm3ss1qv4si): Ditto.
22378         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22379         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22380         (aarch64_sm4eqv4si): Ditto.
22381         (aarch64_sm4ekeyqv4si): Ditto.
22382         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22383         (sm3part_op): Ditto.
22384         (CRYPTO_SM3TT): Ditto.
22385         (CRYPTO_SM3PART): Ditto.
22386         (UNSPEC_SM3SS1): New unspec.
22387         (UNSPEC_SM3TT1A): Ditto.
22388         (UNSPEC_SM3TT1B): Ditto.
22389         (UNSPEC_SM3TT2A): Ditto.
22390         (UNSPEC_SM3TT2B): Ditto.
22391         (UNSPEC_SM3PARTW1): Ditto.
22392         (UNSPEC_SM3PARTW2): Ditto.
22393         (UNSPEC_SM4E): Ditto.
22394         (UNSPEC_SM4EKEY): Ditto.
22395         * config/aarch64/constraints.md (Ui2): New constraint.
22396         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
22397         * config/arm/types.md (crypto_sm3): New type attribute.
22398         (crypto_sm4): Ditto.
22399         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
22400         (vsm3tt1aq_u32): Ditto.
22401         (vsm3tt1bq_u32): Ditto.
22402         (vsm3tt2aq_u32): Ditto.
22403         (vsm3tt2bq_u32): Ditto.
22404         (vsm3partw1q_u32): Ditto.
22405         (vsm3partw2q_u32): Ditto.
22406         (vsm4eq_u32): Ditto.
22407         (vsm4ekeyq_u32): Ditto.
22408         (doc/invoke.texi): Document new sm4 option.
22410 2018-01-10  Michael Collison  <michael.collison@arm.com>
22412         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
22413         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
22414         (AARCH64_FL_FOR_ARCH8_4): New.
22415         (AARCH64_FL_V8_4): New flag.
22416         (doc/invoke.texi): Document new armv8.4-a option.
22418 2018-01-10  Michael Collison  <michael.collison@arm.com>
22420         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22421         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22422         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22423         * config/aarch64/aarch64-option-extension.def: Add
22424         AARCH64_OPT_EXTENSION of 'sha2'.
22425         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
22426         (crypto): Disable sha2 and aes if crypto disabled.
22427         (crypto): Enable aes and sha2 if enabled.
22428         (simd): Disable sha2 and aes if simd disabled.
22429         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
22430         New flags.
22431         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
22432         (TARGET_SHA2): New feature flag for sha2.
22433         (TARGET_AES): New feature flag for aes.
22434         * config/aarch64/aarch64-simd.md:
22435         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
22436         conditional on TARGET_AES.
22437         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
22438         (aarch64_crypto_sha1hsi): Make pattern conditional
22439         on TARGET_SHA2.
22440         (aarch64_crypto_sha1hv4si): Ditto.
22441         (aarch64_be_crypto_sha1hv4si): Ditto.
22442         (aarch64_crypto_sha1su1v4si): Ditto.
22443         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
22444         (aarch64_crypto_sha1su0v4si): Ditto.
22445         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
22446         (aarch64_crypto_sha256su0v4si): Ditto.
22447         (aarch64_crypto_sha256su1v4si): Ditto.
22448         (doc/invoke.texi): Document new aes and sha2 options.
22450 2018-01-10  Martin Sebor  <msebor@redhat.com>
22452         PR tree-optimization/83781
22453         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
22454         as string arrays.
22456 2018-01-11  Martin Sebor  <msebor@gmail.com>
22457             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22459         PR tree-optimization/83501
22460         PR tree-optimization/81703
22462         * tree-ssa-strlen.c (get_string_cst): Rename...
22463         (get_string_len): ...to this.  Handle global constants.
22464         (handle_char_store): Adjust.
22466 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
22467             Jim Wilson  <jimw@sifive.com>
22469         * config/riscv/riscv-protos.h (riscv_output_return): New.
22470         * config/riscv/riscv.c (struct machine_function): New naked_p field.
22471         (riscv_attribute_table, riscv_output_return),
22472         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
22473         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
22474         (riscv_compute_frame_info): Only compute frame->mask if not a naked
22475         function.
22476         (riscv_expand_prologue): Add early return for naked function.
22477         (riscv_expand_epilogue): Likewise.
22478         (riscv_function_ok_for_sibcall): Return false for naked function.
22479         (riscv_set_current_function): New.
22480         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
22481         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
22482         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
22483         * doc/extend.texi (RISC-V Function Attributes): New.
22485 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
22487         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
22488         check for 128-bit long double before checking TCmode.
22489         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
22490         128-bit long doubles before checking TFmode or TCmode.
22491         (FLOAT128_IBM_P): Likewise.
22493 2018-01-10  Martin Sebor  <msebor@redhat.com>
22495         PR tree-optimization/83671
22496         * builtins.c (c_strlen): Unconditionally return zero for the empty
22497         string.
22498         Use -Warray-bounds for warnings.
22499         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
22500         for non-constant array indices with COMPONENT_REF, arrays of
22501         arrays, and pointers to arrays.
22502         (gimple_fold_builtin_strlen): Determine and set length range for
22503         non-constant character arrays.
22505 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
22507         PR middle-end/81897
22508         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
22509         empty blocks.
22511 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
22513         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
22515 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
22517         PR target/83399
22518         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
22519         VECTOR_MEM_ALTIVEC_OR_VSX_P.
22520         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
22521         indexed_or_indirect_operand predicate.
22522         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
22523         (*vsx_le_perm_load_v8hi): Likewise.
22524         (*vsx_le_perm_load_v16qi): Likewise.
22525         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
22526         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
22527         (*vsx_le_perm_store_v8hi): Likewise.
22528         (*vsx_le_perm_store_v16qi): Likewise.
22529         (eight unnamed splitters): Likewise.
22531 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
22533         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
22534         * config/rs6000/emmintrin.h: Likewise.
22535         * config/rs6000/mmintrin.h: Likewise.
22536         * config/rs6000/xmmintrin.h: Likewise.
22538 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
22540         PR c++/43486
22541         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
22542         "public_flag".
22543         * tree.c (tree_nop_conversion): Return true for location wrapper
22544         nodes.
22545         (maybe_wrap_with_location): New function.
22546         (selftest::check_strip_nops): New function.
22547         (selftest::test_location_wrappers): New function.
22548         (selftest::tree_c_tests): Call it.
22549         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
22550         (maybe_wrap_with_location): New decl.
22551         (EXPR_LOCATION_WRAPPER_P): New macro.
22552         (location_wrapper_p): New inline function.
22553         (tree_strip_any_location_wrapper): New inline function.
22555 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
22557         PR target/83735
22558         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
22559         stack_realign_offset for the largest alignment of stack slot
22560         actually used.
22561         (ix86_find_max_used_stack_alignment): New function.
22562         (ix86_finalize_stack_frame_flags): Use it.  Set
22563         max_used_stack_alignment if we don't realign stack.
22564         * config/i386/i386.h (machine_function): Add
22565         max_used_stack_alignment.
22567 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
22569         * config/arm/arm.opt (-mbranch-cost): New option.
22570         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
22571         account.
22573 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
22575         PR target/83629
22576         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
22577         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
22579 2018-01-10  Richard Biener  <rguenther@suse.de>
22581         PR debug/83765
22582         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
22583         early out so it also covers the case where we have a non-NULL
22584         origin.
22586 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
22588         PR tree-optimization/83753
22589         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
22590         for non-strided grouped accesses if the number of elements is 1.
22592 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22594         PR target/81616
22595         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
22596         * i386.h (TARGET_USE_GATHER): Define.
22597         * x86-tune.def (X86_TUNE_USE_GATHER): New.
22599 2018-01-10  Martin Liska  <mliska@suse.cz>
22601         PR bootstrap/82831
22602         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
22603         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
22604         partitioning.
22605         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
22606         CLEANUP_NO_PARTITIONING is not set.
22608 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
22610         * doc/rtl.texi: Remove documentation of (const ...) wrappers
22611         for vectors, as a partial revert of r254296.
22612         * rtl.h (const_vec_p): Delete.
22613         (const_vec_duplicate_p): Don't test for vector CONSTs.
22614         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
22615         * expmed.c (make_tree): Likewise.
22617         Revert:
22618         * common.md (E, F): Use CONSTANT_P instead of checking for
22619         CONST_VECTOR.
22620         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
22621         checking for CONST_VECTOR.
22623 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
22625         PR middle-end/83575
22626         * predict.c (force_edge_cold): Handle in more sane way edges
22627         with no prediction.
22629 2018-01-09  Carl Love  <cel@us.ibm.com>
22631         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
22632         V4SI, V4SF types.
22633         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
22634         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
22635         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
22636         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
22637         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
22638         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
22639         * config/rs6000/rs6000-protos.h: Add extern defition for
22640         rs6000_generate_float2_double_code.
22641         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
22642         function.
22643         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
22644         (float2_v2df): Add define_expand.
22646 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
22648         PR target/83628
22649         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
22650         op_mode in the force_to_mode call.
22652 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
22654         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
22655         instead of checking each element individually.
22656         (aarch64_evpc_uzp): Likewise.
22657         (aarch64_evpc_zip): Likewise.
22658         (aarch64_evpc_ext): Likewise.
22659         (aarch64_evpc_rev): Likewise.
22660         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
22661         instead of checking each element individually.  Return true without
22662         generating rtl if
22663         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
22664         whether all selected elements come from the same input, instead of
22665         checking each element individually.  Remove calls to gen_rtx_REG,
22666         start_sequence and end_sequence and instead assert that no rtl is
22667         generated.
22669 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
22671         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
22672         order of HIGH and CONST checks.
22674 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
22676         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
22677         if the destination isn't an SSA_NAME.
22679 2018-01-09  Richard Biener  <rguenther@suse.de>
22681         PR tree-optimization/83668
22682         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
22683         move prologue...
22684         (canonicalize_loop_form): ... here, renamed from ...
22685         (canonicalize_loop_closed_ssa_form): ... this and amended to
22686         swap successor edges for loop exit blocks to make us use
22687         the RPO order we need for initial schedule generation.
22689 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
22691         PR tree-optimization/64811
22692         * match.pd: When optimizing comparisons with Inf, avoid
22693         introducing or losing exceptions from comparisons with NaN.
22695 2018-01-09  Martin Liska  <mliska@suse.cz>
22697         PR sanitizer/82517
22698         * asan.c (shadow_mem_size): Add gcc_assert.
22700 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
22702         Don't save registers in main().
22704         PR target/83738
22705         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
22706         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
22707         * config/avr/avr.c (avr_set_current_function): Don't error if
22708         naked, OS_task or OS_main are specified at the same time.
22709         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
22710         OS_main.
22711         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
22712         attribute.
22713         * common/config/avr/avr-common.c (avr_option_optimization_table):
22714         Switch on -mmain-is-OS_task for optimizing compilations.
22716 2018-01-09  Richard Biener  <rguenther@suse.de>
22718         PR tree-optimization/83572
22719         * graphite.c: Include cfganal.h.
22720         (graphite_transform_loops): Connect infinite loops to exit
22721         and remove fake edges at the end.
22723 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
22725         * ipa-inline.c (edge_badness): Revert accidental checkin.
22727 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
22729         PR ipa/80763
22730         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
22731         symbols; not inline clones.
22733 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
22735         PR target/83507
22736         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
22737         hard registers.  Formatting fixes.
22739         PR preprocessor/83722
22740         * gcc.c (try_generate_repro): Pass
22741         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
22742         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
22743         do_report_bug.
22745 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
22746             Kito Cheng  <kito.cheng@gmail.com>
22748         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
22749         (riscv_leaf_function_p): Delete.
22750         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
22752 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22754         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
22755         function.
22756         (do_ifelse): New function.
22757         (do_isel): New function.
22758         (do_sub3): New function.
22759         (do_add3): New function.
22760         (do_load_mask_compare): New function.
22761         (do_overlap_load_compare): New function.
22762         (expand_compare_loop): New function.
22763         (expand_block_compare): Call expand_compare_loop() when appropriate.
22764         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
22765         option description.
22766         (-mblock-compare-inline-loop-limit): New option.
22768 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22770         PR target/83677
22771         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
22772         Reverse order of second and third operands in first alternative.
22773         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
22774         of first and second elements in UNSPEC_VPERMR vector.
22775         (altivec_expand_vec_perm_le): Likewise.
22777 2018-01-08  Jeff Law  <law@redhat.com>
22779         PR rtl-optimizatin/81308
22780         * tree-switch-conversion.c (cfg_altered): New file scoped static.
22781         (process_switch): If group_case_labels makes a change, then set
22782         cfg_altered.
22783         (pass_convert_switch::execute): If a switch is converted, then
22784         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
22786         PR rtl-optimization/81308
22787         * recog.c (split_all_insns): Conditionally cleanup the CFG after
22788         splitting insns.
22790 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
22792         PR target/83663 - Revert r255946
22793         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
22794         generation for cases where splatting a value is not useful.
22795         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
22796         across a vec_duplicate and a paradoxical subreg forming a vector
22797         mode to a vec_concat.
22799 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22801         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
22802         -march=armv8.3-a variants.
22803         * config/arm/t-multilib: Likewise.
22804         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
22806 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22808         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
22809         to generate rtl.
22810         (cceq_ior_compare_complement): Give it a name so I can use it, and
22811         change boolean_or_operator predicate to boolean_operator so it can
22812         be used to generate a crand.
22813         (eqne): New code iterator.
22814         (bd/bd_neg): New code_attrs.
22815         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
22816         a single define_insn.
22817         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
22818         decrement (bdnzt/bdnzf/bdzt/bdzf).
22819         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
22820         with the new names of the branch decrement patterns, and added the
22821         names of the branch decrement conditional patterns.
22823 2018-01-08  Richard Biener  <rguenther@suse.de>
22825         PR tree-optimization/83563
22826         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
22827         cache.
22829 2018-01-08  Richard Biener  <rguenther@suse.de>
22831         PR middle-end/83713
22832         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
22834 2018-01-08  Richard Biener  <rguenther@suse.de>
22836         PR tree-optimization/83685
22837         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
22838         references to abnormals.
22840 2018-01-08  Richard Biener  <rguenther@suse.de>
22842         PR lto/83719
22843         * dwarf2out.c (output_indirect_strings): Handle empty
22844         skeleton_debug_str_hash.
22845         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
22847 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
22849         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
22850         (emit_store_direct): Likewise.
22851         (arc_trampoline_adjust_address): Likewise.
22852         (arc_asm_trampoline_template): New function.
22853         (arc_initialize_trampoline): Use asm_trampoline_template.
22854         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
22855         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
22856         * config/arc/arc.md (flush_icache): Delete pattern.
22858 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
22860         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
22861         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
22862         munaligned-access.
22864 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22866         PR target/83681
22867         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
22868         by not USED_FOR_TARGET.
22869         (make_pass_resolve_sw_modes): Likewise.
22871 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22873         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
22874         USED_FOR_TARGET.
22876 2018-01-08  Richard Biener  <rguenther@suse.de>
22878         PR middle-end/83580
22879         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
22881 2018-01-08  Richard Biener  <rguenther@suse.de>
22883         PR middle-end/83517
22884         * match.pd ((t * 2) / 2) -> t): Add missing :c.
22886 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
22888         PR middle-end/81897
22889         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
22890         basic blocks with a small number of successors.
22891         (convert_control_dep_chain_into_preds): Improve handling of
22892         forwarder blocks.
22893         (dump_predicates): Split apart into...
22894         (dump_pred_chain): ...here...
22895         (dump_pred_info): ...and here.
22896         (can_one_predicate_be_invalidated_p): Add debugging printfs.
22897         (can_chain_union_be_invalidated_p): Improve check for invalidation
22898         of paths.
22899         (uninit_uses_cannot_happen): Avoid unnecessary if
22900         convert_control_dep_chain_into_preds yielded nothing.
22902 2018-01-06  Martin Sebor  <msebor@redhat.com>
22904         PR tree-optimization/83640
22905         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
22906         subtracting negative offset from size.
22907         (builtin_access::overlap): Adjust offset bounds of the access to fall
22908         within the size of the object if possible.
22910 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
22912         PR rtl-optimization/83699
22913         * expmed.c (extract_bit_field_1): Restrict the vector usage of
22914         extract_bit_field_as_subreg to cases in which the extracted
22915         value is also a vector.
22917         * lra-constraints.c (process_alt_operands): Test for the equivalence
22918         substitutions when detecting a possible reload cycle.
22920 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
22922         PR debug/83480
22923         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
22924         by default if flag_selective_schedling{,2}.  Formatting fixes.
22926         PR rtl-optimization/83682
22927         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
22928         if it has non-VECTOR_MODE element mode.
22929         (vec_duplicate_p): Likewise.
22931         PR middle-end/83694
22932         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
22933         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
22935 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
22937         PR target/83604
22938         * config/i386/i386-builtin.def
22939         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
22940         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
22941         Require also OPTION_MASK_ISA_AVX512F in addition to
22942         OPTION_MASK_ISA_GFNI.
22943         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
22944         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
22945         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
22946         to OPTION_MASK_ISA_GFNI.
22947         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
22948         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
22949         OPTION_MASK_ISA_AVX512BW.
22950         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
22951         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
22952         addition to OPTION_MASK_ISA_GFNI.
22953         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
22954         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
22955         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
22956         to OPTION_MASK_ISA_GFNI.
22957         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
22958         a requirement for all ISAs rather than any of them with a few
22959         exceptions.
22960         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
22961         processing.
22962         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
22963         bitmasks to be enabled with 3 exceptions, instead of requiring any
22964         enabled ISA with lots of exceptions.
22965         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
22966         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
22967         Change avx512bw in isa attribute to avx512f.
22968         * config/i386/sgxintrin.h: Add license boilerplate.
22969         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
22970         to __AVX512F__ and __AVX512VL to __AVX512VL__.
22971         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
22972         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
22973         defined.
22974         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
22975         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
22976         temporarily sse2 rather than sse if not enabled already.
22978         PR target/83604
22979         * config/i386/sse.md (VI248_VLBW): Rename to ...
22980         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
22981         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
22982         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
22983         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
22984         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
22985         mode iterator instead of VI248_VLBW.
22987 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
22989         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
22990         (record_modified): Skip clobbers; add debug output.
22991         (param_change_prob): Use sreal frequencies.
22993 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
22995         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
22996         punt for user-aligned variables.
22998 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
23000         * tree-chrec.c (chrec_contains_symbols): Return true for
23001         POLY_INT_CST.
23003 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
23005         PR target/82439
23006         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23007         of (x|y) == x for BICS pattern.
23009 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
23011         PR tree-optimization/83605
23012         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23013         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23014         can throw.
23016 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23018         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23019         * config/epiphany/rtems.h: New file.
23021 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23022             Uros Bizjak  <ubizjak@gmail.com>
23024         PR target/83554
23025         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23026         QIreg_operand instead of register_operand predicate.
23027         * config/i386/i386.c (ix86_rop_should_change_byte_p,
23028         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23029         comments instead of -fmitigate[-_]rop.
23031 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23033         PR bootstrap/81926
23034         * cgraphunit.c (symbol_table::compile): Switch to text_section
23035         before calling assembly_start debug hook.
23036         * run-rtl-passes.c (run_rtl_passes): Likewise.
23037         Include output.h.
23039 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23041         * tree-vrp.c (extract_range_from_binary_expr_1): Check
23042         range_int_cst_p rather than !symbolic_range_p before calling
23043         extract_range_from_multiplicative_op_1.
23045 2018-01-04  Jeff Law  <law@redhat.com>
23047         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23048         redundant test in assertion.
23050 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23052         * doc/rtl.texi: Document machine_mode wrapper classes.
23054 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23056         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23057         using tree_to_uhwi.
23059 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23061         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23062         the VEC_PERM_EXPR fold to fail.
23064 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23066         PR debug/83585
23067         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23068         to switched_sections.
23070 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23072         PR target/83680
23073         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23074         test for d.testing.
23076 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
23078         PR target/83387
23079         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23080         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23082 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23084         PR debug/83666
23085         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23086         is BLKmode and bitpos not zero or mode change is needed.
23088 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23090         PR target/83675
23091         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23092         TARGET_VIS2.
23094 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
23096         PR target/83628
23097         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23098         instead of MULT rtx.  Update all corresponding splitters.
23099         (*saddl_se): Ditto.
23100         (*ssub<modesuffix>): Ditto.
23101         (*ssubl_se): Ditto.
23102         (*cmp_sadd_di): Update split patterns.
23103         (*cmp_sadd_si): Ditto.
23104         (*cmp_sadd_sidi): Ditto.
23105         (*cmp_ssub_di): Ditto.
23106         (*cmp_ssub_si): Ditto.
23107         (*cmp_ssub_sidi): Ditto.
23108         * config/alpha/predicates.md (const23_operand): New predicate.
23109         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23110         Look for ASHIFT, not MULT inner operand.
23111         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23113 2018-01-04  Martin Liska  <mliska@suse.cz>
23115         PR gcov-profile/83669
23116         * gcov.c (output_intermediate_file): Add version to intermediate
23117         gcov file.
23118         * doc/gcov.texi: Document new field 'version' in intermediate
23119         file format. Fix location of '-k' option of gcov command.
23121 2018-01-04  Martin Liska  <mliska@suse.cz>
23123         PR ipa/82352
23124         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23126 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23128         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23130 2018-01-03  Martin Sebor  <msebor@redhat.com>
23132         PR tree-optimization/83655
23133         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23134         checking calls with invalid arguments.
23136 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23138         * tree-vect-stmts.c (vect_get_store_rhs): New function.
23139         (vectorizable_mask_load_store): Delete.
23140         (vectorizable_call): Return false for masked loads and stores.
23141         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
23142         instead of gimple_assign_rhs1.
23143         (vectorizable_load): Handle IFN_MASK_LOAD.
23144         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23146 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23148         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23149         split out from..,
23150         (vectorizable_mask_load_store): ...here.
23151         (vectorizable_load): ...and here.
23153 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23155         * tree-vect-stmts.c (vect_build_all_ones_mask)
23156         (vect_build_zero_merge_argument): New functions, split out from...
23157         (vectorizable_load): ...here.
23159 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23161         * tree-vect-stmts.c (vect_check_store_rhs): New function,
23162         split out from...
23163         (vectorizable_mask_load_store): ...here.
23164         (vectorizable_store): ...and here.
23166 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23168         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23169         split out from...
23170         (vectorizable_mask_load_store): ...here.
23172 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23174         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23175         (vect_model_store_cost): Take a vec_load_store_type instead of a
23176         vect_def_type.
23177         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23178         (vect_model_store_cost): Take a vec_load_store_type instead of a
23179         vect_def_type.
23180         (vectorizable_mask_load_store): Update accordingly.
23181         (vectorizable_store): Likewise.
23182         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23184 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23186         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23187         IFN_MASK_LOAD calls here rather than...
23188         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23190 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23191             Alan Hayward  <alan.hayward@arm.com>
23192             David Sherwood  <david.sherwood@arm.com>
23194         * expmed.c (extract_bit_field_1): For vector extracts,
23195         fall back to extract_bit_field_as_subreg if vec_extract
23196         isn't available.
23198 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23199             Alan Hayward  <alan.hayward@arm.com>
23200             David Sherwood  <david.sherwood@arm.com>
23202         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23203         they are variable or constant sized.
23204         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23205         slots for constant-sized data.
23207 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23208             Alan Hayward  <alan.hayward@arm.com>
23209             David Sherwood  <david.sherwood@arm.com>
23211         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23212         handling COND_EXPRs with boolean comparisons, try to find a better
23213         basis for the mask type than the boolean itself.
23215 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23217         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23218         is calculated and how it can be overridden.
23219         * genmodes.c (max_bitsize_mode_any_mode): New variable.
23220         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23221         if defined.
23222         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23223         if nonzero.
23225 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23226             Alan Hayward  <alan.hayward@arm.com>
23227             David Sherwood  <david.sherwood@arm.com>
23229         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23230         Remove the mode argument.
23231         (aarch64_simd_valid_immediate): Remove the mode and inverse
23232         arguments.
23233         * config/aarch64/iterators.md (bitsize): New iterator.
23234         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23235         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23236         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23237         aarch64_simd_valid_immediate.
23238         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23239         (aarch64_reg_or_bic_imm): Likewise.
23240         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23241         with an insn_type enum and msl with a modifier_type enum.
23242         Replace element_width with a scalar_mode.  Change the shift
23243         to unsigned int.  Add constructors for scalar_float_mode and
23244         scalar_int_mode elements.
23245         (aarch64_vect_float_const_representable_p): Delete.
23246         (aarch64_can_const_movi_rtx_p)
23247         (aarch64_simd_scalar_immediate_valid_for_move)
23248         (aarch64_simd_make_constant): Update call to
23249         aarch64_simd_valid_immediate.
23250         (aarch64_advsimd_valid_immediate_hs): New function.
23251         (aarch64_advsimd_valid_immediate): Likewise.
23252         (aarch64_simd_valid_immediate): Remove mode and inverse
23253         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
23254         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23255         and aarch64_float_const_representable_p on the result.
23256         (aarch64_output_simd_mov_immediate): Remove mode argument.
23257         Update call to aarch64_simd_valid_immediate and use of
23258         simd_immediate_info.
23259         (aarch64_output_scalar_simd_mov_immediate): Update call
23260         accordingly.
23262 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23263             Alan Hayward  <alan.hayward@arm.com>
23264             David Sherwood  <david.sherwood@arm.com>
23266         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23267         (mode_nunits): Likewise CONST_MODE_NUNITS.
23268         * machmode.def (ADJUST_NUNITS): Document.
23269         * genmodes.c (mode_data::need_nunits_adj): New field.
23270         (blank_mode): Update accordingly.
23271         (adj_nunits): New variable.
23272         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23273         parameter.
23274         (emit_mode_size_inline): Set need_bytesize_adj for all modes
23275         listed in adj_nunits.
23276         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23277         listed in adj_nunits.  Don't emit case statements for such modes.
23278         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23279         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
23280         nothing if adj_nunits is nonnull.
23281         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23282         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23283         (emit_mode_fbit): Update use of print_maybe_const_decl.
23284         (emit_move_size): Likewise.  Treat the array as non-const
23285         if adj_nunits.
23286         (emit_mode_adjustments): Handle adj_nunits.
23288 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23290         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23291         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23292         (VECTOR_MODES): Use it.
23293         (make_vector_modes): Take the prefix as an argument.
23295 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23296             Alan Hayward  <alan.hayward@arm.com>
23297             David Sherwood  <david.sherwood@arm.com>
23299         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23300         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23301         for MODE_VECTOR_BOOL.
23302         * machmode.def (VECTOR_BOOL_MODE): Document.
23303         * genmodes.c (VECTOR_BOOL_MODE): New macro.
23304         (make_vector_bool_mode): New function.
23305         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23306         MODE_VECTOR_BOOL.
23307         * lto-streamer-in.c (lto_input_mode_table): Likewise.
23308         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23309         Likewise.
23310         * stor-layout.c (int_mode_for_mode): Likewise.
23311         * tree.c (build_vector_type_for_mode): Likewise.
23312         * varasm.c (output_constant_pool_2): Likewise.
23313         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23314         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
23315         for MODE_VECTOR_BOOL.
23316         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23317         of mode class checks.
23318         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23319         instead of a list of mode class checks.
23320         (expand_vector_scalar_condition): Likewise.
23321         (type_for_widest_vector_mode): Handle BImode as an inner mode.
23323 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23324             Alan Hayward  <alan.hayward@arm.com>
23325             David Sherwood  <david.sherwood@arm.com>
23327         * machmode.h (mode_size): Change from unsigned short to
23328         poly_uint16_pod.
23329         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23330         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23331         or if measurement_type is not polynomial.
23332         (fixed_size_mode::includes_p): Check for constant-sized modes.
23333         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23334         return a poly_uint16 rather than an unsigned short.
23335         (emit_mode_size): Change the type of mode_size from unsigned short
23336         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
23337         (emit_mode_adjustments): Cope with polynomial vector sizes.
23338         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23339         for GET_MODE_SIZE.
23340         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23341         for GET_MODE_SIZE.
23342         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23343         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23344         * caller-save.c (setup_save_areas): Likewise.
23345         (replace_reg_with_saved_mem): Likewise.
23346         * calls.c (emit_library_call_value_1): Likewise.
23347         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23348         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23349         (gen_lowpart_for_combine): Likewise.
23350         * convert.c (convert_to_integer_1): Likewise.
23351         * cse.c (equiv_constant, cse_insn): Likewise.
23352         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23353         (cselib_subst_to_values): Likewise.
23354         * dce.c (word_dce_process_block): Likewise.
23355         * df-problems.c (df_word_lr_mark_ref): Likewise.
23356         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23357         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23358         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23359         (rtl_for_decl_location): Likewise.
23360         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23361         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23362         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23363         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23364         (expand_expr_real_1): Likewise.
23365         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23366         (pad_below): Likewise.
23367         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23368         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23369         * ira.c (get_subreg_tracking_sizes): Likewise.
23370         * ira-build.c (ira_create_allocno_objects): Likewise.
23371         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23372         (ira_sort_regnos_for_alter_reg): Likewise.
23373         * ira-costs.c (record_operand_costs): Likewise.
23374         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23375         (resolve_simple_move): Likewise.
23376         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23377         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23378         (lra_constraints): Likewise.
23379         (CONST_POOL_OK_P): Reject variable-sized modes.
23380         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23381         (add_pseudo_to_slot, lra_spill): Likewise.
23382         * omp-low.c (omp_clause_aligned_alignment): Likewise.
23383         * optabs-query.c (get_best_extraction_insn): Likewise.
23384         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23385         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23386         (expand_mult_highpart, valid_multiword_target_p): Likewise.
23387         * recog.c (offsettable_address_addr_space_p): Likewise.
23388         * regcprop.c (maybe_mode_change): Likewise.
23389         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
23390         * regrename.c (build_def_use): Likewise.
23391         * regstat.c (dump_reg_info): Likewise.
23392         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
23393         (find_reloads, find_reloads_subreg_address): Likewise.
23394         * reload1.c (eliminate_regs_1): Likewise.
23395         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
23396         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
23397         (simplify_binary_operation_1, simplify_subreg): Likewise.
23398         * targhooks.c (default_function_arg_padding): Likewise.
23399         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
23400         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
23401         (verify_gimple_assign_ternary): Likewise.
23402         * tree-inline.c (estimate_move_cost): Likewise.
23403         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23404         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
23405         (get_address_cost_ainc): Likewise.
23406         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23407         (vect_supportable_dr_alignment): Likewise.
23408         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23409         (vectorizable_reduction): Likewise.
23410         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
23411         (vectorizable_operation, vectorizable_load): Likewise.
23412         * tree.c (build_same_sized_truth_vector_type): Likewise.
23413         * valtrack.c (cleanup_auto_inc_dec): Likewise.
23414         * var-tracking.c (emit_note_insn_var_location): Likewise.
23415         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
23416         (ADDR_VEC_ALIGN): Likewise.
23418 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23419             Alan Hayward  <alan.hayward@arm.com>
23420             David Sherwood  <david.sherwood@arm.com>
23422         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23423         unsigned short.
23424         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23425         or if measurement_type is polynomial.
23426         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
23427         * combine.c (make_extraction): Likewise.
23428         * dse.c (find_shift_sequence): Likewise.
23429         * dwarf2out.c (mem_loc_descriptor): Likewise.
23430         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
23431         (extract_bit_field, extract_low_bits): Likewise.
23432         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
23433         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
23434         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
23435         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
23436         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23437         * reload.c (find_reloads): Likewise.
23438         * reload1.c (alter_reg): Likewise.
23439         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
23440         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
23441         * tree-if-conv.c (predicate_mem_writes): Likewise.
23442         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
23443         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
23444         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
23445         * valtrack.c (dead_debug_insert_temp): Likewise.
23446         * varasm.c (mergeable_constant_section): Likewise.
23447         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
23449 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23450             Alan Hayward  <alan.hayward@arm.com>
23451             David Sherwood  <david.sherwood@arm.com>
23453         * expr.c (expand_assignment): Cope with polynomial mode sizes
23454         when assigning to a CONCAT.
23456 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23457             Alan Hayward  <alan.hayward@arm.com>
23458             David Sherwood  <david.sherwood@arm.com>
23460         * machmode.h (mode_precision): Change from unsigned short to
23461         poly_uint16_pod.
23462         (mode_to_precision): Return a poly_uint16 rather than an unsigned
23463         short.
23464         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
23465         or if measurement_type is not polynomial.
23466         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
23467         in which the mode is already known to be a scalar_int_mode.
23468         * genmodes.c (emit_mode_precision): Change the type of mode_precision
23469         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
23470         initializer.
23471         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23472         for GET_MODE_PRECISION.
23473         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23474         for GET_MODE_PRECISION.
23475         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
23476         as polynomial.
23477         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
23478         (expand_field_assignment, make_extraction): Likewise.
23479         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
23480         (get_last_value): Likewise.
23481         * convert.c (convert_to_integer_1): Likewise.
23482         * cse.c (cse_insn): Likewise.
23483         * expr.c (expand_expr_real_1): Likewise.
23484         * lra-constraints.c (simplify_operand_subreg): Likewise.
23485         * optabs-query.c (can_atomic_load_p): Likewise.
23486         * optabs.c (expand_atomic_load): Likewise.
23487         (expand_atomic_store): Likewise.
23488         * ree.c (combine_reaching_defs): Likewise.
23489         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
23490         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
23491         * tree.h (type_has_mode_precision_p): Likewise.
23492         * ubsan.c (instrument_si_overflow): Likewise.
23494 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23495             Alan Hayward  <alan.hayward@arm.com>
23496             David Sherwood  <david.sherwood@arm.com>
23498         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
23499         polynomial numbers of units.
23500         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
23501         (valid_vector_subparts_p): New function.
23502         (build_vector_type): Remove temporary shim and take the number
23503         of units as a poly_uint64 rather than an int.
23504         (build_opaque_vector_type): Take the number of units as a
23505         poly_uint64 rather than an int.
23506         * tree.c (build_vector_from_ctor): Handle polynomial
23507         TYPE_VECTOR_SUBPARTS.
23508         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
23509         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
23510         (build_vector_from_val): If the number of units is variable,
23511         use build_vec_duplicate_cst for constant operands and
23512         VEC_DUPLICATE_EXPR otherwise.
23513         (make_vector_type): Remove temporary is_constant ().
23514         (build_vector_type, build_opaque_vector_type): Take the number of
23515         units as a poly_uint64 rather than an int.
23516         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
23517         VECTOR_CST_NELTS.
23518         * cfgexpand.c (expand_debug_expr): Likewise.
23519         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
23520         (store_constructor, expand_expr_real_1): Likewise.
23521         (const_scalar_mask_from_tree): Likewise.
23522         * fold-const-call.c (fold_const_reduction): Likewise.
23523         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
23524         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
23525         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
23526         (fold_relational_const): Likewise.
23527         (native_interpret_vector): Likewise.  Change the size from an
23528         int to an unsigned int.
23529         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
23530         TYPE_VECTOR_SUBPARTS.
23531         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
23532         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
23533         duplicating a non-constant operand into a variable-length vector.
23534         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
23535         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
23536         * ipa-icf.c (sem_variable::equals): Likewise.
23537         * match.pd: Likewise.
23538         * omp-simd-clone.c (simd_clone_subparts): Likewise.
23539         * print-tree.c (print_node): Likewise.
23540         * stor-layout.c (layout_type): Likewise.
23541         * targhooks.c (default_builtin_vectorization_cost): Likewise.
23542         * tree-cfg.c (verify_gimple_comparison): Likewise.
23543         (verify_gimple_assign_binary): Likewise.
23544         (verify_gimple_assign_ternary): Likewise.
23545         (verify_gimple_assign_single): Likewise.
23546         * tree-pretty-print.c (dump_generic_node): Likewise.
23547         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23548         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
23549         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
23550         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
23551         (vect_shift_permute_load_chain): Likewise.
23552         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
23553         (expand_vector_condition, optimize_vector_constructor): Likewise.
23554         (lower_vec_perm, get_compute_type): Likewise.
23555         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23556         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
23557         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
23558         (vect_recog_mask_conversion_pattern): Likewise.
23559         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
23560         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
23561         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23562         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
23563         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
23564         (vectorizable_shift, vectorizable_operation, vectorizable_store)
23565         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
23566         (supportable_widening_operation): Likewise.
23567         (supportable_narrowing_operation): Likewise.
23568         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
23569         Likewise.
23570         * varasm.c (output_constant): Likewise.
23572 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23573             Alan Hayward  <alan.hayward@arm.com>
23574             David Sherwood  <david.sherwood@arm.com>
23576         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
23577         so that both the length == 3 and length != 3 cases set up their
23578         own permute vectors.  Add comments explaining why we know the
23579         number of elements is constant.
23580         (vect_permute_load_chain): Likewise.
23582 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23583             Alan Hayward  <alan.hayward@arm.com>
23584             David Sherwood  <david.sherwood@arm.com>
23586         * machmode.h (mode_nunits): Change from unsigned char to
23587         poly_uint16_pod.
23588         (ONLY_FIXED_SIZE_MODES): New macro.
23589         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
23590         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
23591         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
23592         New typedefs.
23593         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
23594         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
23595         or if measurement_type is not polynomial.
23596         * genmodes.c (ZERO_COEFFS): New macro.
23597         (emit_mode_nunits_inline): Make mode_nunits_inline return a
23598         poly_uint16.
23599         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
23600         Use ZERO_COEFFS when emitting initializers.
23601         * data-streamer.h (bp_pack_poly_value): New function.
23602         (bp_unpack_poly_value): Likewise.
23603         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23604         for GET_MODE_NUNITS.
23605         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23606         for GET_MODE_NUNITS.
23607         * tree.c (make_vector_type): Remove temporary shim and make
23608         the real function take the number of units as a poly_uint64
23609         rather than an int.
23610         (build_vector_type_for_mode): Handle polynomial nunits.
23611         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
23612         * emit-rtl.c (const_vec_series_p_1): Likewise.
23613         (gen_rtx_CONST_VECTOR): Likewise.
23614         * fold-const.c (test_vec_duplicate_folding): Likewise.
23615         * genrecog.c (validate_pattern): Likewise.
23616         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
23617         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23618         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
23619         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
23620         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
23621         * rtlanal.c (subreg_get_info): Likewise.
23622         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23623         (vect_grouped_load_supported): Likewise.
23624         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
23625         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
23626         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
23627         (simplify_const_unary_operation, simplify_binary_operation_1)
23628         (simplify_const_binary_operation, simplify_ternary_operation)
23629         (test_vector_ops_duplicate, test_vector_ops): Likewise.
23630         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
23631         instead of CONST_VECTOR_NUNITS.
23632         * varasm.c (output_constant_pool_2): Likewise.
23633         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
23634         explicit-encoded elements in the XVEC for variable-length vectors.
23636 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23638         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
23640 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23641             Alan Hayward  <alan.hayward@arm.com>
23642             David Sherwood  <david.sherwood@arm.com>
23644         * coretypes.h (fixed_size_mode): Declare.
23645         (fixed_size_mode_pod): New typedef.
23646         * builtins.h (target_builtins::x_apply_args_mode)
23647         (target_builtins::x_apply_result_mode): Change type to
23648         fixed_size_mode_pod.
23649         * builtins.c (apply_args_size, apply_result_size, result_vector)
23650         (expand_builtin_apply_args_1, expand_builtin_apply)
23651         (expand_builtin_return): Update accordingly.
23653 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23655         * cse.c (hash_rtx_cb): Hash only the encoded elements.
23656         * cselib.c (cselib_hash_rtx): Likewise.
23657         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
23658         CONST_VECTOR encoding.
23660 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23661             Jeff Law  <law@redhat.com>
23663         PR target/83641
23664         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
23665         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
23666         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
23667         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
23669         PR target/83641
23670         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
23671         explicitly probe *sp in a noreturn function if there were any callee
23672         register saves or frame pointer is needed.
23674 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23676         PR debug/83621
23677         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
23678         BLKmode for ternary, binary or unary expressions.
23680         PR debug/83645
23681         * var-tracking.c (delete_vta_debug_insn): New inline function.
23682         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
23683         insns from get_insns () to NULL instead of each bb separately.
23684         Use delete_vta_debug_insn.  No longer static.
23685         (vt_debug_insns_local, variable_tracking_main_1): Adjust
23686         delete_vta_debug_insns callers.
23687         * rtl.h (delete_vta_debug_insns): Declare.
23688         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
23689         instead of variable_tracking_main.
23691 2018-01-03  Martin Sebor  <msebor@redhat.com>
23693         PR tree-optimization/83603
23694         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
23695         arguments past the endof the argument list in functions declared
23696         without a prototype.
23697         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
23698         Avoid checking when arguments are null.
23700 2018-01-03  Martin Sebor  <msebor@redhat.com>
23702         PR c/83559
23703         * doc/extend.texi (attribute const): Fix a typo.
23704         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
23705         issuing -Wsuggest-attribute for void functions.
23707 2018-01-03  Martin Sebor  <msebor@redhat.com>
23709         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
23710         offset_int::from instead of wide_int::to_shwi.
23711         (maybe_diag_overlap): Remove assertion.
23712         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
23713         * gimple-ssa-sprintf.c (format_directive): Same.
23714         (parse_directive): Same.
23715         (sprintf_dom_walker::compute_format_length): Same.
23716         (try_substitute_return_value): Same.
23718 2018-01-03  Jeff Law  <law@redhat.com>
23720         PR middle-end/83654
23721         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
23722         non-constant residual for zero at runtime and avoid probing in
23723         that case.  Reorganize code for trailing problem to mirror handling
23724         of the residual.
23726 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
23728         PR tree-optimization/83501
23729         * tree-ssa-strlen.c (get_string_cst): New.
23730         (handle_char_store): Call get_string_cst.
23732 2018-01-03  Martin Liska  <mliska@suse.cz>
23734         PR tree-optimization/83593
23735         * tree-ssa-strlen.c: Include tree-cfg.h.
23736         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
23737         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
23738         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
23739         to false.
23740         (strlen_dom_walker::before_dom_children): Call
23741         gimple_purge_dead_eh_edges. Dump tranformation with details
23742         dump flags.
23743         (strlen_dom_walker::before_dom_children): Update call by adding
23744         new argument cleanup_eh.
23745         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
23747 2018-01-03  Martin Liska  <mliska@suse.cz>
23749         PR ipa/83549
23750         * cif-code.def (VARIADIC_THUNK): New enum value.
23751         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
23752         thunks.
23754 2018-01-03  Jan Beulich  <jbeulich@suse.com>
23756         * sse.md (mov<mode>_internal): Tighten condition for when to use
23757         vmovdqu<ssescalarsize> for TI and OI modes.
23759 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23761         Update copyright years.
23763 2018-01-03  Martin Liska  <mliska@suse.cz>
23765         PR ipa/83594
23766         * ipa-visibility.c (function_and_variable_visibility): Skip
23767         functions with noipa attribure.
23769 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23771         * gcc.c (process_command): Update copyright notice dates.
23772         * gcov-dump.c (print_version): Ditto.
23773         * gcov.c (print_version): Ditto.
23774         * gcov-tool.c (print_version): Ditto.
23775         * gengtype.c (create_file): Ditto.
23776         * doc/cpp.texi: Bump @copying's copyright year.
23777         * doc/cppinternals.texi: Ditto.
23778         * doc/gcc.texi: Ditto.
23779         * doc/gccint.texi: Ditto.
23780         * doc/gcov.texi: Ditto.
23781         * doc/install.texi: Ditto.
23782         * doc/invoke.texi: Ditto.
23784 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23786         * vector-builder.h (vector_builder::m_full_nelts): Change from
23787         unsigned int to poly_uint64.
23788         (vector_builder::full_nelts): Update prototype accordingly.
23789         (vector_builder::new_vector): Likewise.
23790         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
23791         (vector_builder::operator ==): Likewise.
23792         (vector_builder::finalize): Likewise.
23793         * int-vector-builder.h (int_vector_builder::int_vector_builder):
23794         Take the number of elements as a poly_uint64 rather than an
23795         unsigned int.
23796         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
23797         from unsigned int to poly_uint64.
23798         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
23799         (vec_perm_indices::new_vector): Likewise.
23800         (vec_perm_indices::length): Likewise.
23801         (vec_perm_indices::nelts_per_input): Likewise.
23802         (vec_perm_indices::input_nelts): Likewise.
23803         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
23804         number of elements per input as a poly_uint64 rather than an
23805         unsigned int.  Use the original encoding for variable-length
23806         vectors, rather than clamping each individual element.
23807         For the second and subsequent elements in each pattern,
23808         clamp the step and base before clamping their sum.
23809         (vec_perm_indices::series_p): Handle polynomial element counts.
23810         (vec_perm_indices::all_in_range_p): Likewise.
23811         (vec_perm_indices_to_tree): Likewise.
23812         (vec_perm_indices_to_rtx): Likewise.
23813         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
23814         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
23815         (tree_vector_builder::new_binary_operation): Handle polynomial
23816         element counts.  Return false if we need to know the number
23817         of elements at compile time.
23818         * fold-const.c (fold_vec_perm): Punt if the number of elements
23819         isn't known at compile time.
23821 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23823         * vec-perm-indices.h (vec_perm_builder): Change element type
23824         from HOST_WIDE_INT to poly_int64.
23825         (vec_perm_indices::element_type): Update accordingly.
23826         (vec_perm_indices::clamp): Handle polynomial element_types.
23827         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23828         (vec_perm_indices::all_in_range_p): Likewise.
23829         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
23830         than shwi trees.
23831         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
23832         polynomial vec_perm_indices element types.
23833         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
23834         * fold-const.c (fold_vec_perm): Likewise.
23835         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
23836         * tree-vect-generic.c (lower_vec_perm): Likewise.
23837         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23838         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
23839         element type to HOST_WIDE_INT.
23841 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23842             Alan Hayward  <alan.hayward@arm.com>
23843             David Sherwood  <david.sherwood@arm.com>
23845         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
23846         rather than an int.  Use plus_constant.
23847         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
23848         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
23850 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23851             Alan Hayward  <alan.hayward@arm.com>
23852             David Sherwood  <david.sherwood@arm.com>
23854         * calls.c (emit_call_1, expand_call): Change struct_value_size from
23855         a HOST_WIDE_INT to a poly_int64.
23857 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23858             Alan Hayward  <alan.hayward@arm.com>
23859             David Sherwood  <david.sherwood@arm.com>
23861         * calls.c (load_register_parameters): Cope with polynomial
23862         mode sizes.  Require a constant size for BLKmode parameters
23863         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
23864         forces a parameter to be padded at the lsb end in order to
23865         fill a complete number of words, require the parameter size
23866         to be ordered wrt UNITS_PER_WORD.
23868 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23869             Alan Hayward  <alan.hayward@arm.com>
23870             David Sherwood  <david.sherwood@arm.com>
23872         * reload1.c (spill_stack_slot_width): Change element type
23873         from unsigned int to poly_uint64_pod.
23874         (alter_reg): Treat mode sizes as polynomial.
23876 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23877             Alan Hayward  <alan.hayward@arm.com>
23878             David Sherwood  <david.sherwood@arm.com>
23880         * reload.c (complex_word_subreg_p): New function.
23881         (reload_inner_reg_of_subreg, push_reload): Use it.
23883 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23884             Alan Hayward  <alan.hayward@arm.com>
23885             David Sherwood  <david.sherwood@arm.com>
23887         * lra-constraints.c (process_alt_operands): Reject matched
23888         operands whose sizes aren't ordered.
23889         (match_reload): Refer to this check here.
23891 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23892             Alan Hayward  <alan.hayward@arm.com>
23893             David Sherwood  <david.sherwood@arm.com>
23895         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
23896         that the mode size is in the set {1, 2, 4, 8, 16}.
23898 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23899             Alan Hayward  <alan.hayward@arm.com>
23900             David Sherwood  <david.sherwood@arm.com>
23902         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
23903         Use plus_constant instead of gen_rtx_PLUS.
23905 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23906             Alan Hayward  <alan.hayward@arm.com>
23907             David Sherwood  <david.sherwood@arm.com>
23909         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
23910         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
23911         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
23912         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
23913         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
23914         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
23915         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
23916         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
23917         * config/i386/i386.c (ix86_push_rounding): ...this new function.
23918         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
23919         a poly_int64.
23920         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
23921         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
23922         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
23923         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
23924         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
23925         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
23926         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
23927         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
23928         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
23929         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
23930         function.
23931         * expr.c (emit_move_resolve_push): Treat the input and result
23932         of PUSH_ROUNDING as a poly_int64.
23933         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
23934         (emit_push_insn): Likewise.
23935         * lra-eliminations.c (mark_not_eliminable): Likewise.
23936         * recog.c (push_operand): Likewise.
23937         * reload1.c (elimination_effects): Likewise.
23938         * rtlanal.c (nonzero_bits1): Likewise.
23939         * calls.c (store_one_arg): Likewise.  Require the padding to be
23940         known at compile time.
23942 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23943             Alan Hayward  <alan.hayward@arm.com>
23944             David Sherwood  <david.sherwood@arm.com>
23946         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
23947         Use plus_constant instead of gen_rtx_PLUS.
23949 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23950             Alan Hayward  <alan.hayward@arm.com>
23951             David Sherwood  <david.sherwood@arm.com>
23953         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
23954         rather than an int.
23956 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23957             Alan Hayward  <alan.hayward@arm.com>
23958             David Sherwood  <david.sherwood@arm.com>
23960         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
23961         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
23962         via stack temporaries.  Treat the mode size as polynomial too.
23964 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23965             Alan Hayward  <alan.hayward@arm.com>
23966             David Sherwood  <david.sherwood@arm.com>
23968         * expr.c (expand_expr_real_2): When handling conversions involving
23969         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
23970         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
23971         as a poly_uint64 too.
23973 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23974             Alan Hayward  <alan.hayward@arm.com>
23975             David Sherwood  <david.sherwood@arm.com>
23977         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
23979 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23980             Alan Hayward  <alan.hayward@arm.com>
23981             David Sherwood  <david.sherwood@arm.com>
23983         * combine.c (can_change_dest_mode): Handle polynomial
23984         REGMODE_NATURAL_SIZE.
23985         * expmed.c (store_bit_field_1): Likewise.
23986         * expr.c (store_constructor): Likewise.
23987         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
23988         and polynomial REGMODE_NATURAL_SIZE.
23989         (gen_lowpart_common): Likewise.
23990         * reginfo.c (record_subregs_of_mode): Likewise.
23991         * rtlanal.c (read_modify_subreg_p): Likewise.
23993 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23994             Alan Hayward  <alan.hayward@arm.com>
23995             David Sherwood  <david.sherwood@arm.com>
23997         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
23998         numbers of elements.
24000 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24001             Alan Hayward  <alan.hayward@arm.com>
24002             David Sherwood  <david.sherwood@arm.com>
24004         * match.pd: Cope with polynomial numbers of vector elements.
24006 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24007             Alan Hayward  <alan.hayward@arm.com>
24008             David Sherwood  <david.sherwood@arm.com>
24010         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24011         in a POINTER_PLUS_EXPR.
24013 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24014             Alan Hayward  <alan.hayward@arm.com>
24015             David Sherwood  <david.sherwood@arm.com>
24017         * omp-simd-clone.c (simd_clone_subparts): New function.
24018         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24019         (ipa_simd_modify_function_body): Likewise.
24021 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24022             Alan Hayward  <alan.hayward@arm.com>
24023             David Sherwood  <david.sherwood@arm.com>
24025         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24026         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24027         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24028         (expand_vector_condition, vector_element): Likewise.
24029         (subparts_gt): New function.
24030         (get_compute_type): Use subparts_gt.
24031         (count_type_subparts): Delete.
24032         (expand_vector_operations_1): Use subparts_gt instead of
24033         count_type_subparts.
24035 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24036             Alan Hayward  <alan.hayward@arm.com>
24037             David Sherwood  <david.sherwood@arm.com>
24039         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24040         (vect_compile_time_alias): ...this new function.  Do the calculation
24041         on poly_ints rather than trees.
24042         (vect_prune_runtime_alias_test_list): Update call accordingly.
24044 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24045             Alan Hayward  <alan.hayward@arm.com>
24046             David Sherwood  <david.sherwood@arm.com>
24048         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24049         numbers of units.
24050         (vect_schedule_slp_instance): Likewise.
24052 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24053             Alan Hayward  <alan.hayward@arm.com>
24054             David Sherwood  <david.sherwood@arm.com>
24056         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24057         constant and extern definitions for variable-length vectors.
24058         (vect_get_constant_vectors): Note that the number of units
24059         is known to be constant.
24061 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24062             Alan Hayward  <alan.hayward@arm.com>
24063             David Sherwood  <david.sherwood@arm.com>
24065         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24066         of units as polynomial.  Choose between WIDE and NARROW based
24067         on multiple_p.
24069 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24070             Alan Hayward  <alan.hayward@arm.com>
24071             David Sherwood  <david.sherwood@arm.com>
24073         * tree-vect-stmts.c (simd_clone_subparts): New function.
24074         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24076 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24077             Alan Hayward  <alan.hayward@arm.com>
24078             David Sherwood  <david.sherwood@arm.com>
24080         * tree-vect-stmts.c (vectorizable_call): Treat the number of
24081         vectors as polynomial.  Use build_index_vector for
24082         IFN_GOMP_SIMD_LANE.
24084 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24085             Alan Hayward  <alan.hayward@arm.com>
24086             David Sherwood  <david.sherwood@arm.com>
24088         * tree-vect-stmts.c (get_load_store_type): Treat the number of
24089         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24090         for variable-length vectors.
24091         (vectorizable_mask_load_store): Treat the number of units as
24092         polynomial, asserting that it is constant if the condition has
24093         already been enforced.
24094         (vectorizable_store, vectorizable_load): Likewise.
24096 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24097             Alan Hayward  <alan.hayward@arm.com>
24098             David Sherwood  <david.sherwood@arm.com>
24100         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24101         of units as polynomial.  Punt if we can't tell at compile time
24102         which vector contains the final result.
24104 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24105             Alan Hayward  <alan.hayward@arm.com>
24106             David Sherwood  <david.sherwood@arm.com>
24108         * tree-vect-loop.c (vectorizable_induction): Treat the number
24109         of units as polynomial.  Punt on SLP inductions.  Use an integer
24110         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
24111         cast of such a series for variable-length floating-point
24112         reductions.
24114 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24115             Alan Hayward  <alan.hayward@arm.com>
24116             David Sherwood  <david.sherwood@arm.com>
24118         * tree.h (build_index_vector): Declare.
24119         * tree.c (build_index_vector): New function.
24120         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24121         of units as polynomial, forcibly converting it to a constant if
24122         vectorizable_reduction has already enforced the condition.
24123         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
24124         to create a {1,2,3,...} vector.
24125         (vectorizable_reduction): Treat the number of units as polynomial.
24126         Choose vectype_in based on the largest scalar element size rather
24127         than the smallest number of units.  Enforce the restrictions
24128         relied on above.
24130 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24131             Alan Hayward  <alan.hayward@arm.com>
24132             David Sherwood  <david.sherwood@arm.com>
24134         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24135         number of units as polynomial.
24137 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24138             Alan Hayward  <alan.hayward@arm.com>
24139             David Sherwood  <david.sherwood@arm.com>
24141         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24142         * target.def (autovectorize_vector_sizes): Return the vector sizes
24143         by pointer, using vector_sizes rather than a bitmask.
24144         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24145         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24146         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24147         Likewise.
24148         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24149         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24150         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24151         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24152         * omp-general.c (omp_max_vf): Likewise.
24153         * omp-low.c (omp_clause_aligned_alignment): Likewise.
24154         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24155         * tree-vect-loop.c (vect_analyze_loop): Likewise.
24156         * tree-vect-slp.c (vect_slp_bb): Likewise.
24157         * doc/tm.texi: Regenerate.
24158         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24159         to a poly_uint64.
24160         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24161         the vector size as a poly_uint64 rather than an unsigned int.
24162         (current_vector_size): Change from an unsigned int to a poly_uint64.
24163         (get_vectype_for_scalar_type): Update accordingly.
24164         * tree.h (build_truth_vector_type): Take the size and number of
24165         units as a poly_uint64 rather than an unsigned int.
24166         (build_vector_type): Add a temporary overload that takes
24167         the number of units as a poly_uint64 rather than an unsigned int.
24168         * tree.c (make_vector_type): Likewise.
24169         (build_truth_vector_type): Take the number of units as a poly_uint64
24170         rather than an unsigned int.
24172 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24173             Alan Hayward  <alan.hayward@arm.com>
24174             David Sherwood  <david.sherwood@arm.com>
24176         * target.def (get_mask_mode): Take the number of units and length
24177         as poly_uint64s rather than unsigned ints.
24178         * targhooks.h (default_get_mask_mode): Update accordingly.
24179         * targhooks.c (default_get_mask_mode): Likewise.
24180         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24181         * doc/tm.texi: Regenerate.
24183 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24184             Alan Hayward  <alan.hayward@arm.com>
24185             David Sherwood  <david.sherwood@arm.com>
24187         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24188         * omp-general.c (omp_max_vf): Likewise.
24189         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24190         (expand_omp_simd): Handle polynomial safelen.
24191         * omp-low.c (omplow_simd_context): Add a default constructor.
24192         (omplow_simd_context::max_vf): Change from int to poly_uint64.
24193         (lower_rec_simd_input_clauses): Update accordingly.
24194         (lower_rec_input_clauses): Likewise.
24196 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24197             Alan Hayward  <alan.hayward@arm.com>
24198             David Sherwood  <david.sherwood@arm.com>
24200         * tree-vectorizer.h (vect_nunits_for_cost): New function.
24201         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24202         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24203         (vect_analyze_slp_cost): Likewise.
24204         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24205         (vect_model_load_cost): Likewise.
24207 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24208             Alan Hayward  <alan.hayward@arm.com>
24209             David Sherwood  <david.sherwood@arm.com>
24211         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24212         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24213         from an unsigned int * to a poly_uint64_pod *.
24214         (calculate_unrolling_factor): New function.
24215         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
24217 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24218             Alan Hayward  <alan.hayward@arm.com>
24219             David Sherwood  <david.sherwood@arm.com>
24221         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24222         from an unsigned int to a poly_uint64.
24223         (_loop_vec_info::slp_unrolling_factor): Likewise.
24224         (_loop_vec_info::vectorization_factor): Change from an int
24225         to a poly_uint64.
24226         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24227         (vect_get_num_vectors): New function.
24228         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24229         (vect_get_num_copies): Use vect_get_num_vectors.
24230         (vect_analyze_data_ref_dependences): Change max_vf from an int *
24231         to an unsigned int *.
24232         (vect_analyze_data_refs): Change min_vf from an int * to a
24233         poly_uint64 *.
24234         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24235         than an unsigned HOST_WIDE_INT.
24236         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24237         (vect_analyze_data_ref_dependence): Change max_vf from an int *
24238         to an unsigned int *.
24239         (vect_analyze_data_ref_dependences): Likewise.
24240         (vect_compute_data_ref_alignment): Handle polynomial vf.
24241         (vect_enhance_data_refs_alignment): Likewise.
24242         (vect_prune_runtime_alias_test_list): Likewise.
24243         (vect_shift_permute_load_chain): Likewise.
24244         (vect_supportable_dr_alignment): Likewise.
24245         (dependence_distance_ge_vf): Take the vectorization factor as a
24246         poly_uint64 rather than an unsigned HOST_WIDE_INT.
24247         (vect_analyze_data_refs): Change min_vf from an int * to a
24248         poly_uint64 *.
24249         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24250         vfm1 as a poly_uint64 rather than an int.  Make the same change
24251         for the returned bound_scalar.
24252         (vect_gen_vector_loop_niters): Handle polynomial vf.
24253         (vect_do_peeling): Likewise.  Update call to
24254         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24255         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24256         be constant.
24257         * tree-vect-loop.c (vect_determine_vectorization_factor)
24258         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24259         (vect_get_known_peeling_cost): Likewise.
24260         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24261         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24262         (vect_transform_loop): Likewise.  Use the lowest possible VF when
24263         updating the upper bounds of the loop.
24264         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
24265         rather than an int.
24266         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24267         polynomial unroll factors.
24268         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24269         (vect_make_slp_decision): Likewise.
24270         (vect_supported_load_permutation_p): Likewise, and polynomial
24271         vf too.
24272         (vect_analyze_slp_cost): Handle polynomial vf.
24273         (vect_slp_analyze_node_operations): Likewise.
24274         (vect_slp_analyze_bb_1): Likewise.
24275         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24276         than an unsigned HOST_WIDE_INT.
24277         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24278         (vectorizable_load): Handle polynomial vf.
24279         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24280         a poly_uint64.
24281         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24283 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24284             Alan Hayward  <alan.hayward@arm.com>
24285             David Sherwood  <david.sherwood@arm.com>
24287         * match.pd: Handle bit operations involving three constants
24288         and try to fold one pair.
24290 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24292         * tree-vect-loop-manip.c: Include gimple-fold.h.
24293         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24294         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
24295         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24296         Add a path that uses a step of VF instead of 1, but disable it
24297         for now.
24298         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24299         and niters_no_overflow parameters.  Update calls to
24300         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24301         Create a new SSA name if the latter choses to use a ste other
24302         than zero, and return it via niters_vector_mult_vf_var.
24303         * tree-vect-loop.c (vect_transform_loop): Update calls to
24304         vect_do_peeling, vect_gen_vector_loop_niters and
24305         slpeel_make_loop_iterate_ntimes.
24306         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24307         (vect_gen_vector_loop_niters): Update declarations after above changes.
24309 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
24311         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24312         128-bit round to integer instructions.
24313         (ceil<mode>2): Likewise.
24314         (btrunc<mode>2): Likewise.
24315         (round<mode>2): Likewise.
24317 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24319         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24320         unaligned VSX load/store on P8/P9.
24321         (expand_block_clear): Allow the use of unaligned VSX
24322         load/store on P8/P9.
24324 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24326         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24327         New function.
24328         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24329         swap associated with both a load and a store.
24331 2018-01-02  Andrew Waterman  <andrew@sifive.com>
24333         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24334         * config/riscv/riscv.md (clear_cache): Use it.
24336 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
24338         * web.c: Remove out-of-date comment.
24340 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24342         * expr.c (fixup_args_size_notes): Check that any existing
24343         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24344         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24345         (emit_single_push_insn): ...here.
24347 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24349         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24350         (const_vector_encoded_nelts): New function.
24351         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24352         (const_vector_int_elt, const_vector_elt): Declare.
24353         * emit-rtl.c (const_vector_int_elt_1): New function.
24354         (const_vector_elt): Likewise.
24355         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24356         of CONST_VECTOR_ELT.
24358 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24360         * expr.c: Include rtx-vector-builder.h.
24361         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24362         directly on the tree encoding.
24363         (const_vector_from_tree): Likewise.
24364         * optabs.c: Include rtx-vector-builder.h.
24365         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24366         sequence of "u" values.
24367         * vec-perm-indices.c: Include rtx-vector-builder.h.
24368         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24369         directly on the vec_perm_indices encoding.
24371 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24373         * doc/rtl.texi (const_vector): Describe new encoding scheme.
24374         * Makefile.in (OBJS): Add rtx-vector-builder.o.
24375         * rtx-vector-builder.h: New file.
24376         * rtx-vector-builder.c: Likewise.
24377         * rtl.h (rtx_def::u2): Add a const_vector field.
24378         (CONST_VECTOR_NPATTERNS): New macro.
24379         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24380         (CONST_VECTOR_DUPLICATE_P): Likewise.
24381         (CONST_VECTOR_STEPPED_P): Likewise.
24382         (CONST_VECTOR_ENCODED_ELT): Likewise.
24383         (const_vec_duplicate_p): Check for a duplicated vector encoding.
24384         (unwrap_const_vec_duplicate): Likewise.
24385         (const_vec_series_p): Check for a non-duplicated vector encoding.
24386         Say that the function only returns true for integer vectors.
24387         * emit-rtl.c: Include rtx-vector-builder.h.
24388         (gen_const_vec_duplicate_1): Delete.
24389         (gen_const_vector): Call gen_const_vec_duplicate instead of
24390         gen_const_vec_duplicate_1.
24391         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
24392         (gen_const_vec_duplicate): Use rtx_vector_builder.
24393         (gen_const_vec_series): Likewise.
24394         (gen_rtx_CONST_VECTOR): Likewise.
24395         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
24396         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24397         Build a new vector rather than modifying a CONST_VECTOR in-place.
24398         (handle_special_swappables): Update call accordingly.
24399         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
24400         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24401         Build a new vector rather than modifying a CONST_VECTOR in-place.
24402         (handle_special_swappables): Update call accordingly.
24404 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24406         * simplify-rtx.c (simplify_const_binary_operation): Use
24407         CONST_VECTOR_ELT instead of XVECEXP.
24409 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24411         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
24412         the selector elements to be different from the data elements
24413         if the selector is a VECTOR_CST.
24414         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
24415         ssizetype for the selector.
24417 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24419         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
24420         before testing each element individually.
24421         * tree-vect-generic.c (lower_vec_perm): Likewise.
24423 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24425         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
24426         * selftest-run-tests.c (selftest::run_tests): Call it.
24427         * vector-builder.h (vector_builder::operator ==): New function.
24428         (vector_builder::operator !=): Likewise.
24429         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
24430         (vec_perm_indices::all_from_input_p): New function.
24431         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24432         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
24433         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
24434         instead of reading the VECTOR_CST directly.  Detect whether both
24435         vector inputs are the same before constructing the vec_perm_indices,
24436         and update the number of inputs argument accordingly.  Use the
24437         utility functions added above.  Only construct sel2 if we need to.
24439 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24441         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
24442         the broadcast of the low byte.
24443         (expand_mult_highpart): Use an explicit encoding for the permutes.
24444         * optabs-query.c (can_mult_highpart_p): Likewise.
24445         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24446         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24447         (vectorizable_bswap): Likewise.
24448         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
24449         explicit encoding for the power-of-2 permutes.
24450         (vect_permute_store_chain): Likewise.
24451         (vect_grouped_load_supported): Likewise.
24452         (vect_permute_load_chain): Likewise.
24454 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24456         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
24457         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
24458         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
24459         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24460         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
24461         (vect_gen_perm_mask_any): Likewise.
24463 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24465         * int-vector-builder.h: New file.
24466         * vec-perm-indices.h: Include int-vector-builder.h.
24467         (vec_perm_indices): Redefine as an int_vector_builder.
24468         (auto_vec_perm_indices): Delete.
24469         (vec_perm_builder): Redefine as a stand-alone class.
24470         (vec_perm_indices::vec_perm_indices): New function.
24471         (vec_perm_indices::clamp): Likewise.
24472         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
24473         (vec_perm_indices::new_vector): New function.
24474         (vec_perm_indices::new_expanded_vector): Update for new
24475         vec_perm_indices class.
24476         (vec_perm_indices::rotate_inputs): New function.
24477         (vec_perm_indices::all_in_range_p): Operate directly on the
24478         encoded form, without computing elided elements.
24479         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
24480         encoding.  Update for new vec_perm_indices class.
24481         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
24482         the given vec_perm_builder.
24483         (expand_vec_perm_var): Update vec_perm_builder constructor.
24484         (expand_mult_highpart): Use vec_perm_builder instead of
24485         auto_vec_perm_indices.
24486         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
24487         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
24488         or double series encoding as appropriate.
24489         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
24490         vec_perm_indices instead of auto_vec_perm_indices.
24491         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24492         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24493         (vect_permute_store_chain): Likewise.
24494         (vect_grouped_load_supported): Likewise.
24495         (vect_permute_load_chain): Likewise.
24496         (vect_shift_permute_load_chain): Likewise.
24497         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24498         (vect_transform_slp_perm_load): Likewise.
24499         (vect_schedule_slp_instance): Likewise.
24500         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24501         (vectorizable_mask_load_store): Likewise.
24502         (vectorizable_bswap): Likewise.
24503         (vectorizable_store): Likewise.
24504         (vectorizable_load): Likewise.
24505         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
24506         vec_perm_indices instead of auto_vec_perm_indices.  Use
24507         tree_to_vec_perm_builder to read the vector from a tree.
24508         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
24509         vec_perm_builder instead of a vec_perm_indices.
24510         (have_whole_vector_shift): Use vec_perm_builder and
24511         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
24512         truncation to calc_vec_perm_mask_for_shift.
24513         (vect_create_epilog_for_reduction): Likewise.
24514         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
24515         from auto_vec_perm_indices to vec_perm_indices.
24516         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24517         instead of changing individual elements.
24518         (aarch64_vectorize_vec_perm_const): Use new_vector to install
24519         the vector in d.perm.
24520         * config/arm/arm.c (expand_vec_perm_d::perm): Change
24521         from auto_vec_perm_indices to vec_perm_indices.
24522         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24523         instead of changing individual elements.
24524         (arm_vectorize_vec_perm_const): Use new_vector to install
24525         the vector in d.perm.
24526         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
24527         Update vec_perm_builder constructor.
24528         (rs6000_expand_interleave): Likewise.
24529         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
24530         (rs6000_expand_interleave): Likewise.
24532 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24534         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
24535         to qimode could truncate the indices.
24536         * optabs.c (expand_vec_perm_var): Likewise.
24538 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24540         * Makefile.in (OBJS): Add vec-perm-indices.o.
24541         * vec-perm-indices.h: New file.
24542         * vec-perm-indices.c: Likewise.
24543         * target.h (vec_perm_indices): Replace with a forward class
24544         declaration.
24545         (auto_vec_perm_indices): Move to vec-perm-indices.h.
24546         * optabs.h: Include vec-perm-indices.h.
24547         (expand_vec_perm): Delete.
24548         (selector_fits_mode_p, expand_vec_perm_var): Declare.
24549         (expand_vec_perm_const): Declare.
24550         * target.def (vec_perm_const_ok): Replace with...
24551         (vec_perm_const): ...this new hook.
24552         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
24553         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
24554         * doc/tm.texi: Regenerate.
24555         * optabs.def (vec_perm_const): Delete.
24556         * doc/md.texi (vec_perm_const): Likewise.
24557         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
24558         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
24559         expand_vec_perm for constant permutation vectors.  Assert that
24560         the mode of variable permutation vectors is the integer equivalent
24561         of the mode that is being permuted.
24562         * optabs-query.h (selector_fits_mode_p): Declare.
24563         * optabs-query.c: Include vec-perm-indices.h.
24564         (selector_fits_mode_p): New function.
24565         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
24566         is defined, instead of checking whether the vec_perm_const_optab
24567         exists.  Use targetm.vectorize.vec_perm_const instead of
24568         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
24569         fit in the vector mode before using a variable permute.
24570         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
24571         vec_perm_indices instead of an rtx.
24572         (expand_vec_perm): Replace with...
24573         (expand_vec_perm_const): ...this new function.  Take the selector
24574         as a vec_perm_indices rather than an rtx.  Also take the mode of
24575         the selector.  Update call to shift_amt_for_vec_perm_mask.
24576         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
24577         Use vec_perm_indices::new_expanded_vector to expand the original
24578         selector into bytes.  Check whether the indices fit in the vector
24579         mode before using a variable permute.
24580         (expand_vec_perm_var): Make global.
24581         (expand_mult_highpart): Use expand_vec_perm_const.
24582         * fold-const.c: Includes vec-perm-indices.h.
24583         * tree-ssa-forwprop.c: Likewise.
24584         * tree-vect-data-refs.c: Likewise.
24585         * tree-vect-generic.c: Likewise.
24586         * tree-vect-loop.c: Likewise.
24587         * tree-vect-slp.c: Likewise.
24588         * tree-vect-stmts.c: Likewise.
24589         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
24590         Delete.
24591         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
24592         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
24593         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
24594         (aarch64_vectorize_vec_perm_const): ...this new function.
24595         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24596         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24597         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
24598         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
24599         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24600         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24601         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
24602         into...
24603         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
24604         check for NEON modes.
24605         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
24606         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
24607         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
24608         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
24609         into...
24610         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
24611         the old VEC_PERM_CONST conditions.
24612         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
24613         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
24614         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
24615         (ia64_vectorize_vec_perm_const_ok): Merge into...
24616         (ia64_vectorize_vec_perm_const): ...this new function.
24617         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
24618         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
24619         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
24620         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
24621         * config/mips/mips.c (mips_expand_vec_perm_const)
24622         (mips_vectorize_vec_perm_const_ok): Merge into...
24623         (mips_vectorize_vec_perm_const): ...this new function.
24624         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
24625         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
24626         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
24627         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
24628         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
24629         (rs6000_expand_vec_perm_const): Delete.
24630         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
24631         Delete.
24632         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24633         (altivec_expand_vec_perm_const_le): Take each operand individually.
24634         Operate on constant selectors rather than rtxes.
24635         (altivec_expand_vec_perm_const): Likewise.  Update call to
24636         altivec_expand_vec_perm_const_le.
24637         (rs6000_expand_vec_perm_const): Delete.
24638         (rs6000_vectorize_vec_perm_const_ok): Delete.
24639         (rs6000_vectorize_vec_perm_const): New function.
24640         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24641         an element count and rtx array.
24642         (rs6000_expand_extract_even): Update call accordingly.
24643         (rs6000_expand_interleave): Likewise.
24644         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
24645         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
24646         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
24647         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
24648         (rs6000_expand_vec_perm_const): Delete.
24649         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24650         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24651         (altivec_expand_vec_perm_const_le): Take each operand individually.
24652         Operate on constant selectors rather than rtxes.
24653         (altivec_expand_vec_perm_const): Likewise.  Update call to
24654         altivec_expand_vec_perm_const_le.
24655         (rs6000_expand_vec_perm_const): Delete.
24656         (rs6000_vectorize_vec_perm_const_ok): Delete.
24657         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
24658         reference to the SPE evmerge intructions.
24659         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24660         an element count and rtx array.
24661         (rs6000_expand_extract_even): Update call accordingly.
24662         (rs6000_expand_interleave): Likewise.
24663         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
24664         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
24665         new function.
24666         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24668 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24670         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
24671         vector mode and that that mode matches the mode of the data
24672         being permuted.
24673         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
24674         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
24675         directly using expand_vec_perm_1 when forcing selectors into
24676         registers.
24677         (expand_vec_perm_var): New function, split out from expand_vec_perm.
24679 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24681         * optabs-query.h (can_vec_perm_p): Delete.
24682         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
24683         * optabs-query.c (can_vec_perm_p): Split into...
24684         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
24685         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
24686         particular selector is valid.
24687         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24688         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24689         (vect_grouped_load_supported): Likewise.
24690         (vect_shift_permute_load_chain): Likewise.
24691         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24692         (vect_transform_slp_perm_load): Likewise.
24693         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24694         (vectorizable_bswap): Likewise.
24695         (vect_gen_perm_mask_checked): Likewise.
24696         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
24697         implementations of variable permutation vectors into account
24698         when deciding which selector to use.
24699         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
24700         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
24701         with a false third argument.
24702         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
24703         to test whether the constant selector is valid and can_vec_perm_var_p
24704         to test whether a variable selector is valid.
24706 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24708         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
24709         * optabs-query.c (can_vec_perm_p): Likewise.
24710         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
24711         instead of vec_perm_indices.
24712         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
24713         (vect_gen_perm_mask_checked): Likewise,
24714         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
24715         (vect_gen_perm_mask_checked): Likewise,
24717 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24719         * optabs-query.h (qimode_for_vec_perm): Declare.
24720         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
24721         (qimode_for_vec_perm): ...this new function.
24722         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
24724 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24726         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
24727         does not have a conditional at the top.
24729 2018-01-02  Richard Biener  <rguenther@suse.de>
24731         * ipa-inline.c (big_speedup_p): Fix expression.
24733 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
24735         PR target/81616
24736         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
24737         for generic 4->6.
24739 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
24741         PR target/81616
24742         Generic tuning.
24743         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
24744         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
24745         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
24746         cond_taken_branch_cost 3->4.
24748 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
24750         PR tree-optimization/83581
24751         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
24752         TODO_cleanup_cfg if any changes have been made.
24754         PR middle-end/83608
24755         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
24756         convert_modes if target mode has the right side, but different mode
24757         class.
24759         PR middle-end/83609
24760         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
24761         last argument when extracting from CONCAT.  If either from_real or
24762         from_imag is NULL, use expansion through memory.  If result is not
24763         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
24764         the parts directly to inner mode, if even that fails, use expansion
24765         through memory.
24767         PR middle-end/83623
24768         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
24769         check for bswap in mode rather than HImode and use that in expand_unop
24770         too.
24772 Copyright (C) 2018 Free Software Foundation, Inc.
24774 Copying and distribution of this file, with or without modification,
24775 are permitted in any medium without royalty provided the copyright
24776 notice and this notice are preserved.