Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / ChangeLog
blobb97a8a2461b6a316ba80abac9e99d64463d4b7a3
1 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
3         PR tree-optimization/87562
4         * input.c (get_substring_ranges_for_loc): Use
5         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
6         getting the linemap for the endpoint.  Verify that it's either
7         in the same linemap as the start point's spelling location, or
8         at least in the same file.
10 2018-10-18  Richard Biener  <rguenther@suse.de>
12         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
13         feed width-specific load/store costs through ix86_vec_cost.
14         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
15         (k8_cost): Likewise.
16         (bdver_cost): Likewise.
17         (znver1_cost): Likewise.
18         (btver1_cost): Likewise.
19         (btver2_cost): Likewise.
21 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
23         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
24         to simplify subreg of vec_merge.
26 2018-10-18  Richard Biener  <rguenther@suse.de>
28         * config/i386/i386.c: Fix costing of vector FMA.
30 2018-10-18  Richard Biener  <rguenther@suse.de>
32         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
33         and argument.
34         (ix86_builtin_vectorization_cost): For vec_construct properly
35         cost insertion into SSE regs.
36         (...): Adjust calls to ix86_vec_cost.
38 2018-10-18  Richard Biener  <rguenther@suse.de>
40         PR middle-end/87087
41         Revert
42         2018-02-07  Richard Biener  <rguenther@suse.de>
44         PR tree-optimization/84204
45         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
46         this place.
48 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
50         PR target/87537
51         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
52         of vec_duplicate.
53         (test_vector_ops_duplicate): Add test for a scalar subreg of a
54         VEC_MERGE of a VEC_DUPLICATE.
56 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
58         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
59         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
60         * doc/standards.texi (C Language): Document C2X.
61         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
62         (rl78_option_override): Handle "GNU C2X" language name.
64 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
66         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
67         Document C17 as published in 2018.
69 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
71         PR middle-end/87623
72         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
73         bail out if both sides do not have the same storage order.
75 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
77         * bitmap.c (bitmap_head::dump): New.
78         * bitmap.h (bitmap_head): Add dump().
79         * gimple-ssa-evrp-analyze.c
80         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
81         (evrp_range_analyzer::set_ssa_range_info): Same.
82         (evrp_range_analyzer::record_ranges_from_phis): Same.
83         (evrp_range_analyzer::record_ranges_from_stmt): Same.
84         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
85         * gimple-ssa-sprintf.c (get_int_range): Same.
86         (format_integer): Same.
87         (sprintf_dom_walker::handle_gimple_call): Same.
88         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
89         (ipcp_vr_lattice::top_p): Same.
90         (ipcp_vr_lattice::bottom_p): Same.
91         (ipcp_vr_lattice::set_to_bottom): Same.
92         (ipa_vr_operation_and_type_effects): Same.
93         (propagate_vr_across_jump_function): Same.
94         (ipcp_store_vr_results): Same.
95         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
96         (ipa_print_node_jump_functions_for_edge): Same.
97         (ipa_get_value_range): Same.
98         (ipa_compute_jump_functions_for_edge): Same.
99         (ipa_write_jump_function): Same.
100         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
101         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
102         Same.
103         * vr-values.c (set_value_range_to_nonnegative): Same.
104         (set_value_range_to_truthvalue): Same.
105         (vr_values::get_value_range): Same.
106         (vr_values::set_defs_to_varying): Same.
107         (vr_values::update_value_range): Same.
108         (symbolic_range_based_on_p): Same.
109         (vr_values::op_with_boolean_value_range_p): Same.
110         (vr_values::extract_range_for_var_from_comparison_expr): Same.
111         (vr_values::extract_range_from_ssa_name): Same.
112         (vr_values::extract_range_from_binary_expr): Same.
113         (vr_values::extract_range_from_unary_expr): Same.
114         (vr_values::extract_range_from_cond_expr): Same.
115         (vr_values::extract_range_from_comparison): Same.
116         (vr_values::check_for_binary_op_overflow): Same.
117         (vr_values::extract_range_basic): Same.
118         (vr_values::extract_range_from_assignment): Same.
119         (compare_ranges): Same.
120         (compare_range_with_value): Same.
121         (vr_values::adjust_range_with_scev): Same.
122         (vrp_valueize): Same.
123         (vrp_valueize_1): Same.
124         (vr_values::get_vr_for_comparison): Same.
125         (vr_values::compare_name_with_value): Same.
126         (vr_values::compare_names): Same.
127         (vr_values::vrp_evaluate_conditional): Same.
128         (find_case_label_ranges): Same.
129         (vr_values::vrp_visit_switch_stmt): Same.
130         (vr_values::extract_range_from_phi_node): Same.
131         (vr_values::simplify_div_or_mod_using_ranges): Same.
132         (vr_values::simplify_bit_ops_using_ranges): Same.
133         (test_for_singularity): Same.
134         (range_fits_type_p): Same.
135         (vr_values::simplify_cond_using_ranges_1): Same.
136         (vr_values::simplify_switch_using_ranges): Same.
137         (vr_values::simplify_float_conversion_using_ranges): Same.
138         (vr_values::two_valued_val_range_p): Same.
139         (vr_values::add_equivalence): Move to value_range::equiv_add.
140         * vr-values.h (vr_values::add_equivalence): Remove.
141         (VR_INITIALIZER): Remove.
142         * tree-vrp.c (value_range::set): New.
143         (value_range::equiv_add): New.
144         (value_range::value_range): New.
145         (value_range::deep_copy): New.
146         (value_range::check): New.
147         (value_range::equal_p): New.
148         (value_range::ignore_equivs_equal_p): New.
149         (value_range::operator==): New.
150         (value_range::operator!=): New.
151         (value_range::symbolic_p): New.
152         (value_range::numeric_p): New.
153         (value_range::set_undefined): New.
154         (value_range::set_varying): New.
155         (value_range::may_contain_p): New.
156         (value_range::equiv_clear): New.
157         (value_range::singleton_p): New.
158         (value_range::intersect): New.
159         (value_range::dump): New.
160         (value_range::set_and_canonicalize): New.
161         (set_value_range): Adjust for value_range API.
162         (set_value_range_to_undefined): Same.
163         (set_value_range_to_varying): Same.
164         (set_and_canonicalize_value_range): Same.
165         (set_value_range_to_nonnull): Same.
166         (set_value_range_to_null): Same.
167         (range_is_null): Same.
168         (range_is_nonnull): Same.
169         (range_int_cst_p): Same.
170         (range_int_cst_singleton_p): Same.
171         (symbolic_range_p): Same.
172         (range_includes_zero_p): Same.
173         (value_range_constant_singleton): Same.
174         (vrp_set_zero_nonzero_bits): Same.
175         (ranges_from_anti_range): Same.
176         (extract_range_into_wide_ints): Same.
177         (extract_range_from_multiplicative_op): Same.
178         (set_value_range_with_overflow): Same.
179         (extract_range_from_binary_expr_1): Same.
180         (extract_range_from_unary_expr): Same.
181         (dump_value_range): Same.
182         (debug_value_range): Same.
183         (vrp_prop::check_array_ref): Same.
184         (vrp_prop::check_mem_ref): Same.
185         (vrp_prop::vrp_initialize): Same.
186         (vrp_prop::visit_stmt): Same.
187         (intersect_ranges): Same.
188         (vrp_prop::visit_phi): Same.
189         (vrp_prop::vrp_finalize): Same.
190         (determine_value_range_1): Same.
191         (determine_value_range): Same.
192         (vrp_intersect_ranges_1): Rename to...
193         (vrp_intersect_1): this.
194         (vrp_intersect_ranges): Rename to...
195         (value_range::intersect_helper): ...this.
196         (vrp_meet_1): Rename to...
197         (value_range::union_helper): ...this.
198         (vrp_meet): Rename to...
199         (value_range::union_): ...this.
200         (copy_value_range): Remove.
201         * tree-vrp.h (struct value_range): Rewrite into a proper class.
202         (value_range::vrtype): New.
203         (value_range::type): New.
204         (value_range::equiv): New.
205         (value_range::min): New.
206         (value_range::max): New.
207         (value_range::varying_p): New.
208         (value_range::undefined_p): New.
209         (value_range::null_p): New.
210         (value_range::equiv_add): New.
211         (copy_value_range): Remove.
213 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
215         * Makefile.in (SELFTEST_TARGETS): New.
216         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
217         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
218         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
219         c/Make-lang.in.
220         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
221         (selftest-c++-gdb, selftest-c++-valgrind): Move to
222         cp/Make-lang.in.
223         * configure: Regenerate.
224         * configure.ac (selftest_languages): New.
226 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
228         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
229         overflow wraps argument.
230         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
231         wide_int_range_multiplicative_op.
232         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
233         overflow wraps argument.
234         (wide_int_range_multiplicative_op): Same.
235         (wide_int_range_lshift): Same.
236         (wide_int_range_div): Same.
237         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
238         (wide_int_range_lshift): Same.
239         (wide_int_range_div): Same.
241 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
243         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
244         use sign as argument.
245         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
246         wide_int_range_shift_undefined_p.
248 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
250         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
251         Rename to...
252         (@despeculate_copy<ALLI_TI:mode>): ... This.
253         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
254         switch statement.
256 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
258         * config.gcc: Obsolete *-*-solaris2.10*.
259         * doc/install.texi (Specific, *-*-solaris2*): Document it.
261 2018-10-12  Jeff Law  <law@redhat.com>
263         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
264         reg + sym +- const_int addressing modes.
266 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
268         * common.opt (fdiagnostics-minimum-margin-width=): New option.
269         * diagnostic-show-locus.c (layout::layout): Apply the minimum
270         margin width.
271         (layout::start_annotation_line): Only print up to 3 of the
272         margin character, to avoid touching the left-hand side.
273         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
274         minimum margin width, as set by test_diagnostic_context's ctor.
275         (selftest::test_fixit_insert_containing_newline): Likewise.
276         (selftest::test_fixit_insert_containing_newline_2): Likewise.
277         (selftest::test_line_numbers_multiline_range): Clear
278         dc.min_margin_width.
279         * diagnostic.c (diagnostic_initialize): Initialize
280         min_margin_width.
281         * diagnostic.h (struct diagnostic_context): Add field
282         "min_margin_width".
283         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
284         * opts.c (common_handle_option): Handle
285         OPT_fdiagnostics_minimum_margin_width_.
286         * selftest-diagnostic.c
287         (selftest::test_diagnostic_context::test_diagnostic_context):
288         Initialize min_margin_width to 6.
289         * toplev.c (general_init): Initialize global_dc->min_margin_width.
291 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
293         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
294         Fix usage of "error_at_rich_loc" in the comment.
296 2018-10-15  Renlin Li  <renlin.li@arm.com>
298         PR target/87563
299         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
300         if-conversioned loop when it contains ifn with types not
301         supported by backend.
302         * internal-fn.c (expand_direct_optab_fn): Add an assert.
303         (direct_internal_fn_supported_p): New helper function.
304         * internal-fn.h (direct_internal_fn_supported_p): Declare.
306 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
308         PR target/87572
309         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
310         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
311         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
313 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
315         PR tree-optimization/87022
316         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
317         bits in dist vector rather than the first one.
319 2018-10-15  Richard Biener  <rguenther@suse.de>
321         PR middle-end/87610
322         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
323         (visit_loadstore): When a used restrict tag escaped verify that
324         the points-to solution of "other" pointers do not include
325         escaped.
326         (compute_dependence_clique): If a used restrict tag escaped
327         communicated that down to visit_loadstore.
329 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
331         * config/s390/s390.c (s390_expand_vec_init): Force vector element
332         into reg if it isn't a general operand.
334 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
336         PR target/87599
337         * config/i386/sse.md (*vec_dupv2di): Add register source to
338         movddup.
340 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
342         PR target/87572
343         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
344         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
345         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
346         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
348 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
350         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
351         (notice_args_size): Set it in the current trace if no insn that can
352         throw internally has been seen yet.
353         (connect_traces): When connecting args_size between traces, allow the
354         incoming values not to match if there is an insn setting it before the
355         first insn that can throw internally; in that case, force the creation
356         of a CFI note on this latter insn.
358 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
360         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
361         the base class, because using the injected-class-name was not clearly
362         specified until DR 176.
364 2018-10-12  Paul Koning  <ni1d@arrl.net>
366         * config/pdp11/pdp11.md (doloop_end): New expander.
367         (doloop_end_insn): renamed from "doloop_end".
368         (addqi3): New pattern.
369         (subqi3): New pattern.
370         * config/pdp11/predicates.md (incdec_operand): New predicate.
372 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
374         PR middle-end/81376
375         * real.c (format_helper::can_represent_integral_type_p): New function
376         * real.h (format_helper::can_represent_integral_type_p): Ditto.
377         * match.pd: New pattern.
379 2018-10-12  Alexandre Oliva <oliva@adacore.com>
381         * configure.ac: Introduce --enable-large-address-aware
382         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
383         * doc/install.texi: Document it.
384         * configure, config.in: Rebuilt.
385         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
386         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
387         (LINK_SPEC): Insert it.
388         * config/i386/mingw-264.h: Likewise.
390         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
392 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
394         PR rtl-optimization/87600
395         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
397 2018-10-12  Paul Koning  <ni1d@arrl.net>
399         * doc/md.texi (doloop_end): Document that the pattern code may
400         need to check operand mode.
402 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
404         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
405         to zero-extend between int and floating-point registers.
406         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
407         ldp into floating-point registers.  Add type and arch attributes.
408         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
409         Use f_loads for type attribute.
411 2018-10-11  Martin Sebor  <msebor@redhat.com>
413         * doc/extend.texi (attribute packed): Correct typos.
415 2018-10-11  Martin Sebor  <msebor@redhat.com>
417         * doc/extend.texi (attribute flatten): Mention interaction with
418         noinline.
420 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
422         PR target/87156
423         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
424         Set new_decl virtual flag to zero.
426 2018-10-11  Martin Sebor  <msebor@redhat.com>
428         PR middle-end/87593
429         * doc/extend.texi (attribute format_arg): Discuss using multiple
430         attributes on a single function.
432 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
434         PR tree-optimization/86829
435         * match.pd (sin (atan (x))): New simplification rules.
436         (cos (atan (x))): Likewise.
437         * real.c (build_sinatan_real): New function.
438         * real.h (build_sinatan_real): Prototype.
440 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
442         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
443         function.
444         (fold_mergeeo_helper): New helper function.
445         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
446         intrinsics.  Correct some whitespace indentation issues.
448 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
450         PR target/87511
451         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
452         Use HOST_WIDE_INT_1U for shift.
454 2018-10-11  Doug Rupp  <rupp@adacore.com>
455             Olivier Hainque  <hainque@adacore.com>
457         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
458         Pass --relax to the linker for RTPs.
459         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
461 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
462             Jan Hubicka  <jh@suse.cz>
463             Martin Jambor  <mjambor@suse.cz>
465         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
466         the same elements are repeated rather than printing all of them.
467         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
468         "repeated" elements.
469         * read-rtl-function.c (test_loading_repeat): New function.
470         (read_rtl_function_c_tests): Call test_loading_repeat.
471         * rtl-tests.c (test_dumping_repeat): New function.
472         (rtl_tests_c_tests): Call test_dumping_repeat.
474 2018-10-11  Richard Biener  <rguenther@suse.de>
476         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
477         bdver?_cost): Unify to ...
478         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
479         * config/i386/i386.c (processor_cost_table): Adjust.
481 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
483         PR middle-end/87574
484         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
485         the thunk when expanding to GIMPLE.
487 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
489         * varasm.c (mergeable_string_section): Don't try to move zero-length
490         strings to the merge section.
492 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
494         PR target/87573
495         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
497 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
499         PR target/87550
500         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
501         to special_args set.
503 2018-10-10  Richard Biener  <rguenther@suse.de>
505         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
506         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
507         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
508         and recursing and pattern terminating the recursion on SSE
509         vector width using ix86_expand_reduc.
510         (reduc_sminmax_scal_<mode>): Split into part reducing to half
511         width and recursing and SSE2 vector variant doing the final
512         reduction with ix86_expand_reduc.
513         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
514         with terminating the recursion at AVX level, splitting that
515         to SSE there.
517 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
519         * genmatch.c (error_cb): Rename to...
520         (diagnostic_cb): ...this, converting int params to enums.
521         (fatal_at): Update for renaming.
522         (warning_at): Likewise.
523         (main): Likewise.
524         * input.c (selftest::ebcdic_execution_charset::apply):
525         Update for renaming of...
526         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
527         to...
528         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
529         converting level and reason to enums.
530         (class selftest::lexer_error_sink): Rename to...
531         (class selftest::lexer_test_options): ...this, renaming field
532         "m_errors" to "m_diagnostics".
533         (selftest::lexer_test_options::apply): Update for renaming of...
534         (selftest::lexer_test_options::on_error): ...this, renaming to...
535         (selftest::lexer_test_options::on_diagnostic): ...this
536         converting level and reason to enums.
537         (selftest::test_lexer_string_locations_raw_string_unterminated):
538         Update for renamings.
539         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
540         "reason".
542 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
544         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
545         * config/rs6000/pmmintrin.h: New file.
547 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
549         PR tree-optimization/86659
550         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
552 2018-10-09  Richard Biener  <rguenther@suse.de>
554         PR tree-optimization/63155
555         * tree-ssa-structalias.c: Include tree-ssa.h.
556         (get_constraint_for_ssa_var): For undefs return nothing_id.
557         (find_func_aliases): Cleanup PHI handling.
559 2018-10-09  Richard Biener  <rguenther@suse.de>
561         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
562         replacements.
564 2018-10-09  Martin Liska  <mliska@suse.cz>
566         * asan.c (asan_emit_stack_protection): If a stack variable
567         is located in a same file as current function, then emit
568         line info into variable definition string.
570 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
572         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
573         information.
575 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
577         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
578         on the thunk.
580 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
582         PR tree-optimization/86659
583         * gimple-match.h (struct gimple_match_op): Add reverse field.
584         (gimple_match_op::set_op): New overloaded method.
585         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
586         the REF_REVERSE_STORAGE_ORDER flag on the value.
587         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
588         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
589         
590 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
592         PR middle-end/63155
593         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
594         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
596 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
598         PR target/87517
599         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
600         Defined with __builtin_ia32_vfmaddsubpd512_mask.
602 2018-10-08  Richard Biener  <rguenther@suse.de>
604         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
605         cost the same as AVX128 ones.
607 2018-10-08  Paul Koning  <ni1d@arrl.net>
609         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
610         (expand_block_move): New function.
611         * config/pdp11/pdp11.c (output_block_move): Remove.
612         (expand_block_move): New function.
613         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
614         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
615         (*movmemhi1): Remove.
617 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
619         * config/s390/2827.md: Increase latencies for some FP instructions.
621 2018-10-08  Richard Biener  <rguenther@suse.de>
623         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
624         Open a dump scope.
625         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
626         * tree-vectorizer.h (dump_stmt_cost): Adjust.
627         (add_stmt_cost): Dump return value of the hook.
629 2018-10-08  Richard Biener  <rguenther@suse.de>
631         PR tree-optimization/63155
632         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
633         (ssa_propagation_engine::ssa_propagate): Remove redundant
634         bitmap bit clearing.
636 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
638         PR rtl-optimization/86939
639         PR rtl-optimization/87479
640         * ira.h (non_conflicting_reg_copy_p): New prototype.
641         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
642         (make_hard_regno_dead): Don't add conflicts for register
643         ignore_reg_for_conflicts.
644         (make_object_dead): Likewise.
645         (non_conflicting_reg_copy_p): New function.
646         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
647         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
648         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
649         (make_hard_regno_dead): Don't add conflicts for register
650         ignore_reg_for_conflicts.  Remove special conflict handling of
651         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
652         check_pic_pseudo_p and update callers.
653         (mark_pseudo_dead): Don't add conflicts for register
654         ignore_reg_for_conflicts.
655         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
657 2018-10-05  Andrew Waterman  <andrew@sifive.com>
658             Jim Wilson  <jimw@sifive.com>
660         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
661         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
662         new pattern using HONOR_SNANS that emits one extra instruction.
664 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
666         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
667         patterns): Merge SI and DI patterns to a GPR pattern.
668         (unnamed define_insn and define_split for record form of that): Merge
669         to a single define_insn_and_split pattern.
671 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
673         PR c++/56856
674         * input.c (expand_location_to_spelling_point): Add param "aspect"
675         and use rather than hardcoding LOCATION_ASPECT_CARET.
676         (get_substring_ranges_for_loc): Handle the case of a single token
677         within a macro expansion.
678         * input.h (expand_location_to_spelling_point): Add "aspect" param,
679         defaulting to LOCATION_ASPECT_CARET.
681 2018-10-05  Paul Koning  <ni1d@arrl.net>
683         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
684         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
685         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
686         (pdp11_guard_type): New function.
688 2018-10-05  Paul Koning  <ni1d@arrl.net>
690         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
691         * config/pdp11/pdp11.opt (mfloat32): Remove.
692         (mfloat64): Remove.
693         * doc/invoke.texi (pdp11 -mfloat32): Remove:
694         (pdp11 -mfloat64): Remove.
696 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
698         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
699         (*cmp<mode>_cc_i387): Ditto.
700         (*cmpu<mode>_cc_i387): Ditto.
701         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
702         * config/i386/i386.c (ix86_expand_fp_compare): Remove
703         "scratch" argument.
704         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
705         Emit x86_sahf_1 pattern.
706         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
707         (ix86_expand_carry_flag_compare): Ditto.
709 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
711         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
712         to reg_or_0_operand.  Add "C" constraint.
713         (*cmpxf_cc_i387): Ditto.
714         (*cmp<mode>_i387): Change operand 2 predicate
715         to nonimm_or_0_operand.  Add "C" constraint.
716         (*cmp<mode>_cc_i387): Ditto.
717         (*cmp<mode>_0_i387): Remove insn pattern.
718         (*cmp<mode>_0_cc_i387): Ditto.
720 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
722         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
723         * config/i386/predicates.md (nonimm_or_0_operand): Rename
724         from vector_move_operand.  Update all uses.
726 2018-10-05  Martin Sebor  <msebor@redhat.com>
728         PR tree-optimization/87490
729         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
730         consistently.
732 2018-10-05  Richard Biener  <rguenther@suse.de>
734         PR tree-optimization/63155
735         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
736         vertical space in dumpfiles.
737         * tree-ssa-propagate.h
738         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
739         * tree-ssa-propagate.c (cfg_blocks_back): New global.
740         (ssa_edge_worklist_back): Likewise.
741         (curr_order): Likewise.
742         (cfg_blocks_get): Remove abstraction.
743         (cfg_blocks_add): Likewise.
744         (cfg_blocks_empty_p): Likewise.
745         (add_ssa_edge): Add to current or next worklist based on
746         RPO index.
747         (add_control_edge): Likewise.
748         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
749         into ...
750         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
751         iteration from CFG and SSA edge worklist so we process
752         everything in RPO order, prioritizing forward progress
753         over iteration.
754         (ssa_prop_init): Allocate new worklists, do not dump
755         immediate uses.
756         (ssa_prop_fini): Free new worklists.
758 2018-10-05  Richard Biener  <rguenther@suse.de>
760         * tree-core.h (tree_block::abstract_flag): Remove.
761         (tree_block::block_num): Make full 32bits.
762         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
763         * tree.h (BLOCK_ABSTRACT): Remove.
764         * dwarf2out.c (gen_lexical_block_die): Remove dead code
765         resulting from BLOCK_ABSTRACT being always false.
766         (gen_inlined_subroutine_die): Likewise.
767         (gen_block_die): Likewise.
768         * tree.c (block_ultimate_origin): Likewise.
769         * tree-pretty-print.c (dump_block_node): Remove code dealing
770         with BLOCK_ABSTRACT.
771         * tree-ssa-live.c (dump_scope_block): Likewise.
772         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
773         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
775 2018-10-05   Richard Biener  <rguenther@suse.de>
777         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
778         is asked for initialize mode to the component mode of the
779         vector type.
781 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
783         PR target/87522
784         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
785         assembler for -mavx.
786         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
788 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
790         PR target/87509
791         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
792         RS6000_BTM_DFP.
793         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
794         to be DImode.  When using mffscrn, force the operand to a register.
796 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
798         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
799         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
800         X87MODEF mode iterator.
801         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
802         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
803         X87MODEF mode iterator.
805 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
807         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
808         -Wno-prio-ctor-dtor.
810 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
812         * Makefile.in (OBJS): Add opt-problem.o.
813         * dump-context.h: Include "selftest.h.
814         (selftest::temp_dump_context): New forward decl.
815         (class dump_context): Make friend of class
816         selftest::temp_dump_context.
817         (dump_context::dump_loc_immediate): New decl.
818         (class dump_pretty_printer): Move here from dumpfile.c.
819         (class temp_dump_context): Move to namespace selftest.
820         (temp_dump_context::temp_dump_context): Add param
821         "forcibly_enable_dumping".
822         (selftest::verify_dumped_text):
823         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
824         (selftest::verify_item):
825         (ASSERT_IS_TEXT): Move here from dumpfile.c.
826         (ASSERT_IS_TREE): Likewise.
827         (ASSERT_IS_GIMPLE): Likewise.
828         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
829         to...
830         (dump_context::dump_loc_immediate): ...this new function.
831         (class dump_pretty_printer): Move to dump-context.h.
832         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
833         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
834         (temp_dump_context::temp_dump_context): Move to "selftest"
835         namespace.  Add param "forcibly_enable_dumping", and use it to
836         conditionalize the use of m_pp;
837         (selftest::verify_dumped_text): Make non-static.
838         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
839         (selftest::verify_item): Make non-static.
840         (ASSERT_IS_TEXT): Move to dump-context.h.
841         (ASSERT_IS_TREE): Likewise.
842         (ASSERT_IS_GIMPLE): Likewise.
843         (selftest::test_capture_of_dump_calls): Pass "true" for new
844         param of temp_dump_context.
845         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
846         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
847         TDF_COMPARE_DEBUG.
848         * opt-problem.cc: New file.
849         * opt-problem.h: New file.
850         * optinfo-emit-json.cc
851         (selftest::test_building_json_from_dump_calls): Pass "true" for
852         new param of temp_dump_context.
853         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
854         (optinfo::emit_for_opt_problem): New function.
855         (optinfo::emit): Clarity which emit_item is used.
856         * optinfo.h (optinfo::get_dump_location): New accessor.
857         (optinfo::emit_for_opt_problem): New decl.
858         (optinfo::emit): Make const.
859         * selftest-run-tests.c (selftest::run_tests): Call
860         selftest::opt_problem_cc_tests.
861         * selftest.h (selftest::opt_problem_cc_tests): New decl.
862         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
863         bool to opt_result, converting fprintf messages to
864         opt_result::failure_at calls.  Add "stmt" param for use by the
865         failure_at calls.
866         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
867         (runtime_alias_check_p): Convert return type from bool to
868         opt_result, converting dump_printf calls to
869         opt_result::failure_at, using the statement DDR_A for their
870         location.
871         (find_data_references_in_stmt): Convert return type from bool to
872         opt_result, converting "return false" to opt_result::failure_at
873         with a new message.
874         * tree-data-ref.h: Include "opt-problem.h".
875         (dr_analyze_innermost): Convert return type from bool to opt_result,
876         and add a const gimple * param.
877         (find_data_references_in_stmt): Convert return type from bool to
878         opt_result.
879         (runtime_alias_check_p): Likewise.
880         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
881         dr_analyze_innermost.
882         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
883         Convert return type from bool to opt_result, adding a message for
884         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
885         (vect_analyze_data_ref_dependence): Convert return type from bool
886         to opt_result.  Change sense of return type from "false"
887         effectively meaning "no problems" to "false" meaning a problem,
888         so that "return false" becomes "return opt_result::success".
889         Convert "return true" calls to opt_result::failure_at, using
890         the location of statement A rather than vect_location.
891         (vect_analyze_data_ref_dependences): Convert return type from bool
892         to opt_result.
893         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
894         calls to opt_result::failure_at, using the stmt location rather
895         than vect_location.
896         (vect_verify_datarefs_alignment): Convert return type from bool
897         to opt_result.
898         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
899         into multiple more-tightly-scoped copies.
900         (vect_analyze_data_refs_alignment): Convert return type from bool
901         to opt_result.
902         (vect_analyze_data_ref_accesses): Likewise, converting a
903         "return false" to a "return opt_result::failure_at", adding a
904         new message.
905         (vect_prune_runtime_alias_test_list): Convert return type from
906         bool to opt_result, converting dump_printf_loc to
907         opt_result::failure_at.  Add a %G to show the pertinent statement,
908         and use the stmt's location rather than vect_location.
909         (vect_find_stmt_data_reference): Convert return type from
910         bool to opt_result, converting dump_printf_loc to
911         opt_result::failure_at, using stmt's location.
912         (vect_analyze_data_refs):  Convert return type from bool to
913         opt_result.  Convert "return false" to "return
914         opt_result::failure_at", adding messages as needed.
915         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
916         type from bool to opt_result.
917         (vect_determine_vf_for_stmt): Likewise.
918         (vect_determine_vectorization_factor): Likewise, converting
919         dump_printf_loc to opt_result::failure_at, using location of phi
920         rather than vect_location.
921         (vect_analyze_loop_form_1): Convert return type from bool to
922         opt_result, converting dump_printf_loc calls, retaining the use of
923         vect_location.
924         (vect_analyze_loop_form): Convert return type from loop_vec_info
925         to opt_loop_vec_info.
926         (vect_analyze_loop_operations): Convert return type from bool to
927         opt_result, converting dump_printf_loc calls, using the location
928         of phi/stmt rather than vect_location where available.  Convert
929         various "return false" to "return opt_result::failure_at" with
930         "unsupported phi" messages.
931         (vect_get_datarefs_in_loop): Convert return type from bool to
932         opt_result.  Add a message for the
933         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
934         (vect_analyze_loop_2): Convert return type from bool to
935         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
936         each "goto again;", adding new messages where needed.
937         Add "unsupported grouped {store|load}" messages.
938         (vect_analyze_loop): Convert return type from loop_vec_info to
939         opt_loop_vec_info.
940         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
941         bool to opt_result.
942         * tree-vect-stmts.c (process_use): Likewise, converting
943         dump_printf_loc call and using stmt location, rather than
944         vect_location.
945         (vect_mark_stmts_to_be_vectorized): Likeise.
946         (vect_analyze_stmt): Likewise, adding a %G.
947         (vect_get_vector_types_for_stmt): Convert return type from bool to
948         opt_result, converting dump_printf_loc calls and using stmt
949         location, rather than vect_location.
950         (vect_get_mask_type_for_stmt): Convert return type from tree to
951         opt_tree, converting dump_printf_loc calls and using stmt location.
952         * tree-vectorizer.c: Include "opt-problem.h.
953         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
954         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
955         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
956         enabled, use it to report at the top level "couldn't vectorize
957         loop" followed by the problem.
958         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
959         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
960         to opt_result.
961         (vect_analyze_stmt): Likewise.
962         (vect_get_vector_types_for_stmt): Likewise.
963         (tree vect_get_mask_type_for_stmt): Likewise.
964         (vect_analyze_data_ref_dependences): Likewise.
965         (vect_enhance_data_refs_alignment): Likewise.
966         (vect_analyze_data_refs_alignment): Likewise.
967         (vect_verify_datarefs_alignment): Likewise.
968         (vect_analyze_data_ref_accesses): Likewise.
969         (vect_prune_runtime_alias_test_list): Likewise.
970         (vect_find_stmt_data_reference): Likewise.
971         (vect_analyze_data_refs): Likewise.
972         (vect_analyze_loop): Convert return type from loop_vec_info to
973         opt_loop_vec_info.
974         (vect_analyze_loop_form): Likewise.
975         (vect_analyze_slp): Convert return type from bool to opt_result.
977 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
979         * doc/invoke.texi (-fopt-info): Document new "internals"
980         sub-option.
981         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
982         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
983         MSG_ALL_KINDS.
984         (optinfo_verbosity_options): Add "internals".
985         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
986         (dump_context::apply_dump_filter_p): New member function.
987         (dump_context::dump_loc): Use apply_dump_filter_p rather than
988         explicitly masking the dump_kind.
989         (dump_context::begin_scope): Increment the scope depth first.  Use
990         apply_dump_filter_p rather than explicitly masking the dump_kind.
991         (dump_context::emit_item): Use apply_dump_filter_p rather than
992         explicitly masking the dump_kind.
993         (dump_dec): Likewise.
994         (dump_hex): Likewise.
995         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
996         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
997         (opt_info_switch_p): Update handling of default
998         MSG_OPTIMIZED_LOCATIONS to cope with default of
999         MSG_PRIORITY_USER_FACING.
1000         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
1001         masking the dump_kind.
1002         (selftest::test_capture_of_dump_calls): Update test_dump_context
1003         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
1004         than MSG_ALL.  Generalize scope test to be run at all four
1005         combinations of with/without MSG_PRIORITY_USER_FACING and
1006         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
1007         for each of the two values.
1008         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
1009         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
1010         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
1011         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
1012         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
1013         with MSG_PRIORITY_*.
1014         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
1015         dump messages as MSG_PRIORITY_USER_FACING.
1016         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
1017         about the interaction with MSG_PRIORITY_*.
1019 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1021         * varasm.c (output_constant): Add new parameter merge_strings.
1022         Make strings properly zero terminated in merge string sections.
1023         (mergeable_string_section): Don't fail if the last char is non-zero.
1024         (assemble_variable_contents): Handle merge string sections.
1025         (assemble_variable): Likewise.
1026         (assemble_constant_contents): Likewise.
1027         (output_constant_def_contents): Likewise.
1028         (output_constructor_array_range,
1029         output_constructor_regular_field): Adjust call to output_constant.
1030         (output_object_block): Adjust call to assemble_constant_contents
1031         and assemble_variable_contents.
1033 2018-10-04  Martin Liska  <mliska@suse.cz>
1035         PR c/87483
1036         * cgraphunit.c (process_function_and_variable_attributes):
1037         Warn about a function with alias attribute and a body.
1039 2018-10-04  Martin Liska  <mliska@suse.cz>
1041         PR ipa/82625
1042         * multiple_target.c (redirect_to_specific_clone): New function.
1043         (ipa_target_clone): Use it.
1044         * tree-inline.c: Fix comment.
1046 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
1048         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
1049         fields.
1050         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
1051         (gcc::dump_manager::register_pass): New member function, adapted
1052         from loop body in gcc::pass_manager::register_pass, adding a
1053         call to update_dfi_for_opt_info.
1054         (gcc::dump_manager::opt_info_enable_passes): Store the
1055         -fopt-info options into the new fields.  Move the loop
1056         bodies into...
1057         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
1058         function.
1059         * dumpfile.h (struct opt_pass): New forward decl.
1060         (gcc::dump_manager::register_pass): New decl.
1061         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
1062         (class gcc::dump_manager): Add fields "m_optgroup_flags",
1063         "m_optinfo_flags", and "m_optinfo_filename".
1064         * passes.c (gcc::pass_manager::register_pass): Move all of the
1065         dump-handling code to gcc::dump_manager::register_pass.
1067 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
1069         PR rtl-optimization/87466
1070         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
1071         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
1072         * doc/tm.texi: Regenerate.
1073         * ira-lives.c (process_bb_node_lives): Use the new target hook.
1074         * lra-lives.c (process_bb_lives): Likewise.
1075         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
1076         Define.
1078 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
1080         * params.c (add_params): Fix initialization.
1082 2018-10-04  Martin Liska  <mliska@suse.cz>
1084         PR gcov-profile/84107
1085         * tree-profile.c (init_ic_make_global_vars):
1086         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
1087         Come up with new ic_tuple* variables.  Emit
1088         __gcov_indirect_call{,_topn} variables.
1089         (gimple_gen_ic_profiler): Access the variable
1090         and emit gimple.
1091         (gimple_gen_ic_func_profiler): Access
1092         __gcov_indirect_call.callee field.
1093         (gimple_init_gcov_profiler): Use ptr_type_node.
1094         * value-prof.c (gimple_ic): Use ptr_type_node.
1096 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1098         PR tree-optimization/85787
1099         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
1100         into this function and add support for detecting multiple phis.
1101         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
1103 2018-10-04  Martin Liska  <mliska@suse.cz>
1105         PR ipa/87491
1106         * ipa-inline.c (inline_to_all_callers_1):
1107         Call ultimate_alias_target for node being inlined.
1109 2018-10-03  Jeff Law  <law@redhat.com>
1111         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
1112         target's wchar_t.
1113         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
1114         * tree.h (get_typenode_from_name): Prototype.
1116 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
1118         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
1119         Change operand 2 predicate to nonimmediate_operand.
1120         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1122 2018-10-03  Martin Sebor  <msebor@redhat.com>
1123             Jeff Law  <law@redhat.com>
1125         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
1126         initialize it.
1127         (get_string_length): Detect unterminated arrays.
1128         (format_string): Same.
1129         (format_directive): Warn about unterminated arrays.
1130         (handle_gimple_call): Mark statements with no_warning as needed.
1132 2018-10-03  Jim Wilson  <jimw@sifive.com>
1134         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
1135         also define __riscv_abi_rve.  Delete trailing white space.
1137 2018-10-03  Paul Koning  <ni1d@arrl.net>
1139         Enable LRA register allocator for PDP11.
1140         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
1141         (R): Likewise.
1142         (D): Likewise.
1143         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
1144         * config/pdp11/pdp11.opt (-mlra): New option.
1145         * doc/invoke.texi (PDP-11 Options): Document -mlra.
1147 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
1149         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
1150         (*<absneg:code>extend<mode>xf2): Ditto.
1152 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
1154         PR tree-optimization/87415
1155         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
1156         precision fields.
1158 2018-10-02  Jeff Law  <law@redhat.com>
1160         * gimple-fold.c (get_range_strlen): Only set *nonstr when
1161         an unterminated string is discovered.  Bubble up range
1162         even for unterminated strings.
1163         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
1164         indicates the string was not terminated via NONSTR.
1166 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
1168         * tree-vrp.c (extract_range_from_unary_expr): Special case all
1169         pointer conversions.
1170         Do not do anything special for anti-ranges.
1172 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
1174         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
1175         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
1177 2018-10-03  Martin Liska  <mliska@suse.cz>
1179         PR gcov-profile/86109
1180         * coverage.c (coverage_begin_function): Do not
1181         mark lambdas as artificial.
1182         * tree-core.h (struct GTY): Remove tm_clone_flag
1183         and introduce new lambda_function.
1184         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
1186 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
1188         PR target/87474
1189         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
1190         P8_VECTOR and VSX are enabled.
1192 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
1194         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
1195         0x3907 as CPU model number.
1197 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
1199         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
1200         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
1201         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
1202         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
1203         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
1204         * config/s390/s390.md: Likewise. Rename also the cpu attribute
1205         value from arch12 to z14.
1207 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
1209         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
1210         (isinfxf2): Ditto.
1211         (isinf<mode>2): Ditto.
1213 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
1215         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
1216         before emitting fxam.  Perform calculations in XFmode.
1218 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
1220         * match.pd (((X /[ex] A) +- B) * A): New transformation.
1222 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
1224         PR middle-end/87319
1225         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
1226         * tree.c (signed_or_unsigned_type_for): Handle complex.
1228 2018-10-02  Jeff Law  <law@redhat.com>
1230         * gimple-fold.c (get_range_strlen): Remove dead code.
1232 2018-10-02  Martin Sebor  <msebor@redhat.com>
1233             Jeff Law  <law@redhat.com>
1235         * builtins.c (unterminated_array): Add new arguments.
1236         If argument is not terminated, bubble up size and exact
1237         state to callers.
1238         (expand_builtin_strnlen): Detect, avoid expanding
1239         and diagnose unterminated arrays.
1240         (c_strlen): Fill in offset of start of unterminated strings.
1241         * builtins.h (unterminated_array): Update prototype.
1243 2018-10-02  Richard Biener  <rguenther@suse.de>
1245         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
1246         of haddv4df, first reduce to SSE width and exploit the fact
1247         that we only need element zero with the reduction result.
1248         (reduc_plus_scal_v2df): Likewise.
1250 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
1252         * dojump.h (do_jump): Delete.
1253         (do_jump_1): Likewise.
1254         (split_comparison): Move around.
1255         * dojump.c (do_jump): Make static.
1256         (do_jump_1): Likewise.
1257         (jumpifnot): Move around.
1258         (jumpifnot_1): Likewise.
1259         (jumpif): Likewise.
1260         (jumpif_1): Likewise.
1261         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
1263 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
1265         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
1266         insns in the delay slot and add_insn_after for the jump insn.
1268 2018-10-02  Richard Biener  <rguenther@suse.de>
1270         * tree-inline.c (expand_call_inline): Use the location of
1271         the callee declaration for the inline-entry marker.
1272         * final.c (notice_source_line): Remove special-casing of
1273         NOTE_INSN_INLINE_ENTRY.
1275 2018-10-01  Carl Love  <cel@us.ibm.com>
1277         PR 69431
1278         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
1279         (__builtin_mtfsb0): New.
1280         (__builtin_mtfsb1): New.
1281         ( __builtin_set_fpscr_rn): New.
1282         (__builtin_set_fpscr_drn): New.
1283         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
1284         (rs6000_expand_set_fpscr_rn_builtin): Add.
1285         (rs6000_expand_set_fpscr_drn_builtin): Add.
1286         (rs6000_expand_builtin): Add case statement entries for
1287         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
1288         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
1289         RS6000_BUILTIN_MFFSL.
1290         (rs6000_init_builtins): Add ftype initialization and def_builtin
1291         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
1292         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
1293         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
1294         rs6000_mffscdrn): Add define_insn.
1295         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
1296         * doc/extend.texi: Add documentation for the builtins.
1298 2018-10-01  Richard Biener  <rguenther@suse.de>
1300         PR tree-optimization/87465
1301         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
1302         causing branch miscounts.
1304 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1306         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
1307         aarch64_option_default_param):  New.
1308         (params.h): Include.
1309         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
1310         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
1311         stack-clash protection validation code.
1313 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1315         * params.c (validate_param): New.
1316         (add_params): Use it.
1317         (set_param_value): Refactor param validation into validate_param.
1318         (diagnostic.h): Include.
1319         * diagnostic.h (diagnostic_ready_p): New.
1321 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1323         * params.c (set_param_value):
1324         Add index of parameter being validated.
1325         * common/common-target.def (option_validate_param): New.
1326         * common/common-targhooks.h (default_option_validate_param): New.
1327         * common/common-targhooks.c (default_option_validate_param): New.
1328         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
1329         * doc/tm.texi: Regenerate.
1331 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1333         PR target/86486
1334         * config/aarch64/aarch64.c (aarch64_override_options_internal):
1335         Add validation for stack-clash parameters and set defaults.
1337 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1339         PR target/86486
1340         * configure.ac: Add stack-clash-protection-guard-size.
1341         * doc/install.texi: Document it.
1342         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
1343         * params.def: Update comment for guard-size.
1344         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
1345         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
1346         * configure: Regenerate.
1348 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1350         PR target/86486
1351         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
1352         STACK_DYNAMIC_OFFSET): New.
1353         * config/aarch64/aarch64.c (aarch64_layout_frame):
1354         Update outgoing args size.
1355         (aarch64_stack_clash_protection_alloca_probe_range,
1356         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1358 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1360         PR target/86486
1361         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
1362         probe ranges.
1363         * target.def (stack_clash_protection_alloca_probe_range): New.
1364         (stack_clash_protection_final_dynamic_probe): Remove.
1365         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
1366         (default_stack_clash_protection_final_dynamic_probe): Remove.
1367         * targhooks.c: Likewise.
1368         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1369         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
1370         * doc/tm.texi: Regenerate.
1372 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1374         PR target/86486
1375         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
1376         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
1377         aarch64_clamp_to_uimm12_shift): New.
1378         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
1379         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
1381 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1383         PR target/86486
1384         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
1386 2018-10-01  Jeff Law  <law@redhat.com>
1387             Richard Sandiford <richard.sandiford@linaro.org>
1388             Tamar Christina  <tamar.christina@arm.com>
1390         PR target/86486
1391         * config/aarch64/aarch64.md
1392         (probe_stack_range): Add k (SP) constraint.
1393         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
1394         STACK_CLASH_MAX_UNROLL_PAGES): New.
1395         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
1396         stack probes for stack clash.
1397         (aarch64_allocate_and_probe_stack_space): New.
1398         (aarch64_expand_prologue): Use it.
1399         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
1400         (aarch64_sub_sp): Add emit_move_imm optional param.
1402 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
1404         PR tree-optimization/87261
1405         * match.pd: Remove trailing whitespace.
1406         Add (x & y) | ~(x | y) -> ~(x ^ y),
1407         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
1409 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
1411         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
1412         constraints.
1413         (ashlsi3_insn): Update instruction constraints.
1414         (ashrsi3_insn): Likewise.
1415         (rotrsi3): Likewise.
1416         (add_shift): Likewise.
1417         * config/arc/constraints.md (Csz): New 32 bit constraint. It
1418         avoids placing in the limm field small constants which, otherwise,
1419         could end into a small instruction.
1421 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
1423         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
1424         destination register is not odd-even.
1425         (umaddsidi4_split): Likewise.
1427 2018-10-01  Richard Biener  <rguenther@suse.de>
1429         * tree-inline.c (expand_call_inline): Store origin of fn
1430         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
1431         * tree.c (block_ultimate_origin): Simplify and do some
1432         checking.
1434 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
1436         * config/i386/mmx.md (EMMS): New int iterator.
1437         (emms): New int attribute.
1438         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
1439         EMMS int iterator.  Explicitly declare clobbers.
1440         (mmx_emms): Remove expander.
1441         (mmx_femms): Ditto.
1442         * config/i386/predicates.md (emms_operation): Remove predicate.
1443         (vzeroall_pattern): New predicate.
1444         (vzeroupper_pattern): Rename from vzeroupper_operation.
1445         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
1446         vzeroupper_pattern and vzeroall_pattern predicates.
1448 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
1450         PR rtl-optimization/86939
1451         * ira-lives.c (make_hard_regno_born): Rename from this...
1452         (make_hard_regno_live): ... to this.  Remove update to conflict
1453         information.  Update function comment.
1454         (make_hard_regno_dead): Add conflict information update.  Update
1455         function comment.
1456         (make_object_born): Rename from this...
1457         (make_object_live): ... to this.  Remove update to conflict information.
1458         Update function comment.
1459         (make_object_dead):  Add conflict information update.  Update function
1460         comment.
1461         (mark_pseudo_regno_live): Call make_object_live.
1462         (mark_pseudo_regno_subword_live): Likewise.
1463         (mark_hard_reg_dead): Update function comment.
1464         (mark_hard_reg_live): Call make_hard_regno_live.
1465         (process_bb_node_lives): Likewise.
1466         * lra-lives.c (make_hard_regno_born): Rename from this...
1467         (make_hard_regno_live): ... to this.  Remove update to conflict
1468         information.  Remove now uneeded check_pic_pseudo_p argument.
1469         Update function comment.
1470         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
1471         to conflict information.  Update function comment.
1472         (mark_pseudo_live): Remove update to conflict information.  Update
1473         function comment.
1474         (mark_pseudo_dead): Add conflict information update.
1475         (mark_regno_live): Call make_hard_regno_live.
1476         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
1477         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
1479 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
1481         PR target/87370
1482         * config/i386/i386.c (construct_container): Use TImode for
1483         BLKmode values in 2 integer registers.
1485 2018-09-29  Jeff Law  <law@redhat.com>
1487         * builtins.c (unterminated_array): Pass in c_strlen_data * to
1488         c_strlen rather than just a tree *.
1489         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
1490         Update recursive calls appropriately.  If caller did not provide a
1491         suitable data pointer, create a local one.  When a non-terminated
1492         string is discovered, bubble up information about the string via the
1493         c_strlen_data object.
1494         * builtins.h (c_strlen): Update prototype.
1495         (c_strlen_data): New structure.
1496         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
1497         For a type 2 call, if c_strlen indicates a non-terminated string
1498         use the length of the non-terminated string.
1499         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
1501 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
1503         PR target/87467
1504         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
1505         __m512d type for __A argument rather than __m512.
1507 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
1509         * match.pd (simple_comparison): Don't optimize if either operand is
1510         a function pointer when target needs function pointer canonicalization.
1512 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1514         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
1515         power5 .. power9 to remove indirection.
1516         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
1517         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
1518         ASM_CPU_476_SPEC): Delete.
1519         (ASM_CPU_SPEC): Adjust.
1520         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
1521         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
1523 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1525         * config.in: Delete HAVE_AS_DCI.
1526         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
1527         * config/rs6000/rs6000.h: Ditto.
1528         * configure.ac: Delete HAVE_AS_DCI.
1529         * configure: Regenerate.
1531 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1533         * config.in (HAVE_AS_LWSYNC): Delete.
1534         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1535         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
1536         do it as a .long .
1537         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1538         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
1539         as a .long .
1540         * configure.ac: Delete HAVE_AS_LWSYNC.
1541         * configure: Regenerate.
1543 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
1544             Pierre-Marie de Rodat  <derodat@adacore.com>
1546         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
1547         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
1548         (cgraph_node::create_thunk): Add indirect_offset parameter.
1549         (thunk_adjust): Likewise.
1550         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
1551         and initialize the corresponding field with it.
1552         (cgraph_node::dump): Dump indirect_offset field.
1553         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
1554         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
1555         (thunk_adjust): Add indirect_offset parameter and deal with it.
1556         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
1557         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
1558         or if the thunk is external or local.  Fix formatting.  Do not chain
1559         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
1560         if any, in the GIMPLE representation.
1561         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
1562         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
1563         (input_node): Read indirect_offset field.
1564         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
1565         call to thunk_adjust.
1566         * tree-nested.c (struct nesting_info): Add thunk_p field.
1567         (create_nesting_tree): Set it.
1568         (convert_all_function_calls): Copy static chain from targets to thunks.
1569         (finalize_nesting_tree_1): Return early for thunks.
1570         (unnest_nesting_tree_1): Do not finalize thunks.
1571         (gimplify_all_functions): Do not gimplify thunks.
1573 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
1575         * opt-suggestions.c (option_proposer::build_option_suggestions):
1576         Release "option_values".
1578 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
1580         * coverage.c (get_coverage_counts): Convert problem-reporting dump
1581         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
1582         * dumpfile.c (kind_as_string): New function.
1583         (dump_loc): Rather than a hardcoded prefix of "note: ", use
1584         kind_as_string to vary the prefix based on dump_kind.
1585         (selftest::test_capture_of_dump_calls): Update for above.
1587 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
1589         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
1590         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
1592 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
1594         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
1595         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
1596         INVALID_REGNUM instead of FPSR_REG.
1597         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
1598         * config/i386/i386.md: Update comment of FP compares.
1599         (fldenv): Do not clobber FPSR_REG.
1601 2018-09-28  Richard Biener  <rguenther@suse.de>
1603         * tree.h (BLOCK_ORIGIN): New.
1604         * omp-expand.c (grid_expand_target_grid_body): Assign
1605         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
1606         * tree-inline.c (remap_block): Likewise.
1607         * auto-profile.c (get_function_decl_from_block): Simplify
1608         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
1609         * langhooks.c (lhd_print_error_function): Likewise.
1610         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
1611         Likewise.
1612         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
1613         * tree.c (block_nonartificial_location): Likewise.
1614         (block_ultimate_origin): Likewise.
1615         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
1616         no longer needed LTO case.
1618 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
1619             Jan Hubicka  <jh@suse.cz>
1620             Martin Jambor  <mjambor@suse.cz>
1622         * simplify-rtx.c (simplify_merge_mask): New function.
1623         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
1624         same masks are used in op1 or op2.
1625         (test_vec_merge): New function.
1626         (test_vector_ops): Call test_vec_merge.
1628 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
1630         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
1631         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
1632         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
1633         (cypress_costs): Set it.
1634         (supersparc_costs): Likewise.
1635         (hypersparc_costs): Likewise.
1636         (leon_cost): Likewise.
1637         (leon3_costs): Likewise.
1638         (sparclet_costs): Likewise.
1639         (ultrasparc_costs): Likewise.
1640         (ultrasparc_costs): Likewise.
1641         (niagara_costs): Likewise.
1642         (niagara2_costs): Likewise.
1643         (niagara3_costs): Likewise.
1644         (niagara4_costs): Likewise.
1645         (niagara7_costs): Likewise.
1646         (m8_costs): Likewise.
1647         (TARGET_CAN_FOLLOW_JUMP): Define.
1648         (pass_work_around_errata::gate): Minor tweak.
1649         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
1650         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
1651         Automaitcally clear MASK_FSMULD mask for V7 processors.
1652         (sparc_can_follow_jump): New static function.
1653         (output_ubranch): Deal with CROSSING_JUMP_P.
1654         (sparc_use_sched_lookahead): Rewrite using switch statement.
1655         (sparc_issue_rate): Reorder.
1656         (sparc_branch_cost): New function.
1658 2018-09-27  Martin Sebor  <msebor@redhat.com>
1660         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
1661         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
1662         (int_fits_type_p): Same.
1664 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
1666         * config/i386/i386.md (FPCR_REG): Remove.
1667         (UNSPEC_FLDCW): Remove.
1668         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
1669         (x86_fldcw_1): Remove insn pattern.
1670         (fnstenv): Do not clobber FPCR_REG.
1671         (fldenv): Ditto.
1672         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
1673         (CALL_USED_REGISTERS): Ditto.
1674         (REG_ALLOC_ORDER): Ditto.
1675         (REG_CLASS_CONTENTS): Ditto.
1676         (HI_REGISTER_NAMES): Ditto.
1677         (ADDITIONAL_REGISTER_NAMES): Use defines instead
1678         of numerical constants.
1679         * config/i386/i386.c (regclass_map): Remove fpsr register.
1680         (dbx_register_map): Ditto.
1681         (dbx64_register_map): Ditto.
1682         (svr4_dbx_register_map): Ditto.
1683         (print_reg): Do not handle FPCR_REG.
1685 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
1687         PR target/87149
1688         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
1689         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
1690         Delete, always treat as true.
1691         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1692         Ditto.  Simplify remaining code.
1693         * config/powerpcspe/powerpcspe.h: Ditto.
1694         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
1695         Simplify remaining code.
1696         (rs6000_expand_builtin): Ditto.
1697         * config/rs6000/rs6000.h: Ditto.
1698         * configure.ac: Ditto.
1699         * configure: Regenerate.
1701 2018-09-27  Martin Liska  <mliska@suse.cz>
1703         * coverage.c (get_coverage_counts): Revert the formatting
1704         of missing profile opt info.
1706 2018-09-27  Richard Biener  <rguenther@suse.de>
1708         PR debug/37801
1709         PR debug/87440
1710         * dwarf2out.c (set_block_origin_self): Do not mark outermost
1711         block as we do not output that.
1712         (gen_inlined_subroutine_die): Elide the originally outermost
1713         block, matching what we do for concrete instances.
1714         (decls_for_scope): Add parameter specifying whether to recurse
1715         to subblocks.
1717 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
1718             Tom de Vries  <tom@codesourcery.com>
1720         PR 82089
1722         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
1723         STORE_FLAG_VALUE == 1.
1725 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
1727         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
1728         constant definitions.
1729         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
1730         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
1731         ("speculation_barrier"): New expander definition.
1733 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
1735         PR gcov-profile/86957
1736         * common.opt: New warning option -Wmissing-profile.
1737         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
1738         * doc/invoke.texi: Document -Wmissing-profile.
1740 2018-09-26  Jim Wilson  <jimw@sifive.com>
1742         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
1743         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
1745 2018-09-26  Martin Sebor  <msebor@redhat.com>
1747         * tree.c (zerop): Change return type to bool.
1748         (integer_zerop, integer_onep, integer_each_onep): Same.
1749         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1750         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1751         (real_onep, real_minus_onep, chain_index): Same.
1752         (print_type_hash_statistics, type_list_equal): Same.
1753         * tree.h (zerop): Same.
1754         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
1755         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1756         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1757         (real_onep, real_minus_onep, chain_index): Same.
1758         (print_type_hash_statistics, type_list_equal): Same.
1760 2018-09-26  Jim Wilson  <jimw@sifive.com>
1762         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
1764 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
1766         PR target/87414
1767         * config/i386/i386.c: Include debug.h and dwarf2out.h.
1768         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
1769         call.
1771 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
1773         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
1775 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
1777         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
1778         and FP_SECOND_SSE_REGS.
1779         (REG_CLASS_NAMES): Ditto.
1780         (REG_CLASS_CONTENTS): Ditto.
1781         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
1782         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
1783         (ix86_preferred_output_reload_class): Ditto.
1784         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
1785         clobber constraint to "=&f".
1786         (fix_truncdi_i387): Ditto.
1787         (lrintxfdi2): Ditto.
1788         (fistdi2_<rounding>): Ditto.
1789         (fpremxf4_i387): Change "=u" constraint to "=f".
1790         (fprem1xf4_i387): Ditto.
1791         (sincosxf3): Ditto.
1792         (fptanxf4_i387): Ditto.
1793         (fxtractxf3_i387): Ditto.
1794         (fscalexf4_i387): Ditto.
1795         (atan2xf3): Change "u" constraint to "f".
1796         (fyl2xxf3_i387): Ditto.
1797         (fyl2xp1xf3_i387): Ditto.
1799 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
1801         PR target/87439
1802         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
1803         for removed I387_MASK_PM entity.
1806 2018-09-26  Jeff Law  <law@redhat.com>
1807         Revert
1808         2018-09-26  Alexey Neyman  <stilor@att.net>
1810         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1811         headers are no longer pulled in by <isl/val.h>.
1813 2018-09-26  Richard Biener  <rguenther@suse.de>
1815         PR debug/87443
1816         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
1817         or concrete instance DIE to the tree.  Create abstract origin
1818         attributes also for concrete instances.
1820 2018-09-26  Alexey Neyman  <stilor@att.net>
1822         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1823         headers are no longer pulled in by <isl/val.h>.
1825 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
1827         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
1828         Use new helper functions.
1829         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
1830         Use new helper functions.
1831         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
1832         aarch_mm_needs_release): New declarations.
1833         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
1834         aarch_mm_needs_release): New.
1836 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1838         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
1839         (arm32_output_mi_thunk): Deal with long calls.
1841 2018-09-26  Richard Biener  <rguenther@suse.de>
1843         PR debug/87428
1844         PR debug/87362
1845         * tree-inline.c (expand_call_inline): When the location
1846         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
1847         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
1848         the inserted BLOCK to make inlined_function_outer_scope_p
1849         recognize it.
1850         * dwarf2out.c (add_call_src_coords_attributes): Do not add
1851         coords for reserved locations.
1853 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
1855         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
1856         (*call_indirect_nonlocal_sysv<mode>): Ditto.
1857         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
1858         (*sibcall_nonlocal_sysv<mode>): Ditto.
1859         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
1860         (<bd>_<mode>): Ditto.
1861         (<bd>tf_<mode>): Ditto.
1863 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
1865         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
1866         control string as a list of templates instead of as C code.
1867         (*altivec_movti): Ditto.
1868         * config/rs6000/darwin.md (movdf_low_di): Ditto.
1870 2018-09-25  Jim Wilson  <jimw@sifive.com>
1872         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
1873         when target symbol is weak.
1875 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1877         PR c/87387
1878         * builtins.c (unterminated_array): Simplify.
1879         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
1880         where pointer arithmetic is safe.
1882 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
1884         PR target/86987
1885         * config/rs6000/altivec.md (altivec_vspltb): Use
1886         const_0_to_15_operand instead of u5bit_cint_operand.
1887         (*altivec_vspltb_internal): Ditto.
1888         (altivec_vspltb_direct): Ditto.
1889         (altivec_vsplth): Use const_0_to_7_operand instead of
1890         u5bit_cint_operand.
1891         (*altivec_vsplth_internal): Ditto.
1892         (altivec_vsplth_direct): Ditto.
1893         (altivec_vspltw): Use const_0_to_3_operand instead of
1894         u5bit_cint_operand.
1895         (*altivec_vspltw_internal): Ditto.
1896         (altivec_vspltw_direct): Ditto.
1897         (altivec_vspltsf): Ditto.
1898         (*altivec_vspltsf_internal): Ditto.
1899         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
1900         various splats with the proper size immediate.  Reorder the various
1901         cases by ascending size of immediate, and put all such together.
1903 2018-09-25  Richard Biener  <rguenther@suse.de>
1905         PR debug/83941
1906         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
1907         GC-ification.
1908         (maybe_create_die_with_external_ref): Do not create
1909         DW_TAG_imported_unit here.
1910         (add_abstract_origin_attribute): Handle external BLOCK refs.
1911         (dwarf2out_abstract_function): Simplify LTO case.
1912         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
1913         rather than using maybe_create_die_with_external_ref.
1915 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
1917         PR target/71278
1918         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
1919         (frndintxf2_mask_pm_i387): Ditto.
1920         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
1921         Enable for !flag_trapping_math.
1922         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
1923         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
1924         Change operand 1 predicate to nonimmediate_operand.
1925         (attr "i387_cw"): Remove mask_pm.
1926         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
1927         (enum ix86_entity): Remove I387_MASK_PM.
1928         * config/i386/i386.c (ix86_i387_mode_needed): Do not
1929         handle I387_MASK_PM.
1930         (ix86_mode_needed): Ditto.
1931         (ix86_mode_after): Ditto.
1932         (ix86_mode_entry): Ditto.
1933         (ix86_mode_exit): Ditto.
1934         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
1936 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
1938         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
1939         to_update_switch_stmts to vNULL instead of calling create on them
1940         immediately.
1942 2018-09-25  Richard Biener  <rguenther@suse.de>
1944         PR tree-optimization/87402
1945         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
1946         (visit_phi): Re-instantiate handling of supposed to be VARYING
1947         but non-VARYING backedge value.
1949 2018-09-25  Richard Biener  <rguenther@suse.de>
1951         PR debug/83941
1952         * dwarf2out.c (struct sym_off_pair): New.
1953         (external_die_map): New global.
1954         (lookup_decl_die): When in LTO create DIEs lazily from the
1955         external_die_map.
1956         (lookup_block_die): New function, create DIEs lazily in LTO.
1957         (equate_block_to_die): New function.
1958         (dwarf2out_die_ref_for_decl): During WPA get the association
1959         from the external DIE map.
1960         (dwarf2out_register_external_die): Record mapping into the
1961         external DIE map.
1962         (maybe_create_die_with_external_ref): New function split out from
1963         DIE generation part of old dwarf2out_register_external_die.
1964         (add_abstract_origin_attribute): Do not return the DIE.  When
1965         in LTO reference externals directly.
1966         (dwarf2out_abstract_function): When in LTO ignore calls for
1967         decls with external DIEs (already present abstract instances).
1968         (gen_call_site_die): Adjust.
1969         (add_high_low_attributes): Likewise.
1970         (gen_lexical_block_die): Likewise.
1971         (gen_inlined_subroutine_die): Likewie.
1972         (gen_block_die): Likewise.
1973         (dwarf2out_inline_entry): Likewise.
1974         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
1975         DIEs.
1977 2018-09-25  Martin Liska  <mliska@suse.cz>
1979         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
1980         integers and not by a float value.
1982 2018-09-25  Martin Liska  <mliska@suse.cz>
1984         PR fortran/87394
1985         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
1986         instead of NULL.
1987         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
1988         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
1989         * godump.c (go_format_type): Remove extra parenthesis.
1991 2018-09-25  Martin Liska  <mliska@suse.cz>
1993         * alias.c (set_dest_equal_p): Remove unused function.
1994         * config/i386/i386.c (def_builtin_pure2): Likewise.
1995         * diagnostic-show-locus.c (class layout): Remove
1996         unused field.
1997         (layout::layout): Likewise here.
1998         * dump-context.h (class temp_dump_context): Likewise.
1999         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
2000         (add_AT_loclistsptr): Likewise.
2001         (add_AT_offset): Likewise.
2002         (get_AT_hi_pc): Likewise.
2003         (is_comdat_die): Likewise.
2004         (type_is_enum): Likewise.
2005         (ceiling): Likewise.
2006         (add_AT_vms_delta): Likewise.
2007         (is_class_die): Likewise.
2008         * edit-context.c (class line_event): Remove unused field.
2009         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
2010         unused function.
2011         * ipa-cp.c (ipa_get_vr_lat): Likewise.
2012         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
2013         (ok_for_base_p_nonstrict): Likewise.
2014         * tree-chrec.c (is_not_constant_evolution): Likewise.
2015         (chrec_fold_poly_cst): Likewise.
2016         * tree-if-conv.c (has_pred_critical_p): Likewise.
2017         * tree-ssa-coalesce.c (print_exprs): Likewise.
2018         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
2019         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
2020         * tree-vrp.c (value_ranges_intersect_p): Likewise.
2021         (value_range_nonnegative_p): Likewise.
2023 2018-09-25  Martin Liska  <mliska@suse.cz>
2025         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
2026         Do not handle "GNU Pascal".
2027         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
2028         Likewise.
2029         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
2030         from documentation. Likewise.
2031         * dbxout.c (dbxout_range_type): Likewise.
2032         * doc/cpp.texi: Likewise.
2033         * doc/extend.texi: Likewise.
2034         * doc/frontends.texi: Likewise.
2035         * doc/invoke.texi: Remove Pascal entry.
2036         * tree.def (CLEANUP_POINT_EXPR): Likewise.
2037         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
2039 2018-09-25  Martin Liska  <mliska@suse.cz>
2041         PR middle-end/86078
2042         * doc/invoke.texi: Document all parameters and remove default
2043         of the parameters.
2045 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
2047         PR bootstrap/87417
2048         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
2049         contains HOST_WIDE_INTs when computing its size.
2051 2018-09-24  Jim Wilson  <jimw@sifive.com>
2053         PR target/87391
2054         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
2055         not TARGET_RVE.
2056         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
2058 2018-09-24  Andrew Pinski  <apinski@marvell.com>
2060         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
2061         access prev before checking it for NULLness in the
2062         AARCH64_FUSE_CMP_BRANCH case.
2064 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
2066         PR target/82699
2067         * config/i386/i386.c (rest_of_insert_endbranch): Set
2068         endbr_queued_at_entrance to true and don't insert ENDBR if
2069         x86_function_profiler will be called.
2070         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
2071         is true.
2072         * config/i386/i386.h (machine_function): Add
2073         endbr_queued_at_entrance.
2075 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
2077         * genattrtab.c (mk_attr_alt): Use alternative_mask.
2078         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
2079         types.
2080         (check_attr_test): Use alternative_mask.
2081         (get_attr_value): Likewise.
2082         (compute_alternative_mask): Use alternative_mask and XWINT.
2083         (make_alternative_compare): Use alternative_mask.
2084         (attr_alt_subset_p): Use XWINT.
2085         (attr_alt_subset_of_compl_p): Likewise.
2086         (attr_alt_intersection): Use alternative_mask and XWINT.
2087         (attr_alt_union): Likewise.
2088         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
2089         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
2090         (simplify_test_exp): Use alternative_mask and XWINT.
2091         (write_test_expr): Use alternative_mask and XWINT, adjust bit
2092         number calculation to support 64 bits.  Generate code that
2093         checks 64-bit masks.
2094         (main): Use alternative_mask.
2095         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
2097 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
2099         PR target/80080
2100         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
2101         RETURN+USE when returning via %r14.
2103 2018-09-24  Martin Liska  <mliska@suse.cz>
2105         * gcov.c (output_lines): Print colorization legend
2106         for both flag_use_colors and flag_use_hotness_colors.
2107         Reword the help.
2109 2018-09-24  Martin Liska  <mliska@suse.cz>
2111         * coverage.c (get_coverage_counts): Use warning_at
2112         with current_function_decl location. Use %qD in warning
2113         message.
2115 2018-09-24  Martin Liska  <mliska@suse.cz>
2117         * memory-block.h (memory_block_pool::release): Annotate with
2118         valgrind that the memory is not accessible.
2120 2018-09-24  Martin Liska  <mliska@suse.cz>
2122         PR sanitizer/85774
2123         * asan.c: Make asan_handled_variables extern.
2124         * asan.h: Likewise.
2125         * cfgexpand.c (expand_stack_vars): Make sure
2126         a representative is unpoison if another
2127         variable in the partition is handled by
2128         use-after-scope sanitization.
2130 2018-09-24  Richard Biener  <rguenther@suse.de>
2132         PR tree-optimization/63155
2133         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
2134         the worklist when the edge of the respective argument isn't
2135         executable.
2137 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
2139         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
2140         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
2141         (MASK_CLASS_P): Update for rename.
2142         (MAYBE_MASK_CLASS_P): Ditto.
2143         (REG_CLASS_NAMES): Update.
2144         (REG_CLASS_CONTENT): Update.
2145         * config/i386/i386.c (regclass_map): Update for MASK_REG
2146         and ALL_MASK_REGS rename.
2147         * config/i386/constraints.md (Yk): Update for rename.
2148         (k): Ditto.
2150 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
2152         * config/i386/i386.h (enum reg_class): Remove
2153         EVEX_SSE_REGS and MOD4_SSE_REGS.
2154         (REG_CLASS_NAMES): Update.
2155         (REG_CLASS_CONTENT): Update.
2156         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
2157         registers as ALL_SSE_REGS.
2158         (ix86_additional_allocno_class_p): Remove.
2159         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
2160         (ix86_register_priority): Lower priority of EVEX SSE registers.
2161         Use IN_RANGE macro where appropriate.
2162         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
2163         AVX-5124VNNIW checks.
2164         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
2165         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
2166         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
2167         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
2168         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
2169         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
2170         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
2171         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
2172         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
2173         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
2174         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
2175         * config/i386/constraints.md (Yh): Remove.
2177 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
2179         * config/i386/i386.c (regclass_map): Declare integer REX registers
2180         as GENERAL_REGS.
2182 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
2184         * doc/service.texi (Service): Switch the fsf.org link to https.
2186 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
2188         PR target/86798
2189         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2190         Define to speculation_safe_value_not_needed.
2192 2018-09-21  Florian Weimer  <fweimer@redhat.com>
2194         PR middle-end/81035
2195         * doc/extend.texi (Common Function Attributes): Mention that
2196         noreturn suppresses tail call optimization.
2198 2018-09-21  Jeff Law  <law@redhat.com>
2200         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
2201         vr_values::cleanup_edges_and_switches.
2202         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
2203         vr_values class.
2204         (identify_jump_threads): Remove EDGE_IGNORE handling.
2205         (execute_vrp): Move handling of to_remove_edges and
2206         to_update_switch_stmts into vr_values class member functions.
2207         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
2208         (to_update_switch_stmts): Likewise.
2209         * vr-values.c: Include cfghooks.h.
2210         (vr_values::vr_values): Initialize to_remove_edges and
2211         to_update_switch_stmts.
2212         (vr_values::~vr_values): Verify to_remove_edges and
2213         to_update_switch_stmts are empty.
2214         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
2215         (vr_values::cleanup_edges_and_switches): New member function.
2216         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
2217         function.  Add new data members.
2219 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
2221         PR tree-optimization/87309
2222         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
2223         calls with pflags and alt_flags.
2224         (selftest::test_capture_of_dump_calls): Add test of interaction of
2225         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
2227 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2229         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
2231 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2233         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
2235 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2237         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
2238         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
2239         (VXWORKS_LIBS_RTP): Minor reordering.
2241 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2243         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
2244         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
2246 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2248         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
2249         (PTRDIFF_TYPE): Likewise.
2251 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2253         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
2254         triplet, similar to support for VxWorks7.
2255         * config/vxworks-dummy.h: Provide a default definition
2256         of TARGET_VXWORKS64 to 0.
2258 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2260         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
2261         * config/vxworks-dummy.h: here.
2263 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2265         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
2267 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
2268             Bo Zhou  <zbo.zhou@hisilicon.com>
2270         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
2271         * config/aarch64/aarch64-tune.md: Regenerated.
2272         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
2273         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
2274         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
2276 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
2277             Julian Brown  <julian@codesourcery.com>
2279         * builtins.c (get_builtin_sync_mem): Handle address spaces.
2281 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
2283         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
2284         if the call takes a static chain.
2286 2018-09-21  Martin Liska  <mliska@suse.cz>
2288         * auto-profile.c (autofdo_source_profile::read): Do not
2289         set sum_all.
2290         (read_profile): Do not add working sets.
2291         (read_autofdo_file): Remove sum_all.
2292         (afdo_callsite_hot_enough_for_early_inline): Remove const
2293         qualifier.
2294         * coverage.c (struct counts_entry): Remove gcov_summary.
2295         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
2296         do not support GCOV_TAG_PROGRAM_SUMMARY.
2297         (get_coverage_counts): Remove summary and expected
2298         arguments.
2299         * coverage.h (get_coverage_counts): Likewise.
2300         * doc/gcov-dump.texi: Remove -w option.
2301         * gcov-dump.c (dump_working_sets): Remove.
2302         (main): Do not support '-w' option.
2303         (print_usage): Likewise.
2304         (tag_summary): Likewise.
2305         * gcov-io.c (gcov_write_summary): Do not dump
2306         histogram.
2307         (gcov_read_summary): Likewise.
2308         (gcov_histo_index): Remove.
2309         (gcov_histogram_merge): Likewise.
2310         (compute_working_sets): Likewise.
2311         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
2312         it not obsolete.
2313         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
2314         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
2315         (GCOV_HISTOGRAM_SIZE): Remove.
2316         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
2317         (struct gcov_summary): Simplify rapidly just
2318         to runs and sum_max fields.
2319         (gcov_histo_index): Remove.
2320         (NUM_GCOV_WORKING_SETS): Likewise.
2321         (compute_working_sets): Likewise.
2322         * gcov-tool.c (print_overlap_usage_message): Remove
2323         trailing empty line.
2324         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
2325         (output_lines): Remove program related line.
2326         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
2327         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
2328         histogram.
2329         (input_profile_summary): Do not read it.
2330         (merge_profile_summaries): And do not merge it.
2331         (input_symtab): Do not call removed function.
2332         * modulo-sched.c (sms_schedule): Do not print sum_max.
2333         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
2334         removed when histogram method was invented.
2335         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
2336         mode.
2337         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
2338         GCOV coding style.
2339         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
2340         and dump selected value.
2341         * profile.c (add_working_set): Remove.
2342         (get_working_sets): Likewise.
2343         (find_working_set): Likewise.
2344         (get_exec_counts): Do not work with working sets.
2345         (read_profile_edge_counts): Do not inform as sum_max is removed.
2346         (compute_branch_probabilities): Likewise.
2347         (compute_value_histograms): Remove argument for call of
2348         get_coverage_counts.
2349         * profile.h: Do not make gcov_summary const.
2351 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
2353         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
2355 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
2357         PR tree-optimization/86990
2358         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
2359         Check that the entire merged store group is made of constants only for
2360         overlapping stores.
2362 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
2364         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
2365         (VTABLE_VERIFICATION_SPEC): Likewise.
2366         (SANITIZER_EARLY_SPEC): Likewise.
2367         (SANITIZER_SPEC): Likewise.
2368         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
2369         * doc/invoke.texi (Link Options): Document -r.
2371 2018-09-20  Richard Biener <rguenther@suse.de>
2373         PR middle-end/87054
2374         * gimplify.c (gimplify_expr): Retain alignment of
2375         addressable lvalue in dereference.
2377 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
2379         PR bootstrap/87013
2380         * configure.ac: Check for .loc is_stmt support.
2381         * configure, config.in: Rebuilt.
2382         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
2383         if not supported.
2385 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
2387         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
2388         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
2389         -misel=no.
2391 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
2393         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2394         VECTOR_OTHER.
2395         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
2396         case VECTOR_OTHER.
2398 2018-09-20  Marek Polacek  <polacek@redhat.com>
2400         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
2402 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
2404         PR tree-optimization/87288
2405         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
2406         into account when determining PEELING_FOR_NITERS.
2408 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
2410         PR tree-optimization/86877
2411         * tree-vect-loop.c (vect_analyze_loop_2): Call
2412         vect_verify_datarefs_alignment.
2414 2018-09-19  Marek Polacek  <polacek@redhat.com>
2416         * doc/invoke.texi: Document -Wclass-conversion.
2418 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
2420         * config/pa/pa.c (pa_adjust_priority): Delete.
2421         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
2423         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
2424         (atomic_storehi): Likewise.
2425         (atomic_storesi): Likewise.
2426         (atomic_loaddi): Restore compare and swap exchange loop code.
2428 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
2430         PR rtl-optimization/86902
2431         * combine.c (try_combine): When changing the CC mode used, don't change
2432         an unrelated mode in other_insn to that new CC mode.
2434 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
2436         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
2437         with %T in place of calls to dump_generic_expr.
2438         (prune_runtime_alias_test_list): Likewise.
2439         (create_runtime_alias_checks): Likewise.
2440         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
2441         (vect_analyze_data_ref_dependence): Likewise.
2442         (vect_slp_analyze_data_ref_dependence): Likewise.
2443         (vect_record_base_alignment): Likewise.  Use %G in place of call
2444         to dump_gimple_stmt.
2445         (vect_compute_data_ref_alignment): Likewise.
2446         (verify_data_ref_alignment): Likewise.
2447         (vect_find_same_alignment_drs): Likewise.
2448         (vect_analyze_group_access_1): Likewise.
2449         (vect_analyze_data_ref_accesses): Likewise.
2450         (dependence_distance_ge_vf): Likewise.
2451         (dump_lower_bound): Likewise.
2452         (vect_prune_runtime_alias_test_list): Likewise.
2453         (vect_find_stmt_data_reference): Likewise.
2454         (vect_analyze_data_refs): Likewise.
2455         (vect_create_addr_base_for_vector_ref): Likewise.
2456         (vect_create_data_ref_ptr): Likewise.
2457         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
2458         (vect_can_advance_ivs_p): Likewise.
2459         (vect_update_ivs_after_vectorizer): Likewise.
2460         (vect_gen_prolog_loop_niters): Likewise.
2461         (vect_prepare_for_masked_peels): Likewise.
2462         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2463         (vect_determine_vectorization_factor): Likewise.
2464         (vect_is_simple_iv_evolution): Likewise.
2465         (vect_analyze_scalar_cycles_1): Likewise.
2466         (vect_analyze_loop_operations): Likewise.
2467         (report_vect_op): Likewise.
2468         (vect_is_slp_reduction): Likewise.
2469         (check_reduction_path): Likewise.
2470         (vect_is_simple_reduction): Likewise.
2471         (vect_create_epilog_for_reduction): Likewise.
2472         (vect_finalize_reduction:): Likewise.
2473         (vectorizable_induction): Likewise.
2474         (vect_transform_loop_stmt): Likewise.
2475         (vect_transform_loop): Likewise.
2476         (optimize_mask_stores): Likewise.
2477         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
2478         (vect_split_statement): Likewise.
2479         (vect_recog_over_widening_pattern): Likewise.
2480         (vect_recog_average_pattern): Likewise.
2481         (vect_determine_min_output_precision_1): Likewise.
2482         (vect_determine_precisions_from_range): Likewise.
2483         (vect_determine_precisions_from_users): Likewise.
2484         (vect_mark_pattern_stmts): Likewise.
2485         (vect_pattern_recog_1): Likewise.
2486         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2487         (vect_record_max_nunits): Likewise.
2488         (vect_build_slp_tree_1): Likewise.
2489         (vect_build_slp_tree_2): Likewise.
2490         (vect_print_slp_tree): Likewise.
2491         (vect_analyze_slp_instance): Likewise.
2492         (vect_detect_hybrid_slp_stmts): Likewise.
2493         (vect_detect_hybrid_slp_1): Likewise.
2494         (vect_slp_analyze_operations): Likewise.
2495         (vect_slp_analyze_bb_1): Likewise.
2496         (vect_transform_slp_perm_load): Likewise.
2497         (vect_schedule_slp_instance): Likewise.
2498         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2499         (vect_mark_stmts_to_be_vectorized): Likewise.
2500         (vect_init_vector_1): Likewise.
2501         (vect_get_vec_def_for_operand): Likewise.
2502         (vect_finish_stmt_generation_1): Likewise.
2503         (vect_check_load_store_mask): Likewise.
2504         (vectorizable_call): Likewise.
2505         (vectorizable_conversion): Likewise.
2506         (vectorizable_operation): Likewise.
2507         (vectorizable_load): Likewise.
2508         (vect_analyze_stmt): Likewise.
2509         (vect_is_simple_use): Likewise.
2510         (vect_get_vector_types_for_stmt): Likewise.
2511         (vect_get_mask_type_for_stmt): Likewise.
2512         * tree-vectorizer.c (increase_alignment): Likewise.
2514 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
2516         * doc/rtl.texi: Adjust vec_select description.
2517         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
2518         non-constant selectors.
2520 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
2522         * config/aarch64/aarch64-protos.h
2523         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
2524         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
2525         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
2526         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
2527         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
2528         (AARCH64_FL_PROFILE): Move index so flags are ordered.
2529         (AARCH64_ISA_RCPC8_4): New flag.
2530         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
2531         to aarch64_offset_9bit_signed_unscaled_p.
2532         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
2533         and use stlur.
2534         * config/aarch64/constraints.md (Ust): New constraint.
2535         * config/aarch64/predicates.md.
2536         (aarch64_9bit_offset_memory_operand): New predicate.
2537         (aarch64_rcpc_memory_operand): New predicate.
2539 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
2541         PR rtl-optimization/87361
2542         * rtlanal.c (nonzero_bits1): Revert accidental change.
2544 2018-09-19  Richard Biener  <rguenther@suse.de>
2546         PR tree-optimization/87349
2547         PR tree-optimization/87342
2548         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
2550 2018-09-18  Marek Polacek  <polacek@redhat.com>
2552         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
2553         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
2555 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
2557         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
2559 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
2561         PR rtl-optimization/86882
2562         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
2564 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
2566         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
2567         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
2569 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
2571         PR other/87353
2572         * doc/invoke.texi (Link Options): Fix formatting and grammar.
2574 2018-09-18  Richard Biener  <rguenther@suse.de>
2576         PR middle-end/63155
2577         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
2578         (compute_samebase_partition_bases): Likewise.
2579         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
2580         (gimple_can_coalesce_p): Simplify.
2582 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
2584         Handle a library implementation of ffs calling __builtin_ffs.
2585         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
2586         (mmix_init_libfuncs): New function: make __builtin_ffs expand
2587         to __ffsdi2.
2589 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
2591         * diagnostic-show-locus.c (class layout_range): Add field
2592         "m_original_idx".
2593         (layout_range::layout_range): Add "original_idx" param and use it
2594         to initialize new field.
2595         (make_range): Use 0 for original_idx.
2596         (layout::layout): Pass in index to calls to
2597         maybe_add_location_range.
2598         (layout::maybe_add_location_range): Add param "original_idx" and
2599         pass it on to layout_range.
2600         (layout::print_any_labels): Pass on range->m_original_idx to
2601         get_text call.
2602         (gcc_rich_location::add_location_if_nearby): Use 0 for
2603         original_idx.
2604         * gcc-rich-location.h (text_range_label::get_text): Update for new
2605         param.
2606         (range_label_for_type_mismatch::get_text): Likewise.
2608 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
2610         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
2612 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
2614         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
2615         format_string_diagnostic_t.
2616         (fmtwarn_n): Likewise.
2617         * substring-locations.c
2618         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
2619         (format_warning_n_va): Convert to...
2620         (format_string_diagnostic_t::emit_warning_n_va): ...this.
2621         (format_warning_va): Convert to...
2622         (format_string_diagnostic_t::emit_warning_va): ...this.
2623         (format_warning_at_substring): Convert to...
2624         (format_string_diagnostic_t::emit_warning): ...this.
2625         (format_warning_at_substring_n): Convert to...
2626         (format_string_diagnostic_t::emit_warning_n): ...this.
2627         * substring-locations.h (class format_string_diagnostic_t): New
2628         class.
2629         (format_warning_va): Convert to
2630         format_string_diagnostic_t::emit_warning_va.
2631         (format_warning_n_va): Convert to
2632         format_string_diagnostic_t::emit_warning_n_va.
2633         (format_warning_at_substring): Convert to
2634         format_string_diagnostic_t::emit_warning.
2635         (format_warning_at_substring_n): Convert to
2636         format_string_diagnostic_t::emit_warning_n.
2638 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
2639             Bernd Schmidt <bernds_cb1@t-online.de>
2641         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
2642         SImode args.
2644 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
2646         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
2647         operand 0 predicate to nonimmediate operand.
2648         (rint<mode>2_frndint): Remove insn pattern.
2649         (rint<mode>2): Change operand 1 predicate to general_operand.
2650         Extend operand 1 to XFmode and generate rintxf2 insn.
2651         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
2652         Do not use X87MODEF mode macro.
2653         (frndintxf2_<rounding>_i387): Rename from
2654         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
2655         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
2656         to XFmode and generate significandxf3 insn.
2658 2018-09-17  Richard Biener  <rguenther@suse.de>
2660         PR tree-optimization/87328
2661         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
2662         visiting unexecutable backedges when not iterating.
2663         (do_rpo_vn): Mark all edges not executable even when not
2664         iterating.
2666 2018-09-17  Martin Jambor  <mjambor@suse.cz>
2668         PR c/63886
2669         * doc/invoke.texi (Warning Options): Likewise.
2671 2018-09-17  Richard Biener  <rguenther@suse.de>
2673         PR tree-optimization/87301
2674         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
2675         clean EH info from leftover copy assignments.
2677 2018-09-17  Martin Liska  <mliska@suse.cz>
2679         PR gcov-profile/85871
2680         * gcov.c (output_intermediate_file): Fix out of bounds
2681         access.
2683 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
2685         * config/arc/arc.c: Object attributes for core4 not reflected
2686         correctly.
2687         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
2688         core3).
2690 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
2692         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2694 2018-09-17  Martin Liska  <mliska@suse.cz>
2696         * doc/gcov.texi: Document new option --use-hotness-colors.
2697         * gcov.c (struct source_info): Declare new field.
2698         (source_info::source_info): Set default for maximum_count.
2699         (print_usage): Add new -q option.
2700         (process_args): Process it.
2701         (accumulate_line_info): Save src->maximum_count.
2702         (output_line_beginning): Make color line number if
2703         flag_use_hotness_colors is set.
2704         (output_line_details): Pass default argument value.
2705         (output_lines): Pass src->maximum_count.
2707 2018-09-17  Martin Liska  <mliska@suse.cz>
2709         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
2710         Use processor_names table.
2711         * config/i386/i386.c (ix86_default_align): Use
2712         processor_cost_table for alignment values.
2713         (ix86_option_override_internal): Use processor_names.
2714         (ix86_function_specific_print): Likewise.
2715         * config/i386/i386.h (struct processor_costs):
2716         Add alignment values.
2717         (struct ptt): Remove and replace with const char *.
2718         * config/i386/x86-tune-costs.h (struct processor_costs):
2719         Declare default alignments for all costs.
2721 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
2723         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
2724         symbolics or VR_VARYING ranges for ABS_EXPR.
2725         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
2726         when range will wrap.
2728 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
2730         PR middle-end/86864
2731         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
2732         before and after a JUMP_TABLE_DATA.
2734 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
2736         PR middle-end/87188
2737         * dojump.c (do_compare_and_jump): Canonicalize function pointers
2738         when one operand is a function pointer.  Use POINTER_TYPE_P and
2739         FUNC_OR_METHOD_TYPE_P.
2740         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
2741         * fold-const.c (build_range_check): Likewise.
2742         * match.pd (simple_comparison): Likewise.
2744 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
2746         PR c/82967
2747         * spellcheck.c (get_edit_distance_cutoff): New function.
2748         (selftest::test_edit_distance_unit_test_oneway): Rename to...
2749         (selftest::test_get_edit_distance_one_way): ...this.
2750         (selftest::test_get_edit_distance_unit): Rename to...
2751         (selftest::test_get_edit_distance_both_ways): ...this.
2752         (selftest::test_edit_distances): Move tests to this new function,
2753         and test some more pairs of strings.  Update for above renaming.
2754         (selftest::get_old_cutoff): New function.
2755         (selftest::test_get_edit_distance_cutoff): New function.
2756         (selftest::assert_suggested_for): New function.
2757         (ASSERT_SUGGESTED_FOR): New macro.
2758         (selftest::assert_not_suggested_for): New function.
2759         (ASSERT_NOT_SUGGESTED_FOR): New macro.
2760         (selftest::test_suggestions): New function.
2761         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
2762         tests to selftest::test_edit_distances and call it.  Add calls to
2763         selftest::test_get_edit_distance_cutoff and
2764         selftest::test_suggestions.
2765         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
2766         (best_match::consider): Replace hard-coded cutoff calculation with
2767         a call to...
2768         (best_match::get_cutoff): New declaration.
2769         (best_match::get_best_meaningful_candidate): Likewise.
2771 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2773         * builtins.c (fold_builtin_strlen): Remove TODO comment.
2775 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2777         revert:
2778         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2780         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2781         terminated string literal.
2783 2018-09-14  Martin Sebor  <msebor@redhat.com>
2785         * builtins.c (unterminated_array): Handle ARRAY_REF.
2786         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
2787         * builtins.h (unterminated_array): Declare extern.
2788         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
2789         arrays.
2790         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
2791         calls.
2793 2018-09-14  Martin Sebor  <msebor@redhat.com>
2794             Jeff Law  <law@redhat.com>
2796         * builtins.c (unterminated_array): New.
2797         (expand_builtin_strcpy): Adjust.
2798         (expand_builtin_strcpy_args): Detect unterminated arrays.
2799         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
2800         unterminated arrays.
2801         * gimple-fold.h (get_maxval_strlen): Add argument.
2802         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
2804         * gimple-fold.c (get_range_strlen): Add argument.
2805         (get_maxval_strlen): Adjust.
2806         * gimple-fold.h (get_range_strlen): Add argument.
2808 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
2810         * config/i386/movdirintrin.h: Fix copyright year.
2812 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
2814         * reg-stack.c: Include regs.h.
2815         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
2816         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
2817         FIRST_STACK_REG, not DFmode.
2818         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
2819         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
2820         (change stack): Default register mode to the reg_raw_mode of
2821         FIRST_STACK_REG, not DFmode.
2822         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
2823         (*swapxf): Rename from swapxf.
2825 2018-09-14  Carl Love  <cel@us.ibm.com>
2827         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
2828         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
2830 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
2832         PR target/87224
2833         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
2834         alternatives.
2836 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
2838         PR target/85628
2839         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
2841 2018-09-14  Jason Merrill  <jason@redhat.com>
2843         Fix --enable-gather-detailed-mem-stats.
2844         * hash-table.c (hash_table_usage): Change from variable to function.
2845         * hash-table.h: Adjust.
2846         * Makefile.in: Add missing dependencies on hash-table.h.
2848 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2850         PR tree-optimization/87259
2851         PR lto/87283
2852         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
2853         execute_cse_reciprocals_1 has tried transforming.
2855 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
2857         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
2858         VR_VARYING for PLUS/MINUS_EXPR.
2860 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
2862         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
2863         formatting.
2865 2018-09-14  Richard Biener  <rguenther@suse.de>
2867         PR middle-end/63155
2868         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
2869         bits for the merged partition.
2871 2018-09-13  Martin Sebor  <msebor@redhat.com>
2872             Bernd Edlinger  <bernd.edlinger@hotmail.de>
2874         * builtins.h (c_srlen): Add argument.
2875         * builtins.c (warn_string_no_nul): New function.
2876         (c_strlen): Add argument and use it.  Update recursive calls.
2877         Pass DECL argument to string_constant to get info on non
2878         terminated strings.  Update *NONSTR as needed.
2879         (fold_builtin_strlen): Add argument to calls to c_strlen.
2880         Warn for unterminated arrays.
2881         (warn_string_no_null): Add prototype.
2882         * expr.c (string_constant): Update arguments.  Update recursive
2883         calls appropriately.  Detect missing NUL terminator and outermost
2884         declaration its missing in.
2885         Improve checks for arrays with nonzero lower bound or elements
2886         that are not a single byte.  Simplify offset computation.
2887         Simplify checks for non-NUL terminated strings.
2888         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
2889         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
2891 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2893         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
2894         correctly.
2895         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
2896         argument.  Fix range checks.
2897         * fold-const.h (c_getstr): Adjust protoype.
2898         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
2899         string is constant but contains no NUL byte.
2901         * expr.c (string_constant): Adjust function comment.
2902         Remove bogus check for zero termination.
2904         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
2906         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
2907         (get_constant_size): Don't make STRING_CSTs larger than they are.
2908         (check_string_literal): New check function for STRING_CSTs.
2909         (output_constant): Use it.
2911 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
2913         PR target/86812
2914         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
2916 2018-09-13  Richard Biener  <rguenther@suse.de>
2918         PR tree-optimization/87263
2919         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
2920         (struct unwind_state): Add max_rpo field.
2921         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
2922         Compute max_rpo, the max RPO number a block can be backwards reached
2923         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
2924         separating it from the iterating mode.
2926 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
2928         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
2929         (rfs_decision): New scheduling decision.
2931 2018-09-13  Richard Biener  <rguenther@suse.de>
2933         PR bootstrap/87134
2934         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
2935         (vn_nary_op_insert_pieces_predicated): Do not write useless
2936         valid_dominated_by_p entry outside of the allocated storage.
2938 2018-09-13  Omar Sandoval  <osandov@osandov.com>
2939             Tom de Vries  <tdevries@suse.de>
2941         PR debug/86985
2942         * dwarf2out.c (is_c): New function.
2943         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
2945 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
2947         PR target/85628
2948         * config/aarch64/aarch64.md (*aarch64_bfxil):
2949         Define.
2950         * config/aarch64/constraints.md (Ulc): Define.
2951         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
2952         Define.
2953         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
2954         New function.
2956 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
2958         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
2959         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
2960         aarch64_layout_frame call.
2961         (aarch64_expand_epilogue): Likewise.
2962         (aarch64_initial_elimination_offset): Likewise.
2963         (aarch64_get_separate_components): Likewise.
2964         (aarch64_use_return_insn_p): Likewise.
2965         (aarch64_layout_frame): Remove unneeded check.
2967 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
2969         * configure.ac: Only append
2970         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
2971         gcc_config_arguments if it was never reconfigured or last reconfigure
2972         was with different arguments.
2973         * configure: Regenerated.
2975 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
2976             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2978         PR middle-end/87290
2979         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
2980         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
2982 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
2984         PR tree-optimization/87287
2985         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
2986         X % C == 0 to X % (unsigned) C == 0 optimization to ...
2987         * match.pd (X % C == 0): ... here.  New optimization.
2989 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
2991         PR middle-end/82853
2992         * expr.h (maybe_optimize_mod_cmp): Declare.
2993         * expr.c (mod_inv): New function.
2994         (maybe_optimize_mod_cmp): New function.
2995         (do_store_flag): Use it.
2996         * cfgexpand.c (expand_gimple_cond): Likewise.
2998 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
2999             Julian Brown  <julian@codesourcery.com>
3001         PR middle-end/86336
3002         * gimplify.c (gimplify_scan_omp_clauses): Set
3003         target_firstprivatize_array_bases in OpenACC parallel and kernels
3004         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
3005         OpenACC data regions.
3007 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
3009         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
3010         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
3012 2018-09-12  Richard Biener  <rguenther@suse.de>
3014         PR tree-optimization/87280
3015         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
3016         edge but unreachable target.
3017         (do_rpo_vn): For conservatively handling a PHI only mark
3018         the backedge executable but not the block reachable.
3020 2018-09-12  Richard Biener  <rguenther@suse.de>
3022         PR tree-optimization/87266
3023         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
3024         visited blocks.
3026 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
3028         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
3029         constants.
3030         ("trunc<BFP:mode><DFP_ALL:mode>2")
3031         ("trunc<DFP_ALL:mode><BFP:mode>2")
3032         ("extend<BFP:mode><DFP_ALL:mode>2")
3033         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
3034         according to the target operand type.
3036 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
3037             Andreas Krebbel  <krebbel@linux.ibm.com>
3039         PR tree-optimization/86844
3040         * gimple-ssa-store-merging.c
3041         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
3042         there are any overlapping stores in between them, make sure they are
3043         also coalesced or we give up completely.
3045 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
3047         PR middle-end/87248
3048         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
3049         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
3051 2018-09-12  Tom de Vries  <tdevries@suse.de>
3053         * common.opt (gdescribe-dies): Add option.
3054         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
3055         attribute for artifical and nameless decls.
3056         (dwarf2out_register_external_die): Add description attribute to
3057         external reference die.
3058         (add_desc_attribute): New functions.
3059         (gen_subprogram_die): Add description attribute to
3060         DW_TAG_call_site_parameter.
3061         * tree-pretty-print.c (print_generic_expr_to_str): New function.
3062         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
3063         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
3064         -gno-describe-dies.
3065         (@item -gdescribe-dies): Add.
3067 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
3069         * tree-vrp.c (vrp_shift_undefined_p): Remove.
3070         (extract_range_from_binary_expr_1: Call
3071         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
3072         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
3073         depend on sign.
3075 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
3077         * gimple-ssa-warn-alloca.c
3078         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
3079         field for ALLOCA_BOUND_*_LARGE.
3081 2018-09-11  Nathan Sidwell  <nathan@acm.org>
3083         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
3085 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
3087         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
3088         for clobbers.  Remove obsolete comment.
3090 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
3092         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
3093         mpxchk, mpxld and mpxst types.
3094         (define_attr length_immediate): Remove all processing of mpx types.
3095         (define_attr prefix_0f): Ditto.
3096         (define_attr memory): Ditto.
3098 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
3100         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
3101         (log<mode>2): Change operand 1 predicate to general_operand.
3102         Extend operand 1 to XFmode and generate logxf3 insn.
3103         (log10<mode>2): Change operand 1 predicate to general_operand.
3104         Extend operand 1 to XFmode and generate log10xf3 insn.
3105         (log2<mode>2): Change operand 1 predicate to general_operand.
3106         Extend operand 1 to XFmode and generate log2xf3 insn.
3107         (fyl2xp1_extend<mode>xf3_i387): Remove.
3108         (log1p<mode>2): Change operand 1 predicate to general_operand.
3109         Extend operand 1 to XFmode and generate log1pxf3 insn.
3110         (fxtract_extend<mode>xf3_i387): Remove.
3111         (logb<mode>2): Change operand 1 predicate to general_operand.
3112         Extend operand 1 to XFmode and generate logbxf3 insn.
3113         (ilogb<mode>2): Change operand 1 predicate to general_operand.
3114         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
3115         (significand<mode>2): Change operand 1 predicate to general_operand.
3116         Extend operand 1 to XFmode and generate significandxf3 insn.
3118 2018-09-11  Nathan Sidwell  <nathan@acm.org>
3120         * gcc.c (perror_with_name, pfatal_with_name): Delete.
3121         (load_specs): Use fatal_error.
3122         (DELETE_IF_ORDINARY, process_command): Use error.
3123         (execute, run_attempt): Use fatal_error.
3125 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
3127         * diagnostic-core.h (sorry_at): New prototype.
3128         * diagnostic.c (sorry_at): New function.
3130 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
3132         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
3133         by zero as VR_UNDEFINED.
3135 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
3137         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
3138         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
3139         (<sincos>mode2): New expander.
3140         (sincos_extend<mode>xf3_i387): Remove insn pattern.
3141         (sincos -> sin, cos splitters): Remove splitter patterns.
3142         (sincos<mode>3): Change operand 2 predicate to general_operand.
3143         Extend operand 2 to XFmode and generate sincosxf3 insn.
3144         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
3145         Change operand 3 predicate to const1_operand.
3146         (fptan_extend<mode>xf4_i387): Remove insn pattern.
3147         (tanxf2): Update operands in the call to fptanxf4_i387.
3148         (tan<mode>2): Change operand 1 predicate to general_operand.
3149         Extend operand 1 to XFmode and generate tanxf3 insn.
3150         (atan2xf3): Rename from *fpatanxf3_i387.
3151         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
3152         (atan2xf3): Remove expander.
3153         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
3154         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
3155         (atan<mode>2): Change operand 1 predicate to general_operand.
3156         Extend operand 1 to XFmode and generate atanxf3 insn.
3158 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
3160         * config/i386/i386.md (x87/SSE constant load splitter): Use
3161         memory_operand instead of nonimmediate_operand for input operand
3162         predicate.
3164 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
3166         * config/i386/i386.md (float partial SSE register stall splitter): Move
3167         splitter near its instruction pattern.
3168         (float_extend partial SSE register stall splitter): Ditto.
3169         (float_truncate partial SSE register stall splitter): Ditto.
3171 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
3173         PR target/86794
3174         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3175         to speculation_safe_value_not_needed.
3177         PR target/85666
3178         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
3179         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
3180         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
3181         leaf_function_p, instead use has_hard_reg_initial_val.
3183 2018-09-09  Nathan Sidwell  <nathan@acm.org>
3185         * gcc.h (pfatal_with_name): Don't declare here.
3186         * gcc.c (pfatal_with_name): Make static.
3188 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
3190         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
3191         earlyclobber.
3193 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
3195         PR rtl-optimization/85458
3196         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
3197         priority hook to reduce the priority of EXPR.
3199 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
3201         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
3202         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
3203         with X87_ENABLE_FLOAT.  Remove preparation code.
3204         (*float<SWI48:mode><MODEF:mode>2): Rename from
3205         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
3206         math using "enabled" attribute.
3207         (*floatdi<MODEF:mode>2_i387): Rename from
3208         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
3209         enable for 32bit targets only.
3210         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
3211         splitter.
3212         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
3213         as operand 1 predicate.  Rewrite as define_insn_and_split.
3214         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
3216 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
3218         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
3219         to fallthru to FLOAT case.
3221 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
3223         PR target/86731
3224         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
3225         around folding of vec_sl to handle out of range shift values.
3227 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
3229         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
3230         Update callers to gen_fix_trunc<mode>_i387_fisttp
3231         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
3232         nonimmediate_operand.
3233         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
3234         and corresponding splitters.
3235         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
3236         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
3237         (fix_truncdi_i387_with_temp): Remove insn pattern
3238         and corresponding splitters.
3239         (fix_trunc<mode>_i387): Change operand 0 predicate to
3240         nonimmediate_operand.
3241         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
3242         and corresponding splitters.
3243         (*fistdi2_1): Remove.
3244         (fistdi2): Ditto.
3245         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
3246         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
3247         (*fist<mode>2_1): Remove.
3248         (fist<mode>2): Ditto.
3249         (fist<mode>2_with_temp): Remove insn pattern and corresponding
3250         splitters.
3251         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
3252         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
3253         (fistdi2_<rounding>): Change operand 0 predicate to
3254         nonimmediate_operand.
3255         (fistdi2_<rounding>_with_temp): Remove insn pattern
3256         and corresponding splitters.
3257         (fist<mode>2_<rounding>): Change operand 0 predicate to
3258         nonimmediate_operand.
3259         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
3260         and corresponding splitters.
3262         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
3264 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3266         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
3267         the init value.
3269 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
3271         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
3272         early gimple folding of vec_splat().
3273         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
3274         * gimple-fold.h: Add an extern define for tree_vec_extract().
3276 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
3278         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
3279         wrappers around TREE_TYPE comparisons.
3281 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3283         PR target/80080
3284         * config/s390/predicates.md: Add nonsym_memory_operand.
3285         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
3286         contains a SYMBOL_REF, load it into an intermediate pseudo.
3287         (s390_emit_compare_and_swap): Legitimize operand.
3288         * config/s390/s390.md: Use the new nonsym_memory_operand
3289         with UNSPECV_CAS patterns.
3291 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3293         PR target/80080
3294         * config/s390/s390-passes.def: New file.
3295         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
3296         declaration.
3297         (make_pass_s390_early_mach): Add declaration.
3298         * config/s390/s390.c (make_pass_s390_early_mach):
3299         (s390_option_override): Remove dynamic registration.
3300         * config/s390/t-s390: Add s390-passes.def.
3302 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3304         * config/s390/s390.c (s390_decompose_constant_pool_ref):
3305         Remove UNSPEC_LTREL_BASE check.
3306         (annotate_constant_pool_refs): Likewise.
3307         (find_constant_pool_ref): Likewise.
3308         (find_ltrel_base): Removed.
3309         (replace_ltrel_base): Removed.
3310         (s390_mainpool_finish): Remove replace_ltrel_base call.
3311         (s390_chunkify_start): Remove pending LTREL_BASE logic.
3312         (s390_chunkify_finish): Remove replace_ltrel_base call.
3313         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
3315 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
3317         PR target/86779
3318         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3319         to speculation_safe_value_not_needed.
3321 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
3322             Bernd Schmidt  <bernds_cb1@t-online.de>
3324         * config/nvptx/nvptx-opts.h: New file.
3325         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
3326         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
3327         (ASM_SPEC): Define.
3328         (TARGET_SM35): New macro.
3329         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
3330         correct predicate.
3331         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
3332         values.
3333         (misa=): New option.
3334         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
3336 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
3338         * config/i386/i386.md (truncdfsf2): Remove expander.
3339         (truncdfsf2_with_temp): Ditto.
3340         (truncxf<mode>2): Ditto.
3341         (*truncdfsf_fast_mixed): Remove insn pattern.
3342         (*truncdfsf_fast_i387): Ditto.
3343         (*truncdfsf_mixed): Ditto.
3344         (*truncdfsf_i387): Ditto.
3345         (*truncdfsf2_i387_1): Ditto.
3346         (*truncxfsf2_mixed): Ditto.
3347         (*truncxfdf2_mixed): Ditto.
3348         (*truncxf<mode>2_i387_noop): Ditto. Update callers
3349         to call gen_truncxf<mode>2 instead.
3350         (*truncxf<mode>2_i387): Remove.
3351         (reg->reg splitters): Remove splitter pattern.
3352         (reg->mem splitters): Ditto.
3354         (truncdfsf2): New insn pattern.
3355         (truncxf<mode>2): Ditto.
3357 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3359         * tree-ssa-math-opts.c (is_mult_by): New function.
3360         (is_square_of): Use the above.
3361         (optimize_recip_sqrt): New function.
3362         (pass_cse_reciprocals::execute): Use the above.
3364 2018-09-05  Richard Biener  <rguenther@suse.de>
3366         PR bootstrap/87134
3367         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
3368         to zero-init the emplaced vec.
3370 2018-09-05  Martin Liska  <mliska@suse.cz>
3372         PR tree-optimization/87205
3373         * tree-switch-conversion.c (pass_lower_switch::execute):
3374         Group cases for switch statements.
3376 2018-09-05  Richard Biener  <rguenther@suse.de>
3378         PR tree-optimization/87217
3379         * tree-ssa-sccvn.c (vuse_valueize): New.
3380         (vn_reference_lookup_pieces): Use it.
3381         (vn_reference_lookup): Likewise.
3383 2018-09-05  Nathan Sidwell  <nathan@acm.org>
3385         PR c++/87137
3386         * stor-layout.c (place_field): Scan forwards to check last
3387         bitfield when ms_bitfield_placement is in effect.
3389 2018-09-05  Richard Biener  <rguenther@suse.de>
3391         PR bootstrap/87225
3392         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
3393         return.
3395 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
3396             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
3398         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
3399         * config.gcc (extra_objs): Build it.
3400         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
3401         Likewise.
3402         * config/aarch64/aarch64-passes.def
3403         (pass_tag_collision_avoidance): New pass.
3404         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
3405         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
3406         (aarch64_classify_address): Remove static qualifier.
3407         (aarch64_address_info, aarch64_address_type): Move to...
3408         * config/aarch64/aarch64-protos.h: ... here.
3409         (make_pass_tag_collision_avoidance): New function.
3410         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
3411         New tuning flag.
3413 2018-09-05  Martin Liska  <mliska@suse.cz>
3415         * doc/gcov.texi: Update documentation of humar
3416         readable mode.
3417         * gcov.c (format_count): Print one decimal place, it provides
3418         more fine number of situations like '1G' vs. '1.4G'.
3420 2018-09-05  Martin Liska  <mliska@suse.cz>
3422         PR target/87164
3423         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
3424         * optc-gen.awk: Allow 'Var' for Deprecated options in order
3425         to generate a MASK value.
3427 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
3429         PR debug/86593
3430         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
3431         if frame pointer isn't used.
3432         (compute_frame_pointer_to_fb_displacement): Likewise.
3434 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
3436         PR target/87198
3437         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
3438         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
3439         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
3440         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
3441         and OPTION_MASK_ISA_XSAVEC_UNSET.
3443 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
3445         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
3446         XOR operations in NAND case.
3448 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
3450         * wide-int-range.cc (wide_int_range_convert): New.
3451         * wide-int-range.h (wide_int_range_convert): New.
3452         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
3453         code into wide_int_range_convert.
3454         (extract_range_into_wide_ints): Do not munge anti range constants
3455         into the entire domain.  Just return the range back.
3457 2018-09-04  Martin Liska  <mliska@suse.cz>
3459         * genmatch.c (output_line_directive): Add new argument
3460         fnargs.
3461         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
3463 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
3465         * doc/invoke.texi (Option Summary): Add whitespace.
3467         * doc/invoke.texi (Option Summary): Add -Waligned-new.
3469 2018-09-04  Richard Biener  <rguenther@suse.de>
3471         PR tree-optimization/87211
3472         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
3473         backedge value we're supposed to treat as VARYING also number
3474         the PHI to VARYING in case it got a different value-number already.
3476 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
3478         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
3479         (extract_range_from_binary_expr_1): Do not call
3480         vrp_can_optimize_bit_op.
3481         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
3482         static.
3483         (wide_int_range_get_mask_and_bounds): New.
3484         (wide_int_range_optimize_bit_op): New.
3485         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
3486         (wide_int_range_bit_and): Same.
3487         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
3488         (wide_int_range_optimize_bit_op): New.
3489         (wide_int_range_get_mask_and_bounds): New.
3491 2018-09-04  Richard Biener  <rguenther@suse.de>
3493         PR tree-optimization/87176
3494         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
3495         variable.  When value-numbering a virtual PHI node make sure
3496         to not value-number to the backedge value.
3498 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
3500         * doc/extend.texi (Long Long, Hex Floats): Document support for
3501         long long and hex floats in more recent versions of ISO C++.
3503 2018-09-03  Richard Biener  <rguenther@suse.de>
3505         PR tree-optimization/87177
3506         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
3507         cleanup.
3509 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3511         * bb-reorder.c (edge_order): Convert to C-qsort-style
3512         tri-state comparator.
3513         (reorder_basic_blocks_simple): Change std::stable_sort to
3514         gcc_stablesort.
3516 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3518         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
3519         tri-state comparator.
3520         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
3522 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3524         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
3525         (mergesort): ... here as maximum count for using netsort.
3526         (gcc_qsort): Set nlim to 3 if stable sort is requested.
3527         (gcc_stablesort): New.
3528         * system.h (gcc_stablesort): Declare.
3530 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3532         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
3533         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
3534         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
3536 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
3538         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
3539         lxsdx and stxsdx alternatives.
3540         (*mov<mode>_hardfloat64): Ditto.
3541         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
3543 2018-09-03  Richard Biener  <rguenther@suse.de>
3545         PR tree-optimization/87200
3546         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
3547         simplify result.
3549 2018-09-03  Martin Liska  <mliska@suse.cz>
3551         PR tree-optimization/87201
3552         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3553         Fix parenthesis in an expression.
3555 2018-09-03  Richard Biener  <rguenther@suse.de>
3557         PR tree-optimization/87197
3558         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
3559         visited.  CSE the VN_INFO hashtable lookup.
3561         PR tree-optimization/87169
3562         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
3563         iterating make sure there's no extra backedges from irreducible
3564         regions feeding the header.  Mark the destination block
3565         executable.
3567 2018-09-03  Martin Liska  <mliska@suse.cz>
3569         PR driver/83193
3570         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
3571         * common/common-targhooks.c (default_get_valid_option_values):
3572         New function.
3573         * common/common-targhooks.h (default_get_valid_option_values):
3574         Likewise.
3575         * common/config/i386/i386-common.c: Move processor_target_table
3576         from i386.c.
3577         (ix86_get_valid_option_values): New function.
3578         (TARGET_GET_VALID_OPTION_VALUES): New macro.
3579         * config/i386/i386.c (struct ptt): Move to i386-common.c.
3580         (PTA_*): Move all defined masks into i386-common.c.
3581         (ix86_function_specific_restore): Use new processor_cost_table.
3582         * config/i386/i386.h (struct ptt): Moved from i386.c.
3583         (struct pta): Likewise.
3584         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
3585         * doc/tm.texi.in: Likewise.
3586         * opt-suggestions.c (option_proposer::suggest_option):
3587         Pass prefix to build_option_suggestions.
3588         (option_proposer::get_completions): Likewise.
3589         (option_proposer::build_option_suggestions): Use the new target
3590         hook.
3591         * opts.c (struct option_help_tuple): New struct.
3592         (print_filtered_help): Use the new target hook.
3594 2018-09-03  Martin Liska  <mliska@suse.cz>
3596         PR middle-end/59521
3597         * predict.c (set_even_probabilities): Add likely_edges
3598         argument and handle cases where we have precisely one
3599         likely edge.
3600         (combine_predictions_for_bb): Catch also likely_edges.
3601         (tree_predict_by_opcode): Handle gswitch statements.
3602         * tree-cfg.h (find_case_label_for_value): New declaration.
3603         (find_taken_edge_switch_expr): Likewise.
3604         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3605         Find pivot in decision tree based on probabily, not by number of
3606         nodes.
3608 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
3610         * doc/standards.texi (Standards): Update Objective-C reference.
3612 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
3614         * doc/install.texi (Prerequisites): Update link for MPC.
3616 2018-09-01  Michael Matz  <matz@suse.de>
3618         PR tree-optimization/87074
3619         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
3620         PHIs for outer-loop uses.
3622 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
3624         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
3625         * doc/invoke.texi (C Dialect Options): Ditto.
3627 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
3629         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
3631 2018-08-31  Richard Biener  <rguenther@suse.de>
3633         PR tree-optimization/87168
3634         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
3635         (rpo_elim::eliminate_avail): When OP was not visited it must
3636         be available.
3638 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
3640         * tree-vrp.c (copy_value_range): Convert param "from" from
3641         "value_range *" to "const value_range *".
3642         (range_is_null): Likewise for param "vr".
3643         (range_int_cst_p): Likewise.
3644         (range_int_cst_singleton_p): Likewise.
3645         (symbolic_range_p): Likewise.
3646         (value_ranges_intersect_p): Likewise for both params.
3647         (value_range_nonnegative_p): Likewise for param "vr".
3648         (value_range_constant_singleton): Likewise.
3649         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
3650         (extract_range_into_wide_ints): Likewise for param "vr".
3651         (extract_range_from_multiplicative_op): Likewise for params "vr0"
3652         and "vr1".
3653         (vrp_can_optimize_bit_op): Likewise.
3654         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
3655         "vr1_".
3656         (extract_range_from_unary_expr): Likewise.
3657         (debug_value_range): Likewise for param "vr".
3658         (value_range::dump): Add "const" qualifier.
3659         (vrp_prop::check_array_ref): Convert local "vr" from
3660         "value_range *" to "const value_range *".
3661         (vrp_prop::check_mem_ref): Likewise.
3662         (vrp_prop::visit_stmt): Likewise for local "old_vr".
3663         (vrp_intersect_ranges_1): Likewise for param "vr_1".
3664         (vrp_intersect_ranges): Likewise.
3665         (simplify_stmt_for_jump_threading): Likewise for local "vr".
3666         (vrp_prop::vrp_finalize): Likewise.
3667         * tree-vrp.h (value_range::dump): Add "const" qualifier.
3668         (vrp_intersect_ranges): Add "const" qualifier to params as above.
3669         (extract_range_from_unary_expr): Likewise.
3670         (value_range_constant_singleton): Likewise.
3671         (symbolic_range_p): Likewise.
3672         (copy_value_range): Likewise.
3673         (extract_range_from_binary_expr_1): Likewise.
3674         (range_int_cst_p): Likewise.
3675         (vrp_set_zero_nonzero_bits): Likewise.
3676         (range_int_cst_singleton_p): Likewise.
3678 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
3680         * config/aarch64/arm_neon.h (vabsd_s64): New.
3681         (vnegd_s64): Likewise.
3683 2018-08-31  Martin Jambor  <mjambor@suse.cz>
3685         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
3687 2018-08-31  Martin Liska  <mliska@suse.cz>
3689         * ipa-icf.c (sem_item::add_type): Use
3690         sem_item::m_type_hash_cache.
3691         * ipa-icf.h: Move the cache from sem_item_optimizer
3692         to sem_item.
3694 2018-08-31  Nathan Sidwell  <nathan@acm.org>
3696         * doc/extend.texi (Backwards Compatibility): Remove implicit
3697         extern C leeway of () being (...).
3699 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3701         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
3703 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
3705         PR target/86684
3706         PR target/87149
3707         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
3709 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
3711         PR middle-end/87138
3712         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
3713         gen_int_mode.  Formatting fixes.
3715 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
3717         * target.def (custom_function_descriptors): Improve documentation.
3718         * doc/tm.texi.in (Trampolines): Expand discussion of function
3719         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
3720         beginning of the section.
3721         * doc/tm.texi: Regenerated.
3723 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
3725         * cfg.h (class auto_edge_flag): Spell out the template-id of the
3726         base class in the initializer list.  This is a workaround for
3727         building with older GCC.
3728         (class auto_bb_flag): Likewise.
3730 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
3732         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
3733         (altivec_vcmpequ<VI_char>_p): Remove star.
3734         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
3735         vector load modes.
3736         (expand_strncmp_vec_sequence): New function.
3737         (emit_final_str_compare_vec): New function.
3738         (expand_strn_compare): Add support for vector strncmp.
3739         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
3740         length specification to bytes.
3741         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
3742         (vcmpnezb_p): New pattern.
3743         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
3744         for option -mstring-compare-inline-limit.
3746 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
3748         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
3749         (PTA_SKYLAKE): Add PTA_AES.
3750         (PTA_GOLDMONT): Likewise.
3752 2018-08-29  Jan Hubicka  <jh@suse.cz>
3754         PR lto/86517
3755         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
3756         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
3758 2018-08-29  Jan Hubicka  <jh@suse.cz>
3760         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
3761         TYPE_STUB_DECL.
3762         (hash_tree): Do not visit TYPE_STUB_DECL.
3763         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
3764         stream TYPE_STUB_DECL.
3765         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
3766         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
3767         after free_lang_data.
3768         (type_in_anonymous_namespace_p): Likewise.
3770 2018-08-29  Jan Hubicka  <jh@suse.cz>
3772         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3773         comment that it has to be even number.
3774         (class sreal): Change m_sig type to int32_t.
3775         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3776         int64_t for temporary calculations.
3777         (sreal_verify_basics): Drop one bit from minimum and maximum.
3779 2018-08-30  Richard Biener  <rguenther@suse.de>
3781         PR tree-optimization/87147
3782         * tree-ssa-sccvn.c (SSA_VISITED): New function.
3783         (visit_phi): When the degenerate result is from the backedge and
3784         we didn't visit its definition yet drop to VARYING.
3785         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
3787 2018-08-29  Jan Hubicka  <jh@suse.cz>
3789         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
3790         DECL_VINDEX.
3791         (hash_tree): Likewise.
3793 2018-08-29  Jan Hubicka  <jh@suse.cz>
3795         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
3796         and TYPE_NEXT_REF_TO.
3798 2018-08-29  Jan Hubicka  <jh@suse.cz>
3800         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3801         comment that it has to be even number.
3802         (class sreal): Change m_sig type to int32_t.
3803         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3804         int64_t for temporary calculations.
3805         (sreal_verify_basics): Drop one bit from minimum and maximum.
3807 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
3809         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
3811 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
3813         PR middle-end/86995
3814         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
3815         if to_add is negative.
3817 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3819         PR middle-end/87053
3820         * builtins.c (c_strlen): Improve range checks.
3822 2018-08-29  Martin Sebor  <msebor@redhat.com>
3823             Jeff Law  <law@redhat.com>
3825         PR tree-optimization/86714
3826         PR tree-optimization/86711
3827         * builtins.c (c_strlen): Add arguments to call to string_constant.
3828         * expr.c (string_constant): Add argument.  Detect missing nul
3829         terminator and outermost declaration it's missing in.
3830         * expr.h (string_constant): Add argument.
3831         * fold-const.c (read_from_constant_string): Add arguments to call to
3832         string_constant.
3833         (c_getstr): Likewise.
3834         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3835         to string_constant.
3836         * tree-ssa-strlen.c (get_stridx): Likewise.
3838 2018-08-29  Jan Hubicka  <jh@suse.cz>
3840         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
3841         Do not stream DECL_VINDEX.
3842         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
3843         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
3844         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
3846 2018-08-29  Richard Biener  <rguenther@suse.de>
3848         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
3849         virtual operands that are not default defs to honor region
3850         boundaries.
3851         (rpo_vn_valueize): Remove ineffective code here.
3853 2018-08-29  Richard Biener  <rguenther@suse.de>
3855         PR tree-optimization/87132
3856         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
3857         when skipping defs reachable over backedges.
3859 2018-08-29  Richard Biener  <rguenther@suse.de>
3861         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
3862         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
3863         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
3864         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
3865         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
3866         (vn_reference_lookup_3): Remove use of const_parms.
3867         (free_rpo_vn): Do not free const_parms.
3868         (do_rpo_vn): Do not call init_const_parms.
3869         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
3870         SSA_NAME_POINTS_TO_READONLY_MEMORY.
3871         (call_may_clobber_ref_p_1): Likewise.
3873 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
3875         PR other/86726
3876         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
3877         (-O): Ditto.
3878         (-ftree-scev-cprop): Document.
3880 2018-08-29  Jan Hubicka  <jh@suse.cz>
3882         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
3883         parameters.
3884         (sreal constructor): Update.
3885         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
3886         sreal:operator/): Update.
3888 2018-08-29  Martin Liska  <mliska@suse.cz>
3890         * tree-switch-conversion.c (switch_conversion::expand):
3891         Strenghten assumption about gswitch statements.
3893 2018-08-29  Richard Biener  <rguenther@suse.de>
3895         PR tree-optimization/87117
3896         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
3897         re-value-number released SSA VDEFs.
3899 2018-08-29  Richard Biener  <rguenther@suse.de>
3901         PR tree-optimization/87126
3902         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
3904 2018-08-28  Jim Wilson  <jimw@sifive.com>
3906         * config/riscv/pic.md: Rewrite.
3907         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
3908         invalid address.
3909         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
3910         (SOFTF, default_load, softload, softstore): New.
3912 2018-08-28  Jeff Law  <law@redhat.com>
3914         * fold-const.c (fold_binary_loc): Remove recently added assert.
3916 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
3918         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
3919         to OP parmeter of generated function.
3921 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
3923         PR tree-optimization/87009
3924         * match.pd: Add boolean optimizations.
3926 2018-08-28  Martin Sebor  <msebor@redhat.com>
3928         PR middle-end/86631
3929         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
3930         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
3931         (pass_walloca::gate): Use it.
3932         (alloca_call_type): Same.
3933         (pass_walloca::execute): Same.
3934         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
3936 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
3938         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
3939         GCC_VERSION for usage of "__gcc_dump_printf__" format from
3940         >= 3005 to >= 9000.
3942 2018-08-28  Richard Biener  <rguenther@suse.de>
3944         PR tree-optimization/87124
3945         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
3946         constants before looking up avail.
3948 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
3950         PR middle-end/87099
3951         * calls.c (maybe_warn_nonstring_arg): Punt early if
3952         warn_stringop_overflow is zero.  Don't call get_range_strlen
3953         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
3954         Swap comparison operands to have constants on rhs.  Only use
3955         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
3956         increment lenrng[0].
3958 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
3960         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
3961         use of tree_to_shwi.  Remove duplicated test for the size being
3962         a whole number of bytes.
3964 2018-08-28  Richard Biener  <rguenther@suse.de>
3966         PR tree-optimization/87117
3967         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
3968         Handle removed stmt without LHS (GIMPLE_NOP).
3970 2018-08-28  Richard Biener  <rguenther@suse.de>
3972         PR tree-optimization/87117
3973         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
3974         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
3976 2018-08-28  Richard Biener  <rguenther@suse.de>
3978         PR tree-optimization/87117
3979         * tree-ssa-pre.c (compute_avail): Do not make expressions
3980         with predicated values available.
3981         (get_expr_value_id): Assert we do not run into predicated value
3982         expressions.
3984 2018-08-28  Richard Biener  <rguenther@suse.de>
3986         PR tree-optimization/87117
3987         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
3988         get virtual operands.
3989         (get_expr_operands): Handle STRING_CST like other decls.
3991 2018-08-28  Martin Liska  <mliska@suse.cz>
3993         * tree.h: Update documentation of fndecl_built_in_p
3994         functions.
3997 2018-08-27  Jeff Law  <law@redhat.com>
3998         PR tree-optimization/87110
3999         * tree-ssa-dse.c (compute_trims): Handle non-constant
4000         TYPE_SIZE_UNIT.
4002 2018-08-27  Martin Sebor  <msebor@redhat.com>
4004         PR tree-optimization/86914
4005         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
4007 2018-08-27  Martin Sebor  <msebor@redhat.com>
4009         PR tree-optimization/87112
4010         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
4011         the type of the bound argument.
4013 2018-08-27  Jeff Law  <law@redhat.com>
4015         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
4016         type does not have a TYPE_SIZE_UNIT.
4018 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
4020         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
4021         with include of backend.h.
4023 2018-08-27  Richard Biener  <rguenther@suse.de>
4025         PR tree-optimization/86927
4026         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
4027         use const cond reduction code.
4029 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
4031         PR tree-optimization/85758
4032         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
4034 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
4036         PR c++/87091
4037         * diagnostic-show-locus.c (class layout_range): Update for
4038         conversion of show_caret_p to a tri-state.
4039         (layout_range::layout_range): Likewise.
4040         (make_range): Likewise.
4041         (layout::maybe_add_location_range): Likewise.
4042         (layout::should_print_annotation_line_p): Don't show annotation
4043         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
4044         (layout::get_state_at_point): Update for conversion of
4045         show_caret_p to a tri-state.  Bail out early for
4046         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
4047         underlining or source colorization.
4048         (gcc_rich_location::add_location_if_nearby): Update for conversion
4049         of show_caret_p to a tri-state.
4050         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
4051         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
4052         Likewise.
4053         (selftest::test_one_liner_labels): Likewise.
4054         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
4055         conversion of show_caret_p to a tri-state.
4056         * pretty-print.c (text_info::set_location): Likewise.
4057         * pretty-print.h (text_info::set_location): Likewise.
4058         * substring-locations.c (format_warning_n_va): Likewise.
4059         * tree-diagnostic.c (default_tree_printer): Likewise.
4060         * tree-pretty-print.c (newline_and_indent): Likewise.
4062 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
4064         PR c++/87091
4065         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
4066         line above for line-insertion fix-it hints.
4067         (selftest::test_fixit_insert_containing_newline): Update the
4068         expected results, and add a test with line-numbering enabled.
4070 2018-08-27  Martin Liska  <mliska@suse.cz>
4072         PR sanitizer/86962
4073         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
4074         params with DECL_HAS_VALUE_EXPR_P.
4076 2018-08-27  Martin Liska  <mliska@suse.cz>
4078         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
4079         selected expansion strategy.
4081 2018-08-27  Martin Liska  <mliska@suse.cz>
4083         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
4084         * builtins.c (is_builtin_fn): Likewise.
4085         * attribs.c (diag_attr_exclusions): Use new function
4086         fndecl_built_in_p and remove check for FUNCTION_DECL if
4087         possible.
4088         (builtin_mathfn_code): Likewise.
4089         (fold_builtin_expect): Likewise.
4090         (fold_call_expr): Likewise.
4091         (fold_builtin_call_array): Likewise.
4092         (fold_call_stmt): Likewise.
4093         (set_builtin_user_assembler_name): Likewise.
4094         (is_simple_builtin): Likewise.
4095         * calls.c (gimple_alloca_call_p): Likewise.
4096         (maybe_warn_nonstring_arg): Likewise.
4097         * cfgexpand.c (expand_call_stmt): Likewise.
4098         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
4099         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
4100         (cgraph_node::verify_node): Likewise.
4101         * cgraphclones.c (build_function_decl_skip_args): Likewise.
4102         (cgraph_node::create_clone): Likewise.
4103         * config/arm/arm.c (arm_insert_attributes): Likewise.
4104         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
4105         * dse.c (scan_insn): Likewise.
4106         * expr.c (expand_expr_real_1): Likewise.
4107         * fold-const.c (operand_equal_p): Likewise.
4108         (fold_binary_loc): Likewise.
4109         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
4110         * gimple-low.c (lower_stmt): Likewise.
4111         * gimple-pretty-print.c (dump_gimple_call): Likewise.
4112         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
4113         Likewise.
4114         * gimple.c (gimple_build_call_from_tree): Likewise.
4115         (gimple_call_builtin_p): Likewise.
4116         (gimple_call_combined_fn): Likewise.
4117         * gimplify.c (gimplify_call_expr): Likewise.
4118         (gimple_boolify): Likewise.
4119         (gimplify_modify_expr): Likewise.
4120         (gimplify_addr_expr): Likewise.
4121         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
4122         * ipa-cp.c (determine_versionability): Likewise.
4123         * ipa-fnsummary.c (compute_fn_summary): Likewise.
4124         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
4125         * ipa-split.c (visit_bb): Likewise.
4126         (split_function): Likewise.
4127         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
4128         * lto-cgraph.c (input_node): Likewise.
4129         * lto-streamer-out.c (write_symbol): Likewise.
4130         * omp-low.c (setjmp_or_longjmp_p): Likewise.
4131         (lower_omp_1): Likewise.
4132         * predict.c (strip_predict_hints): Likewise.
4133         * print-tree.c (print_node): Likewise.
4134         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
4135         * trans-mem.c (is_tm_irrevocable): Likewise.
4136         (is_tm_load): Likewise.
4137         (is_tm_simple_load): Likewise.
4138         (is_tm_store): Likewise.
4139         (is_tm_simple_store): Likewise.
4140         (is_tm_abort): Likewise.
4141         (tm_region_init_1): Likewise.
4142         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
4143         * tree-cfg.c (verify_gimple_call): Likewise.
4144         (move_stmt_r): Likewise.
4145         (stmt_can_terminate_bb_p): Likewise.
4146         * tree-eh.c (lower_eh_constructs_2): Likewise.
4147         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
4148         * tree-inline.c (remap_gimple_stmt): Likewise.
4149         (copy_bb): Likewise.
4150         (estimate_num_insns): Likewise.
4151         (fold_marked_statements): Likewise.
4152         * tree-sra.c (scan_function): Likewise.
4153         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
4154         (optimize_stack_restore): Likewise.
4155         (pass_fold_builtins::execute): Likewise.
4156         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
4157         (mark_all_reaching_defs_necessary_1): Likewise.
4158         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
4159         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
4160         (pass_forwprop::execute): Likewise.
4161         * tree-ssa-loop-im.c (stmt_cost): Likewise.
4162         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
4163         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
4164         * tree-ssa-strlen.c (get_string_length): Likewise.
4165         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
4166         (find_func_aliases_for_call): Likewise.
4167         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
4168         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
4169         * tree-tailcall.c (find_tail_calls): Likewise.
4170         * tree.c (need_assembler_name_p): Likewise.
4171         (free_lang_data_in_decl): Likewise.
4172         (get_call_combined_fn): Likewise.
4173         * ubsan.c (is_ubsan_builtin_p): Likewise.
4174         * varasm.c (incorporeal_function_p): Likewise.
4175         * tree.h (DECL_BUILT_IN): Remove and replace with
4176         fndecl_built_in_p.
4177         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
4178         (fndecl_built_in_p): New.
4180 2018-08-27  Martin Liska  <mliska@suse.cz>
4182         PR tree-optimization/86847
4183         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
4184         Dump also subtree probability.
4185         (switch_decision_tree::do_jump_if_equal): New function.
4186         (switch_decision_tree::emit_case_nodes): Handle special
4187         situations in balanced tree that can be emitted much simpler.
4188         Fix calculation of probabilities that happen in tree expansion.
4189         * tree-switch-conversion.h (struct cluster): Add
4190         is_single_value_p.
4191         (struct simple_cluster): Likewise.
4192         (struct case_tree_node): Add new function has_child.
4193         (do_jump_if_equal): New.
4195 2018-08-27  Martin Liska  <mliska@suse.cz>
4197         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
4198         Add new argument to bit_test_cluster constructor.
4199         (bit_test_cluster::emit): Set bits really number of values
4200         handlel by a test.
4201         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
4202         probability argument.
4203         * tree-switch-conversion.h (struct bit_test_cluster):
4204         Add m_handles_entire_switch.
4206 2018-08-27  Martin Liska  <mliska@suse.cz>
4208         PR tree-optimization/86702
4209         * tree-switch-conversion.c (jump_table_cluster::emit):
4210         Make probabilities even for values in jump table
4211         according to number of cases handled.
4212         (switch_decision_tree::compute_cases_per_edge): Pass
4213         argument to reset_out_edges_aux function.
4214         (switch_decision_tree::analyze_switch_statement): Likewise.
4215         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
4216         Make it static.
4218 2018-08-27  Martin Liska  <mliska@suse.cz>
4220         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
4221         cfun argument explicitly.
4222         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
4223         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
4224         function gimple_switch_default_bb.
4225         (convert_switch_statements):
4226         (expand_builtins):
4227         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
4228         * stmt.c (label_to_block_fn): Use label_to_block and pass
4229         cfun argument explicitly and use gimple_switch_label_bb.
4230         (expand_case): Likewise.
4231         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
4232         cfun argument explicitly. Likewise.
4233         (make_edges_bb): Likewise.
4234         (make_cond_expr_edges): Likewise.
4235         (get_cases_for_edge): Likewise.
4236         (make_gimple_switch_edges): Likewise.
4237         (label_to_block_fn): Likewise.
4238         (label_to_block): Likewise.
4239         (make_goto_expr_edges): Likewise.
4240         (make_gimple_asm_edges): Likewise.
4241         (main_block_label): Likewise.
4242         (group_case_labels_stmt): Likewise.
4243         (find_taken_edge_computed_goto): Likewise.
4244         (find_taken_edge_switch_expr): Likewise.
4245         (gimple_verify_flow_info): Likewise.
4246         (gimple_redirect_edge_and_branch): Likewise.
4247         (gimple_switch_label_bb): New function.
4248         (gimple_switch_default_bb): Likewise.
4249         (gimple_switch_edge): Likewise.
4250         (gimple_switch_default_edge): Likewise.
4251         * tree-cfg.h (label_to_block_fn): Remove and replace ...
4252         (label_to_block): ... with this.
4253         (gimple_switch_label_bb): New.
4254         (gimple_switch_default_bb): Likewise.
4255         (gimple_switch_edge): Likewise.
4256         (gimple_switch_default_edge): Likewise.
4257         * tree-cfgcleanup.c (convert_single_case_switch): Use
4258         new gimple functions and pass new argument to label_to_block.
4259         (cleanup_control_flow_bb):
4260         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
4261         cfun argument explicitly.
4262         (make_eh_edges): Likewise.
4263         (redirect_eh_dispatch_edge): Likewise.
4264         (lower_resx): Likewise.
4265         (lower_eh_dispatch): Likewise.
4266         (maybe_remove_unreachable_handlers): Likewise.
4267         (unsplit_eh): Likewise.
4268         (cleanup_empty_eh): Likewise.
4269         (verify_eh_edges): Likewise.
4270         (verify_eh_dispatch_edge): Likewise.
4271         * tree-ssa-dom.c (record_edge_info): Likewise.
4272         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
4273         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
4274         (thread_through_normal_block): Likewise.
4275         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
4276         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
4277         * tree-switch-conversion.c (switch_conversion::collect): Use new
4278         gimple functions.
4279         (switch_conversion::check_final_bb): Likewise.
4280         (switch_conversion::gather_default_values): Pass new argument
4281         to label_to_block.
4282         (switch_conversion::build_constructors): Likewise.
4283         (switch_decision_tree::compute_cases_per_edge): Use new
4284         gimple_switch_edge function.
4285         (switch_decision_tree::analyze_switch_statement): Pass new argument
4286         to label_to_block.
4287         (switch_decision_tree::try_switch_expansion): Use
4288         gimple_switch_default_edge.
4289         * tree-vrp.c (find_switch_asserts): Pass new argument
4290         to label_to_block.
4291         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
4292         (vr_values::simplify_switch_using_ranges): Likewise.
4294 2018-08-27  Richard Biener  <rguenther@suse.de>
4296         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
4297         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
4299         * tree-ssa-sccvn.h (struct vn_pval): New structure.
4300         (struct vn_nary_op_s): Add unwind_to member.  Add
4301         predicated_values flag and put result into a union together
4302         with a linked list of vn_pval.
4303         (struct vn_ssa_aux): Add name member to make maintaining
4304         a map of SSA name to vn_ssa_aux possible.  Remove no longer
4305         needed info, dfsnum, low, visited, on_sccstack, use_processed
4306         and range_info_anti_range_p members.
4307         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
4308         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
4309         New functions.
4310         (vn_valueize): New global.
4311         (vn_context_bb): Likewise.
4312         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
4313         VN_INFO_PTR_INFO): Remove.
4314         * tree-ssa-sccvn.c: ... (rewrite)
4315         (pass_fre::execute): For -O2+ initialize loops and run
4316         RPO VN in optimistic mode (iterating).  For -O1 and -Og
4317         run RPO VN in non-optimistic mode.
4318         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
4319         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
4320         * doc/invoke.texi (sccvn-max-scc-size): Remove.
4321         (rpo-vn-max-loop-depth): Document.
4322         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
4323         when valuezing the VUSE signals we walked out of the region.
4324         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
4325         (phi_translate): Set VN context block to use for availability
4326         lookup.
4327         (compute_avail): Likewise.
4328         (pre_valueize): New function.
4329         (pass_pre::execute): Adjust to the RPO VN API.
4331         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
4332         (propagate_constants_for_unrolling): Remove.
4333         (tree_unroll_loops_completely): Perform value-numbering
4334         on the unrolled bodies loop parent.
4336 2018-08-27  Richard Biener  <rguenther@suse.de>
4338         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
4339         for partial antic compute.
4341 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
4343         PR rtl-optimization/87065
4344         * combine.c (simplify_if_then_else): Formatting fix.
4345         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
4346         check.
4347         (known_cond): Don't return const_true_rtx for vector modes.  Use
4348         CONST0_RTX instead of const0_rtx.  Formatting fixes.
4350 2018-08-27  Martin Liska  <mliska@suse.cz>
4352         PR gcov-profile/87069
4353         * gcov.c (process_file): Record files already processed
4354         and warn about a file being processed multiple times.
4356 2018-08-27  Martin Liska  <mliska@suse.cz>
4358         PR driver/83193
4359         * config/aarch64/aarch64.c (aarch64_override_options_internal):
4360         Set default values for x_aarch64_*_string strings.
4361         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
4362         prefix.  For -mabi do not print '=ABI' in help and use
4363         <option_value> format for -msve-vector-bits and -moverride
4364         options.
4366 2018-08-26  Jeff Law  <law@redhat.com>
4368         * config/mips/frame-header-opt.c: Include "backend.h" rather than
4369         "cfg.h"
4371 2018-08-26  Marek Polacek  <polacek@redhat.com>
4373         PR c++/87029, Implement -Wredundant-move.
4374         * doc/invoke.texi: Document -Wredundant-move.
4376 2018-08-25  Martin Sebor  <msebor@redhat.com>
4378         PR tree-optimization/87059
4379         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
4380         to the same type as the other.
4381         * fold-const.c (fold_binary_loc): Assert expectation.
4383 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
4385         * config/darwin.c (machopic_legitimize_pic_address): Clean up
4386         extraneous parentheses, dead code section and formatting.
4388 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
4390         PR c++/87091
4391         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
4392         wide enough for jumps in the line-numbering to be visible.
4393         (layout::print_gap_in_line_numbering): New member function.
4394         (layout::calculate_line_spans): When using line numbering, merge
4395         line spans that are only 1 line apart.
4396         (diagnostic_show_locus): When printing line numbers, show gaps in
4397         line numbering directly, rather than printing headers.
4398         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
4399         line-numbering with multiple line spans.
4400         (selftest::test_fixit_insert_containing_newline_2): Add test of
4401         line-numbering, in which the spans are close enough to be merged.
4403 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
4405         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
4406         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
4407         * tree-vrp.c (range_is_nonnull): Remove.
4408         (range_includes_zero_p): Accept value_range instead of min/max.
4409         (extract_range_from_binary_expr_1): Do not early bail on
4410         POINTER_PLUS_EXPR.
4411         Use range_includes_zero_p instead of range_is_nonnull.
4412         (extract_range_from_unary_expr): Use range_includes_zero_p instead
4413         of range_is_nonnull.
4414         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
4415         special case VR_ANTI_RANGE.
4416         (vrp_finalize): Same.
4417         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
4418         instead of min/max.
4419         (range_is_nonnull): Remove.
4420         * vr-values.c (vrp_stmt_computes_nonzero): Use
4421         range_includes_zero_p instead of range_is_nonnull.
4422         (extract_range_basic): Pass value_range to range_includes_zero_p
4423         instead of range_is_nonnull.
4425 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
4427         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
4428         * emit-rtl.h (rtl_data): Remove return_bnd.
4429         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
4430         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
4431         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
4432         (POINTER_BOUNDS_MODE): Remove definition.
4433         (make_pointer_bounds_mode): Remove.
4434         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
4435         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
4436         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
4437         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
4438         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
4439         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
4440         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
4442         * config/i386/i386-modes.def (BND32, BND64): Remove.
4443         * config/i386/i386.c (dbx_register_map): Remove bound registers.
4444         (dbx64_register_map): Ditto.
4445         (svr4_dbx_register_map): Ditto.
4446         (indirect_thunk_bnd_needed): Remove.
4447         (indirect_thunks_bnd_used): Ditto.
4448         (indirect_return_bnd_needed): Ditto.
4449         (indirect_return_via_cx_bnd): Ditto.
4450         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
4451         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
4452         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
4453         (output_indirect_thunk_function): Remove handling of
4454         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
4455         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
4456         (ix86_save_reg): Remove handling of crtl->return_bnd.
4457         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
4458         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
4459         and UNSPEC_BNDLX_ADDR.
4460         (ix86_output_indirect_branch_via_reg): Remove handling of
4461         indirect_thunk_prefix_bnd.
4462         (ix86_output_indirect_branch_via_push): Ditto.
4463         (ix86_output_function_return): Ditto.
4464         (ix86_output_indirect_function_return): Ditto.
4465         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
4466         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
4467         (CALL_USED_REGISTERS): Ditto.
4468         (REG_ALLOC_ORDER): Update for removal of bound registers.
4469         (HI_REGISTER_NAMES): Ditto.
4470         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
4471         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
4472         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
4473         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
4474         (FIRST_PSEUDO_REG): Update.
4475         (BND): Remove mode iterator.
4476         * config/i386/predicates.md (bnd_mem_operator): Remove.
4478 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
4480         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
4481         vectors.
4483 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
4485         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
4486         the case in which the permute needs only a single element and
4487         repeats for every vector of the result.  Extend that case to
4488         handle variable-length vectors.
4489         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4491 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
4493         PR debug/79342
4494         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
4495         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
4497 2018-08-24  Richard Biener  <rguenther@suse.de>
4499         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
4500         bb_flags_allocated members.
4501         (auto_flag): New RAII class for allocating flags.
4502         (auto_edge_flag): New RAII class for allocating edge flags.
4503         (auto_bb_flag): New RAII class for allocating bb flags.
4504         * cfgloop.c (verify_loop_structure): Allocate temporary edge
4505         flag dynamically.
4506         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
4507         in favor of temporarily allocated BB flag.
4508         * hsa-brig.c: Re-order includes.
4509         * hsa-dump.c: Likewise.
4510         * hsa-regalloc.c: Likewise.
4511         * print-rtl.c: Likewise.
4512         * profile-count.c: Likewise.
4514 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
4516         PR target/86989
4517         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
4518         the TOC register.
4520 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
4522         PR 87073/bootstrap
4523         * wide-int-range.cc (wide_int_range_div): Do not ignore result
4524         from wide_int_range_multiplicative_op.
4526 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4528         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
4529         "permutaion".
4531 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
4533         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
4534         to 'expanded'.
4536 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
4538         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
4539         full GENERIC expression used for replacement.
4541 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
4543         * tree-vrp.c (abs_extent_range): Remove.
4544         (extract_range_into_wide_ints): Pass wide ints by reference.
4545         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
4546         Pass wide ints by reference in all calls to
4547         extract_range_into_wide_ints.
4548         * wide-int-range.cc (wide_int_range_div): New.
4549         * wide-int-range.h (wide_int_range_div): New.
4550         (wide_int_range_includes_zero_p): New.
4551         (wide_int_range_zero_p): New.
4553 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
4555         * config/aarch64/aarch64.md (arches): New enum.
4556         (arch): New enum attr.
4557         (arch_enabled): New attr.
4558         (enabled): Now uses arch_enabled only.
4559         (simd, sve, fp16): Removed attribute.
4560         (fp): Attr now defined in terms of 'arch'.
4561         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
4562         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
4563         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
4564         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
4565         attributes into 'arch'.
4566         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
4567         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
4568         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
4569         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
4570         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
4571         'simd' attribute into 'arch'.
4572         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
4573         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
4574         Convert use of 'fp' attribute to 'arch'.
4575         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
4576         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
4577         into 'arch'.
4578         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
4579         (different modes) Merge 'fp' and 'simd' into 'arch'.
4580         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
4581         'simd' into 'arch'.
4583 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
4585         PR rtl-optimization/87026
4586         * expmed.c (canonicalize_comparison): If we can no longer create
4587         pseudoregisters, don't.
4589 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
4591         PR target/86951
4592         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
4593         prototype.
4594         * config/arm/arm.c (speculation_barrier_libfunc): New static
4595         variable.
4596         (arm_init_libfuncs): Initialize it.
4597         (arm_emit_speculation_barrier): New function.
4598         * config/arm/arm.md (speculation_barrier): Call
4599         arm_emit_speculation_barrier for architectures that do not have
4600         DSB or ISB.
4601         (speculation_barrier_insn): Only match on Armv7 or later.
4603 2018-08-23  Richard Biener  <rguenther@suse.de>
4605         PR middle-end/87024
4606         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
4607         calls.
4609 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
4611         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
4612         of single-vector TBLs.
4613         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
4614         one input is given.
4616 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
4618         PR target/85910
4619         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
4620         aarch64_evpc_tbl guard.
4622 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4624         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
4625         behaviour.
4627 2018-08-22  Martin Sebor  <msebor@redhat.com>
4629         PR middle-end/87052
4630         * tree-pretty-print.c (pretty_print_string): Add argument.
4631         (dump_generic_node): Call to pretty_print_string with string size.
4633 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
4635         PR rtl-optimization/86771
4636         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
4637         of two SETs into those two SETs, one to be placed at i2, if that SETs
4638         destination is modified between i2 and i3.
4640 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4642         PR tree-optimization/86725
4643         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
4644         function.
4645         (vect_analyze_scalar_cycles_1): Check it.
4647 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4649         PR tree-optimization/86725
4650         * tree-vect-loop.c (vect_is_simple_reduction): When treating
4651         an outer loop phi as a double reduction, make sure that the
4652         single user of the phi result is an inner loop phi.
4654 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4656         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
4657         grouped stores with gaps to a strided group.
4659 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4661         * tree-vect-stmts.c (get_group_load_store_type)
4662         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
4663         first statement in a group.
4665 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4667         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
4668         the sequence used in gcc/gcc.c.
4670 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4672         PR other/704
4673         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
4674         building it.
4676 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4678         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
4679         Darwin10-specific unwinder-shim.
4680         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
4681         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
4682         New to cater for Darwin10 Rosetta.
4684 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4686         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
4687         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
4689 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4691         PR bootstrap/81033
4692         PR target/81733
4693         PR target/52795
4694         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
4695         (dwarf2out_switch_text_section): Generate a local label for the
4696         second function sub-section and apply it as the second FDE start
4697         label.
4698         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
4699         second sub-section start.
4701 2018-08-22  Richard Biener  <rguenther@suse.de>
4703         PR tree-optimization/86988
4704         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
4706 2018-08-22  Richard Biener  <rguenther@suse.de>
4708         PR tree-optimization/86945
4709         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
4711 2018-08-22  Alexandre Oliva <oliva@adacore.com>
4713         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
4714         a comment about how uses of r2 for .sdata2 come about.
4716 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
4718         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
4720 2018-08-21  Marek Polacek  <polacek@redhat.com>
4722         PR c++/86981, Implement -Wpessimizing-move.
4723         * doc/invoke.texi: Document -Wpessimizing-move.
4725 2018-08-21  Jan Hubicka  <jh@suse.cz>
4727         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
4728         * tree.h (is_redundant_typedef): Remove.
4729         * dwarf2out.c (is_redundant_typedef): Turn into static function.
4731 2018-08-21  Jan Hubicka  <jh@suse.cz>
4733         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
4734         when possible.
4736 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
4738         * expmed.c (extract_low_bits): Reject invalid subregs early.
4740 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4742         PR middle-end/86121
4743         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
4744         behaviour.
4746 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4748         * config/vxworks.h: Guard vxworks_asm_out_constructor and
4749         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
4750         * config/vxworks.c: Likewise.
4752 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4754         * config/vxworks.c: Set targetm.have_ctors_dtors
4755         if HAVE_INITFINI_ARRAY_SUPPORT.
4756         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
4757         if HAVE_INITFINI_ARRAY_SUPPORT.
4759 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4761         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
4762         default search path for VxWorks < 7.
4764 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4766         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
4767         (get_format_string): Refer to c_getstr.
4769 2018-08-21  Tom de Vries  <tdevries@suse.de>
4771         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4772         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4773         (debuginfo_early_stop): Declare.
4774         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4775         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4776         (debuginfo_early_stop): New function.
4777         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
4778         and debuginfo_early_stop.
4779         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
4780         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
4781         (general_init): Call debuginfo_early_init.
4782         (finalize): Call debuginfo_fini.
4783         (do_compile): Call debuginfo_init.
4784         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
4785         -fdump-early-debug.
4786         (@item -fdump-debug, @item -fdump-earlydebug): Add.
4788 2018-08-21  Tom de Vries  <tdevries@suse.de>
4790         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
4791         flag_dump_noaddr and flag_dump_unnumbered.
4793 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
4795         * wide-int-range.cc (wide_int_range_abs): New.
4796         (wide_int_range_order_set): Rename from wide_int_range_min_max.
4797         * wide-int-range.h (wide_int_range_abs): New.
4798         (wide_int_range_min_max): New.
4799         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
4800         case to call wide_int_range_abs.
4801         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
4802         (extract_range_from_abs_expr): Delete.
4804 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
4806         PR target/87033
4807         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
4808         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
4809         for indexed loads.
4811 2018-08-20  Nathan Sidwell  <nathan@acm.org>
4812             Jeff Law <law@redhat.com>
4814         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
4815         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
4817 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
4819         PR other/84889
4820         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
4821         (decl_attributes): Likewise.
4822         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
4823         instance.
4824         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4825         * diagnostic-core.h (class auto_diagnostic_group): New class.
4826         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
4827         (diagnostic_report_diagnostic): Handle the first diagnostics within
4828         a group.
4829         (emit_diagnostic): Add auto_diagnostic_group instance.
4830         (inform): Likewise.
4831         (inform_n): Likewise.
4832         (warning): Likewise.
4833         (warning_at): Likewise.
4834         (warning_n): Likewise.
4835         (pedwarn): Likewise.
4836         (permerror): Likewise.
4837         (error): Likewise.
4838         (error_n): Likewise.
4839         (error_at): Likewise.
4840         (sorry): Likewise.
4841         (fatal_error): Likewise.
4842         (internal_error): Likewise.
4843         (internal_error_no_backtrace): Likewise.
4844         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
4845         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
4846         * diagnostic.h (struct diagnostic_context): Add fields
4847         "diagnostic_group_nesting_depth",
4848         "diagnostic_group_emission_count", "begin_group_cb",
4849         "end_group_cb".
4850         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
4851         Add auto_diagnostic_group instance(s).
4852         (find_explicit_erroneous_behavior): Likewise.
4853         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
4854         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
4855         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
4856         (gimplify_va_arg_expr): Likewise.
4857         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
4858         (HSA_SORRY_AT): Likewise.
4859         * ipa-devirt.c (compare_virtual_tables): Likewise.
4860         (warn_odr): Likewise.
4861         * multiple_target.c (expand_target_clones): Likewise.
4862         * opts-common.c (cmdline_handle_error): Likewise.
4863         * reginfo.c (globalize_reg): Likewise.
4864         * substring-locations.c (format_warning_n_va): Likewise.
4865         * tree-inline.c (expand_call_inline): Likewise.
4866         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
4867         * tree-ssa-loop-niter.c
4868         (do_warn_aggressive_loop_optimizations): Likewise.
4869         * tree-ssa-uninit.c (warn_uninit): Likewise.
4870         * tree.c (warn_deprecated_use): Likewise.
4872 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
4874         PR target/87014
4875         * config/i386/i386.md (eh_return): Always update EH return
4876         address in word_mode.
4878 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
4880         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
4881         TARGET_SPLIT_COMPLEX_ARG is defined.
4883 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4885         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
4887 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4889         PR target/86984
4890         * expr.c (expand_assignment): Assert that bitpos is positive.
4891         (store_field): Likewise
4892         (expand_expr_real_1): Make sure that bitpos is positive.
4893         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
4894         integer overflow.
4896 2018-08-20  Nathan Sidwell  <nathan@acm.org>
4898         * Makefile.in (CPP_ID_DATA_H): Delete.
4899         (CPP_INTERNAL_H): Don't add it.
4900         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
4901         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
4903 2018-08-20  Richard Biener  <rguenther@suse.de>
4905         PR tree-optimization/78655
4906         * tree-vrp.c (extract_range_from_binary_expr_1): Make
4907         pointer + offset nonnull if either operand is nonnull work.
4909 2018-08-20  Tom de Vries  <tdevries@suse.de>
4911         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
4912         unless the referenced die describes the added property using
4913         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
4914         Otherwise, add a DW_AT_location to the referenced die.
4916 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
4918         PR target/86994
4919         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
4920         register_operand when calling ix86_set_reg_reg_cost.
4921         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
4922         Set *total to 0 for operands that satisfy x86_64_immediate_operand
4923         predicate and to 1 otherwise.
4925 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
4927         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
4928         emit a diagnostic that it is not supported and reset the option.
4929         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
4930         supported and consume the option.  (ASM_FINAL_SPEC): New.
4932 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
4934         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
4935         a sentence.
4937 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
4939         C-SKY port: Documentation
4941         * doc/extend.texi (C-SKY Function Attributes): New section.
4942         * doc/invoke.texi (Option Summary): Add C-SKY options.
4943         (C-SKY Options): New section.
4944         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
4946 2018-08-17  Jojo  <jijie_rong@c-sky.com>
4947             Huibin Wang  <huibin_wang@c-sky.com>
4948             Sandra Loosemore  <sandra@codesourcery.com>
4949             Chung-Lin Tang  <cltang@codesourcery.com>
4951         C-SKY port: Backend implementation
4953         * config/csky/*: New.
4954         * common/config/csky/*: New.
4956 2018-08-17  Jojo  <jijie_rong@c-sky.com>
4957             Huibin Wang  <huibin_wang@c-sky.com>
4958             Sandra Loosemore  <sandra@codesourcery.com>
4959             Chung-Lin Tang  <cltang@codesourcery.com>
4960             Andrew Jenner  <andrew@codesourcery.com>
4962         C-SKY port: Configury
4964         * config.gcc (csky-*-*): New.
4965         * configure.ac: Add csky to targets for dwarf2 debug_line support.
4966         * configure: Regenerated.
4968 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
4970         * dump-context.h: Include "dumpfile.h".
4971         (dump_context::dump_printf_va): Convert final param from va_list
4972         to va_list *.  Convert from ATTRIBUTE_PRINTF to
4973         ATTRIBUTE_GCC_DUMP_PRINTF.
4974         (dump_context::dump_printf_loc_va): Likewise.
4975         * dumpfile.c: Include "stringpool.h".
4976         (make_item_for_dump_printf_va): Delete.
4977         (make_item_for_dump_printf): Delete.
4978         (class dump_pretty_printer): New class.
4979         (dump_pretty_printer::dump_pretty_printer): New ctor.
4980         (dump_pretty_printer::emit_items): New member function.
4981         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
4982         function.
4983         (dump_pretty_printer::emit_item): New member function.
4984         (dump_pretty_printer::stash_item): New member function.
4985         (dump_pretty_printer::format_decoder_cb): New member function.
4986         (dump_pretty_printer::decode_format): New member function.
4987         (dump_context::dump_printf_va): Reimplement in terms of
4988         dump_pretty_printer.
4989         (dump_context::dump_printf_loc_va): Convert final param from va_list
4990         to va_list *.
4991         (dump_context::begin_scope): Reimplement call to
4992         make_item_for_dump_printf.
4993         (dump_printf): Update for change to dump_printf_va.
4994         (dump_printf_loc): Likewise.
4995         (selftest::test_capture_of_dump_calls): Convert "stmt" from
4996         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
4997         with %T, %E, and %G.
4998         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
4999         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
5000         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
5001         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
5002         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
5003         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
5004         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
5005         within a dump_printf_loc call to "%wu".
5006         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
5007         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
5008         missing space after "=".
5009         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
5010         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
5011         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
5012         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
5013         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
5014         duplicate "vectorized" from message.
5016 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5018         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
5019         polyNxK_t element's TYPE_STRING_FLAG.
5021 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
5023         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
5024         (they were unnamed before).  Fix comments.
5026 2018-08-17  Nathan Sidwell  <nathan@acm.org>
5028         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
5030 2018-08-17  Richard Biener  <rguenther@suse.de>
5032         PR tree-optimization/86841
5033         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
5035 2018-08-17  Martin Liska  <mliska@suse.cz>
5037         * common.opt: Remove Warn, Init and Report for options with
5038         Ignore/Deprecated flag. Warning is done automatically for
5039         Deprecated flags.
5040         * config/i386/i386.opt: Likewise.
5041         * config/ia64/ia64.opt: Likewise.
5042         * config/rs6000/rs6000.opt: Likewise.
5043         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
5044         Remove usage of flag_check_pointer_bounds.
5045         * lto-wrapper.c (merge_and_complain): Do not handle
5046         OPT_fcheck_pointer_bounds.
5047         (append_compiler_options): Likewise.
5048         * opt-functions.awk: Do not handle Deprecated.
5049         * optc-gen.awk: Check that Var, Report and Init are not
5050         used for an option with Ignore/Deprecated flag.
5051         * opts-common.c (decode_cmdline_option): Do not report
5052         CL_ERR_DEPRECATED.
5053         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
5054         options.
5055         * opts.h (struct cl_option): Remove cl_deprecated flag.
5056         (CL_ERR_DEPRECATED): Remove error enum value.
5058 2018-08-17  Richard Biener  <rguenther@suse.de>
5060         PR middle-end/86505
5061         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
5062         across a va-arg-pack using call adjust its return value accordingly.
5064 2018-08-16  Martin Sebor  <msebor@redhat.com>
5066         PR tree-optimization/86853
5067         * gimple-ssa-sprintf.c (struct format_result): Rename member.
5068         (struct fmtresult): Add member and initialize it in ctors.
5069         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
5070         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
5071         (format_directive): Set POSUNDER4K when MAYFAIL is set.
5072         (parse_directive): Handle %C same as %c.
5073         (sprintf_dom_walker::compute_format_length): Adjust.
5074         (is_call_safe): Adjust.
5076 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5078         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
5079         for determining how to count the elements.
5080         * builtins.h (c_strlen): Adjust prototype.
5081         * expr.c (string_constant): Add new parameter mem_size.
5082         Set *mem_size appropriately.
5083         * expr.h (string_constant): Adjust protoype.
5084         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
5085         * gimple-fold.h (get_range_strlen): Adjust prototype.
5086         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
5087         (format_string): Call get_string_length with eltsize.
5089 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
5091         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
5092         to emit the span, rather than setting it as the prefix.
5094 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
5096         * diagnostic-show-locus.c (layout::start_annotation_line): Add
5097         "margin_char" parameter, defaulting to space.  Use it in place
5098         of pp_space for the initial part of the margin.
5099         (layout::print_leading_fixits): Use '+' when filling the margin
5100         of line-insertion fix-it hints.
5102 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
5104         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
5105         Delete.
5107 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
5109         * config/rs6000/altivec.md: Don't set length attribute to the default
5110         value.
5111         * config/rs6000/darwin.md: Ditto.
5112         * config/rs6000/dfp.md: Ditto.
5113         * config/rs6000/htm.md: Ditto.
5114         * config/rs6000/rs6000.md: Ditto.
5115         * config/rs6000/sync.md: Ditto.
5116         * config/rs6000/vsx.md: Ditto.
5118 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
5120         * config/rs6000/altivec.md: Don't set length attribute to the default
5121         value, for branch instructions.
5122         * config/rs6000/darwin.md: Ditto.
5123         * config/rs6000/rs6000.md: Ditto.
5125 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
5127         * config/rs6000/rs6000.md (length): Always define as const_int 4.
5128         (unnamed conditional branch define_insn): Set length to 4 or 8
5129         depending on offset.
5130         (<bd>_<mode>): Similar, for alternative 0.
5131         (<bd>tf_<mode>): Ditto.
5133 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
5135         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
5137 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
5139         * doc/rtl.texi: Replace old RTX class names with new names.
5142 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
5144         * expmed.h (canonicalize_comparison): New declaration.
5145         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
5146         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
5147         * optabs.c (prepare_cmp_insn): Likewise.
5148         * rtl.h (unsigned_condition_p): New function which checks if a
5149         comparison operator is unsigned.
5151 2018-08-16  Nathan Sidwell  <nathan@acm.org>
5153         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
5154         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
5156 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
5158         PR target/84711
5159         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
5160         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
5161         (mov<mov>): ..this and enable unconditionally.
5163 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
5165         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
5167 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
5169         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
5170         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
5171         "Common" with "Target".
5173 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
5175         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
5176         * doc/invoke.texi (mmitigate-rop): Remove.
5177         * config/i386/i386.c: Do not include "regrename.h".
5178         (ix86_rop_should_change_byte_p, reg_encoded_number)
5179         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
5180         Remove.
5181         (ix86_reorg): Remove call to ix86_mitigate_rop.
5182         * config/i386/i386.md (attr "modrm_class"): Remove.
5183         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
5184         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
5185         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
5187 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
5189         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
5190         allow folding of mergeh() and mergel() for the float and double types.
5191         (fold_mergehl_helper): Rework to handle building a permute tree
5192         for float vectors.
5194 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
5196         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
5197         for TARGET_SSE.
5199 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
5201         * common.opt (fdiagnostics-show-labels): New option.
5202         * diagnostic-show-locus.c (class layout_range): Add field
5203         "m_label".
5204         (class layout): Add field "m_show_labels_p".
5205         (layout_range::layout_range): Add param "label" and use it to
5206         initialize m_label.
5207         (make_range): Pass in NULL for new "label" param of layout_range's
5208         ctor.
5209         (layout::layout): Initialize m_show_labels_p.
5210         (layout::maybe_add_location_range): Pass in loc_range->m_label
5211         when constructing layout_range instances.
5212         (struct line_label): New struct.
5213         (layout::print_any_labels): New member function.
5214         (layout::print_line): Call it if label-printing is enabled.
5215         (selftest::test_one_liner_labels): New test.
5216         (selftest::test_diagnostic_show_locus_one_liner): Call it.
5217         * diagnostic.c (diagnostic_initialize): Initialize
5218         context->show_labels_p.
5219         * diagnostic.h (struct diagnostic_context): Add field
5220         "show_labels_p".
5221         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5222         -fno-diagnostics-show-labels.
5223         * dwarf2out.c (gen_producer_string): Add
5224         OPT_fdiagnostics_show_labels to the ignored options.
5225         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
5226         param.
5227         (gcc_rich_location::maybe_add_expr): Likewise.
5228         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
5229         label" param, defaulting to NULL.
5230         (gcc_rich_location::add_expr): Add "label" param.
5231         (gcc_rich_location::maybe_add_expr): Likewise.
5232         (class text_range_label): New class.
5233         (class range_label_for_type_mismatch): New class.
5234         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
5235         of format_warning_va.
5236         (fmtwarn_n): Likewise for new params of format_warning_n_va.
5237         * lto-wrapper.c (merge_and_complain): Add
5238         OPT_fdiagnostics_show_labels to the "pick one setting" options.
5239         (append_compiler_options): Likewise to the dropped options.
5240         (append_diag_options): Likewise to the passed-on options.
5241         * opts.c (common_handle_option): Handle the new option.
5242         * selftest-diagnostic.c
5243         (test_diagnostic_context::test_diagnostic_context): Enable
5244         show_labels_p.
5245         * substring-locations.c: Include "gcc-rich-location.h".
5246         (format_warning_n_va): Add "fmt_label" and "param_label" params
5247         and use them as appropriate.
5248         (format_warning_va): Add "fmt_label" and "param_label" params,
5249         passing them on to format_warning_n_va.
5250         (format_warning_at_substring): Likewise.
5251         (format_warning_at_substring_n): Likewise.
5252         * substring-locations.h (format_warning_va): Add "fmt_label" and
5253         "param_label" params.
5254         (format_warning_n_va): Likewise.
5255         (format_warning_at_substring): Likewise.
5256         (format_warning_at_substring_n): Likewise.
5257         * toplev.c (general_init): Initialize global_dc->show_labels_p.
5259 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
5261         PR testsuite/86519
5262         * builtins.c (expand_builtin_memcmp): Do not expand the call
5263         when overflow is detected.
5265 2018-08-15  Martin Sebor  <msebor@redhat.com>
5267         PR tree-optimization/71625
5268         * config/aarch64/aarch64-builtins.c
5269         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
5271 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
5273         * config/s390/s390.c (s390_reorg): Remove loop.
5275 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
5277         * config/darwin.c
5278          (darwin_function_switched_text_sections): Delete.
5279         * gcc/config/darwin.h
5280          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
5282 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
5284         PR target/81685
5285         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
5286         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
5287         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
5289 2018-08-15  Martin Liska  <mliska@suse.cz>
5291         PR tree-optimization/86925
5292         * predict.c (expr_expected_value_1): When taking
5293         later predictor, assign also probability.
5294         Use fold_build2_initializer_loc in order to fold
5295         the expression in -frounding-math.
5297 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
5299         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
5300         patterns.
5301         (expand_vec_perm_1): Try the new method.
5303 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
5305         PR target/86547
5306         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
5307         Check whether lra_live_max_point is 0 before dividing.
5309 2018-08-14  Martin Sebor  <msebor@redhat.com>
5311         PR tree-optimization/86650
5312         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
5313         (vrp_prop::check_mem_ref): Same.
5315 2018-08-13  Liu Hao <lh_mouse@126.com>
5317         * pretty-print.c (eat_esc_sequence): Swap the foreground and
5318         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
5319         and clear it thereafter, as it only works for DBCS.
5321 2018-08-13  Liu Hao <lh_mouse@126.com>
5323         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
5324         handle returned by _get_osf_handle().
5326 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
5328         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
5329         for folding vec_perm.
5331 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
5333         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
5334         Add support for gimple-folding of vec_pack() and vec_unpack()
5335         intrinsics.
5337 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
5339         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
5340         vec_xst variants to the list.
5341         (rs6000_gimple_fold_builtin): Add support for folding unaligned
5342         vector loads and stores.
5344 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
5346         * config.gcc (rs6000-ibm-aix4.x): Delete.
5347         (rs6000-ibm-aix5.1): Delete.
5348         (rs6000-ibm-aix5.2): Delete.
5349         (rs6000-ibm-aix5.3): Delete.
5350         * config/rs6000/aix43.h: Delete.
5351         * config/rs6000/aix51.h: Delete.
5352         * config/rs6000/aix52.h: Delete.
5353         * config/rs6000/t-aix43: Delete.
5355 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
5357         * config/s390/s390.c (s390_decompose_constant_pool_ref):
5358         New function.
5359         (s390_decompose_address): Factor out constant pool ref
5360         decomposition.
5362 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5364         * config/nds32/nds32-predicates.c
5365         (nds32_can_use_bclr_p): Change return type as bool.
5366         (nds32_can_use_bset_p): Ditto.
5367         (nds32_can_use_btgl_p): Ditto.
5368         (nds32_can_use_bitci_p): Ditto.
5369         * config/nds32/nds32-protos.h
5370         (nds32_can_use_bclr_p): Change declaration.
5371         (nds32_can_use_bset_p): Ditto.
5372         (nds32_can_use_btgl_p): Ditto.
5373         (nds32_can_use_bitci_p): Ditto.
5375 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5377         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
5378         Support -msched-prolog-epilog option.
5379         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
5381 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5383         * common/config/nds32/nds32-common.c
5384         (nds32_option_optimization_table): Enalbe -malways-align.
5386 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5388         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
5389         extra_headers.
5390         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
5391         OPT_misr_secure_ case.
5392         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
5393         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
5394         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
5395         secure attribute.
5396         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
5397         (nds32_isr_info): New field security_level.
5398         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
5399         * config/nds32/nds32.md (return_internal): Consider critical attribute.
5400         * config/nds32/nds32.opt (misr-secure): New option.
5401         * config/nds32/nds32_init.inc: New file.
5402         * config/nds32/nds32_isr.h: New file.
5404 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
5406         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
5407         Update comment for atomic instructions.
5408         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
5409         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
5410         Remove.
5411         (atomic_loaddi): Revise fence expansion to only emit fence prior to
5412         load for __ATOMIC_SEQ_CST model.
5413         (atomic_loaddi_1): Remove float register target.
5414         (atomic_storedi): Handle CONST_INT values.
5415         (atomic_storedi_1): Remove float register source.  Add special case
5416         for zero value.
5417         (memory_barrier): New expander and insn.
5419 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
5421         PR tree-optimization/86835
5422         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
5423         new_stmt after def_gsi, make sure to insert new_square_stmt after
5424         that stmt, not 2 stmts before it.
5426 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
5428         PR target/82418
5429         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
5430         instead of SWI48.
5432 2018-08-10  Martin Liska  <mliska@suse.cz>
5434         PR target/83610
5435         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
5436         function type.
5437         * builtins.c (expand_builtin_expect_with_probability):
5438         New function.
5439         (expand_builtin_expect_with_probability): New function.
5440         (build_builtin_expect_predicate): Add new argumnet probability
5441         for BUILT_IN_EXPECT_WITH_PROBABILITY.
5442         (fold_builtin_expect):
5443         (fold_builtin_2):
5444         (fold_builtin_3):
5445         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
5446         * builtins.h (fold_builtin_expect): Set new argument.
5447         * doc/extend.texi: Document __builtin_expect_with_probability.
5448         * doc/invoke.texi: Likewise.
5449         * gimple-fold.c (gimple_fold_call): Pass new argument.
5450         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
5451         also BUILT_IN_EXPECT_WITH_PROBABILITY.
5452         * predict.c (get_predictor_value): New function.
5453         (expr_expected_value): Add new argument probability. Assume
5454         that predictor and probability are always non-null.
5455         (expr_expected_value_1): Likewise.  For __builtin_expect and
5456         __builtin_expect_with_probability set probability.  Handle
5457         combination in binary expressions.
5458         (tree_predict_by_opcode): Simplify code by simply calling
5459         get_predictor_value.
5460         (pass_strip_predict_hints::execute): Add handling of
5461         BUILT_IN_EXPECT_WITH_PROBABILITY.
5462         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
5463         new predictor.
5464         * tree.h (DECL_BUILT_IN_P): New function.
5466 2018-08-10  Martin Liska  <mliska@suse.cz>
5468         PR tree-optimization/85799
5469         * passes.def: Add argument for pass_strip_predict_hints.
5470         * predict.c (class pass_strip_predict_hints): Add new argument
5471         early_p.
5472         (strip_predictor_early): New function.
5473         (pass_strip_predict_hints::execute): Call the function to
5474         strip predictors.
5475         (strip_predict_hints): New function.
5476         * predict.def: Fix comment.
5478 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
5480         * Makefile.in: Clarify which tm.texi to copy over to assert the
5481         right to grant a GFDL license for all.
5483 2018-08-09  Jeff Law  <law@redhat.com>
5485         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
5486         unused variable.
5488 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
5490         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
5491         prototype.
5493 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
5495         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
5496         reductions for variable-length vectors.
5498 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
5500         PR other/84889
5501         * common.opt (fdiagnostics-show-line-numbers): New option.
5502         * diagnostic-show-locus.c (class layout): Add fields
5503         "m_show_line_numbers_p" and "m_linenum_width";
5504         (num_digits): New function.
5505         (test_num_digits): New function.
5506         (layout::layout): Initialize new fields.  Update m_x_offset
5507         logic to handle any left margin.
5508         (layout::print_source_line): Print line number when requested.
5509         (layout::start_annotation_line): New member function.
5510         (layout::print_annotation_line): Call it.
5511         (layout::print_leading_fixits): Likewise.
5512         (layout::print_trailing_fixits): Likewise.  Update calls to
5513         move_to_column for new parameter.
5514         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
5515         it to potentially call start_annotation_line.
5516         (layout::show_ruler): Call start_annotation_line.
5517         (selftest::test_line_numbers_multiline_range): New selftest.
5518         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
5519         and selftest::test_line_numbers_multiline_range.
5520         * diagnostic.c (diagnostic_initialize): Initialize
5521         show_line_numbers_p.
5522         * diagnostic.h (struct diagnostic_context): Add field
5523         "show_line_numbers_p".
5524         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5525         -fno-diagnostics-show-line-numbers.
5526         * dwarf2out.c (gen_producer_string): Add
5527         OPT_fdiagnostics_show_line_numbers to the ignored options.
5528         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
5529         one setting" options.
5530         (append_compiler_options): Likewise to the dropped options.
5531         (append_diag_options): Likewise to the passed-on options.
5532         * opts.c (common_handle_option): Handle the new option.
5533         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
5535 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5537         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
5538         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
5539         third argument of type "const signed char" to descriptions of
5540         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
5541         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
5542         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
5543         __builtin_bcdsub_ov functions.
5545 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
5547         PR tree-optimization/86858
5548         * tree-vect-loop.c (vect_is_simple_reduction): Restore
5549         flow_bb_inside_loop_p calls.
5551 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
5553         PR tree-optimization/86871
5554         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
5555         instead of gimple_assign_lhs.
5557 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
5559         PR target/86887
5560         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
5561         register constraint to operand 0.
5562         (add<mode>3_carryinC): Likewise.
5563         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
5565 2018-08-09  Martin Liska  <mliska@suse.cz>
5567         PR c/86895
5568         * common.opt: Remove extra line.
5570 2018-08-09  Martin Liska  <mliska@suse.cz>
5572         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
5573         at the end of a line, make first letter capital and end up
5574         a sentence with a dot.
5575         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
5576         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
5577         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
5578         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
5579         (PARAM_MAX_ISL_OPERATIONS): Likewise.
5580         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
5581         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
5582         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
5583         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
5584         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
5585         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
5586         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
5587         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
5588         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
5589         (PARAM_TREE_REASSOC_WIDTH): Likewise.
5590         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
5591         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
5592         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
5594 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
5596         PR target/84332
5597         * config/s390/s390.c (s390_option_override_internal): Reduce the
5598         stack-clash-protection-probe-interval param if it would be too big
5599         for z900.
5601 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
5603         PR target/46179
5604         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
5605         * config/m68k/m68k.c (handle_move_double): Don't call
5606         m68k_final_prescan_insn.
5607         (m68k_adjust_decorated_operand): Renamed from
5608         m68k_final_prescan_insn, remove first and third operand and
5609         simplify.
5610         (print_operand): Call it.
5611         (print_operand_address): Call it.
5613 2018-08-08  Nathan Sidwell  <nathan@acm.org>
5615         * diagnostic.c (diagnostic_report_current_module): Use
5616         linemap_included_from & linemap_included_from_linemap.
5618 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
5620         * config/aarch64/aarch64-cores.def: Add phecda core.
5621         * config/aarch64/aarch64-tune.md: Regenerate.
5622         * doc/invoke.texi: Add phecda core.
5624 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
5626         PR target/85295
5627         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
5628         definitions.
5629         * config/s390/s390.md ("movti"): Add more alternatives for
5630         constant to GPR copies.
5632 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
5634         * config/s390/s390.c: Fix whitespace damage throughout the file.
5635         * config/s390/s390.h: Likewise.
5636         * config/s390/tpf.h: Likewise.
5638 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
5640         * config/s390/s390.c (s390_loadrelative_operand_p):
5641         Remove TARGET_CPU_ZARCH usages.
5642         (s390_rtx_costs): Likewise.
5643         (s390_legitimate_constant_p): Likewise.
5644         (s390_cannot_force_const_mem): Likewise.
5645         (legitimate_reload_constant_p): Likewise.
5646         (s390_preferred_reload_class): Likewise.
5647         (legitimize_pic_address): Likewise.
5648         (legitimize_tls_address): Likewise.
5649         (s390_split_branches): Removed.
5650         (s390_add_execute): Removed.
5651         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
5652         (s390_mainpool_start): Likewise.
5653         (s390_mainpool_finish): Likewise.
5654         (s390_mainpool_cancel): Removed.
5655         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
5656         (s390_chunkify_cancel): Likewise.
5657         (s390_return_addr_rtx): Likewise.
5658         (s390_register_info): Remove split_branches_pending_p uages.
5659         (s390_optimize_register_info): Likewise.
5660         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
5661         split_branches_pending_p usages.
5662         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
5663         (s390_load_got): Likewise.
5664         (s390_expand_split_stack_prologue): Likewise.
5665         (output_asm_nops): Likewise.
5666         (s390_function_profiler): Likewise.
5667         (s390_emit_call): Likewise.
5668         (s390_conditional_register_usage): Likewise.
5669         (s390_optimize_prologue): Likewise.
5670         (s390_reorg): Remove TARGET_CPU_ZARCH and
5671         split_branches_pending_p usages.
5672         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
5673         usages.
5674         (s390_output_indirect_thunk_function): Likewise.
5675         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
5676         (TARGET_CPU_ZARCH_P): Removed.
5677         (struct machine_function): Remove split_branches_pending_p.
5678         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
5680 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
5682         * common/config/s390/s390-common.c (processor_flags_table):
5683         Remove flags.
5684         * config.gcc: Remove with_arch/with_tune support.
5685         * config/s390/2064.md: Remove cpu attribute comparisons.
5686         * config/s390/driver-native.c (s390_host_detect_local_cpu):
5687         Remove MTN.
5688         * config/s390/linux.h (ASM_SPEC):
5689         Remove -march support.
5690         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
5691         Use a table to get an arch level.
5692         * config/s390/s390-opts.h (enum processor_type):
5693         Remove enum values.
5694         * config/s390/s390.c
5695         (processor_table): Remove entries, add arch_level values.
5696         (s390_issue_rate): Remove cases.
5697         (s390_option_override): Adjust
5698         s390_option_override_internal() call.
5699         (s390_option_override_internal): Remove deprecation warning.
5700         (s390_valid_target_attribute_tree): Adjust
5701         s390_option_override_internal() call.
5702         * config/s390/s390.h (struct s390_processor):
5703         Share with s390-c.c, add arch_level field.
5704         * config/s390/s390.md:
5705         Remove occurrences in cpu attribute.
5706         * config/s390/s390.opt: Remove -march/-mtune support.
5707         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
5708         * doc/invoke.texi: Remove deprecation warning.
5710 2018-08-08  Luis Machado  <luis.machado@linaro.org>
5712         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
5713         global.
5714         (qdf24xx_tunings): Set vector cost structure to
5715         qdf24xx_vector_cost.
5717         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
5718         <register_sextend>: Set to 3.
5720 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
5722         PR target/86838
5723         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
5724         * config/aarch64/aarch64-simd.md
5725         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
5726         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
5727         (aarch64_frecpx<mode>): ...this new pattern.
5728         * config/aarch64/aarch64-simd-builtins.def: Remove comment
5729         about aarch64_frecp<FRECP:frecp_suffix><mode>.
5731 2018-08-07  Martin Liska  <mliska@suse.cz>
5733         PR middle-end/83023
5734         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
5735         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
5736         * predict.def (PRED_MALLOC_NONNULL): New predictor.
5737         * doc/extend.texi: Document that malloc attribute adds
5738         hit to compiler.
5740 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
5742         PR target/86785
5743         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5744         Define to speculation_safe_value_not_needed.
5746 2018-08-06  Jeff Law  <law@redhat.com>
5748         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
5749         the vr_values instance to cprop_into_stmt.
5750         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
5751         (cprop_operand): Also query EVRP to determine if OP is a constant.
5753 2018-08-06  Nathan Sidwell  <nathan@acm.org>
5755         * diagnostic.c (diagnostic_report_current_module): Reroll
5756         included-at loop.  Translate text.
5758 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
5760         * function-tests.c (selftest::test_expansion_to_rtl): Call
5761         free_after_compilation.
5763 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5765         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
5767 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
5769         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
5770         loops with memory block operations from getting unrolled.
5772 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
5774         PR target/86807
5775         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5776         Define to speculation_safe_value_not_needed.
5778 2018-08-06  Jeff Law  <law@redhat.com>
5780         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
5781         assert.
5783 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5785         PR target/86662
5786         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
5787         with all enabled __intN types.
5789         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
5791 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5793         * alias.c (record_set): Check for clobber high.
5794         * cfgexpand.c (expand_gimple_stmt): Likewise.
5795         * combine-stack-adj.c (single_set_for_csa): Likewise.
5796         * combine.c (find_single_use_1): Likewise.
5797         (set_nonzero_bits_and_sign_copies): Likewise.
5798         (get_combine_src_dest): Likewise.
5799         (is_parallel_of_n_reg_sets): Likewise.
5800         (try_combine): Likewise.
5801         (record_dead_and_set_regs_1): Likewise.
5802         (reg_dead_at_p_1): Likewise.
5803         (reg_dead_at_p): Likewise.
5804         * dce.c (deletable_insn_p): Likewise.
5805         (mark_nonreg_stores_1): Likewise.
5806         (mark_nonreg_stores_2): Likewise.
5807         * df-scan.c (df_find_hard_reg_defs): Likewise.
5808         (df_uses_record): Likewise.
5809         (df_get_call_refs): Likewise.
5810         * dwarf2out.c (mem_loc_descriptor): Likewise.
5811         * haifa-sched.c (haifa_classify_rtx): Likewise.
5812         * ira-build.c (create_insn_allocnos): Likewise.
5813         * ira-costs.c (scan_one_insn): Likewise.
5814         * ira.c (equiv_init_movable_p): Likewise.
5815         (rtx_moveable_p): Likewise.
5816         (interesting_dest_for_shprep): Likewise.
5817         * jump.c (mark_jump_label_1): Likewise.
5818         * postreload-gcse.c (record_opr_changes): Likewise.
5819         * postreload.c (reload_cse_simplify): Likewise.
5820         (struct reg_use): Add source expr.
5821         (reload_combine): Check for clobber high.
5822         (reload_combine_note_use): Likewise.
5823         (reload_cse_move2add): Likewise.
5824         (move2add_note_store): Likewise.
5825         * print-rtl.c (print_pattern): Likewise.
5826         * recog.c (decode_asm_operands): Likewise.
5827         (store_data_bypass_p): Likewise.
5828         (if_test_bypass_p): Likewise.
5829         * regcprop.c (kill_clobbered_value): Likewise.
5830         (kill_set_value): Likewise.
5831         * reginfo.c (reg_scan_mark_refs): Likewise.
5832         * reload1.c (maybe_fix_stack_asms): Likewise.
5833         (eliminate_regs_1): Likewise.
5834         (elimination_effects): Likewise.
5835         (mark_not_eliminable): Likewise.
5836         (scan_paradoxical_subregs): Likewise.
5837         (forget_old_reloads_1): Likewise.
5838         * reorg.c (find_end_label): Likewise.
5839         (try_merge_delay_insns): Likewise.
5840         (redundant_insn): Likewise.
5841         (own_thread_p): Likewise.
5842         (fill_simple_delay_slots): Likewise.
5843         (fill_slots_from_thread): Likewise.
5844         (dbr_schedule): Likewise.
5845         * resource.c (update_live_status): Likewise.
5846         (mark_referenced_resources): Likewise.
5847         (mark_set_resources): Likewise.
5848         * rtl.c (copy_rtx): Likewise.
5849         * rtlanal.c (reg_referenced_p): Likewise.
5850         (single_set_2): Likewise.
5851         (noop_move_p): Likewise.
5852         (note_stores): Likewise.
5853         * sched-deps.c (sched_analyze_reg): Likewise.
5854         (sched_analyze_insn): Likewise.
5856 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5858         * cse.c (invalidate_reg): New function extracted from...
5859         (invalidate): ...here.
5860         (canonicalize_insn): Check for clobber high.
5861         (invalidate_from_clobbers): invalidate clobber highs.
5862         (invalidate_from_sets_and_clobbers): Likewise.
5863         (count_reg_usage): Check for clobber high.
5864         (insn_live_p): Likewise.
5865         * cselib.c (cselib_expand_value_rtx_1):Likewise.
5866         (cselib_invalidate_regno): Check for clobber in setter.
5867         (cselib_invalidate_rtx): Pass through setter.
5868         (cselib_invalidate_rtx_note_stores):
5869         (cselib_process_insn): Check for clobber high.
5870         * cselib.h (cselib_invalidate_rtx): Add operand.
5872 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5874         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
5875         (mark_not_eliminable): Likewise.
5876         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
5877         * lra-lives.c (process_bb_lives): Check for clobber high.
5878         * lra.c (new_insn_reg): Remember clobber highs.
5879         (collect_non_operand_hard_regs): Check for clobber high.
5880         (lra_set_insn_recog_data): Likewise.
5881         (add_regs_to_insn_regno_info): Likewise.
5882         (lra_update_insn_regno_info): Likewise.
5884 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5886         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
5887         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
5889 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5891         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
5892         (copy_insn_1): Likewise.
5893         (gen_hard_reg_clobber_high): New gen function.
5894         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
5895         * genemit.c (gen_exp): Likewise.
5896         (gen_emit_seq): Pass through info.
5897         (gen_insn): Check for CLOBBER_HIGH.
5898         (gen_expand): Pass through info.
5899         (gen_split): Likewise.
5900         (output_add_clobbers): Likewise.
5901         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
5902         (remove_clobbers): Likewise.
5903         * rtl.h (gen_hard_reg_clobber_high): New declaration.
5905 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5907         * doc/rtl.texi (clobber_high): Add.
5908         (parallel): Add in clobber high
5909         * rtl.c (rtl_check_failed_code3): Add function.
5910         * rtl.def (CLOBBER_HIGH): Add expression.
5911         * rtl.h (RTL_CHECKC3): Add macro.
5912         (rtl_check_failed_code3): Add declaration.
5913         (XC3EXP): Add macro.
5915 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
5917         PR target/86386
5918         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
5919         cfun->machine->max_used_stack_alignment if needed.
5921 2018-08-04  Martin Sebor  <msebor@redhat.com>
5923         PR tree-optimization/86571
5924         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
5925         NaN output to 4.
5927 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
5929         PR target/86799
5930         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5931         Define.
5933 2018-08-03  Jeff Law  <law@redhat.com>
5935         PR target/86795
5936         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5937         Define to speculation_safe_value_not_needed.
5939 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
5941         * doc/gcov.texi (-x): Remove duplicate "to".
5942         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
5943         (-Wif-not-aligned): Remove duplicate "is".
5944         (-flto): Remove duplicate "the".
5945         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
5946         duplicate "v5.00.b".
5947         (MSP430 Options): Remove duplicate "and" from the description
5948         of "-mgprel-sec=regexp".
5949         (x86 Options): Remove duplicate copies of "vmldLog102" and
5950         vmlsLog104 from description of "-mveclibabi=type".
5952 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
5954         * internal-fn.h (first_commutative_argument): Declare.
5955         * internal-fn.c (first_commutative_argument): New function.
5956         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
5957         restrictions for pattern statements.  Use first_commutative_argument
5958         to look for commutative operands in calls to internal functions.
5960 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
5962         * Makefile.in (wide-int-range.o): New.
5963         * tree-vrp.c: Move all the wide_int_* functions to...
5964         * wide-int-range.cc: ...here.
5965         * tree-vrp.h: Move all the wide_int_* prototypes to...
5966         * wide-int-range.h: ...here.
5968 2018-08-03  Tom de Vries  <tdevries@suse.de>
5970         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
5971         UI_NONE.
5972         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
5973         * except.c (output_function_exception_table): Do early exit if
5974         targetm_common.except_unwind_info (&global_options) == UI_NONE.
5976 2018-08-03  Martin Liska  <mliska@suse.cz>
5978         * predict.c (dump_prediction): Change to 2 digits
5979         in fraction part.
5981 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5983         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
5984         neon_dup_q to...
5985         (falkor_am_1_gtov_gtov): ... a new insn reservation.
5987 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
5989         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
5990         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
5991         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
5992         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
5993         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
5995 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
5997         * diagnostic-show-locus.c (diagnostic_show_locus): Use
5998         pp_take_prefix when saving the existing prefix.
5999         * diagnostic.c (diagnostic_append_note): Likewise.
6000         * langhooks.c (lhd_print_error_function): Likewise.
6001         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
6002         param's type.  Free the existing prefix.
6003         (pp_take_prefix): New function.
6004         (pretty_printer::pretty_printer): Drop the prefix parameter.
6005         Rename the length parameter to match the comment.
6006         (pretty_printer::~pretty_printer): Free the prefix.
6007         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
6008         parameter.
6009         (struct pretty_printer): Drop the "const" from "prefix" field's
6010         type and clarify memory management.
6011         (pp_set_prefix): Drop the "const" from the 2nd param.
6012         (pp_take_prefix): New decl.
6014 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
6016         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
6017         for word_mode_ok here instead of passing as argument.
6018         (expand_block_compare): Change select_block_compare_mode() call.
6019         (expand_strncmp_gpr_sequence): New function.
6020         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
6022 2018-08-02  Jeff Law  <law@redhat.com>
6024         PR target/86790
6025         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6026         Define to speculation_safe_value_not_needed.
6028         PR target/86784
6029         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6030         Define to speculation_safe_value_not_needed.
6032 2018-08-02  Tom de Vries  <tdevries@suse.de>
6034         PR target/86660
6035         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
6036         function.  Return UI_TARGET unconditionally.
6037         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
6038         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
6040 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
6042         * genemit.c (print_overload_test): Fix typo.
6044 2018-08-02  Richard Biener  <rguenther@suse.de>
6046         PR tree-optimization/86816
6047         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
6048         which checks for value availability before querying it.
6049         (gvn_uses_equal): Use it.
6050         (same_succ_hash): Likewise.
6051         (gimple_equal_p): Likewise.
6053 2018-08-02  Nick Clifton  <nickc@redhat.com>
6055         PR target/86813
6056         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6057         Define to speculation_safe_value_not_needed.
6059         PR target/86810
6060         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6061         Define to speculation_safe_value_not_needed.
6063         PR target/86810
6064         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6065         Define to speculation_safe_value_not_needed.
6067         PR target/86803
6068         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6069         Define to speculation_safe_value_not_needed.
6071         PR target/86797
6072         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6073         Define to speculation_safe_value_not_needed.
6075         PR target/86791
6076         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6077         Define to speculation_safe_value_not_needed.
6079         PR target/86789
6080         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6081         Define to speculation_safe_value_not_needed.
6083         PR target/86787
6084         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6085         Define to speculation_safe_value_not_needed.
6087         PR target/86782
6088         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6089         speculation_safe_value_not_needed.
6091         PR target/86781
6092         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
6093         to speculation_safe_value_not_needed.
6095 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
6097         * doc/md.texi: Expand the documentation of instruction names
6098         to mention port-local uses.  Document '@' in pattern names.
6099         * read-md.h (overloaded_instance, overloaded_name): New structs.
6100         (mapping): Declare.
6101         (md_reader::handle_overloaded_name): New member function.
6102         (md_reader::get_overloads): Likewise.
6103         (md_reader::m_first_overload): New member variable.
6104         (md_reader::m_next_overload_ptr): Likewise.
6105         (md_reader::m_overloads_htab): Likewise.
6106         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
6107         m_next_overload_ptr and m_overloads_htab.
6108         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
6109         (get_mode_token, get_code_token, get_int_token): New functions.
6110         (map_attr_string): Add an optional argument that passes back
6111         the associated iterator.
6112         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
6113         (md_reader::handle_overloaded_name, add_overload_instance): New
6114         functions.
6115         (apply_iterators): Handle '@' names.  Report an error if '@'
6116         is used without iterators.
6117         (initialize_iterators): Initialize the new iterator_group fields.
6118         * genopinit.c (handle_overloaded_code_for)
6119         (handle_overloaded_gen): New functions.
6120         (main): Use them to print declarations of maybe_code_for_* and
6121         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
6122         * genemit.c (print_overload_arguments, print_overload_test)
6123         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
6124         (main): Use it to print definitions of maybe_code_for_* and
6125         maybe_gen_* functions.
6126         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
6127         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
6128         instead of explicit mode checks.
6129         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
6130         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
6131         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
6132         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
6133         (aarch64_expand_compare_and_swap): Likewise
6134         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
6135         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
6136         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
6137         (aarch64_constant_pool_reload_icode): Delete.
6138         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
6139         instead of aarch64_constant_pool_reload_icode.  Use
6140         code_for_aarch64_reload_mov instead of explicit mode checks.
6141         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
6142         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
6143         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
6144         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
6145         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
6146         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
6147         (aarch64_atomic_load_op_code): Delete.
6148         (aarch64_emit_atomic_load_op): Likewise.
6149         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
6150         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
6151         instead of aarch64_emit_atomic_load_op.
6152         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
6153         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
6154         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
6155         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
6156         character before the pattern name.
6157         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
6158         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
6159         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
6160         (aarch64_frecps<mode>): Likewise.
6161         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
6162         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
6163         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
6164         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
6165         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
6167 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
6169         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
6170         Allow HFmode constants if TARGET_FP_F16INST.
6172 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
6174         PR target/86014
6175         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
6176         No longer check last store for clobber of address register.
6178 2018-08-02  Martin Liska  <mliska@suse.cz>
6180         PR gcov-profile/86817
6181         * gcov.c (process_all_functions): New function.
6182         (main): Call it.
6183         (process_file): Move functions processing to
6184         process_all_functions.
6186 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
6188         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
6189         "const" to the "gimple *" and "rtx_insn *" parameters.
6190         * dumpfile.h (dump_user_location_t::dump_user_location_t):
6191         Likewise.
6192         (dump_location_t::dump_location_t): Likewise.
6194 2018-08-01  Martin Sebor  <msebor@redhat.com>
6196         PR tree-optimization/86650
6197         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
6198         rather than a "gcall *".  Directly pass the data of interest
6199         to percent_K_format, rather than building a temporary CALL_EXPR
6200         to hold it.
6201         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
6202         (gimple_fold_builtin_strncat): Adjust.
6203         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
6204         gcall* argument with gimple*.
6205         * gimple-ssa-warn-restrict.c (check_call): Same.
6206         (wrestrict_dom_walker::before_dom_children): Same.
6207         (builtin_access::builtin_access): Same.
6208         (check_bounds_or_overlap): Same
6209         (maybe_diag_overlap): Same.
6210         (maybe_diag_offset_bounds): Same.
6211         * tree-diagnostic.c (default_tree_printer): Move usage of
6212         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
6213         to this callsite.
6214         * tree-pretty-print.c (percent_K_format): Add argument.
6215         * tree-pretty-print.h: Add argument.
6216         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
6217         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
6218         (maybe_diag_stxncpy_trunc): Same.
6219         (handle_builtin_stxncpy): Same.
6220         (handle_builtin_strcat): Same.
6222 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6224         * match.pd: Optimise pointer range checks.
6226 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6228         PR tree-optimization/86758
6229         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
6230         to remove pattern statements.
6232 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6234         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
6235         result of dfs_enumerate_from when constructing stmt_vec_infos,
6236         instead of additionally calling get_loop_body.
6238 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6240         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
6241         parameter.
6242         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
6243         When creating an iv, assert that the step is not known to be zero.
6244         (vect_setup_realignment): Update call accordingly.
6245         * tree-vect-stmts.c (vectorizable_store): Likewise.
6246         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
6248 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6250         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
6251         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
6252         (vectorizable_reduction): Likewise.
6253         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6254         (vect_detect_hybrid_slp_stmts): Likewise.
6255         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6257 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
6259         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
6260         (wide_int_set_zero_nonzero_bits): ...this.
6261         (zero_nonzero_bits_from_vr): Rename to...
6262         (vrp_set_zero_nonzero_bits): ...this.
6263         (extract_range_from_multiplicative_op_1): Abstract wide int
6264         code...
6265         (wide_int_range_multiplicative_op): ...here.
6266         (extract_range_from_binary_expr_1): Extract wide int binary
6267         operations into their own functions.
6268         (wide_int_range_lshift): New.
6269         (wide_int_range_can_optimize_bit_op): New.
6270         (wide_int_range_shift_undefined_p): New.
6271         (wide_int_range_bit_xor): New.
6272         (wide_int_range_bit_ior): New.
6273         (wide_int_range_bit_and): New.
6274         (wide_int_range_trunc_mod): New.
6275         (extract_range_into_wide_ints): New.
6276         (vrp_shift_undefined_p): New.
6277         (extract_range_from_multiplicative_op): New.
6278         (vrp_can_optimize_bit_op): New.
6279         * tree-vrp.h (value_range::dump): New.
6280         (wide_int_range_multiplicative_op): New.
6281         (wide_int_range_lshift):New.
6282         (wide_int_range_shift_undefined_p): New.
6283         (wide_int_range_bit_xor): New.
6284         (wide_int_range_bit_ior): New.
6285         (wide_int_range_bit_and): New.
6286         (wide_int_range_trunc_mod): New.
6287         (zero_nonzero_bits_from_bounds): Rename to...
6288         (wide_int_set_zero_nonzero_bits): ...this.
6289         (zero_nonzero_bits_from_vr): Rename to...
6290         (vrp_set_zero_nonzero_bits): ...this.
6291         (range_easy_mask_min_max): Rename to...
6292         (wide_int_range_can_optimize_bit_op): this.
6293         * vr-values.c (simplify_bit_ops_using_ranges): Rename
6294         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
6296 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6298         * tree-vectorizer.h (vect_orig_stmt): New function.
6299         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
6300         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
6301         (vect_create_epilog_for_reduction): Likewise.
6302         (vectorizable_live_operation): Likewise.
6303         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6304         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
6305         * tree-vect-stmts.c (vectorizable_call): Likewise.
6306         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
6308 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6310         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
6311         argument.
6312         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
6313         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
6314         (vect_transform_loop): Likewise.
6315         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6317 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6319         * tree-vectorizer.h (vect_schedule_slp): Return void.
6320         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6321         (vect_schedule_slp): Likewise.
6323 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6325         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
6326         argument.
6327         (vect_transform_loop): Update calls accordingly.  Schedule SLP
6328         instances before the main loop, if any exist.
6330 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6332         PR tree-optimization/86749
6333         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
6334         If the lhs is used in a COND_EXPR, check that it is being used
6335         as the "then" or "else" value.
6337 2018-08-01  Tom de Vries  <tdevries@suse.de>
6339         PR target/86800
6340         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6341         speculation_safe_value_not_needed.
6343 2018-08-01  Richard Biener  <rguenther@suse.de>
6345         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
6346         as base and offset.
6348 2018-08-01  Martin Liska  <mliska@suse.cz>
6350         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
6351         format how successful transformation is dumped.
6352         (gimple_mod_pow2_value_transform): Likewise.
6353         (gimple_mod_subtract_transform): Likewise.
6354         (gimple_stringops_transform): Likewise.
6356 2018-08-01  Martin Liska  <mliska@suse.cz>
6358         PR value-prof/35543
6359         * value-prof.c (interesting_stringop_to_profile_p):
6360         Simplify the code and add BUILT_IN_MEMMOVE.
6361         (gimple_stringops_transform): Likewise.
6363 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
6365         * config/aarch64/aarch64-simd.md
6366         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
6367         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
6368         use GPI iterator instead of SI mode.
6370 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
6372         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
6373         rs6000_speculation_barrier.
6374         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
6375         new barrier pattern name.
6377 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
6379         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
6380         (speculation_barrier): New insn.
6382 2018-08-01  Richard Biener  <rguenther@suse.de>
6384         PR bootstrap/86724
6385         * graphite.h: Include isl/id.h and isl/space.h to allow build
6386         with ISL 0.20.
6388 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
6390         PR target/86651
6391         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
6392         mode for COFF targets.
6393         * defaults.h (TARGET_COFF): Define.
6394         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
6395         TARGET_COFF): Define.
6396         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
6397         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
6398         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
6400 2018-07-31  Alexandre Oliva <oliva@adacore.com>
6402         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
6403         * gimple-streamer-out.c (output_bb): Save it.
6404         * lto-streamer-in.c (input_struct_function_base): Restore
6405         instance discriminator if available.  Create map on demand.
6406         * lto-streamer-out.c (output_struct_function_base): Save it if
6407         available.
6408         * final.c (decl_to_instance_map): Document LTO strategy.
6410 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
6411             Olivier Hainque  <hainque@adacore.com>
6413         * debug.h (decl_to_instance_map_t): New type.
6414         (decl_to_instance_map): Declare.
6415         (maybe_create_decl_to_instance_map): New inline function.
6416         * final.c (bb_discriminator, last_bb_discriminator): New statics,
6417         to track basic block discriminators.
6418         (final_start_function_1): Initialize them.
6419         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
6420         bb_discriminator.
6421         (decl_to_instance_map): New variable.
6422         (map_decl_to_instance, maybe_set_discriminator): New functions.
6423         (notice_source_line): Set discriminator.
6425 2018-07-31  Ian Lance Taylor  <iant@golang.org>
6427         * targhooks.c (default_have_speculation_safe_value): Add
6428         ATTRIBUTE_UNUSED.
6430 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
6432         * dump-context.h: Include "pretty-print.h".
6433         (dump_context::refresh_dumps_are_enabled): New decl.
6434         (dump_context::emit_item): New decl.
6435         (class dump_context): Add fields "m_test_pp" and
6436         "m_test_pp_flags".
6437         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6438         (temp_dump_context::get_dumped_text): New decl.
6439         (class temp_dump_context): Add field "m_pp".
6440         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
6441         (dump_context::refresh_dumps_are_enabled): ...and add a test for
6442         m_test_pp.
6443         (set_dump_file): Update for above change.
6444         (set_alt_dump_file): Likewise.
6445         (dump_loc): New overload, taking a pretty_printer *.
6446         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
6447         to any test pretty-printer.
6448         (make_item_for_dump_gimple_stmt): New function, adapted from
6449         optinfo::add_gimple_stmt.
6450         (dump_context::dump_gimple_stmt): Call it, and use the result,
6451         eliminating the direct usage of dump_file and alt_dump_file in
6452         favor of indirectly using them via emit_item.
6453         (make_item_for_dump_gimple_expr): New function, adapted from
6454         optinfo::add_gimple_expr.
6455         (dump_context::dump_gimple_expr): Call it, and use the result,
6456         eliminating the direct usage of dump_file and alt_dump_file in
6457         favor of indirectly using them via emit_item.
6458         (make_item_for_dump_generic_expr): New function, adapted from
6459         optinfo::add_tree.
6460         (dump_context::dump_generic_expr): Call it, and use the result,
6461         eliminating the direct usage of dump_file and alt_dump_file in
6462         favor of indirectly using them via emit_item.
6463         (make_item_for_dump_printf_va): New function, adapted from
6464         optinfo::add_printf_va.
6465         (make_item_for_dump_printf): New function.
6466         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
6467         and use the result, eliminating the direct usage of dump_file and
6468         alt_dump_file in favor of indirectly using them via emit_item.
6469         (make_item_for_dump_dec): New function.
6470         (dump_context::dump_dec): Call it, and use the result,
6471         eliminating the direct usage of dump_file and alt_dump_file in
6472         favor of indirectly using them via emit_item.
6473         (make_item_for_dump_symtab_node): New function, adapted from
6474         optinfo::add_symtab_node.
6475         (dump_context::dump_symtab_node): Call it, and use the result,
6476         eliminating the direct usage of dump_file and alt_dump_file in
6477         favor of indirectly using them via emit_item.
6478         (dump_context::begin_scope): Reimplement, avoiding direct usage
6479         of dump_file and alt_dump_file in favor of indirectly using them
6480         via emit_item.
6481         (dump_context::emit_item): New member function.
6482         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6483         Set up test pretty-printer on the underlying context.  Call
6484         refresh_dumps_are_enabled.
6485         (temp_dump_context::~temp_dump_context): Call
6486         refresh_dumps_are_enabled.
6487         (temp_dump_context::get_dumped_text): New member function.
6488         (selftest::verify_dumped_text): New function.
6489         (ASSERT_DUMPED_TEXT_EQ): New macro.
6490         (selftest::test_capture_of_dump_calls): Run all tests twice, with
6491         and then without optinfo enabled.  Add uses of
6492         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
6493         * dumpfile.h: Update comment for the dump_* API.
6494         * optinfo-emit-json.cc
6495         (selftest::test_building_json_from_dump_calls): Update for new
6496         param for temp_dump_context ctor.
6497         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
6498         and "m_owned" field.
6499         (optinfo_item::~optinfo_item): Likewise.
6500         (optinfo::add_item): New member function.
6501         (optinfo::emit): Update comment.
6502         (optinfo::add_string): Delete.
6503         (optinfo::add_printf): Delete.
6504         (optinfo::add_printf_va): Delete.
6505         (optinfo::add_gimple_stmt): Delete.
6506         (optinfo::add_gimple_expr): Delete.
6507         (optinfo::add_tree): Delete.
6508         (optinfo::add_symtab_node): Delete.
6509         (optinfo::add_dec): Delete.
6510         * optinfo.h (class dump_context): New forward decl.
6511         (optinfo::add_item): New decl.
6512         (optinfo::add_string): Delete.
6513         (optinfo::add_printf): Delete.
6514         (optinfo::add_printf_va): Delete.
6515         (optinfo::add_gimple_stmt): Delete.
6516         (optinfo::add_gimple_expr): Delete.
6517         (optinfo::add_tree): Delete.
6518         (optinfo::add_symtab_node): Delete.
6519         (optinfo::add_dec): Delete.
6520         (optinfo::add_poly_int): Delete.
6521         (optinfo_item::optinfo_item): Remove "owned" param.
6522         (class optinfo_item): Remove field "m_owned".
6524 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6526         PR middle-end/86705
6527         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
6528         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
6529         requested variable alignment.
6530         (expand_one_ssa_partition): Likewise.
6531         (expand_one_var): Likewise.
6533 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6535         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6536         to speculation_safe_value_not_needed.
6538 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6540         * targhooks.h (speculation_safe_value_not_needed): New prototype.
6541         * targhooks.c (speculation_safe_value_not_needed): New function.
6542         * target.def (have_speculation_safe_value): Update documentation.
6543         * doc/tm.texi: Regenerated.
6545 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6547         * config/aarch64/iterators.md (ALLI_TI): New iterator.
6548         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
6549         expand.
6550         (despeculate_copy<ALLI:mode>_insn): New insn.
6551         (despeculate_copyti_insn): New insn.
6552         (despeculate_simple<ALLI:mode>): New insn
6553         (despeculate_simpleti): New insn.
6554         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
6555         function.
6556         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
6557         aarch64_speculation_safe_value.
6558         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
6560 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6562         * config/aarch64/aarch64-speculation.cc: New file.
6563         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
6564         before pass_reorder_blocks.
6565         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
6566         prototype.
6567         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
6568         X14 and X15 when tracking speculation.
6569         * config/aarch64/aarch64.md (register name constants): Add
6570         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
6571         (unspec): Add UNSPEC_SPECULATION_TRACKER.
6572         (speculation_barrier): New insn attribute.
6573         (cmp<mode>): Allow SP in comparisons.
6574         (speculation_tracker): New insn.
6575         (speculation_barrier): Add speculation_barrier attribute.
6576         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
6577         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
6578         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
6580 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6582         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
6583         aarch64_track_speculation is true.
6584         (tb<optab><mode>1): Likewise.
6585         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
6586         generate CB[N]Z when tracking speculation.
6587         (aarch64_split_compare_and_swap): Likewise.
6588         (aarch64_split_atomic_op): Likewise.
6590 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6592         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
6594 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6596         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
6597         (speculation_barrier): New insn.
6599 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6601         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
6602         * config/arm/arm.md (speculation_barrier): New expand.
6603         (speculation_barrier_insn): New pattern.
6605 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6607         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
6608         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
6609         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
6610         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
6611         list.
6612         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
6613         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
6614         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
6615         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
6616         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
6617         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
6618         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
6619         * builtins.c (expand_speculation_safe_value): New function.
6620         (expand_builtin): Call it.
6621         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
6622         * doc/extend.texi: Document __builtin_speculation_safe_value.
6623         * doc/md.texi: Document "speculation_barrier" pattern.
6624         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
6625         TARGET_HAVE_SPECULATION_SAFE_VALUE.
6626         * doc/tm.texi: Regenerated.
6627         * target.def (have_speculation_safe_value, speculation_safe_value): New
6628         hooks.
6629         * targhooks.c (default_have_speculation_safe_value): New function.
6630         (default_speculation_safe_value): New function.
6631         * targhooks.h (default_have_speculation_safe_value): Add prototype.
6632         (default_speculation_safe_value): Add prototype.
6634 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
6636         * dump-context.h (dump_context::dump_loc): New decl.
6637         * dumpfile.c (dump_context::dump_loc): New member function.
6638         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
6639         and dump_gimple_stmt.
6640         (dump_context::dump_gimple_expr_loc): Likewise, using
6641         dump_gimple_expr.
6642         (dump_context::dump_generic_expr_loc): Likewise, using
6643         dump_generic_expr.
6644         (dump_context::dump_printf_loc_va): Likewise, using
6645         dump_printf_va.
6646         (dump_context::begin_scope): Explicitly using the global function
6647         "dump_loc", rather than the member function.
6649 2018-07-31  Martin Sebor  <msebor@redhat.com>
6651         PR tree-optimization/86741
6652         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
6654 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
6656         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
6657         depend on whether prefetch instructions will be emitted or not.
6658         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
6659         will be emitted or not.
6660         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
6661         (TARGET_SETMEM_PFD): New macros.
6663 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6665         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
6666         (NULL_STMT_VEC_INFO): Delete.
6667         (stmt_vec_info::operator*): Likewise.
6668         (stmt_vec_info::operator gimple *): Likewise.
6669         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
6670         of NULL_STMT_VEC_INFO.
6671         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6672         (vect_reassociating_reduction_p): Likewise.
6673         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6674         (vectorizable_store): Likewise.
6675         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
6676         (vec_info::free_stmt_vec_infos): Likewise.
6678 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6680         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
6681         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
6683 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6685         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
6686         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6687         (vec_info::free_stmt_vec_info): New private member functions.
6688         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
6689         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
6690         * tree-parloops.c (gather_scalar_reductions): Remove calls to
6691         set_stmt_vec_info_vec and free_stmt_vec_infos.
6692         * tree-vect-loop.c (_loop_vec_info): Remove call to
6693         set_stmt_vec_info_vec.
6694         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
6695         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
6696         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
6697         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6698         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
6699         assignments in {vec_info::,}new_stmt_vec_info that are redundant
6700         with the clearing in the xcalloc.
6701         (stmt_vec_info_vec): Delete.
6702         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
6703         (vectorize_loops): Likewise.
6704         (vec_info::~vec_info): Remove argument from call to
6705         free_stmt_vec_infos.
6706         (vec_info::add_stmt): Remove vinfo argument from call to
6707         new_stmt_vec_info.
6709 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6711         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
6712         rather than a gimple stmt.
6713         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
6714         information for pattern statements when passed the original
6715         statement; instead wait to be passed the pattern statement itself.
6716         Don't call set_vinfo_for_stmt here.
6717         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
6718         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
6719         stmt_vec_infos here.
6720         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
6721         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
6722         stmt_vec_infos entry.
6724 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6726         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
6727         * tree-vectorizer.c (vec_info::replace_stmt): New function.
6728         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
6729         * tree-vect-stmts.c (vectorizable_call): Likewise.
6730         (vectorizable_simd_clone_call): Likewise.
6732 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6734         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
6735         * tree-vectorizer.c (vec_info::remove_stmt): New function.
6736         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
6737         * tree-vect-loop.c (vect_transform_loop): Likewise.
6738         * tree-vect-slp.c (vect_schedule_slp): Likewise.
6739         * tree-vect-stmts.c (vect_remove_stores): Likewise.
6741 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6743         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
6744         (vect_dr_stmt): Delete.
6745         * tree-vectorizer.c (vec_info::lookup_dr): New function.
6746         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
6747         of DR_VECT_AUX.
6748         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
6749         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
6750         (vect_verify_datarefs_alignment, vect_peeling_supportable)
6751         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6752         (vect_analyze_data_refs): Likewise.
6753         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
6754         argument.
6755         (vect_find_same_alignment_drs): Likewise.
6756         (vect_slp_analyze_node_dependences): Update calls accordingly.
6757         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
6758         instead of DR_VECT_AUX.
6759         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
6760         of a vector data references.  Use vec_info::lookup_dr instead of
6761         DR_VECT_AUX.
6762         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
6763         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
6764         instead of DR_VECT_AUX.
6766 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6768         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
6769         dr_vec_info.
6770         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6771         accordingly.
6772         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6773         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6774         (vect_gen_prolog_loop_niters): Likewise.
6776 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6778         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
6779         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
6780         (vect_known_alignment_in_bytes, vect_dr_behavior)
6781         (vect_get_scalar_dr_size): Take references as dr_vec_infos
6782         instead of data_references.  Update calls to other routines for
6783         which the same change has been made.
6784         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
6785         dr_vec_infos instead of stmt_vec_infos.
6786         (vect_analyze_data_ref_dependence): Update call accordingly.
6787         (vect_slp_analyze_data_ref_dependence)
6788         (vect_record_base_alignments): Use DR_VECT_AUX.
6789         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
6790         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
6791         (vector_alignment_reachable_p, vect_get_data_access_cost)
6792         (vect_peeling_supportable, vect_analyze_group_access_1)
6793         (vect_analyze_group_access, vect_analyze_data_ref_access)
6794         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
6795         (vect_compile_time_alias, vect_small_gap_p)
6796         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
6797         (vect_supportable_dr_alignment): Take references as dr_vec_infos
6798         instead of data_references.  Update calls to other routines for
6799         which the same change has been made.
6800         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
6801         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6802         (vect_slp_analyze_and_verify_node_alignment)
6803         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6804         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6805         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
6806         above changes.
6807         (_vect_peel_info::dr): Replace with...
6808         (_vect_peel_info::dr_info): ...this new field.
6809         (vect_peeling_hash_get_most_frequent)
6810         (vect_peeling_hash_choose_best_peeling): Update accordingly.
6811         (vect_peeling_hash_get_lowest_cost):
6812         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
6813         routines for which the same change has been made.
6814         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
6815         data_reference.
6816         * tree-vect-loop-manip.c (get_misalign_in_elems)
6817         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
6818         above changes.
6819         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6820         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
6821         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
6822         (get_group_load_store_type, get_negative_load_store_type)
6823         (vect_get_data_ptr_increment, vectorizable_store)
6824         (vectorizable_load): Likewise.
6825         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
6826         Update calls to other routines for which the same change has been made.
6828 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6830         * tree-vectorizer.h (vec_info::move_dr): New member function.
6831         (dataref_aux): Rename to...
6832         (dr_vec_info): ...this and add "dr" and "stmt" fields.
6833         (_stmt_vec_info::dr_aux): Update accordingly.
6834         (_stmt_vec_info::data_ref_info): Delete.
6835         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
6836         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
6837         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
6838         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
6839         of data_ref.
6840         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
6841         (STMT_VINFO_DR_INFO): New macro.
6842         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
6843         (set_dr_misalignment): Update after rename of dataref_aux.
6844         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
6845         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
6846         initialization of STMT_VINFO_DATA_REF.
6847         * tree-vectorizer.c (vec_info::move_dr): New function.
6848         * tree-vect-patterns.c (vect_recog_bool_pattern)
6849         (vect_recog_mask_conversion_pattern)
6850         (vect_recog_gather_scatter_pattern): Use it.
6851         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
6852         the "dr" and "stmt" fields of dr_vec_info instead of
6853         STMT_VINFO_DATA_REF.
6855 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6857         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
6858         (is_pattern_stmt_p): Use it.
6859         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
6860         on pattern statements.
6862 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6864         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
6865         original stmt as a stmt_vec_info rather than a gimple stmt.
6866         (vect_pattern_recog_1): Take the statement directly as a
6867         stmt_vec_info, rather than via a gimple_stmt_iterator.
6868         Update call to vect_mark_pattern_stmts.
6869         (vect_pattern_recog): Update calls accordingly.
6871 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6873         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
6874         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
6875         a vect_def_type for the first argument.
6876         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
6877         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
6878         operand if it isn't defined by a vectorized statement.
6879         (vect_build_gather_load_calls): Remove the mask_dt argument and
6880         update calls to vect_get_vec_def_for_stmt_copy.
6881         (vectorizable_bswap): Likewise the dt argument.
6882         (vectorizable_call): Update calls to vectorizable_bswap and
6883         vect_get_vec_def_for_stmt_copy.
6884         (vectorizable_simd_clone_call, vectorizable_assignment)
6885         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
6886         (vectorizable_comparison): Update calls to
6887         vect_get_vec_def_for_stmt_copy.
6888         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
6889         vect_is_simple_use.
6890         (vect_get_loop_based_defs): Remove dt argument and update call
6891         to vect_get_vec_def_for_stmt_copy.
6892         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
6893         and vect_get_vec_def_for_stmt_copy.
6894         (vectorizable_load): Update calls to vect_build_gather_load_calls
6895         and vect_get_vec_def_for_stmt_copy.
6896         * tree-vect-loop.c (vect_create_epilog_for_reduction)
6897         (vectorizable_reduction, vectorizable_live_operation): Update calls
6898         to vect_get_vec_def_for_stmt_copy.
6900 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6902         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
6903         and gimple stmt arguments with a stmt_vec_info.
6904         (vect_record_base_alignments): Update calls accordingly.
6905         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
6906         and gimple stmt arguments with a stmt_vec_info.
6907         (vect_build_slp_tree_1): Remove vinfo argument and update call
6908         to vect_record_max_nunits.
6909         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
6910         and vect_record_max_nunits.
6912 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6914         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
6915         file and take a stmt_vec_info instead of a gimple stmt.
6916         (supportable_widening_operation, vect_finish_replace_stmt)
6917         (vect_finish_stmt_generation, vect_get_store_rhs)
6918         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
6919         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
6920         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
6921         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
6922         (vect_create_data_ref_ptr, bump_vector_ptr)
6923         (vect_permute_store_chain, vect_setup_realignment)
6924         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
6925         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
6926         (vectorizable_reduction, vectorizable_induction)
6927         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
6928         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
6929         than gimple stmts as arguments.
6930         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
6931         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
6932         (can_group_stmts_p, vect_check_gather_scatter)
6933         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6934         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
6935         (vect_permute_load_chain, vect_shift_permute_load_chain)
6936         (vect_transform_grouped_load)
6937         (vect_record_grouped_load_vectors): Likewise.
6938         * tree-vect-loop.c (vect_fixup_reduc_chain)
6939         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
6940         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
6941         (vectorizable_reduction, vectorizable_induction)
6942         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
6943         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
6944         (vect_get_load_store_mask): Likewise.
6945         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
6946         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
6947         * tree-vect-stmts.c (vect_mark_relevant)
6948         (is_simple_and_all_uses_invariant)
6949         (exist_non_indexing_operands_for_use_p, process_use)
6950         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
6951         (vect_get_vec_def_for_operand, vect_get_vec_defs)
6952         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
6953         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
6954         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
6955         (get_negative_load_store_type, get_load_store_type)
6956         (vect_check_load_store_mask, vect_check_store_rhs)
6957         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
6958         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6959         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6960         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6961         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
6962         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
6963         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
6964         (supportable_widening_operation): Likewise.
6966 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6968         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
6969         a stmt_vec_info instead of a gcall.
6970         (vect_check_gather_scatter): Update call accordingly.
6971         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
6972         of a gphi.
6973         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
6974         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
6975         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
6976         instead of a gimple stmt.
6977         (vect_transform_loop): Update calls accordingly.
6978         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
6979         stmt_vec_infos instead of gimple stmts.
6980         (vect_analyze_slp_instance): Update use accordingly.
6981         * tree-vect-stmts.c (read_vector_array, write_vector_array)
6982         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
6983         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
6984         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
6985         (vect_gen_widened_results_half, vect_get_loop_based_defs)
6986         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
6987         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
6988         down to subroutines.
6990 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6992         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
6993         of the worklist from a vector of gimple stmts to a vector of
6994         stmt_vec_infos.
6995         * tree-vect-stmts.c (vect_mark_relevant, process_use)
6996         (vect_mark_stmts_to_be_vectorized): Likewise
6998 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7000         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
7001         statement before passing it to vect_analyze_stmt.
7002         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
7003         the chain of phi vector definitions.  Track the exit phi via its
7004         stmt_vec_info.
7005         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
7006         STMT_VINFO_REDUC_DEF.
7007         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
7008         stmt_vec_infos to handle the statement chains.
7009         (vect_get_slp_defs): Record the first statement in the node
7010         using a stmt_vec_info.
7011         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
7012         statements here and pass their stmt_vec_info down to subroutines.
7013         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
7014         down to vect_finish_stmt_generation.
7015         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
7016         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
7017         stmt_vec_infos to subroutines.
7018         (vect_remove_stores): Use stmt_vec_infos to handle the statement
7019         chains.
7021 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7023         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
7024         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
7025         (vect_permute_store_chain, vect_setup_realignment)
7026         (vect_permute_load_chain, vect_shift_permute_load_chain)
7027         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
7028         stmts internally, and when passing values to other vectorizer routines.
7029         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
7030         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
7031         (vect_analyze_loop_operations, get_initial_def_for_reduction)
7032         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
7033         (vectorizable_reduction, vectorizable_induction)
7034         (vectorizable_live_operation, vect_transform_loop_stmt)
7035         (vect_transform_loop): Likewise.
7036         * tree-vect-patterns.c (vect_reassociating_reduction_p)
7037         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
7038         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
7039         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7040         (vect_slp_analyze_node_operations_1): Likewise.
7041         * tree-vect-stmts.c (vect_mark_relevant, process_use)
7042         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
7043         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
7044         (vect_finish_stmt_generation_1, get_group_load_store_type)
7045         (get_load_store_type, vect_build_gather_load_calls)
7046         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7047         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7048         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7049         (vectorizable_store, vectorizable_load, vectorizable_condition)
7050         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
7051         (supportable_widening_operation): Likewise.
7052         (vect_get_vector_types_for_stmt): Likewise.
7053         * tree-vectorizer.h (vect_dr_behavior): Likewise.
7055 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7057         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
7058         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
7059         (vect_permute_store_chain, vect_permute_load_chain)
7060         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
7061         repeated stmt_vec_info lookups.
7062         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
7063         (vect_update_ivs_after_vectorizer): Likewise.
7064         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
7065         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7066         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
7067         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7068         (vect_bb_slp_scalar_cost): Likewise.
7069         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
7071 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7073         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
7074         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
7075         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
7076         to get gassigns and gcalls, rather than operating on generc gimple
7077         stmts.
7078         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
7079         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
7080         (vectorizable_load, vect_analyze_stmt): Likewise.
7081         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
7083 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7085         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
7086         return stmt_vec_infos rather than gimple stmts.  Do not accept
7087         null arguments.
7088         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
7089         of a gimple stmt.
7090         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7091         Update use of get_later_stmt.
7092         (vect_get_constant_vectors): Update call accordingly.
7093         (vect_schedule_slp_instance): Likewise
7094         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
7095         (vect_slp_analyze_instance_dependence): Likewise.
7096         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
7098 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7100         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
7101         (stmt_info_for_cost::stmt_info): ...this new field.
7102         (add_stmt_costs): Update accordingly.
7103         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7104         (vect_get_known_peeling_cost): Likewise.
7105         (vect_estimate_min_profitable_iters): Likewise.
7106         * tree-vect-stmts.c (record_stmt_cost): Likewise.
7108 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7110         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
7111         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7112         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
7113         accordingly.
7114         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
7116 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7118         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
7119         a gimple stmt to a stmt_vec_info.
7120         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
7122 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7124         * tree-vectorizer.h (vec_info::grouped_stores): Change from
7125         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7126         (_loop_vec_info::reduction_chains): Likewise.
7127         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
7128         accordingly.
7129         * tree-vect-slp.c (vect_analyze_slp): Likewise.
7131 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7133         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
7134         a gimple stmt to a stmt_vec_info.
7135         (_stmt_vec_info::next_element): Likewise.
7136         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
7137         (vect_slp_analyze_and_verify_node_alignment)
7138         (vect_analyze_group_access_1, vect_analyze_group_access)
7139         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
7140         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
7141         (vect_supportable_dr_alignment): Update accordingly.
7142         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
7143         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
7144         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
7145         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7146         * tree-vect-slp.c (vect_build_slp_tree_1)
7147         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
7148         (vect_split_slp_store_group, vect_analyze_slp_instance)
7149         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
7150         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
7151         (get_group_load_store_type, get_load_store_type)
7152         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
7153         (vect_transform_stmt, vect_remove_stores): Likewise.
7155 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7157         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
7158         than a gimple stmt.
7159         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
7160         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
7161         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
7162         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
7163         (vector_alignment_reachable_p, vect_get_data_access_cost)
7164         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
7165         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
7166         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
7167         (vect_analyze_group_access_1, vect_analyze_group_access)
7168         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
7169         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
7170         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
7171         result of vect_dr_stmt and use the stmt_vec_info instead of
7172         the associated gimple stmt.
7173         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7174         (vect_gen_prolog_loop_niters): Likewise.
7175         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7177 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7179         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
7180         to a vec<stmt_vec_info>.
7181         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
7182         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
7183         vec<stmt_vec_info>.
7184         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
7185         to a vec<stmt_vec_info>.
7186         (bst_traits::value_type, bst_traits::value_type): Likewise.
7187         (bst_traits::hash): Update accordingly.
7188         (vect_get_and_check_slp_defs): Change the stmts parameter from
7189         a vec<gimple *> to a vec<stmt_vec_info>.
7190         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
7191         (vect_build_slp_tree): Likewise.
7192         (vect_build_slp_tree_2): Likewise.  Update uses of
7193         SLP_TREE_SCALAR_STMTS.
7194         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
7195         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
7196         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
7197         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
7198         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
7199         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
7200         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
7201         (vect_get_constant_vectors, vect_get_slp_defs)
7202         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
7203         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
7204         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
7205         instead of gimple stmts.
7206         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
7207         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
7208         (vect_slp_analyze_instance_dependence): Update uses of
7209         SLP_TREE_SCALAR_STMTS.
7210         (vect_slp_analyze_and_verify_node_alignment): Likewise.
7211         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
7212         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
7213         (get_initial_defs_for_reduction): Likewise.
7214         (vect_create_epilog_for_reduction): Likewise.
7215         (vectorize_fold_left_reduction): Likewise.
7216         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
7217         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
7218         (can_vectorize_live_stmts): Likewise.
7220 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7222         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
7223         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7224         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
7225         than gimple stmts.
7226         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
7227         of a gimple stmt.
7228         (gather_scalar_reductions): Update after above interface changes.
7229         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
7230         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
7231         than gimple stmts.
7232         (vect_force_simple_reduction): Likewise.
7233         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
7234         LOOP_VINFO_REDUCTIONS.
7235         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7237 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7239         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
7240         a gimple stmt to a stmt_vec_info.
7241         * tree-vect-loop.c (vect_active_double_reduction_p)
7242         (vect_force_simple_reduction, vectorizable_reduction): Update
7243         accordingly.
7245 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7247         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
7248         vec<gimple *> to a vec<stmt_vec_info>.
7249         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
7250         the reduction_phis argument from a vec<gimple *> to a
7251         vec<stmt_vec_info>.
7252         (vectorizable_reduction): Likewise the phis local variable that
7253         is passed to vect_create_epilog_for_reduction.  Update for new type
7254         of SLP_TREE_VEC_STMTS.
7255         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
7256         (vectorizable_live_operation): Likewise.
7257         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
7258         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
7260 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7262         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
7263         a gimple stmt to a stmt_vec_info.
7264         (vectorizable_condition, vectorizable_live_operation)
7265         (vectorizable_reduction, vectorizable_induction): Pass back the
7266         vectorized statement as a stmt_vec_info.
7267         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
7268         use of STMT_VINFO_VEC_STMT.
7269         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
7270         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
7271         as stmt_vec_infos rather than gimple stmts.
7272         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
7273         to a stmt_vec_info.
7274         (vectorizable_live_operation): Likewise.
7275         (vectorizable_reduction, vectorizable_induction): Likewise,
7276         updating use of STMT_VINFO_VEC_STMT.
7277         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
7278         of STMT_VINFO_VEC_STMT.
7279         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
7280         (vectorizable_simd_clone_call, vectorizable_conversion)
7281         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7282         (vectorizable_store, vectorizable_load, vectorizable_condition)
7283         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
7284         from a gimple stmt to a stmt_vec_info.
7285         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
7286         pointer to a stmt_vec_info to the vectorizable_* routines.
7288 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7290         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
7291         a gimple stmt to a stmt_vec_info.
7292         (is_pattern_stmt_p): Update accordingly.
7293         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
7294         (vect_record_grouped_load_vectors): Likewise.
7295         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
7296         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
7297         (vect_model_reduction_cost): Likewise.
7298         (vect_create_epilog_for_reduction): Likewise.
7299         (vectorizable_reduction, vectorizable_induction): Likewise.
7300         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7301         Return the stmt_vec_info for the pattern statement.
7302         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
7303         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
7304         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7305         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
7306         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
7307         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
7308         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
7309         (free_stmt_vec_info, vect_is_simple_use): Likewise.
7311 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7313         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
7314         (vect_finish_stmt_generation): Likewise.
7315         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7316         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
7317         (vect_build_gather_load_calls): Use the return value of the above
7318         functions instead of a separate call to vinfo_for_stmt.  Use narrow
7319         scopes for the input gimple stmt and wider scopes for the associated
7320         stmt_vec_info.  Use vec_info::lookup_def when setting these
7321         stmt_vec_infos from an SSA_NAME definition.
7322         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7323         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7324         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7325         (vectorizable_store, vectorizable_load, vectorizable_condition)
7326         (vectorizable_comparison): Likewise.
7327         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
7328         (vectorizable_reduction): Likewise.
7330 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7332         * tree-vectorizer.h (vect_is_simple_use): Add an optional
7333         stmt_vec_info * parameter before the optional gimple **.
7334         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7335         (process_use, vect_get_vec_def_for_operand_1): Update callers.
7336         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
7337         * tree-vect-loop.c (vectorizable_reduction): Likewise.
7338         (vectorizable_live_operation): Likewise.
7339         * tree-vect-patterns.c (type_conversion_p): Likewise.
7340         (vect_look_through_possible_promotion): Likewise.
7341         (vect_recog_rotate_pattern): Likewise.
7342         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7344 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7346         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
7347         a typedef to a wrapper class.
7348         (NULL_STMT_VEC_INFO): New macro.
7349         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
7350         (stmt_vec_info::operator*): New function.
7351         (stmt_vec_info::operator gimple *): Likewise.
7352         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
7353         (add_stmt_costs): Likewise.
7354         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
7355         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7356         (vect_get_known_peeling_cost): Likewise.
7357         (vect_estimate_min_profitable_iters): Likewise.
7358         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7359         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
7360         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7361         (vectorizable_store, free_stmt_vec_infos): Likewise.
7362         (new_stmt_vec_info): Change return type of xcalloc to
7363         _stmt_vec_info *.
7365 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7367         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
7368         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
7369         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
7370         a single_imm_use-based sequence.
7371         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
7373 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7375         * tree-vectorizer.h (vec_info::lookup_def): Declare.
7376         * tree-vectorizer.c (vec_info::lookup_def): New function.
7377         * tree-vect-patterns.c (vect_get_internal_def): Use it.
7378         (vect_widened_op_tree): Likewise.
7379         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7380         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
7381         (vectorizable_reduction): Likewise.
7382         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
7383         of a gimple *.
7384         (vect_is_slp_reduction): Update calls accordingly.  Use
7385         vec_info::lookup_def.
7386         (vect_is_simple_reduction): Likewise
7387         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
7389 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7391         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
7392         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
7393         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
7394         of vinfo_for_stmt.
7395         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
7396         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
7397         (vect_update_vf_for_slp, vect_analyze_loop_operations)
7398         (vect_is_slp_reduction, vectorizable_induction)
7399         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
7400         * tree-vect-patterns.c (vect_init_pattern_stmt):
7401         (vect_determine_min_output_precision_1, vect_determine_precisions)
7402         (vect_pattern_recog): Likewise.
7403         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
7404         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
7405         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
7406         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7407         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
7408         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
7409         info field from a loop to a loop_vec_info.
7411 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7413         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
7414         (vec_info::add_stmt): Declare.
7415         * tree-vectorizer.c (vec_info::add_stmt): New function.
7416         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
7417         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
7418         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7419         (vectorizable_induction): Likewise.
7420         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
7421         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7422         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
7423         (vectorizable_load): Likewise.
7424         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7425         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
7426         (vect_recog_gather_scatter_pattern): Likewise.
7427         (append_pattern_def_seq): Likewise.  Remove a check that is
7428         performed by add_stmt itself.
7430 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7432         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
7433         which make_ssa_name was called with new_stmt before new_stmt
7434         had been created.
7436 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7438         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
7439         split out from...
7440         (vect_is_slp_reduction): ...here...
7441         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
7442         that are already known to be false.
7444 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7446         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
7447         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
7448         STMT_VINFO_NUM_SLP_USES when it's true.
7449         (vect_free_slp_instance): Add a final_p parameter and pass it to
7450         vect_free_slp_tree.
7451         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
7452         (vect_analyze_slp_instance): Likewise.
7453         (vect_slp_analyze_operations): Likewise.
7454         (vect_slp_analyze_bb_1): Likewise.
7455         * tree-vectorizer.c (vec_info): Likewise.
7456         * tree-vect-loop.c (vect_transform_loop): Likewise.
7458 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7460         * tree-vect-loop.c (vectorizable_reduction): Assert that the
7461         function is not called for second and subsequent members of
7462         a reduction group.
7464 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7466         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
7467         cases for nested loops from here to ...
7468         (vect_create_epilog_for_reduction): ...here.  Only call
7469         vect_is_simple_use for inner-loop reductions.
7471 2018-07-31  Martin Liska  <mliska@suse.cz>
7473         PR gcov-profile/85338
7474         PR gcov-profile/85350
7475         PR gcov-profile/85372
7476         * profile.c (struct location_triplet): New.
7477         (struct location_triplet_hash): Likewise.
7478         (output_location): Do not output a BB that
7479         is already recorded for a line.
7480         (branch_prob): Use streamed_locations.
7482 2018-07-31  Martin Liska  <mliska@suse.cz>
7484         PR gcov-profile/85370
7485         * coverage.c (coverage_begin_function): Do not mark target
7486         clones as artificial functions.
7488 2018-07-31  Martin Liska  <mliska@suse.cz>
7490         PR gcov-profile/83813
7491         PR gcov-profile/84758
7492         PR gcov-profile/85217
7493         PR gcov-profile/85332
7494         * profile.c (branch_prob): Do not record GOTO expressions
7495         for GIMPLE statements which locations are already streamed.
7497 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7499         * gcc.c (handle_spec_function): Accept a soft_matched_part
7500         argument, as do_spec_1.  Pass it down to ...
7501         (eval_spec_function): Accept a soft_matched_part argument,
7502         and pass it down to ...
7503         (do_spec_2): Accept a soft_matched_part argument, and pass
7504         it down to do_spec_1.
7505         (do_spec_1): Pass soft_matched_part to handle_spec_function.
7506         (handle_braces): Update call to handle_spec_function.
7507         (driver::set_up_specs): Update calls to do_spec_2.
7508         (compare_debug_dump_opt_spec_function): Likewise.
7509         (compare_debug_self_opt_spec_function): Likewise.
7511 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7513         * common.opt (nolibc): New option.
7514         * doc/invoke.texi (Link Options): Document it.
7515         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
7516         * config/alpha/linux.h: Likewise.
7517         * config/arc/elf.h: Likewise.
7518         * config/arm/uclinux-elf.h: Likewise.
7519         * config/arm/unknown-elf.h: Likewise.
7520         * config/avr/avrlibc.h: Likewise.
7521         * config/bfin/bfin.h: Likewise.
7522         * config/bfin/linux.h: Likewise.
7523         * config/bfin/uclinux.h: Likewise.
7524         * config/darwin.h: Likewise.
7525         * config/darwin10.h: Likewise.
7526         * config/darwin12.h: Likewise.
7527         * config/gnu-user.h: Likewise.
7528         * config/lm32/uclinux-elf.h: Likewise.
7529         * config/pa/pa-hpux11.h: Likewise.
7530         * config/pa/pa64-hpux.h: Likewise.
7531         * config/sparc/sparc.h: Likewise.
7533 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7535         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
7536         undefined variables.
7538 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
7540         PR target/86640
7541         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
7542         instead of GEN_INT.
7544 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7546         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7547         terminated string literal.
7549 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
7551         PR rtl-optimization/85160
7552         * combine.c (is_just_move): New function.
7553         (try_combine): Allow combining two instructions into two if neither of
7554         the original instructions was a move.
7556 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
7558         PR target/86673
7559         * doc/extend.texi (Global Register Variables): Discourage use of type
7560         qualifiers.
7561         (Local Register Variables): Likewise.
7563 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
7565         PR tree-optimization/86506
7566         * hwint.h (ceil_log2): Resync with hwint.c implementation.
7568 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
7570         PR target/86547
7571         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
7572         hard_regno, make sure no insn between `from` and `to` clobbers it.
7574 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
7575             Tom de Vries  <tdevries@suse.de>
7577         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
7578         (PTX_DEFAULT_RUNTIME_DIM): ... this.
7579         (nvptx_goacc_validate_dims): Set default worker and gang dims to
7580         PTX_DEFAULT_RUNTIME_DIM.
7581         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
7583 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
7585         * config/pa/pa.c (pa_output_addr_vec): Align address table.
7586         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
7587         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
7589 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
7591         * config/rs6000/constraints.md (wG constraint): Delete, no longer
7592         used.
7593         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
7594         predicate to reflect toc fusion has been deleted.
7595         (toc_fusion_mem_raw): Delete, no longer used.
7596         (toc_fusion_mem_wrapped): Likewise.
7597         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
7598         fusion mask bit.
7599         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
7600         Delete, no longer used.
7601         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
7602         meant to be used for toc fusion.
7603         (rs6000_debug_print_mode): Delete toc fusion debugging.
7604         (rs6000_debug_reg_global): Likewise.
7605         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
7606         fusion and secondary reload support that were never used.
7607         (rs6000_option_override_internal): Delete TOC fusion, that was only
7608         partially defined, and it did not work unless you also used the
7609         -mcmodel= switch.
7610         (rs6000_legitimate_address_p): Delete TOC fusion support.
7611         (rs6000_opt_masks): Likewise.
7612         (fusion_wrap_memory_address): Delete function, no longer used.
7613         (fusion_split_address); Delete TOC fusion support.
7614         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
7615         longer used with toc fusion being deleted.
7616         (TARGET_TOC_FUSION_FP): Likewise.
7617         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
7618         UNSPEC.
7619         (toc fusion spliter): Delete TOC fusion support.
7620         (toc_fusionload_<mode>): Likewise.
7621         (toc_fusionload_di): Likewise.
7622         (fusion_gpr_load_<mode>): Delete generator function, this insn no
7623         longer needs to be named.  Rename predicate to delete TOC fusion.
7624         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7625         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7626         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7627         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7628         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
7630 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7632         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
7633         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
7634         __int128 in built-in function prototypes.
7635         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
7636         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
7638 2018-07-27  Martin Sebor  <msebor@redhat.com>
7640         PR tree-optimization/86696
7641         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
7642         types, including enums.
7643         (handle_char_store): Be prepared for the above function to fail.
7645 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
7647         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
7648         when optimization level is lower than 2 or optimize for size.
7650 2018-07-26  Martin Sebor  <msebor@redhat.com>
7652         PR tree-optimization/86043
7653         PR tree-optimization/86042
7654         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
7655         (get_string_cst_length): Rename...
7656         (get_min_string_length): ...to this.  Add argument.
7657         (handle_char_store): Extend to handle multi-character stores by
7658         MEM_REF.
7659         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
7660         * tree.h (initializer_zerop): Add argument.
7662 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
7664         PR middle-end/86660
7665         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
7666         declare target to variables if they have always,{to,from,tofrom} map
7667         kinds.
7669 2018-07-26  Martin Liska  <mliska@suse.cz>
7671         PR lto/86548
7672         * lto-wrapper.c: Add linker_output as prefix
7673         for ltrans_output_file.
7675 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
7677         PR rtl-optimization/85805
7678         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
7679         value for hard registers if that was written in the same mode.
7681 2018-07-26  Martin Liska  <mliska@suse.cz>
7683         PR gcov-profile/86536
7684         * gcov.c (format_gcov): Use printf format %.*f directly
7685         and do not handle special values.
7687 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7689         * common/config/arc/arc-common.c (arc_option_optimization_table):
7690         Update default optimizations for size.
7692 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7694         * config/arc/arc.md (movsf_insn): Add short instruction selection.
7695         * config/arc/constraints.md (CfZ): New constraint.
7696         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
7697         (subsf3_fpu): Likewise.
7698         (cmpsf_fpu): Likewise.
7699         (cmpsf_fpu_uneq): Likewise.
7701 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7703         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
7704         accesses as well.
7705         (arc_is_uncached_mem_p): uncached applies to both the variable and
7706         the pointer.
7708 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7710         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
7711         register names.
7713 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
7715         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
7716         field "m_scopes" from vec to auto_vec.
7718 2018-07-25  Martin Liska  <mliska@suse.cz>
7720         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
7721         return type.
7723 2018-07-25  Richard Biener  <rguenther@suse.de>
7725         PR debug/86654
7726         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
7727         special wrt context_die late.
7728         (gen_subprogram_die): Re-use DIEs in local scope.
7730 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
7732         PR tree-optimization/86644
7733         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
7735 2018-07-25  Martin Liska  <mliska@suse.cz>
7737         PR middle-end/86645
7738         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
7739         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
7741 2018-07-25  Martin Liska  <mliska@suse.cz>
7743         PR sanitizer/79635
7744         * params.def: Explain ASan abbreviation and provide
7745         a documentation link.
7747 2018-07-24  Martin Sebor  <msebor@redhat.com>
7749         PR tree-optimization/86622
7750         PR tree-optimization/86532
7751         * builtins.h (string_length): Declare.
7752         * builtins.c (c_strlen): Correct handling of non-constant offsets.
7753         (check_access): Be prepared for non-constant length ranges.
7754         (string_length): Make extern.
7755         * expr.c (string_constant): Only handle the minor non-constant
7756         array index.  Use string_constant to compute the length of
7757         a generic string constant.
7759 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
7761         PR tree-optimization/86618
7762         * tree-vect-stmts.c (vectorizable_call): Don't take the address
7763         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
7765 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
7767         PR tree-optimization/86636
7768         * json.cc (json::object::set): Fix comment.  Add assertions.
7769         (json::array::append): Move here from json.h.  Add comment and an
7770         assertion.
7771         (json::string::string): Likewise.
7772         * json.h (json::array::append): Move to json.cc.
7773         (json::string::string): Likewise.
7774         * optinfo-emit-json.cc
7775         (optrecord_json_writer::impl_location_to_json): Assert that we
7776         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
7777         wrapper around it.  Expand the location once, rather than three
7778         times.
7779         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
7780         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
7781         wrappers.
7782         (optrecord_json_writer::optinfo_to_json): Likewise, in four
7783         places.  Fix some overlong lines.
7785 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
7787         * config/aarch64/aarch64-simd.md
7788         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
7789         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
7790         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
7791         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
7792         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
7793         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
7794         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
7795         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
7796         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
7798 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
7800         PR middle-end/86627
7801         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
7802         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
7803         and abs_d == d, do the power of two handling if profitable.
7805 2018-07-24  Richard Biener  <rguenther@suse.de>
7807         * match.pd: Add BIT_FIELD_REF canonicalizations.
7809 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7811         PR c/86617
7812         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
7814 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7816         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
7817         terminated STRING_CST object.
7819 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7821         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
7823 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
7825         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
7826         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
7827         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
7828         the elements into a register.
7829         (rs6000_split_v4si_init_di_reg): Delete.
7830         (rs6000_split_v4si_init): Delete.
7831         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
7832         (vsx_init_v4si): Rewrite as a define_expand.
7834 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
7836         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
7837         zero_extend argument from memory): New.
7839 2018-07-22  Martin Sebor  <msebor@redhat.com>
7841         PR bootstrap/86621
7842         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
7843         diagnosing calls with unknown arguments unless -Walloca-larger-than
7844         is restricted to less than PTRDIFF_MAX bytes.
7846 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
7848         * doc/gcov.texi (Invoking Gcov): Editorial changes.
7850 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
7852         * pretty-print.c (text_info::set_location): Remove redundant
7853         "line_table" parameter from call to rich_location::set_range.
7855 2018-07-20  Martin Sebor  <msebor@redhat.com>
7857         PR middle-end/82063
7858         * builtins.c (expand_builtin_alloca): Adjust.
7859         * calls.c (alloc_max_size): Simplify.
7860         * cgraphunit.c (cgraph_node::expand): Adjust.
7861         * common.opt (larger_than_size, warn_frame_larger_than): Remove
7862         variables.
7863         (frame_larger_than_size): Same.
7864         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
7865         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
7866         Initialize.
7867         * doc/invoke.texi (GCC Command Options): Document option arguments.
7868         Explain byte-size arguments and suffixes.
7869         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
7870         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
7871         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
7872         * doc/options.texi (UInteger): Expand.
7873         (Host_Wide_Int, ByteSize): Document new properties.
7874         * final.c (final_start_function_1): Include sizes in an error message.
7875         * function.c (frame_offset_overflow): Same.
7876         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
7877         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
7878         Diagnose unbounded alloca calls only for limits of less than
7879         PTRDIFF_MAX.
7880         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
7881         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
7882         for alloca(0).
7883         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
7884         only for limits of less than PTRDIFF_MAX.
7885         * langhooks-def.h (lhd_handle_option): Change function argument
7886         to HOST_WIDE_INT.
7887         * langhooks.c (lhd_handle_option): Same.
7888         * langhooks.h (handle_option): Same.
7889         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
7890         ByteSize flags.
7891         (var_type, var_type_struct): Same.
7892         (var_set): Handle ByteSize flag.
7893         * optc-gen.awk: Add comments to output to ease debugging.  Make
7894         use of HOST_WIDE_INT where appropriate.
7895         * opts-gen-save.awk:  Use %lx to format unsigned long.
7896         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
7897         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
7898         arguments.  Parse bytes-size suffixes.
7899         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
7900         (enum_value_to_arg): Same.
7901         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
7902         (handle_option): Adjust.
7903         (generate_option): Change function argument to HOST_WIDE_INT.
7904         (cmdline_handle_error): Adjust.
7905         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
7906         (set_option): Change function argument to HOST_WIDE_INT.
7907         (option_enabled): Handle cl_host_wide_int.
7908         (get_option_state): Handle CLVC_SIZE.
7909         (control_warning_option): Same.
7910         * opts.c (common_handle_option): Change function argument to
7911         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
7912         OPT_Wvla_larger_than_.
7913         * opts.h (enum cl_var_type): Add an enumerator.
7914         * stor-layout.c (layout_decl): Print a more meaningful warning.
7915         * toplev.c (output_stack_usage): Adjust.
7917 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
7919         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
7920         call to inline_expand_builtin_string_cmp.
7921         (expand_builtin_strcmp): Likewise.
7922         (expand_builtin_strncmp): Likewise.
7923         (inline_string_cmp): Delete the last parameter, change char_type_node
7924         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
7925         two operands.
7926         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
7927         the inlining expansion on target where the type of the call has same or
7928         narrower precision than unsigned char.
7930 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
7932         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
7933         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
7934         * common.opt (fsave-optimization-record): New option.
7935         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
7936         * doc/invoke.texi (-fsave-optimization-record): New option.
7937         * dumpfile.c: Include "optinfo-emit-json.h".
7938         (struct kv_pair): Move to coretypes.h.
7939         (optgroup_options): Make non-static.
7940         (dump_context::end_scope): Call
7941         optimization_records_maybe_pop_dump_scope.
7942         * dumpfile.h (optgroup_options): New decl.
7943         * json.cc: New file.
7944         * json.h: New file.
7945         * optinfo-emit-json.cc: New file.
7946         * optinfo-emit-json.h: New file.
7947         * optinfo.cc: Include "optinfo-emit-json.h".
7948         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
7949         (optinfo_enabled_p): Check optimization_records_enabled_p.
7950         (optinfo_wants_inlining_info_p): Likewise.
7951         * optinfo.h: Update comment.
7952         * profile-count.c (profile_quality_as_string): New function.
7953         * profile-count.h (profile_quality_as_string): New decl.
7954         (profile_count::quality): New accessor.
7955         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
7956         and optinfo_emit_json_cc_tests.
7957         * selftest.h (selftest::json_cc_tests): New decl.
7958         (selftest::optinfo_emit_json_cc_tests): New decl.
7959         * toplev.c: Include "optinfo-emit-json.h".
7960         (compile_file): Call optimization_records_finish.
7961         (do_compile): Call optimization_records_start.
7962         * tree-ssa-live.c: Include optinfo.h.
7963         (remove_unused_scope_block_p): Retain inlining information if
7964         optinfo_wants_inlining_info_p returns true.
7966 2018-07-20  Richard Biener  <rguenther@suse.de>
7968         PR debug/86585
7969         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
7970         to cover -flto-partition=none.
7972 2018-07-20  Martin Liska  <mliska@suse.cz>
7974         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
7975         (get_decl_source_range): Remove unused function.
7977 2018-07-20  Richard Biener  <rguenther@suse.de>
7979         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
7980         (struct vn_phi_s): Likewise.
7981         (struct vn_reference_s): Likewise.
7982         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
7983         for searching the slot of an entry known to be in the hash itself.
7984         (vn_phi_hasher::equal): Likewise.
7985         (vn_reference_hasher::equal): Likewise.
7986         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
7987         globals.
7988         (optimistic_info, current_info): Remove, keeping only valid_info.
7989         (vn_reference_lookup_1): Remove fallback lookup.
7990         (vn_reference_lookup_2): Likewise.
7991         (vn_nary_op_lookup_1): Likewise.
7992         (vn_phi_lookup): Likewise.
7993         (vn_nary_build_or_lookup_1): Make sure to not chain the built
7994         hash element.
7995         (vn_reference_insert): Adjust, chain the inserted hash element
7996         at last_inserted_ref.
7997         (vn_reference_insert_pieces): Likewise.
7998         (visit_reference_op_call): Likewise.
7999         (vn_nary_op_insert_into): Chain the inserted hash element at
8000         last_inserted_nary.
8001         (vn_nary_op_insert_pieces): Adjust.
8002         (vn_nary_op_insert): Likewise.
8003         (vn_nary_op_insert_stmt): Likewise.
8004         (vn_phi_insert): Adjust, chain the inserted hash element at
8005         last_inserted_phi.
8006         (process_scc): Remove clearing and copying the optimistic
8007         table.  Instead remove elements inserted during an optimistic
8008         iteration from the single table we maintain.
8009         (init_scc_vn): Adjust.
8010         (free_scc_vn): Likewise.
8011         (sccvn_dom_walker::record_cond): Likewise.
8012         (sccvn_dom_walker::after_dom_children): Likewise.
8014 2018-07-19  Martin Sebor  <msebor@redhat.com>
8016         PR tree-optimization/84047
8017         PR tree-optimization/83776
8018         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
8019         (check_array_bounds): Call it.
8021 2018-07-19  Martin Sebor  <msebor@redhat.com>
8023         * align.h (align_flags): Use member initialization.
8025 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
8027         * Makefile.in (OBJS): Add optinfo.o.
8028         * coretypes.h (class symtab_node): New forward decl.
8029         (struct cgraph_node): New forward decl.
8030         (class varpool_node): New forward decl.
8031         * dump-context.h: New file.
8032         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
8033         "tree-pass.h".
8034         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
8035         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
8036         (set_alt_dump_file): Likewise.
8037         (dump_context::~dump_context): New dtor.
8038         (dump_gimple_stmt): Move implementation to...
8039         (dump_context::dump_gimple_stmt): ...this new member function.
8040         Add the stmt to any pending optinfo, creating one if need be.
8041         (dump_gimple_stmt_loc): Move implementation to...
8042         (dump_context::dump_gimple_stmt_loc): ...this new member function.
8043         Start a new optinfo and add the stmt to it.
8044         (dump_gimple_expr): Move implementation to...
8045         (dump_context::dump_gimple_expr): ...this new member function.
8046         Add the stmt to any pending optinfo, creating one if need be.
8047         (dump_gimple_expr_loc): Move implementation to...
8048         (dump_context::dump_gimple_expr_loc): ...this new member function.
8049         Start a new optinfo and add the stmt to it.
8050         (dump_generic_expr): Move implementation to...
8051         (dump_context::dump_generic_expr): ...this new member function.
8052         Add the tree to any pending optinfo, creating one if need be.
8053         (dump_generic_expr_loc): Move implementation to...
8054         (dump_context::dump_generic_expr_loc): ...this new member
8055         function.  Add the tree to any pending optinfo, creating one if
8056         need be.
8057         (dump_printf): Move implementation to...
8058         (dump_context::dump_printf_va): ...this new member function.  Add
8059         the text to any pending optinfo, creating one if need be.
8060         (dump_printf_loc): Move implementation to...
8061         (dump_context::dump_printf_loc_va): ...this new member function.
8062         Start a new optinfo and add the stmt to it.
8063         (dump_dec): Move implementation to...
8064         (dump_context::dump_dec): ...this new member function.  Add the
8065         value to any pending optinfo, creating one if need be.
8066         (dump_context::dump_symtab_node): New member function.
8067         (dump_context::get_scope_depth): New member function.
8068         (dump_context::begin_scope): New member function.
8069         (dump_context::end_scope): New member function.
8070         (dump_context::ensure_pending_optinfo): New member function.
8071         (dump_context::begin_next_optinfo): New member function.
8072         (dump_context::end_any_optinfo): New member function.
8073         (dump_context::s_current): New global.
8074         (dump_context::s_default): New global.
8075         (dump_scope_depth): Delete global.
8076         (dumpfile_ensure_any_optinfo_are_flushed): New function.
8077         (dump_symtab_node): New function.
8078         (get_dump_scope_depth): Reimplement in terms of dump_context.
8079         (dump_begin_scope): Likewise.
8080         (dump_end_scope): Likewise.
8081         (selftest::temp_dump_context::temp_dump_context): New ctor.
8082         (selftest::temp_dump_context::~temp_dump_context): New dtor.
8083         (selftest::verify_item): New function.
8084         (ASSERT_IS_TEXT): New macro.
8085         (ASSERT_IS_TREE): New macro.
8086         (ASSERT_IS_GIMPLE): New macro.
8087         (selftest::test_capture_of_dump_calls): New test.
8088         (selftest::dumpfile_c_tests): Call it.
8089         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
8090         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
8091         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
8092         descriptive comment.
8093         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
8094         (dump_node, dump_bb): Move these unrelated decls.
8095         (class dump_manager): Add leading comment.
8096         * optinfo.cc: New file.
8097         * optinfo.h: New file.
8099 2018-07-19  Michael Collison  <michael.collison@arm.com>
8100             Richard Henderson <rth@redhat.com>
8102         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
8103         (subti): Handle op1 zero.
8104         (subvti4, usub4ti4): New.
8105         (*sub<GPI>3_compare1_imm): New.
8106         (sub<GPI>3_carryinCV): New.
8107         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
8108         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
8110 2018-07-19  Michael Collison  <michael.collison@arm.com>
8111             Richard Henderson <rth@redhat.com>
8113         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
8114         (addti3): Create simpler code if low part is already known to be 0.
8115         (addvti4, uaddvti4): New.
8116         (*add<GPI>3_compareC_cconly_imm): New.
8117         (*add<GPI>3_compareC_cconly): New.
8118         (*add<GPI>3_compareC_imm): New.
8119         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
8120         handle constants within this pattern..
8121         (*add<GPI>3_compareV_cconly_imm): New.
8122         (*add<GPI>3_compareV_cconly): New.
8123         (*add<GPI>3_compareV_imm): New.
8124         (add<GPI>3_compareV): New.
8125         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
8126         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
8127         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
8128         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
8129         with 'comparison' operator.
8130         (*add<GPI>3_compareV_cconly_imm): Ditto.
8131         (*add<GPI>3_compareV_cconly): Ditto.
8132         (*add<GPI>3_compareV_imm): Ditto.
8133         (add<GPI>3_compareV): Ditto.
8134         (add<mode>3_carryinC): Ditto.
8135         (*add<mode>3_carryinC_zero): Ditto.
8136         (*add<mode>3_carryinC): Ditto.
8137         (add<mode>3_carryinV): Ditto.
8138         (*add<mode>3_carryinV_zero): Ditto.
8139         (*add<mode>3_carryinV): Ditto.
8141 2018-07-19  Michael Collison  <michael.collison@arm.com>
8142             Richard Henderson <rth@redhat.com>
8144         * config/aarch64/aarch64-modes.def (CC_V): New.
8145         * config/aarch64/aarch64-protos.h
8146         (aarch64_addti_scratch_regs): Declare
8147         (aarch64_subvti_scratch_regs): Declare.
8148         (aarch64_expand_subvti): Declare.
8149         (aarch64_gen_unlikely_cbranch): Declare
8150         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
8151         for signed overflow using CC_Vmode.
8152         (aarch64_get_condition_code_1): Handle CC_Vmode.
8153         (aarch64_gen_unlikely_cbranch): New function.
8154         (aarch64_addti_scratch_regs): New function.
8155         (aarch64_subvti_scratch_regs): New function.
8156         (aarch64_expand_subvti): New function.
8158 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8160         * config/aarch64/aarch64-option-extensions.def: New entry for profile
8161         extension.
8162         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
8163         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
8164         extension.
8166 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8168         PR target/83009
8169         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8170         address check not strict.
8172 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8174         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
8175         Umq with Umn.
8176         (store_pair_lanes<mode>): Likewise.
8177         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
8178         enum value 'ADDR_QUERY_LDP_STP_N'.
8179         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
8180         (aarch64_print_address_internal): Add declaration.
8181         (aarch64_print_ldpstp_address): Remove.
8182         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
8183         (aarch64_print_operand): Change printing of 'y'.
8184         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
8185         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
8186         'true' rather than '1'.
8187         * config/aarch64/constraints.md (Uml): Likewise.
8188         (Uml): Rename to Umn.
8189         (Umq): Remove.
8191 2018-07-19  Richard Biener  <rguenther@suse.de>
8193         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
8194         a trailing array.
8195         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
8196         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
8197         (vn_reference_hasher): Likewise.
8198         (struct vn_tables_s): Remove obstack and alloc-pool members.
8199         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
8200         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
8201         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
8202         (vn_reference_insert_pieces): Likewise.
8203         (alloc_vn_nary_op_noinit): Adjust.
8204         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
8205         (vn_phi_eq): Adjust.
8206         (shared_lookup_phiargs): Remove.
8207         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
8208         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
8209         (visit_reference_op_call): Likewise.
8210         (copy_nary, copy_phi, copy_reference): Remove.
8211         (process_scc): Rewind the obstack when iterating.  Do not
8212         copy the elements to valid_info but just move them from one
8213         hashtable to the other.
8214         (allocate_vn_table): Adjust.
8215         (free_vn_table): Likewise.
8216         (init_scc_vn): Likewise.
8217         (free_scc_vn): Likewise.
8219 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
8221         PR target/86560
8222         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
8223         indirect_return as function type attribute.
8224         (ix86_attribute_table): Change indirect_return to function
8225         type attribute.
8226         * doc/extend.texi: Update indirect_return attribute.
8228 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
8230         * wide-int.h (widest2_int): New.
8231         * gimple-fold.c (arith_overflowed_p): Use it.
8232         * tree.h (widest2_int_cst): New.
8233         * tree-vrp.c (wide_int_binop_overflow): Rename from
8234         vrp_int_const_binop.
8235         Rewrite to work on trees.
8236         (extract_range_from_multiplicative_op_1): Abstract code to...
8237         (wide_int_range_min_max): ...here.
8238         (wide_int_range_cross_product): ...and here.
8239         (extract_range_from_binary_expr_1): Abstract overflow code to...
8240         (wide_int_range_mult_wrapping): ...here.
8241         * tree-vrp.h (wide_int_range_cross_product): New.
8242         (wide_int_range_mult_wrapping): New.
8244 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
8245             Julia Koval  <julia.koval@intel.com>
8247         * config/i386/x86-tune-costs.h (skylake_memcpy,
8248         skylake_memset): Replace rep_prefix with unrolling for size 512.
8250 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
8252         PR middle-end/86544
8253         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
8254         comparision with EQ_EXPR in last stmt.
8256 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8258         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
8259         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
8260         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
8261         previously known as "PowerPC AltiVec Built-in Functions".  Move
8262         some material to new subsubsections "PowerPC AltiVec Built-in
8263         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
8264         ISA 2.07".
8265         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
8266         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
8267         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
8268         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
8270 2018-07-18  Richard Biener  <rguenther@suse.de>
8272         PR tree-optimization/86557
8273         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
8274         EXACT_DIV_EXPR.
8276 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
8278         * config/s390/s390.c (s390_function_profiler): Generate CFI.
8280 2018-07-17  Jeff Law  <law@redhat.com>
8282         * config/arm/arm.c (get_label_padding): Update for recent
8283         changes to label_to_alignment.
8285         PR tree-optimization/86010
8286         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
8288         * config/mips/mips.c (vr4130_align_insns): Update for recent
8289         changes to label_to_alignment.
8291         * config/frv/frv.c (frv_label_align): Update for recent changes
8292         to label_to_alignment.
8294         * config/nios2/nios2.c (nios2_label_align): Update for recent
8295         changes which dropped ALIGN_LABELS_LOG.
8297 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
8299         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
8300         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
8302 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
8304         * config/arc/arc.c (arc_label_align): Use align_labels instead of
8305         deprecated align_labels_log.
8307 2018-07-17  Richard Biener  <rguenther@suse.de>
8309         PR lto/86456
8310         * dwarf2out.c (init_sections_and_labels): Always generate
8311         a debug_line_str_section for early LTO debug.
8312         (dwarf2out_finish): Reset debug_line_str_hash output early.
8313         Bump counter for extra dwarf5 .debug_loc labels to not conflict
8314         with fat LTO part.
8315         (dwarf2out_early_finish): Output debug_line_str.
8317 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
8319         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
8320         index register on z196 or later.
8322 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
8324         * config/s390/s390.c (s390_default_align): Set default function
8325         alignment to 16.
8326         (s390_override_options_after_change): Call s390_default align.
8327         (s390_option_override_internal): Call s390_default_align.
8328         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
8330 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
8332         PR middle-end/86542
8333         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
8334         to _looptemp_ clauses, other than the first two.
8336 2018-07-17  Martin Liska  <mliska@suse.cz>
8338         * opts.c: Do not enable OPT_falign_* for -Os.
8340 2018-07-17  Martin Liska  <mliska@suse.cz>
8342         * align.h (MAX_CODE_ALIGN): New.
8343         (MAX_CODE_ALIGN_VALUE): New.
8344         * common/config/i386/i386-common.c (ix86_handle_option):
8345         (MAX_CODE_ALIGN): Moved to align.h.
8346         * final.c (MAX_CODE_ALIGN): Likewise.
8347         * opts.c (parse_and_check_align_values):
8348         (MAX_CODE_ALIGN): Likewise.
8349         (MAX_CODE_ALIGN_VALUE): Likewise.
8351 2018-07-17  Martin Liska  <mliska@suse.cz>
8353         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
8354         in order to fulfil coding style.
8355         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
8356         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8357         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8358         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
8359         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
8360         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
8361         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
8362         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
8363         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8365 2018-07-17  Martin Liska  <mliska@suse.cz>
8367         * align.h: New file.
8368         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
8369         directly.
8370         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
8371         align_flags of label_to_alignment.
8372         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
8373         align_flags class.
8374         * config/m68k/m68k.c: Do not use removed align_labels_value and
8375         align_loops_value.
8376         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
8377         (LOOP_ALIGN): Likewise.
8378         (LABEL_ALIGN): Likewise.
8379         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8380         Remove not used macro.
8381         (rs6000_loop_align): Change return type to align_flags.
8382         (rs6000_loop_align_max_skip): Remove.
8383         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
8384         Change return type to align_flags.
8385         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8386         Remove not used macro.
8387         (rs6000_loop_align):  Change return type to align_flags.
8388         (rs6000_loop_align_max_skip): Remove.
8389         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
8390         * config/rx/rx-protos.h (rx_align_for_label): Make it
8391         static function.
8392         * config/rx/rx.c (rx_align_for_label): Change return type
8393         to align_flags.
8394         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
8395         macro definitions.
8396         into align_flags class.
8397         (LABEL_ALIGN): Likewise.
8398         (LOOP_ALIGN): Likewise.
8399         * config/s390/s390.c (s390_label_align): Use align_flags
8400         class member.
8401         (s390_asm_output_function_label): Likewise.
8402         * config/sh/sh.c (sh_override_options_after_change):
8403         Use align_flags class directly without macros.
8404         (find_barrier): Likewise.
8405         (barrier_align): Likewise.
8406         (sh_loop_align): Likewise.
8407         * config/spu/spu.c (spu_option_override):
8408         Use align_flags_tuple::get_value instead of removed macros.
8409         (spu_sched_init): Likewise.
8410         * config/spu/spu.h (GTY): Likewise.
8411         * config/visium/visium.c (visium_option_override):
8412         Set "8" as default secondary alignment.
8413         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
8414         in order to guarantee secondary alignment of 8.
8415         * coretypes.h: Include align.h header file.
8416         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
8417         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
8418         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
8419         * doc/tm.texi.in: Likewise.
8420         * final.c (struct label_alignment): Remove not used structure.
8421         (LABEL_ALIGN): Change type to align_flags.
8422         (LOOP_ALIGN): Likewise.
8423         (JUMP_ALIGN): Likewise.
8424         (default_loop_align_max_skip): Remove.
8425         (default_label_align_max_skip): Likewise.
8426         (default_jump_align_max_skip): Likewise.
8427         (default_label_align_after_barrier_max_skip):
8428         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
8429         (LABEL_TO_MAX_SKIP): Remove.
8430         (label_to_alignment): Return align_flags type instead of integer.
8431         (label_to_max_skip): Remove.
8432         (align_fuzz): Use align_flags type.
8433         (compute_alignments): Use align_flags type and use align_flags::max
8434         to combine multiple alignments.
8435         (grow_label_align): Grow vec instead of C array.
8436         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
8437         (shorten_branches):  Use align_flags type and use align_flags::max
8438         to combine multiple alignments.
8439         (final_scan_insn_1): Remove usage of secondary alignment that comes
8440         from label alignment, but instead use proper secondary alignment
8441         which is computed in grow_label_align.
8442         * flags.h (struct align_flags_tuple): Move to align.h.
8443         (struct align_flags): Likewise.
8444         (state_align_loops): Rename to align_loops.
8445         (state_align_jumps): Rename to align_jumps.
8446         (state_align_labels): Rename to align_labels.
8447         (state_align_functions): Rename to align_functions.
8448         (align_loops_log): Remove.
8449         (align_jumps_log): Remove.
8450         (align_labels_log): Remove.
8451         (align_functions_log): Remove.
8452         (align_loops_max_skip): Remove.
8453         (align_jumps_max_skip): Remove.
8454         (align_labels_max_skip): Remove.
8455         (align_functions_max_skip): Remove.
8456         (align_loops_value): Remove.
8457         (align_jumps_value): Remove.
8458         (align_labels_value): Remove.
8459         (align_functions_value): Remove.
8460         * output.h (label_to_alignment): Change return type to align_flags.
8461         (label_to_max_skip): Remove.
8462         * target.def: Remove loop_align_max_skip, label_align_max_skip,
8463         jump_align_max_skip macros.
8464         * targhooks.h (default_loop_align_max_skip): Remove.
8465         (default_label_align_max_skip): Likewise.
8466         (default_jump_align_max_skip): Likewise.
8467         (default_label_align_after_barrier_max_skip): Remove.
8468         * toplev.c (read_log_maxskip): Use ::normalize function.
8469         (parse_N_M): Remove not used argument and also call ::normalize.
8470         (parse_alignment_opts): Do not pass unused arguments.
8471         * varasm.c (assemble_start_function): Use directly align_functions
8472         instead of removed macros.
8473         * system.h: Do not poison removed macros.
8475 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
8477         PR middle-end/86539
8478         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
8479         and cond temporaries don't have reference type if iterator has
8480         pointer type.  For init use &for_pre_body instead of pre_p if
8481         for_pre_body is non-empty.
8483 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8485         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
8486         double-double modes to SFmode directly directly.
8487         (trunc<mode>sf2_fprs): Delete.
8489 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8491         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
8492         for conversions between IFmode and the decimal floating point modes.
8493         (init_float128_ieee): Use the correct names for conversions between
8494         KFmode and the decimal floating point modes.
8496 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8498         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
8499         for the conversions between TDmode and IFmode.
8500         (init_float128_ieee): Use more correct names for the conversions
8501         between TDmode and KFmode.
8503 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
8505         PR tree-optimization/86526
8506         * builtins.c (expand_builtin_memcmp): Formatting fixes.
8507         (inline_expand_builtin_string_cmp): Likewise.
8508         (inline_string_cmp): Likewise.  Use c_readstr instead of
8509         builtin_memcpy_read_str.  Add unit_mode temporary.
8511 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8513         PR middle-end/86528
8514         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
8515         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
8517 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8519         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
8520         Alphabetize prototypes of built-in functions, separating out
8521         built-in functions that are listed in this section but should be
8522         described elsewhere.
8524 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
8526         PR target/86511
8527         * expmed.c (emit_store_flag): Do not emit setcc followed by a
8528         conditional move when trapping comparison was split to a
8529         non-trapping one (and vice versa).
8531 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8533         * config/s390/s390.c (s390_function_profiler): Generate nops
8534         instead of profiler call sequences.
8535         * config/s390/s390.opt: Add the new option.
8537 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8539         * config/s390/s390.c (s390_function_profiler): Generate
8540         __mcount_loc section.
8541         * config/s390/s390.opt: Add the new option.
8543 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8545         * common.opt: Add the new warning.
8546         * config/s390/s390.c (s390_function_profiler): Emit "brasl
8547         %r0,__fentry__" when -mfentry is specified.
8548         (s390_option_override_internal): Disallow -mfentry for 31-bit
8549         CPUs.
8550         * config/s390/s390.opt: Add the new option.
8552 2018-07-16  Richard Biener  <rguenther@suse.de>
8554         PR lto/86523
8555         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
8556         for function-local FUNCTION_DECL and RESULT_DECL immediately.
8558 2018-07-16  Martin Liska  <mliska@suse.cz>
8560         PR ipa/86529
8561         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
8562         to ::get_create.
8564 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
8566         * config/arc/arcHS.md: Update ARCHS scheduling rules.
8568 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
8570         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
8571         for ARCHS4x.
8572         * config/arc/arc-cpus.def (hs4x): New cpu.
8573         (hs4xd): Likewise.
8574         * config/arc/arc-tables.opt: Regenerate.
8575         * config/arc/arc.c (arc_sched_issue_rate): New function.
8576         (TARGET_SCHED_ISSUE_RATE): Define.
8577         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
8578         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
8579         fpu_cvt.
8580         (attr tune): Add ARCHS4x tune values.
8581         (attr tune_dspmpy): Define.
8582         (*tst): Correct instruction type.
8583         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
8584         * config/arc/arcHS4x.md: New file.
8585         * config/arc/fpu.md: Update instruction type attributes.
8586         * config/arc/t-multilib: Regenerate.
8588 2018-07-16  Tom de Vries  <tdevries@suse.de>
8590         PR debug/86455
8591         * var-tracking.c (vt_initialize): Fix pre_dec handling.
8593 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8595         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
8596         early clobber.
8598 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
8600         PR tree-optimization/86514
8601         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
8602         conversion to a boolean type from a type with greater precision.
8604 2018-07-16  Tom de Vries  <tdevries@suse.de>
8606         * var-tracking.c (vt_initialize): Print adjusted insn slim if
8607         dump_flags request TDF_SLIM.
8609 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
8611         * fold-const.c (int_const_binop_1): Abstract...
8612         (wide_int_binop): ...wide int code here.
8613         (poly_int_binop): ...poly int code here.
8614         Abstract the rest of int_const_binop_1 into int_const_binop.
8615         * fold-const.h (wide_int_binop): New.
8616         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
8617         Remove useless PLUS/MINUS_EXPR case.
8618         (zero_nonzero_bits_from_vr): Move wide int code...
8619         (zero_nonzero_bits_from_bounds): ...here.
8620         (extract_range_from_binary_expr_1): Move mask optimization code...
8621         (range_easy_mask_min_max): ...here.
8622         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
8623         (range_easy_mask_min_max): New.
8625 2018-07-15  Jeff Law  <law@redhat.com>
8627         PR target/85993
8628         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
8629         block.
8631 2018-07-14  Jim Wilson  <jimw@sifive.com>
8633         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
8635 2018-07-14  Paul Koning  <ni1d@arrl.net>
8637         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
8639 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
8641         * lto-streamer-out.c (copy_function_or_variable): Dump info about
8642         copying section.
8644 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
8645             Steve Munroe  <munroesj52@gmail.com>
8647         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
8648         (_mm_andnot_si128): Likewise.
8649         (_mm_or_si128): Likewise.
8650         (_mm_xor_si128): Likewise.
8652 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
8654         PR middle-end/78809
8655         * builtins.c (expand_builtin_memcmp): Inline the calls first
8656         when result_eq is false.
8657         (expand_builtin_strcmp): Inline the calls first.
8658         (expand_builtin_strncmp): Likewise.
8659         (inline_string_cmp): New routine. Expand a string compare
8660         call by using a sequence of char comparison.
8661         (inline_expand_builtin_string_cmp): New routine. Inline expansion
8662         a call to str(n)cmp/memcmp.
8663         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
8664         New option.
8665         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
8667 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
8669         * config/arm/driver-arm.c: Include arm-native.h.
8670         (host_detect_local_cpu): Use auto-generated data tables.
8671         (vendors, arm_cpu_table): Delete.  Move part information to ...
8672         * config/arm/arm-cpus.in: ... here.
8673         * config/arm/parsecpu.awk (gen_native): New function.
8674         (vendor, part): New CPU fields.
8675         (END): Add support for building the native CPU detection tables.
8676         * config/arm/t-arm (arm-native.h): Add build rule.
8677         (driver-arm.o): Add dependency on arm-native.h.
8679 2018-07-13  Richard Biener  <rguenther@suse.de>
8681         PR middle-end/85974
8682         * match.pd (addr1 - addr2): Allow either of the operand to
8683         have a conversion.
8685 2018-07-13  Tom de Vries  <tdevries@suse.de>
8687         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
8688         in remap_ssa_name.
8690 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
8692         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
8693         arrays instead of numbered variables.
8695 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
8697         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
8698         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
8700 2018-07-13  Richard Biener  <rguenther@suse.de>
8702         PR debug/86452
8703         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
8704         instead of get_context_die.
8706 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
8707             Richard Biener  <rguenther@suse.de>
8709         PR middle-end/86489
8710         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
8711         that the loop latch destination where phi is defined.
8713 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
8715         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
8716         (riscv_expand_epilogue): Add assertion to check interrupt mode.
8717         (riscv_set_current_function): Extract getting interrupt type to new
8718         function.
8719         (riscv_get_interrupt_type): New function.
8720         (riscv_merge_decl_attributes): New function, checking interrupt type is
8721         same.
8722         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
8724 2018-07-12  Paul Koning  <ni1d@arrl.net>
8726         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
8727         directive.
8729 2018-07-12  Paul Koning  <ni1d@arrl.net>
8731         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
8732         zero reference, add doloop_end instead.
8733         * doc/md.texi (decrement_and_branch_until_zero): Remove.
8734         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
8735         detail for doloop_end.
8737 2018-07-12  Martin Sebor  <msebor@redhat.com>
8739         PR c/86453
8740         * attribs.c (decl_attributes): Reject conflicting attributes before
8741         calling attribute handlers.
8743 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
8745         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
8746          parameter.
8747         (gcc::dump_manager::get_dump_file_name): likewise.
8748         (dump_begin): Likewise.
8749         * dumpfile.h (dump_begin): Update prototype.
8750         (gcc::dump_manager::get_dump_file_name,
8751         gcc::dump_manager::get_dump_file_name): Update prototype.
8753 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8755         * internal-fn.h (vectorizable_internal_fn_p): New function.
8756         * tree-vect-slp.c (compatible_calls_p): Likewise.
8757         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
8758         to internal functions.
8759         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
8761 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8763         * fold-const.h (inverse_conditions_p): Declare.
8764         * fold-const.c (inverse_conditions_p): New function.
8765         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
8766         that test the inverse condition of a conditional internal function.
8767         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
8768         * internal-fn.c (internal_fn_mask_index): Handle conditional
8769         internal functions.
8770         (vectorized_internal_fn_supported_p): New function.
8771         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
8772         (any_pred_load_store): Replace with...
8773         (need_to_predicate): ...this new variable.
8774         (redundant_ssa_names): New variable.
8775         (ifcvt_can_use_mask_load_store): Move initial checks to...
8776         (ifcvt_can_predicate): ...this new function.  Handle tree codes
8777         for which a conditional internal function exists.
8778         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
8779         instead of ifcvt_can_use_mask_load_store.  Update after variable
8780         name change.
8781         (predicate_load_or_store): New function, split out from
8782         predicate_mem_writes.
8783         (check_redundant_cond_expr): New function.
8784         (value_available_p): Likewise.
8785         (predicate_rhs_code): Likewise.
8786         (predicate_mem_writes): Rename to...
8787         (predicate_statements): ...this.  Use predicate_load_or_store
8788         and predicate_rhs_code.
8789         (combine_blocks, tree_if_conversion): Update after above name changes.
8790         (ifcvt_local_dce): Handle redundant_ssa_names.
8791         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
8792         general conditional functions.
8793         * tree-vect-stmts.c (vectorizable_call): Likewise.
8795 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8796             Alan Hayward  <alan.hayward@arm.com>
8797             David Sherwood  <david.sherwood@arm.com>
8799         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
8800         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
8801         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
8802         plus and minus and convert them into IFN_COND_FMA-based sequences.
8803         (convert_mult_to_fma): Handle conditional plus and minus.
8805 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8807         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
8808         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
8809         (cond_fnms_optab): New optabs.
8810         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
8811         internal functions.
8812         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
8813         * internal-fn.h (get_conditional_internal_fn): Declare.
8814         (get_unconditional_internal_fn): Likewise.
8815         * internal-fn.c (cond_ternary_direct): New macro.
8816         (expand_cond_ternary_optab_fn): Likewise.
8817         (direct_cond_ternary_optab_supported_p): Likewise.
8818         (FOR_EACH_COND_FN_PAIR): Likewise.
8819         (get_conditional_internal_fn): New function.
8820         (get_unconditional_internal_fn): Likewise.
8821         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
8822         (gimple_match_op::gimple_match_op): Add a new overload for 5
8823         operands.
8824         (gimple_match_op::set_op): Likewise.
8825         (gimple_resimplify5): Declare.
8826         * genmatch.c (decision_tree::gen): Generate simplifications for
8827         5 operands.
8828         * gimple-match-head.c (gimple_simplify): Define an overload for
8829         5 operands.  Handle calls with 5 arguments in the top-level overload.
8830         (convert_conditional_op): Handle conversions from unconditional
8831         internal functions to conditional ones.
8832         (gimple_resimplify5): New function.
8833         (build_call_internal): Pass a fifth operand.
8834         (maybe_push_res_to_seq): Likewise.
8835         (try_conditional_simplification): Try converting conditional
8836         internal functions to unconditional internal functions.
8837         Handle 3-operand unconditional forms.
8838         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
8839         Define ternary equivalents of the current rules for binary conditional
8840         internal functions.
8841         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
8842         ternary operations.
8843         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
8844         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
8845         (optab): Handle them.
8846         (SVE_COND_FP_TERNARY): New int iterator.
8847         (sve_fmla_op, sve_fmad_op): New int attributes.
8848         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
8849         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
8850         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
8852 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8854         * target.def (preferred_else_value): New target hook.
8855         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
8856         * doc/tm.texi: Regenerate.
8857         * targhooks.h (default_preferred_else_value): Declare.
8858         * targhooks.c (default_preferred_else_value): New function.
8859         * internal-fn.h (conditional_internal_fn_code): Declare.
8860         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
8861         (get_conditional_internal_fn): Use it.
8862         (conditional_internal_fn_code): New function.
8863         * gimple-match.h (gimple_match_cond): New struct.
8864         (gimple_match_op): Add a cond member function.
8865         (gimple_match_op::gimple_match_op): Update all forms to take a
8866         gimple_match_cond.
8867         * genmatch.c (expr::gen_transform): Use the same condition as res_op
8868         for the suboperation, but don't specify a particular else_value.
8869         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
8870         (visit_nary_op, visit_reference_op_load): Pass
8871         gimple_match_cond::UNCOND to the gimple_match_op constructor.
8872         * gimple-match-head.c: Include tree-eh.h
8873         (convert_conditional_op): New function.
8874         (maybe_resimplify_conditional_op): Likewise.
8875         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
8876         (gimple_resimplify2): Likewise.
8877         (gimple_resimplify3): Likewise.
8878         (gimple_resimplify4): Likewise.
8879         (maybe_push_res_to_seq): Return null for conditional operations.
8880         (try_conditional_simplification): New function.
8881         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
8882         constructor.
8883         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
8884         IFN_COND_* call.
8885         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
8886         function.
8887         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
8889 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
8891         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8892         DECL_FCONTEXT
8893         (hash_tree): Do not hash DECL_FCONTEXT
8894         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
8895         Do not stream DECL_FCONTEXT.
8896         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
8897         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
8899 2018-07-12  Richard Biener  <rguenther@suse.de>
8901         PR debug/86462
8902         * dwarf2out.c (gen_block_die): Only output blocks when they have
8903         at least one !DECL_IGNORED_P variable.
8905 2018-07-12  Richard Biener  <rguenther@suse.de>
8907         PR target/84829
8908         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
8909         Remove -mieee-fp handling.
8911 2018-07-12  Richard Biener  <rguenther@suse.de>
8913         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
8914         left-over from last patch.
8916 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
8918         PR tree-optimization/86492
8919         * gimple-ssa-store-merging.c
8920         (imm_store_chain_info::coalesce_immediate_stores): Call
8921         check_no_overlap even for the merge_overlapping case.  Formatting fix.
8923 2018-07-12  Richard Biener  <rguenther@suse.de>
8925         PR middle-end/86479
8926         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
8927         move possibly trapping operations into the conditional.
8929 2018-07-12  Richard Biener  <rguenther@suse.de>
8931         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
8932         (vn_lookup_simplify_result): Remove recursion limit applied
8933         here.
8934         (vn_nary_build_or_lookup_1): Adjust.
8935         (try_to_simplify): Likewise.
8936         * gimple-match-head.c (gimple_resimplify1): Instead apply one
8937         here.
8938         (gimple_resimplify2): Likewise.
8939         (gimple_resimplify3): Likewise.
8940         (gimple_resimplify4): Likewise.
8942 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
8944         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
8945         Use __mmask64 type instead of __mmask8 for __M argument.
8946         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
8947         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
8948         __U argument.
8949         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
8950         __mmask16 for __M argument.
8951         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
8952         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
8953         to __mmask16 instead of __mmask8.
8954         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
8955         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
8956         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
8957         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
8958         instead of __mmask16 for __U argument.
8959         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
8960         __mmask16 instead of __mmask8 for __U argument.
8961         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
8962         __U argument.
8963         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
8964         __mmask16.
8965         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
8966         argument.
8967         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
8968         __U argument.
8969         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
8970         __mmask16.
8971         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
8972         of __mmask16.
8973         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
8974         __U argument.
8975         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
8976         __U argument.
8977         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
8978         __U argument.
8979         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
8980         __U argument.
8981         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
8982         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
8983         return type as well as __M argument type and all casts from __mmask8
8984         to __mmask32.
8985         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
8986         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
8987         return type as well as __M argument type and all casts from __mmask8
8988         to __mmask16.
8989         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
8990         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
8991         return type as well as __M argument type and all casts from __mmask8
8992         to __mmask32.
8993         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
8994         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
8995         return type as well as __M argument type and all casts from __mmask8
8996         to __mmask16.
8997         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
8998         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
8999         __mmask16.
9001 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
9003         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
9004         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
9005         for __U argument.
9007 2018-07-11  Paul Koning  <ni1d@arrl.net>
9009         * doc/md.texi (define_subst): Document how multiple occurrences of
9010         the same argument in the replacement pattern are handled.
9012 2018-07-11  Paul Koning  <ni1d@arrl.net>
9014         * doc/extend.texi (Common Variable Attributes): Move "mode" into
9015         alphabetical order.
9016         (Common Type Attributes): Add "mode" attribute.
9018 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
9020         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
9021         stream DECL_ORIGINAL_TYPE.
9022         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
9023         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
9024         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
9025         Do not walk original type.
9026         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
9027         external decls.
9028         (write_ts_decl_non_common_tree_pointers): Do not stream
9029         DECL_ORIGINAL_TYPE
9030         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
9031         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
9033 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
9035         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
9036         thread twice from the same starting edge.
9038 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
9040         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
9041         * gimple.c (gimple_call_nonnull_result_p): ...here...
9042         (gimple_call_nonnull_arg): ...and here.
9043         * gimple.h (gimple_call_nonnull_result_p): New.
9044         (gimple_call_nonnull_arg): New.
9046 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
9048         * config/arm/arm-cpus.in: Move information from fpu field of each
9049         cpu definition to the isa field.
9050         * config/arm/parsecpu.awk (fpu): Delete match rule.
9051         (gen_comm_data): Don't add bits from the CPU's FPU entry.
9053 2018-07-11  Richard Biener  <rguenther@suse.de>
9055         PR debug/86457
9056         * dwarf2out.c (init_sections_and_labels): Use
9057         output_asm_line_debug_info consistently.
9058         (dwarf2out_early_finish): Likewise.
9059         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
9060         type units.
9062 2018-07-11  Richard Biener  <rguenther@suse.de>
9064         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
9065         Rework father_bb setting in a way to avoid propagating constants
9066         multiple times on a loop body.
9068 2018-07-10  Mark Wielaard  <mark@klomp.org>
9070         PR debug/86459
9071         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
9073 2018-07-10  Richard Biener  <rguenther@suse.de>
9075         * hash-map.h (hash_map::iterator::operator*): Return
9076         references to key and value.
9078 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
9080         PR c++/86443
9081         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
9082         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
9083         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
9084         (gimplify_omp_for): For composite loops, move outer
9085         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
9086         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
9087         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
9088         TREE_LIST for both the original class iterator and the "last" helper
9089         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
9090         loop, remember has_decl_expr from outer composite loops for the
9091         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
9093 2018-07-09  Martin Sebor  <msebor@redhat.com>
9095         PR middle-end/77357
9096         PR middle-end/86428
9097         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
9098         accessing implicitly initialized array elements.
9099         * expr.c (string_constant): Handle string initializers of
9100         character arrays within aggregates.
9101         * gimple-fold.c (fold_array_ctor_reference): Add argument.
9102         Store element offset.  As a special case, handle zero size.
9103         (fold_nonarray_ctor_reference): Same.
9104         (fold_ctor_reference): Add argument.  Store subobject offset.
9105         * gimple-fold.h (fold_ctor_reference): Add argument.
9107 2018-07-09  Paul Koning  <ni1d@arrl.net>
9109         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
9110         (pdp11_insn_cost): New function.
9111         (pdp11_md_asm_adjust): New function.
9112         (TARGET_INVALID_WITHIN_DOLOOP): Define.
9113         (pdp11_rtx_costs): Update to match machine better.
9114         (output_addr_const_pdp11): Correct format mismatch warnings.
9115         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
9116         * config/pdp11/pdp11.md: General change to add base_cost and/or
9117         length attributes for use by new pdp11_insn_cost function.
9118         (MIN_BRANCH): Correct definition.
9119         (MIN_SOB): Ditto.
9120         (doloop_end): Use standard pattern name for looping pattern.
9121         (doloop_end_nocc): New.
9122         (movsf): Add another constraint alternative.
9123         (zero_extendqihi2): Add constraint alternatives for not in place
9124         extend.
9125         (zero_extendhisi2): Remove.
9126         (shift patterns): Add CC handling variants.
9127         (bswaphi2): New.
9128         (bswapsi2): New.
9129         (rothi3): New.
9130         (define_peephole2): New peephole to recognize mov that sets CC for
9131         subsequent test.
9133 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9135         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
9136         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
9137         wi::add.
9139 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
9141         PR c/86420
9142         * real.c (real_nextafter): Return true if result is denormal.
9144 2018-07-09  Martin Liska  <mliska@suse.cz>
9146         * common.opt: Add back wrongly removed attribute.
9148 2018-07-09  Richard Biener  <rguenther@suse.de>
9150         PR debug/86413
9151         * dwarf2out.c (gen_block_die): For an early generated DIE
9152         always output high/low PC attributes.
9154 2018-07-09  Tom de Vries  <tdevries@suse.de>
9156         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
9157         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
9158         onto VAR_DECL with abstract origin.
9160 2018-07-07  Jim Wilson  <jimw@sifive.com>
9162         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
9164 2018-07-07  Tom de Vries  <tdevries@suse.de>
9166         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
9168 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
9170         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
9171         overflow_type.
9172         (combine_bound): Use wide-int overflow calculation instead of
9173         rolling our own.
9174         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
9175         overflow_type.
9176         * fold-const.c (int_const_binop_2): Same.
9177         (extract_muldiv_1): Same.
9178         (fold_div_compare): Same.
9179         (fold_abs_const): Same.
9180         * match.pd: Same.
9181         * poly-int.h (add): Same.
9182         (sub): Same.
9183         (neg): Same.
9184         (mul): Same.
9185         * predict.c (predict_iv_comparison): Same.
9186         * profile-count.c (slow_safe_scale_64bit): Same.
9187         * simplify-rtx.c (simplify_const_binary_operation): Same.
9188         * tree-chrec.c (tree_fold_binomial): Same.
9189         * tree-data-ref.c (split_constant_offset_1): Same.
9190         * tree-if-conv.c (idx_within_array_bound): Same.
9191         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
9192         * tree-ssa-phiopt.c (minmax_replacement): Same.
9193         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
9194         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
9195         * vr-values.c (vr_values::adjust_range_with_scev): Same.
9196         * wide-int.cc (wi::add_large): Same.
9197         (wi::mul_internal): Same.
9198         (wi::sub_large): Same.
9199         (wi::divmod_internal): Same.
9200         * wide-int.h: Change overflow type to overflow_type for neg, add,
9201         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
9202         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
9203         mul_internal, divmod_internal.
9204         (overflow_type): New enum.
9205         (accumulate_overflow): New.
9207 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
9209         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
9210         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
9212 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
9214         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
9215         argument is checked for zero before entering loop, avoid checking again.
9217 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
9219         * gimplify.h (generic_expr_could_trap_p): Set as global function.
9220         * gimplify.h (generic_expr_could_trap_p): Likwise.
9221         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
9223 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
9225         PR tree-optimization/86401
9226         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
9227         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
9228         (fold_bit_and_mask): ... here.  New helper function for match.pd.
9229         * fold-const.h (fold_bit_and_mask): Declare.
9230         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
9232 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
9234         PR target/86324
9235         * target.def (translate_mode_attribute): New hook.
9236         * targhooks.h (default_translate_mode_attribute): Declare.
9237         * targhooks.c (default_translate_mode_attribute): New function.
9238         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
9239         * doc/tm.texi: Regenerate.
9240         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
9241         (rs6000_translate_mode_attribute): New function.
9243 2018-07-06  Paul Koning  <ni1d@arrl.net>
9245         * doc/md.texi (define_split): Document DONE and FAIL.
9246         (define_peephole2): Ditto.
9248 2018-07-05  Jeff Law  <law@redhat.com>
9250         PR tree-optimization/86010
9251         * tree-ssa-dse.c (compute_trims): More aggressively trim at
9252         both the head and tail of mem* and str* calls.
9254 2018-07-05  Jim Wilson  <jimw@sifive.com>
9256         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
9258 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
9260         * config/aarch64/aarch64-simd.md: correct flags text for
9261         MIN_EXPR replacement.
9263 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
9265         * configure: Regenerated.
9267 2018-07-05  Carl Love  <cel@us.ibm.com>
9269         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
9270         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
9271         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
9272         VSX_BUILTIN_DOUBLEL_V4SF.
9274 2018-07-05  Martin Sebor  <msebor@redhat.com>
9276         PR c++/86400
9277         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
9278         than its domain to compute its the upper bound of a char array.
9280 2018-07-05  Nathan Sidwell  <nathan@acm.org>
9282         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
9283         * doc/cpp.texi: Update comment.
9284         * doc/tm.texi: Rebuilt.
9285         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
9286         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
9287         * doc/extend.texi (Backwards Compatibility): Clarify it is system
9288         headers affected by extern "C".
9289         * system.h: Poison NO_IMPLICIT_EXTERN_C.
9290         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
9291         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
9292         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
9293         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
9294         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
9295         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
9296         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
9297         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
9298         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
9299         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
9300         config/sparc/sp64-elf.h, config/spu/spu.h,
9301         config/stormy16/stormy16.h, config/v850/v850.h,
9302         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
9303         define NO_IMPLICIT_EXTERN_C.
9304         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
9306 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
9308         PR target/84711
9309         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
9310         instead of GET_MODE_SIZE when comparing Units.
9312 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
9314         PR target/84711
9315         * rtlanal.c (set_noop_p): Constrain on mode change,
9316         include hard-reg-set.h
9318 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
9320         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
9322 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
9324         Revert
9325         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
9327         PR sanitizer/84250
9328         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9329         libasan.
9330         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9332 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
9334         PR sanitizer/84250
9335         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9336         libasan.
9337         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9339 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
9341         PR middle-end/86380
9342         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
9344 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
9346         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
9347         neg_*_op* variables.
9349 2018-07-04  Martin Liska  <mliska@suse.cz>
9351         * tree-switch-conversion.c: Define
9352         max_ratio_for_speed and max_ratio_for_size constants.
9354 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
9355             Martin Liska  <mliska@suse.cz>
9357         PR middle-end/66240
9358         PR target/45996
9359         PR c/84100
9360         * common.opt: Rename align options with 'str_' prefix.
9361         * common/config/i386/i386-common.c (set_malign_value): New
9362         function.
9363         (ix86_handle_option): Use it to set -falign-* options/
9364         * config/aarch64/aarch64-protos.h (struct tune_params): Change
9365         type from int to string.
9366         * config/aarch64/aarch64.c: Update default values from int
9367         to string.
9368         * config/alpha/alpha.c (alpha_override_options_after_change):
9369         Likewise.
9370         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
9371         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9372         max skip conditionally.
9373         * config/i386/freebsd.h (SUBALIGN_LOG): New.
9374         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9375         max skip conditionally.
9376         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9377         max skip conditionally.
9378         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
9379         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9380         max skip conditionally.
9381         * config/i386/i386.c (struct ptt): Change type from int to
9382         string.
9383         (ix86_default_align): Set default values.
9384         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
9385         max skip conditionally.
9386         * config/i386/iamcu.h (SUBALIGN_LOG): New.
9387         (ASM_OUTPUT_MAX_SKIP_ALIGN):
9388         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
9389         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9390         max skip conditionally.
9391         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
9392         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
9393         * config/i386/x86-64.h (SUBALIGN_LOG): New.
9394         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9395         max skip conditionally.
9396         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9397         * config/ia64/ia64.c (ia64_option_override): Set default values
9398         for alignment options.
9399         * config/m68k/m68k.c: Handle new str_align_* options.
9400         * config/mips/mips.c (mips_set_compression_mode): Change
9401         type of constants.
9402         (mips_option_override): Set default values for options.
9403         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
9404         Likewise.
9405         * config/rs6000/rs6000.c (rs6000_option_override_internal):
9406         Likewise.
9407         * config/rx/rx.c (rx_option_override): Likewise.
9408         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
9409         (LABEL_ALIGN): Use align_labels_log.
9410         (LOOP_ALIGN): Use align_loops_align.
9411         * config/s390/s390.c (s390_asm_output_function_label): Use new
9412         macros.
9413         * config/sh/sh.c (sh_override_options_after_change):
9414         Change type of constants.
9415         * config/spu/spu.c (spu_sched_init): Likewise.
9416         * config/sparc/sparc.c (sparc_option_override): Set default
9417         values for options.
9418         * config/visium/visium.c (visium_option_override): Likewise.
9419         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
9420         emit p2align format with last argument if it's not needed.
9421         * doc/invoke.texi: Document extended format of -falign-*.
9422         * final.c: Use align_labels alignment.
9423         * flags.h (struct target_flag_state): Change type to use
9424         align_flags.
9425         (struct align_flags_tuple): New.
9426         (struct align_flags): Likewise.
9427         (align_loops_log): Redefine macro to use new types.
9428         (align_loops_max_skip): Redefine macro to use new types.
9429         (align_jumps_log): Redefine macro to use new types.
9430         (align_jumps_max_skip): Redefine macro to use new types.
9431         (align_labels_log): Redefine macro to use new types.
9432         (align_labels_max_skip): Redefine macro to use new types.
9433         (align_functions_log): Redefine macro to use new types.
9434         (align_loops): Redefine macro to use new types.
9435         (align_jumps): Redefine macro to use new types.
9436         (align_labels): Redefine macro to use new types.
9437         (align_functions): Redefine macro to use new types.
9438         (align_functions_max_skip): Redefine macro to use new types.
9439         (align_loops_value): New macro.
9440         (align_jumps_value): New macro.
9441         (align_labels_value): New macro.
9442         (align_functions_value): New macro.
9443         * function.c (invoke_set_current_function_hook): Propagate
9444         alignment values from flags to global variables default in
9445         topleev.h.
9446         * ipa-icf.c (sem_function::equals_wpa): Use
9447         cl_optimization_option_eq instead of memcmp.
9448         * lto-streamer.h (cl_optimization_stream_out): Support streaming
9449         of string types.
9450         (cl_optimization_stream_in): Likewise.
9451         * optc-save-gen.awk: Support strings in cl_optimization.
9452         * opth-gen.awk: Likewise.
9453         * opts.c (finish_options): Remove error checking of invalid
9454         value ranges.
9455         (MAX_CODE_ALIGN): Remove.
9456         (MAX_CODE_ALIGN_VALUE): Likewise.
9457         (parse_and_check_align_values): New function.
9458         (check_alignment_argument): Likewise.
9459         (common_handle_option): Use check_alignment_argument.
9460         * opts.h (parse_and_check_align_values): Declare.
9461         * toplev.c (init_alignments): Remove.
9462         (read_log_maxskip): New.
9463         (parse_N_M): Likewise.
9464         (parse_alignment_opts): Likewise.
9465         (backend_init_target): Remove usage of init_alignments.
9466         * toplev.h (parse_alignment_opts): Declare.
9467         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
9468         argument.
9469         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
9470         * tree.c (cl_option_hasher::equal): New.
9471         * varasm.c: Use new global macros.
9473 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
9475         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
9476         Use a simpler align directive also if MAXSKIP = ALIGN-1.
9477         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9478         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9479         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9480         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9481         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
9482         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
9483         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
9484         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9485         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9486         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9487         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9489 2018-07-04  Martin Liska  <mliska@suse.cz>
9490             Jonathan Wakely  <jwakely@redhat.com>
9492         * coverage.c: Use correct type.
9493         * doc/invoke.texi: Language correction.
9495 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
9497         PR target/85620
9498         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
9499         ENDBRANCH for non-tail call which may return via indirect branch.
9500         * doc/extend.texi: Document indirect_return attribute.
9502 2018-07-03  Martin Sebor  <msebor@redhat.com>
9504         PR tree-optimization/86274
9505         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
9506         precondition.
9507         (format_floating): Correct handling of infinities and NaNs.
9509 2018-07-03  Martin Sebor  <msebor@redhat.com>
9511         * print-tree.c (print_real_cst): New function.
9512         (print_node_brief): Call it.
9513         (print_node): Ditto.
9515 2018-07-03  Jeff Law  <law@redhat.com>
9517         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
9518         into a single pattern.
9520         * config/h8300/h8300.md (ors code_iterator): New.
9521         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
9522         a single pattern and single splitter.
9523         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
9524         (iorqi3_1, xorqi3_1): Likewise.
9525         (iorqi3, xorqi3 expanders): Similarly.
9527         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
9528         (movmd_internal) into a single pattern using the P mode iterator.
9529         (movmd splitters): Similarly.
9530         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
9531         (movsd splitters): Similarly.
9533         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
9534         ADDB, ADDW and ADDL into a single ADD attribute which selects the
9535         right table based on the size of the operand.
9536         * config/h8300/h8300.md (length_table): Corresponding changes. All
9537         references to "addb", "addw" and "addl" changed to "add".
9538         (btst patterns): Merge two variants into a single pattern.
9539         (tstqi, tsthi): Likewise.
9540         (addhi3_incdec, addsi3_incdec): Likewise.
9541         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
9542         (mulhi3, mulsi3): Likewise.
9543         (udivhi3, udivsi3): Likewise.
9544         (divhi3, divsi3): Likewise.
9545         (andorqi3, andorhi3, andorsi3): Likewise.
9547 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
9549         PR target/85694
9550         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
9551         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
9553 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9555         PR tree-optimization/85694
9556         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
9557         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
9558         UNSPEC_URHADD.
9559         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
9560         (<u>avg<mode>3_ceil): New patterns.
9562 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
9564         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
9565         scan-tree-dump directive.
9566         * gcc.dg/vect/slp-perm-2.c: Likewise.
9567         * gcc.dg/vect/slp-perm-3.c: Likewise.
9568         * gcc.dg/vect/slp-perm-5.c: Likewise.
9569         * gcc.dg/vect/slp-perm-6.c: Likewise.
9570         * gcc.dg/vect/slp-perm-7.c: Likewise.
9571         * gcc.dg/vect/slp-perm-8.c: Likewise.
9573 2018-07-03  Marek Polacek  <polacek@redhat.com>
9575         PR middle-end/86202
9576         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
9578 2018-07-03  Richard Biener  <rguenther@suse.de>
9580         PR ipa/86389
9581         * tree-ssa-structalias.c (find_func_clobbers): Properly
9582         handle indirect calls.
9584 2018-07-03  Jeff Law  <law@redhat.com>
9586         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
9587         (shifts): New code iterator.
9588         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
9589         expander.  Fix HImode handling on H8/SX.
9590         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
9591         (subqi3, subhi3, subsi3 expanders): Likewise.
9592         (andqi3, andhi3, andsi3 expanders): Likewise.
9593         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
9594         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
9595         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
9596         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
9597         (zero_extendqihi2, zero_extendqisi2): Likewise.
9598         (extendqihi2, extendqisi2): Likewise.
9599         (rotlqi3, rotlhi3, rotlsi3): Likewise.
9600         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
9601         (rotlqi3_1, rotlhi3_1): Likewise.
9602         (logicalhi3_sn, logicalsi3_sn): Likewise.
9603         (logicalhi3, logicalsi3): Likewise.
9605 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9607         * tree-vect-patterns.c (vect_recog_rotate_pattern)
9608         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9609         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
9610         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
9611         type to append_pattern_def_seq instead of creating a stmt_vec_info
9612         directly.
9613         (build_mask_conversion): Likewise.  Remove vinfo argument.
9614         (vect_add_conversion_to_patterm): Likewise, renaming to...
9615         (vect_add_conversion_to_pattern): ...this.
9616         (vect_recog_mask_conversion_pattern): Update call to
9617         build_mask_conversion.  Pass the vector type to
9618         append_pattern_def_seq here too.
9619         (vect_recog_gather_scatter_pattern): Update call to
9620         vect_add_conversion_to_pattern.
9622 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9624         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
9625         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9626         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
9627         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
9628         STMT_VINFO_PATTERN_DEF_SEQ to null here.
9629         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
9630         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
9631         append_pattern_def_seq instead of new_pattern_def_seq.
9632         (vect_recog_divmod_pattern): Do both of the above.
9633         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
9634         is null.
9636 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9638         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
9639         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
9640         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
9641         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
9642         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
9643         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9644         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
9645         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9646         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9647         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
9648         parameter with a single stmt_vec_info.
9649         (vect_recog_func_ptr): Likewise.
9650         (vect_recog_gather_scatter_pattern): Likewise, folding in...
9651         (vect_try_gather_scatter_pattern): ...this.
9652         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
9653         the stmt_vec_info of the statement to be matched.  Don't clear
9654         STMT_VINFO_RELATED_STMT.
9655         (vect_pattern_recog): Update call accordingly.
9657 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9659         PR tree-optimization/85694
9660         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
9661         (uavgM3_ceil): Document new optabs.
9662         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
9663         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
9664         functions.
9665         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
9666         (savg_ceil_optab): New optabs.
9667         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
9668         (vect_vect_recog_func_ptrs): Add it.
9669         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
9670         constant directly from the associated lhs.
9672 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9674         * tree-vect-patterns.c (vect_split_statement): New function.
9675         (vect_convert_input): Use it to try to split an existing cast.
9677 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9679         * poly-int.h (print_hex): New function.
9680         * dumpfile.h (dump_dec, dump_hex): Declare.
9681         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
9682         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
9683         min_input_precision, operation_precision and operation_sign.
9684         * tree-vect-patterns.c (vect_get_range_info): New function.
9685         (vect_same_loop_or_bb_p, vect_single_imm_use)
9686         (vect_operation_fits_smaller_type): Delete.
9687         (vect_look_through_possible_promotion): Add an optional
9688         single_use_p parameter.
9689         (vect_recog_over_widening_pattern): Rewrite to use new
9690         stmt_vec_info infomration.  Handle one operation at a time.
9691         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
9692         (vect_truncatable_operation_p, vect_set_operation_type)
9693         (vect_set_min_input_precision): New functions.
9694         (vect_determine_min_output_precision_1): Likewise.
9695         (vect_determine_min_output_precision): Likewise.
9696         (vect_determine_precisions_from_range): Likewise.
9697         (vect_determine_precisions_from_users): Likewise.
9698         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
9699         (vect_vect_recog_func_ptrs): Put over_widening first.
9700         Add cast_forwprop.
9701         (vect_pattern_recog): Call vect_determine_precisions.
9703 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9705         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
9706         statements that have been replaced by further pattern statements.
9707         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
9709 2018-07-03  Richard Biener  <rguenther@suse.de>
9711         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
9712         always set *dt.  Dump vectype in vectype overload.
9713         * dumpfile.h (dump_gimple_expr): New function.
9714         (dump_gimple_expr_loc): Likewise.
9715         * dumpfile.c (dump_gimple_expr): New function.
9716         (dump_gimple_expr_loc): Likewise.
9718 2018-07-02  Jeff Law  <law@redhat.com>
9720         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
9721         the H8/300, H8/300H and H8/S variants into a single pattern.
9722         (movhi_h8300, movqi_h8300hs): Similarly.
9723         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
9724         (QHI mode iterator): New.
9726         * config/h8300/h8300.md: Remove trailing whitespace.
9728 2018-07-02  Jim Wilson  <jimw@sifive.com>
9730         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
9731         instead of emit_insn for interrupt returns.
9732         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
9733         (riscv_sret, riscv_uret): Likewise.
9735 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
9737         * pretty-print.c (selftest::test_pp_format): Move save and restore
9738         of quotes to class auto_fix_quotes, and add an instance.
9739         * selftest.c: Include "intl.h".
9740         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
9741         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
9742         * selftest.h (selftest::auto_fix_quotes): New class.
9744 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
9746         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
9747         (aarch64_sve_prepare_conditional_op): Remove.
9748         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
9749         Allow aarch64_simd_reg_or_zero as select operand; remove
9750         the aarch64_sve_prepare_conditional_op call.
9751         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
9752         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9753         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
9754         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
9755         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
9756         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
9757         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
9758         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
9759         and a splitters to match all of the *_any patterns.
9760         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
9762         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
9763         (SVE_COND_FP_BINARY_REV): Remove.
9764         (sve_int_op_rev, sve_fp_op_rev): New.
9765         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
9766         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
9767         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
9768         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
9769         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
9770         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
9771         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
9772         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
9773         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
9775         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
9776         Remove match_dup 1 from the inner unspec.
9777         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9779         * config/aarch64/aarch64.md (movprfx): New attr.
9780         (length): Default movprfx to 8.
9781         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
9782         (*madd<SVE_I>, *msub<SVE_I): Likewise.
9783         (*<su>mul<SVE_I>3_highpart): Likewise.
9784         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
9785         (*v<ASHIFT><SVE_I>3): Likewise.
9786         (*<su><MAXMIN><SVE_I>3): Likewise.
9787         (*<su><MAXMIN><SVE_F>3): Likewise.
9788         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
9789         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
9790         (*div<SVE_F>4): Likewise.
9792 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
9794         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
9795         in dump string.
9797 2018-07-02  Richard Biener  <rguenther@suse.de>
9799         PR tree-optimization/86363
9800         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
9801         memset argument refers to a non-variable address.
9803 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
9805         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
9806         {PLUS,MINUS}_EXPR code to...
9807         (adjust_symbolic_bound): ...here,
9808         (combine_bound): ...here,
9809         (set_value_range_with_overflow): ...and here.
9811 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
9813         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
9814         code...
9815         (extract_range_from_abs_expr): ...here.
9817 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
9819         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
9820         -fno-omit-frame-pointer when not optimizing.
9822 2018-07-02  Martin Liska  <mliska@suse.cz>
9824         PR ipa/86279
9825         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
9826         (propagate_nothrow): Likewise.
9828 2018-07-02  Martin Liska  <mliska@suse.cz>
9830         PR ipa/86323
9831         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
9833 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
9835         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
9836         function in r262149, changing "loc" param from source_location to
9837         const dump_location_t &.
9838         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
9839         declaration, as above.
9841 2018-07-01  Paul Koning  <ni1d@arrl.net>
9843         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9844         -munit-asm, -mgnu-asm, -mdec-asm.
9845         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
9846         (pdp11_output_labelref): New.
9847         (pdp11_output_def): New.
9848         (pdp11_output_addr_vec_elt): New.
9849         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
9850         %# and %@ format codes.
9851         (pdp11_option_override): New.
9852         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
9853         (pdp11_output_ident): New.
9854         (pdp11_asm_named_section): New.
9855         (pdp11_asm_init_sections): New.
9856         (pdp11_file_start): New.
9857         (pdp11_file_end): New.
9858         (output_ascii): Use .ascii/.asciz for -mdec-asm.
9859         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
9860         %o, like %c but octal.
9861         (pdp11_option_override): New.
9862         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
9863         -mdec-asm.
9864         (DATA_SECTION_ASM_OP): Ditto.
9865         (READONLY_DATA_SECTION_ASM_OP): New.
9866         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
9867         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
9868         (ASM_OUTPUT_LABELREF): Ditto.
9869         (ASM_OUTPUT_DEF): Ditto.
9870         (ASM_OUTPUT_EXTERNAL): New.
9871         (ASM_OUTPUT_SOURCE_FILENAME): New.
9872         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
9873         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
9874         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
9875         %# and %@ format codes.
9876         * config/pdp11/pdp11.opt (mgnu-asm): New.
9877         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
9878         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
9879         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
9881 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
9883         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
9884         dereferencing path[] beyond its length.
9885         (debug_path): New.
9886         (debug_all_paths): New.
9887         (rewire_first_differing_edge): New.
9888         (adjust_paths_after_duplication): New.
9889         (duplicate_thread_path): Call adjust_paths_after_duplication.
9890         Add new argument.
9891         (thread_through_all_blocks): Add new argument to
9892         duplicate_thread_path.
9894 2018-06-30  Jim Wilson  <jimw@sifive.com>
9896         * config/riscv/predicates.md (p2m1_shift_operand): New.
9897         (high_mask_shift_operand): New.
9898         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
9899         pattern using p2m1_shift_operand.
9900         (lshsi3_zero_extend_3+2): New combiner pattern using
9901         high_mask_shift_operand.
9903 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9905         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
9906         split out from...
9907         (vect_recog_rotate_pattern): ...here.
9908         (vect_convert_input): Try to insert casts of invariants in the
9909         preheader.
9910         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
9911         preheader to be empty.
9913 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9915         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
9916         vector type.  If given, install it in the new statement's
9917         STMT_VINFO_VECTYPE.
9918         (vect_element_precision): New function.
9919         (vect_unpromoted_value): New struct.
9920         (vect_unpromoted_value::vect_unpromoted_value): New function.
9921         (vect_unpromoted_value::set_op): Likewise.
9922         (vect_look_through_possible_promotion): Likewise.
9923         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
9924         (vect_widened_op_tree, vect_convert_input): Likewise.
9925         (vect_convert_inputs, vect_convert_output): Likewise.
9926         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
9927         to handle the optional cast of the multiplication result and
9928         vect_widened_op_tree to detect the widened multiplication itself.
9929         Do not require the input and output of promotion casts to have
9930         the same sign, but base the signedness of the operation on the
9931         input rather than the result.  If the pattern includes two
9932         promotions, check that those promotions have the same sign.
9933         Do not restrict the MULT_EXPR handling to a double-width result;
9934         handle quadruple-width results and wider.  Use vect_convert_inputs
9935         to convert the inputs to the common type.
9936         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
9937         to handle the optional cast of the ABS result.  Also allow a sign
9938         change or a sign extension between the ABS and MINUS.
9939         Use vect_widened_op_tree to detect the widened subtraction and use
9940         vect_convert_inputs to convert the inputs to the common type.
9941         (vect_handle_widen_op_by_const): Delete.
9942         (vect_recog_widen_op_pattern): New function.
9943         (vect_recog_widen_mult_pattern): Use it.
9944         (vect_recog_widen_shift_pattern): Likewise.
9945         (vect_recog_widen_sum_pattern): Use
9946         vect_look_through_possible_promotion to handle the promoted
9947         PLUS_EXPR operand.
9949 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9951         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
9952         the containing gimple_seq *.
9953         * gimple-iterator.h (gsi_for_stmt): Declare it.
9954         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
9955         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
9956         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9957         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9958         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
9959         checks.
9960         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
9961         split out from...
9962         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
9963         statement being replaced is part of an existing pattern
9964         definition sequence, inserting the new pattern statements before
9965         the original one.
9966         (vect_pattern_recog_1): Don't return a bool.  If the statement
9967         is already part of a pattern, instead apply pattern matching
9968         to the pattern definition statements.  Don't clear the
9969         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
9970         (vect_pattern_recog): Don't break after the first match;
9971         continue processing the pattern definition statements instead.
9972         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
9974 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9976         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9977         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9978         (vect_recog_widen_sum_pattern): Use it.
9980 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9982         * tree-vect-loop.c (vectorizable_reduction): Assert that the
9983         phi is not a pattern statement and has not been replaced by
9984         a pattern statement.
9985         * tree-vect-patterns.c (type_conversion_p): Don't check
9986         STMT_VINFO_IN_PATTERN_P.
9987         (vect_recog_vector_vector_shift_pattern): Likewise.
9988         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
9989         the pattern statement rather than the original statement; check
9990         directly for a WIDEN_MULT_EXPR here.
9991         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
9992         vect_is_simple_use to return the pattern statement rather
9993         than the original statement; use is_pattern_stmt_p to check
9994         for such a pattern statement.
9995         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
9996         to return the pattern statement rather than the original statement;
9997         don't do the same transformation here.
9998         (vect_is_simple_use): If the defining statement has been replaced
9999         by a pattern statement, return the pattern statement instead.
10000         Remove the corresponding (local) transformation from the vectype
10001         overload.
10003 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10005         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
10006         end and default to null.
10007         * tree-vect-loop.c (vect_create_epilog_for_reduction)
10008         (vectorizable_reduction): Update calls accordingly, dropping the
10009         gimple ** argument if the passed-back statement isn't needed.
10010         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
10011         (vect_recog_rotate_pattern): Likewise.
10012         (vect_recog_mask_conversion_pattern): Likewise.
10013         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
10014         (vect_mask_constant_operand_p): Likewise.
10015         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
10016         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
10017         (get_group_load_store_type, get_load_store_type): Likewise.
10018         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
10019         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
10020         (vectorizable_conversion, vectorizable_assignment): Likewise.
10021         (vectorizable_shift, vectorizable_operation): Likewise.
10022         (vectorizable_store, vect_is_simple_cond): Likewise.
10023         (vectorizable_condition, vectorizable_comparison): Likewise.
10024         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
10025         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
10026         and move it to the end.  Cope with null def_stmt_outs.
10028 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10030         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
10032 2018-06-29  Jeff Law  <law@redhat.com>
10034         * config/v850/v850.c (v850_legitimate_address_p): Handle large
10035         displacements for TARGET_V850E2V3 and newer.
10036         (TARGET_LRA_P): Remove.  Defaults to LRA now.
10037         * config/v850/v850.md (sign23byte_load): Remove.
10038         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
10039         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
10041 2018-06-29  Martin Liska  <mliska@suse.cz>
10043         PR lto/85759
10044         * coverage.c (coverage_init): Mangle full path name.
10045         * doc/invoke.texi: Document the change.
10046         * gcov-io.c (mangle_path): New.
10047         * gcov-io.h (mangle_path): Likewise.
10048         * gcov.c (mangle_name): Use mangle_path for path mangling.
10050 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10052         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
10053         if starting source register is not even.
10055 2018-06-29  Martin Liska  <mliska@suse.cz>
10057         PR tree-optimization/86263
10058         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
10059         Make edge redirection.
10061 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
10063         * dumpfile.c (dump_loc): Add indentation based on scope depth.
10064         (dump_scope_depth): New variable.
10065         (get_dump_scope_depth): New function.
10066         (dump_begin_scope): New function.
10067         (dump_end_scope): New function.
10068         * dumpfile.h (get_dump_scope_depth): New declaration.
10069         (dump_begin_scope): New declaration.
10070         (dump_end_scope): New declaration.
10071         (class auto_dump_scope): New class.
10072         (AUTO_DUMP_SCOPE): New macro.
10073         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
10074         AUTO_DUMP_SCOPE.
10076 2018-06-29  Richard Biener  <rguenther@suse.de>
10078         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
10079         compute_all_dependences succeeds.
10080         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
10081         exceed --param loop-max-datarefs-for-datadeps.
10083 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
10085         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
10087 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
10089         PR target/86348
10090         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
10091         alternative 0 in preferred_for_speed attribute.
10093 2018-06-28  Paul Koning  <ni1d@arrl.net>
10095         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
10096         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
10097         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
10098         * config/pdp11/pdp11.md: Correct "length" attribute calculation
10099         for shift insn patterns.
10101 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
10103         * cgraph.c (cgraph_node::get_body): Replace assignments to
10104         "dump_file" with calls to set_dump_file.
10105         * dumpfile.c (alt_dump_file): Make static, and group with...
10106         (alt_flags): ...this definition.
10107         (dumps_are_enabled): New variable.
10108         (refresh_dumps_are_enabled): New function.
10109         (set_dump_file): New function.
10110         (set_alt_dump_file): New function.
10111         (gcc::dump_manager::dump_start): Replace assignments to
10112         "dump_file" and "alt_dump_file" with calls to set_dump_file and
10113         set_alt_dump_file.
10114         (gcc::dump_manager::dump_finish): Likewise.
10115         * dumpfile.h (alt_dump_file): Delete decl.
10116         (dumps_are_enabled): New variable decl.
10117         (set_dump_file): New function decl.
10118         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
10119         global.
10120         * tree-nested.c (lower_nested_functions): Replace assignments to
10121         "dump_file" with calls to set_dump_file.
10123 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
10125         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
10126         goto_locus of each outgoing edge of each basic block.
10128 2018-06-28  Richard Biener  <rguenther@suse.de>
10130         * dwarf2out.c (decl_scope_table): Remove.
10131         (push_decl_scope): Likewise.
10132         (pop_decl_scope): Likewise.
10133         (gen_type_die_for_member): Do not call push/pop_decl_scope.
10134         (gen_struct_or_union_type_die): Likewise.
10135         (gen_tagged_type_die): Likewise.
10136         (dwarf2out_init): Do not initialize decl_scope_table.
10137         (dwarf2out_c_finalize): Do not free it.
10139 2018-06-28  Richard Biener  <rguenther@suse.de>
10141         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
10142         deciding whether to not re-use a DIE.
10144 2018-06-28  Richard Biener  <rguenther@suse.de>
10146         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
10147         DW_AT_abstract_origin attribute.
10149 2018-06-28  Martin Liska  <mliska@suse.cz>
10151         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10152         Use newly introduced constants.
10153         * tree-switch-conversion.h (struct jump_table_cluster):
10154         Define max_ratio_for_size and max_ratio_for_speed.
10156 2018-06-28  Martin Liska  <mliska@suse.cz>
10158         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10159         Add new checking assert to catch invalid state.
10160         (jump_table_cluster::can_be_handled): Handle single case
10161         clusters.
10162         (jump_table_cluster::is_beneficial): Bail out for such case.
10163         (bit_test_cluster::find_bit_tests):
10164         Add new checking assert to catch invalid state.
10165         (bit_test_cluster::can_be_handled): Handle single case
10166         clusters.
10167         (bit_test_cluster::is_beneficial): Bail out for such case.
10168         (switch_decision_tree::analyze_switch_statement):
10169         Fix comment.
10171 2018-06-28  Martin Liska  <mliska@suse.cz>
10173         * common.opt: Introduce -completion option.
10174         * gcc.c (driver_handle_option): Handle it.
10175         (driver::main): Print completions if completion
10176         is set.
10177         * opt-suggestions.c (option_proposer::get_completions):
10178         New function.
10179         (option_proposer::suggest_completion): Likewise.
10180         (option_proposer::find_param_completions): Likewise.
10181         (verify_autocompletions): Likewise.
10182         (test_completion_valid_options): Likewise.
10183         (test_completion_valid_params): Likewise.
10184         (in_completion_p): Likewise.
10185         (empty_completion_p): Likewise.
10186         (test_completion_partial_match): Likewise.
10187         (test_completion_garbage): Likewise.
10188         (opt_proposer_c_tests): Likewise.
10189         * opt-suggestions.h: Declare new functions.
10190         * opts.c (common_handle_option): Handle OPT__completion_.
10191         * selftest-run-tests.c (selftest::run_tests): Add
10192         opt_proposer_c_tests.
10193         * selftest.c (assert_str_startswith): New.
10194         * selftest.h (assert_str_startswith): Likewise.
10195         (opt_proposer_c_tests): New.
10196         (ASSERT_STR_STARTSWITH): Likewise.
10198 2018-06-28  Martin Liska  <mliska@suse.cz>
10200         * Makefile.in: Add opt-suggestions.o.
10201         * gcc-main.c: Include opt-suggestions.h.
10202         * gcc.c (driver::driver): Likewise.
10203         (driver::~driver): Remove m_option_suggestions.
10204         (driver::build_option_suggestions): Moved to option_proposer.
10205         (driver::suggest_option): Likewise.
10206         (driver::handle_unrecognized_options): Use option_proposer.
10207         * gcc.h (class driver): Add new memver m_option_proposer.
10208         * opt-suggestions.c: New file.
10209         * opt-suggestions.h: New file.
10211 2018-06-28  Martin Liska  <mliska@suse.cz>
10213         * vec.h (class auto_string_vec): New (moved from auto_argvec).
10214         (auto_string_vec::~auto_string_vec): Likewise.
10216 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
10218         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
10219         prevent_decl_creation_for_types fields up and add reset_location field.
10220         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
10221         statement if id->reset_location is true.
10222         (copy_edges_for_bb): Do not set goto_locus on the new edges if
10223         id->reset_location is true.
10224         (copy_phis_for_bb): Force input_location on the arguments if
10225         id->reset_location is true.
10226         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
10227         is set on the function to be inlined.
10229 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
10231         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
10233 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
10235         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
10236         registers for Pmode.
10237         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
10238         hard registers for the clobbered pseudo.
10240 2018-06-27  Paul Koning  <ni1d@arrl.net>
10242         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
10243         mutually exclusive options.
10244         * config/pdp11/constraints.md (h): New constraint.
10245         (O): Update definition to match shift code generation.
10246         (D): New constraint.
10247         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
10248         (CCFP): Remove.
10249         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
10250         function.
10251         (output_jump): Change arguments.
10252         (pdp11_fixed_cc_regs): New function.
10253         (pdp11_cc_mode): Ditto.
10254         (pdp11_expand_shift): Ditto.
10255         (pdp11_assemble_shift): Ditto.
10256         (pdp11_small_shift): Ditto.
10257         (pdp11_branch_cost): Remove.
10258         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
10259         from output.
10260         (pdp11_register_move_cost): Update for CC registers.
10261         (pdp11_rtx_costs): Add case for LSHIFTRT.
10262         (pdp11_output_jump): Add CCNZ mode conditional branches.
10263         (notice_update_cc_on_set): Remove.
10264         (pdp11_cc_mode): New function.
10265         (simple_memory_operand): Correct pre/post decrement case.
10266         (no_side_effect_operand): New function.
10267         (pdp11_regno_reg_class): Add CC_REGS class.
10268         (pdp11_fixed_cc_regs): New function.
10269         (pdp11_small_shift): New function.
10270         (pdp11_expand_shift): New function to expand shift insns.
10271         (pdp11_assemble_shift): New function to output shifts.
10272         (pdp11_branch_cost): Remove.
10273         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
10274         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
10275         (WCHAR_TYPE): Ditto.
10276         (PTRDIFF_TYPE): Ditto.
10277         (ADJUST_INSN_LENGTH): New macro.
10278         (FIXED_REGISTERS): Add CC registers.
10279         (CALL_USED_REGISTERS): Ditto.
10280         (reg_class): Ditto.
10281         (REG_CLASS_NAMES): Ditto.
10282         (REG_CLASS_CONTENTS): Ditto.
10283         (SELECT_CC_MODE): Use new function.
10284         (TARGET_FLAGS_REGNUM): New macro.
10285         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
10286         (cc0_reg_rtx): Remove.
10287         (CC_STATUS_MDEP): Remove.
10288         (CC_STATUS_MDEFP_INIT): Remove.
10289         (CC_IN_FPU): Remove.
10290         (NOTICE_UPDATE_CC): Remove.
10291         (REGISTER_NAMES): Add CC registers.
10292         (BRANCH_COST): Change to constant 1.
10293         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
10294         handling.
10295         * config/pdp11/pdp11.opt (mbcopy): Remove.
10296         (mbcopy-builtin): Remove.
10297         (mbranch-cheap): Remove.
10298         (mbranch-expensive): Remove.
10299         * config/pdp11/predicates.md (expand_shift_operand): Update to
10300         match shift code generation.
10301         (ccnz_operator): New predicate.
10302         * doc/invoke.texi (PDP-11 Options): Remove deleted options
10303         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
10304         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
10305         exclusive options.
10306         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
10307         description of O constraint.
10309 2018-06-27  Jeff Law  <law@redhat.com>
10310             Austin Law  <austinklaw@gmail.com>
10312         * config/v850/v850.md (addsi3_set_flags): New pattern.
10313         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
10314         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
10315         (zero_extendhisi2_v850_set_flags): Likewise.
10316         (zero_extendqisi2_v850_set_flags): Likewise.
10317         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
10318         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
10319         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
10321         * config/v850/v850-protos.h (notice_update_cc): Remove.
10322         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
10323         (v850_print_operand): Handle 'D' and "d".
10324         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
10325         Add handling of arithmetic/logical operations compared against zero.
10326         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
10327         Do not look at v850_compare_op, instead get mode from last argument.
10328         (v850_gen_compare): Remove
10329         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
10330         after reload for prologue insns.
10331         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
10332         patterns.
10333         (construct_save_jarl): Likewise.
10334         (TARGET_FLAGS_REGNUM): Define.
10335         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
10336         (NOTICE_UPDATE_CC): Remove.
10337         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
10338         than cc0.  Conditionalize on reload_completed.
10339         (cmpsi_insn, setfcc_insn): Likewise.
10340         (tst1 splitter): Turn into define_and_split which sets the flags
10341         after reload.
10342         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
10343         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
10344         (cstoresf4, cstoredf4): Clobber the flags.
10345         (cmpsi, cmpsf, cmpdf): Remove expanders.
10346         (setf_insn): Remove pattern.
10347         (addsi3): Turn into define_and_split which clobbers the flags after
10348         reload and a suitable pattern (addsi3_clobber_flags) for use after
10349         reload.
10350         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
10351         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
10352         (ashrsi3, ashrsi3_v850e2): Likewise.
10353         (bins): Clobber the flags.
10354         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
10355         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
10356         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
10357         (call_value_internal_short, call_value_internal_long): Likewise.
10358         (callt_save_interrupt, callt_return_interrupt): Likewise.
10359         (save_interrupt, return_interrupt): Likewise.
10360         (callt_save_all_interrupt, save_all_interrupt): Likewise.
10361         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
10362         (restore_all_interrupt, _restore_all_interrupt): Likewise.
10363         (All FP comparisons): Only allow after reload has completed.
10364         (trfsr): Likewise.
10365         (divh, divhu): Tweak output template.
10366         (branch_z_normal, branch_z_invert): Remove
10367         (branch_nz_normal, branch_nz_invert): Likewise.
10368         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
10370         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
10371         * config/v850/v850.c (notice_update_cc): Remove.
10372         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
10373         (CC_NO_CARRY): Likewise.
10374         (NOTICE_UPDATE_CC): Define to nothing.
10375         * config/v850/v850.md: Remove block comment on cc0 handling
10376         Remove "cc" attribute from all patterns.  Remove cc_status handling
10377         from all patterns.  Minor formatting fixes.
10379 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10381         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
10382         (cortex-a76.cortex-a55): Likewise.
10383         * config/aarch64/aarch64-tune.md: Regenerate.
10384         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
10385         cortex-a76.cortex-a55.
10387 2018-06-27  Jeff Law  <law@redhat.com>
10389         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
10390         (MULTILIB_DIRNAMES): Similarly.
10392 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
10394         * gimple.h (gimple_return_retbnd): Delete.
10395         (gimple_return_set_retbnd): Likewise.
10396         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
10397         gimple_return_set_retbnd.
10398         * gimple-pretty-print.c (dump_gimple_return): Remove call to
10399         gimple_return_retbnd and adjust.
10400         * tree-inline.h (struct copy_body_data): Remove retbnd field.
10401         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
10402         Explicitly return NULL in a couple more cases.  Move assertion
10403         on debug statements and remove unreachable code.
10404         (reset_debug_binding): Do not test id->retbnd.
10405         (expand_call_inline): Do not set it.
10407 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
10409         * configure.ac: Add --disable-gcov option.
10410         * configure: Regenerate.
10411         * Makefile.in: Honour @enable_gcov@.
10412         * doc/install.texi: Document --disable-gcov.
10414 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10416         * config/arm/arm-cpus.in (cortex-a76): New entry.
10417         (cortex-a76.cortex-a55): Likewise.
10418         * config/arm/arm-tables.opt: Regenerate.
10419         * config/arm/arm-tune.md: Likewise.
10420         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
10421         * doc/invoke.texi (ARM Options): Document cortex-a76 and
10422         cortex-a76.cortex-a55.
10424 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
10426         PR target/85769
10427         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
10429 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
10431         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
10432         comment.
10433         (EPILOGUE_USES): Likewise.
10435 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
10437         * tree-inline.c (remap_location): New function extracted from...
10438         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
10439         (copy_phis_for_bb): ...here.  Call remap_location.
10440         (copy_cfg_body): Adjust call to copy_edges_for_bb.
10442 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
10444         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
10445         unaligned vsx for 16B memset.
10447 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
10449         PR target/86285
10450         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
10451         ieee128_float_type_node to long_double_type_node unless
10452         TARGET_LONG_DOUBLE_128 is set.
10454 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
10456         * cfgloop.c (get_loop_location): Convert return type from
10457         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
10458         by implicit construction from rtx_insn *, and using
10459         dump_user_location_t::from_function_decl for the fallback case.
10460         * cfgloop.h (get_loop_location): Convert return type from
10461         location_t to dump_user_location_t.
10462         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
10463         dump_printf_loc to pass in a dump_location_t rather than a
10464         location_t, via the gimple stmt.
10465         * coverage.c (get_coverage_counts): Update calls to
10466         dump_printf_loc to pass in dump_location_t rather than a
10467         location_t.
10468         * doc/optinfo.texi (Dump types): Convert example of
10469         dump_printf_loc from taking "locus" to taking "insn".  Update
10470         description of the "_loc" calls to cover dump_location_t.
10471         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
10472         "selftest.h".
10473         (dump_user_location_t::dump_user_location_t): New constructors,
10474         from gimple *stmt and rtx_insn *.
10475         (dump_user_location_t::from_function_decl): New function.
10476         (dump_loc): Make static.
10477         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
10478         const dump_location_t &.
10479         (dump_generic_expr_loc): Delete.
10480         (dump_printf_loc): Convert param "loc" from location_t to
10481         const dump_location_t &.
10482         (selftest::test_impl_location): New function.
10483         (selftest::dumpfile_c_tests): New function.
10484         * dumpfile.h: Include "profile-count.h".
10485         (class dump_user_location_t): New class.
10486         (struct dump_impl_location_t): New struct.
10487         (class dump_location_t): New class.
10488         (dump_printf_loc): Convert 2nd param from source_location to
10489         const dump_location_t &.
10490         (dump_generic_expr_loc): Delete.
10491         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
10492         const dump_location_t &.
10493         * gimple-fold.c (fold_gimple_assign): Update call to
10494         dump_printf_loc to pass in a dump_location_t rather than a
10495         location_t, via the gimple stmt.
10496         (gimple_fold_call): Likewise.
10497         * gimple-loop-interchange.cc
10498         (loop_cand::analyze_iloop_reduction_var): Update for change to
10499         check_reduction_path.
10500         (tree_loop_interchange::interchange): Update for change to
10501         find_loop_location.
10502         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
10503         change in return-type of find_loop_location.
10504         (graphite_regenerate_ast_isl): Likewise.
10505         * graphite-optimize-isl.c (optimize_isl): Likewise.
10506         * graphite.c (graphite_transform_loops): Likewise.
10507         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
10508         pass in a dump_location_t rather than a location_t, via the
10509         gimple stmt.
10510         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10511         * ipa.c (walk_polymorphic_call_targets): Likewise.
10512         * loop-unroll.c (report_unroll): Convert "locus" param from
10513         location_t to dump_location_t.
10514         (decide_unrolling): Update for change to get_loop_location's
10515         return type.
10516         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
10517         location_t to dump_user_location_t.
10518         (grid_find_single_omp_among_assignments_1): Updates calls to
10519         dump_printf_loc to pass in a dump_location_t rather than a
10520         location_t, via the gimple stmt.
10521         (grid_parallel_clauses_gridifiable): Convert "tloc" from
10522         location_t to dump_location_t.  Updates calls to dump_printf_loc
10523         to pass in a dump_location_t rather than a location_t, via the
10524         gimple stmt.
10525         (grid_inner_loop_gridifiable_p): Likewise.
10526         (grid_dist_follows_simple_pattern): Likewise.
10527         (grid_gfor_follows_tiling_pattern): Likewise.
10528         (grid_target_follows_gridifiable_pattern): Likewise.
10529         (grid_attempt_target_gridification): Convert initialization
10530         of local "grid" from memset to zero-initialization; FIXME: does
10531         this require C++11?  Update call to dump_printf_loc to pass in a
10532         optinfo_location rather than a location_t, via the gimple stmt.
10533         * profile.c (read_profile_edge_counts): Updates call to
10534         dump_printf_loc to pass in a dump_location_t rather than a
10535         location_t
10536         (compute_branch_probabilities): Likewise.
10537         * selftest-run-tests.c (selftest::run_tests): Call
10538         dumpfile_c_tests.
10539         * selftest.h (dumpfile_c_tests): New decl.
10540         * tree-loop-distribution.c (pass_loop_distribution::execute):
10541         Update for change in return type of find_loop_location.
10542         * tree-parloops.c (parallelize_loops): Likewise.
10543         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
10544         "locus" from location_t to dump_user_location_t.
10545         (canonicalize_loop_induction_variables): Likewise.
10546         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
10547         for change in return type of find_loop_location.
10548         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
10549         to dump_printf_loc to pass in a dump_location_t rather than a
10550         location_t, via the stmt.
10551         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
10552         Likewise.
10553         * tree-vect-loop-manip.c (find_loop_location): Convert return
10554         type from source_location to dump_user_location_t.
10555         (vect_do_peeling): Update for above change.
10556         (vect_loop_versioning): Update for change in type of
10557         vect_location.
10558         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
10559         from location_t to dump_user_location_t.
10560         (vect_estimate_min_profitable_iters): Update for change in type
10561         of vect_location.
10562         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
10563         location_t to dump_location_t.
10564         (vect_slp_bb): Update for change in type of vect_location.
10565         * tree-vectorizer.c (vect_location): Convert from source_location
10566         to dump_user_location_t.
10567         (try_vectorize_loop_1): Update for change in vect_location's type.
10568         (vectorize_loops): Likewise.
10569         (increase_alignment): Likewise.
10570         * tree-vectorizer.h (vect_location): Convert from source_location
10571         to dump_user_location_t.
10572         (find_loop_location): Convert return type from source_location to
10573         dump_user_location_t.
10574         (check_reduction_path): Convert 1st param from location_t to
10575         dump_user_location_t.
10576         * value-prof.c (check_counter): Update call to dump_printf_loc to
10577         pass in a dump_user_location_t rather than a location_t; update
10578         call to error_at for change in type of "locus".
10579         (check_ic_target): Update call to dump_printf_loc to
10580         pass in a dump_user_location_t rather than a location_t, via the
10581         call_stmt.
10583 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
10585         * config/s390/s390.h (enum processor_flags): Do not use
10586         default tune parameter when -march was specified.
10588 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
10590         PR target/86314
10591         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
10592         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
10593         operands.
10595 2018-06-26  Richard Biener  <rguenther@suse.de>
10597         PR tree-optimization/86287
10598         PR bootstrap/86316
10599         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
10600         (vect_analyze_loop): Initialize n_stmts.
10602 2018-06-26  Richard Biener  <rguenther@suse.de>
10604         PR middle-end/86271
10605         * fold-const.c (fold_convertible_p): Pointer extension
10606         isn't valid.
10608 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
10610         PR debug/86064
10611         * dwarf2out.c (loc_list_has_views): Adjust comments.
10612         (dw_loc_list): Split single cross-partition range with
10613         nonzero locview.
10615 2018-06-25  Jeff Law  <law@redhat.com>
10617         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
10618         on -mbig-switch by default.
10620         * config/v850/predicates.md (const_float_1_operand): Fix match_code
10621         test.
10622         (const_float_0_operand): Remove unused predicate.
10623         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
10624         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
10625         (recipsf2): New expander.  Original pattern now called
10626         (recipsf2_insn).
10627         (recipdf2, recipdf2_insn): Similarly.
10628         (rsqrtsf2, rsqrtsf2_insn): Similarly
10629         (rsqrtdf2, rsqrtdf2_insn): Similarly
10631 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
10633         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
10634         Simplify logic for FreeBSD (twice).
10636 2018-06-25  Martin Sebor  <msebor@redhat.com>
10638         PR tree-optimization/86204
10639         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
10640         a strnlen result if it's less than the length of the string.
10642 2018-06-25  Martin Sebor  <msebor@redhat.com>
10644         PR tree-optimization/85700
10645         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
10646         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
10647         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
10649 2018-06-25  Martin Sebor  <msebor@redhat.com>
10651         * doc/extend.texi (Zero-length arrays): Update and clarify.
10653 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
10655         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
10656         added IEEE/IBM long double multilib support on PowerPC little
10657         endian Linux systems.
10658         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
10659         (MULTILIB_DEFAULTS): Likewise.
10660         * config/rs6000/rs6000.c (rs6000_option_override_internal):
10661         Likewise.
10662         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
10663         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
10664         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
10666 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
10668         PR middle-end/86311
10669         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
10670         (REORDER_45): Likewise.
10672 2018-06-25  Jeff Law  <law@redhat.com>
10674         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
10675         dividend to 32 bits.  Adjust length.
10676         (udivmodhi4): Cleanup output template.  Fix length.
10678 2018-06-25  Carl Love  <cel@us.ibm.com>
10680         * config/rs6000/vsx.md: Change word selector to prefered location.
10682 2018-06-25  Richard Biener  <rguenther@suse.de>
10684         PR tree-optimization/86304
10685         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
10686         epilogue-if-converted loops as well.
10688 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
10690         * lto-section-out.c (lto_begin_section): Do not print section
10691         name for noaddr and unnumbered dumps.
10693 2018-06-25  Richard Biener  <rguenther@suse.de>
10695         * tree-vectorizer.h (struct vec_info_shared): New structure
10696         with parts split out from struct vec_info and loop_nest from
10697         struct _loop_vec_info.
10698         (struct vec_info): Adjust accordingly.
10699         (struct _loop_vec_info): Likewise.
10700         (LOOP_VINFO_LOOP_NEST): Adjust.
10701         (LOOP_VINFO_DATAREFS): Likewise.
10702         (LOOP_VINFO_DDRS): Likewise.
10703         (struct _bb_vec_info): Likewise.
10704         (BB_VINFO_DATAREFS): Likewise.
10705         (BB_VINFO_DDRS): Likewise.
10706         (struct _stmt_vec_info): Add dr_aux member.
10707         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
10708         (DR_MISALIGNMENT_UNINITIALIZED): New.
10709         (set_dr_misalignment): Adjust.
10710         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
10711         (vect_analyze_loop): Adjust prototype.
10712         (vect_analyze_loop_form): Likewise.
10713         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10714         Compute dependences lazily.
10715         (vect_record_base_alignments): Use shared datarefs/ddrs.
10716         (vect_verify_datarefs_alignment): Likewise.
10717         (vect_analyze_data_refs_alignment): Likewise.
10718         (vect_analyze_data_ref_accesses): Likewise.
10719         (vect_analyze_data_refs): Likewise.
10720         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
10721         constructor parameter for shared part.
10722         (vect_analyze_loop_form): Pass in shared part and adjust.
10723         (vect_analyze_loop_2): Pass in storage for the number of
10724         stmts.  Move loop nest finding to the caller.  Compute
10725         datarefs lazily.
10726         (vect_analyze_loop): Pass in shared part.
10727         (vect_transform_loop): Verify shared datarefs are unchanged.
10728         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
10729         constructor parameter for shared part.
10730         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
10731         (vect_slp_bb): Verify shared datarefs are unchanged before
10732         transform.
10733         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
10734         change.
10735         (new_stmt_vec_info): Initialize DR_AUX misalignment to
10736         DR_MISALIGNMENT_UNINITIALIZED.
10737         * tree-vectorizer.c (vec_info::vec_info): Add constructor
10738         parameter for shared part.
10739         (vec_info::~vec_info): Adjust.
10740         (vec_info_shared::vec_info_shared): New.
10741         (vec_info_shared::~vec_info_shared): Likewise.
10742         (vec_info_shared::save_datarefs): Likewise.
10743         (vec_info_shared::check_datarefs): Likewise.
10744         (try_vectorize_loop_1): Construct shared part live for analyses
10745         of a single loop for multiple vector sizes.
10746         * tree-parloops.c (gather_scalar_reductions): Adjust.
10748 2018-06-25  Richard Biener  <rguenther@suse.de>
10750         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
10751         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
10752         (vect_analyze_data_refs): Remove similar code from here and
10753         simplify accordingly.
10755 2018-06-25  Richard Biener  <rguenther@suse.de>
10757         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
10758         for reverse storage order accesses rather than asserting
10759         they cannot happen here.
10761 2018-06-25  Tom de Vries  <tdevries@suse.de>
10763         PR debug/86257
10764         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
10765         Use data16 instead of .byte for insn prefix.
10767 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
10769         PR C++/86082
10770         * parser.c (make_char_string_pack): Pass this literal chars
10771         through cpp_interpret_string.
10772         (cp_parser_userdef_numeric_literal): Check the result of
10773         make_char_string_pack.
10775 2018-06-24  Maya Rashish  <coypu@sdf.org>
10777         * ginclude/stddef.h: Simplify conditions around avoiding
10778         re-definition of __size_t.
10780 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
10782         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
10783         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
10785 2018-06-22  Maya Rashish  <coypu@sdf.org>
10787         * doc/invoke.texi (mno-fancy-math-387): Update for changes
10788         made to OpenBSD and NetBSD through the years.
10790 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10792         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10793         behavior of vec_pack (vector double, vector double) to match
10794         behavior of vec_float2 (vector double, vector double).
10796 2018-06-22  Olivier Hainque  <hainque@adacore.com>
10798         * gimplify.c (gimplify_function_tree): Prevent creation
10799         of a trampoline for the address of the current function
10800         passed to entry/exit instrumentation hooks.
10802 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
10804         PR target/86222
10805         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
10806         correctly.
10808 2018-06-22  Martin Liska  <mliska@suse.cz>
10810         PR tree-optimization/86263
10811         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10812         Bail out if is_enabled is false.
10813         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
10814         New declaration.
10815         (jump_table_cluster::is_enabled): New function.
10817 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
10819         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10820         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
10821         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
10822         (lto_input_ts_binfo_tree_pointers): Likewise.
10823         * tree-streamer-out.c (streamer_write_tree_bitfields,
10824         write_ts_binfo_tree_pointers): Likewise.
10825         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
10827 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
10829         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
10831 2018-06-22  Martin Liska  <mliska@suse.cz>
10833         * symbol-summary.h (get): Make it pure and inline move
10834         functionality from ::get function.
10835         (get): Remove and inline into ::get and ::get_create.
10836         (get_create): Move code from ::get function.
10838 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10840         PR target/85994
10841         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
10842         -x assembler-with-cpp.
10844 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10846         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
10847         _FILE_OFFSET_BITS=64 for C++.
10849 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
10851         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
10852         conversion insn that shows up when pr85657-3.c is compiled using
10853         IEEE 128-bit long double.
10854         (neg<mode>2_internal): Use the correct mode to check whether the
10855         mode is IBM extended.
10856         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
10857         multiply and divide external functions from being created more
10858         than once.
10860 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10862         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
10863         functions.
10864         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
10865         the edge can be forwarded.
10866         (cfg_layout_merge_blocks): Likewise.
10868 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10870         * except.c (finish_eh_generation): Commit edge insertions only after
10871         the EH edges have been redirected from post-landing to landing pads.
10873 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10875         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
10876         create_tmp_var_for to create the FRAME decl.
10877         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
10879 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10881         * tree-inline.c (copy_edges_for_bb): Minor tweak.
10882         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
10883         debug statement when resetting its value.
10884         (expand_call_inline): Copy the locus of the call onto the assignment
10885         of the return value, if any.  Use local variable in more cases.
10887 2018-06-21  Martin Liska  <mliska@suse.cz>
10889         * ipa-pure-const.c (propagate_nothrow): Use
10890         funct_state_summaries->get.
10891         (dump_malloc_lattice): Likewise.
10892         (propagate_malloc): Likewise.
10894 2018-06-21  Richard Biener  <rguenther@suse.de>
10896         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
10897         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
10898         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
10899         comment.
10900         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
10901         BLOCK_ABSTRACT_ORIGIN unconditionally.
10903 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
10905         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
10906         deleting it.
10907         * ipa-reference.c (ipa_reference_c_finalize): Delete
10908         ipa_ref_opt_sum_summaries and set it to NULL.
10910 2018-06-21  Tom de Vries  <tdevries@suse.de>
10912         PR tree-optimization/85859
10913         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
10914         test with comment from bb_no_side_effects_p.
10916 2018-06-21  Richard Biener  <rguenther@suse.de>
10918         PR tree-optimization/86232
10919         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
10920         max for constant niter.
10922 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10924         * config/aarch64/aarch64-simd.md
10925         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
10927 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10929         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
10930         Make opernads of the unspec commutative.
10932 2018-06-21  Richard Biener  <rguenther@suse.de>
10934         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
10935         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
10936         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
10937         (vect_analyze_data_ref_dependence): Re-order checks to deal with
10938         NULL DR_STEP.
10939         (vect_record_base_alignments): Do not record base alignment
10940         for gathers or scatters.
10941         (vect_compute_data_ref_alignment): Drop return value that is always
10942         true.  Bail out early for gathers or scatters.
10943         (vect_enhance_data_refs_alignment): Bail out early for gathers
10944         or scatters.
10945         (vect_find_same_alignment_drs): Likewise.
10946         (vect_analyze_data_refs_alignment): Remove dead code.
10947         (vect_slp_analyze_and_verify_node_alignment): Likewise.
10948         (vect_analyze_data_refs): For possible gathers or scatters do
10949         not create an alternate DR, just check their possible validity
10950         and mark them.  Adjust DECL_NONALIASED handling to not rely
10951         on DR_BASE_ADDRESS.
10952         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
10953         update inits of gathers or scatters.
10954         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
10955         Also copy gather/scatter flag to pattern vinfo.
10957 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10959         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10960         behavior of vec_packsu (vector unsigned long long, vector unsigned
10961         long long) to match behavior of vec_packs with same signature.
10963 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
10964             Thomas Schwinge <thomas@codesourcery.com>
10965             Cesar Philippidis  <cesar@codesourcery.com>
10967         * gimplify.c (gimplify_scan_omp_clauses): Add support for
10968         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10969         (gimplify_adjust_omp_clauses): Likewise.
10970         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
10971         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
10972         (gimplify_omp_target_update): Update handling of acc update and
10973         enter/exit data.
10974         * omp-low.c (install_var_field): Remove unused parameter
10975         base_pointers_restrict.
10976         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
10977         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
10978         FINALIZE}
10979         (omp_target_base_pointers_restrict_p): Delete.
10980         (scan_omp_target): Update call to scan_sharing_clauses.
10981         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
10982         FINALIZE}.
10983         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
10984         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10985         (convert_local_omp_clauses): Likewise.
10986         * tree-pretty-print.c (dump_omp_clause): Likewise.
10987         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
10988         FINALIZE}.
10989         (omp_clause_code_name): Likewise.
10991 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
10993         PR debug/86194
10994         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
10995         be narrowed.
10997         PR tree-optimization/86231
10998         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
10999         anti-range don't overwrite *vr0min before using it to compute *vr0max.
11001 2018-06-20  Tom de Vries  <tdevries@suse.de>
11003         PR tree-optimization/86097
11004         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
11005         iv type if signedness of iv type is not the same as that of *nit.
11007 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
11009         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
11010         EDGE_EH edges, verify they are all EDGE_EH.
11012 2018-06-20  Maya Rashish  <coypu@sdf.org>
11014         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
11016 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11018         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
11019         * config/aarch64/aarch64.c (xgene1_tunings): Add
11020         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
11021         (aarch64_mode_valid_for_sched_fusion_p):
11022         Allow 16-byte modes.
11023         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
11024         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
11025         128-bit modes.
11026         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
11027         New pattern.
11028         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
11029         * config/aarch64/iterators.md (VQ2): New mode iterator.
11031 2018-06-20  Martin Liska  <mliska@suse.cz>
11033         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11034         Change default ratio from 10 to 8.
11036 2018-06-20  Martin Liska  <mliska@suse.cz>
11038         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11039         New.
11040         (bit_test_cluster::find_bit_tests): Likewise.
11041         (switch_decision_tree::analyze_switch_statement): Find clusters.
11042         * tree-switch-conversion.h (struct jump_table_cluster): Document
11043         hierarchy.
11045 2018-06-20  Martin Liska  <mliska@suse.cz>
11047         * tree-switch-conversion.c (switch_conversion::collect):
11048         Record m_uniq property.
11049         (switch_conversion::expand): Bail out for special conditions.
11050         (group_cluster::~group_cluster): New.
11051         (group_cluster::group_cluster): Likewise.
11052         (group_cluster::dump): Likewise.
11053         (jump_table_cluster::emit): New.
11054         (switch_decision_tree::fix_phi_operands_for_edges): New.
11055         (struct case_node): Remove struct.
11056         (jump_table_cluster::can_be_handled): New.
11057         (case_values_threshold): Moved to header.
11058         (reset_out_edges_aux): Likewise.
11059         (jump_table_cluster::is_beneficial): New.
11060         (bit_test_cluster::can_be_handled): Likewise.
11061         (add_case_node): Remove.
11062         (bit_test_cluster::is_beneficial): New.
11063         (case_bit_test::cmp): New.
11064         (bit_test_cluster::emit): New.
11065         (expand_switch_as_decision_tree_p): Remove.
11066         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
11067         (fix_phi_operands_for_edge): Likewise.
11068         (switch_decision_tree::analyze_switch_statement): New.
11069         (compute_cases_per_edge): Move ...
11070         (switch_decision_tree::compute_cases_per_edge): ... here.
11071         (try_switch_expansion): Likewise.
11072         (switch_decision_tree::try_switch_expansion): Likewise.
11073         (record_phi_operand_mapping): Likewise.
11074         (switch_decision_tree::record_phi_operand_mapping): Likewise.
11075         (emit_case_decision_tree): Likewise.
11076         (switch_decision_tree::emit): Likewise.
11077         (balance_case_nodes): Likewise.
11078         (switch_decision_tree::balance_case_nodes): Likewise.
11079         (dump_case_nodes): Likewise.
11080         (switch_decision_tree::dump_case_nodes): Likewise.
11081         (emit_jump): Likewise.
11082         (switch_decision_tree::emit_jump): Likewise.
11083         (emit_cmp_and_jump_insns): Likewise.
11084         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
11085         (emit_case_nodes): Likewise.
11086         (switch_decision_tree::emit_case_nodes): Likewise.
11087         (conditional_probability): Remove.
11088         * tree-switch-conversion.h (enum cluster_type): New.
11089         (PRINT_CASE): New.
11090         (struct cluster): Likewise.
11091         (cluster::cluster): Likewise.
11092         (struct simple_cluster): Likewise.
11093         (simple_cluster::simple_cluster): Likewise.
11094         (struct group_cluster): Likewise.
11095         (struct jump_table_cluster): Likewise.
11096         (struct bit_test_cluster): Likewise.
11097         (struct min_cluster_item): Likewise.
11098         (struct case_tree_node): Likewise.
11099         (case_tree_node::case_tree_node): Likewise.
11100         (jump_table_cluster::case_values_threshold): Likewise.
11101         (struct case_bit_test): Likewise.
11102         (struct switch_decision_tree): Likewise.
11103         (struct switch_conversion): Likewise.
11104         (switch_decision_tree::reset_out_edges_aux): Likewise.
11106 2018-06-20  Martin Liska  <mliska@suse.cz>
11108         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
11109         (hoist_edge_and_branch_if_true): Likewise.
11110         (expand_switch_using_bit_tests_p): Likewise.
11111         (struct case_bit_test): Likewise.
11112         (case_bit_test_cmp): Likewise.
11113         (emit_case_bit_tests): Likewise.
11114         (switch_conversion::switch_conversion): New class.
11115         (struct switch_conv_info): Remove old struct.
11116         (collect_switch_conv_info): More to ...
11117         (switch_conversion::collect): ... this.
11118         (check_range): Likewise.
11119         (switch_conversion::check_range): Likewise.
11120         (check_all_empty_except_final): Likewise.
11121         (switch_conversion::check_all_empty_except_final): Likewise.
11122         (check_final_bb): Likewise.
11123         (switch_conversion::check_final_bb): Likewise.
11124         (create_temp_arrays): Likewise.
11125         (switch_conversion::create_temp_arrays): Likewise.
11126         (free_temp_arrays): Likewise.
11127         (gather_default_values): Likewise.
11128         (switch_conversion::gather_default_values): Likewise.
11129         (build_constructors): Likewise.
11130         (switch_conversion::build_constructors): Likewise.
11131         (constructor_contains_same_values_p): Likewise.
11132         (switch_conversion::contains_same_values_p): Likewise.
11133         (array_value_type): Likewise.
11134         (switch_conversion::array_value_type): Likewise.
11135         (build_one_array): Likewise.
11136         (switch_conversion::build_one_array): Likewise.
11137         (build_arrays): Likewise.
11138         (switch_conversion::build_arrays): Likewise.
11139         (gen_def_assigns): Likewise.
11140         (switch_conversion::gen_def_assigns): Likewise.
11141         (prune_bbs): Likewise.
11142         (switch_conversion::prune_bbs): Likewise.
11143         (fix_phi_nodes): Likewise.
11144         (switch_conversion::fix_phi_nodes): Likewise.
11145         (gen_inbound_check): Likewise.
11146         (switch_conversion::gen_inbound_check): Likewise.
11147         (process_switch): Use the newly created class.
11148         (switch_conversion::expand): New.
11149         (switch_conversion::~switch_conversion): New.
11150         * tree-switch-conversion.h: New file.
11152 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11154         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
11155         tree-vect-patterns.c.
11156         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
11157         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
11158         (vect_recog_sad_pattern): Likewise.
11159         (vect_recog_widen_sum_pattern): Likewise.
11160         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
11161         (vect_recog_widen_shift_pattern): Remove the type_in argument.
11162         (vect_recog_rotate_pattern): Likewise.
11163         (vect_recog_mult_pattern): Likewise.
11164         (vect_recog_vector_vector_shift_pattern): Likewise.
11165         (vect_recog_divmod_pattern): Likewise.
11166         (vect_recog_mixed_size_cond_pattern): Likewise.
11167         (vect_recog_bool_pattern): Likewise.
11168         (vect_recog_mask_conversion_pattern): Likewise.
11169         (vect_try_gather_scatter_pattern): Likewise.
11170         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
11171         (vect_recog_over_widening_pattern): Likewise.
11172         (vect_recog_gather_scatter_pattern): Likewise.
11173         (vect_recog_func_ptr): Move from tree-vectorizer.h
11174         (vect_vect_recog_func_ptrs): Move further down the file.
11175         (vect_recog_func): Likewise.  Remove the third argument.
11176         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
11177         (vect_pattern_recog_1): Expect the pattern function to do any
11178         necessary target tests.  Also expect it to provide a vector type.
11179         Remove the type_in handling.
11181 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11183         * tree-vect-patterns.c (vect_pattern_detected): New function.
11184         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
11185         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
11186         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
11187         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
11188         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11189         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11190         (vect_recog_mask_conversion_pattern)
11191         (vect_try_gather_scatter_pattern): Likewise.
11193 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11195         * tree-vect-patterns.c (vect_get_internal_def): New function.
11196         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11197         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
11198         (search_type_for_mask_1): Use it.
11200 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11202         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
11203         redundant WIDEN_SUM_EXPR handling.
11204         (vect_recog_sad_pattern): Likewise.
11206 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11208         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
11209         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
11210         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
11211         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
11212         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
11214 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11216         * tree-vect-stmts.c (vectorizable_call): Make sure that we
11217         use the stmt_vec_info of the original bb statement for the
11218         new zero assignment, even if the call is part of a pattern.
11220 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11222         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
11223         that the sequence is attached to the original statement rather
11224         than the pattern statement.
11225         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
11226         PATTERN_DEF_SEQ from the original statement rather than
11227         the main pattern statement.
11228         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
11229         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
11230         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
11232 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11234         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
11235         definition statements before the early exit for statements that aren't
11236         live or relevant.
11237         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
11238         split out from...
11239         (vect_transform_loop): ...here.  Process pattern definition
11240         statements without first checking whether the main pattern
11241         statement is live or relevant.
11243 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
11245         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
11246         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
11248 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
11250         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
11251         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
11252         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
11253         (expand_block_compare): Change select_block_compare_mode call.
11254         (expand_strncmp_align_check): Use new functions, fix comment.
11255         (emit_final_str_compare_gpr): New function.
11256         (expand_strn_compare): Refactor and clean up code.
11257         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
11259 2018-06-19  Tony Reix  <tony.reix@atos.com>
11260             Damien Bergamini  <damien.bergamini@atos.com>
11261             David Edelsohn  <dje.gcc@gmail.com>
11263         * collect2.c (static_obj): New variable.
11264         (static_libs): New variable.
11265         (is_in_list): Uncomment declaration.
11266         (main): Track AIX libraries linked statically.
11267         (is_in_list): Uncomment definition.
11268         (scan_prog_file): Don't add AIX shared libraries initializer
11269         to constructor list if linking statically.
11271 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
11273         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
11274         constant.
11275         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
11277 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
11279         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
11280         blocks.
11282 2018-06-19  Martin Liska  <mliska@suse.cz>
11284         * config/i386/i386.c (ix86_can_inline_p): Do not use
11285         ipa_fn_summaries::get_create.
11286         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
11287         get.
11288         (devirtualization_time_bonus): Likewise.
11289         (ipcp_propagate_stage): Likewise.
11290         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
11291         (edge_set_predicate): Likewise.
11292         (evaluate_conditions_for_known_args): Likewise.
11293         (evaluate_properties_for_edge): Likewise.
11294         (ipa_call_summary::reset): Tranform to ...
11295         (ipa_call_summary::~ipa_call_summary): ... this.
11296         (ipa_fn_summary::reset): Transform to ...
11297         (ipa_fn_summary::~ipa_fn_summary): ... this.
11298         (ipa_fn_summary_t::remove): Rename to ...
11299         (ipa_fn_summary_t::remove_callees): ... this.
11300         (ipa_fn_summary_t::duplicate): Use placement new
11301         instead of memory copy.
11302         (ipa_call_summary_t::duplicate): Likewise.
11303         (ipa_call_summary_t::remove): Remove.
11304         (dump_ipa_call_summary): Change get_create to get.
11305         (ipa_dump_fn_summary): Dump only when summary exists.
11306         (analyze_function_body): Use symbol_summary::get instead
11307         of get_create.
11308         (compute_fn_summary): Likewise.
11309         (estimate_edge_devirt_benefit): Likewise.
11310         (estimate_edge_size_and_time): Likewise.
11311         (inline_update_callee_summaries): Likewise.
11312         (remap_edge_change_prob): Likewise.
11313         (remap_edge_summaries): Likewise.
11314         (ipa_merge_fn_summary_after_inlining): Likewise.
11315         (write_ipa_call_summary): Likewise.
11316         (ipa_fn_summary_write): Likewise.
11317         (ipa_free_fn_summary): Likewise.
11318         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
11319         (struct ipa_call_summary): Likewise.
11320         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
11321         of get_create.
11322         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
11323         (estimate_size_after_inlining): Likewise.
11324         (estimate_growth): Likewise.
11325         (growth_likely_positive): Likewise.
11326         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
11327         (inline_call): Likewise.
11328         * ipa-inline.c (caller_growth_limits): Likewise.
11329         (can_inline_edge_p): Likewise.
11330         (can_inline_edge_by_limits_p): Likewise.
11331         (compute_uninlined_call_time): Likewise.
11332         (compute_inlined_call_time): Likewise.
11333         (want_inline_small_function_p): Likewise.
11334         (edge_badness): Likewise.
11335         (update_caller_keys): Likewise.
11336         (update_callee_keys): Likewise.
11337         (inline_small_functions): Likewise.
11338         (inline_to_all_callers_1): Likewise.
11339         (dump_overall_stats): Likewise.
11340         (early_inline_small_functions): Likewise.
11341         (early_inliner): Likewise.
11342         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
11343         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11344         * ipa-pure-const.c (malloc_candidate_p): Likewise.
11345         * ipa-split.c (execute_split_functions): Likewise.
11346         * symbol-summary.h: Likewise.
11347         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
11349 2018-06-19  Richard Biener  <rguenther@suse.de>
11351         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
11352         (vectorize_loops): ... here.  Fix dbgcnt handling.
11353         (try_vectorize_loop): Wrap try_vectorize_loop_1.
11355 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
11357         PR target/86197
11358         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
11359         ieee128 argument takes up only one (vector) register, not two (floating
11360         point) registers.
11362 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
11364         * gimplify.c (gimplify_init_constructor): Really never clear for an
11365         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
11367 2018-06-19  Richard Biener  <rguenther@suse.de>
11369         PR tree-optimization/86179
11370         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
11371         after failed recognition.
11373 2018-06-18  Martin Sebor  <msebor@redhat.com>
11375         PR middle-end/85602
11376         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
11377         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
11378         Handle integer subtraction.
11379         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
11380         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
11382 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
11384         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
11385         param from rtx to rtx_insn *.
11386         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
11387         param.
11388         (frv_ifcvt_modify_insn): Likwise.
11389         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
11390         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
11391         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
11392         as_a <rtx_insn *> cast to local "unprotected_region" once
11393         it's been established that it's not NULL or pc_rtx.
11394         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
11395         param "sethi" from rtx to rtx_insn *.
11396         (nds32_group_float_insns): Likewise for param "insn".
11397         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
11398         param.
11399         (vax_output_int_subtract): Likewise.
11400         * config/vax/vax.c (vax_output_int_add): Likewise for param
11401         "insn".
11402         (vax_output_int_subtract): Likewise.
11403         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
11404         (emit_pattern_after): Likewise for param "after".
11405         (emit_insn_after): Likewise.
11406         (emit_jump_insn_after): Likewise.
11407         (emit_call_insn_after): Likewise.
11408         (emit_debug_insn_after): Likewise.
11409         (emit_pattern_before): Likewise for param "before".
11410         (emit_insn_before): Likewise.
11411         (emit_jump_insn_before): Likewise.
11412         * final.c (get_insn_template): Likewise for param "insn", removing
11413         a cast.
11414         * output.h (get_insn_template): Likewise for 2nd param.
11415         * rtl.h (emit_insn_before): Likewise.
11416         (emit_jump_insn_before): Likewise.
11417         (emit_debug_insn_before_noloc): Likewise.
11418         (emit_insn_after): Likewise.
11419         (emit_jump_insn_after): Likewise.
11420         (emit_call_insn_after): Likewise.
11421         (emit_debug_insn_after): Likewise.
11422         (set_insn_deleted): Likewise for param.
11424 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
11426         PR target/85358
11427         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
11428         floating point modes, so that IFmode is numerically greater than
11429         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
11430         to declare the ordering.  This prevents IFmode from being
11431         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
11432         machine.  Include rs6000-modes.h to share the fractional values
11433         between genmodes* and the rest of the compiler.
11434         (IFmode): Likewise.
11435         (KFmode): Likewise.
11436         (TFmode): Likewise.
11437         * config/rs6000/rs6000-modes.h: New file.
11438         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
11439         meaning of rs6000_long_double_size so that 126..128 selects an
11440         appropriate 128-bit floating point type.
11441         (rs6000_option_override_internal): Likewise.
11442         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
11443         (TARGET_LONG_DOUBLE_128): Change the meaning of
11444         rs6000_long_double_size so that 126..128 selects an appropriate
11445         128-bit floating point type.
11446         (LONG_DOUBLE_TYPE_SIZE): Update comment.
11447         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
11448         source and destination to match the standard usage.
11449         (truncifkf2): Likewise.
11450         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
11451         ISA 2.07 to use an explicit clobber, instead of passing in a
11452         temporary.
11453         (copysign<mode>3_soft): Likewise.
11455 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
11457         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11458         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
11459         (vect_slp_analyze_instance_dependence): Likewise.
11460         (vect_enhance_data_refs_alignment): Likewise.
11461         (vect_analyze_data_refs_alignment): Likewise.
11462         (vect_slp_analyze_and_verify_instance_alignment
11463         (vect_analyze_data_ref_accesses): Likewise.
11464         (vect_prune_runtime_alias_test_list): Likewise.
11465         (vect_analyze_data_refs): Likewise.
11466         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
11467         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11468         (vect_analyze_scalar_cycles_1): Likewise.
11469         (vect_get_loop_niters): Likewise.
11470         (vect_analyze_loop_form_1): Likewise.
11471         (vect_update_vf_for_slp): Likewise.
11472         (vect_analyze_loop_operations): Likewise.
11473         (vect_analyze_loop): Likewise.
11474         (vectorizable_induction): Likewise.
11475         (vect_transform_loop): Likewise.
11476         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
11477         * tree-vect-slp.c (vect_analyze_slp): Likewise.
11478         (vect_make_slp_decision): Likewise.
11479         (vect_detect_hybrid_slp): Likewise.
11480         (vect_slp_analyze_operations): Likewise.
11481         (vect_slp_bb): Likewise.
11482         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
11483         (vectorizable_bswap): Likewise.
11484         (vectorizable_call): Likewise.
11485         (vectorizable_simd_clone_call): Likewise.
11486         (vectorizable_conversion): Likewise.
11487         (vectorizable_assignment): Likewise.
11488         (vectorizable_shift): Likewise.
11489         (vectorizable_operation): Likewise.
11490         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
11492 2018-06-18  Martin Sebor  <msebor@redhat.com>
11494         PR tree-optimization/81384
11495         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
11496         * builtins.c (expand_builtin_strnlen): New function.
11497         (expand_builtin): Call it.
11498         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
11499         * builtins.def (BUILT_IN_STRNLEN): New.
11500         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
11501         Warn for bounds in excess of maximum object size.
11502         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
11503         single-value ranges.  Handle strnlen.
11504         (handle_builtin_strlen): Handle strnlen.
11505         (strlen_check_and_optimize_stmt): Same.
11506         * doc/extend.texi (Other Builtins): Document strnlen.
11508 2018-06-18  Maya Rashish  <coypu@sdf.org>
11510         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
11511         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
11512         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
11514         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
11515         here to ...
11516         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
11518 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11520         * tree.c (escaped_string::escape): Replace cast to char * by
11521         const_cast<char *> (unescaped).
11523 2018-06-18  Nick Clifton  <nickc@redhat.com>
11525         PR 84195
11526         * tree.c (escaped_string): New class.  Converts an unescaped
11527         string into its escaped equivalent.
11528         (warn_deprecated_use): Use the new class to convert the
11529         deprecation message, if present.
11530         (test_escaped_strings): New self test.
11531         (test_c_tests): Add test_escaped_strings.
11532         * doc/extend.texi (deprecated): Add a note that the
11533         deprecation message is affected by the -fmessage-length
11534         option, and that control characters will be escaped.
11535         (#pragma GCC error): Document this pragma.
11536         (#pragma GCC warning): Likewise.
11537         * doc/invoke.texi (-fmessage-length): Document this option's
11538         effect on the #warning and #error preprocessor directives and
11539         the deprecated attribute.
11541 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11543         * tree.c (decl_value_expr_lookup): Revert latest change.
11544         (decl_value_expr_insert): Likewise.
11546 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
11548         * gimplify.c (nonlocal_vlas): Delete.
11549         (nonlocal_vla_vars): Likewise.
11550         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
11551         referenced VLAs.
11552         (gimplify_body): Do not create and destroy nonlocal_vlas.
11553         * tree-nested.c: Include diagnostic.h.
11554         (use_pointer_in_frame): Tweak.
11555         (lookup_field_for_decl): Add assertion and declare the transformation.
11556         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
11557         internal error when the reference is in a wrong context.  Do not
11558         create a debug decl by default.
11559         (note_nonlocal_block_vlas): Delete.
11560         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
11561         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
11562         create a debug decl by default.
11563         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
11564         call is in a wrong context.
11565         (fixup_vla_decls): New function.
11566         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
11567         debug variables were created.
11568         * tree.c (decl_value_expr_lookup): Add checking assertion.
11569         (decl_value_expr_insert): Likewise.
11571 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
11573         PR middle-end/82479
11574         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
11575         * tree-scalar-evolution.c (interpret_expr): Likewise.
11576         (expression_expensive_p): Likewise.
11577         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
11578         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
11579         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
11580         (ssa_defined_by_minus_one_stmt_p): New.
11582 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
11584         PR middle-end/64946
11585         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
11586         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
11587         * dojump.c (do_jump): Likewise.
11588         * expr.c (expand_expr_real_2): Check operand type's sign.
11589         * fold-const.c (const_unop): Handle ABSU_EXPR.
11590         (fold_abs_const): Likewise.
11591         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
11592         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
11593         (strip_sign_op_1): Likesise.
11594         * match.pd: Add new pattern to generate ABSU_EXPR.
11595         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
11596         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11597         * tree-eh.c (operation_could_trap_helper_p): Likewise.
11598         * tree-inline.c (estimate_operator_cost): Likewise.
11599         * tree-pretty-print.c (dump_generic_node): Likewise.
11600         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
11601         * tree.def (ABSU_EXPR): New.
11603 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
11605         PR middle-end/86095
11606         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
11607         documented as preserved for backward compatibility only.
11608         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
11610         PR rtl-optimization/86108
11611         * bb-reorder.c (create_forwarder_block): Renamed to ...
11612         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
11613         jump from new landing pad to the second part.
11614         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
11615         Adjust callers.
11617 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
11619         PR middle-end/85878
11620         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
11621         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
11622         Only call store_expr for halves if the mode is the same.
11624         PR middle-end/86123
11625         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
11626         Fix up comment formatting.
11628 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11630         * typed-splay-tree.h (typed_splay_tree::remove): New function.
11631         (typed_splay_tree::closure,
11632         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
11633         (typed_splay_tree::typed_splay_tree,
11634         typed_splay_tree::operator =): Declared private.
11635         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
11636         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
11637         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
11638         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
11639         typed_splay_tree::splay_tree_splay,
11640         typed_splay_tree::splay_tree_foreach_helper,
11641         typed_splay_tree::splay_tree_insert,
11642         typed_splay_tree::splay_tree_remove,
11643         typed_splay_tree::splay_tree_lookup,
11644         typed_splay_tree::splay_tree_predecessor,
11645         typed_splay_tree::splay_tree_successor,
11646         typed_splay_tree::splay_tree_min,
11647         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
11648         (typed_splay_tree::root, typed_splay_tree::comp,
11649         typed_splay_tree::delete_key,
11650         typed_splay_tree::delete_value): New data members.
11651         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
11652         typed_splay_tree::remove.
11654 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
11656         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
11657         -mginv and -mno-ginv to the assembler.
11658         * config/mips/mips.opt (-mcrc): New option.
11659         (-mginv): Likewise.
11660         * doc/invoke.text (-mcrc): Document.
11661         (-mginv): Likewise.
11663 2018-06-15  Nick Clifton  <nickc@redhat.com>
11665         PR 84195
11666         * tree.c (escaped_string): New class.  Converts an unescaped
11667         string into its escaped equivalent.
11668         (warn_deprecated_use): Use the new class to convert the
11669         deprecation message, if present.
11670         (test_escaped_strings): New self test.
11671         (test_c_tests): Add test_escaped_strings.
11672         * doc/extend.texi (deprecated): Add a note that the
11673         deprecation message is affected by the -fmessage-length
11674         option, and that control characters will be escaped.
11675         (#pragma GCC error): Document this pragma.
11676         (#pragma GCC warning): Likewise.
11677         * doc/invoke.texi (-fmessage-length): Document this option's
11678         effect on the #warning and #error preprocessor directives and
11679         the deprecated attribute.
11681 2018-06-15  Richard Biener  <rguenther@suse.de>
11683         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
11684         here, also noting vector size used.
11685         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
11686         size used in MSG_OPTIMIZED_LOCATIONS dump.
11687         (pass_slp_vectorize::execute): Adjust.
11689 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
11691         PR target/85968
11692         * config/arc/arc.c (arc_return_address_register): Fix
11693         if-condition.
11695 2018-06-15  Richard Biener  <rguenther@suse.de>
11697         PR middle-end/86159
11698         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
11699         leave useless conversion stripping to force_gimple_operand_gsi.
11700         (gimplify_build2): Likewise.
11701         (gimplify_build1): Likewise.
11703 2018-06-15  Richard Biener  <rguenther@suse.de>
11705         PR middle-end/86076
11706         * tree-cfg.c (move_stmt_op): unshare invariant addresses
11707         before adjusting their block.
11709 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11711         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
11712         multilibs for *-*-rtems*.
11713         * config/riscv/t-rtems: New file.
11715 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
11717         PR middle-end/86122
11718         * match.pd ((A +- CST1) +- CST2): Punt if last resort
11719         unsigned_type_for returns NULL.
11721         PR target/85945
11722         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
11723         subregs of multi-word pseudos unless the float mode has word size.
11725 2018-06-14  Richard Biener  <rguenther@suse.de>
11727         PR middle-end/86139
11728         * tree-vect-generic.c (build_word_mode_vector_type): Remove
11729         duplicate and harmful type_hash_canon.
11730         * tree.c (type_hash_canon): Assert we didn't find ourselves.
11732 2018-06-14  Richard Biener  <rguenther@suse.de>
11734         PR ipa/86124
11735         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
11736         NULL cgraph_node.
11738 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11740         * config/rtems.h (STDINT_LONG32): Define.
11742 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
11743             Prachi Godbole  <prachi.godbole@imgtec.com>
11745         * config/mips/mips-cpus.def: Define P6600.
11746         * config/mips/mips-tables.opt: Regenerate.
11747         * config/mips/mips.c (mips_ucbranch_type): New enum.
11748         (mips_rtx_cost_data): Add support for P6600.
11749         (mips_issue_rate): Likewise.
11750         (mips_multipass_dfa_lookahead): Likewise.
11751         (mips_avoid_hazard): Likewise.
11752         (mips_reorg_process_insns): Likewise.
11753         (mips_classify_branch_p6600): New function.
11754         * config/mips/mips.h (TUNE_P6600): New define.
11755         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
11756         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
11757         * config/mips/mips.md: Include p6600.md.
11758         (processor): Add p6600.
11759         * config/mips/p6600.md: New file.
11760         * doc/invoke.texi: Add p6600 to supported architectures.
11762 2018-06-13  Martin Sebor  <msebor@redhat.com>
11764         PR tree-optimization/86114
11765         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
11766         of integer types.
11767         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
11769 2018-06-13  Richard Biener  <rguenther@suse.de>
11771         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
11772         Properly set vector type of the intermediate stmt.
11773         * tree-vect-stmts.c (vectorizable_operation): The destination
11774         var always has vectype_out type.
11776 2018-06-13  Jeff Law  <law@redhat.com>
11778         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
11779         integer 0 for argument to print_rtl_with_bb.
11780         (rl78_reorg): Likewise.
11782 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
11784         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
11785         from rtx to rtx_insn *.
11786         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
11787         "label".
11788         (add_sched_insns_for_speculation): Likewise for local "target",
11789         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11790         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
11791         from rtx_insn ** to rtx_code_label **.
11792         (reorg_emit_nops): Likewise.
11793         (c6x_reorg): Likewise for local "call_labels".
11794         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
11795         rtx to rtx_insn *.
11796         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
11797         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
11798         the loops over LABEL_REFS.
11799         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
11800         braf_label.
11801         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11802         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
11803         (split_branches): Strengthen local "olabel" from rtx to
11804         rtx_insn *, adding a safe_as_a cast.
11805         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
11806         to "rtx_insn *".
11807         (add_insn_after): Likewise for first two params.
11808         (add_insn_before): Likewise.
11809         (remove_insn): Likewise for param.
11810         (emit_pattern_before_noloc): Likewise for second and third params.
11811         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
11812         (emit_call_insn_before_noloc): Likewise.
11813         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
11814         to "rtx_insn *".
11815         (emit_barrier_before): Likewise.
11816         (emit_label_before): Strengthen "label" param from "rtx" to
11817         "rtx_code_label *".  Strengthen "before" param from "rtx" to
11818         "rtx_insn *".
11819         (emit_insn_after_1): Strengthen "after" param from "rtx" to
11820         "rtx_insn *".
11821         (emit_pattern_after_noloc): Likewise.
11822         (emit_insn_after_noloc): Likewise.
11823         (emit_jump_insn_after_noloc): Likewise.
11824         (emit_call_insn_after_noloc): Likewise.
11825         (emit_debug_insn_after_noloc): Likewise.
11826         (emit_barrier_after): Likewise.
11827         (emit_label_after): Likewise for both params.
11828         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
11829         "loc" param from "int" to "location_t".
11830         (emit_insn_after_setloc): Likewise.
11831         (emit_jump_insn_after_setloc): Likewise.
11832         (emit_call_insn_after_setloc): Likewise.
11833         (emit_debug_insn_after_setloc): Likewise.
11834         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
11835         "loc" param from "int" to "location_t".
11836         (emit_pattern_before): Convert NULL_RTX to NULL.
11837         (emit_insn_before_setloc): Convert "loc" param from "int" to
11838         "location_t".
11839         (emit_jump_insn_before_setloc): Likewise.
11840         (emit_call_insn_before_setloc): Likewise.
11841         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
11842         rtx_insn *.  Convert "loc" param from "int" to "location_t".
11843         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
11844         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
11845         Convert 3rd param from "int" to "location_t".
11846         (emit_barrier_before, emit_barrier_after, next_real_insn):
11847         Strengthen param from rtx to rtx_insn *.
11848         (emit_label_before): Strengthen 1st param from "rtx" to
11849         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
11850         "rtx_insn *".
11851         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
11852         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
11853         Strengthen 2nd param from "rtx" to "rtx_insn *".
11854         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
11855         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
11856         Likewise. Convert 3rd param from "int" to "location_t".
11857         (emit_label_after): Strengthen 1st param from "rtx" to
11858         "rtx_code_label *".
11859         (next_real_insn, remove_insn): Strengthen param from "rtx" to
11860         "rtx_insn *".
11861         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
11862         from "rtx" to "rtx_insn *".
11864 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
11866         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
11867         bodies streamed in with -Q.
11868         * dumpfile.c (dump_files): Add lto-stream-out dump file.
11869         * dumpfile.h (tree_dump_index): Add lto_stream_out.
11870         * gimple-streamer-out.c: Include gimple-pretty-print.h
11871         (output_bb): Dump stmts streamed.
11872         * lto-section-out.c: Include print-tree.h
11873         (lto_begin_section): Dump sections created.
11874         (lto_output_decl_index): Dump decl encoded.
11875         * lto-streamer-out.c: Include print-tree.h
11876         (create_output_block): Dump output block created.
11877         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
11878         (output_function): Dump function output.
11879         (output_constructor): Dump constructor streamed.
11880         (write_global_stream): Output indexes encoded.
11881         (produce_asm_for_decls): Dump streams encoded.
11882         * lto-streamer.c (streamer_dump_file): New global var.
11883         * lto-streamer.h (streamer_dump_file): Declare.
11884         * passes.c (ipa_write_summaries): Initialize streamer dump.
11885         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
11886         in.
11888 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
11890         PR target/86048
11891         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
11892         offsets for register save directives.  Emit a second batch of save
11893         directives, if need be, when the function accesses prior frames.
11895 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11897         * config/arc/fpu.md (fmasf4): Force operand to register.
11898         (fnmasf4): Likewise.
11900 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11902         * config/arc/arc-protos.h (arc_pad_return): Remove.
11903         * config/arc/arc.c (machine_function): Remove force_short_suffix
11904         and size_reason.
11905         (arc_print_operand): Adjust printing of '&'.
11906         (arc_verify_short): Remove conditional printing of short suffix.
11907         (arc_final_prescan_insn): Remove reference to size_reason.
11908         (pad_return): New function.
11909         (arc_reorg): Call pad_return.
11910         (arc_pad_return): Remove.
11911         (arc_init_machine_status): Remove reference to force_short_suffix.
11912         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
11913         (attr length): When attribute iscompact is true force to 2
11914         regardless; in the case of maybe check if we want to force the
11915         instruction to have 4 bytes length.
11916         (nopv): Change it to generate 4 byte long nop as well.
11917         (blockage): New pattern.
11918         (simple_return): Remove call to arc_pad_return.
11919         (p_return_i): Likewise.
11921 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11923         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
11925 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11927         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
11928         ARC cores.
11930 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11932         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
11933         for ARC700 and ARCv2.
11935 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
11937         PR target/86076
11938         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
11939         operands[2] instead of operands[1].
11942 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
11944         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
11945         case, check whether the outer register overlaps an unallocatable
11946         register, not just whether it fits the required class.
11948 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
11950         * poly-int.h (can_div_trunc_p): Add new overload in which all values
11951         are poly_ints.
11952         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
11953         (memrefs_conflict_p): Likewise.
11954         (init_alias_analysis): Likewise.
11955         * cfgexpand.c (expand_debug_expr): Likewise.
11956         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
11957         * cse.c (fold_rtx): Likewise.
11958         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
11959         * expr.c (emit_block_move_hints): Likewise.
11960         (clear_storage_hints, push_block, emit_push_insn): Likewise.
11961         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
11962         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
11963         (emit_group_store): Likewise.
11964         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
11965         to read the PRE/POST_MODIFY increment.
11966         * calls.c (store_one_arg): Use strip_offset.
11967         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
11968         poly_int_rtx_p.
11969         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
11970         by a VEC_SELECT.
11971         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
11972         (simplify_binary_operation_1): Extend CONST_INT handling to
11973         poly_int_rtx_p.
11974         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
11975         than a HOST_WIDE_INT.
11976         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
11977         poly_int64.
11978         (adjust_mems, add_stores): Update accodingly.
11979         (vt_canonicalize_addr): Track polynomial offsets.
11980         (emit_note_insn_var_location): Likewise.
11981         (vt_add_function_parameter): Likewise.
11982         (vt_initialize): Likewise.
11984 2018-06-12  Jeff Law  <law@redhat.com>
11986         * config.gcc (alpha*-*-freebsd*): Remove.
11987         * config/alpha/freebsd.h: Remove.
11989 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
11991         PR other/69968
11992         * spellcheck-tree.c (levenshtein_distance): Rename to...
11993         (get_edit_distance): ...this, and update for underlying renaming.
11994         * spellcheck-tree.h (levenshtein_distance): Rename to...
11995         (get_edit_distance): ...this.
11996         * spellcheck.c (levenshtein_distance): Rename to...
11997         (get_edit_distance): ...this.  Convert from Levenshtein distance
11998         to Damerau-Levenshtein distance by supporting transpositions of
11999         adjacent characters.  Rename "v1" to "v_next" and "v0" to
12000         "v_one_ago".
12001         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
12002         (selftest::test_edit_distance_unit_test_oneway): ...this, and
12003         update for underlying renaming.
12004         (selftest::levenshtein_distance_unit_test): Rename to...
12005         (selftest::test_get_edit_distance_unit): ...this, and update for
12006         underlying renaming.
12007         (selftest::test_find_closest_string): Add example from PR 69968
12008         where transposition helps
12009         (selftest::test_metric_conditions): Update for renaming.
12010         (selftest::test_metric_conditions): Likewise.
12011         (selftest::spellcheck_c_tests): Likewise.
12012         * spellcheck.h (levenshtein_distance): Rename both overloads to...
12013         (get_edit_distance): ...this.
12014         (best_match::consider): Update for renaming.
12016 2018-06-12  Martin Sebor  <msebor@redhat.com>
12018         PR tree-optimization/85259
12019         * builtins.c (compute_objsize): Handle constant offsets.
12020         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
12021         true iff a warning has been issued.
12022         * gimple.h (gimple_nonartificial_location): New function.
12023         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
12024         gimple_nonartificial_location and handle -Wno-system-headers.
12025         (handle_builtin_stxncpy): Same.
12027 2018-06-12  Martin Sebor  <msebor@redhat.com>
12029         PR c/85931
12030         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
12032 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
12034         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
12035         BUILTIN_VEC_XST entries for pointer to double and long long.
12037 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
12039         PR target/85990
12040         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
12041         Update comments.
12042         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
12043         Likewise.
12045 2018-06-12  Martin Liska  <mliska@suse.cz>
12047         * doc/options.texi: Document IntegerRange.
12049 2018-06-12  Martin Liska  <mliska@suse.cz>
12051         * config/i386/i386.opt: Make MPX-related options as Deprecated.
12052         * opt-functions.awk: Handle Deprecated flag.
12053         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
12054         and report error.
12055         (read_cmdline_option): Report warning for a deprecated option.
12056         * opts.h (struct cl_option): Add new field cl_deprecated.
12057         (CL_ERR_DEPRECATED): New.
12059 2018-06-12  Martin Liska  <mliska@suse.cz>
12061         * doc/options.texi: Document Deprecated option flag.
12063 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12065         * config/arc/arc-arch.h (arc_extras): New enum.
12066         (arc_cpu_t):Add field extra.
12067         (arc_cpu_types): Consider the extras.
12068         * config/arc/arc-cpus.def: Add extras info.
12069         * config/arc/arc-opts.h (processor_type): Consider extra field.
12070         * config/arc/arc.c (arc_override_options): Handle extra field.
12072 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12074         * config/arc/arc-arch.h: Update ARC_OPTX macro.
12075         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
12076         field.
12077         * config/arc/arc.c (arc_init): Update pic warning.
12078         (irq_range): Update irq range parsing warnings.
12079         (arc_override_options): Update various warning messages.
12080         (arc_handle_aux_attribute): Likewise.
12082 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
12084         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
12086 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12088         * doc/sourcebuild.texi: Document usage of line number 0 in verify
12089         compiler messages directives.
12091 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
12093         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
12094         * config/mips/mips-tables.opt: Regenerate.
12095         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
12096         mips64r6.
12097         * doc/invoke.texi: Document -march=i6500.
12099 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
12101         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
12102         (i6400_gpmul): Add cpu_unit.
12103         (i6400_gpdiv): Likewise.
12104         (i6400_msa_add_d): Update reservations.
12105         (i6400_msa_int_add) Likewise.
12106         (i6400_msa_short_logic3) Likewise.
12107         (i6400_msa_short_logic2) Likewise.
12108         (i6400_msa_short_logic) Likewise.
12109         (i6400_msa_move) Likewise.
12110         (i6400_msa_cmp) Likewise.
12111         (i6400_msa_short_float2) Likewise.
12112         (i6400_msa_div_d) Likewise.
12113         (i6400_msa_long_logic1) Likewise.
12114         (i6400_msa_long_logic2) Likewise.
12115         (i6400_msa_mult) Likewise.
12116         (i6400_msa_long_float2) Likewise.
12117         (i6400_msa_long_float4) Likewise.
12118         (i6400_msa_long_float5) Likewise.
12119         (i6400_msa_long_float8) Likewise.
12120         (i6400_fpu_fadd): Include frint type.
12121         (i6400_fpu_store): New define_insn_reservation.
12122         (i6400_fpu_load): Likewise.
12123         (i6400_fpu_move): Likewise.
12124         (i6400_fpu_fcmp): Likewise.
12125         (i6400_fpu_fmadd): Likewise.
12126         (i6400_int_mult): Include imul3nc type and update reservation.
12127         (i6400_int_div): Include idiv3 type and update reservation.
12128         (i6400_int_load): Update to check type not move_type.
12129         (i6400_int_store): Likewise.
12130         (i6400_int_prefetch): Set zero latency.
12132 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
12134         * gcc.c: Document new %@{...} sequence.
12135         (LINK_COMMAND_SPEC): Use it for the -L switches.
12136         (cpp_unique_options): Use it for the -I switches.
12137         (at_file_argbuf): New global variable.
12138         (in_at_file): Likewise.
12139         (alloc_args): Create at_file_argbuf.
12140         (clear_args): Truncate at_file_argbuf.
12141         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
12142         (open_at_file): New function.
12143         (close_at_file): Likewise.
12144         (create_at_file): Delete.
12145         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
12146         <'o'>: Likewise.
12147         <'@'>: New case.
12148         (validate_switches_from_spec): Deal with %@{...} sequence.
12149         (validate_switches): Likewise.
12150         (driver::finalize): Call clear_args.
12152 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
12154         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
12156 2018-06-11  Martin Sebor  <msebor@redhat.com>
12158         * doc/invoke.texi (-Wall): List -Wc++17-compat.
12159         (Wno-class-memaccess): Add @opindex.
12160         (Wno-templates, Wno-multiple-inheritance): Same.
12161         (Wno-virtual-inheritance, Wno-namespaces): Same.
12162         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
12163         (Wno-format-overflow, Wno-format-truncation): Same.
12164         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
12165         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
12166         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
12167         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
12168         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
12169         (Wno-misspelled-isr): Same.
12171 2018-06-11  Martin Sebor  <msebor@redhat.com>
12173         * PR tree-optimization/86083
12174         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
12176 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
12178         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
12180 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
12182         PR target/85755
12183         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
12184         on the correct operand.
12185         (*movdi_internal64): Ditto.
12187 2018-06-11  Martin Liska  <mliska@suse.cz>
12189         PR tree-optimization/86089
12190         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
12192 2018-06-11  Julia Koval  <julia.koval@intel.com>
12194         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
12195         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
12196         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
12198 2018-06-11  Olivier Hainque  <hainque@adacore.com>
12200         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
12201         for Ada with strict dwarf2.
12203 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
12205         PR target/85755
12206         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
12207         addresses.
12209 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
12211         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
12213 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
12215         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
12216         TARGET_ELF.
12218 2018-06-08  Martin Liska  <mliska@suse.cz>
12220         * tree-cfg.h (debug_function): Fix argument type to match
12221         implementation.
12223 2018-06-08  Martin Liska  <mliska@suse.cz>
12225         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
12226         Remove usage of MPX-related (and removed) fields.
12227         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
12229 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
12231         * cfg.c (debug): Use TDF_NONE rather than 0.
12232         * cfghooks.c (debug): Likewise.
12233         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
12234         (struct dump_option_value_info): Convert to...
12235         (struct kv_pair): ...this template type.
12236         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
12237         rather than 0.
12238         (optinfo_verbosity_options): Likewise.
12239         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
12240         OPTGROUP_NONE.
12241         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
12242         than int for "optgroup_flags" param.
12243         (dump_generic_expr_loc): Use dump_flags_t rather than int for
12244         "dump_kind" param.
12245         (dump_dec): Likewise.
12246         (dump_finish): Use TDF_NONE rather than 0.
12247         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
12248         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
12249         than 0.  Update for change to option_ptr.
12250         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
12251         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
12252         0.  Update for changes to optinfo_verbosity_options and
12253         optgroup_options.
12254         (opt_info_switch_p): Convert optgroup_flags from int to
12255         optgroup_flags_t.
12256         (dump_basic_block): Use dump_flags_t rather than int
12257         for "dump_kind" param.
12258         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
12259         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
12260         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
12261         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
12262         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
12263         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
12264         TDF_NONE): Convert from macros to...
12265         (enum dump_flag): ...this new enum.
12266         (dump_flags_t): Update to use enum.
12267         (operator|, operator&, operator~, operator|=, operator&=):
12268         Implement for dump_flags_t.
12269         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
12270         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
12271         Convert from macros to...
12272         (enum optgroup_flag): ...this new enum.
12273         (optgroup_flags_t): New typedef.
12274         (operator|, operator|=): Implement for optgroup_flags_t.
12275         (struct dump_file_info): Convert field "alt_flags" to
12276         dump_flags_t.  Convert field "optgroup_flags" to
12277         optgroup_flags_t.
12278         (dump_basic_block): Use dump_flags_t rather than int for param.
12279         (dump_generic_expr_loc): Likewise.
12280         (dump_dec): Likewise.
12281         (dump_register): Convert param "optgroup_flags" to
12282         optgroup_flags_t.
12283         (opt_info_enable_passes): Likewise.
12284         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
12285         than 0.
12286         * gimple-pretty-print.c (debug): Likewise.
12287         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
12288         (merged_store_group::apply_stores): Likewise.
12289         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
12290         * gimple.c (verify_gimple_pp): Likewise.
12291         * graphite-poly.c (print_pbb_body): Likewise.
12292         * passes.c (pass_manager::register_one_dump_file): Convert
12293         local "optgroup_flags" to optgroup_flags_t.
12294         * print-tree.c (print_node): Use TDF_NONE rather than 0.
12295         (debug): Likewise.
12296         (debug_body): Likewise.
12297         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
12298         to optgroup_flags_t.
12299         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
12300         than 0.
12301         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
12302         (convert_mult_to_fma): Likewise.
12303         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
12304         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
12305         * tree-vect-data-refs.c (dump_lower_bound): Convert param
12306         "dump_kind" to dump_flags_t.
12308 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
12310         * config/rs6000/rs6000.c (min, max): Delete.
12312 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
12314         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
12315         -mabi=spe and -mabi=no-spe.
12317 2018-06-08  Martin Liska  <mliska@suse.cz>
12319         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
12320         where we expect an existing summary.
12322 2018-06-08  Martin Liska  <mliska@suse.cz>
12324         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
12325         * ipa-inline.h (estimate_edge_growth): Likewise.
12327 2018-06-08  Martin Liska  <mliska@suse.cz>
12329         * cgraph.c (function_version_hasher::hash): Use
12330         cgraph_node::get_uid ().
12331         (function_version_hasher::equal):
12332         * cgraph.h (cgraph_node::get_uid): New method.
12333         * ipa-inline.c (update_caller_keys): Use
12334         cgraph_node::get_uid ().
12335         (update_callee_keys): Likewise.
12336         * ipa-utils.c (searchc): Likewise.
12337         (ipa_reduced_postorder): Likewise.
12338         * lto-cgraph.c (input_node): Likewise.
12339         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
12340         * symbol-summary.h (symtab_insertion): Likewise.
12341         (symtab_removal): Likewise.
12342         (symtab_duplication): Likewise.
12343         * tree-pretty-print.c (dump_function_header): Likewise.
12344         * tree-sra.c (convert_callers_for_node): Likewise.
12346 2018-06-08  Martin Liska  <mliska@suse.cz>
12348         * cgraph.c (symbol_table::create_edge): Always assign a new
12349         unique number.
12350         (symbol_table::free_edge): Do not recycle numbers.
12351         * cgraph.h (cgraph_edge::get): New method.
12352         * symbol-summary.h (symtab_removal): Use it.
12353         (symtab_duplication): Likewise.
12354         (call_summary::hashable_uid): Remove.
12356 2018-06-08  Martin Liska  <mliska@suse.cz>
12358         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
12359         (initialize_growth_caches): Remove.
12360         (free_growth_caches): Likewise.
12361         (do_estimate_edge_time): Use edge_growth_cache.
12362         (do_estimate_edge_size): Likewise.
12363         (do_estimate_edge_hints): Likewise.
12364         * ipa-inline.c (reset_edge_caches): Likewise.
12365         (recursive_inlining): Likewise.
12366         (inline_small_functions): Likewise.
12367         * ipa-inline.h (initialize_growth_caches): Remove.
12368         (estimate_edge_size): Likewise.
12369         (estimate_edge_time): Likewise.
12370         (estimate_edge_hints): Likewise.
12371         (reset_edge_growth_cache): Likewise.
12372         * symbol-summary.h (call_summary::remove): New method.
12374 2018-06-08  Martin Liska  <mliska@suse.cz>
12376         * ipa-cp.c (class edge_clone_summary): New summary.
12377         (grow_edge_clone_vectors): Remove.
12378         (ipcp_edge_duplication_hook): Remove.
12379         (class edge_clone_summary_t): New call_summary class.
12380         (ipcp_edge_removal_hook): Remove.
12381         (edge_clone_summary_t::duplicate): New function.
12382         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
12383         (create_specialized_node): Likewise.
12384         (ipcp_driver): Initialize edge_clone_summaries and do not
12385         register hooks.
12387 2018-06-08  Martin Liska  <mliska@suse.cz>
12389         * symbol-summary.h (get): New function.
12390         (call_summary::m_initialize_when_cloning): New class member.
12392 2018-06-08  Martin Liska  <mliska@suse.cz>
12394         * cgraph.c (cgraph_node::remove): Do not recycle uid.
12395         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
12396         (symbol_table::allocate_cgraph_symbol): Do not set uid.
12397         * passes.c (uid_hash_t): Record removed_nodes by their uids.
12398         (remove_cgraph_node_from_order): Use the removed_nodes set.
12399         (do_per_function_toporder): Likwise.
12400         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
12401         instead of summary_uid.
12402         (symtab_removal): Likewise.
12403         (symtab_duplication): Likewise.
12405 2018-06-08  Martin Liska  <mliska@suse.cz>
12407         * ipa-cp.c (ipcp_store_bits_results): Use
12408         ipcp_transformation_sum.
12409         (ipcp_store_vr_results): Likewise.
12410         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
12411         to ...
12412         (ipcp_transformation_initialize): ... this.
12413         (ipa_set_node_agg_value_chain):
12414         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
12415         (write_ipcp_transformation_info): Likewise.
12416         (read_ipcp_transformation_info): Likewise.
12417         (ipcp_update_bits): Likewise.
12418         (ipcp_update_vr): Likewise.
12419         (ipcp_transform_function): Likewise.
12420         * ipa-prop.h: Rename ipcp_transformation_summary to
12421         ipcp_transformation.
12422         (class ipcp_transformation_t): New function summary.
12423         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
12424         (ipa_get_agg_replacements_for_node): Likewise.
12426 2018-06-08  Martin Liska  <mliska@suse.cz>
12428         * ipa-pure-const.c (struct funct_state_d): Do it class instead
12429         of struct.
12430         (class funct_state_summary_t): New function_summary class.
12431         (has_function_state): Remove.
12432         (get_function_state): Likewise.
12433         (set_function_state): Likewise.
12434         (add_new_function): Likewise.
12435         (funct_state_summary_t::insert): New function.
12436         (duplicate_node_data): Remove.
12437         (remove_node_data): Remove.
12438         (funct_state_summary_t::duplicate): New function.
12439         (register_hooks): Create new funct_state_summaries.
12440         (pure_const_generate_summary): Use it.
12441         (pure_const_write_summary): Likewise.
12442         (pure_const_read_summary): Likewise.
12443         (propagate_pure_const): Likewise.
12444         (propagate_nothrow): Likewise.
12445         (dump_malloc_lattice): Likewise.
12446         (propagate_malloc): Likewise.
12447         (execute): Do not register hooks, just remove summary
12448         instead.
12449         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
12450         constructor.
12452 2018-06-08  Martin Liska  <mliska@suse.cz>
12454         * ipa-reference.c (remove_node_data): Remove.
12455         (duplicate_node_data): Likewise.
12456         (class ipa_ref_var_info_summary_t): New class.
12457         (class ipa_ref_opt_summary_t): Likewise.
12458         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
12459         (get_reference_optimization_summary): Use
12460         ipa_ref_opt_sum_summaries.
12461         (set_reference_vars_info): Remove.
12462         (set_reference_optimization_summary): Likewise.
12463         (ipa_init): Create summaries.
12464         (init_function_info): Use function summary.
12465         (ipa_ref_opt_summary_t::duplicate): New function.
12466         (ipa_ref_opt_summary_t::remove): New function.
12467         (get_read_write_all_from_node): Fix GNU coding style.
12468         (propagate): Use function summary.
12469         (write_node_summary_p): Fix GNU coding style.
12470         (stream_out_bitmap): Likewise.
12471         (ipa_reference_read_optimization_summary): Use function summary.
12472         (ipa_reference_c_finalize): Do not release hooks.
12474 2018-06-08  Martin Liska  <mliska@suse.cz>
12476         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
12477         (analyze_function_body): Extract multiple calls of get_create.
12478         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12479         * ipa-inline.c (recursive_inlining): Use ::get method.
12480         * ipa-inline.h (estimate_edge_growth): Likewise.
12482 2018-06-08  Martin Liska  <mliska@suse.cz>
12484         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
12485         HSA_INVALID.
12486         (hsa_function_summary::hsa_function_summary): Use the new enum
12487         value.
12488         (hsa_gpu_implementation_p): Use hsa_summaries::get.
12489         * hsa-gen.c (hsa_get_host_function): Likewise.
12490         (get_brig_function_name): Likewise.
12491         * ipa-hsa.c (process_hsa_functions): Likewise.
12492         (ipa_hsa_write_summary): Likewise.
12493         * symbol-summary.h (symtab_duplication): Use ::get function/
12494         (get): New function.
12496 2018-06-08  Martin Liska  <mliska@suse.cz>
12498         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
12499         of get.
12500         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
12501         (hsa_register_kernel): Likewise.
12502         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
12503         * hsa-gen.c (hsa_get_host_function): Likewise.
12504         (get_brig_function_name): Likewise.
12505         (generate_hsa): Likewise.
12506         (pass_gen_hsail::execute): Likewise.
12507         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
12508         (devirtualization_time_bonus): Likewise.
12509         (ipcp_propagate_stage): Likewise.
12510         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12511         (edge_set_predicate): Likewise.
12512         (evaluate_conditions_for_known_args): Likewise.
12513         (evaluate_properties_for_edge): Likewise.
12514         (ipa_fn_summary::reset): Likewise.
12515         (ipa_fn_summary_t::duplicate): Likewise.
12516         (dump_ipa_call_summary): Likewise.
12517         (ipa_dump_fn_summary): Likewise.
12518         (analyze_function_body): Likewise.
12519         (compute_fn_summary): Likewise.
12520         (estimate_edge_devirt_benefit): Likewise.
12521         (estimate_edge_size_and_time): Likewise.
12522         (estimate_calls_size_and_time): Likewise.
12523         (estimate_node_size_and_time): Likewise.
12524         (inline_update_callee_summaries): Likewise.
12525         (remap_edge_change_prob): Likewise.
12526         (remap_edge_summaries): Likewise.
12527         (ipa_merge_fn_summary_after_inlining): Likewise.
12528         (ipa_update_overall_fn_summary): Likewise.
12529         (read_ipa_call_summary): Likewise.
12530         (inline_read_section): Likewise.
12531         (write_ipa_call_summary): Likewise.
12532         (ipa_fn_summary_write): Likewise.
12533         (ipa_free_fn_summary): Likewise.
12534         * ipa-hsa.c (process_hsa_functions): Likewise.
12535         (ipa_hsa_write_summary): Likewise.
12536         (ipa_hsa_read_section): Likewise.
12537         * ipa-icf.c (sem_function::merge): Likewise.
12538         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12539         (do_estimate_edge_time): Likewise.
12540         (estimate_size_after_inlining): Likewise.
12541         (estimate_growth): Likewise.
12542         (growth_likely_positive): Likewise.
12543         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12544         (inline_call): Likewise.
12545         * ipa-inline.c (caller_growth_limits): Likewise.
12546         (can_inline_edge_p): Likewise.
12547         (can_inline_edge_by_limits_p): Likewise.
12548         (compute_uninlined_call_time): Likewise.
12549         (compute_inlined_call_time): Likewise.
12550         (want_inline_small_function_p): Likewise.
12551         (edge_badness): Likewise.
12552         (update_caller_keys): Likewise.
12553         (update_callee_keys): Likewise.
12554         (recursive_inlining): Likewise.
12555         (inline_small_functions): Likewise.
12556         (inline_to_all_callers_1): Likewise.
12557         (dump_overall_stats): Likewise.
12558         (early_inline_small_functions): Likewise.
12559         (early_inliner): Likewise.
12560         * ipa-inline.h (estimate_edge_growth): Likewise.
12561         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12562         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12563         * ipa-prop.h (IPA_NODE_REF): Likewise.
12564         (IPA_EDGE_REF): Likewise.
12565         * ipa-pure-const.c (malloc_candidate_p): Likewise.
12566         (propagate_malloc): Likewise.
12567         * ipa-split.c (execute_split_functions): Likewise.
12568         * symbol-summary.h: Rename get to get_create.
12569         (get): Likewise.
12570         (get_create): Likewise.
12571         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12573 2018-06-08  Martin Liska  <mliska@suse.cz>
12575         * symbol-summary.h (release): Move definition out of class
12576         declaration.
12577         (symtab_removal): Likewise.
12578         (symtab_duplication): Likewise.
12580 2018-06-08  Martin Liska  <mliska@suse.cz>
12582         * symbol-summary.h (function_summary): Move constructor
12583         implementation out of class declaration.
12584         (release): Likewise.
12585         (symtab_insertion): Likewise.
12586         (symtab_removal): Likewise.
12587         (symtab_duplication): Likewise.
12588         (get): Likewise.
12590 2018-06-08  Martin Liska  <mliska@suse.cz>
12592         * Makefile.in: Remove support for MPX (macros, related functions,
12593         fields in cgraph_node, ...).
12594         * builtin-types.def (BT_BND): Likewise.
12595         (BT_FN_BND_CONST_PTR): Likewise.
12596         (BT_FN_CONST_PTR_BND): Likewise.
12597         (BT_FN_VOID_PTR_BND): Likewise.
12598         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
12599         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
12600         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
12601         (expand_builtin_mempcpy_with_bounds): Likewise.
12602         (expand_builtin_memset_with_bounds): Likewise.
12603         (expand_builtin_memset_args): Likewise.
12604         (std_expand_builtin_va_start): Likewise.
12605         (expand_builtin): Likewise.
12606         (expand_builtin_with_bounds): Likewise.
12607         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
12608         (DEF_LIB_BUILTIN_CHKP): Likewise.
12609         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
12610         (DEF_CHKP_BUILTIN): Likewise.
12611         (BUILT_IN_MEMCPY): Likewise.
12612         (BUILT_IN_MEMMOVE): Likewise.
12613         (BUILT_IN_MEMPCPY): Likewise.
12614         (BUILT_IN_MEMSET): Likewise.
12615         (BUILT_IN_STPCPY): Likewise.
12616         (BUILT_IN_STRCAT): Likewise.
12617         (BUILT_IN_STRCHR): Likewise.
12618         (BUILT_IN_STRCPY): Likewise.
12619         (BUILT_IN_STRLEN): Likewise.
12620         (BUILT_IN_MEMCPY_CHK): Likewise.
12621         (BUILT_IN_MEMMOVE_CHK): Likewise.
12622         (BUILT_IN_MEMPCPY_CHK): Likewise.
12623         (BUILT_IN_MEMSET_CHK): Likewise.
12624         (BUILT_IN_STPCPY_CHK): Likewise.
12625         (BUILT_IN_STRCAT_CHK): Likewise.
12626         (BUILT_IN_STRCPY_CHK): Likewise.
12627         * calls.c (store_bounds): Likewise.
12628         (emit_call_1): Likewise.
12629         (special_function_p): Likewise.
12630         (maybe_warn_nonstring_arg): Likewise.
12631         (initialize_argument_information): Likewise.
12632         (finalize_must_preallocate): Likewise.
12633         (compute_argument_addresses): Likewise.
12634         (expand_call): Likewise.
12635         * cfgexpand.c (expand_call_stmt): Likewise.
12636         (expand_return): Likewise.
12637         (expand_gimple_stmt_1): Likewise.
12638         (pass_expand::execute): Likewise.
12639         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
12640         (cgraph_node::remove): Likewise.
12641         (cgraph_node::dump): Likewise.
12642         (cgraph_node::verify_node): Likewise.
12643         * cgraph.h (chkp_function_instrumented_p): Likewise.
12644         (symtab_node::get_alias_target): Likewise.
12645         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
12646         (cgraph_local_p): Likewise.
12647         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
12648         (cgraph_edge::rebuild_references): Likewise.
12649         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
12650         (walk_polymorphic_call_targets): Likewise.
12651         (cgraph_node::expand_thunk): Likewise.
12652         (symbol_table::output_weakrefs): Likewise.
12653         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
12654         (ix86_handle_option): Likewise.
12655         * config/i386/constraints.md: Likewise.
12656         * config/i386/i386-builtin-types.def (BND): Likewise.
12657         (VOID): Likewise.
12658         (PVOID): Likewise.
12659         (ULONG): Likewise.
12660         * config/i386/i386-builtin.def (BDESC_END): Likewise.
12661         (BDESC_FIRST): Likewise.
12662         (BDESC): Likewise.
12663         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
12664         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
12665         * config/i386/i386.c (enum reg_class): Likewise.
12666         (ix86_target_string): Likewise.
12667         (ix86_option_override_internal): Likewise.
12668         (ix86_conditional_register_usage): Likewise.
12669         (ix86_valid_target_attribute_inner_p): Likewise.
12670         (ix86_set_indirect_branch_type): Likewise.
12671         (ix86_set_current_function): Likewise.
12672         (ix86_function_arg_regno_p): Likewise.
12673         (init_cumulative_args): Likewise.
12674         (ix86_function_arg_advance): Likewise.
12675         (ix86_function_arg): Likewise.
12676         (ix86_pass_by_reference): Likewise.
12677         (ix86_function_value_regno_p): Likewise.
12678         (ix86_function_value_1): Likewise.
12679         (ix86_function_value_bounds): Likewise.
12680         (ix86_return_in_memory): Likewise.
12681         (ix86_setup_incoming_vararg_bounds): Likewise.
12682         (ix86_va_start): Likewise.
12683         (indirect_thunk_need_prefix): Likewise.
12684         (print_reg): Likewise.
12685         (ix86_print_operand): Likewise.
12686         (ix86_expand_call): Likewise.
12687         (ix86_output_function_return): Likewise.
12688         (reg_encoded_number): Likewise.
12689         (BDESC_VERIFYS): Likewise.
12690         (ix86_init_mpx_builtins): Likewise.
12691         (ix86_init_builtins): Likewise.
12692         (ix86_emit_cmove): Likewise.
12693         (ix86_emit_move_max): Likewise.
12694         (ix86_expand_builtin): Likewise.
12695         (ix86_builtin_mpx_function): Likewise.
12696         (ix86_get_arg_address_for_bt): Likewise.
12697         (ix86_load_bounds): Likewise.
12698         (ix86_store_bounds): Likewise.
12699         (ix86_load_returned_bounds): Likewise.
12700         (ix86_store_returned_bounds): Likewise.
12701         (ix86_class_likely_spilled_p): Likewise.
12702         (ix86_hard_regno_mode_ok): Likewise.
12703         (x86_order_regs_for_local_alloc): Likewise.
12704         (ix86_mitigate_rop): Likewise.
12705         (ix86_bnd_prefixed_insn_p): Likewise.
12706         (ix86_mpx_bound_mode): Likewise.
12707         (ix86_make_bounds_constant): Likewise.
12708         (ix86_initialize_bounds): Likewise.
12709         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
12710         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
12711         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
12712         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
12713         (TARGET_CHKP_BOUND_MODE): Likewise.
12714         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
12715         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
12716         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
12717         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
12718         * config/i386/i386.h (TARGET_MPX): Likewise.
12719         (TARGET_MPX_P): Likewise.
12720         (VALID_BND_REG_MODE): Likewise.
12721         (FIRST_BND_REG): Likewise.
12722         (LAST_BND_REG): Likewise.
12723         (enum reg_class): Likewise.
12724         (BND_REG_P): Likewise.
12725         (BND_REGNO_P): Likewise.
12726         (BNDmode): Likewise.
12727         (ADJUST_INSN_LENGTH): Likewise.
12728         * config/i386/i386.md: Likewise.
12729         * config/i386/i386.opt: Likewise.
12730         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
12731         (defined): Likewise.
12732         (LINK_MPX): Likewise.
12733         (MPX_SPEC): Likewise.
12734         (LIBMPX_SPEC): Likewise.
12735         (LIBMPXWRAPPERS_SPEC): Likewise.
12736         (CHKP_SPEC): Likewise.
12737         * config/i386/predicates.md: Likewise.
12738         * dbxout.c (dbxout_type): Likewise.
12739         * doc/extend.texi: Likewise.
12740         * doc/invoke.texi: Likewise.
12741         * doc/md.texi: Likewise.
12742         * doc/tm.texi: Likewise.
12743         * doc/tm.texi.in: Likewise.
12744         * dwarf2out.c (is_base_type): Likewise.
12745         (gen_formal_types_die): Likewise.
12746         (gen_subprogram_die): Likewise.
12747         (gen_type_die_with_usage): Likewise.
12748         (gen_decl_die): Likewise.
12749         (dwarf2out_late_global_decl): Likewise.
12750         * expr.c (expand_assignment): Likewise.
12751         (emit_storent_insn): Likewise.
12752         (store_expr_with_bounds): Likewise.
12753         (store_expr): Likewise.
12754         (expand_expr_real_1): Likewise.
12755         * expr.h (store_expr_with_bounds): Likewise.
12756         * function.c (use_register_for_decl): Likewise.
12757         (struct bounds_parm_data): Likewise.
12758         (assign_parms_augmented_arg_list): Likewise.
12759         (assign_parm_find_entry_rtl): Likewise.
12760         (assign_parm_is_stack_parm): Likewise.
12761         (assign_parm_load_bounds): Likewise.
12762         (assign_bounds): Likewise.
12763         (assign_parms): Likewise.
12764         (expand_function_start): Likewise.
12765         * gcc.c (CHKP_SPEC): Likewise.
12766         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
12767         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
12768         (wrestrict_dom_walker::check_call): Likewise.
12769         * gimple.c (gimple_build_call_from_tree): Likewise.
12770         * gimple.h (enum gf_mask): Likewise.
12771         (gimple_call_with_bounds_p): Likewise.
12772         (gimple_call_set_with_bounds): Likewise.
12773         * gimplify.c (gimplify_init_constructor): Likewise.
12774         * ipa-cp.c (initialize_node_lattices): Likewise.
12775         (propagate_constants_across_call): Likewise.
12776         (find_more_scalar_values_for_callers_subset): Likewise.
12777         * ipa-hsa.c (process_hsa_functions): Likewise.
12778         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
12779         * ipa-icf.c (sem_function::merge): Likewise.
12780         * ipa-inline.c (early_inliner): Likewise.
12781         * ipa-pure-const.c (warn_function_noreturn): Likewise.
12782         (warn_function_cold): Likewise.
12783         (propagate_pure_const): Likewise.
12784         * ipa-ref.h (enum GTY): Likewise.
12785         * ipa-split.c (find_retbnd): Likewise.
12786         (consider_split): Likewise.
12787         (split_function): Likewise.
12788         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
12789         * ipa.c (walk_polymorphic_call_targets): Likewise.
12790         (symbol_table::remove_unreachable_nodes): Likewise.
12791         (process_references): Likewise.
12792         (cgraph_build_static_cdtor_1): Likewise.
12793         * lto-cgraph.c (lto_output_node): Likewise.
12794         (output_refs): Likewise.
12795         (compute_ltrans_boundary): Likewise.
12796         (input_overwrite_node): Likewise.
12797         (input_node): Likewise.
12798         (input_cgraph_1): Likewise.
12799         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
12800         * passes.c (pass_manager::execute_early_local_passes): Likewise.
12801         (class pass_chkp_instrumentation_passes): Likewise.
12802         (make_pass_chkp_instrumentation_passes): Likewise.
12803         * passes.def: Likewise.
12804         * rtl.h (struct GTY): Likewise.
12805         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
12806         * stor-layout.c (layout_type): Likewise.
12807         * symtab.c: Likewise.
12808         * target.def: Likewise.
12809         * targhooks.c (default_chkp_bound_type): Likewise.
12810         (default_chkp_bound_mode): Likewise.
12811         (default_builtin_chkp_function): Likewise.
12812         (default_chkp_function_value_bounds): Likewise.
12813         (default_chkp_make_bounds_constant): Likewise.
12814         (default_chkp_initialize_bounds): Likewise.
12815         * targhooks.h (default_chkp_bound_type): Likewise.
12816         (default_chkp_bound_mode): Likewise.
12817         (default_builtin_chkp_function): Likewise.
12818         (default_chkp_function_value_bounds): Likewise.
12819         (default_chkp_make_bounds_constant): Likewise.
12820         (default_chkp_initialize_bounds): Likewise.
12821         * toplev.c (compile_file): Likewise.
12822         (process_options): Likewise.
12823         * tree-core.h (DEF_BUILTIN): Likewise.
12824         (DEF_BUILTIN_CHKP): Likewise.
12825         * tree-inline.c (declare_return_variable): Likewise.
12826         (remap_gimple_stmt): Likewise.
12827         (copy_bb): Likewise.
12828         (initialize_inlined_parameters): Likewise.
12829         (expand_call_inline): Likewise.
12830         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
12831         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
12832         (make_pass_ipa_chkp_produce_thunks): Likewise.
12833         (make_pass_chkp): Likewise.
12834         (make_pass_chkp_opt): Likewise.
12835         (make_pass_chkp_instrumentation_passes): Likewise.
12836         * tree-pretty-print.c (dump_generic_node): Likewise.
12837         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
12838         * tree-ssa-dce.c (propagate_necessity): Likewise.
12839         (eliminate_unnecessary_stmts): Likewise.
12840         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
12841         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
12842         * tree-ssa-sccvn.h: Likewise.
12843         * tree-ssa-strlen.c (get_string_length): Likewise.
12844         (valid_builtin_call): Likewise.
12845         (adjust_last_stmt): Likewise.
12846         (handle_builtin_strchr): Likewise.
12847         (handle_builtin_strcpy): Likewise.
12848         (handle_builtin_stxncpy): Likewise.
12849         (handle_builtin_memcpy): Likewise.
12850         (handle_builtin_strcat): Likewise.
12851         (strlen_check_and_optimize_stmt): Likewise.
12852         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
12853         * tree-streamer-in.c: Likewise.
12854         * tree-streamer.c (record_common_node): Likewise.
12855         * tree.c (tree_code_size): Likewise.
12856         (wide_int_to_tree_1): Likewise.
12857         (type_contains_placeholder_1): Likewise.
12858         (build_common_tree_nodes): Likewise.
12859         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
12860         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
12861         (POINTER_BOUNDS_P): Likewise.
12862         (BOUNDED_TYPE_P): Likewise.
12863         (BOUNDED_P): Likewise.
12864         (CALL_WITH_BOUNDS_P): Likewise.
12865         (pointer_bounds_type_node): Likewise.
12866         * value-prof.c (gimple_ic): Likewise.
12867         * var-tracking.c (vt_add_function_parameters): Likewise.
12868         * varasm.c (make_decl_rtl): Likewise.
12869         (assemble_start_function): Likewise.
12870         (output_constant): Likewise.
12871         (maybe_assemble_visibility): Likewise.
12872         * varpool.c (ctor_for_folding): Likewise.
12873         * chkp-builtins.def: Remove.
12874         * ipa-chkp.c: Remove.
12875         * ipa-chkp.h: Remove.
12876         * rtl-chkp.c: Remove.
12877         * rtl-chkp.h: Remove.
12878         * tree-chkp-opt.c: Remove.
12879         * tree-chkp.c: Remove.
12880         * tree-chkp.h: Remove.
12882 2018-06-07  Carl Love  <cel@us.ibm.com>
12884         * config/rs6000/vsx.md (vextract_fp_from_shorth,
12885         vextract_fp_from_shortl): Add BE support.
12887 2018-06-07  Paul Koning  <ni1d@arrl.net>
12889         * compare-elim.c (try_merge_compare): Don't merge compare if
12890         address contains a side effect.
12891         (try_eliminate_compare): Likewise.
12893 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
12895         * config.gcc: Support "tremont".
12896         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
12897         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12898         PROCESSOR_TREMONT.
12899         * config/i386/i386.c (m_TREMONT): Define.
12900         (processor_target_table): Add "tremont".
12901         (PTA_TREMONT): Define.
12902         (ix86_lea_outperforms): Add TARGET_TREMONT.
12903         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
12904         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
12905         and M_INTEL_GOLDMONT_PLUS.
12906         (fold_builtin_cpu): Add "tremont".
12907         (ix86_add_stmt_cost): Add TARGET_TREMONT.
12908         (ix86_option_override_internal): Add "tremont".
12909         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
12910         (processor_type): Add PROCESSOR_TREMONT.
12911         * config/i386/x86-tune.def: Add m_TREMONT.
12912         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
12914 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12916         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
12917         symbol defined for msp430i* devices to be lower case.
12919 2018-06-07  Richard Biener  <rguenther@suse.de>
12921         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
12922         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
12923         Properly wrap signed arithmetic if overflow wraps.
12925 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
12927         PR tree-optimization/69615
12928         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
12929         of a cast from a same precision integral SSA_NAME in a bb dominated
12930         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
12931         cast to utype if rhs2 has already a compatible type.
12933 2018-06-07  Richard Biener  <rguenther@suse.de>
12935         PR tree-optimization/85935
12936         * graphite-scop-detection.c (find_params_in_bb): Analyze
12937         condition operands with respect to the correct loop.  Assert
12938         the analysis doesn't fail.
12940 2018-06-04  Carl Love  <cel@us.ibm.com>
12942         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
12943         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
12944         as it is slightly cheaper.
12945         (first_match_or_eos_index_<mode>):
12946         Calculate index using natural element order.
12947         (first_match_index_<mode>):
12948         Calculate index using natural element order.
12949         (first_match_or_eos_index_<mode>):
12950         Calculate index using natural order.
12951         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
12952         for BE and LE modes.
12953         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
12954         P9V_BUILTIN_VCLZLSBB_V16QI.
12955         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
12956         specific.
12958 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12960         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
12961         indentation and line wrap for many prototypes.  Add missing
12962         @smallexample directives around block of prototypes for vec_xl and
12963         vec_xst.
12965 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
12967         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
12968         track if we pass or return IEEE 128-bit floating point.
12969         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
12970         C++ mangling that is compatible with GCC 8.1.
12971         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
12972         (init_cumulative_args): Note if we pass or return IEEE 128-bit
12973         floating point types.
12974         (rs6000_function_arg_advance_1): Likewise.
12975         (rs6000_mangle_type): Optionally generate mangled names that match
12976         what GCC 8.1 generated for IEEE 128-bit floating point types.
12977         (rs6000_globalize_decl_name): If we have an external function that
12978         passes or returns IEEE 128-bit types, generate a weak reference
12979         from the mangled name used in GCC 8.1 to the current mangled
12980         name.
12981         (rs6000_init_builtins): Make __ibm128 use the long double type if
12982         long double is IBM extended double.  Make __float128 use the long
12983         double type if long double is IEEE 128-bit.
12985         PR target/85657
12986         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
12987         macro for __ibm128 built-in functions.
12988         (PACK_IF): Add __ibm128 pack/unpack functions.
12989         (UNPACK_IF): Likewise.
12990         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
12991         enable long double built-in functions if long double is IEEE
12992         128-bit floating point.
12993         (rs6000_invalid_builtin): Update long double built-in function
12994         error message.
12995         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
12996         functions, adjust the built-in function to use the long double
12997         built-in function if __ibm128 and long double are the same type.
12998         * doc/extend.texi (PowerPC builtins): Update documention for
12999         __builtin_{,un}pack_longdouble.  Add documentation for
13000         __builtin_{,un}pack_ibm128.
13002 2018-06-06  Jim Wilson  <jimw@sifive.com>
13004         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
13005         (struct machine_function): New field interrupt_mode.
13006         (riscv_handle_type_attribute): New function.  Add forward declaration.
13007         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
13008         (riscv_expand_epilogue): Check interrupt_mode field.
13009         (riscv_set_current_function): Check interrupt attribute args and
13010         set interrupt_mode field.
13011         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
13012         (riscv_sret, riscv_uret): New.
13013         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
13014         new arguments to interrupt attribute.
13016 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
13018         PR target/63177
13019         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
13020         Don't handle -mcpu=power8 if -mpower9-vector is also used.
13022 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13024         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
13025         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
13026         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13027         several redundant entries.
13029 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
13031         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
13032         type from "rtx" to "rtx_insn *".
13033         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
13034         for local "call_insn", removing cast.
13035         (ix86_expand_call): Likewise, introducing a "call_insn" local.
13037 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
13039         PR tree-optimization/86066
13040         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
13041         for BIT_INSERT_EXPR stores.
13043 2018-06-06  Richard Biener  <rguenther@suse.de>
13045         PR tree-optimization/86062
13046         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
13047         component refs ontop
13048         of to be offsetted base.
13050 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13052         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
13053         to be static and remove check on interrupt attribute name.
13055 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13057         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13058         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
13060 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
13062         PR target/79924
13063         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
13064         second argument.
13065         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
13066         Remove second argument, change how error is called.
13067         (aarch64_layout_arg): Remove second argument from
13068         aarch64_err_no_fpadvsimd call.
13069         (aarch64_init_cumulative_args): Ditto.
13070         (aarch64_gimplify_va_arg_expr): Ditto.
13071         * config/aarch64/aarch64.md (mov<mode>): Ditto.
13073 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
13075         * config/i386/i386.md (simple_return_indirect_internal): New expander.
13076         (*simple_return_indirect_internal<mode>): Rename from
13077         simple_return_indirect_internal.  Use W mode iterator.
13078         (rstorssp): New expander.
13079         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
13080         (clrssbsy): New expander.
13081         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
13083 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13085         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
13086         __typeof__.
13087         (cmse_check_pointed_object): Likewise.
13089 2018-06-05  Martin Liska  <mliska@suse.cz>
13091         PR gcov-profile/47618
13092         * doc/invoke.texi: Document how -fprofile-dir format
13093         is extended.
13095 2018-06-05  Richard Biener  <rguenther@suse.de>
13097         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
13098         removal pretend DOM info isn't available so we do not update
13099         it and only remove edges, not dominated blocks.  Actually free
13100         DOM info in case we removed something.  Remove unreachable blocks.
13101         (mfb_keep_latches): Work with either DOM info or marked backedges.
13102         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
13103         first.  Mark backedges if DOM info isn't available.
13104         (Re-)compute DOM info after cleanup_control_flow_pre.
13106 2018-06-05  Richard Biener  <rguenther@suse.de>
13108         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
13109         (locus_discrim_hasher::hash): Adjust.
13110         (locus_discrim_hasher::equal): Likewise.
13111         (next_discriminator_for_locus): Work on line directly.
13112         (same_line_p): Pass in expanded locus1 as well.
13113         (assign_discriminators): Avoid redundant location expansions.
13115 2018-06-05  Richard Biener  <rguenther@suse.de>
13117         PR tree-optimization/86046
13118         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
13119         if required after clearing TREE_ADDRESSABLE.
13121 2018-06-05  Richard Biener  <rguenther@suse.de>
13123         PR tree-optimization/86047
13124         * tree-ssa-loop.c (for_each_index): Glob handling of all
13125         decls and constants and really handle all of them.
13127 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13129         PR target/81497
13130         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
13131         qualifier_void_pointer and qualifier_const_void_pointer.
13132         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
13133         (arm_init_builtins): Handle the above.
13134         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
13135         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
13136         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
13137         void intrinsics.
13139 2018-06-05  Martin Liska  <mliska@suse.cz>
13141         * auto-profile.c (read_autofdo_file): Do not use
13142         gcov_ctr_summary struct.
13143         (afdo_callsite_hot_enough_for_early_inline): Likewise.
13144         * coverage.c (struct counts_entry): Likewise.
13145         (read_counts_file): Read just single summary entry.
13146         (get_coverage_counts): Use gcov_summary struct.
13147         * coverage.h (get_coverage_counts): Likewise.
13148         * gcov-dump.c (dump_working_sets): Likewise.
13149         (tag_summary): Dump just single summary.
13150         * gcov-io.c (gcov_write_summary): Write just histogram
13151         summary.
13152         (gcov_read_summary): Read just single summary.
13153         (compute_working_sets): Use gcov_summary struct.
13154         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
13155         of GCOV_COUNTERS_SUMMABLE.
13156         (GCOV_COUNTERS_SUMMABLE): Remove.
13157         (GCOV_FIRST_VALUE_COUNTER): Replace with
13158         GCOV_COUNTER_V_INTERVAL.
13159         (struct gcov_ctr_summary): Remove.
13160         (struct gcov_summary): Directly use fields of former
13161         gcov_ctr_summary.
13162         (compute_working_sets): Use gcov_summary struct.
13163         * gcov.c (read_count_file): Do not use ctrs fields.
13164         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
13165         struct.
13166         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
13167         struct.
13168         * profile.c: Likewise.
13169         * profile.h: Likewise.
13171 2018-06-05  Martin Liska  <mliska@suse.cz>
13173         PR gcov-profile/84846
13174         * gcov.c (output_lines): Print working directory only
13175         in intermediate format.
13177 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
13179         * config/s390/s390-builtin-types.def: Add void function type.
13180         * config/s390/s390-builtins.def: Use the function type for the
13181         tbeginc builtin.
13183 2018-06-04  Jim Wilson  <jimw@sifive.com>
13185         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
13186         to int.
13187         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
13188         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
13189         handle EH_RETURN_DATA_REGNO registers properly.
13190         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
13191         (riscv_expand_epilogue): Update comment.  Change argument name and
13192         type.  Update code to use new name and type.  Pass new args to
13193         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
13194         EXCEPTION_RETURN.
13195         * config/riscv/riscv.md (NORMAL_RETURN): New.
13196         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
13197         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
13198         (eh_return): Call gen_eh_return_internal and emit barrier.
13199         (eh_return_internal): Call riscv_expand_epilogue.
13201 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
13203         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
13204         bit_insertion field and declare can_be_merged_into method.
13205         (merged_store_group::can_be_merged_into): New method.
13206         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
13207         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
13208         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
13210 2018-06-04  Richard Biener  <rguenther@suse.de>
13212         PR tree-optimization/85955
13213         * builtins.c (fold_builtin_sincos): Convert pointers to
13214         destination to appropriate type before dereferencing.
13216 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
13218         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
13220 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
13222         * expr.c (expand_expr_real_1): Force the operand into memory if
13223         its TYPE_MODE is BLKmode and if there is no integer mode for
13224         the number of bits being extracted.
13226 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
13228         PR target/85832
13229         PR target/86036
13230         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13231         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
13233 2018-06-04  Richard Biener  <rguenther@suse.de>
13235         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
13236         (cleanup_tree_cfg_noloop): ... single caller.  Do
13237         start_recording_case_labels later.
13239 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
13241         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
13242         to _IMMINTRIN_H_INCLUDED.
13243         * config/i386/pconfigintrin.h: Ditto.
13244         * config/i386/waitpkgintrin.h: Ditto.
13245         * config/i386/immintrin.h: Add includes for sgxintrin.h,
13246         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
13247         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
13248         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
13249         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
13250         waitpkgintrin.h and cldemoteintrin.h.
13252 2018-06-04  Richard Biener  <rguenther@suse.de>
13254         PR tree-optimization/86038
13255         * tracer.c (find_best_successor): Check probability for
13256         being initialized, bail out if not.
13258 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
13260         PR target/86003
13261         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
13262         of bits to ignore when comparing architectures.
13264 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
13266         PR tree-optimization/69615
13267         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
13268         maximum or minimum of the type, try to merge it also as if
13269         range1 is + [-, x - 1] or + [x + 1, -].
13271         PR c++/86025
13272         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
13274 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
13276         PR tree-optimization/86034
13277         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
13278         the unsigned bitfield type in a bit insertion sequence if it does not
13279         have a larger precision than the bitfield size.
13280         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
13282 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
13284         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
13286 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
13288         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
13289         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
13290         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
13291         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
13293 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
13295         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
13296         Disable -fdelete-null-pointer-checks for ELF toolchain.
13298 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13299             Kito Cheng  <kito.cheng@gmail.com>
13301         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
13302         (nds32le-*-*, nds32be-*-*): Integrate checking process.
13303         (nds32*-*-*): Add glibc and uclibc conditions.
13304         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
13305         (TARGET_EXCEPT_UNWIND_INFO): Define.
13306         * config/nds32/elf.h: New file.
13307         * config/nds32/linux.h: New file.
13308         * config/nds32/nds32-elf.opt: New file.
13309         * config/nds32/nds32-linux.opt: New file.
13310         * config/nds32/nds32-fp-as-gp.c
13311         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
13312         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
13313         TARGET_LINUX_ABI.
13314         (nds32_asm_file_end): Ditto.
13315         (nds32_print_operand): Ditto.
13316         (nds32_insert_attributes): Ditto.
13317         (nds32_init_libfuncs): New function.
13318         (TARGET_HAVE_TLS): Define.
13319         (TARGET_INIT_LIBFUNCS): Define.
13320         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
13321         spec content.
13322         (TARGET_ELF): Apply different mcmodel setting.
13323         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
13324         been migrated into elf.h and linux.h files.
13325         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
13326         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
13327         (mcmodel): The content has been migrated into nds32-elf.opt and
13328         nds32-linux.opt files.
13329         * config/nds32/t-elf: New file.
13330         * config/nds32/t-linux: New file.
13332 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13333             Shiva Chen  <shiva0217@gmail.com>
13335         * config/nds32/constants.md (unspec_volatile_element): Add
13336         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
13337         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
13338         optimization.
13339         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
13340         (make_pass_nds32_fp_as_gp): Declare.
13341         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
13342         optmization pass.
13343         (nds32_asm_function_end_prologue): Remove unused asm output.
13344         (nds32_asm_function_begin_epilogue): Remove unused asm output.
13345         (nds32_asm_file_start): Output necessary fp_as_gp information.
13346         (nds32_option_override): Adjust register usage.
13347         (nds32_expand_prologue): Consider fp_as_gp situation.
13348         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
13349         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
13350         (epilogue): Ditto.
13351         (return): Ditto.
13352         (simple_return): Ditto.
13353         (omit_fp_begin): Output special directive for fp_as_gp.
13354         (omit_fp_end): Output special directive for fp_as_gp.
13355         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
13356         mforbid-fp-as-gp): New options.
13358 2018-06-01  Mark Wielaard  <mark@klomp.org>
13360         * dwarf2out.c (dwarf2out_finish): Remove generation of
13361         DW_AT_loclists_base.
13363 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
13365         * gimple-ssa-store-merging.c: Include gimple-fold.h.
13366         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
13367         (struct merged_store_group): Add bit_insertion field.
13368         (dump_char_array): Use standard hexadecimal format.
13369         (merged_store_group::merged_store_group): Set bit_insertion to false.
13370         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
13371         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
13372         also print the mask in the dump file.
13373         (pass_store_merging::gate): Minor tweak.
13374         (imm_store_chain_info::coalesce_immediate): Fix wrong association
13375         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
13376         stores with INTEGER_CST stores.
13377         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
13378         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
13379         and use it throughout.  Generate bit insertion sequences if need be.
13380         (pass_store_merging::process_store): Remove redundant condition.
13381         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
13383 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
13385         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
13386         the 128-bit floating point types.  Fix function comment.
13388 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13390         * config/aarch64/aarch64-simd.md
13391         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
13392         mnemonics.
13393         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
13394         mnemonics.
13396 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
13398         PR tree-optimization/85989
13399         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
13400         variable.
13401         (backprop::intersect_uses): Check it when deciding whether this
13402         is a backedge reference.
13403         (backprop::process_block): Add each phi to m_visited_phis
13404         after visiting it, then clear it at the end.
13406 2018-06-01  Richard Biener  <rguenther@suse.de>
13408         * tree-vectorizer.h (vect_dr_stmt): New function.
13409         (vect_get_load_cost): Adjust.
13410         (vect_get_store_cost): Likewise.
13411         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
13412         Use vect_dr_stmt instead of DR_SMTT.
13413         (vect_record_base_alignments): Likewise.
13414         (vect_calculate_target_alignment): Likewise.
13415         (vect_compute_data_ref_alignment): Likewise and make static.
13416         (vect_update_misalignment_for_peel): Likewise.
13417         (vect_verify_datarefs_alignment): Likewise.
13418         (vector_alignment_reachable_p): Likewise.
13419         (vect_get_data_access_cost): Likewise.  Pass down
13420         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
13421         (vect_get_peeling_costs_all_drs): Likewise.
13422         (vect_peeling_hash_get_lowest_cost): Likewise.
13423         (vect_enhance_data_refs_alignment): Likewise.
13424         (vect_find_same_alignment_drs): Likewise.
13425         (vect_analyze_data_refs_alignment): Likewise.
13426         (vect_analyze_group_access_1): Likewise.
13427         (vect_analyze_group_access): Likewise.
13428         (vect_analyze_data_ref_access): Likewise.
13429         (vect_analyze_data_ref_accesses): Likewise.
13430         (vect_vfa_segment_size): Likewise.
13431         (vect_small_gap_p): Likewise.
13432         (vectorizable_with_step_bound_p): Likewise.
13433         (vect_prune_runtime_alias_test_list): Likewise.
13434         (vect_analyze_data_refs): Likewise.
13435         (vect_supportable_dr_alignment): Likewise.
13436         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13437         (vect_gen_prolog_loop_niters): Likewise.
13438         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13439         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
13440         modify DR_STMT.
13441         (vect_recog_mask_conversion_pattern): Likewise.
13442         (vect_try_gather_scatter_pattern): Likewise.
13443         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
13444         to vect_get_store_cost.
13445         (vect_get_store_cost): Get stmt_info instead of DR.
13446         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
13447         (vect_get_load_cost): Get stmt_info instead of DR.
13449 2018-06-01  Richard Biener  <rguenther@suse.de>
13451         PR middle-end/86017
13452         * gimple-fold.c (var_decl_component_p): Also allow offsetted
13453         vars wrapped in MEM_REFs.
13455 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
13457         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13458         Fix subreg tests so that we only return a choice between
13459         GENERAL_REGS and FP_REGS if the original classes included both.
13461 2018-06-01  Richard Biener  <rguenther@suse.de>
13463         PR ipa/85960
13464         * tree-ssa-structalias.c (get_function_part_constraint):
13465         Handle NULL fi->decl.
13466         (find_func_aliases_for_call): Properly handle indirect
13467         fi from direct call.
13468         (find_func_clobbers): Likewise.
13469         (ipa_pta_execute): Likewise.
13470         (create_variable_info_for): For functions that are ifunc_resolver
13471         resolve to a varinfo that contains the result of the resolver call.
13472         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
13473         aliases.
13475 2018-05-31  Michael Collison  <michael.collison@arm.com>
13477         * config/aarch64/aarch64.md:
13478         (*fix_to_zero_extenddfdi2): New pattern.
13479         * gcc.target/aarch64/fix_extend1.c: New testcase.
13481 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
13483         PR middle-end/78809
13484         PR middle-end/83026
13485         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
13486         and BUILT_IN_STRNCMP_EQ.
13487         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
13488         BUILT_IN_STRNCMP_EQ.
13489         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
13490         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13491         (gimple_fold_builtin): Likewise.
13492         * tree-ssa-strlen.c (compute_string_length): New function.
13493         (determine_min_obsize): New function.
13494         (handle_builtin_string_cmp): New function to handle calls to
13495         string compare functions.
13496         (strlen_optimize_stmt): Add handling to builtin string compare
13497         calls.
13498         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
13499         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13500         * tree.c (build_common_builtin_nodes): Add new defines of
13501         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
13503 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
13505         PR target/85984
13506         * bb-reorder.c (pass_partition_blocks::gate): Return false for
13507         functions with naked attribute.
13509 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
13511         * config/i386/sse.md (avx_vec_concat<mode>):
13512         Substitute concat_tg_mode mode attribute with xtg_mode.
13513         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
13514         (concat_tg_mode): Remove mode attribute.
13516 2018-05-31  Martin Sebor  <msebor@redhat.com>
13518         PR c/82063
13519         * calls.c (alloc_max_size): Correct a logic error/typo.
13520         Treat excessive arguments as infinite.  Warn for invalid arguments.
13521         * doc/invoke.texi (-Walloc-size-larger-than): Update.
13523 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
13525         PR target/85829
13526         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
13527         and movx for Haswell.
13529 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
13530             Cesar Philippidis  <cesar@codesourcery.com>
13532         PR middle-end/85879
13533         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
13534         when emitting error on private/firstprivate reductions.
13535         * omp-low.c (lower_omp_target): Avoid reference-type processing
13536         on pointers for firstprivate clause.
13538 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
13540         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
13541         (st1x2): Likewise.
13542         (st1x3): Likewise.
13543         * config/aarch64/aarch64-simd.md
13544         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
13545         (aarch64_ld1_x3_<mode>): Likewise
13546         (aarch64_st1x2<VALLDIF:mode>): Likewise
13547         (aarch64_st1_x2_<mode>): Likewise
13548         (aarch64_st1x3<VALLDIF:mode>): Likewise
13549         (aarch64_st1_x3_<mode>): Likewise
13550         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
13551         (vld1_s8_x3): Likewise.
13552         (vld1_u16_x3): Likewise.
13553         (vld1_s16_x3): Likewise.
13554         (vld1_u32_x3): Likewise.
13555         (vld1_s32_x3): Likewise.
13556         (vld1_u64_x3): Likewise.
13557         (vld1_s64_x3): Likewise.
13558         (vld1_f16_x3): Likewise.
13559         (vld1_f32_x3): Likewise.
13560         (vld1_f64_x3): Likewise.
13561         (vld1_p8_x3): Likewise.
13562         (vld1_p16_x3): Likewise.
13563         (vld1_p64_x3): Likewise.
13564         (vld1q_u8_x3): Likewise.
13565         (vld1q_s8_x3): Likewise.
13566         (vld1q_u16_x3): Likewise.
13567         (vld1q_s16_x3): Likewise.
13568         (vld1q_u32_x3): Likewise.
13569         (vld1q_s32_x3): Likewise.
13570         (vld1q_u64_x3): Likewise.
13571         (vld1q_s64_x3): Likewise.
13572         (vld1q_f16_x3): Likewise.
13573         (vld1q_f32_x3): Likewise.
13574         (vld1q_f64_x3): Likewise.
13575         (vld1q_p8_x3): Likewise.
13576         (vld1q_p16_x3): Likewise.
13577         (vld1q_p64_x3): Likewise.
13578         (vst1_s64_x2): Likewise.
13579         (vst1_u64_x2): Likewise.
13580         (vst1_f64_x2): Likewise.
13581         (vst1_s8_x2): Likewise.
13582         (vst1_p8_x2): Likewise.
13583         (vst1_s16_x2): Likewise.
13584         (vst1_p16_x2): Likewise.
13585         (vst1_s32_x2): Likewise.
13586         (vst1_u8_x2): Likewise.
13587         (vst1_u16_x2): Likewise.
13588         (vst1_u32_x2): Likewise.
13589         (vst1_f16_x2): Likewise.
13590         (vst1_f32_x2): Likewise.
13591         (vst1_p64_x2): Likewise.
13592         (vst1q_s8_x2): Likewise.
13593         (vst1q_p8_x2): Likewise.
13594         (vst1q_s16_x2): Likewise.
13595         (vst1q_p16_x2): Likewise.
13596         (vst1q_s32_x2): Likewise.
13597         (vst1q_s64_x2): Likewise.
13598         (vst1q_u8_x2): Likewise.
13599         (vst1q_u16_x2): Likewise.
13600         (vst1q_u32_x2): Likewise.
13601         (vst1q_u64_x2): Likewise.
13602         (vst1q_f16_x2): Likewise.
13603         (vst1q_f32_x2): Likewise.
13604         (vst1q_f64_x2): Likewise.
13605         (vst1q_p64_x2): Likewise.
13606         (vst1_s64_x3): Likewise.
13607         (vst1_u64_x3): Likewise.
13608         (vst1_f64_x3): Likewise.
13609         (vst1_s8_x3): Likewise.
13610         (vst1_p8_x3): Likewise.
13611         (vst1_s16_x3): Likewise.
13612         (vst1_p16_x3): Likewise.
13613         (vst1_s32_x3): Likewise.
13614         (vst1_u8_x3): Likewise.
13615         (vst1_u16_x3): Likewise.
13616         (vst1_u32_x3): Likewise.
13617         (vst1_f16_x3): Likewise.
13618         (vst1_f32_x3): Likewise.
13619         (vst1_p64_x3): Likewise.
13620         (vst1q_s8_x3): Likewise.
13621         (vst1q_p8_x3): Likewise.
13622         (vst1q_s16_x3): Likewise.
13623         (vst1q_p16_x3): Likewise.
13624         (vst1q_s32_x3): Likewise.
13625         (vst1q_s64_x3): Likewise.
13626         (vst1q_u8_x3): Likewise.
13627         (vst1q_u16_x3): Likewise.
13628         (vst1q_u32_x3): Likewise.
13629         (vst1q_u64_x3): Likewise.
13630         (vst1q_f16_x3): Likewise.
13631         (vst1q_f32_x3): Likewise.
13632         (vst1q_f64_x3): Likewise.
13633         (vst1q_p64_x3): Likewise.
13635 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13637         * config/msp430/msp430.c (msp430_output_labelref): Prepend
13638         user_label_prefix to name.
13640         * tree-core.h: Update comment about the format of NAME string
13641         passed to handler in attribute_spec.
13643         * config/msp430/msp430.md: Remove erroneous subreg expression from
13644         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
13645         zero_extend{q,h}isi2.
13647 2018-05-30  Borislav Petkov  <bp@suse.de>
13649         * doc/extend.texi: Document some architecture specific
13650         constraints and sort entries.
13652 2018-05-30  Martin Sebor  <msebor@redhat.com>
13654         PR middle-end/85369
13655         * builtins.c (expand_builtin_stpcpy_1): New function.
13656         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
13657         only if the former succeeds.
13659 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
13661         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
13662         in saphira.
13664 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13666         * doc/invoke.texi (-flinker-output): Document
13668 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13670         * passes.c (ipa_write_summaries): Only modify statements if body
13671         is in memory.
13672         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
13673         incrementally linking.
13674         (ipa_passes): Likewise.
13675         * lto-cgraph.c (lto_output_node): When incrementally linking do not
13676         pass down resolution info.
13677         * common.opt (flag_incremental_link): Update info.
13678         * gcc.c (plugin specs): Turn flinker-output=* to
13679         -plugin-opt=-linker-output-known
13680         * toplev.c (compile_file): Also cut compilation when doing incremental
13681         link.
13682         * flag-types. (enum lto_partition_model): Add
13683         LTO_LINKER_OUTPUT_NOLTOREL.
13684         (invoke.texi): Add -flinker-output docs.
13685         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
13686         link same way as WPA; do not stream in dead initializers.
13688         * dwarf2out.c (dwarf2out_die_ref_for_decl,
13689         darf2out_register_external_decl): Support incremental link.
13691 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13693         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
13695 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13697         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
13698         it down to simple_object_copy_lto_debug_sections.
13699         (run_gcc): Determine incremental LTO link time and configure
13700         lto1 into non-wpa mode, disable renaming of debug sections.
13702 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13704         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13705         descriptions of various incorrectly documented functions.
13707 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13709         Revert:
13710         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13711         address check not strict.
13713 2018-05-30  Richard Biener  <rguenther@suse.de>
13715         PR tree-optimization/85964
13716         * tracer.c (better_p): Drop initialized count check, we only
13717         call the function with initialized counts now.
13718         (find_best_successor): Do find a best edge if one
13719         has uninitialized count.
13720         (find_best_predecessor): Likewise.  Do BB frequency check only
13721         if count is initialized.
13723 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
13725         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
13726         (aarch64_ldrstr_offset_compare): New.
13727         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
13728         load/store orderings.
13729         (aarch64_gen_adjusted_ldpstp): Likewise.
13731 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
13733         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13734         Check for subset of GENERAL_REGS and FP_REGS.
13735         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
13736         r=w alternative.
13738 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
13740         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
13741         and wi::to_poly_offset.  Add the current offset and then check
13742         whether the sum fits, rather than using an unchecked addition of
13743         a checked term.  Check for a shwi rather than a uhwi.
13744         * expr.c (get_bit_range): Use tree_to_poly_uint64.
13745         (store_constructor): Use poly_int_tree_p.
13746         (expand_expr_real_1): Likewise.
13747         * function.c (assign_temp): Likewise.
13748         * fold-const.c (const_binop): Use poly_int_tree_p and
13749         wi::to_poly_offset.
13750         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
13751         division.
13752         * ipa-icf-gimple.c (func_checker::compare_operand): Use
13753         to_poly_offset for MEM offsets.
13754         * ipa-icf.c (sem_variable::equals): Likewise.
13755         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
13756         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
13757         wi::to_poly_offset for BIT_FIELD_REF offsets.
13758         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
13759         wi::to_poly_offset.
13760         * var-tracking.c (emit_note_insn_var_location): Use
13761         tree_to_poly_uint64.
13763 2018-05-29  Jim Wilson  <jimw@sifive.com>
13765         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
13767 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
13769         PR target/85950
13770         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
13771         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
13772         sequence.
13773         (sse4_1_round<mode>2): Use nonimmediate_operand
13774         for operand 1 predicate.
13776 2018-05-29  Martin Sebor  <msebor@redhat.com>
13777             Richard Biener  <rguenther@suse.de>
13779         PR testsuite/85888
13780         * calls.c (get_size_range): Call determine_value_range instead
13781         of get_value_range..
13782         * tree-vrp.h (determine_value_range): Declared new function.
13783         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
13785 2018-05-29  Richard Biener  <rguenther@suse.de>
13787         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
13788         sure to use non-pattern stmts for get_earlier_stmt arguments.
13789         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
13790         called on pattern stmts.
13791         (get_later_stmt): Likewise.
13793 2018-05-29  Martin Liska  <mliska@suse.cz>
13795         PR gcov-profile/85759
13796         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
13797         env variables.
13799 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
13801         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
13802         VEC_UNPACK_*_EXPR.
13803         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
13804         VEC_PACK_*_EXPR.
13806         PR target/85918
13807         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13808         VEC_PACK_FLOAT_EXPR): New tree codes.
13809         * tree-pretty-print.c (op_code_prio): Handle
13810         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13811         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13812         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13813         * tree-inline.c (estimate_operator_cost): Likewise.
13814         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
13815         * fold-const.c (const_binop): Likewise.
13816         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
13817         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13818         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13819         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
13820         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13821         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13822         * expr.c (expand_expr_real_2): Likewise.
13823         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
13824         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
13825         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
13826         optabs.
13827         * optabs.c (expand_widen_pattern_expr): For
13828         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
13829         sign from result type rather than operand's type.
13830         (expand_binop_directly): For vec_packu_float_optab and
13831         vec_packs_float_optab allow result type to be different from operand's
13832         type.
13833         * optabs-tree.c (optab_for_tree_code): Handle
13834         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13835         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
13836         * tree-vect-generic.c (expand_vector_operations_1):  Handle
13837         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13838         VEC_PACK_FLOAT_EXPR.
13839         * tree-vect-stmts.c (supportable_widening_operation): Handle
13840         FIX_TRUNC_EXPR.
13841         (supportable_narrowing_operation): Handle FLOAT_EXPR.
13842         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
13843         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
13844         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
13845         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
13846         mode attributes.
13847         (vec_pack<floatprefix>_float_<mode>): New expander.
13848         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
13849         attributes.
13850         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
13851         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
13852         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
13853         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
13854         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
13855         Document.
13856         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
13857         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
13858         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13859         VEC_PACK_FLOAT_EXPR): Document.
13861 2018-05-29  Richard Biener  <rguenther@suse.de>
13863         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
13864         member.
13865         (stmt_vec_info_vec): Make pointer.
13866         (init_stmt_vec_info_vec): Remove.
13867         (free_stmt_vec_info_vec): Likewise.
13868         (set_stmt_vec_info_vec): New function.
13869         (free_stmt_vec_infos): Likewise.
13870         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
13871         (set_vinfo_for_stmt): Likewise.
13872         (get_earlier_stmt): Likewise.
13873         (get_later_stmt): Likewise.
13874         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
13875         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
13876         (vec_info::~vec_info): Free stmt_vec_infos.
13877         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
13878         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
13879         (pass_slp_vectorize::execute): Likewise.
13880         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
13881         (free_stmt_vec_info_vec): Likewise.
13882         (set_stmt_vec_info_vec): New function.
13883         (free_stmt_vec_infos): Likewise.
13884         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
13885         the global stmt_vec_info_vec.
13886         * tree-parloops.c (gather_scalar_reductions): Use
13887         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
13888         vector.
13890 2018-05-29  Richard Biener  <rguenther@suse.de>
13892         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
13894 2018-05-29  Martin Liska  <mliska@suse.cz>
13895             David Malcolm  <dmalcolm@redhat.com>
13897         * vec.c (test_reverse): New.
13898         (vec_c_tests): Add new test.
13899         * vec.h (vl_ptr>::reverse): New function.
13901 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
13903         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
13905         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
13906         and later.
13908 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13910         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
13912 2018-05-28  Richard Biener  <rguenther@suse.de>
13914         PR tree-optimization/85933
13915         * tree-vect-data-refs.c (vect_record_base_alignments): Only
13916         look at stmts marked as vectorizable.
13918 2018-05-28  Richard Biener  <rguenther@suse.de>
13920         PR tree-optimization/85934
13921         * tree-vect-generic.c (expand_vector_operations_1): Hoist
13922         vector boolean check before scalar optimization.
13924 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
13926         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
13927         for armv5te.
13929 2018-05-28  Mark Wielaard  <mark@klomp.org>
13931         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
13932         if it is an expression containing a minus sign.
13934 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
13936         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
13938 2018-05-27  Paul Koning  <ni1d@arrl.net>
13940         * config/pdp11/pdp11.md (truncsihi2): Remove.
13942 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
13943             Chung-Ju Wu  <jasonwucj@gmail.com>
13945         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
13946         implementation.
13947         (unaligned_store_dw): Ditto.
13948         * config/nds32/nds32-memory-manipulation.c
13949         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
13950         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
13951         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
13952         (emit_setmem_word_loop): Rename to ...
13953         (emit_setmem_doubleword_loop): ... this.
13954         (nds32_gen_dup_4_byte_to_word_value): New function.
13955         (nds32_gen_dup_8_byte_to_double_word_value): New function.
13956         (nds32_expand_setmem_loop): Refine implementation.
13957         (nds32_expand_setmem_loop_v3m): Ditto.
13958         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
13959         pattern.
13961 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13963         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
13965 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13967         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
13968         (nds32_init_machine_status): Initialize machine->attr_naked_p and
13969         machine->attr_no_prologue_p.
13970         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
13971         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
13972         (nds32_expand_epilogue): Consider attr_naked_p.
13973         (nds32_expand_epilogue_v3pop): Likewise.
13974         (nds32_can_use_return_insn): Likewise.
13975         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
13976         attr_no_prologue_p fields.
13977         * config/nds32/nds32.opt (mret-in-naked-func): New option.
13979 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
13981         PR target/85918
13982         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
13983         attributes.
13984         * config/i386/sse.md
13985         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
13986         Rename to ...
13987         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
13988         ... this.
13989         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
13990         Rename to ...
13991         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
13992         ... this.
13993         (*<floatsuffix>floatv2div2sf2): Rename to ...
13994         (*float<floatunssuffix>v2div2sf2): ... this.
13995         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
13996         (float<floatunssuffix>v2div2sf2_mask): ... this.
13997         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
13998         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
13999         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
14000         to ...
14001         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
14002         ... this.
14003         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
14004         Rename to ...
14005         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
14006         ... this.
14007         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
14008         Rename to ...
14009         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
14010         ... this.
14011         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
14012         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
14013         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
14014         gen_ufix_truncv8dfv8si2.
14015         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
14016         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
14017         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
14018         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
14019         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
14020         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
14021         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
14022         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
14024 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
14026         PR target/85900
14027         PR target/85345
14028         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
14030 2018-05-25  Jim Wilson  <jimw@sifive.com>
14032         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
14033         * config/riscv/riscv.c (struct machine_function): Add
14034         interrupt_handler_p and attribute_checked_p fields.
14035         (riscv_attribute_table): Add interrupt.
14036         (riscv_interrupt_type_p): New.
14037         (riscv_save_reg_p): Save extra regs for interrupt handler.
14038         (riscv_use_save_libcall): Return false  for interrupt handler.
14039         (riscv_first_stack_step): Add forward declaration.
14040         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
14041         for interrupt handler with large frame.  Use it for saved reg list.
14042         (riscv_expand_prologue): Move flag_stack_usage_info support to
14043         eliminate duplication.
14044         (riscv_expand_epilogue): Generate mret for interrupt handler.
14045         (riscv_epilogue_uses): New.
14046         (riscv_can_use_return_insn): Return false for interrupt handler.
14047         (riscv_function_ok_for_sibcall): Likewise.
14048         (riscv_set_current_function): Add interrupt handler support.
14049         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
14050         * config/riscv/riscv.md (UNSPECV_MRET): New.
14051         (GP_REGNUM): New.
14052         (riscv_frflags, riscv_fsflags): Use tab after opcode.
14053         (riscv_mret): New.
14054         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
14056 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
14058         PR tree-optimization/85712
14059         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
14060         this candidate has already been replaced in-situ by a copy.
14062 2018-05-25  Jason Merrill  <jason@redhat.com>
14064         PR c++/80485 - inline function non-zero address.
14065         * symtab.c (nonzero_address): Check DECL_COMDAT.
14067 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
14069         PR target/83628
14070         * config/alpha/alpha.md (ashlsi3): New insn pattern.
14071         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
14072         extension of SImode operation.  Use const123_operand predicate.
14073         (*saddsi_1): Remove.
14074         (*saddl_se_1): Ditto.
14075         (*ssubsi_1): Ditto.
14076         (*ssubl_se_1): Ditto.
14077         * config/alpha/predicates.md (const123_operand): New predicate.
14078         * config/alpha/constraints.md (P): Use IN_RANGE.
14080 2018-05-25  Richard Biener  <rguenther@suse.de>
14082         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
14083         defaulted to true.
14084         (ref_maybe_used_by_stmt_p): Likewise.
14085         (stmt_may_clobber_ref_p): Likewise.
14086         (stmt_may_clobber_ref_p_1): Likewise.
14087         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
14088         and pass it along.
14089         (ref_maybe_used_by_stmt_p): Likewise.
14090         (stmt_may_clobber_ref_p): Likewise.
14091         (stmt_may_clobber_ref_p_1): Likewise.
14092         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
14093         the alias oracle to disambiguate DRs with stmts DR analysis
14094         couldn't handle.
14095         (vect_analyze_data_refs): Do not give up on not analyzable
14096         DRs for BB vectorization.  Remove code truncating the dataref
14097         vector.
14099 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
14101         PR target/85832
14102         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14103         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
14104         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
14106 2018-05-25  Richard Biener  <rguenther@suse.de>
14108         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
14109         function, combining stmt data ref gathering and fatal analysis
14110         parts.
14111         (vect_analyze_data_refs): Remove now redudnant code and simplify.
14112         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
14113         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
14114         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
14115         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
14117 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
14119         PR tree-optimization/85720
14120         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
14121         SCC if all partitions are builtins.
14122         (version_loop_by_alias_check): New parameter.  Generate cancelable
14123         runtime alias check if all partitions are builtins.
14124         (distribute_loop): Update call to above function.
14126 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
14128         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
14129         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
14130         (parm_default_def_partition_arg): Ditto.
14131         (set_parm_default_def_partition): Ditto.
14132         (get_parm_default_def_partitions): Ditto and make it static.
14133         (get_undefined_value_partitions): Ditto and make it static.
14134         (remove_ssa_form): Refactor call to init_var_map here.
14135         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
14136         computation for loop region.
14137         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
14138         (register_default_def): Delete.
14139         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
14140         (parm_default_def_partition_arg): Ditto.
14141         (set_parm_default_def_partition): Ditto.
14142         (get_parm_default_def_partitions): Ditto and make it static.
14143         (get_undefined_value_partitions): Ditto and make it static.
14144         (coalesce_with_default, coalesce_with_default): Update comment.
14145         (create_coalesce_list_for_region): New func factored out from
14146         create_outofssa_var_map.
14147         (populate_coalesce_list_for_outofssa): New func factored out from
14148         create_outofssa_var_map and coalesce_ssa_name.
14149         (create_outofssa_var_map): Delete.
14150         (coalesce_ssa_name): Refactor to support live range computation.
14151         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
14152         (get_parm_default_def_partitions): Delete.
14153         (get_undefined_value_partitions): Ditto.
14154         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
14155         computation for loop region.
14156         (new_tree_live_info, loe_visit_block): Ditto.
14157         (live_worklist, set_var_live_on_entry): Ditto.
14158         (calculate_live_on_exit, verify_live_on_entry): Ditto.
14159         * tree-ssa-live.h (struct _var_map): New fields.
14160         (init_var_map): Change decl.
14161         (region_contains_p): New.
14163 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
14165         * tree-ssa-live.h (live_merge_and_clear): Delete.
14167 2018-05-25  Richard Biener  <rguenther@suse.de>
14169         PR c++/85912
14170         * tree-dump.c (dequeue_and_dump): Remove access to removed
14171         operand 2 of a SWITCH_EXPR.
14173 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14175         * doc/sourcebuild.texi (vect_double_cond_arith): Include
14176         multiplication and division.
14177         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
14178         (cond_udiv@var{m}, cond_umod@var{m}): Document.
14179         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
14180         (cond_udiv_optab, cond_umod_optab): New optabs.
14181         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
14182         (IFN_COND_RDIV): New internal functions.
14183         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
14184         TRUNC_MOD_EXPR and RDIV_EXPR.
14185         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
14186         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
14187         New unspecs.
14188         (SVE_INT_BINARY): Include mult.
14189         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
14190         (optab, sve_int_op): Handle mult.
14191         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
14192         UNSPEC_COND_DIV.
14193         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
14194         for SVE_INT_BINARY_SD.
14196 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14198         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
14199         (optab, sve_int_op): Handle div and udiv.
14200         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
14201         for SVE_INT_BINARY_SD.
14202         (*<optab><mode>3): New insn for the same.
14204 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14206         * tree-vect-patterns.c: Include predict.h.
14207         (vect_recog_divmod_pattern): Restrict check for division support
14208         to when optimizing for size.
14210 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14212         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
14213         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
14214         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
14215         (gimple_match_op::set_op): Likewise.
14216         (gimple_resimplify4): Declare.
14217         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
14218         (expr::gen_transform): Likewise.
14219         (decision_tree::gen): Generate a simplification routine for 4 operands.
14220         * gimple-match-head.c (gimple_simplify): Add an overload for
14221         4 operands.  In the top-level function, handle up to 4 call
14222         arguments and call gimple_resimplify4.
14223         (gimple_resimplify4): New function.
14224         (build_call_internal): Pass a fourth operand.
14225         (maybe_push_to_seq): Likewise.
14226         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
14227         Fold VEC_COND_EXPRs of an operation and a default value into
14228         an IFN_COND_* function if possible.
14229         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
14230         New unspecs.
14231         (SVE_COND_FP_BINARY): Include them.
14232         (optab, sve_fp_op): Handle them.
14233         (SVE_INT_BINARY_REV): New code iterator.
14234         (SVE_COND_FP_BINARY_REV): New int iterator.
14235         (commutative): New int attribute.
14236         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
14237         Declare.
14238         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
14239         function.
14240         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
14241         (*cond_<optab><mode>): New patterns for reversed operands.
14243 2018-05-25  Richard Biener  <rguenther@suse.de>
14245         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
14246         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
14247         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
14248         (STMT_VINFO_GROUPED_ACCESS): Adjust.
14249         * tree-vect-data-refs.c (everywhere): Adjust users.
14250         * tree-vect-loop.c (everywhere): Likewise.
14251         * tree-vect-slp.c (everywhere): Likewise.
14252         * tree-vect-stmts.c (everywhere): Likewise.
14253         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
14255 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14257         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
14258         Rename to...
14259         (gcc_cv_as_section_exclude): ... this.
14260         Try Solaris as #exclude syntax.
14261         * configure: Regenerate.
14262         * config.in: Regenerate.
14263         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
14264         SECTION_EXCLUDE.
14265         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
14266         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
14268         * varasm.c (default_elf_asm_named_section): Don't check if
14269         HAVE_GAS_SECTION_EXCLUDE is defined.
14271 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14273         * doc/md.texi: Update the documentation of the cond_* optabs
14274         to mention the new final operand.  Fix GET_MODE_NUNITS call.
14275         Describe the scalar case too.
14276         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
14277         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
14278         instead of 2.
14279         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
14280         (get_conditional_internal_fn): Update comment.
14281         * tree-vect-loop.c (vectorizable_reduction): Pass the original
14282         accumulator value as a final argument to conditional functions.
14283         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
14284         a define_expand and add an "else" operand.  Assert for now that
14285         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
14286         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
14287         (*cond_<optab><mode>): New patterns.
14288         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
14289         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
14290         (UNSPEC_COND_EOR): Delete.
14291         (optab): Remove associated mappings.
14292         (SVE_INT_BINARY): New code iterator.
14293         (sve_int_op): Remove int attribute and add "minus" to the code
14294         attribute.
14295         (SVE_COND_INT_OP): Delete.
14296         (SVE_COND_FP_OP): Rename to...
14297         (SVE_COND_FP_BINARY): ...this.
14299 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14301         * optabs.c (can_reuse_operands_p): New function.
14302         (maybe_legitimize_operands): Try to reuse the results for
14303         earlier operands.
14305 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
14307         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
14308         Add {q} suffix to insn mnemonic.
14310 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14312         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
14313         (msp430_warn_func_return): New.
14315 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
14317         * fold-const.c (tree_nonzero_bits): New function.
14318         * fold-const.h (tree_nonzero_bits): Likewise.
14319         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
14320         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
14322 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
14324         PR target/85900
14325         PR target/85345
14326         * varasm.c (assemble_alias): Check ifunc_resolver only on
14327         FUNCTION_DECL.
14329 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
14331         PR target/85903
14332         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
14333         when memory input operand is handled.
14335 2018-05-24  Luis Machado  <luis.machado@linaro.org>
14337         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
14338         global.
14339         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
14341 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
14343         * match.pd: Delay FMA folds until after vectorization.
14345 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14347         PR target/83009
14348         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14349         address check not strict.
14351 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
14353         * gimple-match.h (gimple_match_op): New class.
14354         (mprts_hook): Replace parameters with a gimple_match_op *.
14355         (maybe_build_generic_op): Likewise.
14356         (gimple_simplified_result_is_gimple_val): Replace parameters with
14357         a const gimple_match_op *.
14358         (gimple_simplify): Replace code_helper * and tree * parameters with
14359         a gimple_match_op * parameter.
14360         (gimple_resimplify1): Replace code_helper *, tree and tree *
14361         parameters with a gimple_match_op * parameter.
14362         (gimple_resimplify2): Likewise.
14363         (gimple_resimplify3): Likewise.
14364         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
14365         parameters with a gimple_match_op * parameter.
14366         * gimple-match-head.c (gimple_simplify): Change prototypes of
14367         auto-generated functions to take a gimple_match_op * instead of
14368         separate code_helper * and tree * parameters.  Make the same
14369         change in the top-level overload and update calls to the
14370         gimple_resimplify routines.  Update calls to the auto-generated
14371         functions and to maybe_push_res_to_seq in the publicly-facing
14372         operation-specific gimple_simplify overloads.
14373         (gimple_match_op::MAX_NUM_OPS): Define.
14374         (gimple_resimplify1): Replace rcode and ops with a single res_op
14375         parameter.  Update call to gimple_simplify.
14376         (gimple_resimplify2): Likewise.
14377         (gimple_resimplify3): Likewise.
14378         (mprts_hook): Replace parameters with a gimple_match_op *.
14379         (maybe_build_generic_op): Likewise.
14380         (build_call_internal): Replace type, nargs and ops with
14381         a gimple_match_op *.
14382         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
14383         with a single gimple_match_op *.  Update calls to mprts_hook,
14384         build_call_internal and gimple_simplified_result_is_gimple_val.
14385         Factor out code that is common to the tree_code and combined_fn cases.
14386         * genmatch.c (expr::gen_transform): Replace tem_code and
14387         tem_ops with a gimple_match_op called tem_op.  Update calls
14388         to the gimple_resimplify functions and maybe_push_res_to_seq.
14389         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
14390         res_ops.  Update call to the gimple_resimplify functions.
14391         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
14392         (decision_tree::gen): Make the functions take a gimple_match_op *
14393         called res_op instead of separate res_code and res_ops parameters.
14394         Update call accordingly.
14395         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
14396         and ops with a single res_op parameter.  Update calls to
14397         maybe_build_generic_op and maybe_push_res_to_seq.
14398         (fold_stmt_1): Update calls to gimple_simplify and
14399         replace_stmt_with_simplification.
14400         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
14401         and gimple_simplified_result_is_gimple_val.
14402         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
14403         gimple_simplify.
14404         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
14405         with a gimple_match_op *.
14406         (vn_nary_build_or_lookup): Likewise.  Update call to
14407         vn_nary_build_or_lookup_1.
14408         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
14409         gimple_match_op *.  Update calls to the gimple_resimplify routines
14410         and to gimple_simplified_result_is_gimple_val.
14411         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
14412         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
14413         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
14414         (visit_nary_op): Likewise.
14415         (visit_reference_op_load): Likewise.
14417 2018-05-23  Luis Machado  <luis.machado@linaro.org>
14419         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
14420         modifier for printing the step amount.
14422 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
14424         PR target/78849
14425         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
14426         types.
14428 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
14430         * doc/sourcebuild.texi (Endianness): New subsubsection.
14432 2018-05-23  Luis Machado  <luis.machado@linaro.org>
14434         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14435         <prefetch_dynamic_strides>: New const bool field.
14436         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14437         prefetch_dynamic_strides.
14438         (exynosm1_prefetch_tune): Likewise.
14439         (thunderxt88_prefetch_tune): Likewise.
14440         (thunderx_prefetch_tune): Likewise.
14441         (thunderx2t99_prefetch_tune): Likewise.
14442         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
14443         false.
14444         (aarch64_override_options_internal): Update to set
14445         PARAM_PREFETCH_DYNAMIC_STRIDES.
14446         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14447         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14448         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14449         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14450         prefetch-dynamic-strides setting.
14452 2018-05-23  Luis Machado  <luis.machado@linaro.org>
14454         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14455         <minimum_stride>: New const int field.
14456         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14457         minimum_stride field defaulting to -1.
14458         (exynosm1_prefetch_tune): Likewise.
14459         (thunderxt88_prefetch_tune): Likewise.
14460         (thunderx_prefetch_tune): Likewise.
14461         (thunderx2t99_prefetch_tune): Likewise.
14462         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
14463         <default_opt_level>: Set to 3.
14464         (aarch64_override_options_internal): Update to set
14465         PARAM_PREFETCH_MINIMUM_STRIDE.
14466         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14467         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14468         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14469         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14470         stride is constant and is below the minimum stride threshold.
14472 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14474         * config/arm/arm-cpus.in (mode26): Delete.
14475         (armv4): Delete mode26 reference.
14476         * config/arm/arm.c (arm_configure_build_target): Delete use of
14477         isa_bit_mode26.
14479 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
14481         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
14482         New insn pattern.
14483         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
14484         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
14485         for non-SSE modes.
14486         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
14487         (floatunsdidf2): Ditto.
14489 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
14491         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
14492         (fixuns_trunc<mode>si2_avx512f): Ditto.
14493         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
14494         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
14495         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
14497 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
14499         PR rtl-optimization/79985
14500         * df-scan.c (df_insn_refs_collect): Remove special case for
14501         global registers and asm statements.
14503 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
14505         * extend.texi (Global Register Variables): Rewrite the bullet list.
14506         Note that the register is available for allocation. Note that access
14507         via inline asm must use constraints. Add note about async-signal
14508         handlers. Remove paragraph about automagic register selection.
14510 2018-05-23  Richard Biener  <rguenther@suse.de>
14512         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
14513         of fixed offset from memset VN.
14515 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
14517         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
14518         first_interp field.
14519         (alloc_cand_and_find_basis): Initialize first_interp field.
14520         (slsr_process_mul): Modify first_interp field.
14521         (slsr_process_add): Likewise.
14522         (slsr_process_cast): Modify first_interp field for each new
14523         interpretation.
14524         (slsr_process_copy): Likewise.
14525         (dump_candidate): Dump first_interp field.
14526         (replace_mult_candidate): Process all interpretations, not just
14527         subsequent ones.
14528         (replace_rhs_if_not_dup): Likewise.
14529         (replace_one_candidate): Likewise.
14531 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
14533         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
14534         Add new boolean.
14535         (aarch64_needs_frame_chain): New function.
14536         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
14538 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
14540         PR target/84882
14541         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
14542         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
14543         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
14544         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
14545         as true for strict-align.
14546         (aarch64_can_inline_p): Perform checks even when callee has no
14547         attributes to check for strict alignment.
14548         * doc/extend.texi (AArch64 Function Attributes): Document
14549         no-strict-align.
14550         * doc/invoke.texi: (AArch64 Options): Likewise.
14552 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
14554         PR tree-optimization/85853
14555         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
14556         the handling of the root of the node to...
14557         (vect_slp_analyze_node_operations_1): ...this new function,
14558         and run the whole thing with the child nodes' def types
14559         set according to their SLP node's def type.
14561 2018-05-23  Richard Biener  <rguenther@suse.de>
14563         PR middle-end/85874
14564         * tree-data-ref.c (create_runtime_alias_checks): Defer
14565         and ignore overflow warnings.
14567 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
14569         PR tree-optimization/85822
14570         * tree-vrp.c (is_masked_range_test): Fix handling of negative
14571         constants.
14573 2018-05-23  Richard Biener  <rguenther@suse.de>
14575         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14576         memset constants via native_interpret_expr.
14578 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
14580         PR target/85345
14581         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
14582         attribute.
14583         (cgraph_node::create_alias): Likewise.
14584         (cgraph_node::get_availability): Check ifunc_resolver instead
14585         of looking up ifunc attribute.
14586         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
14587         * varasm.c (do_assemble_alias): Likewise.
14588         (assemble_alias): Likewise.
14589         (default_binds_local_p_3): Likewise.
14590         * cgraph.h (cgraph_node): Add ifunc_resolver.
14591         (cgraph_node::only_called_directly_or_aliased_p): Return false
14592         for IFUNC resolver.
14593         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
14594         attribute.
14595         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
14596         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
14597         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
14598         instead of looking up ifunc attribute.
14600 2018-05-22  Luis Machado  <luis.machado@linaro.org>
14602         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
14604 2018-05-22  Martin Sebor  <msebor@redhat.com>
14606         PR middle-end/85359
14607         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
14608         only when expasion succeeds.
14609         (expand_builtin_strcmp): Same.
14610         (expand_builtin_strncmp): Same.
14612 2018-05-22  Martin Sebor  <msebor@redhat.com>
14614         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
14616 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
14617             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14619         * config/aarch64/aarch64-ldpstp.md: Replace uses of
14620         aarch64_mem_pair_operand with memory_operand and delete operand swapping
14621         code.
14622         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14623         Add check for legitimate_address.
14624         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
14625         (aarch64_swap_ldrstr_operands): New.
14626         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
14627         Define prototype.
14629 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
14630             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14632         * config/aarch64/aarch64.md: New patterns to generate stp
14633         and ldp.
14634         (store_pair_sw, store_pair_dw): New patterns to generate stp for
14635         single words and double words.
14636         (load_pair_sw, load_pair_dw): Likewise.
14637         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
14638         Delete.
14639         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
14640         Delete.
14641         * config/aarch64/aarch64-ldpstp.md: Modify peephole
14642         for different mode ldpstp and add peephole for merged zero stores.
14643         Likewise for loads.
14644         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14645         Add size check.
14646         (aarch64_gen_store_pair): Rename calls to match new patterns.
14647         (aarch64_gen_load_pair): Rename calls to match new patterns.
14648         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
14649         (load_pair<DREG:mode><DREG2:mode>): ... This.
14650         (store_pair<mode>): Rename to...
14651         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
14652         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
14653         New mode iterators.
14654         (V_INT_EQUIV): Handle SImode.
14655         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
14656         New predicate.
14658 2018-05-22  Martin Sebor  <msebor@redhat.com>
14660         PR c/85623
14661         * calls.c (maybe_warn_nonstring_arg): Use string length to set
14662         or ajust the presumed bound on an operation to avoid unnecessary
14663         warnings.
14665 2018-05-22  Martin Sebor  <msebor@redhat.com>
14667         PR tree-optimization/85826
14668         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
14669         assuming that a DECL necesarily has a constant size.
14671 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
14673         PR middle-end/85862
14674         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
14676 2018-05-22  Richard Biener  <rguenther@suse.de>
14678         PR tree-optimization/85834
14679         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
14680         non-constant and non-zero memset arguments.
14682 2018-05-22  Martin Liska  <mliska@suse.cz>
14684         PR ipa/85607
14685         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
14687 2018-05-22  Richard Biener  <rguenther@suse.de>
14689         PR tree-optimization/85863
14690         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
14691         comparisons when vectype is specified.
14692         (vectorizable_condition): Do not specify vectype for
14693         vect_is_simple_cond when SLP vectorizing.
14695 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
14697         PR target/85657
14698         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
14699         define __ibm128 as long double.
14700         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
14701         as a distinct type when IEEE 128-bit support is enabled.
14702         (init_float128_ieee): Fix up conversions between IFmode and IEEE
14703         128-bit types to use the correct functions.
14704         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
14705         convert between 128-bit floating point types that have different
14706         modes but the same representation, instead of using gen_lowpart to
14707         makean alias.
14708         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
14709         KFmode.
14710         (IFKF_reg): New attributes to give the register constraints for
14711         IFmode and KFmode.
14712         (extend<mode>tf2_internal): New insns to mark an explicit
14713         conversion between 128-bit floating point types that have a
14714         different mode but share the same representation.
14716 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
14718         PR tree-optimization/85814
14719         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
14720         a null return from get_strinfo when unsharing the next
14721         strinfo in the chain.
14723 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14725         PR gcc/84923
14726         * varasm.c (weak_finish): Clean up weak_decls.
14728 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14730         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
14731         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
14732         UNSPEC_UADALP values.
14733         * config/aarch64/iterators.md (ABAL): New int iterator.
14734         (ABDL2): Likewise.
14735         (ADALP): Likewise.
14736         (sur): Add mappings for the above.
14737         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
14738         New define_insn.
14739         (aarch64_<sur>abal<mode>_4): Likewise.
14740         (aarch64_<sur>adalp<mode>_3): Likewise.
14741         (<sur>sadv16qi): New define_expand.
14743 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
14745         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
14746         (*movdf_internal): Ditto.
14747         (*rcpsf2_sse): Ditto.
14748         (*rsqrtsf2_sse): Ditto.
14749         (*sqrt<mode>2_sse): Ditto.
14751 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
14753         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
14754         eor3q<mode>4.
14755         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
14756         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
14757         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
14758         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
14759         vbcaxq_s64): New.
14760         * config/aarch64/arm_neon.h: Likewise.
14761         * config/aarch64/iterators.md (VQ_I): New.
14763 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
14765         * config.gcc: Add arc/t-multilib-linux to tmake_file for
14766         arc*-*-linux*.
14767         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
14768         MULTILIB_DIRNAMES
14770 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
14772         * config/nds32/constraints.md (S): New constraint.
14773         * config/nds32/nds32.md (call_internal): Use constraint S.
14774         (call_value_internal): Likewise.
14775         (sibcall_internal): Likewise.
14776         (sibcall_value_internal): Likewise.
14778 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
14779             Chung-Ju Wu  <jasonwucj@gmail.com>
14781         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
14782         into consideration.
14784 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
14785             Chung-Ju Wu  <jasonwucj@gmail.com>
14787         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
14788         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
14789         (nds32_rtx_costs_impl): Simplify.
14790         (nds32_address_cost_impl): Simplify.
14791         (nds32_init_rtx_costs): New function.
14792         (nds32_rtx_costs_speed_prefer): Likewise.
14793         (nds32_rtx_costs_size_prefer): Likewise.
14794         (nds32_address_cost_speed_prefer): Likewise.
14795         (nds32_address_cost_speed_fwprop): Likewise.
14796         (nds32_address_cost_size_prefer): Likewise.
14797         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
14798         * config/nds32/nds32.c (nds32_option_override): Use
14799         nds32_init_rtx_costs function.
14801 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
14803         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
14804         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
14805         (TARGET_PIPELINE_N8): Likewise.
14806         (TARGET_PIPELINE_N10): Likewise.
14807         (TARGET_PIPELINE_N13): Likewise.
14808         (TARGET_PIPELINE_GRAYWOLF): Likewise.
14810 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
14812         * config/nds32/nds32-fpu.md: Update copyright year.
14814 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14816         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
14818 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14820         * config/nds32/nds32.c
14821         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
14822         * config/nds32/nds32.opt (minline-asm-r15): New option.
14824 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14826         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
14827         MASK_HW_ABS.
14828         * config/nds32/nds32.md (abssi2): New pattern.
14830 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
14832         * config/i386/i386.md (rex64namesuffix): New mode attribute.
14833         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
14834         Merge insn pattern from sse_cvtsi2ss<round_name> and
14835         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
14836         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
14837         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
14838         using SWI48 mode iterator.
14839         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
14840         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
14841         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
14842         pattern from sse_cvttss2si<round_saeonly_name>
14843         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
14844         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
14845         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
14846         using SWI48 mode iterator.
14847         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
14848         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
14849         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
14850         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
14851         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
14852         using SWI48 mode iterator.
14853         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
14854         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
14855         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
14856         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
14857         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
14858         SWI48 mode iterator.
14859         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
14860         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
14861         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
14862         pattern from sse_cvttsd2si<round_saeonly_name>
14863         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
14865 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14867         * config/nds32/nds32-md-auxiliary.c
14868         (nds32_valid_smw_lwm_base_p): Refine.
14869         (nds32_output_smw_single_word): Refine.
14870         (nds32_output_smw_double_word): New.
14871         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
14873 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14875         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
14876         (nds32_output_stack_pop): Refine.
14877         (nds32_expand_unaligned_load): Refine.
14878         (nds32_expand_unaligned_store): Refine.
14880 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
14881             Chung-Ju Wu  <jasonwucj@gmail.com>
14883         * config/nds32/constants.md: Add TP_REGNUM constant.
14884         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
14885         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
14886         UNSPEC_ADD32.
14887         * config/nds32/nds32-doubleword.md: Consider flag_pic.
14888         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
14889         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
14890         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
14891         and PIC code generation.
14892         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
14893         code generation.
14894         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
14895         optimization.
14896         * config/nds32/nds32.md: Support TLS and PIC.
14897         * config/nds32/nds32.c: Support TLS and PIC.
14898         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
14899         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
14900         predicate.
14902 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14904         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
14905         mode with E_ prefix.
14907 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
14908             Chung-Ju Wu  <jasonwucj@gmail.com>
14910         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
14911         * config/nds32/nds32-md-auxiliary.c
14912         (symbolic_reference_mentioned_p): New.
14913         (nds32_legitimize_ict_address): New.
14914         (nds32_expand_ict_move): New.
14915         (nds32_indirect_call_referenced_p): New.
14916         (nds32_symbol_binds_local_p): Delete.
14917         (nds32_long_call_p): Modify.
14918         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
14919         * config/nds32/nds32-protos.h
14920         (symbolic_reference_mentioned_p): Declare.
14921         (nds32_legitimize_ict_address): Declare.
14922         (nds32_expand_ict_move): Declare.
14923         (nds32_indirect_call_referenced_p): Declare.
14924         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
14925         (nds32_relax_group): Use nds32_ict_const_p as condition.
14926         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
14927         (nds32_asm_file_start): Output ict_model directive in asm code.
14928         (nds32_legitimate_address_p): Consider indirect call.
14929         (nds32_print_operand): Consider indirect call.
14930         (nds32_print_operand_address): Consider indirect call.
14931         (nds32_insert_attributes): Handle "indirect_call" attribute.
14932         (TARGET_LEGITIMATE_ADDRESS_P): Define.
14933         (TARGET_LEGITIMATE_CONSTANT_P): Define.
14934         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
14935         (TARGET_DELEGITIMIZE_ADDRESS): Define.
14936         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
14937         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
14938         (TARGET_ICT_MODEL_SMALL): Define.
14939         (TARGET_ICT_MODEL_LARGE): Define.
14940         * config/nds32/nds32.md (movsi): Consider ict model.
14941         (call, call_value): Consider ict model.
14942         (sibcall, sibcall_value): Consider ict model.
14943         * config/nds32/nds32.opt (mict-model): New option.
14944         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
14945         model.
14947 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
14948             Monk Chiang  <sh.chiang04@gmail.com>
14949             Jim Wilson <jimw@sifive.com>
14951         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
14952         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
14953         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
14954         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
14955         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
14956         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
14957         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
14958         compute save_libcall_adjustment properly.
14959         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
14960         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
14961         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
14962         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
14963         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
14964         (ABI_SPEC): Handle mabi=ilp32e.
14965         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
14966         (RVE): Add RVE mask.
14967         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
14968         <-march>: Add rv32e as an example.
14970 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
14972         PR c++/82899
14973         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
14974         (intra_create_variable_infos): Handle C++ constructors.
14976 2018-05-18  Martin Liska  <mliska@suse.cz>
14978         * passes.def: Remove a redundant pass.
14980 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
14982         PR bootstrap/85838
14983         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
14985 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14987         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
14988         (ARMv4): Update.
14989         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
14990         (ARMv6m): Update.
14991         (armv2, armv2a, armv3, armv3m): Delete architectures.
14992         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
14993         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
14994         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
14995         Delete cpus.
14996         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
14997         (*mulsidi3adddi): Likewise.
14998         (mulsidi3): Likewise.
14999         (*mulsidi3_nov6): Likewise.
15000         (umulsidi3): Likewise.
15001         (umulsidi3_nov6): Likewise.
15002         (umaddsidi4): Likewise.
15003         (*umulsidi3adddi): Likewise.
15004         (smulsi3_highpart): Likewise.
15005         (*smulsi3_highpart_nov6): Likewise.
15006         (umulsi3_highpart): Likewise.
15007         (*umulsi3_highpart_nov6): Likewise.
15008         * config/arm/arm.h (arm_arch3m): Delete.
15009         * config/arm/arm.c (arm_arch3m): Delete.
15010         (arm_option_override_internal): Update armv3-related comment.
15011         (arm_configure_build_target): Delete use of isa_bit_mode32.
15012         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
15013         (arm_rtx_costs_internal): Delete check of arm_arch3m.
15014         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
15015         (mulsa3): Likewise.
15016         (mulusa3): Likewise.
15017         * config/arm/arm-protos.h (arm_arch3m): Delete.
15018         * config/arm/arm-tables.opt: Regenerate.
15019         * config/arm/arm-tune.md: Likewise.
15020         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
15021         deleted architectures.
15023 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15025         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
15026         (armv5t, armv5te): New features.
15027         (ARMv5, ARMv5e): Delete fgroups.
15028         (ARMv5t, ARMv5te): Adjust for above changes.
15029         (ARMv6m): Likewise.
15030         (armv5, armv5e): Delete arches.
15031         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
15032         arm_arch5.
15033         (*call_reg_arm): Likewise.
15034         (*call_value_reg_armv5): Likewise.
15035         (*call_value_reg_arm): Likewise.
15036         (*call_symbol): Likewise.
15037         (*call_value_symbol): Likewise.
15038         (*sibcall_insn): Likewise.
15039         (*sibcall_value_insn): Likewise.
15040         (clzsi2): Likewise.
15041         (prefetch): Likewise.
15042         (define_split and define_peephole2 dependent on arm_arch5):
15043         Likewise.
15044         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
15045         arm_arch5e.
15046         (TARGET_ARM_QBIT): Likewise.
15047         (TARGET_DSP_MULTIPLY): Likewise.
15048         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
15049         (arm_arch5, arm_arch5e): Delete.
15050         (arm_arch5t, arm_arch5te): Declare.
15051         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
15052         (arm_arch5t): Declare.
15053         (arm_option_reconfigure_globals): Update for the above.
15054         (arm_options_perform_arch_sanity_checks): Update comment, replace
15055         use of arm_arch5 with arm_arch5t.
15056         (use_return_insn): Likewise.
15057         (arm_emit_call_insn): Likewise.
15058         (output_return_instruction): Likewise.
15059         (arm_final_prescan_insn): Likewise.
15060         (arm_coproc_builtin_available): Likewise.
15061         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
15062         arm_arch5e with arm_arch5t and arm_arch5te.
15063         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
15064         (arm_arch5t, arm_arch5te): Declare.
15065         * config/arm/arm-tables.opt: Regenerate.
15066         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
15067         * config/arm/t-multilib: Likewise.
15068         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
15069         instead of arm_arch5.
15070         (*call_reg_thumb1): Likewise.
15071         (*call_value_reg_thumb1_v5): Likewise.
15072         (*call_value_reg_thumb1): Likewise.
15073         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
15074         unreachable path.
15075         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
15077 2018-05-18  Martin Liska  <mliska@suse.cz>
15079         PR gcov-profile/84846
15080         * doc/gcov.texi: Document -t option of gcov tool.
15082 2018-05-18  Martin Liska  <mliska@suse.cz>
15084         PR gcov-profile/84846
15085         * gcov.c (print_usage): Add new -t option.
15086         (process_args): Handle the option.
15087         (generate_results): Use stdout as output when requested by
15088         the option.
15090 2018-05-18  Martin Liska  <mliska@suse.cz>
15092         PR gcov-profile/84846
15093         * coverage.c (coverage_init): Write PWD to .gcno file.
15094         * doc/gcov.texi: Document how working directory is printed.
15095         * gcov-dump.c (dump_gcov_file): Print PWD.
15096         * gcov.c (output_intermediate_file): Likewise.
15097         (read_graph_file): Read PWD string.
15098         (output_lines): Print PWD.
15100 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15102         PR middle-end/85817
15103         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
15104         for retval and return false if all args to phi are zero.
15106 2018-05-18  Richard Biener  <rguenther@suse.de>
15108         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
15109         method.
15110         (evrp_dom_walker::before_dom_children): Call it.
15112 2018-05-18  Richard Biener  <rguenther@suse.de>
15114         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
15115         results when processing array refs with variable index.
15117 2018-05-18  Toon Moene  <toon@moene.org>
15119         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
15120         directly after that of -floop-interchange. Indicate that both
15121         options are enabled by default when specifying -O3.
15123 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15125         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
15126         iterator.  Delete separate integer-mode vec_set<mode> expander.
15127         (aarch64_simd_vec_setv2di): Delete.
15128         (vec_setv2di): Delete.
15129         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
15130         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
15131         the "w, r" alternative.
15133 2018-05-18  Martin Liska  <mliska@suse.cz>
15135         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
15136         * tree-pass.h (make_pass_lower_switch_O0): New function.
15137         * tree-switch-conversion.c (node_has_low_bound): Remove.
15138         (node_has_high_bound): Likewise.
15139         (node_is_bounded): Likewise.
15140         (class pass_lower_switch): Make it a template type and create
15141         two instances.
15142         (pass_lower_switch::execute): Add template argument.
15143         (make_pass_lower_switch): New function.
15144         (make_pass_lower_switch_O0): New function.
15145         (do_jump_if_equal): Remove.
15146         (emit_case_nodes): Simplify to just handle all 3 cases and leave
15147         all the hard work to tree optimization passes.
15149 2018-05-18  Martin Liska  <mliska@suse.cz>
15151         * dbgcnt.c (limit_low): Renamed from limit.
15152         (limit_high): New variable.
15153         (dbg_cnt_is_enabled): Check for upper limit.
15154         (dbg_cnt): Adjust dumping.
15155         (dbg_cnt_set_limit_by_index): Add new argument for high
15156         value.
15157         (dbg_cnt_set_limit_by_name): Likewise.
15158         (dbg_cnt_process_single_pair): Parse new format.
15159         (dbg_cnt_process_opt): Use strtok.
15160         (dbg_cnt_list_all_counters): Remove 'value' and add
15161         'limit_high'.
15162         * doc/invoke.texi: Document changes.
15164 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
15166         * doc/sourcebuild.texi (scalar_all_fma): Document.
15167         * tree.def (FMA_EXPR): Delete.
15168         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
15169         * internal-fn.c (ternary_direct): New macro.
15170         (expand_ternary_optab_fn): Likewise.
15171         (direct_ternary_optab_supported_p): Likewise.
15172         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
15173         * builtins.c (fold_builtin_fma): Delete.
15174         (fold_builtin_3): Don't call it.
15175         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
15176         * expr.c (expand_expr_real_2): Likewise.
15177         * fold-const.c (operand_equal_p): Likewise.
15178         (fold_ternary_loc): Likewise.
15179         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
15180         * gimple.c (DEFTREECODE): Likewise.
15181         * gimplify.c (gimplify_expr): Likewise.
15182         * optabs-tree.c (optab_for_tree_code): Likewise.
15183         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
15184         * tree-eh.c (operation_could_trap_p): Likewise.
15185         (stmt_could_throw_1_p): Likewise.
15186         * tree-inline.c (estimate_operator_cost): Likewise.
15187         * tree-pretty-print.c (dump_generic_node): Likewise.
15188         (op_code_prio): Likewise.
15189         * tree-ssa-loop-im.c (stmt_cost): Likewise.
15190         * tree-ssa-operands.c (get_expr_operands): Likewise.
15191         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
15192         * fold-const-call.h (fold_fma): Delete.
15193         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
15194         CFN_FNMA and CFN_FNMS.
15195         (fold_fma): Delete.
15196         * genmatch.c (combined_fn): New enum.
15197         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
15198         (commutative_op): New function.
15199         (commutate): Use it.  Handle more than 2 operands.
15200         (dt_operand::gen_gimple_expr): Use commutative_op.
15201         (parser::parse_expr): Allow :c to be used with non-binary
15202         operators if the commutative operand is known.
15203         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
15204         CFN_FMS, CFN_FNMA and CFN_FNMS.
15205         (backprop::process_assign_use): Remove FMA_EXPR handling.
15206         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
15207         (gen_hsa_fma): New function.
15208         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
15209         IFN_FNMA and IFN_FNMS.
15210         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
15211         * gimple-fold.h (follow_all_ssa_edges): Declare.
15212         * gimple-fold.c (follow_all_ssa_edges): New function.
15213         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
15214         gimple_build interface and use follow_all_ssa_edges to fold the result.
15215         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
15216         instead of checking for optabs directly.
15217         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
15218         rather than FMA_EXPRs.
15219         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
15220         call to IFN_FMA instead of an FMA_EXPR.
15222 2018-05-17  Jim Wilson  <jimw@sifive.com>
15224         * expr.c (do_tablejump): When converting index to Pmode, if we have a
15225         sign extended promoted subreg, and the range does not have the sign bit
15226         set, then do a sign extend.
15228         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
15229         test, check for sign extended subreg and/or constant operands, and
15230         do a sign extend in that case.
15232 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
15234         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
15235         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
15236         Add untyped.
15237         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
15238         Change logics_shift_reg to logics_shift_imm.
15239         (thunderx2t99_fp_loadpair_basic): Delete.
15240         (thunderx2t99_fp_storepair_basic): Delete.
15241         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
15242         (thunderx2t99_asimd_polynomial): Delete.
15243         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
15244         and neon_fp_mul_d_scalar_q.
15245         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
15246         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
15247         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
15248         (thunderx2t99_asimd_lut): Add missing tbl types.
15249         (thunderx2t99_asimd_ext): Delete.
15250         (thunderx2t99_asimd_load1_1_mult): Delete.
15251         (thunderx2t99_asimd_load1_2_mult): Delete.
15252         (thunderx2t99_asimd_load1_ldp): New.
15253         (thunderx2t99_asimd_load1): New.
15254         (thunderx2t99_asimd_load2): Add missing *load2* types.
15255         (thunderx2t99_asimd_load3): New.
15256         (thunderx2t99_asimd_load4): New.
15257         (thunderx2t99_asimd_store1_1_mult): Delete.
15258         (thunderx2t99_asimd_store1_2_mult): Delete.
15259         (thunderx2t99_asimd_store2_mult): Delete.
15260         (thunderx2t99_asimd_store2_onelane): Delete.
15261         (thunderx2t99_asimd_store_stp): New.
15262         (thunderx2t99_asimd_store1): New.
15263         (thunderx2t99_asimd_store2): New.
15264         (thunderx2t99_asimd_store3): New.
15265         (thunderx2t99_asimd_store4): New.
15267 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
15269         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
15270         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
15272 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
15273             Segher Boessenkool  <segher@kernel.crashing.org>
15275         PR target/85698
15276         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
15277         operand.
15279 2018-05-17  Richard Biener  <rguenther@suse.de>
15281         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
15282         for pruning loop and prune defs feeding only already visited PHIs.
15284 2018-05-17  Richard Biener  <rguenther@suse.de>
15286         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
15288 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
15289             Richard Biener  <rguenther@suse.de>
15291         PR tree-optimization/85793
15292         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
15293         for VMAT_ELEMENTWISE.
15295 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
15297         * internal-fn.h (lookup_internal_fn): Declare
15298         * internal-fn.c (lookup_internal_fn): New function.
15299         * gimple.c (gimple_build_call_from_tree): Handle calls to
15300         internal functions.
15301         * gimple-pretty-print.c (dump_gimple_call): Print "." before
15302         internal function names.
15303         * tree-pretty-print.c (dump_generic_node): Likewise.
15304         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
15306 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
15308         * gimple-fold.h (gimple_build): Make the function forms take
15309         combined_fn rather than built_in_function.
15310         (gimple_simplify): Likewise.
15311         * gimple-match-head.c (gimple_simplify): Likewise.
15312         * gimple-fold.c (gimple_build): Likewise.
15313         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
15314         rather than gimple_build_call_internal.
15315         (get_initial_defs_for_reduction): Likewise.
15316         (vect_create_epilog_for_reduction): Likewise.
15317         (vectorizable_live_operation): Likewise.
15319 2018-05-17  Martin Liska  <mliska@suse.cz>
15321         * gimple-ssa-sprintf.c (format_directive): Do not use
15322         space in between 'G_' and '('.
15324 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
15326         PR target/85323
15327         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
15328         even if the mask is not all ones.
15330         PR target/85323
15331         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
15332         vector.
15333         (ix86_gimple_fold_builtin): Likewise.
15335         PR target/85323
15336         * config/i386/i386.c: Include tree-vector-builder.h.
15337         (ix86_vector_shift_count): New function.
15338         (ix86_fold_builtin): Fold shift builtins by scalar count.
15339         (ix86_gimple_fold_builtin): Likewise.
15341         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
15342         _mm512_setzero): New intrinsics.
15344 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
15345             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15347         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
15348         code generation for cases where splatting a value is not useful.
15349         * simplify-rtx.c (simplify_ternary_operation): Simplify
15350         vec_merge across a vec_duplicate and a paradoxical subreg forming
15351         a vector mode to a vec_concat.
15353 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
15355         * config.gcc: Support "goldmont-plus".
15356         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15357         "goldmont-plus".
15358         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15359         PROCESSOR_GOLDMONT_PLUS.
15360         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
15361         (processor_target_table): Add "goldmont-plus".
15362         (PTA_GOLDMONT_PLUS): Define.
15363         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
15364         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
15365         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
15366         (fold_builtin_cpu): Add "goldmont-plus".
15367         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
15368         (ix86_option_override_internal): Add "goldmont-plus".
15369         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
15370         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
15371         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
15372         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
15374 2018-05-17  Richard Biener  <rguenther@suse.de>
15376         PR tree-optimization/85757
15377         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
15378         remove defs that only feed that PHI from further processing.
15380 2018-05-16  Jim Wilson  <jimw@sifive.com>
15382         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
15383         asterisk to name.
15384         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
15386 2018-05-16  Mark Wielaard  <mark@klomp.org>
15388         * dwarf2out.c (count_index_strings): New function.
15389         (output_indirect_strings): Call count_index_strings and generate
15390         header for dwarf_version >= 5.
15392 2018-05-16  Mark Wielaard  <mark@klomp.org>
15394         * dwarf2out.c (dwarf_FORM): New function.
15395         (set_indirect_string): Use dwarf_FORM.
15396         (reset_indirect_string): Likewise.
15397         (size_of_die): Likewise.
15398         (value_format): Likewise.
15399         (output_die): Likewise.
15400         (add_skeleton_AT_string): Likewise.
15401         (output_macinfo_op): Likewise.
15402         (index_string): Likewise.
15403         (output_index_string_offset): Likewise.
15404         (output_index_string): Likewise.
15405         (count_index_strings): Likewise.
15407 2018-05-16  Carl Love  <cel@us.ibm.com>
15409         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15410         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
15412 2018-05-16  Martin Jambor  <mjambor@suse.cz>
15414         * ipa-prop.c (ipa_free_all_edge_args): Remove.
15415         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
15417 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
15419         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
15420         (fnma<mode>4): Likewise.
15421         (fms<mode>4): Likewise.
15422         (fnms<mode>4): Likewise.
15423         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
15424         (aarch64_fnma<mode>4): Likewise.
15425         (aarch64_fms<mode>4): Likewise.
15426         (aarch64_fnms<mode>4): Likewise.
15427         (aarch64_fnmadd<mode>4): Likewise.
15429 2018-05-16  Jason Merrill  <jason@redhat.com>
15431         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
15433 2018-05-16  Richard Biener  <rguenther@suse.de>
15435         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
15436         (dump_stmt_cost): Declare.
15437         (add_stmt_cost): Dump cost we add.
15438         (add_stmt_costs): New function.
15439         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
15440         No longer exported.
15441         (vect_analyze_stmt): Adjust prototype.
15442         (vectorizable_condition): Likewise.
15443         (vectorizable_live_operation): Likewise.
15444         (vectorizable_reduction): Likewise.
15445         (vectorizable_induction): Likewise.
15446         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
15447         cost vector to pass to vectorizable_ and record afterwards.
15448         (vect_model_reduction_cost): Take cost vector argument and adjust.
15449         (vect_model_induction_cost): Likewise.
15450         (vectorizable_reduction): Likewise.
15451         (vectorizable_induction): Likewise.
15452         (vectorizable_live_operation): Likewise.
15453         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
15454         SLP_TREE_NUMBER_OF_VEC_STMTS.
15455         (vect_analyze_slp_cost_1): Remove.
15456         (vect_analyze_slp_cost): Likewise.
15457         (vect_slp_analyze_node_operations): Take visited args and
15458         a target cost vector.  Avoid processing already visited stmt sets.
15459         (vect_slp_analyze_operations): Use a local cost vector to gather
15460         costs and register those of non-discarded instances.
15461         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
15462         (vect_schedule_slp_instance): Remove copying of
15463         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
15464         zero.
15465         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
15466         adding cost.  Record cost entry location.
15467         (vect_prologue_cost_for_slp_op): Function to compute cost of
15468         a constant or invariant generated for SLP vect in the prologue,
15469         split out from vect_analyze_slp_cost_1.
15470         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
15471         (vect_model_promotion_demotion_cost): Likewise.
15472         (vect_model_store_cost): Likewise, make static.
15473         (vect_model_load_cost): Likewise.
15474         (vectorizable_bswap): Add cost vector arg and adjust.
15475         (vectorizable_call): Likewise.
15476         (vectorizable_simd_clone_call): Likewise.
15477         (vectorizable_conversion): Likewise.
15478         (vectorizable_assignment): Likewise.
15479         (vectorizable_shift): Likewise.
15480         (vectorizable_operation): Likewise.
15481         (vectorizable_store): Likewise.
15482         (vectorizable_load): Likewise.
15483         (vectorizable_condition): Likewise.
15484         (vectorizable_comparison): Likewise.
15485         (can_vectorize_live_stmts): Likewise.
15486         (vect_analyze_stmt): Likewise.
15487         (vect_transform_stmt): Adjust calls to vectorizable_*.
15488         * tree-vectorizer.c: Include gimple-pretty-print.h.
15489         (dump_stmt_cost): New function.
15491 2018-05-16  Richard Biener  <rguenther@suse.de>
15493         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
15494         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
15495         * tree-ssa-dse.c: Include tree-ssa-loop.h.
15496         (check_name): New callback.
15497         (dse_classify_store): Track cycles via a visited bitmap of PHI
15498         defs and simplify handling of in-loop and across loop dead stores
15499         and properly fail for loop-variant refs.  Handle byte-tracking with
15500         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
15501         limiting the walk.
15503 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
15505         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
15506         (vect_get_mask_type_for_stmt): Likewise.
15507         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
15508         split out from...
15509         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
15510         to determine the statement's vector type and the vector type that
15511         should be used for calculating nunits.  Deal with cases in which
15512         the type has to be deferred.
15513         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
15514         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
15515         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
15516         (vect_determine_vf_for_stmt): New functions, split out from...
15517         (vect_determine_vectorization_factor): ...here.
15518         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
15519         (vect_get_mask_type_for_stmt): New functions, split out from
15520         vect_determine_vectorization_factor.
15522 2018-05-16  Richard Biener  <rguenther@suse.de>
15524         * tree-cfg.c (verify_gimple_assign_ternary): Properly
15525         verify the [VEC_]COND_EXPR embedded comparison.
15527 2018-05-15  Martin Sebor  <msebor@redhat.com>
15529         PR tree-optimization/85753
15530         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
15531         RECORD_TYPE in addition to ARRAY_TYPE.
15533 2018-05-15  Martin Sebor  <msebor@redhat.com>
15535         PR middle-end/85643
15536         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
15538 2018-05-15  Richard Biener  <rguenther@suse.de>
15540         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
15541         add by_clobber_p one.  Change algorithm to collect all defs
15542         representing uses we need to walk and try reducing them to
15543         a single one before failing.
15544         (dse_dom_walker::dse_optimize_stmt): Adjust.
15546 2018-05-13  Mark Wielaard  <mark@klomp.org>
15548         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
15549         (size_of_loc_descr): Likewise.
15550         (output_loc_operands): Likewise.
15551         (output_loc_operands_raw): Likewise.
15552         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
15553         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
15554         (hash_loc_operands): Likewise.
15555         (compare_loc_operands): Likewise.
15557 2018-05-14  Mark Wielaard  <mark@klomp.org>
15559         * dwarf2out.c (count_index_addrs): New function.
15560         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
15562 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15564         PR tree-optimization/83648
15565         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
15566         return value as malloc candidate.
15568 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15570         PR ipa/85734
15571         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
15572         param as true in call to suggest_attribute.
15574 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
15576         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
15577         -mreadonly-in-sdata.
15579 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15581         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
15582         New pattern.
15583         (aarch64_crypto_aesd_fused): Likewise.
15585 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
15587         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
15588         (movsi_aarch64): Likewise.
15589         (load_pairsi): Likewise.
15590         (load_pairdi): Likewise.
15591         (store_pairsi): Likewise.
15592         (store_pairdi): Likewise.
15593         (load_pairsf): Likewise.
15594         (load_pairdf): Likewise.
15595         (store_pairsf): Likewise.
15596         (store_pairdf): Likewise.
15597         (zero_extend): Likewise.
15598         (trunc): Swap alternatives.
15599         (fcvt_target): Add '?' to prefer w over r.
15601 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
15603         PR target/85756
15604         * config/i386/i386.md: Disallow non-commutative arithmetics in
15605         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
15606         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
15607         in the peephole2 before it.
15609 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
15611         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
15612         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
15613         (ix86_handle_option): Handle -mcldemote.
15614         * config.gcc: New header.
15615         * config/i386/cldemoteintrin.h: New file.
15616         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
15617         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15618         -mcldemote.
15619         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15620         OPTION_MASK_ISA_CLDEMOTE.
15621         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
15622         (ix86_valid_target_attribute_inner_p): Ditto.
15623         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
15624         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
15625         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
15626         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
15627         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
15628         (cldemote): New.
15629         * config/i386/i386.opt: Add -mcldemote.
15630         * config/i386/x86intrin.h: New header.
15631         * doc/invoke.texi: Add -mcldemote.
15633 2018-05-14  Richard Biener  <rguenther@suse.de>
15635         * doc/match-and-simplify.texi: Adjust :s documentation.
15637 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
15639         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
15640         intended memcpy size.
15641         (REORDER_45): Likewise.
15643 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
15645         * sort.cc: New file.
15646         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
15647         * vec.c (qsort_chk): Use gcc_qsort.
15648         * Makefile.in (OBJS-libcommon): Add sort.o.
15649         (build/sort.o): New target.  Use it...
15650         (BUILD_RTL): ... here, and...
15651         (build/gencfn-macros): ... here, and...
15652         (build/genmatch): ... here.
15654 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
15655             Chung-Ju Wu  <jasonwucj@gmail.com>
15657         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
15658         * config/nds32/nds32-graywolf.md: New file.
15659         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
15660         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
15661         pipeline.
15662         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
15663         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
15664         * config/nds32/nds32.md (pipeline_model): Add graywolf.
15665         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
15666         * config/nds32/pipelines.md: Include n15 settings.
15668 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
15669             Chung-Ju Wu  <jasonwucj@gmail.com>
15671         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
15672         * config/nds32/nds32-n13.md: New file.
15673         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
15674         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
15675         pipeline.
15676         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
15677         * config/nds32/nds32.md (pipeline_model): Add n13.
15678         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
15679         * config/nds32/pipelines.md: Include n13 settings.
15681 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
15682             Chung-Ju Wu  <jasonwucj@gmail.com>
15684         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
15685         * config/nds32/nds32-n10.md: New file.
15686         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
15687         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
15688         pipeline.
15689         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
15690         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
15691         * config/nds32/nds32.md (pipeline_model): Add n10.
15692         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
15693         * config/nds32/pipelines.md: Include n10 settings.
15695 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
15696             Kito Cheng  <kito.cheng@gmail.com>
15697             Chung-Ju Wu  <jasonwucj@gmail.com>
15699         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
15700         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15701         Add enum values for DSP extension instructions.
15702         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
15703         New constraints.
15704         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
15705         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
15706         New code iterators.
15707         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
15708         * config/nds32/nds32-dspext.md: New file for DSP implementation.
15709         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
15710         * config/nds32/nds32-intrinsic.md: Likewise.
15711         * config/nds32/nds32_intrinsic.h: Likewise.
15712         * config/nds32/nds32-md-auxiliary.c: Likewise.
15713         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
15714         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
15715         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
15716         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
15717         * config/nds32/nds32-protos.h: New declarations for DSP extension.
15718         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
15719         TYPE_DMAC in switch statement.
15720         * config/nds32/nds32.c: New checking and implementation for DSP
15721         extension instructions.
15722         * config/nds32/nds32.h: Likewise.
15723         * config/nds32/nds32.md: Likewise.
15724         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
15725         * config/nds32/predicates.md: Implement new predicates for DSP
15726         extension.
15728 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
15730         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
15731         Reformat alternatives and attributes so it is easier to identify
15732         which constraints/attributes go with which instruction.
15733         (mov<mode>_hardfloat32, FMOVE64): Likewise.
15734         (mov<mode>_softfloat32, FMOVE64): Likewise.
15735         (mov<mode>_hardfloat64, FMOVE64): Likewise.
15736         (mov<mode>_softfloat64, FMOVE64): Likewise.
15738 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15740         * doc/extend.texi (PowerPC Built-in Functions): Rename this
15741         subsection.
15742         (Basic PowerPC Built-in Functions): The new name of the
15743         subsection previously known as "PowerPC Built-in Functions".
15744         (Basic PowerPC Built-in Functions Available on all Configurations):
15745         New subsubsection.
15746         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
15747         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
15748         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
15749         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
15751 2018-05-11  Martin Jambor  <mjambor@suse.cz>
15753         PR ipa/85655
15754         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
15755         single const.
15757 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
15759         PR target/85733
15760         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
15762 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
15764         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
15765         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
15766         (ix86_handle_option): Handle -mwaitpkg.
15767         * config.gcc: New header.
15768         * config/i386/cpuid.h (bit_WAITPKG): New bit.
15769         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
15770         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
15771         function type.
15772         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15773         OPTION_MASK_ISA_WAITPKG.
15774         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
15775         (ix86_option_override_internal): Add PTA_WAITPKG.
15776         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
15777         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
15778         IX86_BUILTIN_TPAUSE.
15779         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
15780         __builtin_ia32_umwait and __builtin_ia32_tpause.
15781         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
15782         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
15783         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
15784         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
15785         UNSPECV_TPAUSE): New.
15786         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
15787         * config/i386/i386.opt: Add -mwaitpkg.
15788         * config/i386/waitpkgintrin.h: New file.
15789         * config/i386/x86intrin.h: New header.
15790         * doc/invoke.texi: Add -mwaitpkg.
15792 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
15794         PR target/85606
15795         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
15796         equivalent.
15797         (cortex-m0): Use armv6s-m isa.
15798         (cortex-m0plus): Likewise.
15799         (cortex-m1): Likewise.
15800         (cortex-m0.small-multiply): Likewise.
15801         (cortex-m0plus.small-multiply): Likewise.
15802         (cortex-m1.small-multiply): Likewise.
15804 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
15805             Jakub Jelinek  <jakub@redhat.com>
15807         PR tree-optimization/85692
15808         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
15809         source permute as well.
15811 2018-05-11  Martin Liska  <mliska@suse.cz>
15813         PR sanitizer/85556
15814         * doc/extend.texi: Document LLVM style format for no_sanitize
15815         attribute.
15817 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
15819         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
15820         mode_supports_vsx_dform_quad to mode_supports_dq_form.
15821         (mode_supports_vsx_dform_quad): Likewise.
15822         (mode_supports_vmx_dform): Move these functions to be next to the
15823         other mode_supports functions.
15824         (mode_supports_dq_form): Likewise.
15825         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
15826         mode_supports_dq_form.
15827         (reg_offset_addressing_ok_p): Likewise.
15828         (offsettable_ok_by_alignment): Likewise.
15829         (rs6000_legitimate_offset_address_p): Likewise.
15830         (legitimate_lo_sum_address_p): Likewise.
15831         (rs6000_legitimize_address): Likewise.
15832         (rs6000_legitimize_reload_address): Likewise.
15833         (rs6000_secondary_reload_inner): Likewise.
15834         (rs6000_preferred_reload_class): Likewise.
15835         (rs6000_output_move_128bit): Likewise.
15837 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
15839         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
15840         Generate SImode target register for null target.
15841         <case IX86_BUILTIN_XGETBV>: Ditto.
15842         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
15843         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
15845 2018-05-10  Carl Love  <cel@us.ibm.com>
15847         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15848         dcbtt and dcbtstt if operands[2] is 0.
15850 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
15852         PR target/85693
15853         * config/i386/sse.md (usadv64qi): New expander.
15855 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
15857         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
15858         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
15859         -maltivec=be support.
15860         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
15861         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
15862         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
15863         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
15864         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
15865         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
15866         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
15867         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
15868         altivec_vsumsws): Adjust.
15869         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
15870         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
15871         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
15872         support.
15873         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
15874         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
15875         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
15876         (altivec_lve<VI_char>x): Delete expand.
15877         (*altivec_lve<VI_char>x_internal): Rename to...
15878         (altivec_lve<VI_char>x): ... this.
15879         (altivec_lvxl_<mode>): Delete expand.
15880         (*altivec_lvxl_<mode>_internal): Rename to ...
15881         (altivec_lvxl_<mode>): ... this.
15882         (altivec_stvxl_<mode>): Delete expand.
15883         (*altivec_stvxl_<mode>_internal): Rename to ...
15884         (altivec_stvxl_<mode>): ... this.
15885         (altivec_stve<VI_char>x): Delete expand.
15886         (*altivec_stve<VI_char>x_internal): Rename to ...
15887         (altivec_stve<VI_char>x): ... this.
15888         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
15889         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
15890         reduc_plus_scal_<mode>): Adjust.
15891         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
15892         comment.
15893         (rs6000_cpu_cpp_builtins): Adjust.
15894         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
15895         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
15896         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
15897         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
15898         -maltivec=be support.
15899         (rs6000_split_vec_extract_var): Adjust.
15900         (rs6000_split_v4si_init): Adjust.
15901         (swap_selector_for_mode): Delete.
15902         (altivec_expand_lvx_be, altivec_expand_stvx_be,
15903         altivec_expand_stvex_be): Delete.
15904         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
15905         -maltivec=be support.
15906         (rs6000_gimple_fold_builtin): Ditto.
15907         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
15908         Adjust.
15909         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
15910         (TARGET_DIRECT_MOVE_64BIT): Adjust.
15911         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
15912         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
15913         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
15914         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
15915         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
15916         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
15917         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
15918         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
15919         anonymous split): Adjust.
15920         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
15921         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
15923 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
15925         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
15926         when --with-gxx-include-dir is also specified.
15927         * configure: Regenerate.
15929 2018-05-09  Jim Wilson  <jimw@sifive.com>
15931         PR target/84797
15932         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
15933         * config/riscv/t-withmultilib: New.
15934         * config/riscv/withmultilib.h: New.
15935         * doc/install.texi: Document RISC-V --with-multilib-list support.
15937 2018-05-09  Richard Biener  <rguenther@suse.de>
15939         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
15940         vector.
15941         (vect_bb_vectorization_profitable_p): Adjust.  Compute
15942         actual scalar cost using the cost vector and the add_stmt_cost
15943         machinery.
15945 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15947         PR rtl-optimization/85645
15948         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
15949         in the REG_CFA_REGISTER note for LR, don't leave it empty.
15951 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15953         PR rtl-optimization/85645
15954         * shrink-wrap.c (spread_components): Return a boolean saying if
15955         anything was changed.
15956         (try_shrink_wrapping_separate): Iterate spread_components until
15957         nothing changes anymore.
15959 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15961         PR rtl-optimization/85645
15962         * regrename.c (build_def_use): Also kill the chains that include the
15963         destination of a REG_CFA_REGISTER note.
15965 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15967         PR rtl-optimization/85645
15968         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
15969         insn that has a REG_CFA_REGISTER note.
15971 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
15973         * cfgexpand.c (expand_clobber): New function.
15974         (expand_gimple_stmt_1): Use it.
15975         * tree-vect-stmts.c (vect_clobber_variable): New function,
15976         split out from...
15977         (vectorizable_simd_clone_call): ...here.
15978         (vectorizable_store): Emit a clobber either side of an
15979         IFN_STORE_LANES sequence.
15980         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
15982 2018-05-09  Tom de Vries  <tom@codesourcery.com>
15984         PR target/85626
15985         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
15986         (define_insn "trap_if_false"): Add exit after trap.
15988 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
15990         PR rtl-optimization/85638
15991         * bb-reorder.c: Include common/common-target.h.
15992         (create_forwarder_block): New function extracted from...
15993         (fix_up_crossing_landing_pad): ...here.  Rename into...
15994         (dw2_fix_up_crossing_landing_pad): ...this.
15995         (sjlj_fix_up_crossing_landing_pad): New function.
15996         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
15997         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
15998         from both partitions and exit the loop after one iteration.
16000 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16002         Revert:
16003         * doc/extend.texi (PowerPC Built-in Functions): Rename this
16004         subsection.
16005         (Basic PowerPC Built-in Functions): The new name of the
16006         subsection previously known as "PowerPC Built-in Functions".
16007         (Basic PowerPC Built-in Functions Available on all Configurations):
16008         New subsubsection.
16009         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
16010         subsubsection.
16011         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
16012         subsubsection.
16013         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
16014         subsubsection.
16015         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
16016         subsubsection.
16018 2018-05-08  Jim Wilson  <jimw@sifive.com>
16020         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
16021         (LD_EMUL_SUFFIX): New.
16022         (LINK_SPEC): Use it.
16024 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16026         * doc/extend.texi (PowerPC Built-in Functions): Rename this
16027         subsection.
16028         (Basic PowerPC Built-in Functions): The new name of the
16029         subsection previously known as "PowerPC Built-in Functions".
16030         (Basic PowerPC Built-in Functions Available on all Configurations):
16031         New subsubsection.
16032         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
16033         subsubsection.
16034         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
16035         subsubsection.
16036         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
16037         subsubsection.
16038         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
16039         subsubsection.
16041 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
16043         PR target/85683
16044         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
16045         after cmpelim optimization.
16047 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
16049         * config.gcc: Support "goldmont".
16050         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
16051         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16052         PROCESSOR_GOLDMONT.
16053         * config/i386/i386.c (m_GOLDMONT): Define.
16054         (processor_target_table): Add "goldmont".
16055         (PTA_GOLDMONT): Define.
16056         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
16057         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
16058         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
16059         (fold_builtin_cpu): Add "goldmont".
16060         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
16061         (ix86_option_override_internal): Add "goldmont".
16062         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
16063         (processor_type): Add PROCESSOR_GOLDMONT.
16064         * config/i386/i386.md: Add CPU "glm".
16065         * config/i386/glm.md: New file.
16066         * config/i386/x86-tune.def: Add m_GOLDMONT.
16067         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
16069 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
16071         PR target/85572
16072         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
16073         E_V4DImode.
16074         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
16075         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
16076         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
16078         PR target/85317
16079         * config/i386/i386.c (ix86_fold_builtin): Handle
16080         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
16082         PR target/85480
16083         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
16084         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
16086 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
16088         PR target/85658
16089         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
16090         (check_arch): Likewise.
16091         (check_fpu): Return the result rather than printing it.
16092         (end arch): Fix operator precedence.
16093         (end cpu): Likewise.
16094         (END): Print the result from check_fpu.
16096 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
16097             Alan Hayward  <alan.hayward@arm.com>
16098             David Sherwood  <david.sherwood@arm.com>
16100         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
16101         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
16102         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
16103         (*fcmuo<mode>_and): New patterns.
16105 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
16107         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
16108         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
16109         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
16110         (cmp_op, sve_imm_con): New code attributes.
16111         (SVE_COND_INT_CMP, imm_con): Delete.
16112         (cmp_op): Remove above unspecs from int attribute.
16113         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
16114         to...
16115         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
16116         comparison-specific unspecs.
16117         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
16118         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
16119         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
16120         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
16121         (*vec_fcm<cmp_op><mode>): Rename to...
16122         (*fcm<cmp_op><mode>): ...this and adjust likewise.
16123         (*vec_fcmuo<mode>): Rename to...
16124         (*fcmuo<mode>): ...this and adjust likewise.
16125         (*pred_fcm<cmp_op><mode>): New pattern.
16126         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
16127         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
16128         functions.
16129         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
16130         and UNORDERED.
16131         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
16132         (aarch64_emit_sve_predicated_cond): New function.
16133         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
16134         (aarch64_emit_unspec_cond_or): Replace with...
16135         (aarch64_emit_sve_or_conds): ...this new function.  Use
16136         aarch64_emit_sve_ptrue_op for the individual comparisons and
16137         aarch64_emit_binop to OR them together.
16138         (aarch64_emit_inverted_unspec_cond): Replace with...
16139         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
16140         aarch64_emit_sve_ptrue_op for the comparison and
16141         aarch64_emit_unop to invert the result.
16142         (aarch64_expand_sve_vec_cmp_float): Update after the above
16143         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
16145 2018-05-07  Nathan Sidwell  <nathan@acm.org>
16147         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
16148         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
16149         (Backwards Compatibility): Likewise.
16151 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16153         PR bootstrap/85681
16154         Revert:
16155         2018-05-07  Luis Machado  <luis.machado@linaro.org>
16157         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16158         <prefetch_dynamic_strides>: New const bool field.
16159         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16160         prefetch_dynamic_strides.
16161         (exynosm1_prefetch_tune): Likewise.
16162         (thunderxt88_prefetch_tune): Likewise.
16163         (thunderx_prefetch_tune): Likewise.
16164         (thunderx2t99_prefetch_tune): Likewise.
16165         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
16166         to false.
16167         (aarch64_override_options_internal): Update to set
16168         PARAM_PREFETCH_DYNAMIC_STRIDES.
16169         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16170         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16171         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16172         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16173         prefetch-dynamic-strides setting.
16175         2018-05-07  Luis Machado  <luis.machado@linaro.org>
16177         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16178         <minimum_stride>: New const int field.
16179         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16180         minimum_stride field.
16181         (exynosm1_prefetch_tune): Likewise.
16182         (thunderxt88_prefetch_tune): Likewise.
16183         (thunderx_prefetch_tune): Likewise.
16184         (thunderx2t99_prefetch_tune): Likewise.
16185         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
16186         (aarch64_override_options_internal): Update to set
16187         PARAM_PREFETCH_MINIMUM_STRIDE.
16188         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16189         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16190         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16191         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16192         stride is constant and is below the minimum stride threshold.
16194 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16196         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
16197         to 512.
16199 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16201         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16202         <prefetch_dynamic_strides>: New const bool field.
16203         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16204         prefetch_dynamic_strides.
16205         (exynosm1_prefetch_tune): Likewise.
16206         (thunderxt88_prefetch_tune): Likewise.
16207         (thunderx_prefetch_tune): Likewise.
16208         (thunderx2t99_prefetch_tune): Likewise.
16209         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
16210         to false.
16211         (aarch64_override_options_internal): Update to set
16212         PARAM_PREFETCH_DYNAMIC_STRIDES.
16213         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16214         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16215         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16216         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16217         prefetch-dynamic-strides setting.
16219 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16221         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16222         <minimum_stride>: New const int field.
16223         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16224         minimum_stride field.
16225         (exynosm1_prefetch_tune): Likewise.
16226         (thunderxt88_prefetch_tune): Likewise.
16227         (thunderx_prefetch_tune): Likewise.
16228         (thunderx2t99_prefetch_tune): Likewise.
16229         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
16230         (aarch64_override_options_internal): Update to set
16231         PARAM_PREFETCH_MINIMUM_STRIDE.
16232         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16233         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16234         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16235         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16236         stride is constant and is below the minimum stride threshold.
16238 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
16240         PR c++/85659
16241         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
16242         the type is addressable.  Don't force op into register if it has
16243         BLKmode.
16245 2018-05-05  Roland McGrath  <mcgrathr@google.com>
16247         PR other/77609
16248         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
16249         any section for which we don't know a specific type it should have,
16250         regardless of name.  Previously this was done only for the exact
16251         names ".init_array", ".fini_array", and ".preinit_array".
16252         (default_elf_asm_named_section): Add comment about
16253         relationship with default_section_type_flags and SECTION_NOTYPE.
16254         (get_section): Don't consider it a type conflict if one side has
16255         SECTION_NOTYPE and the other doesn't, as long as neither has the
16256         SECTION_BSS et al used in the default_section_type_flags logic.
16258 2018-05-05  Tom de Vries  <tom@codesourcery.com>
16260         PR target/85653
16261         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
16262         (workaround_barsyncs): New function.
16263         (nvptx_reorg): Use workaround_barsyncs.
16264         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
16265         (define_expand "nvptx_membar_cta"): New define_expand.
16266         (define_insn "*nvptx_membar_cta"): New insn.
16268 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
16270         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
16271         To improve optimization opportunities.
16272         * builtin-types.def: The new needed builtin types for the above.
16274 2018-05-04  Richard Biener  <rguenther@suse.de>
16276         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
16277         * gimple-ssa-store-merging.c
16278         (imm_store_chain_info::output_merged_store): Remove redundant create,
16279         release split_store vector contents on failure.
16280         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
16281         scalar stmt vector on cache hit.
16283 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
16285         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
16286         Xilinx FP support.
16287         * config.gcc (powerpc-xilinx-eabi*): Remove.
16288         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
16289         support.
16290         (fusion_addis_mem_combo_load): Ditto.
16291         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
16292         FP support.
16293         (rs6000_cpu_cpp_builtins): Ditto.
16294         * config/rs6000/rs6000-linux.c
16295         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
16296         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
16297         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
16298         support.
16299         (rs6000_setup_reg_addr_masks): Ditto.
16300         (rs6000_init_hard_regno_mode_ok): Ditto.
16301         (rs6000_option_override_internal): Ditto.
16302         (legitimate_lo_sum_address_p): Ditto.
16303         (rs6000_legitimize_address): Ditto.
16304         (rs6000_legitimize_reload_address): Ditto.
16305         (rs6000_legitimate_address_p): Ditto.
16306         (abi_v4_pass_in_fpr): Ditto.
16307         (setup_incoming_varargs): Ditto.
16308         (rs6000_gimplify_va_arg): Ditto.
16309         (rs6000_split_multireg_move): Ditto.
16310         (rs6000_savres_strategy): Ditto.
16311         (rs6000_emit_prologue_components): Ditto.
16312         (rs6000_emit_epilogue_components): Ditto.
16313         (rs6000_emit_prologue): Ditto.
16314         (rs6000_emit_epilogue): Ditto.
16315         (rs6000_elf_file_end): Ditto.
16316         (rs6000_function_value): Ditto.
16317         (rs6000_libcall_value): Ditto.
16318         * config/rs6000/rs6000.h: Ditto.
16319         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
16320         (TARGET_MINMAX): ... this.  New.
16321         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
16322         * config/rs6000/rs6000.md: Remove Xilinx FP support.
16323         (*movsi_internal1_single): Delete.
16324         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
16325         mfpu=, mxilinx-fpu): Delete.
16326         * config/rs6000/singlefp.h: Delete.
16327         * config/rs6000/sysv4.h: Remove Xilinx FP support.
16328         * config/rs6000/t-rs6000: Ditto.
16329         * config/rs6000/t-xilinx: Delete.
16330         * config/rs6000/titan.md: Adjust for fp_type removal.
16331         * config/rs6000/vsx.md: Remove Xilinx FP support.
16332         (VStype_simple): Delete.
16333         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
16334         * config/rs6000/xfpu.h: Delete.
16335         * config/rs6000/xfpu.md: Delete.
16336         * config/rs6000/xilinx.h: Delete.
16337         * config/rs6000/xilinx.opt: Delete.
16338         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
16339         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
16341 2018-05-04  Tom de Vries  <tom@codesourcery.com>
16343         PR libgomp/85639
16344         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
16345         if ignore == 0.
16347 2018-05-04  Richard Biener  <rguenther@suse.de>
16349         PR middle-end/85627
16350         * tree-complex.c (update_complex_assignment): We are always in SSA form.
16351         (expand_complex_div_wide): Likewise.
16352         (expand_complex_operations_1): Likewise.
16353         (expand_complex_libcall): Preserve EH info of the original stmt.
16354         (tree_lower_complex): Handle removed blocks.
16355         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
16356         on complex multiplication and division libcall builtins.
16358 2018-05-04  Richard Biener  <rguenther@suse.de>
16360         PR middle-end/85574
16361         * fold-const.c (negate_expr_p): Restrict negation of operand
16362         zero of a division to when we know that can happen without
16363         overflow.
16364         (fold_negate_expr_1): Likewise.
16366 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
16368         PR libstdc++/85466
16369         * real.h (real_nextafter): Declare.
16370         * real.c (real_nextafter): New function.
16371         * fold-const-call.c (fold_const_nextafter): New function.
16372         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
16373         CASE_CFN_NEXTTOWARD.
16374         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
16375         even when arg1_mode is different from arg0_mode.
16377 2018-05-03  Nathan Sidwell  <nathan@acm.org>
16379         * doc/extend.texi (Deprecated Features): Remove
16380         -ffriend-injection.
16381         (Backwards Compatibility): Likewise.
16382         * doc/invoke.texi (C++ Language Options): Likewise.
16383         (C++ Dialect Options): Likewise.
16385 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
16387         PR target/85530
16388         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
16389         _mm512_mask_mullox_epi64): New intrinsics.
16391 2018-05-03  Tom de Vries  <tom@codesourcery.com>
16393         PR testsuite/85106
16394         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16395         dump files): Add offload-tree.
16397 2018-05-03  Richard Biener  <rguenther@suse.de>
16399         PR tree-optimization/85615
16400         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
16401         to loops not nested in BBs loop father to avoid creating multi-entry
16402         loops.
16404 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16406         PR tree-optimization/70291
16407         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
16408         arguments.  Change return type to tree.  Emit libcall as a new
16409         statement rather than replacing existing one when inplace_p is true.
16410         (expand_complex_multiplication_components): New function.
16411         (expand_complex_multiplication): Expand floating-point complex
16412         multiplication using the above.
16413         (expand_complex_division): Rename inner_type parameter to type.
16414         Update expand_complex_libcall call-site.
16415         (expand_complex_operations_1): Update expand_complex_multiplication
16416         and expand_complex_division call-sites.
16418 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
16420         PR target/85582
16421         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16422         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16423         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
16424         the highest significant bit of the shift count mask is clear.  In
16425         check whether and[sq]i3 is needed verify that all significant bits
16426         of the shift count other than the highest are set.
16428 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16430         PR libgomp/82428
16431         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
16432         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
16433         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
16434         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
16435         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
16436         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
16437         __builtin_goacc_parlevel_size.
16439 2018-05-02  Richard Biener  <rguenther@suse.de>
16441         PR tree-optimization/85597
16442         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
16443         do not use split vect_get_vec_defs call but call vect_get_slp_defs
16444         directly.
16446 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16448         PR testsuite/85106
16449         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16450         dump files): Add ltrans-tree.
16452 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16454         PR testsuite/85106
16455         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16456         dump files): Add wpa-ipa.
16458 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
16460         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
16461         powerpc*-*-linux*paired* target.
16462         * config/rs6000/750cl.h: Delete.
16463         * config/rs6000/paired.h: Delete.
16464         * config/rs6000/paired.md: Delete.
16465         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
16466         float support.
16467         * config/rs6000/rs6000-builtin.def: Remove paired float support.
16468         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
16469         comment.  Remove paired float support.
16470         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
16471         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
16472         VECTOR_PAIRED.
16473         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
16474         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
16475         declarations.
16476         * config/rs6000/rs6000.c: Remove paired float support.
16477         (paired_expand_vector_init, paired_expand_vector_move,
16478         paired_emit_vector_compare, paired_emit_vector_cond_expr,
16479         (paired_expand_lv_builtin, paired_expand_stv_builtin,
16480         paired_expand_builtin, paired_expand_predicate_builtin,
16481         paired_init_builtins): Delete.
16482         * config/rs6000/rs6000.h: Remove paired float support.
16483         * config/rs6000/rs6000.md: Remove paired float support.
16484         (move_from_CR_ov_bit): Delete.
16485         * config/rs6000/rs6000.opt (mpaired): Delete.
16486         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
16487         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
16489 2018-05-02  Richard Biener  <rguenther@suse.de>
16491         PR middle-end/85567
16492         * gimplify.c (gimplify_save_expr): When in SSA form allow
16493         SAVE_EXPRs to compute to SSA vars.
16495 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
16497         PR target/85582
16498         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16499         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16500         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
16501         clobber operands[2], instead use a new pseudo.  Formatting fixes.
16503 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
16505         PR tree-optimization/85586
16506         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
16507         exit early for statements in the same group if the accesses are
16508         not strided.
16510 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16512         PR lto/85451
16513         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
16514         error message.
16516 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
16518         PR tree-optimization/85143
16519         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
16521 2018-05-01  Tom de Vries  <tom@codesourcery.com>
16523         PR lto/85451
16524         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
16525         not found" error message.
16527 2018-05-01  Tom de Vries  <tom@codesourcery.com>
16529         PR other/83786
16530         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
16531         * vec.c (test_ordered_remove_if): New function.
16532         (vec_c_tests): Call test_ordered_remove_if.
16533         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
16534         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
16535         * tree-vect-patterns.c (vect_pattern_recog_1): Use
16536         VEC_ORDERED_REMOVE_IF.
16538 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16540         PR tree-optimization/82665
16541         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
16542         pointer subtraction where arguments come from a memchr call.
16544 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
16546         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
16547         --push-state --as-needed and --pop-state instead of --as-needed and
16548         --no-as-needed if ld supports it.
16549         * configure: Regenerated.
16551         PR web/85578
16552         * doc/install.texi2html: Replace _002d with - and _002a with * in
16553         generated html files using sed.
16555 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16557         PR c++/85523
16558         * gcc-rich-location.c (blank_line_before_p): New function.
16559         (use_new_line): New function.
16560         (gcc_rich_location::add_fixit_insert_formatted): New function.
16561         * gcc-rich-location.h
16562         (gcc_rich_location::add_fixit_insert_formatted): New function.
16564 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16566         * selftest.c (assert_streq): Rename "expected" and "actual" to
16567         "val1" and "val2".  Extend NULL-handling to cover both inputs
16568         symmetrically, while still requiring both to be non-NULL for a pass.
16569         * selftest.h (assert_streq): Rename "expected" and "actual" to
16570         "val1" and "val2".
16571         (ASSERT_EQ): Likewise.
16572         (ASSERT_EQ_AT): Likewise.
16573         (ASSERT_KNOWN_EQ): Likewise.
16574         (ASSERT_KNOWN_EQ_AT): Likewise.
16575         (ASSERT_NE): Likewise.
16576         (ASSERT_MAYBE_NE): Likewise.
16577         (ASSERT_MAYBE_NE_AT): Likewise.
16578         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
16579         the assertion to pass.
16580         (ASSERT_STREQ_AT): Likewise.
16582 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
16584         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
16585         interaction with -pie.
16587 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16589         * selftest.h: Fix alphabetization of per-source-file selftest
16590         declarations.
16592 2018-04-30  Jason Merrill  <jason@redhat.com>
16594         PR c++/61982 - dead stores to destroyed objects.
16595         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
16596         of clobber.
16598 2018-04-30  Jason Merrill  <jason@redhat.com>
16600         * tree.c (build_clobber): New.
16601         * tree.h: Declare it.
16602         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
16604 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16606         * diagnostic-show-locus.c (layout::layout): Update for
16607         location_get_source_line returning a char_span.
16608         (struct char_span): Move to input.h.
16609         (struct correction): Update for fields in char_span becoming
16610         private.
16611         (struct source_line): Update for location_get_source_line
16612         returning a char_span.
16613         (layout::print_line): Likewise.
16614         * edit-context.c (edited_file::print_content): Likewise.
16615         (edited_file::print_diff_hunk): Likewise.
16616         (edited_file::print_run_of_changed_lines): Likewise.
16617         (edited_file::get_num_lines): Likewise.
16618         (edited_line::edited_line): Likewise.
16619         * final.c (asm_show_source): Likewise.
16620         * input.c (location_get_source_line): Convert return type
16621         from const char * to char_span, losing the final "line_len"
16622         param.
16623         (dump_location_info): Update for the above.
16624         (get_substring_ranges_for_loc): Likewise.  Use a char_span
16625         when handling the literal within the line.
16626         (test_reading_source_line): Update for location_get_source_line
16627         returning a char_span.
16628         * input.h (class char_span): Move here from
16629         diagnostic-show-locus.c, converting from a struct to a class.
16630         Make data members private.
16631         (char_span::operator bool): New.
16632         (char_span::length): New.
16633         (char_span::get_buffer): New.
16634         (char_span::operator[]): New.
16635         (char_span::subspan): Make const.
16636         (char_span::xstrdup): New.
16637         (location_get_source_line): Convert return type from const char *
16638         to char_span, losing the final "line_size" param.
16640 2018-04-30  Jan Hubicka  <jh@suse.cz>
16642         * lto-wrapper.c (ltrans_priorities): New static var.
16643         (cmp_priority): New.
16644         (run_gcc): Read priorities and if doing parallel build order
16645         the Makefile by them.
16647 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16649         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
16651 2018-04-30  Richard Biener  <rguenther@suse.de>
16653         * tree-cfg.c (verify_address): Remove base argument, add
16654         flag whether to check TREE_ADDRESSABLE and do that.
16655         (verify_expr): Remove.
16656         (verify_types_in_gimple_reference): Add pieces from verify_expr.
16657         (verify_gimple_assign_single): Likewise.
16658         (verify_gimple_switch): Likewise.
16659         (verify_expr_location_1): Dereference tp once.  Add (disabled)
16660         piece from verify_expr.
16661         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
16663 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
16665         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
16667 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
16669         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
16670         (small_data_pattern): Likewise.
16671         (arc_rewrite_small_data): Likewise.
16672         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
16673         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
16674         (get_symbol_alignment): New function.
16675         (legitimate_small_data_address_p): Likewise.
16676         (legitimate_scaled_address): Update, call
16677         legitimate_small_data_address_p.
16678         (output_sdata): New static variable.
16679         (arc_print_operand): Update how we handle small data operands.
16680         (arc_print_operand_address): Likewise.
16681         (arc_legitimate_address_p): Update, use
16682         legitimate_small_data_address_p.
16683         (arc_rewrite_small_data_p): Remove.
16684         (arc_rewrite_small_data_1): Likewise.
16685         (arc_rewrite_small_data): Likewise.
16686         (small_data_pattern): Likewise.
16687         (compact_sda_memory_operand): Update to use
16688         legitimate_small_data_address_p and get_symbol_alignment.
16689         (prepare_move_operands): Don't rewite sdata pattern.
16690         (prepare_extend_operands): Remove.
16691         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
16692         pattern.
16693         (zero_extendqisi2): Likewise.
16694         (zero_extendhisi2): Likewise.
16695         (extendqihi2): Likewise.
16696         (extendqisi2): Likewise.
16697         (extendhisi2): Likewise.
16698         (addsi3): Likewise.
16699         (subsi3): Likewise.
16700         (andsi3): Likewise.
16701         * config/arc/constraints.md (Usd): Change it to memory constraint.
16703 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
16705         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
16706         as source of std instructions.
16707         * config/arc/arc.md (movsi_insn): Update pattern predicate to
16708         allow 6-bit constants as source for store instructions.
16709         (movdi_insn): Update instruction pattern to allow 6-bit constants
16710         as source for store instructions.
16712 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
16714         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
16716 2018-04-30  Nathan Sidwell  <nathan@acm.org>
16717             Sandra Loosemore <sandra@codesourcery.com>
16719         * dumpfile.c (dump_open): Allow '-' for stdout.
16720         * doc/invoke.texi (Developer Options): Document dump filename
16721         determination early.  Document stdin/stdout selection.
16723 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
16725         Microblaze Target: PIC data text relative
16727         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
16728         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
16729         Add declaration.
16730         * config/microblaze/microblaze.h (microblaze_constant_address_p):
16731         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
16732         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
16733         New addressing mode for data-text relative position indepenedent code.
16734         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
16735         'ADDRESS_SYMBOLIC_TXT_REL'.
16736         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
16737         (microblaze_legitimate_pic_operand): Exclude function calls from
16738         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
16739         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
16740         addresses cases.
16741         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16742         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16743         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
16744         for 'address + offset'.
16745         (microblaze_expand_prologue): Add new function prologue call for
16746         'r20' assignation.
16747         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
16748         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
16749         table in case of TARGET_PIC_DATA_TEXT_REL.
16750         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
16751         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
16752         Add new macros 'UNSPEC_TEXT',
16753         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
16754         + exclude function calls from 'UNSPEC_PLT' in case of data text
16755         relative mode.
16756         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16757         new target hook for generating address diff vector tables in case of
16758         flag_pic.
16759         * doc/tm.texi : Regenerate.
16760         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
16761         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
16762         of addr diff vector generation.
16763         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16764         target hook definition.
16765         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
16766         Add default function for generate_pic_addr_diff_vec -> flag_pic.
16767         * doc/invoke.texi (Add new pic option): Add new microblaze pic
16768         option for data text relative.
16770 2018-04-30  Richard Biener  <rguenther@suse.de>
16772         * tree-chrec.h (evolution_function_is_constant_p): Remove
16773         redundant check.
16774         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
16776 2018-04-30  Richard Biener  <rguenther@suse.de>
16778         PR bootstrap/85571
16779         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
16781 2018-04-30  Richard Biener  <rguenther@suse.de>
16783         PR tree-optimization/28364
16784         PR tree-optimization/85275
16785         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
16786         copying first exit test.
16788 2018-04-28  Mark Wielaard  <mark@klomp.org>
16790         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
16791         dwarf_version >= 5.
16792         (dwarf_AT): Handle DW_AT_addr_base.
16793         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
16795 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
16797         PR target/84431
16798         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
16799         (*ashl<dwi>3_doubleword_mask_1): Ditto.
16800         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
16801         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
16803 2018-04-28  Richard Biener  <rguenther@suse.de>
16805         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
16806         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
16807         to reflect use.  Only add interesting stmts.
16809 2018-04-27  Martin Jambor  <mjambor@suse.cz>
16811         PR ipa/85549
16812         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
16813         the jump function allows for passing through aggregate values.
16815 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
16817         * input.h (in_system_header_at): Convert from macro to inline
16818         function.
16819         (from_macro_expansion_at): Likewise.
16820         (from_macro_definition_at): Likewise.
16822 2018-04-27  Jeff Law  <law@redhat.com>
16824         * config.gcc: Mark tile* targets as deprecated/obsolete.
16826 2018-04-27  Richard Biener  <rguenther@suse.de>
16828         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
16829         fix for ILP32.
16831 2018-04-27  Richard Biener  <rguenther@suse.de>
16833         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
16835 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
16837         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
16838         with Yd constraint. Set "preferred_for_speed" attribute from
16839         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
16840         with Yd constraint.
16841         (*movdi_internal): Ditto.
16842         (movti_interunit splitters): Remove
16843         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
16844         (movdi_interunit splitters): Ditto.
16845         * config/i386/constraints.md (Ye): Remove.
16846         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
16848 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16850         PR target/85512
16851         * config/aarch64/constraints.md (Usg): Limit to 31.
16852         (Usj): Limit to 63.
16854 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
16856         PR tree-optimization/85529
16857         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
16858         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
16859         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
16860         zero extension or masking of the MSB bit.
16861         (optimize_range_tests): Add FIRST_BB argument, pass it through
16862         to optimize_range_tests_var_bound.
16863         (maybe_optimize_range_tests, reassociate_bb): Adjust
16864         optimize_range_tests callers.
16866 2018-04-26  Richard Biener  <rguenther@suse.de>
16867             Jakub Jelinek  <jakub@redhat.com>
16869         * cgraph.h (symbol_table): Just declare debug method here.
16870         * symtab.c (symbol_table::debug): Define.
16872 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
16874         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
16876 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
16878         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
16879         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
16880         (*movdi_internal): Substitute Yi and Yj constraint with x
16881         and Ym and Yn constraint with y constraint.  Update "isa"
16882         attribute and set "preferred_for_speed" attribute from
16883         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
16884         (*movsi_internal): Ditto.
16885         (*movdf_internal): Ditto.
16886         (*movsf_internal): Ditto.
16887         (*zero_extendsidi2): Ditto.
16888         * config/i386/sse.md (vec_set<mode>_0): Ditto.
16889         (sse2_loadld): Ditto.
16890         (*vec_extract<ssevecmodelower>_0): Ditto.
16891         (*vec_extractv4si_0_zext_sse4): Ditto.
16892         (vec_concatv2di): Ditto.
16893         (*vec_dup<mode>): Ditto.
16894         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
16895         * config/i386/constraints.md (Yi): Remove.
16896         (Yj): Remove.
16897         (Ym): Remove.
16898         (Yn): Remove.
16900 2018-04-26  Nathan Sidwell  <nathan@acm.org>
16902         * dumpfile.c (dump_open): New.
16903         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
16904         (dump_finish): Detect stdio/stderr by value not name.
16906 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
16908         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
16910 2018-04-26  Tom de Vries  <tom@codesourcery.com>
16912         PR target/84952
16913         * config/nvptx/nvptx.c (verify_neutering_jumps)
16914         (verify_neutering_labels): New function
16915         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
16917 2018-04-26  Tom de Vries  <tom@codesourcery.com>
16919         PR target/84025
16920         * config/nvptx/nvptx.c (needs_neutering_p): New function.
16921         (nvptx_single): Use needs_neutering_p to skip over insns that do not
16922         need neutering.
16924 2018-04-26  Richard Biener <rguenther@suse.de>
16925             Tom de Vries  <tom@codesourcery.com>
16927         PR lto/85422
16928         * lto-streamer-out.c (output_function): Fixup loops if required to match
16929         discovery done in the reader.
16931 2018-04-26  Richard Biener  <rguenther@suse.de>
16933         PR tree-optimization/85116
16934         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
16935         have a loop exit from the single latch predecessor.  Remove
16936         case of header with just condition.
16937         (ch_base::copy_headers): Exclude infinite loops from any
16938         processing.
16939         (pass_ch::execute): Record exits.
16941 2018-04-26  Richard Biener  <rguenther@suse.de>
16943         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
16944         prologue cost vector and pass it to vect_get_load_cost.
16945         (vect_get_peeling_costs_all_drs): Likewise.
16946         (vect_peeling_hash_get_lowest_cost): Likewise.
16947         (vect_enhance_data_refs_alignment): Likewise.
16949 2018-04-26  Richard Biener  <rguenther@suse.de>
16951         PR middle-end/85450
16952         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
16953         checking of integer<->pointer conversions.
16954         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
16955         sign-/zero-extending pointer types.
16956         (expand_omp_for_static_chunk): Likewise.
16958 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
16959             Jean Lee  <xiaoyur347@gmail.com>
16961         * config/mips/mips.c (mips_asan_shadow_offset): New function.
16962         (TARGET_ASAN_SHADOW_OFFSET): Define.
16963         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
16964         true for -fsanitize=address.
16966 2018-04-25  Mark Wielaard  <mark@klomp.org>
16968         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
16969         shorter ones.
16971 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
16973         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
16974         than "alu", remove explicit "memory" and "imm_disp" attributes.
16975         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
16977         PR middle-end/85414
16978         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
16979         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
16980         gen_lowpart_no_emit.
16982 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
16984         PR target/85473
16985         * config/i386/i386.c (ix86_expand_builtin): Change memory
16986         operand to XI, extend p0 to Pmode.
16987         * config/i386/i386.md: Change unspec volatile and operand
16988         1 mode to XI, change operand 0 mode to P.
16990 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16992         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
16993         GET_MODE_MASK before any checking.
16994         (nds32_can_use_bset_p): Likewise.
16995         (nds32_can_use_btgl_p): Likewise.
16997 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16999         * config/nds32/nds32-doubleword.md: New define_split pattern for
17000         illegal register number.
17002 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
17004         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
17006 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
17008         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
17010 2018-04-25  Richard Biener  <rguenther@suse.de>
17012         * lto-streamer.h (LTO_major_version): Bump to 8.
17014 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
17016         * BASE-VER: Set to 9.0.0.
17018 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
17020         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
17021         in __abskf2 and __powikf2.
17023 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17025         PR target/85512
17026         * config/aarch64/constraints.md (Usg, Usj): New constraints.
17027         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
17028         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
17029         Use the above on operand 2.  Reindent.
17030         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
17032 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
17034         PR target/85485
17035         * common/config/i386/i386-common.c (ix86_handle_option): Don't
17036         handle OPT_mcet.
17037         * config/i386/i386.opt (mcet): Removed.
17038         * doc/install.texi: Remove -mcet documentation.
17039         * doc/invoke.texi: Likewise.
17041 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
17043         PR target/85485
17044         * doc/install.texi: Remove -mcet from bootstrap-cet.
17046 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
17048         PR target/85511
17049         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
17050         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
17051         if TARGET_64BIT.
17053         PR target/85503
17054         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
17055         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
17056         containing a CONST_VECTOR.
17058 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
17060         * doc/install.texi: Update newlib dependency for nvptx.
17062 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
17064         PR target/85508
17065         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
17066         instead of INTVAL when shifting x left.
17068 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
17070         PR tree-optimization/85478
17071         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
17072         vect_grouped_store_supported for single element vectors.
17074 2018-04-24  Richard Biener  <rguenther@suse.de>
17076         PR target/85491
17077         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
17078         load cost increase to the case of non-constant step.
17080 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
17082         PR target/84828
17083         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
17084         destination if any_malformed_asm.
17086 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
17088         PR middle-end/85496
17089         * expr.c (store_field): In the bitfield case, if the value comes from
17090         a function call and is returned in registers by means of a PARALLEL,
17091         do not change the mode of the temporary unless BLKmode and VOIDmode.
17093 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
17095         PR rtl-optimization/85423
17096         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
17097         dependencies to debug insns when the previous insn is non-debug.
17099 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
17101         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
17102         enums into a single definition.
17103         (fls): Fix predicates and printing.
17104         (seti): Likewise.
17106 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
17108         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
17109         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
17110         and short u6 immediate.
17111         (check_if_valid_sleep_operand): Remove.
17112         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
17114 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17116         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
17117         flag_always_save_lp condition.
17118         * config/nds32/nds32.opt (malways-save-lp): New option.
17120 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
17122         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
17123         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
17124         * config/nds32/nds32.h
17125         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
17126         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
17128 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
17130         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
17131         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
17133 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
17134             Chung-Ju Wu  <jasonwucj@gmail.com>
17136         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
17137         Declare.
17138         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
17139         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
17141 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17143         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
17145 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17147         * config/nds32/nds32-protos.h (nds32_data_alignment,
17148         nds32_local_alignment): Declare.
17149         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
17150         nds32_local_alignment): New functions.
17151         (TARGET_CONSTANT_ALIGNMENT): Define.
17152         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
17154 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17156         * config/nds32/nds32.c
17157         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
17158         (TARGET_MODES_TIEABLE_P): Likewise.
17160 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17162         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
17163         level Ofast and Og.
17165 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
17166             Chung-Ju Wu  <jasonwucj@gmail.com>
17168         * config/nds32/constants.md (unspec_volatile_element): Add enum values
17169         for unaligned access.
17170         * config/nds32/nds32-intrinsic.c: Implementation of expanding
17171         unaligned access.
17172         * config/nds32/nds32-intrinsic.md: Likewise.
17173         * config/nds32/nds32_intrinsic.h: Likewise.
17174         * config/nds32/nds32.h (nds32_builtins): Likewise.
17175         * config/nds32/nds32.opt (munaligned-access): New option.
17176         * config/nds32/nds32.c (nds32_asm_file_start): Display
17177         flag_unaligned_access status.
17179 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
17181         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
17182         -mno-relax is present.
17183         * config/riscv/linux.h (LINK_SPEC): Ditto.
17185 2018-04-20  Martin Sebor  <msebor@redhat.com>
17187         PR c/85365
17188         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
17189         for null pointers.
17190         (gimple_fold_builtin_stxcpy_chk): Same.
17191         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
17193 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
17195         PR target/85456
17196         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
17197         __powikf2 when long double is IEEE 128-bit.
17199 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
17201         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
17202         step to make sure stack always aligned.
17204 2018-04-20  Carl Love  <cel@us.ibm.com>
17206         PR target/83402
17207         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
17208         size check for arg0.
17210 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
17211             Tom de Vries  <tom@codesourcery.com>
17213         PR target/85445
17214         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
17215         Emit insns for calls too.
17216         (nvptx_find_par): Always look for worker-level predecessor insn.
17217         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
17218         calls.
17219         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
17220         (nvptx_process_pars): Propagate frames for calls.
17222 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
17224         PR target/85469
17225         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
17226         Removed.
17227         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
17228         (ix86_handle_option): Don't handle OPT_mibt.
17229         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
17230         __SHSTK__.
17231         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
17232         has_ibt and ibt.
17233         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
17234         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
17235         (ix86_target_macros): Define __CET__ with flag_cf_protection
17236         for -fcf-protection.
17237         * config/i386/i386.c (isa2_opts): Remove -mibt.
17238         * config/i386/i386.h (TARGET_IBT): Removed.
17239         (TARGET_IBT_P): Likewise.
17240         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
17241         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
17242         * config/i386/i386.opt (mcet): Update help message.
17243         (mshstk): Likewise.
17244         (mibt): Removed.
17245         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
17246         -mcet as an alias for -mshstk.
17248 2018-04-20  Richard Biener <rguenther@suse.de>
17250         PR middle-end/85475
17251         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
17252         complexity by forcing a single use of the multiply operand.
17254 2018-04-20  Martin Jambor  <mjambor@suse.cz>
17256         ipa/85449
17257         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
17258         recursion dependency to only apply to non-clones.
17260 2018-04-20  Martin Jambor  <mjambor@suse.cz>
17262         ipa/85447
17263         * ipa-cp.c (create_specialized_node): Check that clones of
17264         self-recursive edges exist during IPA-CP.
17266 2018-04-19  Toon Moene  <toon@moene.org>
17268         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
17269         by -O3.
17271 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
17273         PR tree-optimization/85467
17274         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
17275         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
17276         VECTOR_CST element to type.
17278 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
17280         PR target/85397
17281         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
17282         * config/i386/i386.md (builtin_setjmp_setup): Removed.
17283         (builtin_longjmp): Likewise.
17284         (save_stack_nonlocal): New pattern.
17285         (restore_stack_nonlocal): Likewise.
17287 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
17289         PR target/85404
17290         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17291         Replace ASM_OUTPUT_LABEL with fprintf.
17293 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
17295         PR target/85417
17296         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17297         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
17298         * config/i386/i386-c.c (ix86_target_macros_internal): Also
17299         define __IBT__ and __SHSTK__ for -fcf-protection.
17300         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
17301         TARGET_IBT.
17302         (ix86_trampoline_init): Likewise.
17303         (x86_output_mi_thunk): Likewise.
17304         (ix86_notrack_prefixed_insn_p): Likewise.
17305         (ix86_option_override_internal): Don't disallow -fcf-protection.
17306         * config/i386/i386.md (rdssp<mode>): Also enable for
17307         -fcf-protection.
17308         (incssp<mode>): Likewise.
17309         (nop_endbr): Likewise.
17310         * config/i386/i386.opt (mcet): Change help message to built-in
17311         functions only.
17312         (mibt): Likewise.
17313         (mshstk): Likewise.
17314         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
17315         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
17316         enable CET built-in functions.
17318 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
17320         * common/config/i386/i386-common.c
17321         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
17322         OPTION_MASK_ISA_MOVDIRI_UNSET,
17323         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
17324         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
17325         * config.gcc (movdirintrin.h): New header.
17326         * config/i386/cpuid.h (bit_MOVDIRI,
17327         bit_MOVDIR64B): New bits.
17328         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
17329         and -mmvodir64b.
17330         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
17331         (VOID, PVOID, PCVOID)): New function types.
17332         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
17333         __builtin_ia32_directstoreu_u64,
17334         __builtin_ia32_movdir64b): New builtins.
17335         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
17336         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
17337         and -mmovdiri.
17338         (ix86_valid_target_attribute_inner_p): Ditto.
17339         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
17340         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
17341         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
17342         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
17343         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
17344         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
17345         (movdiri<mode>, movdir64b_<mode>): New.
17346         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
17347         * config/i386/immintrin.h: Include movdirintrin.h.
17348         * config/i386/movdirintrin.h: New file.
17349         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
17351 2018-04-19  Richard Biener  <rguenther@suse.de>
17353         PR middle-end/85455
17354         * cfg.c (clear_bb_flags): When loop state says we have
17355         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
17357 2018-04-19  Richard Biener  <rguenther@suse.de>
17359         PR tree-optimization/84737
17360         * tree-vect-data-refs.c (vect_copy_ref_info): New function
17361         copying restrict info.
17362         (vect_setup_realignment): Use it.
17363         * tree-vectorizer.h (vect_copy_ref_info): Declare.
17364         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
17365         the first DR to all generated stores.
17366         (vectorizable_load): Likewise for loads.
17368 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
17370         PR tree-optimization/85446
17371         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
17372         the integral and pointer types to have the same precision.
17374         * doc/install.texi: Document --disable-cet being the default and
17375         --enable-cet=auto.
17377 2018-04-18  Martin Liska  <mliska@suse.cz>
17379         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
17380         style.
17382 2018-04-18  Martin Liska  <mliska@suse.cz>
17384         Revert
17385         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
17387         PR ipa/83983
17388         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17389         arguments if they are comparable.
17391 2018-04-18  Martin Liska  <mliska@suse.cz>
17393         Revert
17394         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
17396         PR lto/84805
17397         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17398         incomplete types.
17400 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
17402         PR target/85388
17403         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
17404         ENDBR after calling __morestack.
17406 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
17408         PR jit/85384
17409         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
17410         by using gcc_base_ver to generate a gcc_driver_version, and use
17411         it when generating GCC_DRIVER_NAME.
17412         * configure: Regenerate.
17414 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
17416         PR target/81084
17417         * config.gcc: Obsolete powerpc*-*-*spe*.
17419 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17421         PR debug/84637
17422         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
17423         (stabstr_D): Change type of unum from unsigned int to
17424         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
17425         type.
17427 2018-04-17  Jim Wilson  <jimw@sifive.com>
17429         PR 84856
17430         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
17431         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
17432         Set arg_pointer_offset after using pretend_args_size.
17434 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17436         PR rtl-optimization/85431
17437         * dse.c (record_store): Ignore zero width stores.
17439         PR sanitizer/85230
17440         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
17441         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
17442         __builtin_stack_restore rather than after it.
17443         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
17444         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
17445         argument instead of virtual_dynamic_stack_rtx.
17447 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17449         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
17450         New prototype.
17451         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
17452         Add note to error message to explain internal mapping of overloaded
17453         built-in function name to non-overloaded built-in function name.
17454         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
17455         function.
17457 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
17459         PR target/85424
17460         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
17461         where the inputs overlap with the output.
17463 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17465         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
17466         (=v, v) alternative and explicit "memory" attribute.
17467         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
17468         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17469         attributes.
17470         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
17471         "sselog1" type instead of "sselog".
17472         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
17473         "sselog".  Remove explicit "memory" attribute.
17474         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
17475         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17476         attributes.
17477         (vec_extract_hi_v32hi): Merge all alternatives into one, use
17478         "sselog1" type instead of "sselog".  Remove explicit "memory"
17479         attribute.
17480         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
17481         use "sselog1" type instead of "sselog".  Remove explicit "memory"
17482         attribute.
17483         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
17484         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17485         attributes.
17486         (vec_extract_hi_v64qi): Merge all alternatives into one, use
17487         "sselog1" type instead of "sselog".  Remove explicit "memory"
17488         attribute.
17489         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
17490         use "sselog1" type instead of "sselog".  Remove explicit "memory"
17491         attribute.
17493         PR target/85430
17494         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
17496         PR middle-end/85414
17497         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
17498         on a SUBREG.
17500 2018-04-17  Martin Jambor  <mjambor@suse.cz>
17502         PR ipa/85421
17503         * ipa-cp.c (create_specialized_node): Call
17504         expand_all_artificial_thunks if necessary.
17506 2018-04-17  Martin Liska  <mliska@suse.cz>
17508         PR lto/85405
17509         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
17510         in message, remote space in between '_G' and '('.
17512 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17514         PR target/85281
17515         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
17516         avx512f_vmcmp<mode>3<round_saeonly_name>,
17517         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
17518         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
17519         avx512f_rndscale<mode><round_saeonly_name>,
17520         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
17521         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
17522         Use %<iptr>2 instead of %2 for -masm=intel.
17523         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
17524         avx512f_vcvttss2usi<round_saeonly_name>,
17525         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
17526         -masm=intel.
17527         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
17528         avx512f_vcvttsd2usi<round_saeonly_name>,
17529         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
17530         Use %q1 instead of %1 for -masm=intel.
17531         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
17532         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
17533         of %3 for -masm=intel.
17534         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
17535         -masm=intel.
17536         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
17537         -masm=intel.
17538         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
17539         -masm=intel.
17540         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
17541         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
17542         %g1.
17543         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
17544         -masm=intel.
17545         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
17546         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
17547         %g1 and one with %0 and %1.
17548         (avx512er_vmrcp28<mode><round_saeonly_name>,
17549         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
17550         %1 for -masm=intel.
17551         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
17552         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
17553         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
17554         of %0 and %{%4%} for -masm=intel.
17555         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
17556         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
17557         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
17558         order of %0 and %{%5%}%{z%} for -masm=intel.
17560 2018-04-17  Jan Hubicka  <jh@suse.cz>
17562         PR lto/85405
17563         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
17565 2018-04-17  Martin Liska  <mliska@suse.cz>
17567         PR ipa/85329
17568         * multiple_target.c (create_dispatcher_calls): Set apostrophes
17569         for target_clone error message.  Make default implementation
17570         clone to be a local declaration.
17571         (separate_attrs): Add new argument and check for an empty
17572         string.
17573         (expand_target_clones): Handle it.
17574         (ipa_target_clone): Make redirection just for target_clones
17575         functions.
17577 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
17578             Tom de Vries  <tom@codesourcery.com>
17580         PR middle-end/84955
17581         * omp-expand.c (expand_oacc_for): Add dummy false branch for
17582         tiled basic blocks without omp continue statements.
17584 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
17586         PR target/83660
17587         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
17588         vec_extract expression as having side effects to make sure it gets
17589         a cleanup point.
17591 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
17593         PR target/85403
17594         * config/i386/i386.c (get_builtin_code_for_version): Check
17595         error_mark_node.
17597 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
17599         PR target/84331
17600         * config.gcc: Support "skylake".
17601         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17602         PROCESSOR_SKYLAKE.
17603         * config/i386/i386.c (m_SKYLAKE): Define.
17604         (processor_target_table): Add "skylake".
17605         (ix86_option_override_internal): Add "skylake".
17606         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
17607         PROCESSOR_CANNONLAKE.
17608         (get_builtin_code_for_version): Fix priority for
17609         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
17610         PROCESSOR_SKYLAKE-AVX512.
17611         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
17612         (processor_type): Add PROCESSOR_SKYLAKE.
17614 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
17615             Jason Merrill  <jason@redhat.com>
17617         PR c++/85112
17618         * convert.c (convert_to_integer_1): Use direct recursion for
17619         enumeral types and types with a precision less than the number
17620         of bits in their mode.
17622 2018-04-16  Julia Koval  <julia.koval@intel.com>
17624         PR target/84413
17625         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
17626         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
17628 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
17630         PR target/85293
17631         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
17632         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
17633         and -mno-direct-move.
17635 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
17637         PR target/83402
17638         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
17639         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
17640         Ensure negative shifts result in {0}.
17642 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
17644         PR rtl-optimization/79916
17645         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
17646         regs (if any) to define how to gnerate SD moves when LRA is in
17647         progress.
17649 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
17651         PR rtl-optimization/85393
17652         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
17653         * except.c (expand_dw2_landing_pad_for_region): Make static.
17654         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
17655         a label and unconditional jump to old_bb, rather than
17656         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
17657         basic block.
17659         PR rtl-optimization/85376
17660         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
17661         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
17662         instead of a specific value.
17664 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
17665             Bin Cheng  <bin.cheng@arm.com>
17667         PR tree-optimization/82965
17668         PR tree-optimization/83991
17669         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
17670         by_profile_only parameter.
17671         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
17672         information if the loop was predicted to iterate too many times.
17673         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
17675 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
17677         PR lto/71991
17678         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
17679         always inline.
17681 2018-04-13  Martin Liska  <mliska@suse.cz>
17682             Jakub Jelinek  <jakub@redhat.com>
17684         PR middle-end/81657
17685         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
17686         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
17687         * builtins.c (expand_builtin_memory_copy_args): Use
17688         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
17689         handle dest_addr == pc_rtx.
17691 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
17693         PR target/85291
17694         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
17695         asked to not generate direct moves.
17696         (fix_trunc<mode>si2_stfiwx): Similar.
17697         (fix_trunc<mode>si2_internal): Similar.
17699 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
17701         PR debug/83157
17702         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
17703         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
17704         lookup if dest in some wider mode is known to be const0_rtx and
17705         if so, record permanent equivalence for it to be ZERO_EXTEND of
17706         the narrower mode destination.
17708 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
17710         * lto-streamer-out.c (output_function): Revert 259346.
17711         * omp-expand.c (expand_oacc_for): Likewise.
17713 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
17715         PR rtl-optimization/85354
17716         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
17717         * sel-sched.c (sel_global_init): ... here.
17719 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
17721         PR target/85238
17722         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
17723         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
17724         mode for PE-COFF targets.
17725         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
17726         (i386_pe_asm_lto_end): Likewise.
17727         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
17728         (TARGET_ASM_LTO_END): Likewise.
17729         * config/i386/winnt.c (saved_debug_info_level): New static variable.
17730         (i386_pe_asm_lto_start): New function.
17731         (i386_pe_asm_lto_end): Likewise.
17733 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
17734             Richard Biener  <rguenther@suse.de>
17736         PR middle-end/84955
17737         * lto-streamer-out.c (output_function): Fix CFG loop state before
17738         streaming out.
17739         * omp-expand.c (expand_oacc_for): Handle calls to internal
17740         functions like regular functions.
17742 2018-04-12  Richard Biener  <rguenther@suse.de>
17744         PR lto/85371
17745         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
17746         for the early LTO debug to properly generate references to it
17747         during DIE emission.  Do not re-use that for the skeleton for
17748         split-dwarf.
17749         (dwarf2out_early_finish): Likewise.
17751 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
17753         PR target/85328
17754         * config/i386/sse.md
17755         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
17756         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
17757         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
17758         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
17759         and output is a reg, avoid creating invalid lowpart subreg, but
17760         instead split into a 512-bit move.  Don't split if not AVX512VL,
17761         input is xmm16+ reg and output is a mem.
17762         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
17763         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
17764         xmm16+ reg and output is a mem.
17766 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17768         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
17769         also for flag_dwarf2_cfi_asm.
17771 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
17773         PR rtl-optimization/85342
17774         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
17775         a bool scalar var inside of the loop instead.  Don't try to update
17776         recog_data.operand after failed apply_change_group.
17778 2018-04-12  Tom de Vries  <tom@codesourcery.com>
17780         PR target/85296
17781         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
17782         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
17783         array with flexible array member as array without given dimension.
17784         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
17785         argument for undefined param to true.
17787 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
17789         PR target/85321
17790         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17791         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
17792         from PowerPC section.
17793         * config/rs6000/sysv4.opt (mcall-): Improve help text.
17794         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
17795         help text that is too long.
17796         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
17797         help text that is too long.
17798         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
17799         help text that is too long.
17801 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
17803         * config/alpha/alpha.md (stack_probe_internal): Rename
17804         from "probe_stack".  Update all callers.
17806 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
17808         PR rtl-optimization/84566
17809         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
17810         sched_macro_fuse_insns.
17812 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
17814         PR target/84301
17815         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
17816         (compute_block_dependences): ... from here.
17818 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
17820         PR tree-optimization/85331
17821         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
17822         from int to HOST_WIDE_INT.
17824 2018-04-11  Martin Jambor  <mjambor@suse.cz>
17826         PR ipa/84149
17827         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
17828         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
17829         not the same as the source val.
17830         (cgraph_edge_brings_value_p): New parameter.
17831         (gather_edges_for_value): Pass destination value to
17832         cgraph_edge_brings_value_p.
17833         (perhaps_add_new_callers): Likewise.
17834         (get_info_about_necessary_edges): Likewise and exclude values brought
17835         only by self-recursive edges.
17836         (create_specialized_node): Redirect only clones of self-calling edges.
17837         (+self_recursive_pass_through_p): New function.
17838         (find_more_scalar_values_for_callers_subset): Use it.
17839         (find_aggregate_values_for_callers_subset): Likewise.
17840         (known_aggs_to_agg_replacement_list): Removed.
17841         (decide_whether_version_node): Re-calculate known constants for all
17842         remaining context clones.
17844 2018-04-11  Richard Biener  <rguenther@suse.de>
17846         PR lto/85339
17847         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
17848         from early DWARF output.
17849         (dwarf2out_early_finish): Output line info unconditionally into
17850         early DWARF and add reference to it.
17852 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
17854         PR target/85281
17855         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
17856         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
17857         other than V2DFmode using iptr mode attribute.
17858         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
17860 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
17862         PR rtl-optimization/84659
17863         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
17865 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
17867         PR debug/85302
17868         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
17869         SIZEP is NULL.
17870         (output_loc_list): Pass address of a dummy size variable even in the
17871         locview handling loop.
17872         (index_location_lists): Add comment on why skip_loc_list_entry can't
17873         call size_of_locs.
17875 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17877         PR target/85261
17878         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
17879         into register.
17881 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
17883         PR target/85321
17884         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17885         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
17886         and -mstring-compare-inline-limit.
17888 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
17890         PR target/85287
17891         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
17892         for stack clash protection in a register whenever we need it to be in
17893         a register.
17895 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
17897         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
17898         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
17900 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
17902         PR target/85321
17903         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
17904         the help text.
17905         (mlong-double-): Ditto.
17906         * config/rs6000/sysv4.opt (msdata=): Ditto.
17907         (mtls-size=): Ditto.
17909 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17911         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17912         erroneous entries for
17913         "vector int vec_ldl (int, long int *)", and
17914         "vector unsigned int vec_ldl (int, unsigned long int *)".
17915         Add comments and entries for
17916         "vector bool char vec_ldl (int, bool char *)",
17917         "vector bool short vec_ldl (int, bool short *)",
17918         "vector bool int vec_ldl (int, bool int *)",
17919         "vector bool long long vec_ldl (int, bool long long *)",
17920         "vector pixel vec_ldl (int, pixel *)",
17921         "vector long long vec_ldl (int, long long *)",
17922         "vector unsigned long long vec_ldl (int, unsigned long long *)".
17923         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
17924         type tree bool_long_long_type_node and correct definition of
17925         bool_V2DI_type_node to make reference to this new type tree.
17926         (rs6000_mangle_type): Replace erroneous reference to
17927         bool_long_type_node with bool_long_long_type_node.
17928         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
17929         comments to emphasize sign distinctions for char and int types and
17930         replace RS6000_BTI_bool_long constant with
17931         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
17932         use of RS6000_BTI_pixel.
17933         (bool_long_type_node): Remove this macro definition.
17934         (bool_long_long_type_node): New macro definition
17936 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
17938         PR rtl-optimization/85300
17939         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
17940         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
17941         simplify_unary_operation fails.
17943 2018-04-10  Martin Liska  <mliska@suse.cz>
17945         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
17946         cgraph_edge and ipa_ref.
17948 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
17950         PR target/85177
17951         PR target/85255
17952         * config/i386/sse.md
17953         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
17954         computation of the VEC_MERGE selector from mask.
17955         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
17956         Fix decoding of the VEC_MERGE selector into mask.
17958 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
17960         PR tree-optimization/85286
17961         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
17963 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
17965         * final.c (final_1): Set insn_last_address as well as
17966         insn_current_address.
17968 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17970         PR target/85173
17971         * explow.c (emit_stack_probe): Call validize_mem on memory location
17972         before passing it to gen_probe_stack.  Create address operand and
17973         legitimize it for the probe_stack_address case.
17975 2018-04-09  Jan Hubicka  <jh@suse.cz>
17977         PR lto/85078
17978         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
17979         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
17980         * tree.c (free_lang_data_in_type): Fix handling of binfos;
17981         walk basetypes.
17982         (free_lang_data): Rebuild type inheritance graph.
17984 2018-04-09  Martin Sebor  <msebor@redhat.com>
17986         * invoke.texi (-finline-small-functions): Mention other optimization
17987         options.
17988         (-findirect-inlining, -fpartial-inlining): Same.
17989         (-finline-functions-called-once): Same.
17990         (-freorder-blocks-and-partition): Same.
17992 2018-04-09  Jan Hubicka  <jh@suse.cz>
17994         PR rtl/84058
17995         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
17996         jumps; choose last target that matches the criteria (i.e.
17997         no partition changes for non-crossing jumps).
17998         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
17999         support for redirecting crossing jumps to non-crossing.
18001 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
18003         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
18004         also for naked functions.
18006 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
18008         * config/arc/arc.md (add_shift): New pattern.
18009         (add_shift2): Likewise.
18010         (sub_shift): Likewise.
18011         (sub_shift_cmp0_noout): Likewise.
18012         (compare_si_ashiftsi): Likewise.
18013         (xbfu_cmp0_noout): New combine pattern.
18014         (xbfu_cmp0"): Likewise.
18015         (movsi_set_cc_insn): Place the predicable variant first.
18016         (commutative_binary_cmp0_noout): Remove clobber.
18017         (commutative_binary_cmp0): New pattern.
18018         (noncommutative_binary_cmp0): Likewise.
18019         (noncommutative_binary_cmp0_noout): Likewise.
18020         (noncommutative_binary_comparison_result_used): Removed.
18021         (rsub_cmp0): New pattern.
18022         (rsub_cmp0_noout): Likewise.
18023         (extzvsi): Changed, keep only meaningful variants.
18024         (SQH, SEZ): New iterators.
18025         (SQH_postfix): New mode attribute.
18026         (SEZ_prefix): New code attribute.
18027         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
18028         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
18029         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
18030         of numerical value.
18031         (noncommutative_operator): Check the availability of barrel
18032         shifter option.
18034 2018-04-09  Richard Biener  <rguenther@suse.de>
18036         PR tree-optimization/85284
18037         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
18038         Only use the niter constraining form of simple_iv when the exit
18039         is always executed.
18041 2018-04-09  Tom de Vries  <tom@codesourcery.com>
18043         PR target/84041
18044         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
18045         (define_expand "*memory_barrier"): New define_expand.
18046         (define_insn "memory_barrier"): New insn.
18048 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
18050         PR rtl-optimization/80463
18051         PR rtl-optimization/83972
18052         PR rtl-optimization/83480
18054         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
18055         correct producer for the insn.
18056         (tidy_control_flow): Fixup seqnos in case of debug insns.
18058 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
18060         PR rtl-optimization/83913
18062         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
18063         different sched-times when merging exprs.
18065 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
18067         PR rtl-optimization/83962
18069         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
18070         tidy_fallthru_edge and tidy_control_flow.
18072 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
18074         PR rtl-optimization/83530
18076         * sel-sched.c (force_next_insn): New global variable.
18077         (remove_insn_for_debug): When force_next_insn is true, also leave only
18078         next insn in the ready list.
18079         (sel_sched_region): When the region wasn't scheduled, make another pass
18080         over it with force_next_insn set to 1.
18082 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
18084         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
18085         into tm_file.
18086         * config/nds32/constants.md (unspec_volatile_element): Add enum values
18087         for interrupt control.
18088         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
18089         functions for interrupt control.
18090         * config/nds32/nds32-intrinsic.md: Likewise.
18091         * config/nds32/nds32_intrinsic.h: Likewise.
18092         * config/nds32/nds32.h (nds32_builtins): Likewise.
18094 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
18096         * config/nds32/nds32.c (nds32_init_machine_status,
18097         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
18098         strict_aligned_p field.
18099         (nds32_expand_to_rtl_hook): New function.
18100         (TARGET_EXPAND_TO_RTL_HOOK): Define.
18101         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
18103 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
18104             Chung-Ju Wu  <jasonwucj@gmail.com>
18106         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
18107         * config/nds32/nds32-n7.md: New file.
18108         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
18109         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
18110         pipeline.
18111         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
18112         * config/nds32/nds32.md (pipeline_model): Add n7.
18113         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
18114         * config/nds32/pipelines.md: Include n7 settings.
18116 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
18117             Chung-Ju Wu  <jasonwucj@gmail.com>
18119         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
18120         * config/nds32/nds32-e8.md: New file.
18121         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
18122         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
18123         pipeline.
18124         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
18125         * config/nds32/nds32.md (pipeline_model): Add e8.
18126         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
18127         * config/nds32/pipelines.md: Include e8 settings.
18129 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
18130             Chung-Ju Wu  <jasonwucj@gmail.com>
18132         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
18133         * config/nds32/nds32-n8.md: New file.
18134         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
18135         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
18136         pipeline.
18137         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
18138         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
18139         * config/nds32/nds32.md (pipeline_model): Add n8.
18140         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
18141         * config/nds32/pipelines.md: Include n8 settings.
18143 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
18144             Chung-Ju Wu  <jasonwucj@gmail.com>
18146         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
18147         * config/nds32/nds32-n9-2r1w.md: New file.
18148         * config/nds32/nds32-n9-3r2w.md: New file.
18149         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
18150         nds32_register_ports): New or modify for cpu n9.
18151         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
18152         pipeline.
18153         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
18154         * config/nds32/nds32-utils.c: New file.
18155         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
18156         TARGET_MUL_SLOW): Define.
18157         * config/nds32/nds32.md (pipeline_model): New attribute.
18158         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
18159         New options that support cpu n9.
18160         * config/nds32/pipelines.md: Include n9 settings.
18161         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
18163 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
18165         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
18166         information if necessary.
18167         (output_cond_branch_compare_zero): Likewise.
18168         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
18169         (nds32_target_alignment): Refine for alignment.
18170         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
18171         (FUNCTION_BOUNDARY): Modify.
18172         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
18173         align case.
18174         * config/nds32/nds32.opt (malways-align, malign-functions): New.
18176 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
18178         * config/nds32/constants.md (unspec_volatile_element): Add values for
18179         TLB operation and data prefetch.
18180         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
18181         functions for TLB operation and data prefetch.
18182         * config/nds32/nds32-intrinsic.md: Likewise.
18183         * config/nds32/nds32_intrinsic.h: Likewise.
18184         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
18185         (nds32_print_operand): Likewise.
18186         * config/nds32/nds32.h (nds32_builtins): Likewise.
18188 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
18189         Andrew Pinski <pinsika@gcc.gnu.org>
18191         PR middle-end/82976
18192         * match.pd: Use constant_boolean_node of correct type instead of
18193         boolean_true_node or boolean_false_node for simplifying
18194         pointer comparisons to zero.
18196 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
18198         PR tree-optimization/80021
18199         * tree.c (verify_type_variant): Make error call in verify_variant_match
18200         translatable and remove final full stop.
18202 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18204         * config/nds32/constants.md (unspec_volatile_element): Add
18205         UNSPEC_VOLATILE_EH_RETURN.
18206         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
18207         nds32_output_stack_pop): Support dwarf exception handling process.
18208         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
18209         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
18210         exception handling process.
18211         (nds32_compute_stack_frame): Likewise.
18212         (nds32_return_addr_rtx): Likewise.
18213         (nds32_initial_elimination_offset): Likewise.
18214         (nds32_expand_prologue): Likewise.
18215         (nds32_expand_epilogue): Likewise.
18216         (nds32_dynamic_chain_address): New function.
18217         * config/nds32/nds32.h (machine_function): Add fields for dwarf
18218         exception handling.
18219         (DYNAMIC_CHAIN_ADDRESS): Define.
18220         (EH_RETURN_DATA_REGNO): Define.
18221         (EH_RETURN_STACKADJ_RTX): Define.
18222         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
18223         patterns for dwarf exception handling.
18225 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18227         * config/nds32/nds32.h: Clean up obsolete macros.
18229 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18231         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18232         Add enum values for particular instructions.
18233         * config/nds32/nds32-intrinsic.c: Implementation of expanding
18234         particular intrinsic functions.
18235         * config/nds32/nds32-intrinsic.md: Likewise.
18236         * config/nds32/nds32_intrinsic.h: Likewise.
18237         * config/nds32/nds32.h (nds32_builtins): Likewise.
18238         * config/nds32/nds32.md (type): Add pbsad and pbsada.
18239         (btst, ave): New patterns for particular instructions.
18241 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18243         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18244         Add enum values for atomic load/store and memory sync.
18245         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
18246         and memory sync.
18247         * config/nds32/nds32-intrinsic.md: Likewise.
18248         * config/nds32/nds32_intrinsic.h: Likewise.
18249         * config/nds32/nds32.h (nds32_builtins): Likewise.
18251 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
18253         PR tree-optimization/85257
18254         * fold-const.c (native_encode_vector): If not all elts could fit
18255         and off is -1, return 0 rather than offset.
18256         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
18257         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
18258         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
18259         adjust buffer in native_interpret_expr call.
18261 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18263         * config/nds32/constants.md (unspec_volatile_element): Add cache
18264         control enum values.
18265         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
18266         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
18267         * config/nds32/nds32.c (nds32_cctl_names): New.
18268         (nds32_print_operand): Handle cache control register names.
18269         * config/nds32/nds32.h (nds32_builtins): New enum values.
18270         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
18271         macros.
18272         * config/nds32/nds32.md (type): Add mmu.
18273         * config/nds32/pipelines.md (simple_insn): Add mmu.
18275 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18277         * config/nds32/nds32.md (type): Remove call.
18278         * config/nds32/pipelines.md (simple_insn): Likewise.
18280 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18282         * config/nds32/constants.md (unspec_volatile_element): Add
18283         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
18284         UNSPEC_VOLATILE_FMFCFG.
18285         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
18286         description for fmfcfg and fmfcsr.
18287         (bdesc_1arg): Add fmtcsr.
18288         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
18289         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
18290         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
18291         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
18292         unspec_fmfcfg): New patterns.
18293         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
18294         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
18295         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
18296         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
18297         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
18298         __nds32__fmfcfg): Define.
18300 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18302         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
18303         intrinsic register names.
18304         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
18305         intrinsic register enum values and macros.
18307 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18309         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
18310         for load/store addressing form.
18311         (nds32_print_operand_address): Likewise.
18313 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
18315         PR target/85196
18316         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
18317         based on LABEL_REF.  Remove useless assertion.
18318         (pic_address_needs_scratch): Fix formatting.
18319         (sparc_legitimize_pic_address): Minor tweaks.
18320         (sparc_delegitimize_address): Adjust assertion accordingly.
18321         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
18322         into symbolic_operand.
18323         (movsi_high_pic_label_ref): Likewise.
18324         (movsi_lo_sum_pic_label_ref): Likewise.
18325         (movdi_pic_label_ref): Likewise.
18326         (movdi_high_pic_label_ref): Likewise.
18327         (movdi_lo_sum_pic_label_ref): Likewise.
18329 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
18331         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
18332         custom LIB_SPEC setup.
18334 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
18335             Kito Cheng  <kito.cheng@gmail.com>
18337         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
18338         * config/riscv/freebsd.h: New.
18340 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
18342         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
18343         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
18344         file.
18346 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
18347             Kito Cheng  <kito.cheng@gmail.com>
18349         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
18350         nds32_output_call, nds32_symbol_binds_local_p): New functions.
18351         * config/nds32/nds32-protos.h (nds32_output_call,
18352         nds32_output_return): Declare.
18353         * config/nds32/nds32.md: Refine all the call and return patterns.
18355 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
18357         PR debug/85252
18358         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
18359         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
18361         PR rtl-optimization/84872
18362         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
18363         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
18364         EDGE_CROSSING edge.
18366 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
18368         * expr.c (copy_blkmode_to_reg): Revert 254862.
18369         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
18371 2018-04-06  Richard Biener  <rguenther@suse.de>
18373         PR middle-end/85244
18374         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
18375         after seeing a component reference with an adjacent field.  Treat
18376         refs to arrays at struct end of external decls similar to
18377         refs to unconstrained commons.
18379 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
18381         PR sanitizer/85213
18382         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
18383         look through SAVE_EXPRs with non-side-effects argument.  Adjust
18384         recursive calls.
18385         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
18386         save_p here.
18388 2018-04-06  Richard Biener  <rguenther@suse.de>
18390         PR middle-end/85180
18391         * alias.c (find_base_term): New wrapper around find_base_term
18392         unwinding CSELIB_VAL_PTR changes.
18393         (find_base_term): Do not restore CSELIB_VAL_PTR during the
18394         recursion.
18396 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18398         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
18399         instructions.
18400         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
18401         constant definitions.
18402         ("nop"): lr 0,0 -> nopr r0
18403         ("nop_lr0", "nop_lr1"): New insn definitions.
18405 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
18407         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
18408         NDS32_V3PUSH_AVAILABLE_P macro.
18410 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
18411             Chung-Ju Wu  <jasonwucj@gmail.com>
18413         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
18414         (nds32*-*-*): Add float and fpu_config into supported_defaults.
18415         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
18416         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
18417         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
18418         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
18419         * config/nds32/constraints.md: New constraints and checking for hard
18420         float configuration.
18421         * config/nds32/iterators.md: New mode iterator and attribute for hard
18422         float configuration.
18423         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
18424         patterns.
18425         * config/nds32/nds32-fpu.md: New file.
18426         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
18427         deal with hard float code generation.
18428         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
18429         ARCH_V3S.
18430         (abi_type, float_reg_number): New enum type.
18431         * config/nds32/nds32-predicates.c: New predicates for hard float.
18432         * config/nds32/nds32-protos.h: Declare functions for hard float.
18433         * config/nds32/nds32.c: Implementation for hard float configuration.
18434         * config/nds32/nds32.h: Definitions for hard float configuration.
18435         * config/nds32/nds32.md: Include hard float machine description and
18436         modify patterns for hard float configuration.
18437         * config/nds32/nds32.opt: New options for hard float configuration.
18438         * config/nds32/predicates.md: New predicates for hard float
18439         configuration.
18441 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
18443         * common/config/nds32/nds32-common.c
18444         (nds32_option_optimization_table): Enable -mreleax-hint by default.
18446 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
18448         PR middle-end/85195
18449         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
18450         CONSTRUCTOR_ELT (ctor, ...)->value.
18452 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
18454         PR target/85193
18455         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
18457 2018-04-05  Tom de Vries  <tom@codesourcery.com>
18459         PR target/85204
18460         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
18461         cond jump.
18463 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
18464             Kito Cheng  <kito.cheng@gmail.com>
18466         * config/nds32/constraints.md (U33): Fine-tune checking condition.
18467         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
18468         * config/nds32/nds32.h (nds32_16bit_address_type): Add
18469         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
18471 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
18472             Kito Cheng  <kito.cheng@gmail.com>
18474         * config/nds32/constraints.md (Ufe): New memory constraint.
18475         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
18476         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
18477         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
18478         operands.
18479         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
18480         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
18482 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18484         * config/nds32/nds32.md: Use optimize_size in the condition for
18485         alu-shift instructions.
18487 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18489         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
18491 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18493         * config/nds32/nds32.md (negsi2): Refine pattern.
18495 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
18496             Chung-Ju Wu  <jasonwucj@gmail.com>
18498         * config/nds32/iterators.md (shift_rotate): New code iterator.
18499         (shift): New code attribute.
18500         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
18501         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
18502         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
18503         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
18504         bit-wise operations.
18505         (andsi3, *andsi3): Ditto.
18506         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
18507         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
18508         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
18509         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
18510         nds32_ior_operand, nds32_xor_operand): New predicates.
18512 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18514         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
18515         (addsi3, subsi3): ... this.
18517 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18519         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
18521 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18523         * config/nds32/nds32.md: Adjust indention.
18525 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
18527         * config/nds32/nds32.md (feature): New attribute.
18529 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18531         * config/nds32/nds32.md (subtype): New attribute.
18533 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18535         PR target/85203
18536         * config/arm/arm-builtins.c (arm_expand_builtin): Change
18537         expansion to perform a bitwise AND of the argument followed by a
18538         boolean negation of the result.
18540 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
18542         PR rtl-optimization/84878
18543         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
18544         the basic block.  Assert the use reference is not artificial and that
18545         it has an associated insn.
18547 2018-04-04  Michael Matz  <matz@suse.de>
18549         * builtins.c (compute_objsize): Pass correct operand
18550         to array_at_struct_end_p.
18552 2018-04-04  Richard Biener  <rguenther@suse.de>
18554         PR lto/85176
18555         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
18556         from contexts for DINFO_LEVEL_TERSE and below.
18558 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
18560         * config/nds32/nds32-doubleword.md (move_<mode>): Require
18561         resiter_operand condition.
18562         * config/nds32/nds32.md (*move<mode>): Ditto.
18564 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
18565             Monk Chiang  <sh.chiang04@gmail.com>
18567         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
18569 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18571         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
18573 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18574             Kito Cheng  <kito.cheng@gmail.com>
18576         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
18577         nds32_cond_code_str, output_cond_branch,
18578         output_cond_branch_compare_zero, nds32_expand_cbranch,
18579         nds32_expand_cstore, nds32_expand_movcc,
18580         nds32_output_cbranchsi4_equality_zero,
18581         nds32_output_cbranchsi4_equality_reg,
18582         nds32_output_cbranchsi4_equality_reg_or_const_int,
18583         nds32_output_cbranchsi4_greater_less_zero: New functions.
18584         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
18585         nds32_expand_cstore, nds32_expand_movcc,
18586         nds32_output_cbranchsi4_equality_zero,
18587         nds32_output_cbranchsi4_equality_reg,
18588         nds32_output_cbranchsi4_equality_reg_or_const_int,
18589         nds32_output_cbranchsi4_greater_less_zero): Declare.
18590         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
18591         nds32_rimm11s_operand): New predicates.
18592         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
18593         * config/nds32/nds32.md: Rewrite all the branch and conditional move
18594         patterns.
18596 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
18598         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
18599         * config/nds32/nds32.md: Ditto.
18600         * config/nds32/pipelines.md: Ditto.
18602 2018-04-04  Richard Biener  <rguenther@suse.de>
18604         PR tree-optimization/85168
18605         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
18606         propagating abnormals.
18608 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18610         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
18612 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18613             Kito Cheng  <kito.cheng@gmail.com>
18615         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
18616         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
18617         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
18618         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
18619         * config/nds32/nds32.md (sibcall_internal): New.
18620         (sibcall_register): Remove.
18621         (sibcall_immediate): Remove.
18622         (sibcall_value_internal): New.
18623         (sibcall_value_register): Remove.
18624         (sibcall_value_immediate): Remove.
18625         * config/nds32/predicates.md (nds32_general_register_operand): New.
18626         (nds32_call_address_operand): New.
18628 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
18630         PR rtl-optimization/85167
18631         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
18632         bb_defs if *split_p, instead preinitialize it to NULL.
18634         PR tree-optimization/85156
18635         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
18636         evaluating the argument multiple times.
18638 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
18640         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
18641         than vector.
18642         (_mm_cvtpd_ps): Likewise.
18643         (_mm_cvttpd_epi32): Likewise.
18644         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
18645         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
18646         vector, pixel, and bool following altivec.h include.
18648 2018-04-03  Martin Sebor  <msebor@redhat.com>
18650         * doc/extend.texi (Common Function Attributes): Clarify.
18651         (const attribute): Likewise.
18652         (pure attribute): Likewise.
18654 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
18656         PR target/85169
18657         * config/i386/i386.c (ix86_expand_vector_set): Use
18658         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
18660 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
18662         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
18663         instructions when changing rounding bits to preserve precision bits
18664         in the x87 control word.
18666 2018-04-03  Martin Liska  <mliska@suse.cz>
18668         PR tree-optimization/82491
18669         * rtl.h (strip_offset_and_add): Replace += suboffset with
18670         poly_uint64 () + suboffset.
18672 2018-03-29  Martin Liska  <mliska@suse.cz>
18673             Martin Jambor  <mjambor@suse.cz>
18675         PR ipa/84947
18676         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
18677         param_type is not an integral or pointer type.
18679 2018-04-03  Richard Biener  <rguenther@suse.de>
18681         * sese.h (recompute_all_dominators): Remove.
18683 2018-04-02  Martin Sebor  <msebor@redhat.com>
18685         * doc/invoke.texi (-Wrestrict): Fix typos.
18687 2018-04-02  Jim Wilson  <jimw@sifive.com>
18689         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
18690         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
18691         (<optab>di3, <optab>si3_extend): Likewise.
18692         (<optab>si3_mask, <optab>si3_mask_1): New.
18693         (<optab>di3_mask, <optab>di3_mask_1): New.
18694         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
18695         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
18696         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
18698 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
18700         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
18701         example.
18703 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
18705         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
18706         (nds32_canonicalize_comparison): New function.
18708 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
18709             Kito Cheng  <kito.cheng@gmail.com>
18710             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
18712         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
18713         * config/nds32/constants.md (unspec_volatile_element): Add
18714         UNSPEC_VOLATILE_RELAX_GROUP.
18715         * config/nds32/nds32-relax-opt.c: New file.
18716         * config/nds32/nds32-predicates.c
18717         (nds32_symbol_load_store_p): New function.
18718         * config/nds32/nds32-protos.h
18719         (nds32_symbol_load_store_p): Declare function.
18720         (make_pass_nds32_relax_opt): Declare new rtl pass function.
18721         * config/nds32/nds32.c
18722         (nds32_register_pass): New function to register pass.
18723         (nds32_register_passes): New function to register passes.
18724         * config/nds32/nds32.md (relax_group): New pattern.
18725         * config/nds32/nds32.opt (mrelax-hint): New option.
18726         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
18728 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
18730         * config/nds32/t-nds32: Modify files dependency.
18732 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
18734         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
18735         (PROFILE_HOOK): Define its implementation.
18737 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
18739         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
18740         type and 32-bit size.
18742 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
18744         PR middle-end/85090
18745         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
18746         (V_128_256): New mode iterator.
18747         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
18748         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
18749         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
18750         of V.
18751         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
18752         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
18754 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
18756         PR target/83315
18757         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
18758         NaN inputs correctly.
18760 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
18762         PR target/80546
18763         * config/rs6000/vsx.md (??r): New mode attribute.
18764         (*vsx_mov<mode>_64bit): Use it.
18765         (*vsx_mov<mode>_32bit): Likewise.
18767 2018-03-30  Martin Sebor  <msebor@redhat.com>
18769         PR tree-optimization/84818
18770         * builtins.c (check_access): Use warning_n.
18772 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18774         PR target/83822
18775         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
18776         condition.
18777         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
18778         condition.
18780 2018-03-30  Julia Koval  <julia.koval@intel.com>
18782         PR target/84413
18783         * x86-tune.def (movx, partial_reg_dependency): Enable for
18784         m_SKYLAKE_AVX512.
18786 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
18788         PR inline-asm/84985
18789         * lra-constraints.c (process_alt_operands): Move setting
18790         this_alternative_matches below.
18792 2018-03-29  Martin Liska  <mliska@suse.cz>
18794         PR lto/84995.
18795         * doc/invoke.texi: Document how LTO works with debug info.
18796         Describe auto-load support of binutils.  Mention 'x86-64'
18797         as valid option value of -march option.
18799 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
18801         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
18803         PR c/85094
18804         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
18805         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
18806         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
18807         checking.
18809 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
18811         PR target/84912
18812         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
18813         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
18814         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
18815         for RS6000_BTM_POWERPC64.
18816         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
18817         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
18818         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
18819         definition.
18820         (DIVDE): Use it.
18821         (DIVDEU): Likewise.
18823 2018-03-28  Carl Love  <cel@us.ibm.com>
18825         Revert
18826         2017-09-27  Carl Love  <cel@us.ibm.com>
18828         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
18829         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
18830         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
18831         fctiw instruction.
18833 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18835         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
18836         instead of __vector bool.
18837         (_mm_max_pu8): Likewise.
18838         (_mm_min_pi16): Likewise.
18840 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
18842         PR target/84912
18843         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
18844         (DIVWEUO): Likewise.
18845         (DIVDEO): Likewise.
18846         (DIVDEUO): Likewise.
18847         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
18848         DIVWEUO and DIVDEUO.
18849         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
18850         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
18851         (div_extend): Likewise.
18852         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
18853         builtin function.
18854         (__builtin_divweuo): Likewise.
18855         (__builtin_divdeo): Likewise.
18856         (__builtin_divdeuo): Likewise.
18858 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
18860         PR target/85095
18861         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
18862         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
18864         PR tree-optimization/82004
18865         * gimple-match-head.c (optimize_pow_to_exp): New function.
18866         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
18867         Don't fold to exp if optimize_pow_to_exp is false.
18869 2018-03-28  Martin Liska  <mliska@suse.cz>
18871         PR other/84819
18872         * calls.c (initialize_argument_information): Fix trailing space.
18873         * common.opt: Fix typo and provide better explanation for
18874         -fsanitize-coverage option.
18875         * config/i386/i386.opt: Fix typo.
18877 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
18878             Martin Liska  <mliska@suse.cz>
18880         PR sanitizer/85081
18881         * gimplify.c (asan_poison_variable): Don't do the check for
18882         gimplify_omp_ctxp here.
18883         (gimplify_decl_expr): Do it here.
18884         (gimplify_target_expr): Likewise.
18886 2018-03-28  Martin Liska  <mliska@suse.cz>
18888         PR target/84988
18889         * config/i386/i386.c (ix86_function_arg_advance): Do not call
18890         chkp_type_bounds_count if MPX is not enabled.
18892 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
18894         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
18896 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
18898         PR target/84914
18899         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
18900         function to create the function decl for complex long double
18901         multiply and divide for -mabi=ieeelongdouble.
18902         (init_float128_ieee): Call it.
18904 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
18906         PR target/85044
18907         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
18908         -fcf-protection=branch -mibt.
18909         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
18911 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
18913         PR target/81863
18914         * config/arm/arm.c (arm_valid_symbolic_address): Handle
18915         arm_word_relocations.
18917 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
18919         PR target/85056
18920         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
18921         extern array declarations.
18923 2018-03-27  Richard Biener  <rguenther@suse.de>
18925         PR middle-end/84067
18926         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
18927         explicit single_use checks.
18929 2018-03-27  Richard Biener  <rguenther@suse.de>
18931         PR tree-optimization/85082
18932         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
18933         Valueize the VUSE.
18935 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
18937         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
18938         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
18939         Turn on fasynchronous-unwind-tables and funwind-tables.
18941 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
18943         PR target/85073
18944         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
18945         (*bmi_blsr_<mode>_ccz): Ditto.
18947 2018-03-26  Tom de Vries  <tom@codesourcery.com>
18949         PR tree-optimization/85063
18950         * omp-general.c (offloading_function_p): New function.  Factor out
18951         of ...
18952         * omp-offload.c (pass_omp_target_link::gate): ... here.
18953         * omp-general.h (offloading_function_p): Declare.
18954         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
18955         with attribute omp declare target for offloading functions.
18957 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
18959         PR tree-optimization/84005
18960         * tree-data-ref.h (get_base_for_alignment): Declare.
18961         * tree-data-ref.c (get_base_for_alignment_1): New function.
18962         (get_base_for_alignment): Likewise.
18963         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
18964         get_base_for_alignment to find a suitable base object, instead
18965         of always using drb->base_address.
18967 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
18969         PR inline-asm/85022
18970         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
18971         known size by default.
18973 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
18975         PR inline-asm/85030
18976         * lra-constraints.c (process_alt_operands): Don't match BLKmode
18977         and non BLKmode operands.
18979 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18981         PR target/85026
18982         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
18983         Clean up attributes.
18985 2018-03-23  Richard Biener  <rguenther@suse.de>
18987         PR debug/85020
18988         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
18989         we are going to emit early debug for LTO.
18991 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
18993         PR inline-asm/85034
18994         * function.c (match_asm_constraints_1): Don't optimize if input
18995         doesn't satisfy general_operand predicate for output's mode.
18997         PR inline-asm/85022
18998         * alias.c (write_dependence_p): Don't require for x_canonicalized
18999         non-VOIDmode if x has VOIDmode.
19001         PR sanitizer/85029
19002         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
19003         just don't try to optimize it rather than assert it never happens.
19005 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19007         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
19008         macro expansions for definition of ST_INTERNAL_<mode> and
19009         LD_INTERNAL_<mode> builtins.
19010         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
19011         Remove prototype.
19012         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
19013         function.
19014         (altivec_expand_st_builtin): Likewise.
19015         (altivec_expand_builtin): Remove calls to deleted functions.
19016         (rs6000_address_for_altivec): Delete this function.
19017         * config/rs6000/vector.md: Remove expands for
19018         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
19020 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
19022         PR target/84826
19023         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
19024         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
19025         re-computing once computed.
19026         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
19027         (arm_init_machine_status): Initialize
19028         machine->static_chain_stack_bytes.
19030 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19032         PR target/84760
19033         * doc/extend.texi: Add four new prototypes for vec_ld.
19034         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
19035         definitions for more logical presentation.
19036         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
19037         entries for V1TI variants of __builtin_altivec_ld builtin.
19038         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
19039         handling of V1TI variant of LVX icode pattern.
19040         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
19041         (rs6000_gimple_fold_builtin): Likewise.
19042         (altivec_init_builtins): Add code to define
19043         __builtin_altivec_lvx_v1ti function.
19045 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
19047         PR inline-asm/84941
19048         * function.c (match_asm_constraints_1): Don't do the optimization
19049         if input isn't a REG, SUBREG, MEM or constant.
19051 2018-03-22  Tom de Vries  <tom@codesourcery.com>
19053         PR tree-optimization/84956
19054         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
19055         bb_has_abnormal_pred.
19057 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
19059         PR sanitizer/85018
19060         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
19061         DECL_INITIAL (decl) to decl at the end.
19062         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
19063         adjust the comment.
19065 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
19067         * doc/extend.texi (__builtin_tgmath): Document when complex
19068         integer types are treated as _Complex _Float64.
19070 2018-03-21  Tom de Vries  <tom@codesourcery.com>
19072         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
19074 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
19076         PR tree-optimization/84960
19077         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
19078         if it is ENTRY block, move them into single succ of ENTRY in that case.
19080 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
19082         PR tree-optimization/84811
19083         * poly-int.h (poly_span_traits): Remove the T3 parameter and
19084         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
19085         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
19086         (known_subrange_p): Update accordingly.  Cast each value involved
19087         in the size comparison, rather than casting the result of the
19088         subtraction.
19090 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
19092         PR tree-optimization/84982
19093         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
19094         by flipping the least significant bit rather than all bits from
19095         bitpos to bitpos + bitsize - 1.
19097 2018-03-21  Nathan Sidwell  <nathan@acm.org>
19099         * doc/extend.texi (Deprecated Features): Remove mention of
19100         long-deleted deprecations.
19102 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19104         PR jit/84288
19105         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
19106         * configure: Regenerate.
19108 2018-03-21  Tom de Vries  <tom@codesourcery.com>
19110         PR tree-optimization/83126
19111         * tree-parloops.c (num_phis): New function.
19112         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
19114 2018-03-21  Nathan Sidwell  <nathan@acm.org>
19116         * doc/extend.texi (Deprecated Features): Update deprecated flags,
19117         mention anon-struct/union members and trailing attributes.
19119 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
19121         PR tree-optimization/84969
19122         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
19123         builtin memset partitions if they set different rhs values.
19125 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
19127         PR rtl-optimization/84989
19128         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
19129         VEC_DUPLICATE with scalar result mode.
19131 2018-03-21  Martin Liska  <mliska@suse.cz>
19133         PR ipa/84963
19134         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
19135         not intended return statement.
19137 2018-03-21  Martin Liska  <mliska@suse.cz>
19139         PR target/84988
19140         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
19141         (chkp_find_bound_slots_1): Limit number of iterations.
19143 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
19145         PR target/84838
19146         * Minor grammar fixes for x86 options.
19148 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
19150         PR debug/84875
19151         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
19152         holding REG_CFA_RESTORE notes, instead turn them into a USE.
19154 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
19156         PR target/83789
19157         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
19158         (altivec_lvx_<mode>_1op): Likewise.
19159         (altivec_stvx_<mode>_2op): Likewise.
19160         (altivec_stvx_<mode>_1op): Likewise.
19161         (altivec_lvx_<VM2:mode>): New define_expand.
19162         (altivec_stvx_<VM2:mode>): Likewise.
19163         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
19164         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
19165         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
19166         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
19167         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
19168         (rs6000_gen_lvx): Likewise.
19169         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
19170         (altivec_expand_stv_builtin): Likewise.
19171         (altivec_expand_builtin): Likewise.
19172         * config/rs6000/vector.md: Likewise.
19174 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19176         PR target/82518
19177         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
19178         BYTES_BIG_ENDIAN.
19180 2018-03-20  Richard Biener  <rguenther@suse.de>
19182         PR target/84986
19183         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
19184         sign-conversions as zero, fall back to standard scalar_stmt
19185         cost for the rest.
19187 2018-03-20  Martin Liska  <mliska@suse.cz>
19189         PR ipa/84825
19190         * predict.c (rebuild_frequencies): Handle case when we have
19191         PROFILE_ABSENT, but flag_guess_branch_prob is false.
19193 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
19195         PR target/84990
19196         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
19197         flag_section_anchors.
19198         * varasm.c (use_blocks_for_decl_p): Remove hack for
19199         dw2_force_const_mem.
19201         PR target/84845
19202         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
19203         to ...
19204         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
19205         be created, use lowpart_subreg of operands[0] rather than operands[0]
19206         itself.
19207         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
19208         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
19209         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
19210         and n constraint instead of aarch64_shift_imm_di and Usd.
19211         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
19212         (*aarch64_<optab>_reg_minus<mode>3): ... this.
19214 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
19216         PR target/82989
19217         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
19218         to favor GPR over NEON registers.
19219         (<shift>di3_neon): Likewise.
19221 2018-03-20  Tom de Vries  <tom@codesourcery.com>
19223         PR target/84952
19224         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
19225         (nvptx_process_pars): Emit bar.sync asap and alap.
19227 2018-03-20  Tom de Vries  <tom@codesourcery.com>
19229         PR target/84954
19230         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
19231         seen_label if seen_label is already set.
19233 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
19235         PR target/84945
19236         * config/i386/i386.c (fold_builtin_cpu): For features above 31
19237         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
19238         Use 1U instead of 1.  Formatting fixes.
19240         PR c/84953
19241         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
19242         instead of TREE_TYPE (s1) for the return value.
19244 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
19246         PR tree-optimization/84946
19247         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
19248         bitsize + bitsize in poly_uint64 rather than poly_int64.
19250         PR sanitizer/78651
19251         * dwarf2asm.c: Include fold-const.c.
19252         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
19253         of decl rather than decl itself.
19255         PR rtl-optimization/84643
19256         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
19258 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
19260         PR sanitizer/78651
19261         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
19262         calling assemble_variable.
19264 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
19266         PR target/81647
19267         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
19268         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
19270 2018-03-19  Jim Wilson  <jimw@sifive.com>
19272         PR bootstrap/84856
19273         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
19274         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
19275         (riscv_first_stack_step): Likewise.
19276         (riscv_option_override): Use STACK_BOUNDARY instead of
19277         MIN_STACK_BOUNDARY.
19278         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
19279         MIN_STACK_BOUNDARY.
19280         (BIGGEST_ALIGNMENT): Set to 128.
19281         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
19282         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
19283         STACK_BOUNDARY.
19285 2018-03-19  Richard Biener  <rguenther@suse.de>
19287         PR tree-optimization/84933
19288         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
19289         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
19291 2018-03-19  Richard Biener  <rguenther@suse.de>
19293         PR tree-optimization/84859
19294         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
19295         (cond_if_else_store_replacement): Perform sinking operation on
19296         single-store BBs regardless of MAX_STORES_TO_SINK setting.
19297         Generalize what a BB with a single eligible store is.
19299 2018-03-19  Richard Biener  <rguenther@suse.de>
19301         PR tree-optimization/84929
19302         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
19303         chrec_is_positive against non-chrec arg.
19305 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
19307         PR target/84711
19308         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
19310 2018-03-18  Martin Liska  <mliska@suse.cz>
19312         PR rtl-optimization/84635
19313         * regrename.c (build_def_use): Use matches_mode only when
19314         matches >= 0.
19316 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
19318         PR tree-optimization/84913
19319         * tree-vect-loop.c (vectorizable_reduction): Don't try to
19320         vectorize chains of COND_EXPRs.
19322 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
19324         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
19326 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
19328         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
19330 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
19332         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
19334 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
19335             Kito Cheng  <kito.cheng@gmail.com>
19337         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
19338         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
19339         (nds32_adjust_reg_alloc_order): New function.
19340         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
19342 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
19344         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
19345         nds32_print_operand, nds32_print_operand_address): Use
19346         HOST_WIDE_INT_PRINT_DEC instead.
19348 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
19350         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
19352 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
19354         PR target/84902
19355         * config/i386/i386.c (initial_ix86_tune_features,
19356         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
19357         unsigned long long.
19358         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
19359         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
19360         rather than 1u << ix86_tune.  Formatting fix.
19361         (ix86_option_override_internal): Change ix86_arch_mask from
19362         unsigned int to unsigned HOST_WIDE_INT, initialize to
19363         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
19364         (ix86_function_specific_restore): Likewise.
19366 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
19368         PR target/84899
19369         * postreload.c (reload_combine_recognize_pattern): Perform
19370         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
19371         truncate_int_for_mode the result for the destination's mode.
19373         PR c/84909
19374         * hsa-gen.c (mem_type_for_type): Fix comment typo.
19375         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
19376         Likewise.
19377         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19378         Likewise.
19380 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
19382         PR target/84876
19383         * lra-assigns.c (lra_split_hard_reg_for): Don't use
19384         regno_allocno_class_array and sorted_pseudos.
19385         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
19386         insns where regno is used.
19388 2018-03-16  Martin Liska  <mliska@suse.cz>
19390         PR ipa/84833
19391         * multiple_target.c (create_dispatcher_calls): Redirect
19392         reference in the symbol table.
19394 2018-03-16  Martin Liska  <mliska@suse.cz>
19396         PR ipa/84722
19397         * multiple_target.c (create_dispatcher_calls): Redirect also
19398         an alias.
19400 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
19402         PR c++/79937
19403         PR c++/82410
19404         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
19405         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
19406         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
19408 2018-03-16  Julia Koval  <julia.koval@intel.com>
19410         * doc/invoke.texi (Skylake Server): Add CLWB.
19411         Cannonlake): Remove CLWB.
19413 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
19415         PR tree-optimization/84841
19416         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
19417         1 << 3.
19418         (FLOAT_ONE_CONST_TYPE): Define.
19419         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
19420         (sort_by_operand_rank): Put entries with higher constant_type last
19421         rather than first to match comments.
19423 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
19425         * config/nios2/nios2.md (movsi_internal): Fix thinko in
19426         split predicate.
19428 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
19430         PR c++/79085
19431         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
19432         check and use address of target always.
19434 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
19436         PR target/84574
19437         * config/i386/i386.c (indirect_thunk_needed): Update comments.
19438         (indirect_thunk_bnd_needed): Likewise.
19439         (indirect_thunks_used): Likewise.
19440         (indirect_thunks_bnd_used): Likewise.
19441         (indirect_return_needed): New.
19442         (indirect_return_bnd_needed): Likewise.
19443         (output_indirect_thunk_function): Add a bool argument for
19444         function return.
19445         (output_indirect_thunk_function): Don't generate alias for
19446         function return thunk.
19447         (ix86_code_end): Call output_indirect_thunk_function to generate
19448         function return thunks.
19449         (ix86_output_function_return): Set indirect_return_bnd_needed
19450         and indirect_return_needed instead of indirect_thunk_bnd_needed
19451         and indirect_thunk_needed.
19453 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
19455         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
19456         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
19457         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
19459 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
19460             Paul Hua <paul.hua.gm@gmail.com>
19462         PR c/84852
19463         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
19465 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
19467         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
19468         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
19469         resp. SFmode cases.
19471 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
19473         PR target/84711
19474         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
19475         instead of GET_MODE_SIZE when comparing Units.
19477 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
19479         PR target/68256
19480         * varasm.c (hash_section): Return an unchangeble hash value
19481         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
19482         Return !aarch64_can_use_per_function_literal_pools_p ().
19484 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
19486         PR target/84860
19487         * optabs.c (emit_conditional_move): Pass address of cmode's copy
19488         rather than address of cmode as last argument to prepare_cmp_insn.
19490 2018-03-15  Julia Koval  <julia.koval@intel.com>
19492         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
19493         F_AVX512VNNI, F_AVX512BITALG): New.
19495 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
19497         PR target/83451
19498         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
19499         insn for floating-point loads and stores.
19501 2018-03-14  Carl Love  <cel@us.ibm.com>
19503         * config/rs6000/rs6000-c.c: Add macro definitions for
19504         ALTIVEC_BUILTIN_VEC_PERMXOR.
19505         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
19506         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
19507         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
19508         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
19509         UNSPEC_VPERMXOR.
19510         * config/doc/extend.texi: Add prototypes for vec_permxor.
19512 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
19514         PR c/84852
19515         * diagnostic-show-locus.c (class layout_point): Convert m_line
19516         from int to linenum_type.
19517         (line_span::comparator): Use linenum "compare" function when
19518         comparing line numbers.
19519         (test_line_span): New function.
19520         (layout_range::contains_point): Convert param "row" from int to
19521         linenum_type.
19522         (layout_range::intersects_line_p): Likewise.
19523         (layout::will_show_line_p): Likewise.
19524         (layout::print_source_line): Likewise.
19525         (layout::should_print_annotation_line_p): Likewise.
19526         (layout::print_annotation_line): Likewise.
19527         (layout::print_leading_fixits): Likewise.
19528         (layout::annotation_line_showed_range_p): Likewise.
19529         (struct line_corrections): Likewise for field m_row.
19530         (line_corrections::line_corrections): Likewise for param "row".
19531         (layout::print_trailing_fixits): Likewise.
19532         (layout::get_state_at_point): Likewise.
19533         (layout::get_x_bound_for_row): Likewise.
19534         (layout::print_line): Likewise.
19535         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
19536         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
19537         * input.c (selftest::test_linenum_comparisons): New function.
19538         (selftest::input_c_tests): Call it.
19539         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
19540         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
19541         * selftest.h (ASSERT_GT): New macro.
19542         (ASSERT_GT_AT): New macro.
19543         (ASSERT_LT): New macro.
19544         (ASSERT_LT_AT): New macro.
19546 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
19548         PR rtl-optimization/84780
19549         * combine.c (distribute_links): Don't make a link based on pc_rtx.
19551 2018-03-14  Martin Liska  <mliska@suse.cz>
19553         * tree.c (record_node_allocation_statistics): Use
19554         get_stats_node_kind.
19555         (get_stats_node_kind): New function extracted from
19556         record_node_allocation_statistics.
19557         (free_node): Use get_stats_node_kind.
19559 2018-03-14  Richard Biener  <rguenther@suse.de>
19561         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
19562         that the value-set of ANTIC_IN doesn't grow.
19564         Revert
19565         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19566         member.
19567         (BB_VISITED_WITH_VISITED_SUCCS): New define.
19568         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19570 2018-03-14  Julia Koval  <julia.koval@intel.com>
19572         * config.gcc (icelake-client, icelake-server): New.
19573         (icelake): Remove.
19574         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
19575         (initial_ix86_arch_features): Ditto.
19576         (PTA_SKYLAKE): Add SGX.
19577         (PTA_ICELAKE): Remove.
19578         (PTA_ICELAKE_CLIENT): New.
19579         (PTA_ICELAKE_SERVER): New.
19580         (ix86_option_override_internal): Split up icelake on icelake client and
19581         icelake server.
19582         (get_builtin_code_for_version): Ditto.
19583         (fold_builtin_cpu): Ditto.
19584         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
19585         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
19586         * config/i386/i386.h (processor_type): Ditto.
19587         * doc/invoke.texi: Ditto.
19589 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
19591         PR sanitizer/83392
19592         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
19593         INTEGER_CST offset, add it together with bitpos / 8 and
19594         sign extend based on POINTER_SIZE.
19596         PR target/84844
19597         Revert
19598         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
19600         PR target/78090
19601         * config/i386/constraints.md (Yc): New register constraint.
19602         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
19603         Use Yc constraint for alternative 2 of operand 0.  Remove
19604         preferred_for_speed attribute.
19606 2018-03-14  Richard Biener  <rguenther@suse.de>
19608         PR tree-optimization/84830
19609         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
19610         with the old one to avoid oscillations.
19612 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
19614         PR target/83712
19615         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
19616         pseudos.
19617         (assign_by_spills): Return a flag of reload assignment failure.
19618         Do not process the reload assignment failures.  Do not spill other
19619         reload pseudos if they has the same reg class.  Update n if
19620         necessary.
19621         (lra_assign): Add a return arg.  Set up from the result of
19622         assign_by_spills call.
19623         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19624         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
19625         usage_insns if it is not NULL.
19626         (spill_hard_reg_in_range): New function.
19627         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19628         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19629         function prototypes.
19630         (lra_assign): Change prototype.
19631         * lra.c (lra): Add code to deal with fails by splitting hard reg
19632         live ranges.
19634 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
19636         * config/riscv/riscv.opt (mrelax): New option.
19637         * config/riscv/riscv.c (riscv_file_start): Emit ".option
19638         "norelax" when riscv_mrelax is disabled.
19639         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
19641 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19643         PR target/84743
19644         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
19645         reassociation for int modes.
19647 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
19649         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
19650         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
19651         for big-endian.
19652         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
19653         * config/aarch64/aarch64-sve.md
19654         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
19655         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
19656         (*extend<mode><Vwide>2): Rename to...
19657         (aarch64_sve_extend<mode><Vwide>2): ...this.
19658         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
19659         renaming the old pattern to...
19660         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
19661         unsigned packs.
19662         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
19663         define_expand, renaming the old pattern to...
19664         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
19665         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
19666         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
19667         account when deciding which SVE instruction the optab should use.
19668         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
19670 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
19672         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
19673         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
19674         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
19675         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
19676         (tlsdesc_small_<mode>): Turn a define_expand and use
19677         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
19678         (tlsdesc_small_advsimd_<mode>): ...this.
19679         (tlsdesc_small_sve_<mode>): New pattern.
19681 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
19683         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
19684         (UNSPEC_UMUL_HIGHPART): New constants.
19685         (MUL_HIGHPART): New int iteraor.
19686         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
19687         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
19688         define_expand.
19689         (*<su>mul<mode>3_highpart): New define_insn.
19691 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
19693         PR lto/84805
19694         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19695         incomplete types.
19697 2018-03-13  Martin Liska  <mliska@suse.cz>
19699         PR ipa/84658.
19700         * (sem_item_optimizer::sem_item_optimizer): Initialize new
19701         vector.
19702         (sem_item_optimizer::~sem_item_optimizer): Release it.
19703         (sem_item_optimizer::merge_classes): Register variable aliases.
19704         (sem_item_optimizer::fixup_pt_set): New function.
19705         (sem_item_optimizer::fixup_points_to_sets): Likewise.
19706         * ipa-icf.h: Declare new variables and functions.
19708 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
19710         PR middle-end/84834
19711         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
19712         integer_pow2p@2 and test integer_pow2p in condition.
19713         (A < 0 ? C : 0): Similarly for @1.
19715         PR middle-end/84831
19716         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
19717         characters starting at p contain '\0' character, don't look beyond
19718         that.
19720         PR target/84827
19721         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
19722         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
19724         PR target/84828
19725         * reg-stack.c (change_stack): Change update_end var from int to
19726         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
19727         also call set_block_for_insn on the newly added insns and rescan.
19729         PR target/84786
19730         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
19731         on the last operand.
19733         PR c++/84704
19734         * tree.c (stabilize_reference_1): Return save_expr (e) for
19735         STATEMENT_LIST even if it doesn't have side-effects.
19737 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
19739         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
19741 2018-03-12  Renlin Li  <renlin.li@arm.com>
19743         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
19744         aarch64_output_scalar_simd_mov_immediate.
19746 2018-03-12  Martin Sebor  <msebor@redhat.com>
19748         PR tree-optimization/83456
19749         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
19750         for perfectly overlapping calls to memcpy.
19751         (gimple_fold_builtin_memory_chk): Same.
19752         (gimple_fold_builtin_strcpy): Handle no-warning.
19753         (gimple_fold_builtin_stxcpy_chk): Same.
19754         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
19756 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
19758         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
19759         parameter.  Use it for SFmode.
19760         (rs6000_function_arg_advance_1): Adjust.
19761         (rs6000_function_arg): Adjust.
19762         (rs6000_gimplify_va_arg): Pass false for that new parameter.
19764 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
19766         PR rtl-optimization/84169
19767         PR rtl-optimization/84780
19768         * combine.c (can_combine_p): Check for a 2-insn combination whether
19769         the destination register is used between the two insns, too.
19771 2018-03-12  Richard Biener  <rguenther@suse.de>
19773         PR tree-optimization/84803
19774         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
19775         for refs DR analysis didn't process.
19777 2018-03-12  Richard Biener  <rguenther@suse.de>
19779         PR tree-optimization/84777
19780         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
19781         force-vectorize loops ignore whether we are optimizing for size.
19783 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
19785         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
19786         (TARGET_MD_ASM_ADJUST): Define.
19788 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
19789             Kito Cheng  <kito.cheng@gmail.com>
19790             Chung-Ju Wu  <jasonwucj@gmail.com>
19792         * config/nds32/nds32.c (nds32_compute_stack_frame,
19793         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
19794         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
19795         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
19796         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
19797         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
19798         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
19799         * config/nds32/nds32.md (prologue, epilogue): Use macro
19800         NDS32_V3PUSH_AVAILABLE_P to do checking.
19802 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
19804         PR debug/58150
19805         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
19806         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
19807         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
19808         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
19809         addition of most attributes on !orig_type_die or the attribute not
19810         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
19812 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
19813             Chung-Ju Wu  <jasonwucj@gmail.com>
19815         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
19816         __NDS32_VH__ macro.
19817         * config/nds32/nds32.opt (mvh): New option.
19819 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
19820             Chung-Ju Wu  <jasonwucj@gmail.com>
19822         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
19823         function.
19824         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
19825         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
19826         definition.
19828 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
19829             Chung-Ju Wu  <jasonwucj@gmail.com>
19831         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
19832         function.
19833         * config/nds32/nds32-multiple.md (strlensi): New pattern.
19834         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
19836 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
19837             Kito Cheng  <kito.cheng@gmail.com>
19838             Chung-Ju Wu  <jasonwucj@gmail.com>
19840         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
19841         UNSPEC_FFMISM and UNSPEC_FLMISM.
19842         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
19843         for ffb, ffmism and flmism.
19844         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
19845         (unspec_ffmism): Ditto.
19846         (unspec_flmism): Ditto.
19847         (nds32_expand_builtin_impl): Check if string extension is available.
19848         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
19849         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
19851 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
19853         Reverting patch:
19854         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
19856         PR target/83712
19857         * lra-assigns.c (assign_by_spills): Return a flag of reload
19858         assignment failure.  Do not process the reload assignment
19859         failures.  Do not spill other reload pseudos if they has the same
19860         reg class.
19861         (lra_assign): Add a return arg.  Set up from the result of
19862         assign_by_spills call.
19863         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19864         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
19865         usage_insns if it is not NULL.
19866         (spill_hard_reg_in_range): New function.
19867         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19868         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19869         function prototypes.
19870         (lra_assign): Change prototype.
19871         * lra.c (lra): Add code to deal with fails by splitting hard reg
19872         live ranges.
19874 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
19876         PR target/84807
19877         * config/i386/i386.opt: Replace Enforcment with Enforcement.
19879 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
19881         PR debug/84620
19882         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
19883         (dw_val_node): Add val_symbolic_view.
19884         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
19885         (symview_upper_bound): New.
19886         (new_line_info_table): Initialize symviews_since_reset.
19887         (dwarf2out_source_line): Count symviews_since_reset and set
19888         symview_upper_bound.
19889         (dw_val_equal_p): Handle symview.
19890         (add_AT_symview): New.
19891         (print_dw_val): Handle symview.
19892         (attr_checksum, attr_checksum_ordered): Likewise.
19893         (same_dw_val_p, size_of_die): Likewise.
19894         (value_format, output_die): Likewise.
19895         (add_high_low_attributes): Use add_AT_symview for entry_view.
19896         (dwarf2out_finish): Reset symview_upper_bound, clear
19897         zero_view_p.
19899 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
19901         PR target/83969
19902         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
19903         Add strict argument and use it.
19904         (rs6000_split_multireg_move): Update for new strict argument.
19905         (mem_operand_gpr): Disallow all non-offsettable addresses.
19906         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
19908 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
19910         PR target/84772
19911         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
19912         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
19913         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
19915         PR c++/84767
19916         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
19917         decl, use remap_type if we want to use the type.
19919 2018-03-09  Martin Sebor  <msebor@redhat.com>
19921         PR tree-optimization/84526
19922         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19923         Remove dead code.
19924         (builtin_access::generic_overlap): Be prepared to handle non-array
19925         base objects.
19927 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
19929         PR rtl-optimization/84682
19930         * lra-constraints.c (process_address_1): Check is_address flag
19931         for address constraints.
19932         (process_alt_operands): Likewise.
19933         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
19934         preprocess_constraints.
19935         * recog.h (preprocess_constraints): Add oploc parameter.
19936         Adjust callers.
19937         * recog.c (preprocess_constraints): Test address_operand for
19938         CT_ADDRESS constraints.
19940 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
19942         PR target/83712
19943         * lra-assigns.c (assign_by_spills): Return a flag of reload
19944         assignment failure.  Do not process the reload assignment
19945         failures.  Do not spill other reload pseudos if they has the same
19946         reg class.
19947         (lra_assign): Add a return arg.  Set up from the result of
19948         assign_by_spills call.
19949         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19950         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
19951         usage_insns if it is not NULL.
19952         (spill_hard_reg_in_range): New function.
19953         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19954         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19955         function prototypes.
19956         (lra_assign): Change prototype.
19957         * lra.c (lra): Add code to deal with fails by splitting hard reg
19958         live ranges.
19960 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19962         PR target/83193
19963         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
19964         Accept complain bool parameter.  Only emit errors if it is true.
19965         (arm_parse_cpu_option_name): Likewise.
19966         (arm_target_thumb_only): Adjust callers of the above.
19967         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
19968         prototype to take a default true bool parameter.
19969         (arm_parse_arch_option_name): Likewise.
19971 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
19972             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
19974         PR jit/64089
19975         PR jit/84288
19976         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
19977         * configure: Regenerate.
19978         * configure.ac ("linker --version-script option"): New.
19979         ("linker soname option"): New.
19981 2018-03-09  Richard Biener  <rguenther@suse.de>
19983         PR tree-optimization/84775
19984         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
19985         immediate uses of predicate stmts and mark them modified.
19987         Revert
19988         PR tree-optimization/84178
19989         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19990         to caller.
19991         (version_loop_for_if_conversion): Delay update_ssa call.
19992         (tree_if_conversion): Delay update_ssa until after predicate
19993         insertion.
19995 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
19997         PR target/84763
19998         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
19999         when the function accesses prior frames.
20001 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
20003         PR debug/84456
20004         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
20005         gen_llsym, otherwise call maybe_gen_llsym.
20007         PR inline-asm/84742
20008         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
20009         has ',' character inside of it.
20011 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20013         PR target/84748
20014         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
20015         as clobbering CC_REGNUM.
20017 2018-03-08  Richard Biener  <rguenther@suse.de>
20019         PR middle-end/84552
20020         * tree-scalar-evolution.c: Include tree-into-ssa.h.
20021         (follow_copies_to_constant): Do not follow SSA names registered
20022         for update.
20024 2018-03-08  Richard Biener  <rguenther@suse.de>
20026         PR tree-optimization/84178
20027         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
20028         to caller.
20029         (version_loop_for_if_conversion): Delay update_ssa call.
20030         (tree_if_conversion): Delay update_ssa until after predicate
20031         insertion.
20033 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
20035         PR tree-optimization/84178
20036         * tree-if-conv.c (release_bb_predicate): Remove the
20037         the assertion that the stmts have NULL use_ops.
20038         Discard the statements, asserting that they haven't
20039         yet been added to a BB.
20041 2018-03-08  Richard Biener  <rguenther@suse.de>
20043         PR tree-optimization/84746
20044         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
20045         (phi_translate): Pass in destination ANTIC_OUT set.
20046         (phi_translate_1): Likewise.  For a simplified result lookup
20047         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
20048         (phi_translate_set): Adjust.
20049         (do_pre_regular_insertion): Likewise.
20050         (do_pre_partial_partial_insertion): Likewise.
20052 2018-03-08  Martin Liska  <mliska@suse.cz>
20054         PR gcov-profile/84735
20055         * doc/gcov.texi: Document usage of profile files.
20056         * gcov-io.h: Document changes in the format.
20058 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
20060         PR debug/84404
20061         PR debug/84408
20062         * dwarf2out.c (struct dw_line_info_table): Update comments for
20063         view == -1.
20064         (FORCE_RESET_NEXT_VIEW): New.
20065         (FORCE_RESETTING_VIEW_P): New.
20066         (RESETTING_VIEW_P): Check for -1 too.
20067         (ZERO_VIEW_P): Likewise.
20068         (new_line_info_table): Force-reset next view.
20069         (dwarf2out_begin_function): Likewise.
20070         (dwarf2out_source_line): Simplify zero_view_p initialization.
20071         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
20072         view directly.  Omit view when omitting .loc at line 0.
20074 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
20076         PR tree-optimization/84740
20077         * tree-switch-conversion.c (process_switch): Call build_constructors
20078         only if info.phi_count is non-zero.
20080         PR tree-optimization/84739
20081         * tree-tailcall.c (find_tail_calls): Check call arguments against
20082         DECL_ARGUMENTS (current_function_decl) rather than
20083         DECL_ARGUMENTS (func) when checking for tail recursion.
20085 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
20087         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
20088         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
20089         Volker Reichelt's entry and add entries for people that perform
20090         GCC fuzzy testing and report numerous bugs.
20092 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
20094         PR target/82411
20095         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
20096         readonly data in sdata, if that is disabled.
20097         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
20098         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
20099         -mreadonly-in-sdata option.
20101 2018-03-07  Martin Sebor  <msebor@redhat.com>
20103         PR tree-optimization/84468
20104         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
20105         basic block when looking for nul assignment.
20107 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
20109         PR target/84277
20110         * except.h (output_function_exception_table): Adjust prototype.
20111         * except.c (output_function_exception_table): Remove FNNAME parameter
20112         and add SECTION parameter.  Ouput one part of the table at a time.
20113         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
20114         the first part of the exception table and emit unwind directives.
20115         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
20116         (i386_pe_seh_cold_init): Likewise.
20117         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
20118         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
20119         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
20120         (ix86_output_call_insn): Emit a nop in one more case for SEH.
20121         * config/i386/winnt.c: Include except.h.
20122         (struct seh_frame_state): Add reg_offset, after_prologue and
20123         in_cold_section fields.
20124         (i386_pe_seh_end_prologue): Set seh->after_prologue.
20125         (i386_pe_seh_cold_init): New function.
20126         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
20127         to seh->in_cold_section.
20128         (seh_emit_push): Record the offset of the push.
20129         (seh_emit_save): Record the offet of the save.
20130         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
20131         Test seh->after_prologue to disregard the epilogue.
20132         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
20133         (i386_pe_end_cold_function): New function.
20135 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
20137         PR fortran/84565
20138         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
20139         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
20141         PR c++/84704
20142         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
20143         on tmp_var.
20144         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
20145         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
20147         PR middle-end/84723
20148         * multiple_target.c: Include tree-inline.h and intl.h.
20149         (expand_target_clones): Diagnose and fail if node->definition and
20150         !tree_versionable_function_p (node->decl).
20152 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
20154         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
20155         sprint_ul.
20156         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
20157         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
20158         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
20160 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
20162         PR target/84710
20163         * combine.c (try_combine): Use reg_or_subregno instead of handling
20164         just paradoxical SUBREGs and REGs.
20166 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
20168         * config/arc/arc.c (arc_finalize_pic): Remove function.
20169         (arc_must_save_register): We use single base PIC register, remove
20170         checks to save/restore the PIC register.
20171         (arc_expand_prologue): Likewise.
20172         * config/arc/arc-protos.h (arc_set_default_type_attributes):
20173         Remove.
20174         (arc_verify_short): Likewise.
20175         (arc_attr_type): Likewise.
20176         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
20177         (walk_stores): Likewise.
20178         (arc_address_cost): Make it static.
20179         (arc_verify_short): Likewise.
20180         (branch_dest): Likewise.
20181         (arc_attr_type): Likewise.
20182         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
20183         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
20184         (arc_final_prescan_insn): Remove inserting the nops due to
20185         hardware hazards.  It is done in reorg step.
20186         (insn_length_variant_t): Remove.
20187         (insn_length_parameters_t): Likewise.
20188         (arc_insn_length_parameters): Likewise.
20189         (arc_get_insn_variants): Likewise.
20190         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
20192 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
20194         PR inline-asm/84683
20195         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
20196         assertion failure.
20198         PR tree-optimization/84687
20199         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
20200         on new_node->decl.
20201         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
20203 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20205         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
20206         Rename to ppc_speculation_barrier.
20207         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
20208         __builtin_ppc_speculation_barrier.
20210 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
20212         PR target/84700
20213         * combine.c (combine_simplify_rtx): Don't try to simplify if
20214         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
20215         are equal to x.
20217 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
20219         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
20220         to 32 bytes when compiling for POWER9.
20222 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
20224         PR target/84564
20225         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
20226         regparm >= 3 with no arg reg available also for calls with
20227         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
20229         PR target/84524
20230         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
20231         orig,vex.
20232         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
20234 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
20236         PR target/84264
20237         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
20239 2018-03-05  Richard Biener  <rguenther@suse.de>
20241         PR tree-optimization/84486
20242         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
20243         When inserting a __builtin_assume_aligned call set the LHS
20244         SSA name alignment info accordingly.
20246 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
20248         PR tree-optimization/84114
20249         * config/aarch64/aarch64.c (aarch64_reassociation_width)
20250         Avoid reassociation of FLOAT_MODE addition.
20252 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
20254         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
20255         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
20256         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
20257         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
20258         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
20259         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
20260         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
20261         and -mwbnoinvd.
20262         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
20263         __builtin_ia32_wbinvd): New builtins.
20264         (SPECIAL_ARGS2): New.
20265         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
20266         (SPECIAL_ARGS2): New.
20267         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
20268         (ix86_valid_target_attribute_inner_p): Ditto.
20269         (ix86_init_mmx_sse_builtins): Add special_args2.
20270         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
20271         TARGET_WBNOINVD_P): New.
20272         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
20273         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
20274         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
20275         * config/i386/immintrin.h (_wbinvd): New intrinsic.
20276         * config/i386/pconfigintrin.h: New file.
20277         * config/i386/wbnoinvdintrin.h: Ditto.
20278         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
20279         wbnoinvdintrin.h.
20280         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
20282 2018-03-05  Richard Biener  <rguenther@suse.de>
20284         PR tree-optimization/84670
20285         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20286         member.
20287         (BB_VISITED_WITH_VISITED_SUCCS): New define.
20288         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20289         (compute_antic_aux): Only assert the number of values in ANTIC_IN
20290         doesn't grow if all successors (recursively) were visited at least
20291         once.
20293 2018-03-05  Richard Biener  <rguenther@suse.de>
20295         PR tree-optimization/84650
20296         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
20297         if executed in the loop pipeline.
20299 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
20301         * doc/configfiles.texi (Configuration Files): Move info about
20302         conditionalizing $target-protos.h to...
20303         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
20304         differs from $target-protos.h.
20306 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
20307             Chung-Ju Wu  <jasonwucj@gmail.com>
20309         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
20310         * config/nds32/nds32-multiple.md (setmemsi): Define.
20311         * config/nds32/nds32-memory-manipulation.c
20312         (nds32_gen_dup_4_byte_to_word_value): New.
20313         (emit_setmem_word_loop): New.
20314         (emit_setmem_byte_loop): New.
20315         (nds32_expand_setmem_loop): New.
20316         (nds32_expand_setmem_loop_v3m): New.
20317         (nds32_expand_setmem_unroll): New.
20318         (nds32_expand_setmem): New.
20320 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
20321             Chung-Ju Wu  <jasonwucj@gmail.com>
20323         * config/nds32/nds32-memory-manipulation.c
20324         (nds32_emit_load_store): New.
20325         (nds32_emit_post_inc_load_store): New.
20326         (nds32_emit_mem_move): New.
20327         (nds32_emit_mem_move_block): New.
20328         (nds32_expand_movmemsi_loop_unknown_size): New.
20329         (nds32_expand_movmemsi_loop_known_size): New.
20330         (nds32_expand_movmemsi_loop): New.
20331         (nds32_expand_movmemsi_unroll): New.
20332         (nds32_expand_movmemqi): Rename ...
20333         (nds32_expand_movmemsi): ... to this.
20334         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
20335         (movmemsi): ... to this.
20336         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
20337         (nds32_expand_movmemsi): ... to this.
20339 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
20340             Monk Chiang  <sh.chiang04@gmail.com>
20341             Chung-Ju Wu  <jasonwucj@gmail.com>
20343         * config/nds32/nds32-protos.h
20344         (nds32_expand_load_multiple): New arguments.
20345         (nds32_expand_store_multiple): Ditto.
20346         (nds32_valid_multiple_load_store): Rename ...
20347         (nds32_valid_multiple_load_store_p): ... to this.
20348         * config/nds32/nds32-memory-manipulation.c
20349         (nds32_expand_load_multiple): Refine implementation.
20350         (nds32_expand_store_multiple): Ditto.
20351         * config/nds32/nds32-multiple.md
20352         (load_multiple): Update nds32_expand_load_multiple interface.
20353         (store_multiple): Update nds32_expand_store_multiple interface.
20354         * config/nds32/nds32-predicates.c
20355         (nds32_valid_multiple_load_store): Rename ...
20356         (nds32_valid_multiple_load_store_p): ... to this and refine
20357         implementation.
20358         * config/nds32/predicates.md
20359         (nds32_load_multiple_and_update_address_operation): New predicate.
20360         (nds32_store_multiple_and_update_address_operation): New predicate.
20362 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
20363             Chung-Ju Wu  <jasonwucj@gmail.com>
20365         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
20366         (combo): New attribute.
20367         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
20369 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
20371         * config/nds32/nds32.opt: Change -mcmodel= default value.
20373 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
20374             Monk Chiang  <sh.chiang04@gmail.com>
20375             Chung-Ju Wu  <jasonwucj@gmail.com>
20377         * config/nds32/constants.md (unspec_element): New enum.
20378         * config/nds32/constraints.md (Umw): New constraint.
20379         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
20380         * config/nds32/nds32-intrinsic.md: Likewise.
20381         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
20382         (nds32_valid_smw_lwm_base_p): New.
20383         (nds32_output_smw_single_word): New.
20384         (nds32_output_lmw_single_word): New.
20385         (nds32_expand_unaligned_load): New.
20386         (nds32_expand_unaligned_store): New.
20387         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
20388         (nds32_output_smw_single_word): Declare.
20389         (nds32_output_lmw_single_word): Declare.
20390         (nds32_expand_unaligned_load): Declare.
20391         (nds32_expand_unaligned_store): Declare.
20392         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
20393         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
20394         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
20395         NDS32_BUILTIN_UASTORE_DW.
20396         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
20397         predicate.
20399 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
20400             Kito Cheng  <kito.cheng@gmail.com>
20401             Chung-Ju Wu  <jasonwucj@gmail.com>
20403         * config/nds32/nds32-intrinsic.c
20404         (nds32_expand_builtin_null_ftype_reg): Delete.
20405         (nds32_expand_builtin_reg_ftype_imm): Ditto.
20406         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
20407         (nds32_read_argument): New.
20408         (nds32_legitimize_target): Ditto.
20409         (nds32_legitimize_argument): Ditto.
20410         (nds32_check_constant_argument): Ditto.
20411         (nds32_expand_unop_builtin): Ditto.
20412         (nds32_expand_unopimm_builtin): Ditto.
20413         (nds32_expand_binop_builtin): Ditto.
20414         (nds32_builtin_decl_impl): Ditto.
20415         (builtin_description): Ditto.
20416         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
20417         (nds32_init_builtins_impl): Ditto.
20418         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
20419         (nds32_builtin_decl): New.
20420         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
20421         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
20423 2018-03-02  Jeff Law  <law@redhat.com>
20425         * reorg.c (stop_search_p): Handle DEBUG_INSN.
20426         (redundant_insn, fill_simple_delay_slots): Likewise.
20427         (fill_slots_from_thread): Likewise.
20428         * resource.c (mark_referenced_resources): Likewise.
20429         (mark_set_resources, find_dead_or_set_registers): Likewise.
20431 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20433         * substring-locations.h (format_warning_va): Formatting fix for
20434         ATTRIBUTE_GCC_DIAG.
20435         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
20436         argument.
20437         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
20438         * substring-locations.c: Include intl.h.
20439         (format_warning_va): Turned into small wrapper around
20440         format_warning_n_va, renamed to ...
20441         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
20442         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
20443         use ngettext.
20444         (format_warning_at_substring_n): New function.
20445         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
20446         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
20447         format_warning_at_substring with just a shorter name instead of
20448         const function pointer.
20449         (fmtwarn_n): New function.
20450         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
20451         appropriate, get rid of all the fmtstr temporaries, move conditionals
20452         with G_() wrapped string literals directly into fmtwarn arguments,
20453         cast dir.len to (int), formatting fixes.
20455 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
20457         * doc/invoke.texi: Remove "Cilk Plus" references.
20459 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20460             Richard Biener  <rguenther@suse.de>
20462         PR ipa/84628
20463         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
20464         for error or warning attributes if CALL_FROM_THUNK_P is set.
20465         Formatting fixes.
20467 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20469         PR target/56540
20470         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
20471         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
20473         PR target/56540
20474         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
20475         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
20477         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
20478         instead of -1U in last predictors element's probability member.
20480 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
20482         PR ipa/83983
20483         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20484         arguments if they are comparable.
20486 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
20488         PR tree-optimization/84634
20489         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
20490         masks and masked_loop_p with a single loop_masks, making sure it's
20491         null for bb vectorization.
20493 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
20495         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
20496         (vect_analyze_data_ref_access): Use loop->safe_len rather than
20497         loop->force_vectorize to check whether there is no alias.
20499 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20501         PR target/84614
20502         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
20503         prototypes.
20504         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
20505         comments.
20506         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
20507         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
20508         instead of a loop around prev_real_insn.
20509         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
20510         prev_real_insn.
20512         PR inline-asm/84625
20513         * config/i386/i386.c (ix86_print_operand): Use conditional
20514         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
20515         zero vector.
20517 2018-03-02  Richard Biener  <rguenther@suse.de>
20519         PR tree-optimization/84427
20520         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
20521         (bitmap_set_subtract_values): Rewrite to handle multiple
20522         exprs per value.
20523         (clean): Likewise.
20524         (prune_clobbered_mems): Likewise.
20525         (phi_translate): Take edge instead of pred/phiblock.
20526         (phi_translate_1): Likewise.
20527         (phi_translate_set): Likewise.  Insert all translated
20528         exprs for a value into the set, keeping possibly multiple
20529         expressions per value.
20530         (compute_antic_aux): Adjust for phi_translate changes.
20531         When intersecting union the expressions and prune those
20532         not in the final value set, keeping possibly multiple
20533         expressions per value.  Do not use value-insertion
20534         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
20535         all expressions.  Add verification that the value-sets
20536         only shrink during iteration.
20537         (compute_partial_antic_aux): Adjust for the phi_translate changes.
20538         (do_pre_regular_insertion): Likewise.
20539         (do_pre_partial_partial_insertion): Likewise.
20541 2018-03-02  Richard Biener  <rguenther@suse.de>
20543         PR target/82005
20544         * config/darwin.c (saved_debug_info_level): New static global.
20545         (darwin_asm_lto_start): Disable debug info generation for LTO out.
20546         (darwin_asm_lto_end): Restore debug info generation settings.
20548 2018-03-01  Martin Liska  <mliska@suse.cz>
20550         PR sanitizer/82484
20551         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
20552         volatile arguments.
20554 2018-03-01  Richard Biener  <rguenther@suse.de>
20556         PR debug/84645
20557         * dwarf2out.c (gen_variable_die): Properly handle late VLA
20558         type annotation with LTO when debug was disabled at compile-time.
20560 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
20562         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
20563         XINT with INTVAL.
20564         (mips_final_postscan_insn): Likewise.
20566 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
20568         PR rtl-optimization/84528
20569         * alias.c (init_alias_target): Add commentary.
20570         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
20571         a unique base value if the frame pointer is not eliminated
20572         to the stack pointer.
20574 2018-03-01  Tom de Vries  <tom@codesourcery.com>
20576         PR rtl-optimization/83327
20577         * lra-int.h (hard_regs_spilled_into): Declare.
20578         * lra.c (hard_regs_spilled_into): Define.
20579         (init_reg_info): Init hard_regs_spilled_into.
20580         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
20581         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
20582         (process_bb_lives): Handle hard_regs_spilled_into.
20583         (lra_create_live_ranges_1): Before doing liveness propagation, clear
20584         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
20586 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
20588         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
20589         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
20590         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
20591         * config/rs6000/aix72.h: New file.
20593 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
20595         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
20596         instead of warning_at with conditional singular and plural messages
20597         where possible.
20599         PR target/52991
20600         * stor-layout.c (update_alignment_for_field): For
20601         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
20602         && !DECL_PACKED (field), do the alignment update, just use
20603         only desired_align instead of MAX (type_align, desired_align)
20604         as the alignment.
20605         (place_field): Don't do known_align < desired_align handling
20606         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
20607         is non-NULL, instead do it after rli->prev_field handling and
20608         only if not within a bitfield word.  For DECL_PACKED (field)
20609         use type_align of BITS_PER_UNIT.
20611 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
20613         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
20614         superfluous parentheses and trailing spaces.
20616 2018-02-28  Richard Biener  <rguenther@suse.de>
20618         PR tree-optimization/84584
20619         * graphite-scop-detection.c (scop_detection::add_scop): Discard
20620         SCoPs with fake exit edge.
20622 2018-02-28  Martin Liska  <mliska@suse.cz>
20624         PR testsuite/84597
20625         * timevar.c (timer::print): Fix format to properly print 100%
20626         values.
20628 2018-02-28  Richard Biener  <rguenther@suse.de>
20630         PR middle-end/84607
20631         * genmatch.c (capture_info::walk_match): Do not mark
20632         captured expressions without operands as expr_p given
20633         they act more like predicates and should be subject to
20634         "lost tail" side-effect preserving.
20636 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
20638         PR rtl-optimization/81611
20639         * auto-inc-dec.c (attempt_change): Move dead note from
20640         mem_insn if it's the next use of regno
20641         (find_address): Take address use of reg holding
20642         non-incremented value.  Add parm to limit search to the named
20643         reg only.
20644         (merge_in_block): Attempt to use a mem insn that is the next
20645         use of the original regno.
20647 2018-02-27  Martin Sebor  <msebor@redhat.com>
20649         PR c++/83871
20650         * doc/invoke.texi (-Wmissing-attributes): New option.
20651         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
20653 2018-02-27  Martin Sebor  <msebor@redhat.com>
20655         PR translation/84207
20656         * diagnostic-core.h (warning_n, error_n, inform_n): Change
20657         n argument to unsigned HOST_WIDE_INT.
20658         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
20659         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
20660         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
20661         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
20663 2018-02-27  Richard Biener  <rguenther@suse.de>
20665         PR tree-optimization/84512
20666         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
20667         Do not use the estimate returned from record_stmt_cost for
20668         the scalar iteration cost but sum properly using add_stmt_cost.
20670 2018-02-27  Richard Biener  <rguenther@suse.de>
20672         PR tree-optimization/84466
20673         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20674         Adjust last change to less strictly validate use operands.
20676 2018-02-27  Martin Liska  <mliska@suse.cz>
20678         PR gcov-profile/84548
20679         * gcov.c (process_file): Allow partial overlap and consider it
20680         also as group functions.
20681         (output_lines): Properly calculate range of lines for a group.
20683 2018-02-27  Martin Liska  <mliska@suse.cz>
20685         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
20686         'ggc' suffixes.  Change first column width.
20687         (timer::print): Fix formatting of the column.
20689 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
20691         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
20692         preserve inline entry blocks for the sake of debug inline
20693         entry point markers alone.
20694         (remove_unused_locals): Suggest in comments a better place to
20695         force the preservation of inline entry blocks that are
20696         otherwise unused, but do not preserve them.
20698 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
20700         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
20702 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
20704         PR target/84039
20705         * config/i386/constraints.md (Bs): Replace
20706         ix86_indirect_branch_register with
20707         TARGET_INDIRECT_BRANCH_REGISTER.
20708         (Bw): Likewise.
20709         * config/i386/i386.md (indirect_jump): Likewise.
20710         (tablejump): Likewise.
20711         (*sibcall_memory): Likewise.
20712         (*sibcall_value_memory): Likewise.
20713         Peepholes of indirect call and jump via memory: Likewise.
20714         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
20715         (*sibcall_value_GOT_32): Likewise.
20716         * config/i386/predicates.md (indirect_branch_operand): Likewise.
20717         (GOT_memory_operand): Likewise.
20718         (call_insn_operand): Likewise.
20719         (sibcall_insn_operand): Likewise.
20720         (GOT32_symbol_operand): Likewise.
20721         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
20723 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
20725         PR rtl-optimization/83496
20726         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
20727         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
20728         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
20729         redundant insn, if any.
20730         (relax_delay_slots): Likewise.
20731         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
20733 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
20735         PR tree-optimization/83965
20736         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
20737         that grouped statements are part of a reduction chain.  Return
20738         true if the statement is not marked as a reduction itself but
20739         is part of a group.
20740         (vect_recog_dot_prod_pattern): Don't check whether the statement
20741         is part of a group here.
20742         (vect_recog_sad_pattern): Likewise.
20743         (vect_recog_widen_sum_pattern): Likewise.
20745 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
20747         PR debug/84545
20748         * final.c (rest_of_clean_state): Also look for calls inside sequences.
20750 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
20752         PR target/84530
20753         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
20754         the bool argument.
20755         (ix86_output_indirect_function_return): New prototype.
20756         (ix86_split_simple_return_pop_internal): Likewise.
20757         * config/i386/i386.c (indirect_return_via_cx): New.
20758         (indirect_return_via_cx_bnd): Likewise.
20759         (indirect_thunk_name): Handle return va CX_REG.
20760         (output_indirect_thunk_function): Create alias for
20761         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
20762         (ix86_output_indirect_jmp): Remove the bool argument.
20763         (ix86_output_indirect_function_return): New function.
20764         (ix86_split_simple_return_pop_internal): Likewise.
20765         * config/i386/i386.md (*indirect_jump): Don't pass false
20766         to ix86_output_indirect_jmp.
20767         (*tablejump_1): Likewise.
20768         (simple_return_pop_internal): Change it to define_insn_and_split.
20769         Call ix86_split_simple_return_pop_internal to split it for
20770         -mfunction-return=.
20771         (simple_return_indirect_internal): Call
20772         ix86_output_indirect_function_return instead of
20773         ix86_output_indirect_jmp.
20775 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
20777         PR bootstrap/84405
20778         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
20779         memset and value initialization afterwards.
20781 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
20783         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
20785 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
20787         PR target/84521
20788         * common/config/aarch64/aarch64-common.c
20789         (aarch_option_optimization_table[]): Switch
20790         off fomit-frame-pointer
20792 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
20793             Chung-Ju Wu  <jasonwucj@gmail.com>
20795         * config/nds32/nds32-multiple.md (load_multiple): Disallow
20796         volatile memory.
20797         (store_multiple): Ditto.
20799 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
20801         * config.gcc: Add --with-cpu support for nds32 target.
20802         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
20803         * config/nds32/nds32.opt: Add -mcpu= option.
20805 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
20807         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
20808         isel=yes): Warn for these deprecated options.
20810 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
20812         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
20813         ISA_2_5_MASKS_EMBEDDED.
20815 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
20817         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
20818         p->max as pointers rather than using iterative_hash_expr.
20820 2018-02-23  Carl Love  <cel@us.ibm.com>
20822         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
20823         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
20824         BU_P8V_OVERLOAD_2.
20825         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
20826         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
20827         P8V_BUILTIN_VEC_VUNSIGNED2.
20829 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
20831         PR target/81572
20832         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
20833         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
20834         LRA_UNKNOWN_ALT.
20835         * lra-constraints.c (curr_insn_transform): Set up
20836         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
20837         LRA_UNKNOWN_ALT.
20838         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
20839         * lra-eliminations.c (spill_pseudos): Ditto.
20840         (process_insn_for_elimination): Ditto.
20841         * lra-lives.c (reg_early_clobber_p): Use the new macros.
20842         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
20843         LRA_NON_CLOBBERED_ALT.
20845 2018-02-22  Martin Sebor  <msebor@redhat.com>
20847         PR tree-optimization/84480
20848         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
20849         to maybe_diag_stxncpy_trunc.  Call it.
20850         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
20851         from gimple_fold_builtin_strcpy.  Print inlining stack.
20852         (handle_builtin_stxncpy): Print inlining stack.
20853         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
20855 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
20857         PR target/84176
20858         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
20859         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
20860         and -fcheck-pointer-bounds are used together.
20861         (indirect_thunk_prefix): New enum.
20862         (indirect_thunk_need_prefix): New function.
20863         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
20864         "_nt" instead of "_bnd" for NOTRACK prefix.
20865         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
20866         (output_indirect_thunk_function): Likewise.
20867         (): Likewise.
20868         (ix86_code_end): Update output_indirect_thunk_function calls.
20869         (ix86_output_indirect_branch_via_reg): Replace
20870         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
20871         (ix86_output_indirect_branch_via_push): Likewise.
20872         (ix86_output_function_return): Likewise.
20873         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
20874         incompatible with -fcf-protection=branch and
20875         -fcheck-pointer-bounds.
20877 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
20879         PR target/83335
20880         * config/aarch64/aarch64.c (aarch64_print_address_internal):
20881         Change gcc_assert call to output_operand_lossage.
20883 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
20885         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
20887 2018-02-22  DJ Delorie  <dj@redhat.com>
20888             Sebastian Perta  <sebastian.perta@renesas.com>
20889             Oleg Endo  <olegendo@gcc.gnu.org>
20891         * config/rx/rx.c (rx_rtx_costs): New function.
20892         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
20894 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
20896         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
20898 2018-02-22  Martin Liska  <mliska@suse.cz>
20900         PR driver/83193
20901         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
20902         Add "native" as a possible value.
20904 2018-02-22  Martin Liska  <mliska@suse.cz>
20906         PR driver/83193
20907         * config/i386/i386.c (ix86_option_override_internal):
20908         Add "native" as a possible value for -march and -mtune.
20910 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
20912         PR target/84502
20913         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
20914         to all type variants.
20916         PR tree-optimization/84503
20917         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
20918         width as info->bitpos + info->bitsize - start.
20919         (merged_store_group::merge_overlapping): Simplify width computation.
20920         (check_no_overlap): New function.
20921         (imm_store_chain_info::try_coalesce_bswap): Compute expected
20922         start + width and last_order of the group, fail if check_no_overlap
20923         fails.
20924         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
20925         to group if check_no_overlap fails.
20927 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
20929         * config/rs6000/altivec.md: Delete contraint arguments to
20930         define_expand, define_split, and define_peephole2, and in
20931         define_insn_and_split if always unused.
20932         * config/rs6000/darwin.md: Ditto.
20933         * config/rs6000/dfp.md: Ditto.
20934         * config/rs6000/rs6000.md: Ditto.
20935         * config/rs6000/sync.md: Ditto.
20936         * config/rs6000/vector.md: Ditto.
20937         * config/rs6000/vsx.md: Ditto.
20939 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
20941         * config/rs6000/altivec.md: Write output control strings as braced
20942         blocks instead of double-quoted strings.
20943         * config/rs6000/darwin.md: Ditto.
20944         * config/rs6000/rs6000.md: Ditto.
20945         * config/rs6000/vector.md: Ditto.
20946         * config/rs6000/vsx.md: Ditto.
20948 2018-02-21  Jason Merrill  <jason@redhat.com>
20950         PR c++/84314 - ICE with templates and fastcall attribute.
20951         * attribs.c (build_type_attribute_qual_variant): Remove assert.
20953 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
20955         * ipa-cp.c (determine_versionability): Fix comment typos.
20957 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
20959         PR c/84229
20960         * ipa-cp.c (determine_versionability): Do not version functions caling
20961         va_arg_pack.
20963 2018-02-21  Martin Liska  <mliska@suse.cz>
20965         PR driver/83193
20966         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
20967         Add "native" as a possible value.
20968         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
20969         the macro when native cpu detection is available.
20971 2018-02-21  Martin Liska  <mliska@suse.cz>
20973         PR driver/83193
20974         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
20975         Add "native" as a possible value.
20976         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
20977         when native cpu detection is available.
20979 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
20980             Martin Sebor  <msebor@redhat.com>
20982         PR tree-optimization/84478
20983         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
20984         false.
20985         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
20986         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
20987         support which is conservatively correct, for 2 only stay conservative
20988         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
20989         argument to the 2 argument get_range_strlen, adjust 6 arg
20990         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
20991         false.
20992         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
20993         (gimple_fold_builtin_strlen): Pass true as last argument to
20994         get_range_strlen.
20996 2018-02-20  Martin Sebor  <msebor@redhat.com>
20998         PR middle-end/84095
20999         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
21000         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
21001         (builtin_memref::builtin_memref): Factor out parts into
21002         set_base_and_offset and call it.
21004 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
21006         PR middle-end/84406
21007         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
21008         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
21009         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
21010         search at the associated MODE_INT.
21012 2018-02-20  Jeff Law  <law@redhat.com>
21014         PR middle-end/82123
21015         PR tree-optimization/81592
21016         PR middle-end/79257
21017         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
21018         for range data rather than using global data.
21019         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
21020         range data rather than using global data.
21021         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
21022         pass it to children as needed.
21023         (struct directive::fmtresult): Similarly.
21024         (struct directive::set_width): Similarly.
21025         (struct directive::set_precision): Similarly.
21026         (format_integer, format_directive, parse_directive): Similarly.
21027         (format_none): Accept unnamed vr_values parameter.
21028         (format_percent, format_floating, format_character): Similarly.
21029         (format_string, format_plain): Similarly.
21030         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
21031         the EVRP range analyzer for range data rather than using global data.
21032         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
21033         gimple-ssa-evrp-analyze.h
21034         (class sprintf_dom_walker): Add after_dom_children member function.
21035         Add evrp_range_analyzer member.
21036         (sprintf_dom_walker::before_dom_children): Call into the EVRP
21037         range analyzer as needed.
21038         (sprintf_dom_walker::after_dom_children): New member function.
21039         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
21040         if not optimizing.
21041         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
21042         (evrp_range_analyzer::pop_to_marker): Likewise.
21044 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
21046         PR tree-optimization/84419
21047         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
21048         with the required type if its current type is compatible but
21049         different.
21051 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
21053         PR middle-end/82004
21054         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
21055         after vectorization.
21057 2018-02-20  Martin Liska  <mliska@suse.cz>
21059         PR driver/83193
21060         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
21061         possible values if we don't have a hint.
21063 2018-02-20  Martin Liska  <mliska@suse.cz>
21065         PR c/84310
21066         PR target/79747
21067         * final.c (shorten_branches): Build align_tab array with one
21068         more element.
21069         * opts.c (finish_options): Add alignment option limit check.
21070         (MAX_CODE_ALIGN): Likewise.
21071         (MAX_CODE_ALIGN_VALUE): Likewise.
21072         * doc/invoke.texi: Document maximum allowed option value for
21073         all -falign-* options.
21075 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
21077         PR target/84146
21078         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
21079         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
21080         * var-tracking.c (emit_note_insn_var_location): Remove all references
21081         to NOTE_INSN_CALL_ARG_LOCATION.
21082         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
21083         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
21084         Use copy_rtx_if_shared.
21085         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
21086         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
21087         (dwarf2out_var_location): Remove handling of
21088         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
21089         on call_insn.
21090         * final.c (final_scan_insn): Remove all references to
21091         NOTE_INSN_CALL_ARG_LOCATION.
21092         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
21093         before dumping final insns.
21094         * except.c (emit_note_eh_region_end): Remove all references to
21095         NOTE_INSN_CALL_ARG_LOCATION.
21096         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
21097         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
21098         * config/arc/arc.c (hwloop_optimize): Likewise.
21099         * config/arm/arm.c (create_fix_barrier): Likewise.
21100         * config/s390/s390.c (s390_chunkify_start): Likewise.
21101         * config/sh/sh.c (find_barrier): Likewise.
21102         * config/i386/i386.c (rest_of_insert_endbranch,
21103         ix86_seh_fixup_eh_fallthru): Likewise.
21104         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
21105         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
21106         * config/frv/frv.c (frv_function_prologue): Likewise.
21107         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
21108         reg note.
21109         (note_outside_basic_block_p): Remove all references to
21110         NOTE_INSN_CALL_ARG_LOCATION.
21111         * gengtype.c (adjust_field_rtx_def): Likewise.
21112         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
21113         Likewise.
21114         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
21115         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
21117         PR c++/84444
21118         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
21119         is ADDR_EXPR.
21121         PR tree-optimization/84452
21122         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
21123         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
21124         is NULL.
21126 2018-02-19  Martin Liska  <mliska@suse.cz>
21128         PR sanitizer/82183
21129         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
21131 2018-02-19  Martin Liska  <mliska@suse.cz>
21132             Richard Sandiford  <richard.sandiford@linaro.org>
21134         PR tree-optimization/82491
21135         * gimple-fold.c (get_base_constructor): Make earlier bail out
21136         to prevent ubsan.
21138 2018-02-19  Carl Love  <cel@us.ibm.com>
21140         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
21141         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
21142         BU_P8V_OVERLOAD_1.
21143         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
21144         P8V_BUILTIN_VEC_NEG.
21146 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
21148         * config/rl78/rl78.md (movdf): New define expand.
21150 2018-02-19  Martin Liska  <mliska@suse.cz>
21152         PR other/80589
21153         * doc/invoke.texi: Fix typo.
21154         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
21156 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
21158         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
21159         handle rs6000_single_float and rs6000_double_float specially for
21160         e500 family CPUs.
21162 2018-02-16  Jeff Law  <law@redhat.com>
21164         * config/rx/rx.c (add_pop_cfi_notes): New function.;
21165         (pop_regs): Use it.
21167 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
21169         PR ipa/84425
21170         * ipa-inline.c (inline_small_functions): Fix a typo.
21172 2018-02-16  Nathan Sidwell  <nathan@acm.org>
21174         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
21176 2018-02-16  Carl Love  <cel@us.ibm.com>
21178         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
21179         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
21180         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
21181         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
21182         expansion to P8V_BUILTIN_VEC_FLOAT2.
21184 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
21186         PR rtl-optimization/70023
21187         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
21188         src_regno into account.
21190 2018-02-16  Carl Love  <cel@us.ibm.com>
21192         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
21193         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
21194         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
21195         * config/rs6000/rs6000.c: Remove case statements for
21196         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
21197         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
21198         and P9V_BUILTIN_VEC_VINSERT4B.
21199         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
21200         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
21201         * config/rs6000/vsx.md:
21202         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
21203         vec_insert4b.
21205 2018-02-16  Carl Love  <cel@us.ibm.com>
21207         * config/rs6000/altivec.h: Add builtin names vec_extract4b
21208         vec_insert4b.
21209         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
21210         definitions.
21211         * config/rs6000/rs6000-c.c: Add the definitions for
21212         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
21213         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
21214         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
21215         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
21216         definition for insert4b and define insn *insert3b_internal.
21217         * doc/extend.texi: Add documentation for vec_extract4b.
21219 2018-02-16  Nathan Sidwell  <nathan@acm.org>
21221         * doc/extend.texi (Backwards Compatibility): Mention friend
21222         injection.  Note for-scope is deprecated.
21223         * doc/invoke.texi (-ffriend-injection): Deprecate.
21225 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
21227         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
21228         that moved to I2, also allow destinations that are a paradoxical
21229         subreg (instead of a normal reg).
21231 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
21233         PR target/83831
21234         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
21235         to QImode.
21237 2018-02-16  Richard Biener  <rguenther@suse.de>
21239         PR tree-optimization/84037
21240         PR tree-optimization/84016
21241         PR target/82862
21242         * config/i386/i386.c (ix86_builtin_vectorization_cost):
21243         Adjust vec_construct for the fact we need additional higher latency
21244         128bit inserts for AVX256 and AVX512 vector builds.
21245         (ix86_add_stmt_cost): Scale vector construction cost for
21246         elementwise loads.
21248 2018-02-16  Richard Biener  <rguenther@suse.de>
21250         PR tree-optimization/84417
21251         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
21252         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
21253         (non_rewritable_lvalue_p): Likewise, use poly-ints.
21255 2018-02-16  Martin Liska  <mliska@suse.cz>
21257         PR sanitizer/84307
21258         * internal-fn.def (ASAN_CHECK): Set proper flags.
21259         (ASAN_MARK): Likewise.
21261 2018-02-16  Julia Koval  <julia.koval@intel.com>
21263         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
21264         from PTA_CANNONLAKE.
21266 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
21268         PR target/84272
21269         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
21270         Use ++iter rather than iter++ for std::list iterators.
21271         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
21272         defer deleting them until all nodes in the forest are processed.  Do
21273         free even leaf nodes.  Change to_process into auto_vec.
21275         PR bootstrap/84405
21276         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
21277         * vec.h (vec_default_construct): Use memset instead of placement new
21278         if BROKEN_VALUE_INITIALIZATION is defined.
21279         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
21280         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
21281         is defined.
21283         PR rtl-optimization/83723
21284         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
21285         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
21286         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
21287         recursive calls.
21288         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
21289         callers.
21290         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
21292 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
21294         PR rtl-optimization/81443
21295         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
21296         from inner REGs to paradoxical SUBREGs.
21298 2018-02-16  Richard Biener  <rguenther@suse.de>
21300         PR tree-optimization/84399
21301         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21302         For operands we can analyze at their definition make sure we can
21303         analyze them at each use as well.
21305 2018-02-16  Richard Biener  <rguenther@suse.de>
21307         PR tree-optimization/84190
21308         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
21309         volatile accesses if the decl isn't volatile.
21311 2018-02-15  Jason Merrill  <jason@redhat.com>
21313         PR c++/84314 - ICE with templates and fastcall attribute.
21314         * attribs.c (build_type_attribute_qual_variant): Don't clobber
21315         TYPE_CANONICAL on an existing type.
21317 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
21319         PR tree-optimization/84383
21320         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
21321         dstoff nor call operand_equal_p if dstbase is NULL.
21323         PR tree-optimization/84334
21324         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
21325         also a CONSTANT_CLASS_P, punt.
21327 2018-02-14  Jim Wilson  <jimw@sifive.com>
21329         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
21330         first SMALL_OPERAND check.  New local min_second_step.  Move assert
21331         to where locals are set.  Add TARGET_RVC support.
21332         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
21334 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
21336         * doc/invoke.texi: Correct -Wformat-overflow code sample.
21338 2018-02-14  Martin Sebor  <msebor@redhat.com>
21340         PR tree-optimization/83698
21341         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
21342         arrays constrain the offset range to their bounds.
21343         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
21344         (builtin_access::overlap): Avoid setting the size of overlap if it's
21345         already been set.
21346         (maybe_diag_overlap): Also consider arrays when deciding what values
21347         of offsets to include in diagnostics.
21349 2018-02-14  Martin Sebor  <msebor@redhat.com>
21351         PR c/84108
21352         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
21353         that correspond to the kind of a declaration.
21355 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
21357         PR target/83984
21358         * config/pa/pa.md: Load address of PIC label using the linkage table
21359         if the label is nonlocal.
21361 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21363         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
21364         warning message if user requests -maltivec=be.
21365         * doc/invoke.texi: Document deprecation of -maltivec=be.
21367 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
21369         PR target/84220
21370         * config/rs6000/rs6000-c.c: Update definitions for
21371         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
21372         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
21374 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
21376         PR target/84239
21377         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
21378         add _get_ssp intrinsics. Remove argument from
21379         __builtin_ia32_rdssp[d|q].
21380         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
21381         * config/i386/i386-builtin.def: Remove argument from
21382         __builtin_ia32_rdssp[d|q].
21383         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
21384         ix86_expand_special_args_builtin for _rdssp[d|q].
21385         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
21386         Clear register before usage.
21387         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
21388         Add documentation for new _get_ssp and _inc_ssp intrinsics.
21390 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
21392         PR tree-optimization/84357
21393         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
21394         operand 1 of an ARRAY_REF too.
21396 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
21398         PR target/83831
21399         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
21400         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21401         declarations.
21402         (set_of_reg): New struct.
21403         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
21404         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
21405         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21406         functions.
21407         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
21408         Split into bitclr, bitset, bitinvert patterns if appropriate.
21409         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
21410         use rx_fuse_in_memory_bitop.
21411         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
21412         to named insn, correct maximum insn length.
21414 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
21416         PR target/79242
21417         * machmode.def: Define a complex mode for PARTIAL_INT.
21418         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
21419         MODE_PARTIAL_INT.
21420         * doc/rtl.texi: Document CSPImode.
21421         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
21422         handling.
21423         (msp430_hard_regno_nregs_with_padding): Likewise.
21425 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
21427         PR target/84279
21428         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
21430 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
21432         PR rtl-optimization/84169
21433         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
21434         we generated a parallel as new i3 and we split that to new i2 and i3
21435         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
21436         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
21437         those to i2, not i1.  Partially rewrite this scan code.
21439 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
21441         PR c/82210
21442         * stor-layout.c (place_field): For variable length fields, adjust
21443         offset_align afterwards not just based on the field's alignment,
21444         but also on the size.
21446         PR middle-end/84309
21447         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
21448         of exps and logs in the use_exp2 case.
21450 2018-02-13  Jeff Law  <law@redhat.com>
21452         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
21453         entry for "vector".
21455         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
21456         ARGS as unused.
21458 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
21460         PR debug/84342
21461         PR debug/84319
21462         * common.opt (gas-loc-support, gas-locview-support): New.
21463         (ginline-points, ginternal-reset-location-views): New.
21464         * doc/invoke.texi: Document them.  Use @itemx where intended.
21465         (gvariable-location-views): Adjust.
21466         * target.def (reset_location_view): New.
21467         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
21468         (TARGET_RESET_LOCATION_VIEW): New.
21469         * doc/tm.texi: Rebuilt.
21470         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
21471         (dwarf2out_default_as_locview_support): New.
21472         (output_asm_line_debug_info): Use option variables.
21473         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
21474         (output_loc_list): Likewise.
21475         (add_high_low_attributes): Check option variables.
21476         Don't output entry view attribute in strict mode.
21477         (gen_inlined_subroutine_die): Check option variables.
21478         (dwarf2out_inline_entry): Likewise.
21479         (init_sections_and_labels): Likewise.
21480         (dwarf2out_early_finish): Likewise.
21481         (maybe_reset_location_view): New, from...
21482         (dwarf2out_var_location): ... here.  Call it.
21483         * debug.h (dwarf2out_default_as_loc_support): Declare.
21484         (dwarf2out_default_as_locview_support): Declare.
21485         * hooks.c (hook_int_rtx_insn_0): New.
21486         * hooks.h (hook_int_rtx_insn_0): Declare.
21487         * toplev.c (process_options): Take -gas-loc-support and
21488         -gas-locview-support from dwarf2out.  Enable
21489         -gvariable-location-views by default only with locview
21490         assembler support.  Enable -ginternal-reset-location-views by
21491         default only if the target defines the corresponding hook.
21492         Enable -ginline-points by default if location views are
21493         enabled; force it disabled if statement frontiers are
21494         disabled.
21495         * tree-inline.c (expand_call_inline): Check option variables.
21496         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
21498 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
21500         PR tree-optimization/84321
21501         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
21502         handling.  Also check whether the anti-range contains any values
21503         that satisfy the mask; switch to a VR_RANGE if not.
21505 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
21507         PR sanitizer/84340
21508         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
21510 2018-02-13  Martin Jambor  <mjambor@suse.cz>
21512         PR c++/83990
21513         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
21514         of call statements, also set location of a load to a temporary.
21516 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
21518         * config/rl78/rl78.c (add_vector_labels): New function.
21519         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
21520         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
21521         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
21522         which checks that no arguments are passed.
21523         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
21524         * doc/extend.texi: Documentation for the new attribute.
21526 2018-02-13  Andreas Schwab  <schwab@suse.de>
21528         * config/riscv/linux.h (CPP_SPEC): Define.
21530 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
21532         PR target/84335
21533         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
21534         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
21535         OPTION_MASK_ISA_AES as first argument to def_builtin_const
21536         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
21537         instead of OPTION_MASK_ISA_PCLMUL as first argument to
21538         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
21539         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
21540         temporarily for AES and PCLMUL builtins.
21542         PR tree-optimization/84339
21543         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
21544         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
21545         Formatting fixes.
21547         PR middle-end/84309
21548         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
21549         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
21550         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
21551         inline function.
21552         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
21553         inline function.
21554         * omp-simd-clone.h: New file.
21555         * omp-simd-clone.c: Include omp-simd-clone.h.
21556         (expand_simd_clones): No longer static.
21557         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
21558         cgraph.h and omp-simd-clone.h.
21559         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
21560         (vect_recog_widen_shift_pattern): Formatting fix.
21561         (vect_pattern_recog_1): Don't check optab for calls.
21563         PR target/84336
21564         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
21565         operands[2] into a REG before using gen_lowpart on it.
21567 2018-02-12  Jeff Law  <law@redhat.com>
21569         PR target/83760
21570         * config/sh/sh.c (find_barrier): Consider a sibling call
21571         a barrier as well.
21573         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
21574         successfully back substituting a reg.
21576 2018-02-12  Richard Biener  <rguenther@suse.de>
21578         PR tree-optimization/84037
21579         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
21580         parameter, move visited init to caller.
21581         (vect_slp_analyze_operations): Separate cost from validity
21582         check, initialize visited once for all instances.
21583         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
21584         for all instances.
21585         * tree-vect-stmts.c (vect_model_simple_cost): Make early
21586         out an assert.
21587         (vect_model_promotion_demotion_cost): Likewise.
21588         (vectorizable_bswap): Guard cost modeling with !slp_node
21589         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
21590         SLP stmts.
21591         (vectorizable_call): Likewise.
21592         (vectorizable_conversion): Likewise.
21593         (vectorizable_assignment): Likewise.
21594         (vectorizable_shift): Likewise.
21595         (vectorizable_operation): Likewise.
21596         (vectorizable_store): Likewise.
21597         (vectorizable_load): Likewise.
21598         (vectorizable_condition): Likewise.
21599         (vectorizable_comparison): Likewise.
21601 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
21603         PR sanitizer/84307
21604         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
21605         (ASAN_MARK): Fix fnspec to account for return value, change pointer
21606         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
21608 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
21610         PR middle-end/83665
21611         * params.def (inline-min-speedup): Increase from 8 to 15.
21612         (max-inline-insns-auto): Decrease from 40 to 30.
21613         * ipa-split.c (consider_split): Add some buffer for function to
21614         be considered inlining candidate.
21615         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
21616         default values.
21618 2018-02-12  Richard Biener  <rguenther@suse.de>
21620         PR tree-optimization/84037
21621         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
21622         matched stmts if we cannot swap the non-matched ones.
21624 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
21626         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
21627         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
21628         _mm_maskz_scalef_round_ss): New intrinsics.
21629         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
21630         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
21631         __builtin_ia32_scalefss_round): Remove.
21632         (__builtin_ia32_scalefsd_mask_round,
21633         __builtin_ia32_scalefss_mask_round): New intrinsics.
21634         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
21635         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
21636         ((match_operand:VF_128 2 "<round_nimm_predicate>"
21637         "<round_constraint>")): Changed to ...
21638         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
21639         "<round_scalar_constraint>")): ... this.
21640         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
21641         %0, %1, %2<round_op3>}"): Changed to ...
21642         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
21643         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
21644         %2<round_scalar_mask_op3>}"): ... this.
21645         * config/i386/subst.md (round_scalar_nimm_predicate): New.
21647 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
21649         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
21650         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
21651         (_mm_maskz_sqrt_round_ss): New intrinsics.
21652         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
21653         (__builtin_ia32_sqrtsd_mask_round)
21654         (__builtin_ia32_sqrtss_mask_round): New builtins.
21655         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
21656         (__builtin_ia32_sqrtss_round): Remove.
21657         (__builtin_ia32_sqrtsd_mask_round)
21658         (__builtin_ia32_sqrtss_mask_round): New builtins.
21659         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
21660         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
21661         ((match_operand:VF_128 1 "vector_operand"
21662         "xBm,<round_constraint>")): Changed to ...
21663         ((match_operand:VF_128 1 "vector_operand"
21664         "xBm,<round_scalar_constraint>")): ... this.
21665         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
21666         %0, %2, %<iptr>1<round_op3>}): Changed to ...
21667         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
21668         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
21669         %<iptr>1<round_scalar_mask_op3>}): ... this.
21670         ((set_attr "prefix" "<round_prefix>")): Changed to ...
21671         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
21673 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
21675         PR target/84266
21676         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
21677         Cast vec_cmpeq result to correct type.
21678         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
21679         Cast vec_cmpgt result to correct type.
21681 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
21683         * final.c (final_scan_insn_1): Renamed from...
21684         (final_scan_insn): ... this.  New wrapper, to recover
21685         seen from the outermost call in recursive ones.
21686         * config/sparc/sparc.c (output_return): Drop seen from call.
21687         (output_sibcall): Likewise.
21688         * config/visium/visium.c (output_branch): Likewise.
21690 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
21692         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
21693         function label.
21695 2018-02-10  Alan Modra  <amodra@gmail.com>
21697         PR target/84300
21698         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
21699         Specify LR as an input.
21701 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
21703         PR sanitizer/83987
21704         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
21705         remove_member_access_dummy_vars): New functions.
21706         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
21707         lower_omp_1, execute_lower_omp): Use them.
21709         PR rtl-optimization/84308
21710         * shrink-wrap.c (spread_components): Release todo vector.
21712 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
21714         PR rtl-optimization/57193
21715         * ira-color.c (struct allocno_color_data): Add member
21716         conflict_allocno_hard_prefs.
21717         (update_conflict_allocno_hard_prefs): New.
21718         (bucket_allocno_compare_func): Add a preference based on
21719         conflict_allocno_hard_prefs.
21720         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
21721         (color_allocnos): Remove a dead code.  Initiate
21722         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
21724 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
21726         PR target/84226
21727         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
21728         constraint from =wa to wa.  Avoid a subreg on the output operand,
21729         instead use a pseudo and subreg it in a move.
21730         (p9_xxbrd_<mode>): Changed to ...
21731         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
21732         (p9_xxbrd_v2df): New expander.
21733         (p9_xxbrw_<mode>): Changed to ...
21734         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
21735         (p9_xxbrw_v4sf): New expander.
21737 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
21739         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
21741 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
21743         PR target/83926
21744         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
21745         multiply in 32-bit mode.
21746         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
21747         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
21748         mode.
21750 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
21752         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
21753         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
21754         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
21755         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
21757 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
21759         PR lto/84213
21760         * dwarf2out.c (is_trivial_indirect_ref): New function.
21761         (dwarf2out_late_global_decl): Do not generate a location
21762         attribute for variables that have a non-trivial DECL_VALUE_EXPR
21763         and that are not defined in the current unit.
21765 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
21767         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
21768         instead of a libcall for UNORDERED.
21770 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
21772         PR target/82641
21773         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
21774         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
21776 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21778         PR target/PR84295
21779         * config/s390/s390.c (s390_set_current_function): Invoke
21780         s390_indirect_branch_settings also if fndecl didn't change.
21782 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
21784         * config/rs6000/rs6000.md (blockage): Set length to zero.
21786 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
21788         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
21790 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
21792         PR sanitizer/84285
21793         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
21794         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
21795         -static-lib*san.
21797         PR debug/84252
21798         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
21799         PARALLEL incoming that failed vt_get_decl_and_offset check.
21801         PR middle-end/84237
21802         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
21803         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
21804         TREE_READONLY bit.
21805         (get_variable_section): For decls in named .bss* sections pass true as
21806         second argument to bss_initializer_p.
21808 2018-02-09  Marek Polacek  <polacek@redhat.com>
21809             Jakub Jelinek  <jakub@redhat.com>
21811         PR c++/83659
21812         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
21813         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
21814         Sync some changes from cxx_fold_indirect_ref.
21816 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
21818         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
21819         markers.
21820         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
21821         (BLOCK_INLINE_ENTRY_LABEL): New.
21822         (dwarf2out_var_location): Disregard inline entry markers.
21823         (inline_entry_data): New struct.
21824         (inline_entry_data_hasher): New hashtable type.
21825         (inline_entry_data_hasher::hash): New.
21826         (inline_entry_data_hasher::equal): New.
21827         (inline_entry_data_table): New variable.
21828         (add_high_low_attributes): Add DW_AT_entry_pc and
21829         DW_AT_GNU_entry_view attributes if a pending entry is found
21830         in inline_entry_data_table.  Add old entry_pc attribute only
21831         if debug nonbinding markers are disabled.
21832         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
21833         markers are enabled.
21834         (block_within_block_p, dwarf2out_inline_entry): New.
21835         (dwarf2out_finish): Check that no entries remained in
21836         inline_entry_data_table.
21837         * final.c (reemit_insn_block_notes): Handle inline entry notes.
21838         (final_scan_insn, notice_source_line): Likewise.
21839         (rest_of_clean_state): Skip inline entry markers.
21840         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
21841         markers.
21842         * gimple.c (gimple_build_debug_inline_entry): New.
21843         * gimple.h (enum gimple_debug_subcode): Add
21844         GIMPLE_DEBUG_INLINE_ENTRY.
21845         (gimple_build_debug_inline_entry): Declare.
21846         (gimple_debug_inline_entry_p): New.
21847         (gimple_debug_nonbind_marker_p): Adjust.
21848         * insn-notes.def (INLINE_ENTRY): New.
21849         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
21850         inline entry marker notes.
21851         (print_insn): Likewise.
21852         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
21853         (INSN_DEBUG_MARKER_KIND): Likewise.
21854         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
21855         * tree-inline.c (expand_call_inline): Build and insert
21856         debug_inline_entry stmt.
21857         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
21858         inline entry blocks early, if nonbind markers are enabled.
21859         (dump_scope_block): Dump fragment info.
21860         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
21861         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
21862         (gimple_build_debug_inline_entry): New.
21863         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
21864         Enable/disable inline entry points too.
21865         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
21866         (DEBUG_INSN): Describe inline entry markers.
21868         * common.opt (gvariable-location-views): New.
21869         (gvariable-location-views=incompat5): New.
21870         * config.in: Rebuilt.
21871         * configure: Rebuilt.
21872         * configure.ac: Test assembler for view support.
21873         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
21874         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
21875         * dwarf2out.c (var_loc_view): New typedef.
21876         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
21877         (dwarf2out_locviews_in_attribute): New.
21878         (dwarf2out_locviews_in_loclist): New.
21879         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
21880         (enum dw_line_info_opcode): Add LI_adv_address.
21881         (struct dw_line_info_table): Add view.
21882         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
21883         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
21884         (zero_view_p): New variable.
21885         (ZERO_VIEW_P): New macro.
21886         (output_asm_line_debug_info): New.
21887         (struct var_loc_node): Add view.
21888         (add_AT_view_list, AT_loc_list): New.
21889         (add_var_loc_to_decl): Add view param.  Test it against last.
21890         (new_loc_list): Add view params.  Record them.
21891         (AT_loc_list_ptr): Handle loc and view lists.
21892         (view_list_to_loc_list_val_node): New.
21893         (print_dw_val): Handle dw_val_class_view_list.
21894         (size_of_die): Likewise.
21895         (value_format): Likewise.
21896         (loc_list_has_views): New.
21897         (gen_llsym): Set vl_symbol too.
21898         (maybe_gen_llsym, skip_loc_list_entry): New.
21899         (dwarf2out_maybe_output_loclist_view_pair): New.
21900         (output_loc_list): Output view list or entries too.
21901         (output_view_list_offset): New.
21902         (output_die): Handle dw_val_class_view_list.
21903         (output_dwarf_version): New.
21904         (output_compilation_unit_header): Use it.
21905         (output_skeleton_debug_sections): Likewise.
21906         (output_rnglists, output_line_info): Likewise.
21907         (output_pubnames, output_aranges): Update version comments.
21908         (output_one_line_info_table): Output view numbers in asm comments.
21909         (dw_loc_list): Determine current endview, pass it to new_loc_list.
21910         Call maybe_gen_llsym.
21911         (loc_list_from_tree_1): Adjust.
21912         (add_AT_location_description): Create view list attribute if
21913         needed, check it's absent otherwise.
21914         (convert_cfa_to_fb_loc_list): Adjust.
21915         (maybe_emit_file): Call output_asm_line_debug_info for test.
21916         (dwarf2out_var_location): Reset views as needed.  Precompute
21917         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
21918         attribute.  Set view.
21919         (new_line_info_table): Reset next view.
21920         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
21921         (dwarf2out_source_line): Likewise.  Output view resets and labels to
21922         the assembler, or select appropriate line info opcodes.
21923         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
21924         (optimize_string_length): Catch it.  Adjust.
21925         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
21926         dw_val_class_view_list, and remove it if no longer needed.
21927         (hash_loc_list): Hash view numbers.
21928         (loc_list_hasher::equal): Compare them.
21929         (optimize_location_lists): Check whether a view list symbol is
21930         needed, and whether the locview attribute is present, and
21931         whether they match.  Remove the locview attribute if no longer
21932         needed.
21933         (index_location_lists): Call skip_loc_list_entry for test.
21934         (dwarf2out_finish): Call output_asm_line_debug_info for test.
21935         Use output_dwarf_version.
21936         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
21937         (struct dw_val_node): Add val_view_list.
21938         * final.c (SEEN_NEXT_VIEW): New.
21939         (set_next_view_needed): New.
21940         (clear_next_view_needed): New.
21941         (maybe_output_next_view): New.
21942         (final_start_function): Rename to...
21943         (final_start_function_1): ... this.  Take pointer to FIRST,
21944         add SEEN parameter.  Emit param bindings in the initial view.
21945         (final_start_function): Reintroduce SEEN-less interface.
21946         (final): Rename to...
21947         (final_1): ... this.  Take SEEN parameter.  Output final pending
21948         next view at the end.
21949         (final): Reintroduce seen-less interface.
21950         (final_scan_insn): Output pending next view before switching
21951         sections or ending a block.  Mark the next view as needed when
21952         outputting variable locations.  Notify debug backend of section
21953         changes, and of location view changes.
21954         (rest_of_handle_final): Adjust.
21955         * toplev.c (process_options): Autodetect value for debug variable
21956         location views option.  Warn on incompat5 without -gdwarf-5.
21957         * doc/invoke.texi (gvariable-location-views): New.
21958         (gvariable-location-views=incompat5): New.
21959         (gno-variable-location-views): New.
21961 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
21963         PR tree-optimization/84136
21964         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
21965         that the result of find_edge is non-NULL.
21967 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
21969         PR target/83008
21970         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
21971         storing integer register in SImode.  Fix cost of 256 and 512
21972         byte aligned SSE register store.
21974 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
21976         * config/i386/i386.c (ix86_multiplication_cost): Fix
21977         multiplication cost for TARGET_AVX512DQ.
21979 2018-02-08  Marek Polacek  <polacek@redhat.com>
21981         PR tree-optimization/84238
21982         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
21983         get_range_strlen.
21985 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
21987         PR tree-optimization/84265
21988         * tree-vect-stmts.c (vectorizable_store): Don't treat
21989         VMAT_CONTIGUOUS accesses as grouped.
21990         (vectorizable_load): Likewise.
21992 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
21994         PR tree-optimization/81635
21995         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
21996         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
21997         (test_round_for_mask): New functions.
21998         (wide_int_cc_tests): Call test_round_for_mask.
21999         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
22000         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
22001         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
22002         range returned by get_range_info.
22004 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
22006         PR ipa/81360
22007         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
22008         * symtab.c: Include builtins.h
22009         (symtab_node::output_to_lto_symbol_table_p): Move here
22010         from lto-streamer-out.c:output_symbol_p.
22011         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
22012         (output_symbol_p): Move all logic to symtab.c
22013         (produce_symtab): Update.
22015 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22017         * config/s390/s390-opts.h (enum indirect_branch): Define.
22018         * config/s390/s390-protos.h (s390_return_addr_from_memory)
22019         (s390_indirect_branch_via_thunk)
22020         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
22021         (enum s390_indirect_branch_type): Define.
22022         * config/s390/s390.c (struct s390_frame_layout, struct
22023         machine_function): Remove.
22024         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
22025         (indirect_branch_table_label_no, indirect_branch_table_name):
22026         Define variables.
22027         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
22028         (enum s390_indirect_branch_option): Define.
22029         (s390_return_addr_from_memory): New function.
22030         (s390_handle_string_attribute): New function.
22031         (s390_attribute_table): Add new attribute handler.
22032         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
22033         (s390_indirect_branch_via_thunk): New function.
22034         (s390_indirect_branch_via_inline_thunk): New function.
22035         (s390_function_ok_for_sibcall): When jumping via thunk disallow
22036         sibling call optimization for non z10 compiles.
22037         (s390_emit_call): Force indirect branch target to be a single
22038         register.  Add r1 clobber for non-z10 compiles.
22039         (s390_emit_epilogue): Emit return jump via return_use expander.
22040         (s390_reorg): Handle JUMP_INSNs as execute targets.
22041         (s390_option_override_internal): Perform validity checks for the
22042         new command line options.
22043         (s390_indirect_branch_attrvalue): New function.
22044         (s390_indirect_branch_settings): New function.
22045         (s390_set_current_function): Invoke s390_indirect_branch_settings.
22046         (s390_output_indirect_thunk_function):  New function.
22047         (s390_code_end): Implement target hook.
22048         (s390_case_values_threshold): Implement target hook.
22049         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
22050         macros.
22051         * config/s390/s390.h (struct s390_frame_layout)
22052         (struct machine_function): Move here from s390.c.
22053         (TARGET_INDIRECT_BRANCH_NOBP_RET)
22054         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
22055         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
22056         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
22057         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
22058         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
22059         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
22060         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
22061         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
22062         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
22063         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
22064         (mnemonic attribute): Add values which aren't recognized
22065         automatically.
22066         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
22067         pattern for branch conversion.  Fix mnemonic attribute.
22068         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
22069         indirect branch via thunk if requested.
22070         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
22071         ("*indirect_jump"): Disable for branch conversion using out of
22072         line thunks.
22073         ("indirect_jump_via_thunk<mode>_z10")
22074         ("indirect_jump_via_thunk<mode>")
22075         ("indirect_jump_via_inlinethunk<mode>_z10")
22076         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
22077         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
22078         ("casesi_jump_via_inlinethunk<mode>_z10")
22079         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
22080         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
22081         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
22082         ("*indirect2_jump"): Disable for branch conversion.
22083         ("casesi_jump"): Turn into expander and expand patterns for branch
22084         conversion.
22085         ("return_use"): New expander.
22086         ("*return"): Emit return via thunk and rename it to ...
22087         ("*return<mode>"): ... this one.
22088         * config/s390/s390.opt: Add new options and and enum for the
22089         option values.
22091 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
22093         * lra-constraints.c (match_reload): Unconditionally use
22094         gen_lowpart_SUBREG, rather than selecting between that
22095         and equivalent gen_rtx_SUBREG code.
22097 2018-02-08  Richard Biener  <rguenther@suse.de>
22099         PR tree-optimization/84233
22100         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
22101         changed flag instead of boguously re-using phi_inserted.
22103 2018-02-08  Martin Jambor  <mjambor@suse.cz>
22105         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
22106         static local variables.
22108 2018-02-08  Richard Biener  <rguenther@suse.de>
22110         PR tree-optimization/84278
22111         * tree-vect-stmts.c (vectorizable_store): When looking for
22112         smaller vector types to perform grouped strided loads/stores
22113         make sure the mode is supported by the target.
22114         (vectorizable_load): Likewise.
22116 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
22118         * config/aarch64/aarch64.c (aarch64_components_for_bb):
22119         Increase LDP/STP opportunities by adding adjacent callee-saves.
22121 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
22123         PR rtl-optimization/84068
22124         PR rtl-optimization/83459
22125         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
22127 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
22129         PR tree-optimization/84224
22130         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
22131         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
22132         non-zero arguments.
22134 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
22136         PR target/84113
22137         * config/rs6000/altivec.md (*restore_world): Remove LR use.
22138         * config/rs6000/predicates.md (restore_world_operation): Adjust op
22139         count, remove one USE.
22141 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
22143         * doc/install.texi (Configuration): Document the
22144         --with-long-double-format={ibm,ieee} PowerPC configuration
22145         options.
22147         PR target/84154
22148         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
22149         Convert from define_expand to be define_insn_and_split.  Rework
22150         float/double/_Float128 conversions to QI/HI/SImode to work with
22151         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
22152         conversions to QI/HImode types did a store and then a load to
22153         truncate the value.  For conversions to VSX registers, don't split
22154         the insn, instead emit the code directly.  Use the code iterator
22155         any_fix to combine signed and unsigned conversions.
22156         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
22157         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
22158         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
22159         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
22160         (fix_<mode>di2_hw): Likewise.
22161         (fixuns_<mode>di2_hw): Likewise.
22162         (fix_<mode>si2_hw): Likewise.
22163         (fixuns_<mode>si2_hw): Likewise.
22164         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
22165         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
22166         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
22167         fix<uns>_trunc<SFDF:mode>si2_p8.
22168         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
22169         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
22170         (fix<uns>_<mode>_mem): Likewise.
22171         (fctiw<u>z_<mode>_mem): Likewise.
22172         (fix<uns>_<mode>_mem): Likewise.
22173         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
22174         the register allocator from doing a direct move to the GPRs to do
22175         a store, and instead use the ISA 3.0 store byte/half-word from
22176         vector register instruction.  For IEEE 128-bit floating point,
22177         also optimize stores of 32-bit ints.
22178         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
22180 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
22182         * genextract.c (push_pathstr_operand): New function to support
22183         [a-zA-Z].
22184         (walk_rtx): Call push_pathstr_operand.
22185         (print_path): Support [a-zA-Z].
22187 2018-02-07  Richard Biener  <rguenther@suse.de>
22189         PR tree-optimization/84037
22190         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
22191         (cse_and_gimplify_to_preheader): Declare.
22192         (vect_get_place_in_interleaving_chain): Likewise.
22193         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22194         ivexpr_map.
22195         (_loop_vec_info::~_loop_vec_info): Delete it.
22196         (cse_and_gimplify_to_preheader): New function.
22197         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
22198         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
22199         (vectorizable_load): Likewise.  For grouped stores always base
22200         the IV on the first element.
22201         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
22202         condition before gimplifying.
22204 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
22206         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
22207         *DIV_EXPR and *MOD_EXPR.
22209 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
22211         PR target/84248
22212         * config/i386/i386.c (ix86_option_override_internal): Mask out
22213         the CF_SET bit when checking -fcf-protection.
22215 2018-02-07  Tom de Vries  <tom@codesourcery.com>
22217         PR libgomp/84217
22218         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
22219         enough.
22221 2018-02-07  Richard Biener  <rguenther@suse.de>
22223         PR tree-optimization/84204
22224         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
22225         this place.
22227         PR tree-optimization/84205
22228         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
22229         special-case isl_ast_op_zdiv_r.
22231         PR tree-optimization/84223
22232         * graphite-scop-detection.c (gather_bbs::before_dom_children):
22233         Only add conditions from within the region.
22234         (gather_bbs::after_dom_children): Adjust.
22236 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
22238         PR target/84209
22239         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
22240         * config/avr/avr.md: Only post-reload split REG-REG moves if
22241         either register is GENERAL_REG_P.
22243 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
22245         PR tree-optimization/84235
22246         * tree-ssa-scopedtables.c
22247         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
22248         if the subtraction is performed in floating point type where NaNs are
22249         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
22250         build 1.  Formatting fix.
22252 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
22254         PR target/84146
22255         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
22256         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
22257         and skip it regardless of bb boundaries.  Use CALL_P macro,
22258         don't test INSN_P (insn) together with CALL_P or JUMP_P check
22259         unnecessarily, formatting fix.
22261 2018-02-06  Michael Collison  <michael.collison@arm.com>
22263         * config/arm/thumb2.md:
22264         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
22265         (*thumb_mov_notscc): Ditto.
22267 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
22269         PR target/84154
22270         * config/rs6000/rs6000.md (su code attribute): Use "u" for
22271         unsigned_fix, not "s".
22273 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22275         * configure.ac (gcc_fn_eh_frame_ro): New function.
22276         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
22277         correct .eh_frame permissions.
22278         * configure: Regenerate.
22280 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
22282         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
22283         irrelevant options.
22285 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22287         * config/rs6000/rs6000.c (rs6000_option_override_internal):
22288         Display warning message for -mno-speculate-indirect-jumps.
22290 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
22292         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
22293         Undocumented.
22294         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
22296 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
22298         PR tree-optimization/84225
22299         * tree-eh.c (find_trapping_overflow): Only call
22300         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
22302 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
22304         PR target/84145
22305         * config/i386/i386.c: Reimplement the check of possible options
22306         -mibt/-mshstk conbination. Change error messages.
22307         * doc/invoke.texi: Fix a typo: remove extra '='.
22309 2018-02-06  Marek Polacek  <polacek@redhat.com>
22311         PR tree-optimization/84228
22312         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
22314 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
22316         PR target/82641
22317         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
22318         emitted arch directives.
22319         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
22320         __ARM_FEATURE_COPROC before changing architectures.
22322 2018-02-06  Richard Biener  <rguenther@suse.de>
22324         * config/i386/i386.c (print_reg): Fix typo.
22325         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
22327 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
22329         * configure: Regenerate.
22331 2018-02-05  Martin Sebor  <msebor@redhat.com>
22333         PR tree-optimization/83369
22334         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
22335         inlining context.
22337 2018-02-05  Martin Liska  <mliska@suse.cz>
22339         * doc/invoke.texi: Cherry-pick upstream r323995.
22341 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
22343         * ira.c (ira_init_register_move_cost): Adjust comment.
22345 2018-02-05  Martin Liska  <mliska@suse.cz>
22347         PR gcov-profile/84137
22348         * doc/gcov.texi: Fix typo in documentation.
22350 2018-02-05  Martin Liska  <mliska@suse.cz>
22352         PR gcov-profile/83879
22353         * doc/gcov.texi: Document necessity of --dynamic-list-data when
22354         using dlopen functionality.
22356 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
22358         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
22359         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
22360         _mm_maskz_range_ss, _mm_mask_range_round_ss,
22361         _mm_maskz_range_round_ss): New intrinsics.
22362         (__builtin_ia32_rangesd128_round)
22363         (__builtin_ia32_rangess128_round): Remove.
22364         (__builtin_ia32_rangesd128_mask_round,
22365         __builtin_ia32_rangess128_mask_round): New builtins.
22366         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
22367         __builtin_ia32_rangess128_round): Remove.
22368         (__builtin_ia32_rangesd128_mask_round,
22369         __builtin_ia32_rangess128_mask_round): New builtins.
22370         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
22371         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
22372         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
22373         "<round_saeonly_constraint>")): Changed to ...
22374         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
22375         "<round_saeonly_scalar_constraint>")): ... this.
22376         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
22377         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
22378         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
22379         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
22380         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
22382 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
22384         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
22385         options.
22386         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
22387         Remove all values except native, 8540 and 8548.
22389 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
22391         * config/i386/i386.c (ix86_output_function_return): Pass
22392         INVALID_REGNUM, instead of -1, as invalid register number to
22393         indirect_thunk_name and output_indirect_thunk.
22395 2018-02-02  Julia Koval  <julia.koval@intel.com>
22397         * config.gcc: Add -march=icelake.
22398         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
22399         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
22400         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
22401         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
22402         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
22403         (processor_target_table): Add icelake.
22404         (ix86_option_override_internal): Handle new PTAs.
22405         (get_builtin_code_for_version): Handle icelake.
22406         (M_INTEL_COREI7_ICELAKE): New.
22407         (fold_builtin_cpu): Handle icelake.
22408         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
22409         * doc/invoke.texi: Add -march=icelake.
22411 2018-02-02  Julia Koval  <julia.koval@intel.com>
22413         * config/i386/i386.c (ix86_option_override_internal): Change flags type
22414         to wide_int_bitmask.
22415         * wide-int-bitmask.h: New.
22417 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
22419         PR target/84066
22420         * config/i386/i386.md: Replace Pmode with word_mode in
22421         builtin_setjmp_setup and builtin_longjmp to support x32.
22423 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
22425         PR target/56010
22426         PR target/83743
22427         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
22428         #include "opts.h".
22429         (rs6000_supported_cpu_names): New static variable.
22430         (linux_cpu_translation_table): Likewise.
22431         (elf_platform) <cpu>: Define new static variable and use it.
22432         Translate kernel AT_PLATFORM name to canonical name if needed.
22433         Error if platform name is unknown.
22435 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
22437         PR target/84089
22438         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
22440 2018-02-01  Jeff Law  <law@redhat.com>
22442         PR target/84128
22443         * config/i386/i386.c (release_scratch_register_on_entry): Add new
22444         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
22445         the scratch if RELEASE_VIA_POP is false.
22446         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
22447         If we have to save a temporary register, decrement SIZE appropriately.
22448         Pass new arguments to release_scratch_register_on_entry.
22449         (ix86_adjust_stack_and_probe): Likewise.
22450         (ix86_emit_probe_stack_range): Pass new arguments to
22451         release_scratch_register_on_entry.
22453 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
22455         PR rtl-optimization/84157
22456         * combine.c (change_zero_ext): Use REG_P predicate in
22457         front of HARD_REGISTER_P predicate.
22459 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
22461         * config/avr/avr.c (avr_option_override): Move disabling of
22462         -fdelete-null-pointer-checks to...
22463         * common/config/avr/avr-common.c (avr_option_optimization_table):
22464         ...here.
22466 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22468         PR tree-optimization/81635
22469         * tree-data-ref.c (split_constant_offset_1): For types that
22470         wrap on overflow, try to use range info to prove that wrapping
22471         cannot occur.
22473 2018-02-01  Renlin Li  <renlin.li@arm.com>
22475         PR target/83370
22476         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
22477         TAILCALL_ADDR_REGS.
22478         (aarch64_register_move_cost): Likewise.
22479         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
22480         TAILCALL_ADDR_REGS.
22481         (REG_CLASS_NAMES): Likewise.
22482         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
22483         TAILCALL_ADDR_REGS. Remove IP registers.
22484         * config/aarch64/aarch64.md (Ucs): Update register constraint.
22486 2018-02-01  Richard Biener  <rguenther@suse.de>
22488         * domwalk.h (dom_walker::dom_walker): Add additional constructor
22489         for specifying RPO order and allow NULL for that.
22490         * domwalk.c (dom_walker::dom_walker): Likewise.
22491         (dom_walker::walk): Handle NULL RPO order.
22492         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
22493         in RPO order.
22494         (rewrite_update_dom_walker): Likewise.
22495         (mark_def_dom_walker): Likewise.
22497 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22499         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
22500         (aarch64_maybe_expand_sve_subreg_move): Declare.
22501         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
22502         * config/aarch64/predicates.md (aarch64_any_register_operand): New
22503         predicate.
22504         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
22505         that are semantically a reverse operation.
22506         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
22507         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
22508         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
22509         functions.
22510         (aarch64_can_change_mode_class): For big-endian, forbid changes
22511         between two SVE modes if they have different element sizes.
22513 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22515         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
22516         the TImode handling for big-endian targets.
22518 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22520         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
22521         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
22522         not just bytes.
22523         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
22524         Remove BSWAP handing for big-endian targets and use the form of
22525         LD1RQ appropariate for the mode.
22527 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22529         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
22530         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
22531         duplicated element.
22533 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22535         PR tearget/83845
22536         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
22537         check for operands that need to go through aarch64_sve_reload_be.
22539 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
22541         PR tree-optimization/81661
22542         PR tree-optimization/84117
22543         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
22544         * tree-eh.c: Include gimplify.h.
22545         (find_trapping_overflow, replace_trapping_overflow,
22546         rewrite_to_non_trapping_overflow): New functions.
22547         * tree-vect-loop.c: Include tree-eh.h.
22548         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
22549         * tree-data-ref.c: Include tree-eh.h.
22550         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
22552 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
22554         PR rtl-optimization/84123
22555         * combine.c (change_zero_ext): Check if hard register satisfies
22556         can_change_dest_mode before calling gen_lowpart_SUBREG.
22558 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
22560         PR target/82444
22561         * ira.c (ira_init_register_move_cost): Remove assert.
22563 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
22565         PR rtl-optimization/84071
22566         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
22567         * doc/tm.texi: Regenerate.
22569 2018-01-31  Richard Biener  <rguenther@suse.de>
22571         PR tree-optimization/84132
22572         * tree-data-ref.c (analyze_miv_subscript): Properly
22573         check whether evolution_function_is_affine_multivariate_p
22574         before calling gcd_of_steps_may_divide_p.
22576 2018-01-31  Julia Koval  <julia.koval@intel.com>
22578         PR target/83618
22579         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
22580         * config/i386/i386.md (rdpid_rex64) New.
22581         (rdpid): Make 32bit only.
22583 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
22585         PR lto/84105
22586         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
22587         an IDENTIFIER_NODE for FUNCTION_TYPE's.
22589 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
22591         Revert
22592         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22594         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22596 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
22598         PR rtl-optimization/84071
22599         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
22600         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
22602 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
22604         * config/arc/arc.c (arc_handle_aux_attribute): New function.
22605         (arc_attribute_table): Add 'aux' attribute.
22606         (arc_in_small_data_p): Consider aux like variables.
22607         (arc_is_aux_reg_p): New function.
22608         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
22609         (arc_get_aux_arg): New function.
22610         (prepare_move_operands): Handle aux-register access.
22611         (arc_handle_aux_attribute): New function.
22612         * doc/extend.texi (ARC Variable attributes): Add subsection.
22614 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
22616         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
22617         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
22618         (arc_attribute_table): Add 'uncached' attribute.
22619         (arc_print_operand): Print '.di' flag for uncached memory
22620         accesses.
22621         (arc_in_small_data_p): Do not consider for small data the uncached
22622         types.
22623         (arc_is_uncached_mem_p): New function.
22624         * config/arc/predicates.md (compact_store_memory_operand): Check
22625         for uncached memory accesses.
22626         (nonvol_nonimm_operand): Likewise.
22627         * doc/extend.texi (ARC Type Attribute): New subsection.
22629 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
22631         PR c/84100
22632         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
22633         falign-loops=): Add Optimization flag.
22635 2018-01-30  Jeff Law  <law@redhat.com>
22637         PR target/84064
22638         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
22639         INT_REGISTERS_SAVED.  Check it prior to calling
22640         get_scratch_register_on_entry.
22641         (ix86_adjust_stack_and_probe): Similarly.
22642         (ix86_emit_probe_stack_range): Similarly.
22643         (ix86_expand_prologue): Corresponding changes.
22645 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22647         PR target/40411
22648         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
22649         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
22651 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
22653         PR target/84112
22654         * lra-constraints.c (curr_insn_transform): Process AND in the
22655         address.
22657 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
22659         PR rtl-optimization/83986
22660         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
22661         dependence against last_pending_memory_flush in addition to
22662         pending_jump_insns.
22664 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
22666         PR tree-optimization/81611
22667         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
22668         copies.
22670 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22672         PR target/83758
22673         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
22674         a reg rtx.
22676 2018-01-30  Richard Biener  <rguenther@suse.de>
22677             Jakub Jelinek  <jakub@redhat.com>
22679         PR tree-optimization/84111
22680         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
22681         inner loops added during recursion, as they don't have up-to-date
22682         SSA form.
22684 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
22686         PR ipa/81360
22687         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
22688         (can_inline_edge_by_limits_p): ... here.
22689         (can_early_inline_edge_p, check_callers,
22690         update_caller_keys, update_callee_keys, recursive_inlining,
22691         add_new_edges_to_heap, speculation_useful_p,
22692         inline_small_functions,
22693         inline_small_functions, flatten_function,
22694         inline_to_all_callers_1): Update.
22696 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
22698         * profile-count.c (profile_count::combine_with_ipa_count): Handle
22699         zeros correctly.
22701 2018-01-30  Richard Biener  <rguenther@suse.de>
22703         PR tree-optimization/83008
22704         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
22705         invariant and constant vector uses in stmts when they need
22706         more than one stmt.
22708 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22710         PR bootstrap/84017
22711         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
22712         * configure: Regenerate.
22714 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
22716         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
22717         pattern.
22718         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
22719         Use gen_rtx_REG rather than gen_lowpart.
22721 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
22723         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
22724         rather than 0 when creating partial subregs.
22726 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
22728         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
22729         of usage.
22731 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
22733         PR target/81550
22734         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
22735         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
22736         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
22737         flags.  This restores the settings used before the 2017-07-24.
22738         Turning off pre increment/decrement/modify allows IVOPTS to
22739         optimize DF/SF loops where the index is an int.
22741 2018-01-29  Richard Biener  <rguenther@suse.de>
22742             Kelvin Nilsen  <kelvin@gcc.gnu.org>
22744         PR bootstrap/80867
22745         * tree-vect-stmts.c (vectorizable_call): Don't call
22746         targetm.vectorize_builtin_md_vectorized_function if callee is
22747         NULL.
22749 2018-01-22  Carl Love  <cel@us.ibm.com>
22751         * doc/extend.tex: Fix typo in second arg in
22752         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
22754 2018-01-29  Richard Biener  <rguenther@suse.de>
22756         PR tree-optimization/84086
22757         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
22758         (flush_ssaname_freelist): When SSA names were released reset
22759         the SCEV hash table.
22761 2018-01-29  Richard Biener  <rguenther@suse.de>
22763         PR tree-optimization/84057
22764         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
22765         removed paths when removing edges.
22767 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
22769         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
22770         -mfunction-return=@var{choice}.
22772 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
22774         PR diagnostic/84034
22775         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
22776         Handle CR like TAB.
22777         (layout::print_source_line): Likewise.
22778         (test_get_line_width_without_trailing_whitespace): Add test cases.
22780 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
22782         PR middle-end/84040
22783         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
22784         debug insns.
22786 2018-01-26  Jim Wilson  <jimw@sifive.com>
22788         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
22790         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
22791         specified.
22793 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22795         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
22796         and CMP + SUB-immediate -> SUBS.
22798 2018-01-26  Martin Sebor  <msebor@redhat.com>
22800         PR tree-optimization/83896
22801         * tree-ssa-strlen.c (get_string_len): Rename...
22802         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
22803         Avoid assuming length is constant.
22804         (handle_char_store): Use HOST_WIDE_INT for string length.
22806 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
22808         PR target/81763
22809         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
22810         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
22812 2018-01-26  Richard Biener  <rguenther@suse.de>
22814         PR rtl-optimization/84003
22815         * dse.c (record_store): Only record redundant stores when
22816         the earlier store aliases at least all accesses the later one does.
22818 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
22820         PR rtl-optimization/83985
22821         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
22822         REG_CFA_RESTORE insns.
22823         (delete_unmarked_insns): Don't ignore separate shrink wrapping
22824         REG_CFA_RESTORE insns here.
22826         PR c/83989
22827         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
22828         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
22830 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22832         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
22833         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
22834         (arc_init): Likewise.
22835         (arc_override_options): Likewise.
22836         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
22837         value.
22838         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
22839         support.
22840         * config/arc/arc.h (TARGET_DBNZ): Define.
22841         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
22842         properly set the tune attribute.
22843         (dbnz): Use TARGET_DBNZ guard.
22844         * config/arc/arc.opt (mtune): Add core3 option.
22846 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22848         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
22849         recognize new pic like addresses.
22850         (arc_delegitimize_address): Clean up.
22852 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22854         * config/arc/arc-arches.def: Option mrf16 valid for all
22855         architectures.
22856         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
22857         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
22858         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
22859         * config/arc/arc-tables.opt: Regenerate.
22860         * config/arc/arc.c (arc_conditional_register_usage): Handle
22861         reduced register file case.
22862         (arc_file_start): Set must have build attributes.
22863         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
22864         mrf16 option value.
22865         * config/arc/arc.opt (mrf16): Add new option.
22866         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
22867         * config/arc/genmultilib.awk: Handle new mrf16 option.
22868         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
22869         * config/arc/t-multilib: Regenerate.
22870         * doc/invoke.texi (ARC Options): Document mrf16 option.
22872 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22874         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
22875         * config/arc/arc.c (arc_handle_secure_attribute): New function.
22876         (arc_attribute_table): Add 'secure_call' attribute.
22877         (arc_print_operand): Print secure call operand.
22878         (arc_function_ok_for_sibcall): Don't optimize tail calls when
22879         secure.
22880         (arc_is_secure_call_p): New function.  * config/arc/arc.md
22881         (call_i): Add support for sjli instruction.
22882         (call_value_i): Likewise.
22883         * config/arc/constraints.md (Csc): New constraint.
22885 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22886             John Eric Martin  <John.Martin@emmicro-us.com>
22888         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
22889         * config/arc/arc.c (_arc_jli_section): New struct.
22890         (arc_jli_section): New type.
22891         (rc_jli_sections): New static variable.
22892         (arc_handle_jli_attribute): New function.
22893         (arc_attribute_table): Add jli_always and jli_fixed attribute.
22894         (arc_file_end): New function.
22895         (TARGET_ASM_FILE_END): Define.
22896         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
22897         (arc_add_jli_section): New function.
22898         (jli_call_scan): Likewise.
22899         (arc_reorg): Call jli_call_scan.
22900         (arc_output_addsi): Remove 'S' from printing asm operand.
22901         (arc_is_jli_call_p): New function.
22902         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
22903         operand.
22904         (movhi_insn): Likewise.
22905         (movsi_insn): Likewise.
22906         (movsi_set_cc_insn): Likewise.
22907         (loadqi_update): Likewise.
22908         (load_zeroextendqisi_update): Likewise.
22909         (load_signextendqisi_update): Likewise.
22910         (loadhi_update): Likewise.
22911         (load_zeroextendhisi_update): Likewise.
22912         (load_signextendhisi_update): Likewise.
22913         (loadsi_update): Likewise.
22914         (loadsf_update): Likewise.
22915         (movsicc_insn): Likewise.
22916         (bset_insn): Likewise.
22917         (bxor_insn): Likewise.
22918         (bclr_insn): Likewise.
22919         (bmsk_insn): Likewise.
22920         (bicsi3_insn): Likewise.
22921         (cmpsi_cc_c_insn): Likewise.
22922         (movsi_ne): Likewise.
22923         (movsi_cond_exec): Likewise.
22924         (clrsbsi2): Likewise.
22925         (norm_f): Likewise.
22926         (normw): Likewise.
22927         (swap): Likewise.
22928         (divaw): Likewise.
22929         (flag): Likewise.
22930         (sr): Likewise.
22931         (kflag): Likewise.
22932         (ffs): Likewise.
22933         (ffs_f): Likewise.
22934         (fls): Likewise.
22935         (call_i): Remove 'S' asm letter, add jli instruction.
22936         (call_value_i): Likewise.
22937         * config/arc/arc.op (mjli-always): New option.
22938         * config/arc/constraints.md (Cji): New constraint.
22939         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
22940         operand.
22941         (subsf3_fpx): Likewise.
22942         (mulsf3_fpx): Likewise.
22943         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
22944         asm operand.
22945         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
22946         function attrbutes.
22947         * doc/invoke.texi (ARC): Document mjli-always option.
22949 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
22951         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
22952         avoid addition with 0 and use incw and decw where possible.
22954 2018-01-26  Richard Biener  <rguenther@suse.de>
22956         PR tree-optimization/81082
22957         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
22958         association if it requires casting to unsigned.
22959         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
22960         from fold_plusminus_mult_expr to catch important cases late when
22961         range info is available.
22963 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22965         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
22966         * configure.ac (hidden_linkonce): New test.
22967         * configure: Regenerate.
22968         * config.in: Regenerate.
22970 2018-01-26  Julia Koval  <julia.koval@intel.com>
22972         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
22973         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
22974         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
22975         _mm_mask_bitshuffle_epi64_mask): Fix type.
22976         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
22977         USI_FTYPE_V4DI_V4DI_USI): Remove.
22978         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
22979         __builtin_ia32_vpshufbitqmb256_mask,
22980         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
22981         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
22982         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
22984 2018-01-26  Alan Modra  <amodra@gmail.com>
22986         PR target/84033
22987         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
22988         UNSPEC_VBPERMQ.  Sort other unspecs.
22990 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
22992         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
22994 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
22996         PR middle-end/83055
22997         * predict.c (drop_profile): Do not push/pop cfun; update also
22998         node->count.
22999         (handle_missing_profiles): Fix logic looking for zero profiles.
23001 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
23003         PR middle-end/83977
23004         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
23005         on functions with #pragma omp declare simd or functions with simd
23006         attribute.
23007         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
23008         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
23009         Remove trailing \n from warning_at calls.
23011 2018-01-25  Tom de Vries  <tom@codesourcery.com>
23013         PR target/84028
23014         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
23015         for neutered workers.
23017 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
23019         PR target/68467
23020         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
23021         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
23023 2018-01-24  Jeff Law  <law@redhat.com>
23025         PR target/83994
23026         * i386.c (get_probe_interval): Move to earlier point.
23027         (ix86_compute_frame_layout): If -fstack-clash-protection and
23028         the frame is larger than the probe interval, then use pushes
23029         to save registers rather than reg->mem moves.
23030         (ix86_expand_prologue): Remove conditional for int_registers_saved
23031         assertion.
23033 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
23035         PR target/84014
23036         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
23037         min/max for never referenced object.
23039 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
23041         PR middle-end/83977
23042         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
23043         here.
23044         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
23045         attributes from DECL_ATTRIBUTES (decl) without affecting
23046         DECL_ATTRIBUTES (current_function_decl).
23047         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
23048         functions with non-NULL DECL_ABSTRACT_ORIGIN.
23050 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
23052         PR tree-optimization/83979
23053         * fold-const.c (fold_comparison): Use constant_boolean_node
23054         instead of boolean_{true,false}_node.
23056 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
23058         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
23059         with zero counts.
23061 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23063         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23064         Simplify the clause that sets the length attribute.
23065         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23066         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
23067         clause that sets the length attribute.
23068         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23070 2018-01-24  Tom de Vries  <tom@codesourcery.com>
23072         PR target/83589
23073         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
23074         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
23075         Add strict parameter.
23076         (prevent_branch_around_nothing): Insert dummy insn between branch to
23077         label and label with no ptx insn inbetween.
23078         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
23080 2018-01-24  Tom de Vries  <tom@codesourcery.com>
23082         PR target/81352
23083         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
23084         for neutered threads in warp.
23085         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
23087 2018-01-24  Richard Biener  <rguenther@suse.de>
23089         PR tree-optimization/83176
23090         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
23091         operands.
23093 2018-01-24  Richard Biener  <rguenther@suse.de>
23095         PR tree-optimization/82819
23096         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
23097         code generating pluses that are no-ops in the target precision.
23099 2018-01-24  Richard Biener  <rguenther@suse.de>
23101         PR middle-end/84000
23102         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
23104 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
23106         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
23107         to merge probabilities.
23108         * predict.c (probably_never_executed): Also mark as cold functions
23109         with global 0 profile and guessed local profile.
23110         * profile-count.c (profile_probability::combine_with_count): New
23111         member function.
23112         * profile-count.h (profile_probability::operator*,
23113         profile_probability::operator*=, profile_probability::operator/,
23114         profile_probability::operator/=): Reduce precision to adjusted
23115         and set value to guessed on contradictory divisions.
23116         (profile_probability::combine_with_freq): Remove.
23117         (profile_probability::combine_wiht_count): Declare.
23118         (profile_count::force_nonzero):: Set to adjusted.
23119         (profile_count::probability_in):: Set quality to adjusted.
23120         * tree-ssa-tail-merge.c (replace_block_by): Use
23121         combine_with_count.
23123 2018-01-23  Andrew Waterman  <andrew@sifive.com>
23124             Jim Wilson  <jimw@sifive.com>
23126         * config/riscv/riscv.c (riscv_stack_boundary): New.
23127         (riscv_option_override): Set riscv_stack_boundary.  Handle
23128         riscv_preferred_stack_boundary_arg.
23129         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
23130         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
23131         (STACK_BOUNDARY): Set to riscv_stack_boundary.
23132         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
23133         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
23134         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
23136 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
23138         PR target/83905
23139         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
23140         of struct ix86_frame.
23141         (ix86_expand_epilogue): Likewise.  Add a local variable for
23142         the reg_save_offset field in struct ix86_frame.
23144 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
23146         PR tree-optimization/82604
23147         * tree-loop-distribution.c (enum partition_kind): New enum item
23148         PKIND_PARTIAL_MEMSET.
23149         (partition_builtin_p): Support above new enum item.
23150         (generate_code_for_partition): Ditto.
23151         (compute_access_range): Differentiate cases that equality can be
23152         proven at all loops, the innermost loops or no loops.
23153         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
23154         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
23155         (finalize_partitions, distribute_loop): Don't fuse partition of
23156         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
23157         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
23158         parloop is enabled.
23160 2018-01-23  Martin Liska  <mliska@suse.cz>
23162         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
23163         order to ignore the predictor.
23164         (PRED_POLYMORPHIC_CALL): Likewise.
23165         (PRED_RECURSIVE_CALL): Likewise.
23167 2018-01-23  Martin Liska  <mliska@suse.cz>
23169         * tree-profile.c (tree_profiling): Print function header to
23170         aware reader which function we are working on.
23171         * value-prof.c (gimple_find_values_to_profile): Do not print
23172         not interesting value histograms.
23174 2018-01-23  Martin Liska  <mliska@suse.cz>
23176         * profile-count.h (enum profile_quality): Add
23177         profile_uninitialized as the first value. Do not number values
23178         as they are zero based.
23179         (profile_count::verify): Update sanity check.
23180         (profile_probability::verify): Likewise.
23182 2018-01-23  Nathan Sidwell  <nathan@acm.org>
23184         * doc/invoke.texi (ffor-scope): Deprecate.
23186 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
23188         PR tree-optimization/83510
23189         * domwalk.c (set_all_edges_as_executable): New function.
23190         (dom_walker::dom_walker): Convert bool param
23191         "skip_unreachable_blocks" to enum reachability.  Move setup of
23192         edge flags to set_all_edges_as_executable and only do it when
23193         reachability is REACHABLE_BLOCKS.
23194         * domwalk.h (enum dom_walker::reachability): New enum.
23195         (dom_walker::dom_walker): Convert bool param
23196         "skip_unreachable_blocks" to enum reachability.
23197         (set_all_edges_as_executable): New decl.
23198         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
23199         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
23200         "reachability".
23201         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
23202         but converting true to REACHABLE_BLOCKS.
23203         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
23204         * tree-vrp.c
23205         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
23206         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
23207         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
23208         REACHABLE_BLOCKS.
23209         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
23210         if check_all_array_refs will be called.
23212 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
23214         * tree.c (selftest::test_location_wrappers): Add more test
23215         coverage.
23217 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
23219         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
23220         (selftest::test_bit_in_range): Likewise.
23222 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
23224         PR testsuite/83888
23225         * doc/sourcebuild.texi (vect_float): Say that the selector
23226         only describes the situation when -funsafe-math-optimizations is on.
23227         (vect_float_strict): Document.
23229 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
23231         PR tree-optimization/83965
23232         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
23233         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
23234         instead of checking only for a reduction.
23235         (vect_recog_widen_sum_pattern): Likewise.
23237 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
23239         * predict.c (probably_never_executed): Only use precise profile info.
23240         (compute_function_frequency): Skip after inlining hack since we now
23241         have quality checking.
23243 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
23245         * profile-count.h (profile_probability::very_unlikely,
23246         profile_probability::unlikely, profile_probability::even): Set
23247         precision to guessed.
23249 2018-01-23  Richard Biener  <rguenther@suse.de>
23251         PR tree-optimization/83963
23252         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
23253         Properly terminate dominator walk when crossing the exit edge not
23254         when visiting its source block.
23256 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
23258         PR c++/83918
23259         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
23260         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
23262 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
23264         PR tree-optimization/83957
23265         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
23266         semicolon after for body surrounded by braces.
23268         PR tree-optimization/83081
23269         * profile-count.h (profile_probability::split): New method.
23270         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
23271         Use profile_probability::split.
23272         (do_compare_rtx_and_jump): Fix adjustment of probabilities
23273         when splitting a single conditional jump into 2.
23275 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
23277         PR tree-optimization/69452
23278         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
23279         decl.
23281 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23283         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
23284         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
23285         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
23287 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23289         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
23290         declaration.
23291         * config/rl78/rl78.md (movdi): New define_expand.
23292         * config/rl78/rl78.c (rl78_split_movdi): New function.
23294 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
23296         PR target/83862
23297         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
23298         no longer used.
23299         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
23300         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
23301         128-bit to produce an UNSPEC move to get the double word with the
23302         signbit and then a shift directly to do signbit.
23303         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
23304         implementation with a new version that just does either a direct
23305         move or a regular move.  Move memory interface to separate insns.
23306         Move insns so they are next to the expander.
23307         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
23308         with signbit move.  Split big and little endian case.
23309         (signbit<mode>2_dm_mem_le): Likewise.
23310         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
23311         (signbit<mode>2_dm2): Likewise.
23313 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23315         * config/rl78/rl78.md (anddi3): New define_expand.
23317 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23319         * config/rl78/rl78.md (umindi3): New define_expand.
23321 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23323         * config/rl78/rl78.md (smindi3): New define_expand.
23325 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23327         * config/rl78/rl78.md (smaxdi3): New define_expand.
23329 2018-01-22  Carl Love  <cel@us.ibm.com>
23331         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
23332         LVX_V1TI): Add macro expansion.
23333         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
23334         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
23335         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
23336         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
23337         Change check to determine if the instruction is a byte reversing
23338         entry.  Fix typo in comment.
23339         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
23340         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
23341         Add def_builtin calls for new builtins.
23342         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
23343         Add define_insn expansion.
23345 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23347         * config/rl78/rl78.md (umaxdi3): New define_expand.
23349 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23351         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
23352         for non-QImode registers.
23354 2018-01-22  Richard Biener  <rguenther@suse.de>
23356         PR tree-optimization/83963
23357         * graphite-scop-detection.c (scop_detection::get_sese): Delay
23358         including the loop exit block.
23359         (scop_detection::merge_sese): Likewise.
23360         (scop_detection::add_scop): Do it here instead.
23362 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23364         * doc/sourcebuild.texi (arm_softfloat): Document.
23366 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
23368         PR gcc/77734
23369         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
23370         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
23371         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
23373 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23374             David Edelsohn  <dje.gcc@gmail.com>
23376         PR target/83946
23377         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23378         Change "crset eq" to "crset 2".
23379         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23380         (*call_indirect_aix<mode>_nospec): Likewise.
23381         (*call_value_indirect_aix<mode>_nospec): Likewise.
23382         (*call_indirect_elfv2<mode>_nospec): Likewise.
23383         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
23384         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
23385         change assembly output from . to $.
23386         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23387         (indirect_jump<mode>_nospec): Change assembly output from . to $.
23388         (*tablejump<mode>_internal1_nospec): Likewise.
23390 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
23392         PR target/80870
23393         * config/sh/sh_optimize_sett_clrt.cc:
23394         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
23396 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
23398         PR tree-optimization/83940
23399         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
23400         offset_dt to vect_constant_def rather than vect_unknown_def_type.
23401         (vect_check_load_store_mask): Add a mask_dt_out parameter and
23402         use it to pass back the definition type.
23403         (vect_check_store_rhs): Likewise rhs_dt_out.
23404         (vect_build_gather_load_calls): Add a mask_dt argument and use
23405         it instead of a call to vect_is_simple_use.
23406         (vectorizable_store): Update calls to vect_check_load_store_mask
23407         and vect_check_store_rhs.  Use the dt returned by the latter instead
23408         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
23409         instead of calls to vect_is_simple_use.  Pass the scalar rather
23410         than the vector operand to vect_is_simple_use when handling
23411         second and subsequent copies of an rhs value.
23412         (vectorizable_load): Update calls to vect_check_load_store_mask
23413         and vect_build_gather_load_calls.  Use the cached mask_dt and
23414         gs_info.offset_dt instead of calls to vect_is_simple_use.
23416 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
23418         PR middle-end/83945
23419         * tree-emutls.c: Include gimplify.h.
23420         (lower_emutls_2): New function.
23421         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
23422         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
23423         it before further processing.
23425         PR target/83930
23426         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
23427         UINTVAL (trueop1) instead of INTVAL (op1).
23429 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
23431         PR debug/81570
23432         PR debug/83728
23433         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
23434         INCOMING_FRAME_SP_OFFSET if not defined.
23435         (scan_trace): Add ENTRY argument.  If true and
23436         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
23437         emit a note to adjust the CFA offset.
23438         (create_cfi_notes): Adjust scan_trace callers.
23439         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
23440         INCOMING_FRAME_SP_OFFSET in the CIE.
23441         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
23442         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
23443         Likewise.
23444         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
23445         * doc/tm.texi: Regenerated.
23447 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23449         PR rtl-optimization/83147
23450         * lra-constraints.c (remove_inheritance_pseudos): Use
23451         lra_substitute_pseudo_within_insn.
23453 2018-01-19  Tom de Vries  <tom@codesourcery.com>
23454             Cesar Philippidis  <cesar@codesourcery.com>
23456         PR target/83920
23457         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
23459 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
23461         PR target/83790
23462         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
23463         spaces for function labels.
23465 2018-01-19  Martin Liska  <mliska@suse.cz>
23467         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
23468         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
23469         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
23470         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
23471         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
23472         (PRED_CONST_RETURN): Change from 69 to 65.
23473         (PRED_NULL_RETURN): Change from 91 to 71.
23474         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
23475         (PRED_LOOP_GUARD): Change from 66 to 73.
23477 2018-01-19  Martin Liska  <mliska@suse.cz>
23479         * predict.c (predict_insn_def): Add new assert.
23480         (struct branch_predictor): Change type to signed integer.
23481         (test_prediction_value_range): Amend test to cover
23482         PROB_UNINITIALIZED.
23483         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
23484         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
23485         (PRED_LOOP_ITERATIONS_MAX): Likewise.
23486         (PRED_LOOP_IV_COMPARE): Likewise.
23487         * predict.h (PROB_UNINITIALIZED): Define new constant.
23489 2018-01-19  Martin Liska  <mliska@suse.cz>
23491         * predict.c (dump_prediction): Add new format for
23492         analyze_brprob.py script which is enabled with -details
23493         suboption.
23494         * profile-count.h (precise_p): New function.
23496 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
23498         PR tree-optimization/83922
23499         * tree-vect-loop.c (vect_verify_full_masking): Return false if
23500         there are no statements that need masking.
23501         (vect_active_double_reduction_p): New function.
23502         (vect_analyze_loop_operations): Use it when handling phis that
23503         are not in the loop header.
23505 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
23507         PR tree-optimization/83914
23508         * tree-vect-loop.c (vectorizable_induction): Don't convert
23509         init_expr or apply the peeling adjustment for inductions
23510         that are nested within the vectorized loop.
23512 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23514         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
23515         instead of NEG.
23517 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
23519         PR sanitizer/81715
23520         PR testsuite/83882
23521         * function.h (gimplify_parameters): Add gimple_seq * argument.
23522         * function.c: Include gimple.h and options.h.
23523         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
23524         for the added local temporaries if needed.
23525         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
23526         if there are any parameter cleanups, wrap whole body into a
23527         try/finally with the cleanups.
23529 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
23531         PR target/82964
23532         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
23533         Use GET_MODE_CLASS for scalar floating point.
23535 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
23537         PR ipa/82256
23538         patch by PaX Team
23539         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
23540         Fix call of call_cgraph_insertion_hooks.
23542 2018-01-18  Martin Sebor  <msebor@redhat.com>
23544         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
23546 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
23548         PR ipa/83619
23549         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
23550         frequencies.
23552 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
23554         PR other/70268
23555         * common.opt: (-ffile-prefix-map): New option.
23556         * opts.c (common_handle_option): Defer it.
23557         * opts-global.c (handle_common_deferred_options): Handle it.
23558         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
23559         * file-prefix-map.h: New file.
23560         (remap_debug_filename, add_debug_prefix_map): ...here.
23561         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
23562         * final.c (debug_prefix_map, add_debug_prefix_map
23563         remap_debug_filename): Move to...
23564         * file-prefix-map.c: New file.
23565         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
23566         generalize, get rid of alloca(), use strrchr() instead of strchr().
23567         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
23568         Implement in terms of add_prefix_map().
23569         (remap_macro_filename, remap_debug_filename): Implement in term of
23570         remap_filename().
23571         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
23572         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
23573         * dbxout.c: Include file-prefix-map.h.
23574         * varasm.c: Likewise.
23575         * vmsdbgout.c: Likewise.
23576         * xcoffout.c: Likewise.
23577         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
23578         * doc/cppopts.texi (-fmacro-prefix-map): Document.
23579         * doc/invoke.texi (-ffile-prefix-map): Document.
23580         (-fdebug-prefix-map): Update description.
23582 2018-01-18  Martin Liska  <mliska@suse.cz>
23584         * config/i386/i386.c (indirect_thunk_name): Document that also
23585         lfence is emitted.
23586         (output_indirect_thunk): Document why both instructions
23587         (pause and lfence) are generated.
23589 2018-01-18  Richard Biener  <rguenther@suse.de>
23591         PR tree-optimization/83887
23592         * graphite-scop-detection.c
23593         (scop_detection::get_nearest_dom_with_single_entry): Remove.
23594         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
23595         (scop_detection::merge_sese): Re-implement with a flood-fill
23596         algorithm that properly finds a SESE region if it exists.
23598 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
23600         PR c/61240
23601         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
23602         pointer_diff optimizations use view_convert instead of convert.
23604 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23606         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23607         Generate different code for -mno-speculate-indirect-jumps.
23608         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23609         (*call_indirect_aix<mode>): Disable for
23610         -mno-speculate-indirect-jumps.
23611         (*call_indirect_aix<mode>_nospec): New define_insn.
23612         (*call_value_indirect_aix<mode>): Disable for
23613         -mno-speculate-indirect-jumps.
23614         (*call_value_indirect_aix<mode>_nospec): New define_insn.
23615         (*sibcall_nonlocal_sysv<mode>): Generate different code for
23616         -mno-speculate-indirect-jumps.
23617         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23619 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
23621         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
23622         long double type, set the flags for noting the default long double
23623         type, even if we don't pass or return a long double type.
23625 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
23627         PR ipa/83051
23628         * ipa-inline.c (flatten_function): Do not overwrite final inlining
23629         failure.
23631 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
23633         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
23634         support for merge[hl].
23635         (fold_mergehl_helper): New helper function.
23636         (tree-vector-builder.h): New #include for tree_vector_builder usage.
23637         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
23638         (altivec_vmrglw_direct): Add xxmrglw insn.
23640 2018-01-17  Andrew Waterman  <andrew@sifive.com>
23642         * config/riscv/riscv.c (riscv_conditional_register_usage): If
23643         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
23645 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
23647         PR lto/83121
23648         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
23649         call the lto_location_cache before reading the
23650         DECL_SOURCE_LOCATION of the types.
23652 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
23653             Richard Sandiford  <richard.sandiford@linaro.org>
23655         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
23656         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
23657         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
23658         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
23659         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
23660         Add declaration.
23661         * config/aarch64/constraints.md (aarch64_movti_operand):
23662         Limit immediates.
23663         * config/aarch64/predicates.md (Uti): Add new constraint.
23665 2018-01-17  Carl Love  <cel@us.ibm.com>
23667         * config/rs6000/vsx.md (define_expand xl_len_r,
23668         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
23669         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
23670         lxvll.
23671         (define_expand, define_insn): Move the shift left from  the
23672         define_insn to the define_expand for lxvl and stxvl instructions.
23673         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
23674         and XL_LEN_R definitions to PURE.
23676 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
23678         * config/i386/i386.c (indirect_thunk_name): Declare regno
23679         as unsigned int.  Compare regno with INVALID_REGNUM.
23680         (output_indirect_thunk): Ditto.
23681         (output_indirect_thunk_function): Ditto.
23682         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
23683         in the call to output_indirect_thunk_function.
23685 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
23687         PR middle-end/83884
23688         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
23689         rather than the size of inner_type to determine the stack slot size
23690         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
23692 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
23694         PR target/83546
23695         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
23696         to PTA_SILVERMONT.
23698 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
23700         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
23701         endian Linux systems to optionally enable multilibs for selecting
23702         the long double type if the user configured an explicit type.
23703         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
23704         have no long double multilibs if not defined.
23705         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
23706         warn if the user used -mabi={ieee,ibm}longdouble and we built
23707         multilibs for long double.
23708         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
23709         appropriate multilib option.
23710         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
23711         multilib options.
23712         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
23713         for building long double multilibs.
23714         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
23716 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
23718         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
23719         copies.
23721         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
23722         64 bits.
23723         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
23724         128 bits.
23726         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
23727         variables.
23729         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
23730         return value.
23732 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
23734         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
23735         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
23737 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23739         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
23740         different rtl trees depending on TARGET_64BIT.
23741         (rs6000_gen_lvx): Likewise.
23743 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
23745         * config/visium/visium.md (nop): Tweak comment.
23746         (hazard_nop): Likewise.
23748 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23750         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
23751         -mspeculate-indirect-jumps.
23752         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
23753         for -mno-speculate-indirect-jumps.
23754         (*call_indirect_elfv2<mode>_nospec): New define_insn.
23755         (*call_value_indirect_elfv2<mode>): Disable for
23756         -mno-speculate-indirect-jumps.
23757         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
23758         (indirect_jump): Emit different RTL for
23759         -mno-speculate-indirect-jumps.
23760         (*indirect_jump<mode>): Disable for
23761         -mno-speculate-indirect-jumps.
23762         (*indirect_jump<mode>_nospec): New define_insn.
23763         (tablejump): Emit different RTL for
23764         -mno-speculate-indirect-jumps.
23765         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
23766         (tablejumpsi_nospec): New define_expand.
23767         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
23768         (tablejumpdi_nospec): New define_expand.
23769         (*tablejump<mode>_internal1): Disable for
23770         -mno-speculate-indirect-jumps.
23771         (*tablejump<mode>_internal1_nospec): New define_insn.
23772         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
23773         option.
23775 2018-01-16  Artyom Skrobov tyomitch@gmail.com
23777         * caller-save.c (insert_save): Drop unnecessary parameter.  All
23778         callers updated.
23780 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
23781             Richard Biener  <rguenth@suse.de>
23783         PR libgomp/83590
23784         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
23785         return early, inline manually is_gimple_sizepos.  Make sure if we
23786         call gimplify_expr we don't end up with a gimple constant.
23787         * tree.c (variably_modified_type_p): Don't return true for
23788         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
23789         * gimplify.h (is_gimple_sizepos): Remove.
23791 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23793         PR tree-optimization/83857
23794         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
23795         vectorizable_live_operation for pure SLP statements.
23796         (vectorizable_live_operation): Handle PHIs.
23798 2018-01-16  Richard Biener  <rguenther@suse.de>
23800         PR tree-optimization/83867
23801         * tree-vect-stmts.c (vect_transform_stmt): Precompute
23802         nested_in_vect_loop_p since the scalar stmt may get invalidated.
23804 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
23806         PR c/83844
23807         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
23808         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
23809         If off is not INTEGER_CST, issue a may not be aligned warning
23810         rather than isn't aligned.  Use isn%'t rather than isn't.
23811         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
23812         into MULT_EXPR.
23813         <case MULT_EXPR>: Improve the case when bottom and one of the
23814         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
23815         operand, in that case check if the other operand is multiple of
23816         bottom divided by the INTEGER_CST operand.
23818 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23820         PR target/83858
23821         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
23822         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
23823         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
23824         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
23825         * config/pa/pa.c (pa_function_arg_advance): Likewise.
23826         (pa_function_arg, pa_arg_partial_bytes): Likewise.
23827         (pa_function_arg_size): New function.
23829 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23831         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
23832         in a separate statement.
23834 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23836         PR tree-optimization/83847
23837         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
23838         group gathers and scatters.
23840 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
23842         PR rtl-optimization/86620
23843         * params.def (max-sched-ready-insns): Bump minimum value to 1.
23845         PR rtl-optimization/83213
23846         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
23847         to last if both are JUMP_INSNs.
23849         PR tree-optimization/83843
23850         * gimple-ssa-store-merging.c
23851         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
23852         store_immediate_info for bswap/nop orig_stores.
23854 2018-01-15  Andrew Waterman  <andrew@sifive.com>
23856         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
23857         !TARGET_MUL.
23858         <UDIV>: Increase cost if !TARGET_DIV.
23860 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
23862         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
23863         (define_attr "cr_logical_3op"): New.
23864         (cceq_ior_compare): Adjust.
23865         (cceq_ior_compare_complement): Adjust.
23866         (*cceq_rev_compare): Adjust.
23867         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
23868         (is_cracked_insn): Adjust.
23869         (insn_must_be_first_in_group): Adjust.
23870         * config/rs6000/40x.md: Adjust.
23871         * config/rs6000/440.md: Adjust.
23872         * config/rs6000/476.md: Adjust.
23873         * config/rs6000/601.md: Adjust.
23874         * config/rs6000/603.md: Adjust.
23875         * config/rs6000/6xx.md: Adjust.
23876         * config/rs6000/7450.md: Adjust.
23877         * config/rs6000/7xx.md: Adjust.
23878         * config/rs6000/8540.md: Adjust.
23879         * config/rs6000/cell.md: Adjust.
23880         * config/rs6000/e300c2c3.md: Adjust.
23881         * config/rs6000/e500mc.md: Adjust.
23882         * config/rs6000/e500mc64.md: Adjust.
23883         * config/rs6000/e5500.md: Adjust.
23884         * config/rs6000/e6500.md: Adjust.
23885         * config/rs6000/mpc.md: Adjust.
23886         * config/rs6000/power4.md: Adjust.
23887         * config/rs6000/power5.md: Adjust.
23888         * config/rs6000/power6.md: Adjust.
23889         * config/rs6000/power7.md: Adjust.
23890         * config/rs6000/power8.md: Adjust.
23891         * config/rs6000/power9.md: Adjust.
23892         * config/rs6000/rs64.md: Adjust.
23893         * config/rs6000/titan.md: Adjust.
23895 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23897         * config/i386/predicates.md (indirect_branch_operand): Rewrite
23898         ix86_indirect_branch_register logic.
23900 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23902         * config/i386/constraints.md (Bs): Update
23903         ix86_indirect_branch_register check.  Don't check
23904         ix86_indirect_branch_register with GOT_memory_operand.
23905         (Bw): Likewise.
23906         * config/i386/predicates.md (GOT_memory_operand): Don't check
23907         ix86_indirect_branch_register here.
23908         (GOT32_symbol_operand): Likewise.
23910 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23912         * config/i386/predicates.md (constant_call_address_operand):
23913         Rewrite ix86_indirect_branch_register logic.
23914         (sibcall_insn_operand): Likewise.
23916 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23918         * config/i386/constraints.md (Bs): Replace
23919         ix86_indirect_branch_thunk_register with
23920         ix86_indirect_branch_register.
23921         (Bw): Likewise.
23922         * config/i386/i386.md (indirect_jump): Likewise.
23923         (tablejump): Likewise.
23924         (*sibcall_memory): Likewise.
23925         (*sibcall_value_memory): Likewise.
23926         Peepholes of indirect call and jump via memory: Likewise.
23927         * config/i386/i386.opt: Likewise.
23928         * config/i386/predicates.md (indirect_branch_operand): Likewise.
23929         (GOT_memory_operand): Likewise.
23930         (call_insn_operand): Likewise.
23931         (sibcall_insn_operand): Likewise.
23932         (GOT32_symbol_operand): Likewise.
23934 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
23936         PR middle-end/83837
23937         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
23938         type rather than type addr's type points to.
23939         (expand_omp_atomic_mutex): Likewise.
23940         (expand_omp_atomic): Likewise.
23942 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23944         PR target/83839
23945         * config/i386/i386.c (output_indirect_thunk_function): Use
23946         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
23947         for  __x86_return_thunk.
23949 2018-01-15  Richard Biener  <rguenther@suse.de>
23951         PR middle-end/83850
23952         * expmed.c (extract_bit_field_1): Fix typo.
23954 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23956         PR target/83687
23957         * config/arm/iterators.md (VF): New mode iterator.
23958         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
23959         Remove integer-related logic from pattern.
23960         (neon_vabd<mode>_3): Likewise.
23962 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
23964         PR middle-end/82694
23965         * common.opt (fstrict-overflow): No longer an alias.
23966         (fwrapv-pointer): New option.
23967         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
23968         also for pointer types based on flag_wrapv_pointer.
23969         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
23970         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
23971         opts->x_flag_wrapv got set.
23972         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
23973         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
23974         POINTER_TYPE_OVERFLOW_UNDEFINED.
23975         * match.pd: Likewise in address comparison pattern.
23976         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
23978 2018-01-15  Richard Biener  <rguenther@suse.de>
23980         PR lto/83804
23981         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
23982         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
23983         Reset type names to their identifier if their TYPE_DECL doesn't
23984         have linkage (and thus is used for ODR and devirt).
23985         (save_debug_info_for_decl): Remove.
23986         (save_debug_info_for_type): Likewise.
23987         (add_tree_to_fld_list): Adjust.
23988         * tree-pretty-print.c (dump_generic_node): Make dumping of
23989         type names more robust.
23991 2018-01-15  Richard Biener  <rguenther@suse.de>
23993         * BASE-VER: Bump to 8.0.1.
23995 2018-01-14  Martin Sebor  <msebor@redhat.com>
23997         PR other/83508
23998         * builtins.c (check_access): Avoid warning when the no-warning bit
23999         is set.
24001 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
24003         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
24004         * ira-color (allocno_hard_regs_compare): Likewise.
24006 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
24008         PR target/83013
24009         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
24010         Use .pushsection/.popsection.
24012 2018-01-14  Martin Sebor  <msebor@redhat.com>
24014         PR c++/81327
24015         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
24017 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
24019         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
24020         entry from extra_headers.
24021         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
24022         extra_headers, make the list bitwise identical to the i?86-*-* one.
24024 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24026         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
24027         -mcmodel=large with -mindirect-branch=thunk,
24028         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
24029         -mfunction-return=thunk-extern.
24030         * doc/invoke.texi: Document -mcmodel=large is incompatible with
24031         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
24032         -mfunction-return=thunk and -mfunction-return=thunk-extern.
24034 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24036         * config/i386/i386.c (print_reg): Print the name of the full
24037         integer register without '%'.
24038         (ix86_print_operand): Handle 'V'.
24039         * doc/extend.texi: Document 'V' modifier.
24041 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24043         * config/i386/constraints.md (Bs): Disallow memory operand for
24044         -mindirect-branch-register.
24045         (Bw): Likewise.
24046         * config/i386/predicates.md (indirect_branch_operand): Likewise.
24047         (GOT_memory_operand): Likewise.
24048         (call_insn_operand): Likewise.
24049         (sibcall_insn_operand): Likewise.
24050         (GOT32_symbol_operand): Likewise.
24051         * config/i386/i386.md (indirect_jump): Call convert_memory_address
24052         for -mindirect-branch-register.
24053         (tablejump): Likewise.
24054         (*sibcall_memory): Likewise.
24055         (*sibcall_value_memory): Likewise.
24056         Disallow peepholes of indirect call and jump via memory for
24057         -mindirect-branch-register.
24058         (*call_pop): Replace m with Bw.
24059         (*call_value_pop): Likewise.
24060         (*sibcall_pop_memory): Replace m with Bs.
24061         * config/i386/i386.opt (mindirect-branch-register): New option.
24062         * doc/invoke.texi: Document -mindirect-branch-register option.
24064 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24066         * config/i386/i386-protos.h (ix86_output_function_return): New.
24067         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
24068         set function_return_type.
24069         (indirect_thunk_name): Add ret_p to indicate thunk for function
24070         return.
24071         (output_indirect_thunk_function): Pass false to
24072         indirect_thunk_name.
24073         (ix86_output_indirect_branch_via_reg): Likewise.
24074         (ix86_output_indirect_branch_via_push): Likewise.
24075         (output_indirect_thunk_function): Create alias for function
24076         return thunk if regno < 0.
24077         (ix86_output_function_return): New function.
24078         (ix86_handle_fndecl_attribute): Handle function_return.
24079         (ix86_attribute_table): Add function_return.
24080         * config/i386/i386.h (machine_function): Add
24081         function_return_type.
24082         * config/i386/i386.md (simple_return_internal): Use
24083         ix86_output_function_return.
24084         (simple_return_internal_long): Likewise.
24085         * config/i386/i386.opt (mfunction-return=): New option.
24086         (indirect_branch): Mention -mfunction-return=.
24087         * doc/extend.texi: Document function_return function attribute.
24088         * doc/invoke.texi: Document -mfunction-return= option.
24090 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24092         * config/i386/i386-opts.h (indirect_branch): New.
24093         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
24094         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
24095         with local indirect jump when converting indirect call and jump.
24096         (ix86_set_indirect_branch_type): New.
24097         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
24098         (indirectlabelno): New.
24099         (indirect_thunk_needed): Likewise.
24100         (indirect_thunk_bnd_needed): Likewise.
24101         (indirect_thunks_used): Likewise.
24102         (indirect_thunks_bnd_used): Likewise.
24103         (INDIRECT_LABEL): Likewise.
24104         (indirect_thunk_name): Likewise.
24105         (output_indirect_thunk): Likewise.
24106         (output_indirect_thunk_function): Likewise.
24107         (ix86_output_indirect_branch_via_reg): Likewise.
24108         (ix86_output_indirect_branch_via_push): Likewise.
24109         (ix86_output_indirect_branch): Likewise.
24110         (ix86_output_indirect_jmp): Likewise.
24111         (ix86_code_end): Call output_indirect_thunk_function if needed.
24112         (ix86_output_call_insn): Call ix86_output_indirect_branch if
24113         needed.
24114         (ix86_handle_fndecl_attribute): Handle indirect_branch.
24115         (ix86_attribute_table): Add indirect_branch.
24116         * config/i386/i386.h (machine_function): Add indirect_branch_type
24117         and has_local_indirect_jump.
24118         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
24119         to true.
24120         (tablejump): Likewise.
24121         (*indirect_jump): Use ix86_output_indirect_jmp.
24122         (*tablejump_1): Likewise.
24123         (simple_return_indirect_internal): Likewise.
24124         * config/i386/i386.opt (mindirect-branch=): New option.
24125         (indirect_branch): New.
24126         (keep): Likewise.
24127         (thunk): Likewise.
24128         (thunk-inline): Likewise.
24129         (thunk-extern): Likewise.
24130         * doc/extend.texi: Document indirect_branch function attribute.
24131         * doc/invoke.texi: Document -mindirect-branch= option.
24133 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
24135         PR ipa/83051
24136         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
24138 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
24140         * ipa-inline.c (want_inline_small_function_p): Return false if
24141         inlining has already failed with CIF_FINAL_ERROR.
24142         (update_caller_keys): Call want_inline_small_function_p before
24143         can_inline_edge_p.
24144         (update_callee_keys): Likewise.
24146 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24148         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
24149         New function.
24150         (rs6000_quadword_masked_address_p): Likewise.
24151         (quad_aligned_load_p): Likewise.
24152         (quad_aligned_store_p): Likewise.
24153         (const_load_sequence_p): Add comment to describe the outer-most loop.
24154         (mimic_memory_attributes_and_flags): New function.
24155         (rs6000_gen_stvx): Likewise.
24156         (replace_swapped_aligned_store): Likewise.
24157         (rs6000_gen_lvx): Likewise.
24158         (replace_swapped_aligned_load): Likewise.
24159         (replace_swapped_load_constant): Capitalize argument name in
24160         comment describing this function.
24161         (rs6000_analyze_swaps): Add a third pass to search for vector loads
24162         and stores that access quad-word aligned addresses and replace
24163         with stvx or lvx instructions when appropriate.
24164         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
24165         New function prototype.
24166         (rs6000_quadword_masked_address_p): Likewise.
24167         (rs6000_gen_lvx): Likewise.
24168         (rs6000_gen_stvx): Likewise.
24169         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
24170         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
24171         when memory address is aligned.
24172         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
24173         this split to select lvx instruction when memory address is aligned.
24174         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
24175         instruction when memory address is aligned.
24176         (*vsx_le_perm_load_v16qi): Likewise.
24177         (four unnamed splitters): Modify to select the stvx instruction
24178         when memory is aligned.
24180 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
24182         * predict.c (determine_unlikely_bbs): Handle correctly BBs
24183         which appears in the queue multiple times.
24185 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24186             Alan Hayward  <alan.hayward@arm.com>
24187             David Sherwood  <david.sherwood@arm.com>
24189         * tree-vectorizer.h (vec_lower_bound): New structure.
24190         (_loop_vec_info): Add check_nonzero and lower_bounds.
24191         (LOOP_VINFO_CHECK_NONZERO): New macro.
24192         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
24193         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
24194         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
24195         fields.  Make seg_len the distance travelled, not including the
24196         access size.
24197         (dr_direction_indicator): Declare.
24198         (dr_zero_step_indicator): Likewise.
24199         (dr_known_forward_stride_p): Likewise.
24200         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
24201         tree-ssanames.h.
24202         (runtime_alias_check_p): Allow runtime alias checks with
24203         variable strides.
24204         (operator ==): Compare access_size and align.
24205         (prune_runtime_alias_test_list): Rework for new distinction between
24206         the access_size and seg_len.
24207         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
24208         segment lengths.
24209         (get_segment_min_max): New function.
24210         (create_intersect_range_checks): Use it.
24211         (dr_step_indicator): New function.
24212         (dr_direction_indicator): Likewise.
24213         (dr_zero_step_indicator): Likewise.
24214         (dr_known_forward_stride_p): Likewise.
24215         * tree-loop-distribution.c (data_ref_segment_size): Return
24216         DR_STEP * (niters - 1).
24217         (compute_alias_check_pairs): Update call to the dr_with_seg_len
24218         constructor.
24219         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
24220         (vect_preserves_scalar_order_p): New function, split out from...
24221         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
24222         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
24223         (vect_vfa_access_size): New function.
24224         (vect_vfa_align): Likewise.
24225         (vect_compile_time_alias): Take access_size_a and access_b arguments.
24226         (dump_lower_bound): New function.
24227         (vect_check_lower_bound): Likewise.
24228         (vect_small_gap_p): Likewise.
24229         (vectorizable_with_step_bound_p): Likewise.
24230         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
24231         depencies if the vectorization factor is 1.  Convert the checks
24232         for nonzero steps into checks on the bounds of DR_STEP.  Try using
24233         a bunds check for variable steps if the minimum required step is
24234         relatively small. Update calls to the dr_with_seg_len
24235         constructor and to vect_compile_time_alias.
24236         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
24237         function.
24238         (vect_loop_versioning): Call it.
24239         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
24240         when retrying.
24241         (vect_estimate_min_profitable_iters): Account for any bounds checks.
24243 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24244             Alan Hayward  <alan.hayward@arm.com>
24245             David Sherwood  <david.sherwood@arm.com>
24247         * doc/sourcebuild.texi (vect_scatter_store): Document.
24248         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
24249         optabs.
24250         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
24251         Document.
24252         * genopinit.c (main): Add supports_vec_scatter_store and
24253         supports_vec_scatter_store_cached to target_optabs.
24254         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
24255         IFN_MASK_SCATTER_STORE.
24256         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
24257         functions.
24258         * internal-fn.h (internal_store_fn_p): Declare.
24259         (internal_fn_stored_value_index): Likewise.
24260         * internal-fn.c (scatter_store_direct): New macro.
24261         (expand_scatter_store_optab_fn): New function.
24262         (direct_scatter_store_optab_supported_p): New macro.
24263         (internal_store_fn_p): New function.
24264         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
24265         IFN_MASK_SCATTER_STORE.
24266         (internal_fn_mask_index): Likewise.
24267         (internal_fn_stored_value_index): New function.
24268         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
24269         for scatter stores.
24270         * optabs-query.h (supports_vec_scatter_store_p): Declare.
24271         * optabs-query.c (supports_vec_scatter_store_p): New function.
24272         * tree-vectorizer.h (vect_get_store_rhs): Declare.
24273         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
24274         true for scatter stores.
24275         (vect_gather_scatter_fn_p): Handle scatter stores too.
24276         (vect_check_gather_scatter): Consider using scatter stores if
24277         supports_vec_scatter_store_p.
24278         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
24279         scatter stores too.
24280         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24281         internal_fn_stored_value_index.
24282         (check_load_store_masking): Handle scatter stores too.
24283         (vect_get_store_rhs): Make public.
24284         (vectorizable_call): Use internal_store_fn_p.
24285         (vectorizable_store): Handle scatter store internal functions.
24286         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
24287         when deciding whether the end of the group has been reached.
24288         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
24289         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
24290         (mask_scatter_store<mode>): New insns.
24292 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24293             Alan Hayward  <alan.hayward@arm.com>
24294             David Sherwood  <david.sherwood@arm.com>
24296         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
24297         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
24298         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
24299         function.
24300         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
24301         Use vect_truncate_gather_scatter_offset if we can't treat the
24302         operation as a normal gather load or scatter store.
24303         (get_group_load_store_type): Take the gather_scatter_info
24304         as argument.  Try using a gather load or scatter store for
24305         single-element groups.
24306         (get_load_store_type): Update calls to get_group_load_store_type
24307         and vect_use_strided_gather_scatters_p.
24309 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24310             Alan Hayward  <alan.hayward@arm.com>
24311             David Sherwood  <david.sherwood@arm.com>
24313         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
24314         optional tree argument.
24315         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
24316         null target hooks.
24317         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
24318         but continue to use the current value as a fallback.
24319         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
24320         to compare the updates.
24321         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
24322         (get_load_store_type): Use it when handling a strided access.
24323         (vect_get_strided_load_store_ops): New function.
24324         (vect_get_data_ptr_increment): Likewise.
24325         (vectorizable_load): Handle strided gather loads.  Always pass
24326         a step to vect_create_data_ref_ptr and bump_vector_ptr.
24328 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24329             Alan Hayward  <alan.hayward@arm.com>
24330             David Sherwood  <david.sherwood@arm.com>
24332         * doc/md.texi (gather_load@var{m}): Document.
24333         (mask_gather_load@var{m}): Likewise.
24334         * genopinit.c (main): Add supports_vec_gather_load and
24335         supports_vec_gather_load_cached to target_optabs.
24336         * optabs-tree.c (init_tree_optimization_optabs): Use
24337         ggc_cleared_alloc to allocate target_optabs.
24338         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
24339         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
24340         functions.
24341         * internal-fn.h (internal_load_fn_p): Declare.
24342         (internal_gather_scatter_fn_p): Likewise.
24343         (internal_fn_mask_index): Likewise.
24344         (internal_gather_scatter_fn_supported_p): Likewise.
24345         * internal-fn.c (gather_load_direct): New macro.
24346         (expand_gather_load_optab_fn): New function.
24347         (direct_gather_load_optab_supported_p): New macro.
24348         (direct_internal_fn_optab): New function.
24349         (internal_load_fn_p): Likewise.
24350         (internal_gather_scatter_fn_p): Likewise.
24351         (internal_fn_mask_index): Likewise.
24352         (internal_gather_scatter_fn_supported_p): Likewise.
24353         * optabs-query.c (supports_at_least_one_mode_p): New function.
24354         (supports_vec_gather_load_p): Likewise.
24355         * optabs-query.h (supports_vec_gather_load_p): Declare.
24356         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
24357         and memory_type field.
24358         (NUM_PATTERNS): Bump to 15.
24359         * tree-vect-data-refs.c: Include internal-fn.h.
24360         (vect_gather_scatter_fn_p): New function.
24361         (vect_describe_gather_scatter_call): Likewise.
24362         (vect_check_gather_scatter): Try using internal functions for
24363         gather loads.  Recognize existing calls to a gather load function.
24364         (vect_analyze_data_refs): Consider using gather loads if
24365         supports_vec_gather_load_p.
24366         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
24367         (vect_get_gather_scatter_offset_type): Likewise.
24368         (vect_convert_mask_for_vectype): Likewise.
24369         (vect_add_conversion_to_patterm): Likewise.
24370         (vect_try_gather_scatter_pattern): Likewise.
24371         (vect_recog_gather_scatter_pattern): New pattern recognizer.
24372         (vect_vect_recog_func_ptrs): Add it.
24373         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24374         internal_fn_mask_index and internal_gather_scatter_fn_p.
24375         (check_load_store_masking): Take the gather_scatter_info as an
24376         argument and handle gather loads.
24377         (vect_get_gather_scatter_ops): New function.
24378         (vectorizable_call): Check internal_load_fn_p.
24379         (vectorizable_load): Likewise.  Handle gather load internal
24380         functions.
24381         (vectorizable_store): Update call to check_load_store_masking.
24382         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
24383         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
24384         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
24385         (aarch64_gather_scale_operand_d): New predicates.
24386         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
24387         (mask_gather_load<mode>): New insns.
24389 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24390             Alan Hayward  <alan.hayward@arm.com>
24391             David Sherwood  <david.sherwood@arm.com>
24393         * optabs.def (fold_left_plus_optab): New optab.
24394         * doc/md.texi (fold_left_plus_@var{m}): Document.
24395         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
24396         * internal-fn.c (fold_left_direct): Define.
24397         (expand_fold_left_optab_fn): Likewise.
24398         (direct_fold_left_optab_supported_p): Likewise.
24399         * fold-const-call.c (fold_const_fold_left): New function.
24400         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
24401         * tree-parloops.c (valid_reduction_p): New function.
24402         (gather_scalar_reductions): Use it.
24403         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
24404         (vect_finish_replace_stmt): Declare.
24405         * tree-vect-loop.c (fold_left_reduction_fn): New function.
24406         (needs_fold_left_reduction_p): New function, split out from...
24407         (vect_is_simple_reduction): ...here.  Accept reductions that
24408         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
24409         (vect_force_simple_reduction): Also store the reduction type in
24410         the assignment's STMT_VINFO_REDUC_TYPE.
24411         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
24412         (merge_with_identity): New function.
24413         (vect_expand_fold_left): Likewise.
24414         (vectorize_fold_left_reduction): Likewise.
24415         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
24416         scalar phi in place for it.  Check for target support and reject
24417         cases that would reassociate the operation.  Defer the transform
24418         phase to vectorize_fold_left_reduction.
24419         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
24420         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
24421         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
24423 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24425         * tree-if-conv.c (predicate_mem_writes): Remove redundant
24426         call to ifc_temp_var.
24428 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24429             Alan Hayward  <alan.hayward@arm.com>
24430             David Sherwood  <david.sherwood@arm.com>
24432         * target.def (legitimize_address_displacement): Take the original
24433         offset as a poly_int.
24434         * targhooks.h (default_legitimize_address_displacement): Update
24435         accordingly.
24436         * targhooks.c (default_legitimize_address_displacement): Likewise.
24437         * doc/tm.texi: Regenerate.
24438         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
24439         as an argument, moving assert of ad->disp == ad->disp_term to...
24440         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
24441         Try calling targetm.legitimize_address_displacement before expanding
24442         the address rather than afterwards, and adjust for the new interface.
24443         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
24444         Match the new hook interface.  Handle SVE addresses.
24445         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
24446         new hook interface.
24448 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24450         * Makefile.in (OBJS): Add early-remat.o.
24451         * target.def (select_early_remat_modes): New hook.
24452         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
24453         * doc/tm.texi: Regenerate.
24454         * targhooks.h (default_select_early_remat_modes): Declare.
24455         * targhooks.c (default_select_early_remat_modes): New function.
24456         * timevar.def (TV_EARLY_REMAT): New timevar.
24457         * passes.def (pass_early_remat): New pass.
24458         * tree-pass.h (make_pass_early_remat): Declare.
24459         * early-remat.c: New file.
24460         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
24461         function.
24462         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
24464 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24465             Alan Hayward  <alan.hayward@arm.com>
24466             David Sherwood  <david.sherwood@arm.com>
24468         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
24469         vfm1 with a bound_epilog parameter.
24470         (vect_do_peeling): Update calls accordingly, and move the prologue
24471         call earlier in the function.  Treat the base bound_epilog as 0 for
24472         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
24473         this base when peeling for gaps.
24474         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
24475         with fully-masked loops.
24476         (vect_estimate_min_profitable_iters): Handle the single peeled
24477         iteration in that case.
24479 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24480             Alan Hayward  <alan.hayward@arm.com>
24481             David Sherwood  <david.sherwood@arm.com>
24483         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
24484         single-element interleaving even if the size is not a power of 2.
24485         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
24486         accesses for single-element interleaving if the group size is
24487         not a power of 2.
24489 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24490             Alan Hayward  <alan.hayward@arm.com>
24491             David Sherwood  <david.sherwood@arm.com>
24493         * doc/md.texi (fold_extract_last_@var{m}): Document.
24494         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
24495         * optabs.def (fold_extract_last_optab): New optab.
24496         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
24497         * internal-fn.c (fold_extract_direct): New macro.
24498         (expand_fold_extract_optab_fn): Likewise.
24499         (direct_fold_extract_optab_supported_p): Likewise.
24500         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
24501         * tree-vect-loop.c (vect_model_reduction_cost): Handle
24502         EXTRACT_LAST_REDUCTION.
24503         (get_initial_def_for_reduction): Do not create an initial vector
24504         for EXTRACT_LAST_REDUCTION reductions.
24505         (vectorizable_reduction): Leave the scalar phi in place for
24506         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
24507         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
24508         epilogue code for EXTRACT_LAST_REDUCTION and defer the
24509         transform phase to vectorizable_condition.
24510         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
24511         split out from...
24512         (vect_finish_stmt_generation): ...here.
24513         (vect_finish_replace_stmt): New function.
24514         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
24515         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
24516         pattern.
24517         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
24519 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24520             Alan Hayward  <alan.hayward@arm.com>
24521             David Sherwood  <david.sherwood@arm.com>
24523         * doc/md.texi (extract_last_@var{m}): Document.
24524         * optabs.def (extract_last_optab): New optab.
24525         * internal-fn.def (EXTRACT_LAST): New internal function.
24526         * internal-fn.c (cond_unary_direct): New macro.
24527         (expand_cond_unary_optab_fn): Likewise.
24528         (direct_cond_unary_optab_supported_p): Likewise.
24529         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
24530         loops using EXTRACT_LAST.
24531         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
24532         (extract_last_<mode>): ...this optab.
24533         (vec_extract<mode><Vel>): Update accordingly.
24535 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24536             Alan Hayward  <alan.hayward@arm.com>
24537             David Sherwood  <david.sherwood@arm.com>
24539         * target.def (empty_mask_is_expensive): New hook.
24540         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
24541         * doc/tm.texi: Regenerate.
24542         * targhooks.h (default_empty_mask_is_expensive): Declare.
24543         * targhooks.c (default_empty_mask_is_expensive): New function.
24544         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
24545         if the target says that empty masks are expensive.
24546         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
24547         New function.
24548         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
24550 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24551             Alan Hayward  <alan.hayward@arm.com>
24552             David Sherwood  <david.sherwood@arm.com>
24554         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
24555         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
24556         (vect_use_loop_mask_for_alignment_p): New function.
24557         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
24558         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
24559         niters_skip argument.  Make sure that the first niters_skip elements
24560         of the first iteration are inactive.
24561         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
24562         Update call to vect_set_loop_masks_directly.
24563         (get_misalign_in_elems): New function, split out from...
24564         (vect_gen_prolog_loop_niters): ...here.
24565         (vect_update_init_of_dr): Take a code argument that specifies whether
24566         the adjustment should be added or subtracted.
24567         (vect_update_init_of_drs): Likewise.
24568         (vect_prepare_for_masked_peels): New function.
24569         (vect_do_peeling): Skip prologue peeling if we're using a mask
24570         instead.  Update call to vect_update_inits_of_drs.
24571         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24572         mask_skip_niters.
24573         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
24574         alignment.  Do not include the number of peeled iterations in
24575         the minimum threshold in that case.
24576         (vectorizable_induction): Adjust the start value down by
24577         LOOP_VINFO_MASK_SKIP_NITERS iterations.
24578         (vect_transform_loop): Call vect_prepare_for_masked_peels.
24579         Take the number of skipped iterations into account when calculating
24580         the loop bounds.
24581         * tree-vect-stmts.c (vect_gen_while_not): New function.
24583 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24584             Alan Hayward  <alan.hayward@arm.com>
24585             David Sherwood  <david.sherwood@arm.com>
24587         * doc/sourcebuild.texi (vect_fully_masked): Document.
24588         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
24589         default value to 0.
24590         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
24591         split out from...
24592         (vect_analyze_loop_2): ...here. Don't check the vectorization
24593         factor against the number of loop iterations if the loop is
24594         fully-masked.
24596 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24597             Alan Hayward  <alan.hayward@arm.com>
24598             David Sherwood  <david.sherwood@arm.com>
24600         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
24601         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
24602         (dump_groups): Update accordingly.
24603         (iv_use::mem_type): New member variable.
24604         (address_p): New function.
24605         (record_use): Add a mem_type argument and initialize the new
24606         mem_type field.
24607         (record_group_use): Add a mem_type argument.  Use address_p.
24608         Remove obsolete null checks of base_object.  Update call to record_use.
24609         (find_interesting_uses_op): Update call to record_group_use.
24610         (find_interesting_uses_cond): Likewise.
24611         (find_interesting_uses_address): Likewise.
24612         (get_mem_type_for_internal_fn): New function.
24613         (find_address_like_use): Likewise.
24614         (find_interesting_uses_stmt): Try find_address_like_use before
24615         calling find_interesting_uses_op.
24616         (addr_offset_valid_p): Use the iv mem_type field as the type
24617         of the addressed memory.
24618         (add_autoinc_candidates): Likewise.
24619         (get_address_cost): Likewise.
24620         (split_small_address_groups_p): Use address_p.
24621         (split_address_groups): Likewise.
24622         (add_iv_candidate_for_use): Likewise.
24623         (autoinc_possible_for_pair): Likewise.
24624         (rewrite_groups): Likewise.
24625         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
24626         (determine_group_iv_cost): Update after split of USE_ADDRESS.
24627         (get_alias_ptr_type_for_ptr_address): New function.
24628         (rewrite_use_address): Rewrite address uses in calls that were
24629         identified by find_address_like_use.
24631 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24632             Alan Hayward  <alan.hayward@arm.com>
24633             David Sherwood  <david.sherwood@arm.com>
24635         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
24636         TARGET_MEM_REFs.
24637         * gimple-expr.h (is_gimple_addressable: Likewise.
24638         * gimple-expr.c (is_gimple_address): Likewise.
24639         * internal-fn.c (expand_call_mem_ref): New function.
24640         (expand_mask_load_optab_fn): Use it.
24641         (expand_mask_store_optab_fn): Likewise.
24643 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24644             Alan Hayward  <alan.hayward@arm.com>
24645             David Sherwood  <david.sherwood@arm.com>
24647         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
24648         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
24649         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
24650         (cond_umax@var{mode}): Document.
24651         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
24652         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
24653         (cond_umin_optab, cond_umax_optab): New optabs.
24654         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
24655         (COND_IOR, COND_XOR): New internal functions.
24656         * internal-fn.h (get_conditional_internal_fn): Declare.
24657         * internal-fn.c (cond_binary_direct): New macro.
24658         (expand_cond_binary_optab_fn): Likewise.
24659         (direct_cond_binary_optab_supported_p): Likewise.
24660         (get_conditional_internal_fn): New function.
24661         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
24662         Cope with reduction statements that are vectorized as calls rather
24663         than assignments.
24664         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
24665         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
24666         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
24667         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
24668         (UNSPEC_COND_EOR): New unspecs.
24669         (optab): Add mappings for them.
24670         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
24671         (sve_int_op, sve_fp_op): New int attributes.
24673 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24674             Alan Hayward  <alan.hayward@arm.com>
24675             David Sherwood  <david.sherwood@arm.com>
24677         * optabs.def (while_ult_optab): New optab.
24678         * doc/md.texi (while_ult@var{m}@var{n}): Document.
24679         * internal-fn.def (WHILE_ULT): New internal function.
24680         * internal-fn.h (direct_internal_fn_supported_p): New override
24681         that takes two types as argument.
24682         * internal-fn.c (while_direct): New macro.
24683         (expand_while_optab_fn): New function.
24684         (convert_optab_supported_p): Likewise.
24685         (direct_while_optab_supported_p): New macro.
24686         * wide-int.h (wi::udiv_ceil): New function.
24687         * tree-vectorizer.h (rgroup_masks): New structure.
24688         (vec_loop_masks): New typedef.
24689         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
24690         and fully_masked_p.
24691         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
24692         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
24693         (vect_max_vf): New function.
24694         (slpeel_make_loop_iterate_ntimes): Delete.
24695         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
24696         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
24697         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
24698         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
24699         internal-fn.h, stor-layout.h and optabs-query.h.
24700         (vect_set_loop_mask): New function.
24701         (add_preheader_seq): Likewise.
24702         (add_header_seq): Likewise.
24703         (interleave_supported_p): Likewise.
24704         (vect_maybe_permute_loop_masks): Likewise.
24705         (vect_set_loop_masks_directly): Likewise.
24706         (vect_set_loop_condition_masked): Likewise.
24707         (vect_set_loop_condition_unmasked): New function, split out from
24708         slpeel_make_loop_iterate_ntimes.
24709         (slpeel_make_loop_iterate_ntimes): Rename to..
24710         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
24711         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
24712         (vect_do_peeling): Update call accordingly.
24713         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
24714         loops.
24715         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24716         mask_compare_type, can_fully_mask_p and fully_masked_p.
24717         (release_vec_loop_masks): New function.
24718         (_loop_vec_info): Use it to free the loop masks.
24719         (can_produce_all_loop_masks_p): New function.
24720         (vect_get_max_nscalars_per_iter): Likewise.
24721         (vect_verify_full_masking): Likewise.
24722         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
24723         retries, and free the mask rgroups before retrying.  Check loop-wide
24724         reasons for disallowing fully-masked loops.  Make the final decision
24725         about whether use a fully-masked loop or not.
24726         (vect_estimate_min_profitable_iters): Do not assume that peeling
24727         for the number of iterations will be needed for fully-masked loops.
24728         (vectorizable_reduction): Disable fully-masked loops.
24729         (vectorizable_live_operation): Likewise.
24730         (vect_halve_mask_nunits): New function.
24731         (vect_double_mask_nunits): Likewise.
24732         (vect_record_loop_mask): Likewise.
24733         (vect_get_loop_mask): Likewise.
24734         (vect_transform_loop): Handle the case in which the final loop
24735         iteration might handle a partial vector.  Call vect_set_loop_condition
24736         instead of slpeel_make_loop_iterate_ntimes.
24737         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
24738         (check_load_store_masking): New function.
24739         (prepare_load_store_mask): Likewise.
24740         (vectorizable_store): Handle fully-masked loops.
24741         (vectorizable_load): Likewise.
24742         (supportable_widening_operation): Use vect_halve_mask_nunits for
24743         booleans.
24744         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
24745         (vect_gen_while): New function.
24746         * config/aarch64/aarch64.md (umax<mode>3): New expander.
24747         (aarch64_uqdec<mode>): New insn.
24749 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24750             Alan Hayward  <alan.hayward@arm.com>
24751             David Sherwood  <david.sherwood@arm.com>
24753         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
24754         (reduc_xor_scal_optab): New optabs.
24755         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
24756         (reduc_xor_scal_@var{m}): Document.
24757         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
24758         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
24759         internal functions.
24760         * fold-const-call.c (fold_const_call): Handle them.
24761         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
24762         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
24763         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
24764         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
24765         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
24766         (UNSPEC_XORV): New unspecs.
24767         (optab): Add entries for them.
24768         (BITWISEV): New int iterator.
24769         (bit_reduc_op): New int attributes.
24771 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24772             Alan Hayward  <alan.hayward@arm.com>
24773             David Sherwood  <david.sherwood@arm.com>
24775         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
24776         * internal-fn.def (VEC_SHL_INSERT): New internal function.
24777         * optabs.def (vec_shl_insert_optab): New optab.
24778         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
24779         (duplicate_and_interleave): Likewise.
24780         * tree-vect-loop.c: Include internal-fn.h.
24781         (neutral_op_for_slp_reduction): New function, split out from
24782         get_initial_defs_for_reduction.
24783         (get_initial_def_for_reduction): Handle option 2 for variable-length
24784         vectors by loading the neutral value into a vector and then shifting
24785         the initial value into element 0.
24786         (get_initial_defs_for_reduction): Replace the code argument with
24787         the neutral value calculated by neutral_op_for_slp_reduction.
24788         Use gimple_build_vector for constant-length vectors.
24789         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
24790         but the first group_size elements have a neutral value.
24791         Use duplicate_and_interleave otherwise.
24792         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
24793         Update call to get_initial_defs_for_reduction.  Handle SLP
24794         reductions for variable-length vectors by creating one vector
24795         result for each scalar result, with the elements associated
24796         with other scalar results stubbed out with the neutral value.
24797         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
24798         Require IFN_VEC_SHL_INSERT for double reductions on
24799         variable-length vectors, or SLP reductions that have
24800         a neutral value.  Require can_duplicate_and_interleave_p
24801         support for variable-length unchained SLP reductions if there
24802         is no neutral value, such as for MIN/MAX reductions.  Also require
24803         the number of vector elements to be a multiple of the number of
24804         SLP statements when doing variable-length unchained SLP reductions.
24805         Update call to vect_create_epilog_for_reduction.
24806         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
24807         and remove initial values.
24808         (duplicate_and_interleave): Make public.
24809         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
24810         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
24812 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24813             Alan Hayward  <alan.hayward@arm.com>
24814             David Sherwood  <david.sherwood@arm.com>
24816         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
24817         (can_duplicate_and_interleave_p): New function.
24818         (vect_get_and_check_slp_defs): Take the vector of statements
24819         rather than just the current one.  Remove excess parentheses.
24820         Restriction rejectinon of vect_constant_def and vect_external_def
24821         for variable-length vectors to boolean types, or types for which
24822         can_duplicate_and_interleave_p is false.
24823         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
24824         (duplicate_and_interleave): New function.
24825         (vect_get_constant_vectors): Use gimple_build_vector for
24826         constant-length vectors and suitable variable-length constant
24827         vectors.  Use duplicate_and_interleave for other variable-length
24828         vectors.  Don't defer the update when inserting new statements.
24830 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24831             Alan Hayward  <alan.hayward@arm.com>
24832             David Sherwood  <david.sherwood@arm.com>
24834         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
24835         min_profitable_iters doesn't go negative.
24837 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24838             Alan Hayward  <alan.hayward@arm.com>
24839             David Sherwood  <david.sherwood@arm.com>
24841         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
24842         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
24843         * optabs.def (vec_mask_load_lanes_optab): New optab.
24844         (vec_mask_store_lanes_optab): Likewise.
24845         * internal-fn.def (MASK_LOAD_LANES): New internal function.
24846         (MASK_STORE_LANES): Likewise.
24847         * internal-fn.c (mask_load_lanes_direct): New macro.
24848         (mask_store_lanes_direct): Likewise.
24849         (expand_mask_load_optab_fn): Handle masked operations.
24850         (expand_mask_load_lanes_optab_fn): New macro.
24851         (expand_mask_store_optab_fn): Handle masked operations.
24852         (expand_mask_store_lanes_optab_fn): New macro.
24853         (direct_mask_load_lanes_optab_supported_p): Likewise.
24854         (direct_mask_store_lanes_optab_supported_p): Likewise.
24855         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
24856         parameter.
24857         (vect_load_lanes_supported): Likewise.
24858         * tree-vect-data-refs.c (strip_conversion): New function.
24859         (can_group_stmts_p): Likewise.
24860         (vect_analyze_data_ref_accesses): Use it instead of checking
24861         for a pair of assignments.
24862         (vect_store_lanes_supported): Take a masked_p parameter.
24863         (vect_load_lanes_supported): Likewise.
24864         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
24865         vect_store_lanes_supported and vect_load_lanes_supported.
24866         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
24867         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
24868         parameter.  Don't allow gaps for masked accesses.
24869         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
24870         and vect_load_lanes_supported.
24871         (get_load_store_type): Take a masked_p parameter and update
24872         call to get_group_load_store_type.
24873         (vectorizable_store): Update call to get_load_store_type.
24874         Handle IFN_MASK_STORE_LANES.
24875         (vectorizable_load): Update call to get_load_store_type.
24876         Handle IFN_MASK_LOAD_LANES.
24878 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24879             Alan Hayward  <alan.hayward@arm.com>
24880             David Sherwood  <david.sherwood@arm.com>
24882         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
24883         modes for SVE.
24884         * config/aarch64/aarch64-protos.h
24885         (aarch64_sve_struct_memory_operand_p): Declare.
24886         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
24887         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
24888         (VPRED, vpred): Handle SVE structure modes.
24889         * config/aarch64/constraints.md (Utx): New constraint.
24890         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
24891         (aarch64_sve_struct_nonimmediate_operand): New predicates.
24892         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
24893         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
24894         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
24895         structure modes.  Split into pieces after RA.
24896         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
24897         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
24898         New patterns.
24899         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
24900         SVE structure modes.
24901         (aarch64_classify_address): Likewise.
24902         (sizetochar): Move earlier in file.
24903         (aarch64_print_operand): Handle SVE register lists.
24904         (aarch64_array_mode): New function.
24905         (aarch64_sve_struct_memory_operand_p): Likewise.
24906         (TARGET_ARRAY_MODE): Redefine.
24908 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24909             Alan Hayward  <alan.hayward@arm.com>
24910             David Sherwood  <david.sherwood@arm.com>
24912         * target.def (array_mode): New target hook.
24913         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
24914         * doc/tm.texi: Regenerate.
24915         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
24916         * hooks.c (hook_optmode_mode_uhwi_none): New function.
24917         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
24918         targetm.array_mode.
24919         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
24920         type sizes.
24922 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24923             Alan Hayward  <alan.hayward@arm.com>
24924             David Sherwood  <david.sherwood@arm.com>
24926         * fold-const.c (fold_binary_loc): Check the argument types
24927         rather than the result type when testing for a vector operation.
24929 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24931         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
24932         * doc/tm.texi: Regenerate.
24934 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24935             Alan Hayward  <alan.hayward@arm.com>
24936             David Sherwood  <david.sherwood@arm.com>
24938         * doc/invoke.texi (-msve-vector-bits=): Document new option.
24939         (sve): Document new AArch64 extension.
24940         * doc/md.texi (w): Extend the description of the AArch64
24941         constraint to include SVE vectors.
24942         (Upl, Upa): Document new AArch64 predicate constraints.
24943         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
24944         enum.
24945         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
24946         (msve-vector-bits=): New option.
24947         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
24948         SVE when these are disabled.
24949         (sve): New extension.
24950         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
24951         modes.  Adjust their number of units based on aarch64_sve_vg.
24952         (MAX_BITSIZE_MODE_ANY_MODE): Define.
24953         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
24954         aarch64_addr_query_type.
24955         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
24956         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
24957         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
24958         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
24959         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
24960         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
24961         (aarch64_simd_imm_zero_p): Delete.
24962         (aarch64_check_zero_based_sve_index_immediate): Declare.
24963         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24964         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24965         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24966         (aarch64_sve_float_mul_immediate_p): Likewise.
24967         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24968         rather than an rtx.
24969         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
24970         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
24971         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
24972         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
24973         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
24974         (aarch64_regmode_natural_size): Likewise.
24975         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
24976         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
24977         left one place.
24978         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
24979         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
24980         for VG and the SVE predicate registers.
24981         (V_ALIASES): Add a "z"-prefixed alias.
24982         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
24983         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
24984         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
24985         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
24986         (REG_CLASS_NAMES): Add entries for them.
24987         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
24988         and the predicate registers.
24989         (aarch64_sve_vg): Declare.
24990         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
24991         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
24992         (REGMODE_NATURAL_SIZE): Define.
24993         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
24994         SVE macros.
24995         * config/aarch64/aarch64.c: Include cfgrtl.h.
24996         (simd_immediate_info): Add a constructor for series vectors,
24997         and an associated step field.
24998         (aarch64_sve_vg): New variable.
24999         (aarch64_dbx_register_number): Handle VG and the predicate registers.
25000         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
25001         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
25002         (VEC_ANY_DATA, VEC_STRUCT): New constants.
25003         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
25004         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
25005         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
25006         (aarch64_get_mask_mode): New functions.
25007         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
25008         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
25009         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
25010         predicate modes and predicate registers.  Explicitly restrict
25011         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
25012         to store a vector mode if it is recognized by
25013         aarch64_classify_vector_mode.
25014         (aarch64_regmode_natural_size): New function.
25015         (aarch64_hard_regno_caller_save_mode): Return the original mode
25016         for predicates.
25017         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
25018         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
25019         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
25020         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
25021         functions.
25022         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
25023         does not overlap dest if the function is frame-related.  Handle
25024         SVE constants.
25025         (aarch64_split_add_offset): New function.
25026         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
25027         them aarch64_add_offset.
25028         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
25029         and update call to aarch64_sub_sp.
25030         (aarch64_add_cfa_expression): New function.
25031         (aarch64_expand_prologue): Pass extra temporary registers to the
25032         functions above.  Handle the case in which we need to emit new
25033         DW_CFA_expressions for registers that were originally saved
25034         relative to the stack pointer, but now have to be expressed
25035         relative to the frame pointer.
25036         (aarch64_output_mi_thunk): Pass extra temporary registers to the
25037         functions above.
25038         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
25039         IP0 and IP1 values for SVE frames.
25040         (aarch64_expand_vec_series): New function.
25041         (aarch64_expand_sve_widened_duplicate): Likewise.
25042         (aarch64_expand_sve_const_vector): Likewise.
25043         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
25044         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
25045         into the register, rather than emitting a SET directly.
25046         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
25047         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
25048         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
25049         (offset_9bit_signed_scaled_p): New functions.
25050         (aarch64_replicate_bitmask_imm): New function.
25051         (aarch64_bitmask_imm): Use it.
25052         (aarch64_cannot_force_const_mem): Reject expressions involving
25053         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
25054         (aarch64_classify_index): Handle SVE indices, by requiring
25055         a plain register index with a scale that matches the element size.
25056         (aarch64_classify_address): Handle SVE addresses.  Assert that
25057         the mode of the address is VOIDmode or an integer mode.
25058         Update call to aarch64_classify_symbol.
25059         (aarch64_classify_symbolic_expression): Update call to
25060         aarch64_classify_symbol.
25061         (aarch64_const_vec_all_in_range_p): New function.
25062         (aarch64_print_vector_float_operand): Likewise.
25063         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
25064         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
25065         and the FP immediates 1.0 and 0.5.
25066         (aarch64_print_address_internal): Handle SVE addresses.
25067         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
25068         (aarch64_regno_regclass): Handle predicate registers.
25069         (aarch64_secondary_reload): Handle big-endian reloads of SVE
25070         data modes.
25071         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
25072         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
25073         (aarch64_convert_sve_vector_bits): New function.
25074         (aarch64_override_options): Use it to handle -msve-vector-bits=.
25075         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
25076         rather than an rtx.
25077         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
25078         Handle SVE vector and predicate modes.  Accept VL-based constants
25079         that need only one temporary register, and VL offsets that require
25080         no temporary registers.
25081         (aarch64_conditional_register_usage): Mark the predicate registers
25082         as fixed if SVE isn't available.
25083         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
25084         Return true for SVE vector and predicate modes.
25085         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
25086         rather than an unsigned int.  Handle SVE modes.
25087         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
25088         SVE modes.
25089         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
25090         if SVE is enabled.
25091         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
25092         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
25093         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
25094         (aarch64_sve_float_mul_immediate_p): New functions.
25095         (aarch64_sve_valid_immediate): New function.
25096         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
25097         Explicitly reject structure modes.  Check for INDEX constants.
25098         Handle PTRUE and PFALSE constants.
25099         (aarch64_check_zero_based_sve_index_immediate): New function.
25100         (aarch64_simd_imm_zero_p): Delete.
25101         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
25102         vector modes.  Accept constants in the range of CNT[BHWD].
25103         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
25104         ask for an Advanced SIMD mode.
25105         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
25106         (aarch64_simd_vector_alignment): Handle SVE predicates.
25107         (aarch64_vectorize_preferred_vector_alignment): New function.
25108         (aarch64_simd_vector_alignment_reachable): Use it instead of
25109         the vector size.
25110         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
25111         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
25112         functions.
25113         (MAX_VECT_LEN): Delete.
25114         (expand_vec_perm_d): Add a vec_flags field.
25115         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
25116         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
25117         (aarch64_evpc_ext): Don't apply a big-endian lane correction
25118         for SVE modes.
25119         (aarch64_evpc_rev): Rename to...
25120         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
25121         (aarch64_evpc_rev_global): New function.
25122         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
25123         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
25124         MAX_VECT_LEN.
25125         (aarch64_evpc_sve_tbl): New function.
25126         (aarch64_expand_vec_perm_const_1): Update after rename of
25127         aarch64_evpc_rev.  Handle SVE permutes too, trying
25128         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
25129         than aarch64_evpc_tbl.
25130         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
25131         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
25132         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
25133         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
25134         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
25135         (aarch64_expand_sve_vcond): New functions.
25136         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
25137         of aarch64_vector_mode_p.
25138         (aarch64_dwarf_poly_indeterminate_value): New function.
25139         (aarch64_compute_pressure_classes): Likewise.
25140         (aarch64_can_change_mode_class): Likewise.
25141         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
25142         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
25143         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
25144         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
25145         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
25146         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
25147         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
25148         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
25149         constraints.
25150         (Dn, Dl, Dr): Accept const as well as const_vector.
25151         (Dz): Likewise.  Compare against CONST0_RTX.
25152         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
25153         of "vector" where appropriate.
25154         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
25155         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
25156         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
25157         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
25158         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
25159         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
25160         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
25161         (v_int_equiv): Extend to SVE modes.
25162         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
25163         mode attributes.
25164         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
25165         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
25166         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
25167         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
25168         (SVE_COND_FP_CMP): New int iterators.
25169         (perm_hilo): Handle the new unpack unspecs.
25170         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
25171         attributes.
25172         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
25173         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
25174         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
25175         (aarch64_equality_operator, aarch64_constant_vector_operand)
25176         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
25177         (aarch64_sve_nonimmediate_operand): Likewise.
25178         (aarch64_sve_general_operand): Likewise.
25179         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
25180         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
25181         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
25182         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
25183         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
25184         (aarch64_sve_float_arith_immediate): Likewise.
25185         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
25186         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
25187         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
25188         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
25189         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
25190         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
25191         (aarch64_sve_float_arith_operand): Likewise.
25192         (aarch64_sve_float_arith_with_sub_operand): Likewise.
25193         (aarch64_sve_float_mul_operand): Likewise.
25194         (aarch64_sve_vec_perm_operand): Likewise.
25195         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
25196         (aarch64_mov_operand): Accept const_poly_int and const_vector.
25197         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
25198         as well as const_vector.
25199         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
25200         in file.  Use CONST0_RTX and CONSTM1_RTX.
25201         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
25202         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
25203         Use aarch64_simd_imm_zero.
25204         * config/aarch64/aarch64-sve.md: New file.
25205         * config/aarch64/aarch64.md: Include it.
25206         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
25207         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
25208         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
25209         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
25210         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
25211         (sve): New attribute.
25212         (enabled): Disable instructions with the sve attribute unless
25213         TARGET_SVE.
25214         (movqi, movhi): Pass CONST_POLY_INT operaneds through
25215         aarch64_expand_mov_immediate.
25216         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
25217         CNT[BHSD] immediates.
25218         (movti): Split CONST_POLY_INT moves into two halves.
25219         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
25220         Split additions that need a temporary here if the destination
25221         is the stack pointer.
25222         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
25223         (*add<mode>3_poly_1): New instruction.
25224         (set_clobber_cc): New expander.
25226 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25228         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
25229         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
25230         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
25231         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
25232         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
25233         Change innermode from fixed_mode_size to machine_mode.
25234         (simplify_subreg): Update call accordingly.  Handle a constant-sized
25235         subreg of a variable-length CONST_VECTOR.
25237 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25238             Alan Hayward  <alan.hayward@arm.com>
25239             David Sherwood  <david.sherwood@arm.com>
25241         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
25242         (add_offset_to_base): New function, split out from...
25243         (create_mem_ref): ...here.  When handling a scale other than 1,
25244         check first whether the address is valid without the offset.
25245         Add it into the base if so, leaving the index and scale as-is.
25247 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
25249         PR c++/83778
25250         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
25251         fold_for_warn before checking if arg2 is INTEGER_CST.
25253 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
25255         * config/rs6000/predicates.md (load_multiple_operation): Delete.
25256         (store_multiple_operation): Delete.
25257         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
25258         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
25259         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
25260         guarded by TARGET_STRING.
25261         (rs6000_output_load_multiple): Delete.
25262         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
25263         OPTION_MASK_STRING / TARGET_STRING handling.
25264         (print_operand) <'N', 'O'>: Add comment that these are unused now.
25265         (const rs6000_opt_masks) <"string">: Change mask to 0.
25266         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
25267         (MASK_STRING): Delete.
25268         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
25269         parts.  Simplify.
25270         (load_multiple): Delete.
25271         (*ldmsi8): Delete.
25272         (*ldmsi7): Delete.
25273         (*ldmsi6): Delete.
25274         (*ldmsi5): Delete.
25275         (*ldmsi4): Delete.
25276         (*ldmsi3): Delete.
25277         (store_multiple): Delete.
25278         (*stmsi8): Delete.
25279         (*stmsi7): Delete.
25280         (*stmsi6): Delete.
25281         (*stmsi5): Delete.
25282         (*stmsi4): Delete.
25283         (*stmsi3): Delete.
25284         (movmemsi_8reg): Delete.
25285         (corresponding unnamed define_insn): Delete.
25286         (movmemsi_6reg): Delete.
25287         (corresponding unnamed define_insn): Delete.
25288         (movmemsi_4reg): Delete.
25289         (corresponding unnamed define_insn): Delete.
25290         (movmemsi_2reg): Delete.
25291         (corresponding unnamed define_insn): Delete.
25292         (movmemsi_1reg): Delete.
25293         (corresponding unnamed define_insn): Delete.
25294         * config/rs6000/rs6000.opt (mno-string): New.
25295         (mstring): Replace by deprecation warning stub.
25296         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
25298 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
25300         * regrename.c (regrename_do_replace): If replacing the same
25301         reg multiple times, try to reuse last created gen_raw_REG.
25303         PR debug/81155
25304         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
25305         main to workaround a bug in GDB.
25307 2018-01-12  Tom de Vries  <tom@codesourcery.com>
25309         PR target/83737
25310         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
25312 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
25314         PR rtl-optimization/80481
25315         * ira-color.c (get_cap_member): New function.
25316         (allocnos_conflict_by_live_ranges_p): Use it.
25317         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
25318         (setup_slot_coalesced_allocno_live_ranges): Ditto.
25320 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
25322         PR target/83628
25323         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
25324         (*saddl_se_1): Ditto.
25325         (*ssubsi_1): Ditto.
25326         (*ssubl_se_1): Ditto.
25328 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
25330         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
25331         rather than wi::to_widest for DR_INITs.
25332         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
25333         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
25334         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
25335         INTEGER_CSTs.
25336         (vect_analyze_group_access_1): Note that here.
25338 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
25340         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
25341         polynomial type sizes.
25343 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
25345         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
25346         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
25347         (gimple_add_tmp_var): Likewise.
25349 2018-01-12  Martin Liska  <mliska@suse.cz>
25351         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
25352         (gimple_alloc_sizes): Likewise.
25353         (dump_gimple_statistics): Use PRIu64 in printf format.
25354         * gimple.h: Change uint64_t to int.
25356 2018-01-12  Martin Liska  <mliska@suse.cz>
25358         * tree-core.h: Use uint64_t instead of int.
25359         * tree.c (tree_node_counts): Likewise.
25360         (tree_node_sizes): Likewise.
25361         (dump_tree_statistics): Use PRIu64 in printf format.
25363 2018-01-12  Martin Liska  <mliska@suse.cz>
25365         * Makefile.in: As qsort_chk is implemented in vec.c, add
25366         vec.o to linkage of gencfn-macros.
25367         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
25368         passing the info to record_node_allocation_statistics.
25369         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
25370         and pass the info.
25371         * ggc-common.c (struct ggc_usage): Add operator== and use
25372         it in operator< and compare function.
25373         * mem-stats.h (struct mem_usage): Likewise.
25374         * vec.c (struct vec_usage): Remove operator< and compare
25375         function. Can be simply inherited.
25377 2018-01-12  Martin Jambor  <mjambor@suse.cz>
25379         PR target/81616
25380         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
25381         * tree-ssa-math-opts.c: Include domwalk.h.
25382         (convert_mult_to_fma_1): New function.
25383         (fma_transformation_info): New type.
25384         (fma_deferring_state): Likewise.
25385         (cancel_fma_deferring): New function.
25386         (result_of_phi): Likewise.
25387         (last_fma_candidate_feeds_initial_phi): Likewise.
25388         (convert_mult_to_fma): Added deferring logic, split actual
25389         transformation to convert_mult_to_fma_1.
25390         (math_opts_dom_walker): New type.
25391         (math_opts_dom_walker::after_dom_children): New method, body moved
25392         here from pass_optimize_widening_mul::execute, added deferring logic
25393         bits.
25394         (pass_optimize_widening_mul::execute): Moved most of code to
25395         math_opts_dom_walker::after_dom_children.
25396         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
25397         * config/i386/i386.c (ix86_option_override_internal): Added
25398         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
25400 2018-01-12  Richard Biener  <rguenther@suse.de>
25402         PR debug/83157
25403         * dwarf2out.c (gen_variable_die): Do not reset old_die for
25404         inline instance vars.
25406 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
25408         PR target/81819
25409         * config/rx/rx.c (rx_is_restricted_memory_address):
25410         Handle SUBREG case.
25412 2018-01-12  Richard Biener  <rguenther@suse.de>
25414         PR tree-optimization/80846
25415         * target.def (split_reduction): New target hook.
25416         * targhooks.c (default_split_reduction): New function.
25417         * targhooks.h (default_split_reduction): Declare.
25418         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
25419         target requests first reduce vectors by combining low and high
25420         parts.
25421         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
25422         (get_vectype_for_scalar_type_and_size): Export.
25423         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
25424         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
25425         * doc/tm.texi: Regenerate.
25426         * config/i386/i386.c (ix86_split_reduction): Implement
25427         TARGET_VECTORIZE_SPLIT_REDUCTION.
25429 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
25431         PR target/83368
25432         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
25433         in PIC mode except for TARGET_VXWORKS_RTP.
25434         * config/sparc/sparc.c: Include cfgrtl.h.
25435         (TARGET_INIT_PIC_REG): Define.
25436         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
25437         (sparc_pic_register_p): New predicate.
25438         (sparc_legitimate_address_p): Use it.
25439         (sparc_legitimize_pic_address): Likewise.
25440         (sparc_delegitimize_address): Likewise.
25441         (sparc_mode_dependent_address_p): Likewise.
25442         (gen_load_pcrel_sym): Remove 4th parameter.
25443         (load_got_register): Adjust call to above.  Remove obsolete stuff.
25444         (sparc_expand_prologue): Do not call load_got_register here.
25445         (sparc_flat_expand_prologue): Likewise.
25446         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
25447         (sparc_use_pseudo_pic_reg): New function.
25448         (sparc_init_pic_reg): Likewise.
25449         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25450         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
25452 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
25454         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25455         Add item for branch_cost.
25457 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
25459         PR rtl-optimization/83565
25460         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
25461         not extend the result to a larger mode for rotate operations.
25462         (num_sign_bit_copies1): Likewise.
25464 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25466         PR target/40411
25467         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
25468         -symbolic.
25469         Use values-Xc.o for -pedantic.
25470         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
25472 2018-01-12  Martin Liska  <mliska@suse.cz>
25474         PR ipa/83054
25475         * ipa-devirt.c (final_warning_record::grow_type_warnings):
25476         New function.
25477         (possible_polymorphic_call_targets): Use it.
25478         (ipa_devirt): Likewise.
25480 2018-01-12  Martin Liska  <mliska@suse.cz>
25482         * profile-count.h (enum profile_quality): Use 0 as invalid
25483         enum value of profile_quality.
25485 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
25487         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
25488         -mext-string options.
25490 2018-01-12  Richard Biener  <rguenther@suse.de>
25492         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
25493         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
25494         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
25495         Likewise.
25496         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
25498 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
25500         * configure.ac (--with-long-double-format): Add support for the
25501         configuration option to change the default long double format on
25502         PowerPC systems.
25503         * config.gcc (powerpc*-linux*-*): Likewise.
25504         * configure: Regenerate.
25505         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
25506         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
25507         used without modification.
25509 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25511         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
25512         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
25513         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
25514         MISC_BUILTIN_SPEC_BARRIER.
25515         (rs6000_init_builtins): Likewise.
25516         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
25517         enum value.
25518         (speculation_barrier): New define_insn.
25519         * doc/extend.texi: Document __builtin_speculation_barrier.
25521 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
25523         PR target/83203
25524         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
25525         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
25526         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
25527         iterators.
25528         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
25529         integral modes instead of "ss" and "sd".
25530         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
25531         vectors with 32-bit and 64-bit elements.
25532         (vecdupssescalarmodesuffix): New mode attribute.
25533         (vec_dup<mode>): Use it.
25535 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
25537         PR target/83330
25538         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
25539         frame if argument is passed on stack.
25541 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
25543         PR target/82682
25544         * ree.c (combine_reaching_defs): Optimize also
25545         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
25546         reg2=any_extend(exp); reg1=reg2;, formatting fix.
25548 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
25550         PR middle-end/83189
25551         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
25553 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
25555         PR middle-end/83718
25556         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
25557         after they are computed.
25559 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
25561         PR tree-optimization/83695
25562         * gimple-loop-linterchange.cc
25563         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
25564         reset cached scev information after interchange.
25565         (pass_linterchange::execute): Remove call to scev_reset_htab.
25567 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25569         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
25570         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
25571         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
25572         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
25573         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
25574         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
25575         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
25576         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
25577         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
25578         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
25579         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
25580         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
25581         (V_lane_reg): Likewise.
25582         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
25583         New define_expand.
25584         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
25585         (vfmal_lane_low<mode>_intrinsic,
25586         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
25587         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
25588         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
25589         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
25590         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
25591         vfmsl_lane_high<mode>_intrinsic): New define_insns.
25593 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25595         * config/arm/arm-cpus.in (fp16fml): New feature.
25596         (ALL_SIMD): Add fp16fml.
25597         (armv8.2-a): Add fp16fml as an option.
25598         (armv8.3-a): Likewise.
25599         (armv8.4-a): Add fp16fml as part of fp16.
25600         * config/arm/arm.h (TARGET_FP16FML): Define.
25601         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
25602         when appropriate.
25603         * config/arm/arm-modes.def (V2HF): Define.
25604         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
25605         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
25606         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
25607         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
25608         vfmsl_low, vfmsl_high): New set of builtins.
25609         * config/arm/iterators.md (PLUSMINUS): New code iterator.
25610         (vfml_op): New code attribute.
25611         (VFMLHALVES): New int iterator.
25612         (VFML, VFMLSEL): New mode attributes.
25613         (V_reg): Define mapping for V2HF.
25614         (V_hi, V_lo): New mode attributes.
25615         (VF_constraint): Likewise.
25616         (vfml_half, vfml_half_selector): New int attributes.
25617         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
25618         define_expand.
25619         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
25620         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
25621         New define_insn.
25622         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
25623         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
25624         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
25625         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
25626         documentation.
25627         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
25628         Document new effective target and option set.
25630 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25632         * config/arm/arm-cpus.in (armv8_4): New feature.
25633         (ARMv8_4a): New fgroup.
25634         (armv8.4-a): New arch.
25635         * config/arm/arm-tables.opt: Regenerate.
25636         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
25637         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
25638         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
25639         Add matching rules for -march=armv8.4-a and extensions.
25640         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
25642 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
25644         PR target/81821
25645         * config/rx/rx.md (BW): New mode attribute.
25646         (sync_lock_test_and_setsi): Add mode suffix to insn output.
25648 2018-01-11  Richard Biener  <rguenther@suse.de>
25650         PR tree-optimization/83435
25651         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
25652         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
25653         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
25655 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25656             Alan Hayward  <alan.hayward@arm.com>
25657             David Sherwood  <david.sherwood@arm.com>
25659         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
25660         field.
25661         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
25662         (aarch64_print_address_internal): Use it to check for a zero offset.
25664 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25665             Alan Hayward  <alan.hayward@arm.com>
25666             David Sherwood  <david.sherwood@arm.com>
25668         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
25669         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
25670         Return a poly_int64 rather than a HOST_WIDE_INT.
25671         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
25672         rather than a HOST_WIDE_INT.
25673         * config/aarch64/aarch64.h (aarch64_frame): Protect with
25674         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
25675         hard_fp_offset, frame_size, initial_adjust, callee_offset and
25676         final_offset from HOST_WIDE_INT to poly_int64.
25677         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
25678         to_constant when getting the number of units in an Advanced SIMD
25679         mode.
25680         (aarch64_builtin_vectorized_function): Check for a constant number
25681         of units.
25682         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
25683         GET_MODE_SIZE.
25684         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
25685         attribute instead of GET_MODE_NUNITS.
25686         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
25687         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
25688         GET_MODE_SIZE for fixed-size registers.
25689         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
25690         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
25691         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
25692         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
25693         (aarch64_print_operand, aarch64_print_address_internal)
25694         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
25695         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
25696         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
25697         Handle polynomial GET_MODE_SIZE.
25698         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
25699         wider than SImode without modification.
25700         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
25701         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
25702         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
25703         passing and returning SVE modes.
25704         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
25705         rather than GEN_INT.
25706         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
25707         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
25708         (aarch64_allocate_and_probe_stack_space): Likewise.
25709         (aarch64_layout_frame): Cope with polynomial offsets.
25710         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
25711         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
25712         polynomial offsets.
25713         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
25714         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
25715         poly_int64 rather than a HOST_WIDE_INT.
25716         (aarch64_get_separate_components, aarch64_process_components)
25717         (aarch64_expand_prologue, aarch64_expand_epilogue)
25718         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
25719         (aarch64_anchor_offset): New function, split out from...
25720         (aarch64_legitimize_address): ...here.
25721         (aarch64_builtin_vectorization_cost): Handle polynomial
25722         TYPE_VECTOR_SUBPARTS.
25723         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
25724         GET_MODE_NUNITS.
25725         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
25726         number of elements from the PARALLEL rather than the mode.
25727         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
25728         rather than GET_MODE_BITSIZE.
25729         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
25730         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
25731         (aarch64_expand_vec_perm_const_1): Handle polynomial
25732         d->perm.length () and d->perm elements.
25733         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
25734         Apply to_constant to d->perm elements.
25735         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
25736         polynomial CONST_VECTOR_NUNITS.
25737         (aarch64_move_pointer): Take amount as a poly_int64 rather
25738         than an int.
25739         (aarch64_progress_pointer): Avoid temporary variable.
25740         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
25741         the mode attribute instead of GET_MODE.
25743 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25744             Alan Hayward  <alan.hayward@arm.com>
25745             David Sherwood  <david.sherwood@arm.com>
25747         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
25748         x exists before using it.
25749         (aarch64_add_constant_internal): Rename to...
25750         (aarch64_add_offset_1): ...this.  Replace regnum with separate
25751         src and dest rtxes.  Handle the case in which they're different,
25752         including when the offset is zero.  Replace scratchreg with an rtx.
25753         Use 2 additions if there is no spare register into which we can
25754         move a 16-bit constant.
25755         (aarch64_add_constant): Delete.
25756         (aarch64_add_offset): Replace reg with separate src and dest
25757         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
25758         Use aarch64_add_offset_1.
25759         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
25760         an rtx rather than an int.  Take the delta as a poly_int64
25761         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
25762         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
25763         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
25764         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
25765         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
25766         and aarch64_add_sp.
25767         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
25768         aarch64_add_constant.
25770 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25772         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
25773         Use scalar_float_mode.
25775 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25777         * config/aarch64/aarch64-simd.md
25778         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
25779         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
25780         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
25781         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
25782         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
25783         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
25784         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
25785         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
25786         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
25787         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
25789 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
25791         PR target/83514
25792         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
25793         targ_options->x_arm_arch_string is non NULL.
25795 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
25797         * config/aarch64/aarch64.h
25798         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
25800 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
25802         PR target/82096
25803         * expmed.c (emit_store_flag_force): Swap if const op0
25804         and change VOIDmode to mode of op0.
25806 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25808         PR rtl-optimization/83761
25809         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
25810         than bytes to mode_for_size.
25812 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
25814         PR middle-end/83189
25815         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
25816         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
25817         profile.
25819 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
25821         PR middle-end/83575
25822         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
25823         when in layout mode.
25824         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
25825         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
25826         partition fixup.
25828 2018-01-10  Michael Collison  <michael.collison@arm.com>
25830         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
25831         * config/aarch64/aarch64-option-extension.def: Add
25832         AARCH64_OPT_EXTENSION of 'fp16fml'.
25833         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25834         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
25835         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
25836         * config/aarch64/constraints.md (Ui7): New constraint.
25837         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
25838         (VFMLA_SEL_W): Ditto.
25839         (f16quad): Ditto.
25840         (f16mac1): Ditto.
25841         (VFMLA16_LOW): New int iterator.
25842         (VFMLA16_HIGH): Ditto.
25843         (UNSPEC_FMLAL): New unspec.
25844         (UNSPEC_FMLSL): Ditto.
25845         (UNSPEC_FMLAL2): Ditto.
25846         (UNSPEC_FMLSL2): Ditto.
25847         (f16mac): New code attribute.
25848         * config/aarch64/aarch64-simd-builtins.def
25849         (aarch64_fmlal_lowv2sf): Ditto.
25850         (aarch64_fmlsl_lowv2sf): Ditto.
25851         (aarch64_fmlalq_lowv4sf): Ditto.
25852         (aarch64_fmlslq_lowv4sf): Ditto.
25853         (aarch64_fmlal_highv2sf): Ditto.
25854         (aarch64_fmlsl_highv2sf): Ditto.
25855         (aarch64_fmlalq_highv4sf): Ditto.
25856         (aarch64_fmlslq_highv4sf): Ditto.
25857         (aarch64_fmlal_lane_lowv2sf): Ditto.
25858         (aarch64_fmlsl_lane_lowv2sf): Ditto.
25859         (aarch64_fmlal_laneq_lowv2sf): Ditto.
25860         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
25861         (aarch64_fmlalq_lane_lowv4sf): Ditto.
25862         (aarch64_fmlsl_lane_lowv4sf): Ditto.
25863         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
25864         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
25865         (aarch64_fmlal_lane_highv2sf): Ditto.
25866         (aarch64_fmlsl_lane_highv2sf): Ditto.
25867         (aarch64_fmlal_laneq_highv2sf): Ditto.
25868         (aarch64_fmlsl_laneq_highv2sf): Ditto.
25869         (aarch64_fmlalq_lane_highv4sf): Ditto.
25870         (aarch64_fmlsl_lane_highv4sf): Ditto.
25871         (aarch64_fmlalq_laneq_highv4sf): Ditto.
25872         (aarch64_fmlsl_laneq_highv4sf): Ditto.
25873         * config/aarch64/aarch64-simd.md:
25874         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
25875         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25876         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
25877         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25878         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
25879         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
25880         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
25881         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
25882         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
25883         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
25884         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
25885         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
25886         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
25887         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
25888         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
25889         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
25890         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
25891         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
25892         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
25893         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
25894         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
25895         (vfmlsl_low_u32): Ditto.
25896         (vfmlalq_low_u32): Ditto.
25897         (vfmlslq_low_u32): Ditto.
25898         (vfmlal_high_u32): Ditto.
25899         (vfmlsl_high_u32): Ditto.
25900         (vfmlalq_high_u32): Ditto.
25901         (vfmlslq_high_u32): Ditto.
25902         (vfmlal_lane_low_u32): Ditto.
25903         (vfmlsl_lane_low_u32): Ditto.
25904         (vfmlal_laneq_low_u32): Ditto.
25905         (vfmlsl_laneq_low_u32): Ditto.
25906         (vfmlalq_lane_low_u32): Ditto.
25907         (vfmlslq_lane_low_u32): Ditto.
25908         (vfmlalq_laneq_low_u32): Ditto.
25909         (vfmlslq_laneq_low_u32): Ditto.
25910         (vfmlal_lane_high_u32): Ditto.
25911         (vfmlsl_lane_high_u32): Ditto.
25912         (vfmlal_laneq_high_u32): Ditto.
25913         (vfmlsl_laneq_high_u32): Ditto.
25914         (vfmlalq_lane_high_u32): Ditto.
25915         (vfmlslq_lane_high_u32): Ditto.
25916         (vfmlalq_laneq_high_u32): Ditto.
25917         (vfmlslq_laneq_high_u32): Ditto.
25918         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
25919         (AARCH64_FL_FOR_ARCH8_4): New.
25920         (AARCH64_ISA_F16FML): New ISA flag.
25921         (TARGET_F16FML): New feature flag for fp16fml.
25922         (doc/invoke.texi): Document new fp16fml option.
25924 2018-01-10  Michael Collison  <michael.collison@arm.com>
25926         * config/aarch64/aarch64-builtins.c:
25927         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
25928         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25929         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
25930         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
25931         (AARCH64_ISA_SHA3): New ISA flag.
25932         (TARGET_SHA3): New feature flag for sha3.
25933         * config/aarch64/iterators.md (sha512_op): New int attribute.
25934         (CRYPTO_SHA512): New int iterator.
25935         (UNSPEC_SHA512H): New unspec.
25936         (UNSPEC_SHA512H2): Ditto.
25937         (UNSPEC_SHA512SU0): Ditto.
25938         (UNSPEC_SHA512SU1): Ditto.
25939         * config/aarch64/aarch64-simd-builtins.def
25940         (aarch64_crypto_sha512hqv2di): New builtin.
25941         (aarch64_crypto_sha512h2qv2di): Ditto.
25942         (aarch64_crypto_sha512su0qv2di): Ditto.
25943         (aarch64_crypto_sha512su1qv2di): Ditto.
25944         (aarch64_eor3qv8hi): Ditto.
25945         (aarch64_rax1qv2di): Ditto.
25946         (aarch64_xarqv2di): Ditto.
25947         (aarch64_bcaxqv8hi): Ditto.
25948         * config/aarch64/aarch64-simd.md:
25949         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
25950         (aarch64_crypto_sha512su0qv2di): Ditto.
25951         (aarch64_crypto_sha512su1qv2di): Ditto.
25952         (aarch64_eor3qv8hi): Ditto.
25953         (aarch64_rax1qv2di): Ditto.
25954         (aarch64_xarqv2di): Ditto.
25955         (aarch64_bcaxqv8hi): Ditto.
25956         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
25957         (vsha512h2q_u64): Ditto.
25958         (vsha512su0q_u64): Ditto.
25959         (vsha512su1q_u64): Ditto.
25960         (veor3q_u16): Ditto.
25961         (vrax1q_u64): Ditto.
25962         (vxarq_u64): Ditto.
25963         (vbcaxq_u16): Ditto.
25964         * config/arm/types.md (crypto_sha512): New type attribute.
25965         (crypto_sha3): Ditto.
25966         (doc/invoke.texi): Document new sha3 option.
25968 2018-01-10  Michael Collison  <michael.collison@arm.com>
25970         * config/aarch64/aarch64-builtins.c:
25971         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
25972         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25973         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
25974         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
25975         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
25976         (AARCH64_ISA_SM4): New ISA flag.
25977         (TARGET_SM4): New feature flag for sm4.
25978         * config/aarch64/aarch64-simd-builtins.def
25979         (aarch64_sm3ss1qv4si): Ditto.
25980         (aarch64_sm3tt1aq4si): Ditto.
25981         (aarch64_sm3tt1bq4si): Ditto.
25982         (aarch64_sm3tt2aq4si): Ditto.
25983         (aarch64_sm3tt2bq4si): Ditto.
25984         (aarch64_sm3partw1qv4si): Ditto.
25985         (aarch64_sm3partw2qv4si): Ditto.
25986         (aarch64_sm4eqv4si): Ditto.
25987         (aarch64_sm4ekeyqv4si): Ditto.
25988         * config/aarch64/aarch64-simd.md:
25989         (aarch64_sm3ss1qv4si): Ditto.
25990         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
25991         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
25992         (aarch64_sm4eqv4si): Ditto.
25993         (aarch64_sm4ekeyqv4si): Ditto.
25994         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
25995         (sm3part_op): Ditto.
25996         (CRYPTO_SM3TT): Ditto.
25997         (CRYPTO_SM3PART): Ditto.
25998         (UNSPEC_SM3SS1): New unspec.
25999         (UNSPEC_SM3TT1A): Ditto.
26000         (UNSPEC_SM3TT1B): Ditto.
26001         (UNSPEC_SM3TT2A): Ditto.
26002         (UNSPEC_SM3TT2B): Ditto.
26003         (UNSPEC_SM3PARTW1): Ditto.
26004         (UNSPEC_SM3PARTW2): Ditto.
26005         (UNSPEC_SM4E): Ditto.
26006         (UNSPEC_SM4EKEY): Ditto.
26007         * config/aarch64/constraints.md (Ui2): New constraint.
26008         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
26009         * config/arm/types.md (crypto_sm3): New type attribute.
26010         (crypto_sm4): Ditto.
26011         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
26012         (vsm3tt1aq_u32): Ditto.
26013         (vsm3tt1bq_u32): Ditto.
26014         (vsm3tt2aq_u32): Ditto.
26015         (vsm3tt2bq_u32): Ditto.
26016         (vsm3partw1q_u32): Ditto.
26017         (vsm3partw2q_u32): Ditto.
26018         (vsm4eq_u32): Ditto.
26019         (vsm4ekeyq_u32): Ditto.
26020         (doc/invoke.texi): Document new sm4 option.
26022 2018-01-10  Michael Collison  <michael.collison@arm.com>
26024         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
26025         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
26026         (AARCH64_FL_FOR_ARCH8_4): New.
26027         (AARCH64_FL_V8_4): New flag.
26028         (doc/invoke.texi): Document new armv8.4-a option.
26030 2018-01-10  Michael Collison  <michael.collison@arm.com>
26032         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26033         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
26034         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
26035         * config/aarch64/aarch64-option-extension.def: Add
26036         AARCH64_OPT_EXTENSION of 'sha2'.
26037         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
26038         (crypto): Disable sha2 and aes if crypto disabled.
26039         (crypto): Enable aes and sha2 if enabled.
26040         (simd): Disable sha2 and aes if simd disabled.
26041         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
26042         New flags.
26043         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
26044         (TARGET_SHA2): New feature flag for sha2.
26045         (TARGET_AES): New feature flag for aes.
26046         * config/aarch64/aarch64-simd.md:
26047         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
26048         conditional on TARGET_AES.
26049         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
26050         (aarch64_crypto_sha1hsi): Make pattern conditional
26051         on TARGET_SHA2.
26052         (aarch64_crypto_sha1hv4si): Ditto.
26053         (aarch64_be_crypto_sha1hv4si): Ditto.
26054         (aarch64_crypto_sha1su1v4si): Ditto.
26055         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
26056         (aarch64_crypto_sha1su0v4si): Ditto.
26057         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
26058         (aarch64_crypto_sha256su0v4si): Ditto.
26059         (aarch64_crypto_sha256su1v4si): Ditto.
26060         (doc/invoke.texi): Document new aes and sha2 options.
26062 2018-01-10  Martin Sebor  <msebor@redhat.com>
26064         PR tree-optimization/83781
26065         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
26066         as string arrays.
26068 2018-01-11  Martin Sebor  <msebor@gmail.com>
26069             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26071         PR tree-optimization/83501
26072         PR tree-optimization/81703
26074         * tree-ssa-strlen.c (get_string_cst): Rename...
26075         (get_string_len): ...to this.  Handle global constants.
26076         (handle_char_store): Adjust.
26078 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
26079             Jim Wilson  <jimw@sifive.com>
26081         * config/riscv/riscv-protos.h (riscv_output_return): New.
26082         * config/riscv/riscv.c (struct machine_function): New naked_p field.
26083         (riscv_attribute_table, riscv_output_return),
26084         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
26085         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
26086         (riscv_compute_frame_info): Only compute frame->mask if not a naked
26087         function.
26088         (riscv_expand_prologue): Add early return for naked function.
26089         (riscv_expand_epilogue): Likewise.
26090         (riscv_function_ok_for_sibcall): Return false for naked function.
26091         (riscv_set_current_function): New.
26092         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
26093         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
26094         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
26095         * doc/extend.texi (RISC-V Function Attributes): New.
26097 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
26099         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
26100         check for 128-bit long double before checking TCmode.
26101         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
26102         128-bit long doubles before checking TFmode or TCmode.
26103         (FLOAT128_IBM_P): Likewise.
26105 2018-01-10  Martin Sebor  <msebor@redhat.com>
26107         PR tree-optimization/83671
26108         * builtins.c (c_strlen): Unconditionally return zero for the empty
26109         string.
26110         Use -Warray-bounds for warnings.
26111         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
26112         for non-constant array indices with COMPONENT_REF, arrays of
26113         arrays, and pointers to arrays.
26114         (gimple_fold_builtin_strlen): Determine and set length range for
26115         non-constant character arrays.
26117 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
26119         PR middle-end/81897
26120         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
26121         empty blocks.
26123 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
26125         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
26127 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
26129         PR target/83399
26130         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
26131         VECTOR_MEM_ALTIVEC_OR_VSX_P.
26132         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
26133         indexed_or_indirect_operand predicate.
26134         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
26135         (*vsx_le_perm_load_v8hi): Likewise.
26136         (*vsx_le_perm_load_v16qi): Likewise.
26137         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
26138         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
26139         (*vsx_le_perm_store_v8hi): Likewise.
26140         (*vsx_le_perm_store_v16qi): Likewise.
26141         (eight unnamed splitters): Likewise.
26143 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
26145         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
26146         * config/rs6000/emmintrin.h: Likewise.
26147         * config/rs6000/mmintrin.h: Likewise.
26148         * config/rs6000/xmmintrin.h: Likewise.
26150 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
26152         PR c++/43486
26153         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
26154         "public_flag".
26155         * tree.c (tree_nop_conversion): Return true for location wrapper
26156         nodes.
26157         (maybe_wrap_with_location): New function.
26158         (selftest::check_strip_nops): New function.
26159         (selftest::test_location_wrappers): New function.
26160         (selftest::tree_c_tests): Call it.
26161         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
26162         (maybe_wrap_with_location): New decl.
26163         (EXPR_LOCATION_WRAPPER_P): New macro.
26164         (location_wrapper_p): New inline function.
26165         (tree_strip_any_location_wrapper): New inline function.
26167 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
26169         PR target/83735
26170         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
26171         stack_realign_offset for the largest alignment of stack slot
26172         actually used.
26173         (ix86_find_max_used_stack_alignment): New function.
26174         (ix86_finalize_stack_frame_flags): Use it.  Set
26175         max_used_stack_alignment if we don't realign stack.
26176         * config/i386/i386.h (machine_function): Add
26177         max_used_stack_alignment.
26179 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
26181         * config/arm/arm.opt (-mbranch-cost): New option.
26182         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
26183         account.
26185 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
26187         PR target/83629
26188         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
26189         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
26191 2018-01-10  Richard Biener  <rguenther@suse.de>
26193         PR debug/83765
26194         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
26195         early out so it also covers the case where we have a non-NULL
26196         origin.
26198 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
26200         PR tree-optimization/83753
26201         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
26202         for non-strided grouped accesses if the number of elements is 1.
26204 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
26206         PR target/81616
26207         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
26208         * i386.h (TARGET_USE_GATHER): Define.
26209         * x86-tune.def (X86_TUNE_USE_GATHER): New.
26211 2018-01-10  Martin Liska  <mliska@suse.cz>
26213         PR bootstrap/82831
26214         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
26215         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
26216         partitioning.
26217         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
26218         CLEANUP_NO_PARTITIONING is not set.
26220 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
26222         * doc/rtl.texi: Remove documentation of (const ...) wrappers
26223         for vectors, as a partial revert of r254296.
26224         * rtl.h (const_vec_p): Delete.
26225         (const_vec_duplicate_p): Don't test for vector CONSTs.
26226         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
26227         * expmed.c (make_tree): Likewise.
26229         Revert:
26230         * common.md (E, F): Use CONSTANT_P instead of checking for
26231         CONST_VECTOR.
26232         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
26233         checking for CONST_VECTOR.
26235 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
26237         PR middle-end/83575
26238         * predict.c (force_edge_cold): Handle in more sane way edges
26239         with no prediction.
26241 2018-01-09  Carl Love  <cel@us.ibm.com>
26243         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
26244         V4SI, V4SF types.
26245         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
26246         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
26247         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
26248         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
26249         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
26250         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
26251         * config/rs6000/rs6000-protos.h: Add extern defition for
26252         rs6000_generate_float2_double_code.
26253         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
26254         function.
26255         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
26256         (float2_v2df): Add define_expand.
26258 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
26260         PR target/83628
26261         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
26262         op_mode in the force_to_mode call.
26264 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
26266         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
26267         instead of checking each element individually.
26268         (aarch64_evpc_uzp): Likewise.
26269         (aarch64_evpc_zip): Likewise.
26270         (aarch64_evpc_ext): Likewise.
26271         (aarch64_evpc_rev): Likewise.
26272         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
26273         instead of checking each element individually.  Return true without
26274         generating rtl if
26275         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
26276         whether all selected elements come from the same input, instead of
26277         checking each element individually.  Remove calls to gen_rtx_REG,
26278         start_sequence and end_sequence and instead assert that no rtl is
26279         generated.
26281 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
26283         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
26284         order of HIGH and CONST checks.
26286 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
26288         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
26289         if the destination isn't an SSA_NAME.
26291 2018-01-09  Richard Biener  <rguenther@suse.de>
26293         PR tree-optimization/83668
26294         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
26295         move prologue...
26296         (canonicalize_loop_form): ... here, renamed from ...
26297         (canonicalize_loop_closed_ssa_form): ... this and amended to
26298         swap successor edges for loop exit blocks to make us use
26299         the RPO order we need for initial schedule generation.
26301 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
26303         PR tree-optimization/64811
26304         * match.pd: When optimizing comparisons with Inf, avoid
26305         introducing or losing exceptions from comparisons with NaN.
26307 2018-01-09  Martin Liska  <mliska@suse.cz>
26309         PR sanitizer/82517
26310         * asan.c (shadow_mem_size): Add gcc_assert.
26312 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
26314         Don't save registers in main().
26316         PR target/83738
26317         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
26318         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
26319         * config/avr/avr.c (avr_set_current_function): Don't error if
26320         naked, OS_task or OS_main are specified at the same time.
26321         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
26322         OS_main.
26323         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
26324         attribute.
26325         * common/config/avr/avr-common.c (avr_option_optimization_table):
26326         Switch on -mmain-is-OS_task for optimizing compilations.
26328 2018-01-09  Richard Biener  <rguenther@suse.de>
26330         PR tree-optimization/83572
26331         * graphite.c: Include cfganal.h.
26332         (graphite_transform_loops): Connect infinite loops to exit
26333         and remove fake edges at the end.
26335 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
26337         * ipa-inline.c (edge_badness): Revert accidental checkin.
26339 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
26341         PR ipa/80763
26342         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
26343         symbols; not inline clones.
26345 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
26347         PR target/83507
26348         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
26349         hard registers.  Formatting fixes.
26351         PR preprocessor/83722
26352         * gcc.c (try_generate_repro): Pass
26353         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
26354         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
26355         do_report_bug.
26357 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
26358             Kito Cheng  <kito.cheng@gmail.com>
26360         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
26361         (riscv_leaf_function_p): Delete.
26362         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
26364 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26366         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
26367         function.
26368         (do_ifelse): New function.
26369         (do_isel): New function.
26370         (do_sub3): New function.
26371         (do_add3): New function.
26372         (do_load_mask_compare): New function.
26373         (do_overlap_load_compare): New function.
26374         (expand_compare_loop): New function.
26375         (expand_block_compare): Call expand_compare_loop() when appropriate.
26376         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
26377         option description.
26378         (-mblock-compare-inline-loop-limit): New option.
26380 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26382         PR target/83677
26383         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
26384         Reverse order of second and third operands in first alternative.
26385         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
26386         of first and second elements in UNSPEC_VPERMR vector.
26387         (altivec_expand_vec_perm_le): Likewise.
26389 2018-01-08  Jeff Law  <law@redhat.com>
26391         PR rtl-optimizatin/81308
26392         * tree-switch-conversion.c (cfg_altered): New file scoped static.
26393         (process_switch): If group_case_labels makes a change, then set
26394         cfg_altered.
26395         (pass_convert_switch::execute): If a switch is converted, then
26396         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
26398         PR rtl-optimization/81308
26399         * recog.c (split_all_insns): Conditionally cleanup the CFG after
26400         splitting insns.
26402 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
26404         PR target/83663 - Revert r255946
26405         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
26406         generation for cases where splatting a value is not useful.
26407         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
26408         across a vec_duplicate and a paradoxical subreg forming a vector
26409         mode to a vec_concat.
26411 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26413         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
26414         -march=armv8.3-a variants.
26415         * config/arm/t-multilib: Likewise.
26416         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
26418 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26420         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
26421         to generate rtl.
26422         (cceq_ior_compare_complement): Give it a name so I can use it, and
26423         change boolean_or_operator predicate to boolean_operator so it can
26424         be used to generate a crand.
26425         (eqne): New code iterator.
26426         (bd/bd_neg): New code_attrs.
26427         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
26428         a single define_insn.
26429         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
26430         decrement (bdnzt/bdnzf/bdzt/bdzf).
26431         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
26432         with the new names of the branch decrement patterns, and added the
26433         names of the branch decrement conditional patterns.
26435 2018-01-08  Richard Biener  <rguenther@suse.de>
26437         PR tree-optimization/83563
26438         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
26439         cache.
26441 2018-01-08  Richard Biener  <rguenther@suse.de>
26443         PR middle-end/83713
26444         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
26446 2018-01-08  Richard Biener  <rguenther@suse.de>
26448         PR tree-optimization/83685
26449         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
26450         references to abnormals.
26452 2018-01-08  Richard Biener  <rguenther@suse.de>
26454         PR lto/83719
26455         * dwarf2out.c (output_indirect_strings): Handle empty
26456         skeleton_debug_str_hash.
26457         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
26459 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
26461         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
26462         (emit_store_direct): Likewise.
26463         (arc_trampoline_adjust_address): Likewise.
26464         (arc_asm_trampoline_template): New function.
26465         (arc_initialize_trampoline): Use asm_trampoline_template.
26466         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
26467         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
26468         * config/arc/arc.md (flush_icache): Delete pattern.
26470 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
26472         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
26473         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
26474         munaligned-access.
26476 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26478         PR target/83681
26479         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
26480         by not USED_FOR_TARGET.
26481         (make_pass_resolve_sw_modes): Likewise.
26483 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26485         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
26486         USED_FOR_TARGET.
26488 2018-01-08  Richard Biener  <rguenther@suse.de>
26490         PR middle-end/83580
26491         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
26493 2018-01-08  Richard Biener  <rguenther@suse.de>
26495         PR middle-end/83517
26496         * match.pd ((t * 2) / 2) -> t): Add missing :c.
26498 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
26500         PR middle-end/81897
26501         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
26502         basic blocks with a small number of successors.
26503         (convert_control_dep_chain_into_preds): Improve handling of
26504         forwarder blocks.
26505         (dump_predicates): Split apart into...
26506         (dump_pred_chain): ...here...
26507         (dump_pred_info): ...and here.
26508         (can_one_predicate_be_invalidated_p): Add debugging printfs.
26509         (can_chain_union_be_invalidated_p): Improve check for invalidation
26510         of paths.
26511         (uninit_uses_cannot_happen): Avoid unnecessary if
26512         convert_control_dep_chain_into_preds yielded nothing.
26514 2018-01-06  Martin Sebor  <msebor@redhat.com>
26516         PR tree-optimization/83640
26517         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
26518         subtracting negative offset from size.
26519         (builtin_access::overlap): Adjust offset bounds of the access to fall
26520         within the size of the object if possible.
26522 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
26524         PR rtl-optimization/83699
26525         * expmed.c (extract_bit_field_1): Restrict the vector usage of
26526         extract_bit_field_as_subreg to cases in which the extracted
26527         value is also a vector.
26529         * lra-constraints.c (process_alt_operands): Test for the equivalence
26530         substitutions when detecting a possible reload cycle.
26532 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
26534         PR debug/83480
26535         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
26536         by default if flag_selective_schedling{,2}.  Formatting fixes.
26538         PR rtl-optimization/83682
26539         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
26540         if it has non-VECTOR_MODE element mode.
26541         (vec_duplicate_p): Likewise.
26543         PR middle-end/83694
26544         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
26545         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
26547 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
26549         PR target/83604
26550         * config/i386/i386-builtin.def
26551         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
26552         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
26553         Require also OPTION_MASK_ISA_AVX512F in addition to
26554         OPTION_MASK_ISA_GFNI.
26555         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
26556         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
26557         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
26558         to OPTION_MASK_ISA_GFNI.
26559         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
26560         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
26561         OPTION_MASK_ISA_AVX512BW.
26562         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
26563         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
26564         addition to OPTION_MASK_ISA_GFNI.
26565         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
26566         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
26567         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
26568         to OPTION_MASK_ISA_GFNI.
26569         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
26570         a requirement for all ISAs rather than any of them with a few
26571         exceptions.
26572         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
26573         processing.
26574         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
26575         bitmasks to be enabled with 3 exceptions, instead of requiring any
26576         enabled ISA with lots of exceptions.
26577         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
26578         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
26579         Change avx512bw in isa attribute to avx512f.
26580         * config/i386/sgxintrin.h: Add license boilerplate.
26581         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
26582         to __AVX512F__ and __AVX512VL to __AVX512VL__.
26583         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
26584         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
26585         defined.
26586         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
26587         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
26588         temporarily sse2 rather than sse if not enabled already.
26590         PR target/83604
26591         * config/i386/sse.md (VI248_VLBW): Rename to ...
26592         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
26593         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
26594         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
26595         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
26596         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
26597         mode iterator instead of VI248_VLBW.
26599 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
26601         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
26602         (record_modified): Skip clobbers; add debug output.
26603         (param_change_prob): Use sreal frequencies.
26605 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
26607         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
26608         punt for user-aligned variables.
26610 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
26612         * tree-chrec.c (chrec_contains_symbols): Return true for
26613         POLY_INT_CST.
26615 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
26617         PR target/82439
26618         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
26619         of (x|y) == x for BICS pattern.
26621 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
26623         PR tree-optimization/83605
26624         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
26625         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
26626         can throw.
26628 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26630         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
26631         * config/epiphany/rtems.h: New file.
26633 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26634             Uros Bizjak  <ubizjak@gmail.com>
26636         PR target/83554
26637         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
26638         QIreg_operand instead of register_operand predicate.
26639         * config/i386/i386.c (ix86_rop_should_change_byte_p,
26640         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
26641         comments instead of -fmitigate[-_]rop.
26643 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26645         PR bootstrap/81926
26646         * cgraphunit.c (symbol_table::compile): Switch to text_section
26647         before calling assembly_start debug hook.
26648         * run-rtl-passes.c (run_rtl_passes): Likewise.
26649         Include output.h.
26651 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26653         * tree-vrp.c (extract_range_from_binary_expr_1): Check
26654         range_int_cst_p rather than !symbolic_range_p before calling
26655         extract_range_from_multiplicative_op_1.
26657 2018-01-04  Jeff Law  <law@redhat.com>
26659         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
26660         redundant test in assertion.
26662 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26664         * doc/rtl.texi: Document machine_mode wrapper classes.
26666 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26668         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
26669         using tree_to_uhwi.
26671 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26673         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
26674         the VEC_PERM_EXPR fold to fail.
26676 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26678         PR debug/83585
26679         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
26680         to switched_sections.
26682 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26684         PR target/83680
26685         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
26686         test for d.testing.
26688 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
26690         PR target/83387
26691         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
26692         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
26694 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26696         PR debug/83666
26697         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
26698         is BLKmode and bitpos not zero or mode change is needed.
26700 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26702         PR target/83675
26703         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
26704         TARGET_VIS2.
26706 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
26708         PR target/83628
26709         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
26710         instead of MULT rtx.  Update all corresponding splitters.
26711         (*saddl_se): Ditto.
26712         (*ssub<modesuffix>): Ditto.
26713         (*ssubl_se): Ditto.
26714         (*cmp_sadd_di): Update split patterns.
26715         (*cmp_sadd_si): Ditto.
26716         (*cmp_sadd_sidi): Ditto.
26717         (*cmp_ssub_di): Ditto.
26718         (*cmp_ssub_si): Ditto.
26719         (*cmp_ssub_sidi): Ditto.
26720         * config/alpha/predicates.md (const23_operand): New predicate.
26721         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
26722         Look for ASHIFT, not MULT inner operand.
26723         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
26725 2018-01-04  Martin Liska  <mliska@suse.cz>
26727         PR gcov-profile/83669
26728         * gcov.c (output_intermediate_file): Add version to intermediate
26729         gcov file.
26730         * doc/gcov.texi: Document new field 'version' in intermediate
26731         file format. Fix location of '-k' option of gcov command.
26733 2018-01-04  Martin Liska  <mliska@suse.cz>
26735         PR ipa/82352
26736         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
26738 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26740         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
26742 2018-01-03  Martin Sebor  <msebor@redhat.com>
26744         PR tree-optimization/83655
26745         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
26746         checking calls with invalid arguments.
26748 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26750         * tree-vect-stmts.c (vect_get_store_rhs): New function.
26751         (vectorizable_mask_load_store): Delete.
26752         (vectorizable_call): Return false for masked loads and stores.
26753         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
26754         instead of gimple_assign_rhs1.
26755         (vectorizable_load): Handle IFN_MASK_LOAD.
26756         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
26758 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26760         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
26761         split out from..,
26762         (vectorizable_mask_load_store): ...here.
26763         (vectorizable_load): ...and here.
26765 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26767         * tree-vect-stmts.c (vect_build_all_ones_mask)
26768         (vect_build_zero_merge_argument): New functions, split out from...
26769         (vectorizable_load): ...here.
26771 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26773         * tree-vect-stmts.c (vect_check_store_rhs): New function,
26774         split out from...
26775         (vectorizable_mask_load_store): ...here.
26776         (vectorizable_store): ...and here.
26778 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26780         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
26781         split out from...
26782         (vectorizable_mask_load_store): ...here.
26784 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26786         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
26787         (vect_model_store_cost): Take a vec_load_store_type instead of a
26788         vect_def_type.
26789         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
26790         (vect_model_store_cost): Take a vec_load_store_type instead of a
26791         vect_def_type.
26792         (vectorizable_mask_load_store): Update accordingly.
26793         (vectorizable_store): Likewise.
26794         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
26796 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26798         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
26799         IFN_MASK_LOAD calls here rather than...
26800         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
26802 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26803             Alan Hayward  <alan.hayward@arm.com>
26804             David Sherwood  <david.sherwood@arm.com>
26806         * expmed.c (extract_bit_field_1): For vector extracts,
26807         fall back to extract_bit_field_as_subreg if vec_extract
26808         isn't available.
26810 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26811             Alan Hayward  <alan.hayward@arm.com>
26812             David Sherwood  <david.sherwood@arm.com>
26814         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
26815         they are variable or constant sized.
26816         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
26817         slots for constant-sized data.
26819 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26820             Alan Hayward  <alan.hayward@arm.com>
26821             David Sherwood  <david.sherwood@arm.com>
26823         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
26824         handling COND_EXPRs with boolean comparisons, try to find a better
26825         basis for the mask type than the boolean itself.
26827 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26829         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
26830         is calculated and how it can be overridden.
26831         * genmodes.c (max_bitsize_mode_any_mode): New variable.
26832         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
26833         if defined.
26834         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
26835         if nonzero.
26837 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26838             Alan Hayward  <alan.hayward@arm.com>
26839             David Sherwood  <david.sherwood@arm.com>
26841         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
26842         Remove the mode argument.
26843         (aarch64_simd_valid_immediate): Remove the mode and inverse
26844         arguments.
26845         * config/aarch64/iterators.md (bitsize): New iterator.
26846         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
26847         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
26848         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
26849         aarch64_simd_valid_immediate.
26850         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
26851         (aarch64_reg_or_bic_imm): Likewise.
26852         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
26853         with an insn_type enum and msl with a modifier_type enum.
26854         Replace element_width with a scalar_mode.  Change the shift
26855         to unsigned int.  Add constructors for scalar_float_mode and
26856         scalar_int_mode elements.
26857         (aarch64_vect_float_const_representable_p): Delete.
26858         (aarch64_can_const_movi_rtx_p)
26859         (aarch64_simd_scalar_immediate_valid_for_move)
26860         (aarch64_simd_make_constant): Update call to
26861         aarch64_simd_valid_immediate.
26862         (aarch64_advsimd_valid_immediate_hs): New function.
26863         (aarch64_advsimd_valid_immediate): Likewise.
26864         (aarch64_simd_valid_immediate): Remove mode and inverse
26865         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
26866         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
26867         and aarch64_float_const_representable_p on the result.
26868         (aarch64_output_simd_mov_immediate): Remove mode argument.
26869         Update call to aarch64_simd_valid_immediate and use of
26870         simd_immediate_info.
26871         (aarch64_output_scalar_simd_mov_immediate): Update call
26872         accordingly.
26874 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26875             Alan Hayward  <alan.hayward@arm.com>
26876             David Sherwood  <david.sherwood@arm.com>
26878         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
26879         (mode_nunits): Likewise CONST_MODE_NUNITS.
26880         * machmode.def (ADJUST_NUNITS): Document.
26881         * genmodes.c (mode_data::need_nunits_adj): New field.
26882         (blank_mode): Update accordingly.
26883         (adj_nunits): New variable.
26884         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
26885         parameter.
26886         (emit_mode_size_inline): Set need_bytesize_adj for all modes
26887         listed in adj_nunits.
26888         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
26889         listed in adj_nunits.  Don't emit case statements for such modes.
26890         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
26891         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
26892         nothing if adj_nunits is nonnull.
26893         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
26894         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
26895         (emit_mode_fbit): Update use of print_maybe_const_decl.
26896         (emit_move_size): Likewise.  Treat the array as non-const
26897         if adj_nunits.
26898         (emit_mode_adjustments): Handle adj_nunits.
26900 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26902         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
26903         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
26904         (VECTOR_MODES): Use it.
26905         (make_vector_modes): Take the prefix as an argument.
26907 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26908             Alan Hayward  <alan.hayward@arm.com>
26909             David Sherwood  <david.sherwood@arm.com>
26911         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
26912         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
26913         for MODE_VECTOR_BOOL.
26914         * machmode.def (VECTOR_BOOL_MODE): Document.
26915         * genmodes.c (VECTOR_BOOL_MODE): New macro.
26916         (make_vector_bool_mode): New function.
26917         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
26918         MODE_VECTOR_BOOL.
26919         * lto-streamer-in.c (lto_input_mode_table): Likewise.
26920         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
26921         Likewise.
26922         * stor-layout.c (int_mode_for_mode): Likewise.
26923         * tree.c (build_vector_type_for_mode): Likewise.
26924         * varasm.c (output_constant_pool_2): Likewise.
26925         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
26926         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
26927         for MODE_VECTOR_BOOL.
26928         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
26929         of mode class checks.
26930         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
26931         instead of a list of mode class checks.
26932         (expand_vector_scalar_condition): Likewise.
26933         (type_for_widest_vector_mode): Handle BImode as an inner mode.
26935 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26936             Alan Hayward  <alan.hayward@arm.com>
26937             David Sherwood  <david.sherwood@arm.com>
26939         * machmode.h (mode_size): Change from unsigned short to
26940         poly_uint16_pod.
26941         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
26942         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26943         or if measurement_type is not polynomial.
26944         (fixed_size_mode::includes_p): Check for constant-sized modes.
26945         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
26946         return a poly_uint16 rather than an unsigned short.
26947         (emit_mode_size): Change the type of mode_size from unsigned short
26948         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
26949         (emit_mode_adjustments): Cope with polynomial vector sizes.
26950         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26951         for GET_MODE_SIZE.
26952         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26953         for GET_MODE_SIZE.
26954         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
26955         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
26956         * caller-save.c (setup_save_areas): Likewise.
26957         (replace_reg_with_saved_mem): Likewise.
26958         * calls.c (emit_library_call_value_1): Likewise.
26959         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
26960         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
26961         (gen_lowpart_for_combine): Likewise.
26962         * convert.c (convert_to_integer_1): Likewise.
26963         * cse.c (equiv_constant, cse_insn): Likewise.
26964         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
26965         (cselib_subst_to_values): Likewise.
26966         * dce.c (word_dce_process_block): Likewise.
26967         * df-problems.c (df_word_lr_mark_ref): Likewise.
26968         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
26969         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
26970         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
26971         (rtl_for_decl_location): Likewise.
26972         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
26973         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
26974         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
26975         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
26976         (expand_expr_real_1): Likewise.
26977         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
26978         (pad_below): Likewise.
26979         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26980         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
26981         * ira.c (get_subreg_tracking_sizes): Likewise.
26982         * ira-build.c (ira_create_allocno_objects): Likewise.
26983         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
26984         (ira_sort_regnos_for_alter_reg): Likewise.
26985         * ira-costs.c (record_operand_costs): Likewise.
26986         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
26987         (resolve_simple_move): Likewise.
26988         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
26989         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
26990         (lra_constraints): Likewise.
26991         (CONST_POOL_OK_P): Reject variable-sized modes.
26992         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
26993         (add_pseudo_to_slot, lra_spill): Likewise.
26994         * omp-low.c (omp_clause_aligned_alignment): Likewise.
26995         * optabs-query.c (get_best_extraction_insn): Likewise.
26996         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26997         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
26998         (expand_mult_highpart, valid_multiword_target_p): Likewise.
26999         * recog.c (offsettable_address_addr_space_p): Likewise.
27000         * regcprop.c (maybe_mode_change): Likewise.
27001         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
27002         * regrename.c (build_def_use): Likewise.
27003         * regstat.c (dump_reg_info): Likewise.
27004         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
27005         (find_reloads, find_reloads_subreg_address): Likewise.
27006         * reload1.c (eliminate_regs_1): Likewise.
27007         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
27008         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
27009         (simplify_binary_operation_1, simplify_subreg): Likewise.
27010         * targhooks.c (default_function_arg_padding): Likewise.
27011         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
27012         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
27013         (verify_gimple_assign_ternary): Likewise.
27014         * tree-inline.c (estimate_move_cost): Likewise.
27015         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27016         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
27017         (get_address_cost_ainc): Likewise.
27018         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
27019         (vect_supportable_dr_alignment): Likewise.
27020         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
27021         (vectorizable_reduction): Likewise.
27022         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
27023         (vectorizable_operation, vectorizable_load): Likewise.
27024         * tree.c (build_same_sized_truth_vector_type): Likewise.
27025         * valtrack.c (cleanup_auto_inc_dec): Likewise.
27026         * var-tracking.c (emit_note_insn_var_location): Likewise.
27027         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
27028         (ADDR_VEC_ALIGN): Likewise.
27030 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27031             Alan Hayward  <alan.hayward@arm.com>
27032             David Sherwood  <david.sherwood@arm.com>
27034         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
27035         unsigned short.
27036         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
27037         or if measurement_type is polynomial.
27038         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
27039         * combine.c (make_extraction): Likewise.
27040         * dse.c (find_shift_sequence): Likewise.
27041         * dwarf2out.c (mem_loc_descriptor): Likewise.
27042         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
27043         (extract_bit_field, extract_low_bits): Likewise.
27044         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
27045         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
27046         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
27047         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
27048         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
27049         * reload.c (find_reloads): Likewise.
27050         * reload1.c (alter_reg): Likewise.
27051         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
27052         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
27053         * tree-if-conv.c (predicate_mem_writes): Likewise.
27054         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
27055         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
27056         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
27057         * valtrack.c (dead_debug_insert_temp): Likewise.
27058         * varasm.c (mergeable_constant_section): Likewise.
27059         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
27061 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27062             Alan Hayward  <alan.hayward@arm.com>
27063             David Sherwood  <david.sherwood@arm.com>
27065         * expr.c (expand_assignment): Cope with polynomial mode sizes
27066         when assigning to a CONCAT.
27068 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27069             Alan Hayward  <alan.hayward@arm.com>
27070             David Sherwood  <david.sherwood@arm.com>
27072         * machmode.h (mode_precision): Change from unsigned short to
27073         poly_uint16_pod.
27074         (mode_to_precision): Return a poly_uint16 rather than an unsigned
27075         short.
27076         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
27077         or if measurement_type is not polynomial.
27078         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
27079         in which the mode is already known to be a scalar_int_mode.
27080         * genmodes.c (emit_mode_precision): Change the type of mode_precision
27081         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
27082         initializer.
27083         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27084         for GET_MODE_PRECISION.
27085         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27086         for GET_MODE_PRECISION.
27087         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
27088         as polynomial.
27089         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
27090         (expand_field_assignment, make_extraction): Likewise.
27091         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
27092         (get_last_value): Likewise.
27093         * convert.c (convert_to_integer_1): Likewise.
27094         * cse.c (cse_insn): Likewise.
27095         * expr.c (expand_expr_real_1): Likewise.
27096         * lra-constraints.c (simplify_operand_subreg): Likewise.
27097         * optabs-query.c (can_atomic_load_p): Likewise.
27098         * optabs.c (expand_atomic_load): Likewise.
27099         (expand_atomic_store): Likewise.
27100         * ree.c (combine_reaching_defs): Likewise.
27101         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
27102         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
27103         * tree.h (type_has_mode_precision_p): Likewise.
27104         * ubsan.c (instrument_si_overflow): Likewise.
27106 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27107             Alan Hayward  <alan.hayward@arm.com>
27108             David Sherwood  <david.sherwood@arm.com>
27110         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
27111         polynomial numbers of units.
27112         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
27113         (valid_vector_subparts_p): New function.
27114         (build_vector_type): Remove temporary shim and take the number
27115         of units as a poly_uint64 rather than an int.
27116         (build_opaque_vector_type): Take the number of units as a
27117         poly_uint64 rather than an int.
27118         * tree.c (build_vector_from_ctor): Handle polynomial
27119         TYPE_VECTOR_SUBPARTS.
27120         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
27121         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
27122         (build_vector_from_val): If the number of units is variable,
27123         use build_vec_duplicate_cst for constant operands and
27124         VEC_DUPLICATE_EXPR otherwise.
27125         (make_vector_type): Remove temporary is_constant ().
27126         (build_vector_type, build_opaque_vector_type): Take the number of
27127         units as a poly_uint64 rather than an int.
27128         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
27129         VECTOR_CST_NELTS.
27130         * cfgexpand.c (expand_debug_expr): Likewise.
27131         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
27132         (store_constructor, expand_expr_real_1): Likewise.
27133         (const_scalar_mask_from_tree): Likewise.
27134         * fold-const-call.c (fold_const_reduction): Likewise.
27135         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
27136         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
27137         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
27138         (fold_relational_const): Likewise.
27139         (native_interpret_vector): Likewise.  Change the size from an
27140         int to an unsigned int.
27141         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
27142         TYPE_VECTOR_SUBPARTS.
27143         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
27144         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
27145         duplicating a non-constant operand into a variable-length vector.
27146         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
27147         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
27148         * ipa-icf.c (sem_variable::equals): Likewise.
27149         * match.pd: Likewise.
27150         * omp-simd-clone.c (simd_clone_subparts): Likewise.
27151         * print-tree.c (print_node): Likewise.
27152         * stor-layout.c (layout_type): Likewise.
27153         * targhooks.c (default_builtin_vectorization_cost): Likewise.
27154         * tree-cfg.c (verify_gimple_comparison): Likewise.
27155         (verify_gimple_assign_binary): Likewise.
27156         (verify_gimple_assign_ternary): Likewise.
27157         (verify_gimple_assign_single): Likewise.
27158         * tree-pretty-print.c (dump_generic_node): Likewise.
27159         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27160         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
27161         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
27162         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
27163         (vect_shift_permute_load_chain): Likewise.
27164         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
27165         (expand_vector_condition, optimize_vector_constructor): Likewise.
27166         (lower_vec_perm, get_compute_type): Likewise.
27167         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
27168         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
27169         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
27170         (vect_recog_mask_conversion_pattern): Likewise.
27171         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
27172         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
27173         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27174         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
27175         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
27176         (vectorizable_shift, vectorizable_operation, vectorizable_store)
27177         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
27178         (supportable_widening_operation): Likewise.
27179         (supportable_narrowing_operation): Likewise.
27180         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
27181         Likewise.
27182         * varasm.c (output_constant): Likewise.
27184 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27185             Alan Hayward  <alan.hayward@arm.com>
27186             David Sherwood  <david.sherwood@arm.com>
27188         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
27189         so that both the length == 3 and length != 3 cases set up their
27190         own permute vectors.  Add comments explaining why we know the
27191         number of elements is constant.
27192         (vect_permute_load_chain): Likewise.
27194 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27195             Alan Hayward  <alan.hayward@arm.com>
27196             David Sherwood  <david.sherwood@arm.com>
27198         * machmode.h (mode_nunits): Change from unsigned char to
27199         poly_uint16_pod.
27200         (ONLY_FIXED_SIZE_MODES): New macro.
27201         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
27202         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
27203         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
27204         New typedefs.
27205         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
27206         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
27207         or if measurement_type is not polynomial.
27208         * genmodes.c (ZERO_COEFFS): New macro.
27209         (emit_mode_nunits_inline): Make mode_nunits_inline return a
27210         poly_uint16.
27211         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
27212         Use ZERO_COEFFS when emitting initializers.
27213         * data-streamer.h (bp_pack_poly_value): New function.
27214         (bp_unpack_poly_value): Likewise.
27215         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27216         for GET_MODE_NUNITS.
27217         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27218         for GET_MODE_NUNITS.
27219         * tree.c (make_vector_type): Remove temporary shim and make
27220         the real function take the number of units as a poly_uint64
27221         rather than an int.
27222         (build_vector_type_for_mode): Handle polynomial nunits.
27223         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
27224         * emit-rtl.c (const_vec_series_p_1): Likewise.
27225         (gen_rtx_CONST_VECTOR): Likewise.
27226         * fold-const.c (test_vec_duplicate_folding): Likewise.
27227         * genrecog.c (validate_pattern): Likewise.
27228         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
27229         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
27230         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
27231         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
27232         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
27233         * rtlanal.c (subreg_get_info): Likewise.
27234         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27235         (vect_grouped_load_supported): Likewise.
27236         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
27237         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
27238         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
27239         (simplify_const_unary_operation, simplify_binary_operation_1)
27240         (simplify_const_binary_operation, simplify_ternary_operation)
27241         (test_vector_ops_duplicate, test_vector_ops): Likewise.
27242         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
27243         instead of CONST_VECTOR_NUNITS.
27244         * varasm.c (output_constant_pool_2): Likewise.
27245         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
27246         explicit-encoded elements in the XVEC for variable-length vectors.
27248 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27250         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
27252 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27253             Alan Hayward  <alan.hayward@arm.com>
27254             David Sherwood  <david.sherwood@arm.com>
27256         * coretypes.h (fixed_size_mode): Declare.
27257         (fixed_size_mode_pod): New typedef.
27258         * builtins.h (target_builtins::x_apply_args_mode)
27259         (target_builtins::x_apply_result_mode): Change type to
27260         fixed_size_mode_pod.
27261         * builtins.c (apply_args_size, apply_result_size, result_vector)
27262         (expand_builtin_apply_args_1, expand_builtin_apply)
27263         (expand_builtin_return): Update accordingly.
27265 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27267         * cse.c (hash_rtx_cb): Hash only the encoded elements.
27268         * cselib.c (cselib_hash_rtx): Likewise.
27269         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
27270         CONST_VECTOR encoding.
27272 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27273             Jeff Law  <law@redhat.com>
27275         PR target/83641
27276         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
27277         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
27278         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
27279         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
27281         PR target/83641
27282         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
27283         explicitly probe *sp in a noreturn function if there were any callee
27284         register saves or frame pointer is needed.
27286 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27288         PR debug/83621
27289         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
27290         BLKmode for ternary, binary or unary expressions.
27292         PR debug/83645
27293         * var-tracking.c (delete_vta_debug_insn): New inline function.
27294         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
27295         insns from get_insns () to NULL instead of each bb separately.
27296         Use delete_vta_debug_insn.  No longer static.
27297         (vt_debug_insns_local, variable_tracking_main_1): Adjust
27298         delete_vta_debug_insns callers.
27299         * rtl.h (delete_vta_debug_insns): Declare.
27300         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
27301         instead of variable_tracking_main.
27303 2018-01-03  Martin Sebor  <msebor@redhat.com>
27305         PR tree-optimization/83603
27306         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
27307         arguments past the endof the argument list in functions declared
27308         without a prototype.
27309         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
27310         Avoid checking when arguments are null.
27312 2018-01-03  Martin Sebor  <msebor@redhat.com>
27314         PR c/83559
27315         * doc/extend.texi (attribute const): Fix a typo.
27316         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
27317         issuing -Wsuggest-attribute for void functions.
27319 2018-01-03  Martin Sebor  <msebor@redhat.com>
27321         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
27322         offset_int::from instead of wide_int::to_shwi.
27323         (maybe_diag_overlap): Remove assertion.
27324         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
27325         * gimple-ssa-sprintf.c (format_directive): Same.
27326         (parse_directive): Same.
27327         (sprintf_dom_walker::compute_format_length): Same.
27328         (try_substitute_return_value): Same.
27330 2018-01-03  Jeff Law  <law@redhat.com>
27332         PR middle-end/83654
27333         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
27334         non-constant residual for zero at runtime and avoid probing in
27335         that case.  Reorganize code for trailing problem to mirror handling
27336         of the residual.
27338 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
27340         PR tree-optimization/83501
27341         * tree-ssa-strlen.c (get_string_cst): New.
27342         (handle_char_store): Call get_string_cst.
27344 2018-01-03  Martin Liska  <mliska@suse.cz>
27346         PR tree-optimization/83593
27347         * tree-ssa-strlen.c: Include tree-cfg.h.
27348         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
27349         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
27350         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
27351         to false.
27352         (strlen_dom_walker::before_dom_children): Call
27353         gimple_purge_dead_eh_edges. Dump tranformation with details
27354         dump flags.
27355         (strlen_dom_walker::before_dom_children): Update call by adding
27356         new argument cleanup_eh.
27357         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
27359 2018-01-03  Martin Liska  <mliska@suse.cz>
27361         PR ipa/83549
27362         * cif-code.def (VARIADIC_THUNK): New enum value.
27363         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
27364         thunks.
27366 2018-01-03  Jan Beulich  <jbeulich@suse.com>
27368         * sse.md (mov<mode>_internal): Tighten condition for when to use
27369         vmovdqu<ssescalarsize> for TI and OI modes.
27371 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27373         Update copyright years.
27375 2018-01-03  Martin Liska  <mliska@suse.cz>
27377         PR ipa/83594
27378         * ipa-visibility.c (function_and_variable_visibility): Skip
27379         functions with noipa attribure.
27381 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27383         * gcc.c (process_command): Update copyright notice dates.
27384         * gcov-dump.c (print_version): Ditto.
27385         * gcov.c (print_version): Ditto.
27386         * gcov-tool.c (print_version): Ditto.
27387         * gengtype.c (create_file): Ditto.
27388         * doc/cpp.texi: Bump @copying's copyright year.
27389         * doc/cppinternals.texi: Ditto.
27390         * doc/gcc.texi: Ditto.
27391         * doc/gccint.texi: Ditto.
27392         * doc/gcov.texi: Ditto.
27393         * doc/install.texi: Ditto.
27394         * doc/invoke.texi: Ditto.
27396 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27398         * vector-builder.h (vector_builder::m_full_nelts): Change from
27399         unsigned int to poly_uint64.
27400         (vector_builder::full_nelts): Update prototype accordingly.
27401         (vector_builder::new_vector): Likewise.
27402         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
27403         (vector_builder::operator ==): Likewise.
27404         (vector_builder::finalize): Likewise.
27405         * int-vector-builder.h (int_vector_builder::int_vector_builder):
27406         Take the number of elements as a poly_uint64 rather than an
27407         unsigned int.
27408         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
27409         from unsigned int to poly_uint64.
27410         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
27411         (vec_perm_indices::new_vector): Likewise.
27412         (vec_perm_indices::length): Likewise.
27413         (vec_perm_indices::nelts_per_input): Likewise.
27414         (vec_perm_indices::input_nelts): Likewise.
27415         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
27416         number of elements per input as a poly_uint64 rather than an
27417         unsigned int.  Use the original encoding for variable-length
27418         vectors, rather than clamping each individual element.
27419         For the second and subsequent elements in each pattern,
27420         clamp the step and base before clamping their sum.
27421         (vec_perm_indices::series_p): Handle polynomial element counts.
27422         (vec_perm_indices::all_in_range_p): Likewise.
27423         (vec_perm_indices_to_tree): Likewise.
27424         (vec_perm_indices_to_rtx): Likewise.
27425         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
27426         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
27427         (tree_vector_builder::new_binary_operation): Handle polynomial
27428         element counts.  Return false if we need to know the number
27429         of elements at compile time.
27430         * fold-const.c (fold_vec_perm): Punt if the number of elements
27431         isn't known at compile time.
27433 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27435         * vec-perm-indices.h (vec_perm_builder): Change element type
27436         from HOST_WIDE_INT to poly_int64.
27437         (vec_perm_indices::element_type): Update accordingly.
27438         (vec_perm_indices::clamp): Handle polynomial element_types.
27439         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27440         (vec_perm_indices::all_in_range_p): Likewise.
27441         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
27442         than shwi trees.
27443         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
27444         polynomial vec_perm_indices element types.
27445         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
27446         * fold-const.c (fold_vec_perm): Likewise.
27447         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
27448         * tree-vect-generic.c (lower_vec_perm): Likewise.
27449         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27450         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
27451         element type to HOST_WIDE_INT.
27453 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27454             Alan Hayward  <alan.hayward@arm.com>
27455             David Sherwood  <david.sherwood@arm.com>
27457         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
27458         rather than an int.  Use plus_constant.
27459         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
27460         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
27462 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27463             Alan Hayward  <alan.hayward@arm.com>
27464             David Sherwood  <david.sherwood@arm.com>
27466         * calls.c (emit_call_1, expand_call): Change struct_value_size from
27467         a HOST_WIDE_INT to a poly_int64.
27469 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27470             Alan Hayward  <alan.hayward@arm.com>
27471             David Sherwood  <david.sherwood@arm.com>
27473         * calls.c (load_register_parameters): Cope with polynomial
27474         mode sizes.  Require a constant size for BLKmode parameters
27475         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
27476         forces a parameter to be padded at the lsb end in order to
27477         fill a complete number of words, require the parameter size
27478         to be ordered wrt UNITS_PER_WORD.
27480 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27481             Alan Hayward  <alan.hayward@arm.com>
27482             David Sherwood  <david.sherwood@arm.com>
27484         * reload1.c (spill_stack_slot_width): Change element type
27485         from unsigned int to poly_uint64_pod.
27486         (alter_reg): Treat mode sizes as polynomial.
27488 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27489             Alan Hayward  <alan.hayward@arm.com>
27490             David Sherwood  <david.sherwood@arm.com>
27492         * reload.c (complex_word_subreg_p): New function.
27493         (reload_inner_reg_of_subreg, push_reload): Use it.
27495 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27496             Alan Hayward  <alan.hayward@arm.com>
27497             David Sherwood  <david.sherwood@arm.com>
27499         * lra-constraints.c (process_alt_operands): Reject matched
27500         operands whose sizes aren't ordered.
27501         (match_reload): Refer to this check here.
27503 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27504             Alan Hayward  <alan.hayward@arm.com>
27505             David Sherwood  <david.sherwood@arm.com>
27507         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
27508         that the mode size is in the set {1, 2, 4, 8, 16}.
27510 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27511             Alan Hayward  <alan.hayward@arm.com>
27512             David Sherwood  <david.sherwood@arm.com>
27514         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
27515         Use plus_constant instead of gen_rtx_PLUS.
27517 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27518             Alan Hayward  <alan.hayward@arm.com>
27519             David Sherwood  <david.sherwood@arm.com>
27521         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
27522         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
27523         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
27524         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
27525         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
27526         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
27527         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
27528         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
27529         * config/i386/i386.c (ix86_push_rounding): ...this new function.
27530         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
27531         a poly_int64.
27532         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
27533         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
27534         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
27535         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
27536         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
27537         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
27538         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
27539         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
27540         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
27541         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
27542         function.
27543         * expr.c (emit_move_resolve_push): Treat the input and result
27544         of PUSH_ROUNDING as a poly_int64.
27545         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
27546         (emit_push_insn): Likewise.
27547         * lra-eliminations.c (mark_not_eliminable): Likewise.
27548         * recog.c (push_operand): Likewise.
27549         * reload1.c (elimination_effects): Likewise.
27550         * rtlanal.c (nonzero_bits1): Likewise.
27551         * calls.c (store_one_arg): Likewise.  Require the padding to be
27552         known at compile time.
27554 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27555             Alan Hayward  <alan.hayward@arm.com>
27556             David Sherwood  <david.sherwood@arm.com>
27558         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
27559         Use plus_constant instead of gen_rtx_PLUS.
27561 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27562             Alan Hayward  <alan.hayward@arm.com>
27563             David Sherwood  <david.sherwood@arm.com>
27565         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
27566         rather than an int.
27568 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27569             Alan Hayward  <alan.hayward@arm.com>
27570             David Sherwood  <david.sherwood@arm.com>
27572         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
27573         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
27574         via stack temporaries.  Treat the mode size as polynomial too.
27576 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27577             Alan Hayward  <alan.hayward@arm.com>
27578             David Sherwood  <david.sherwood@arm.com>
27580         * expr.c (expand_expr_real_2): When handling conversions involving
27581         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
27582         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
27583         as a poly_uint64 too.
27585 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27586             Alan Hayward  <alan.hayward@arm.com>
27587             David Sherwood  <david.sherwood@arm.com>
27589         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
27591 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27592             Alan Hayward  <alan.hayward@arm.com>
27593             David Sherwood  <david.sherwood@arm.com>
27595         * combine.c (can_change_dest_mode): Handle polynomial
27596         REGMODE_NATURAL_SIZE.
27597         * expmed.c (store_bit_field_1): Likewise.
27598         * expr.c (store_constructor): Likewise.
27599         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
27600         and polynomial REGMODE_NATURAL_SIZE.
27601         (gen_lowpart_common): Likewise.
27602         * reginfo.c (record_subregs_of_mode): Likewise.
27603         * rtlanal.c (read_modify_subreg_p): Likewise.
27605 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27606             Alan Hayward  <alan.hayward@arm.com>
27607             David Sherwood  <david.sherwood@arm.com>
27609         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
27610         numbers of elements.
27612 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27613             Alan Hayward  <alan.hayward@arm.com>
27614             David Sherwood  <david.sherwood@arm.com>
27616         * match.pd: Cope with polynomial numbers of vector elements.
27618 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27619             Alan Hayward  <alan.hayward@arm.com>
27620             David Sherwood  <david.sherwood@arm.com>
27622         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
27623         in a POINTER_PLUS_EXPR.
27625 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27626             Alan Hayward  <alan.hayward@arm.com>
27627             David Sherwood  <david.sherwood@arm.com>
27629         * omp-simd-clone.c (simd_clone_subparts): New function.
27630         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
27631         (ipa_simd_modify_function_body): Likewise.
27633 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27634             Alan Hayward  <alan.hayward@arm.com>
27635             David Sherwood  <david.sherwood@arm.com>
27637         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
27638         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
27639         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
27640         (expand_vector_condition, vector_element): Likewise.
27641         (subparts_gt): New function.
27642         (get_compute_type): Use subparts_gt.
27643         (count_type_subparts): Delete.
27644         (expand_vector_operations_1): Use subparts_gt instead of
27645         count_type_subparts.
27647 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27648             Alan Hayward  <alan.hayward@arm.com>
27649             David Sherwood  <david.sherwood@arm.com>
27651         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
27652         (vect_compile_time_alias): ...this new function.  Do the calculation
27653         on poly_ints rather than trees.
27654         (vect_prune_runtime_alias_test_list): Update call accordingly.
27656 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27657             Alan Hayward  <alan.hayward@arm.com>
27658             David Sherwood  <david.sherwood@arm.com>
27660         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
27661         numbers of units.
27662         (vect_schedule_slp_instance): Likewise.
27664 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27665             Alan Hayward  <alan.hayward@arm.com>
27666             David Sherwood  <david.sherwood@arm.com>
27668         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
27669         constant and extern definitions for variable-length vectors.
27670         (vect_get_constant_vectors): Note that the number of units
27671         is known to be constant.
27673 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27674             Alan Hayward  <alan.hayward@arm.com>
27675             David Sherwood  <david.sherwood@arm.com>
27677         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
27678         of units as polynomial.  Choose between WIDE and NARROW based
27679         on multiple_p.
27681 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27682             Alan Hayward  <alan.hayward@arm.com>
27683             David Sherwood  <david.sherwood@arm.com>
27685         * tree-vect-stmts.c (simd_clone_subparts): New function.
27686         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
27688 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27689             Alan Hayward  <alan.hayward@arm.com>
27690             David Sherwood  <david.sherwood@arm.com>
27692         * tree-vect-stmts.c (vectorizable_call): Treat the number of
27693         vectors as polynomial.  Use build_index_vector for
27694         IFN_GOMP_SIMD_LANE.
27696 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27697             Alan Hayward  <alan.hayward@arm.com>
27698             David Sherwood  <david.sherwood@arm.com>
27700         * tree-vect-stmts.c (get_load_store_type): Treat the number of
27701         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
27702         for variable-length vectors.
27703         (vectorizable_mask_load_store): Treat the number of units as
27704         polynomial, asserting that it is constant if the condition has
27705         already been enforced.
27706         (vectorizable_store, vectorizable_load): Likewise.
27708 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27709             Alan Hayward  <alan.hayward@arm.com>
27710             David Sherwood  <david.sherwood@arm.com>
27712         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
27713         of units as polynomial.  Punt if we can't tell at compile time
27714         which vector contains the final result.
27716 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27717             Alan Hayward  <alan.hayward@arm.com>
27718             David Sherwood  <david.sherwood@arm.com>
27720         * tree-vect-loop.c (vectorizable_induction): Treat the number
27721         of units as polynomial.  Punt on SLP inductions.  Use an integer
27722         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
27723         cast of such a series for variable-length floating-point
27724         reductions.
27726 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27727             Alan Hayward  <alan.hayward@arm.com>
27728             David Sherwood  <david.sherwood@arm.com>
27730         * tree.h (build_index_vector): Declare.
27731         * tree.c (build_index_vector): New function.
27732         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
27733         of units as polynomial, forcibly converting it to a constant if
27734         vectorizable_reduction has already enforced the condition.
27735         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
27736         to create a {1,2,3,...} vector.
27737         (vectorizable_reduction): Treat the number of units as polynomial.
27738         Choose vectype_in based on the largest scalar element size rather
27739         than the smallest number of units.  Enforce the restrictions
27740         relied on above.
27742 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27743             Alan Hayward  <alan.hayward@arm.com>
27744             David Sherwood  <david.sherwood@arm.com>
27746         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
27747         number of units as polynomial.
27749 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27750             Alan Hayward  <alan.hayward@arm.com>
27751             David Sherwood  <david.sherwood@arm.com>
27753         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
27754         * target.def (autovectorize_vector_sizes): Return the vector sizes
27755         by pointer, using vector_sizes rather than a bitmask.
27756         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
27757         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
27758         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
27759         Likewise.
27760         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
27761         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
27762         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
27763         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
27764         * omp-general.c (omp_max_vf): Likewise.
27765         * omp-low.c (omp_clause_aligned_alignment): Likewise.
27766         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
27767         * tree-vect-loop.c (vect_analyze_loop): Likewise.
27768         * tree-vect-slp.c (vect_slp_bb): Likewise.
27769         * doc/tm.texi: Regenerate.
27770         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
27771         to a poly_uint64.
27772         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
27773         the vector size as a poly_uint64 rather than an unsigned int.
27774         (current_vector_size): Change from an unsigned int to a poly_uint64.
27775         (get_vectype_for_scalar_type): Update accordingly.
27776         * tree.h (build_truth_vector_type): Take the size and number of
27777         units as a poly_uint64 rather than an unsigned int.
27778         (build_vector_type): Add a temporary overload that takes
27779         the number of units as a poly_uint64 rather than an unsigned int.
27780         * tree.c (make_vector_type): Likewise.
27781         (build_truth_vector_type): Take the number of units as a poly_uint64
27782         rather than an unsigned int.
27784 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27785             Alan Hayward  <alan.hayward@arm.com>
27786             David Sherwood  <david.sherwood@arm.com>
27788         * target.def (get_mask_mode): Take the number of units and length
27789         as poly_uint64s rather than unsigned ints.
27790         * targhooks.h (default_get_mask_mode): Update accordingly.
27791         * targhooks.c (default_get_mask_mode): Likewise.
27792         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
27793         * doc/tm.texi: Regenerate.
27795 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27796             Alan Hayward  <alan.hayward@arm.com>
27797             David Sherwood  <david.sherwood@arm.com>
27799         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
27800         * omp-general.c (omp_max_vf): Likewise.
27801         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
27802         (expand_omp_simd): Handle polynomial safelen.
27803         * omp-low.c (omplow_simd_context): Add a default constructor.
27804         (omplow_simd_context::max_vf): Change from int to poly_uint64.
27805         (lower_rec_simd_input_clauses): Update accordingly.
27806         (lower_rec_input_clauses): Likewise.
27808 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27809             Alan Hayward  <alan.hayward@arm.com>
27810             David Sherwood  <david.sherwood@arm.com>
27812         * tree-vectorizer.h (vect_nunits_for_cost): New function.
27813         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
27814         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
27815         (vect_analyze_slp_cost): Likewise.
27816         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
27817         (vect_model_load_cost): Likewise.
27819 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27820             Alan Hayward  <alan.hayward@arm.com>
27821             David Sherwood  <david.sherwood@arm.com>
27823         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
27824         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
27825         from an unsigned int * to a poly_uint64_pod *.
27826         (calculate_unrolling_factor): New function.
27827         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
27829 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27830             Alan Hayward  <alan.hayward@arm.com>
27831             David Sherwood  <david.sherwood@arm.com>
27833         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
27834         from an unsigned int to a poly_uint64.
27835         (_loop_vec_info::slp_unrolling_factor): Likewise.
27836         (_loop_vec_info::vectorization_factor): Change from an int
27837         to a poly_uint64.
27838         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
27839         (vect_get_num_vectors): New function.
27840         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
27841         (vect_get_num_copies): Use vect_get_num_vectors.
27842         (vect_analyze_data_ref_dependences): Change max_vf from an int *
27843         to an unsigned int *.
27844         (vect_analyze_data_refs): Change min_vf from an int * to a
27845         poly_uint64 *.
27846         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27847         than an unsigned HOST_WIDE_INT.
27848         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
27849         (vect_analyze_data_ref_dependence): Change max_vf from an int *
27850         to an unsigned int *.
27851         (vect_analyze_data_ref_dependences): Likewise.
27852         (vect_compute_data_ref_alignment): Handle polynomial vf.
27853         (vect_enhance_data_refs_alignment): Likewise.
27854         (vect_prune_runtime_alias_test_list): Likewise.
27855         (vect_shift_permute_load_chain): Likewise.
27856         (vect_supportable_dr_alignment): Likewise.
27857         (dependence_distance_ge_vf): Take the vectorization factor as a
27858         poly_uint64 rather than an unsigned HOST_WIDE_INT.
27859         (vect_analyze_data_refs): Change min_vf from an int * to a
27860         poly_uint64 *.
27861         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
27862         vfm1 as a poly_uint64 rather than an int.  Make the same change
27863         for the returned bound_scalar.
27864         (vect_gen_vector_loop_niters): Handle polynomial vf.
27865         (vect_do_peeling): Likewise.  Update call to
27866         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
27867         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
27868         be constant.
27869         * tree-vect-loop.c (vect_determine_vectorization_factor)
27870         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
27871         (vect_get_known_peeling_cost): Likewise.
27872         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
27873         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
27874         (vect_transform_loop): Likewise.  Use the lowest possible VF when
27875         updating the upper bounds of the loop.
27876         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
27877         rather than an int.
27878         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
27879         polynomial unroll factors.
27880         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
27881         (vect_make_slp_decision): Likewise.
27882         (vect_supported_load_permutation_p): Likewise, and polynomial
27883         vf too.
27884         (vect_analyze_slp_cost): Handle polynomial vf.
27885         (vect_slp_analyze_node_operations): Likewise.
27886         (vect_slp_analyze_bb_1): Likewise.
27887         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27888         than an unsigned HOST_WIDE_INT.
27889         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
27890         (vectorizable_load): Handle polynomial vf.
27891         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
27892         a poly_uint64.
27893         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
27895 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27896             Alan Hayward  <alan.hayward@arm.com>
27897             David Sherwood  <david.sherwood@arm.com>
27899         * match.pd: Handle bit operations involving three constants
27900         and try to fold one pair.
27902 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27904         * tree-vect-loop-manip.c: Include gimple-fold.h.
27905         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
27906         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
27907         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
27908         Add a path that uses a step of VF instead of 1, but disable it
27909         for now.
27910         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
27911         and niters_no_overflow parameters.  Update calls to
27912         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
27913         Create a new SSA name if the latter choses to use a ste other
27914         than zero, and return it via niters_vector_mult_vf_var.
27915         * tree-vect-loop.c (vect_transform_loop): Update calls to
27916         vect_do_peeling, vect_gen_vector_loop_niters and
27917         slpeel_make_loop_iterate_ntimes.
27918         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
27919         (vect_gen_vector_loop_niters): Update declarations after above changes.
27921 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
27923         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
27924         128-bit round to integer instructions.
27925         (ceil<mode>2): Likewise.
27926         (btrunc<mode>2): Likewise.
27927         (round<mode>2): Likewise.
27929 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27931         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
27932         unaligned VSX load/store on P8/P9.
27933         (expand_block_clear): Allow the use of unaligned VSX
27934         load/store on P8/P9.
27936 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27938         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
27939         New function.
27940         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
27941         swap associated with both a load and a store.
27943 2018-01-02  Andrew Waterman  <andrew@sifive.com>
27945         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
27946         * config/riscv/riscv.md (clear_cache): Use it.
27948 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
27950         * web.c: Remove out-of-date comment.
27952 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27954         * expr.c (fixup_args_size_notes): Check that any existing
27955         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
27956         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
27957         (emit_single_push_insn): ...here.
27959 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27961         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
27962         (const_vector_encoded_nelts): New function.
27963         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
27964         (const_vector_int_elt, const_vector_elt): Declare.
27965         * emit-rtl.c (const_vector_int_elt_1): New function.
27966         (const_vector_elt): Likewise.
27967         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
27968         of CONST_VECTOR_ELT.
27970 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27972         * expr.c: Include rtx-vector-builder.h.
27973         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
27974         directly on the tree encoding.
27975         (const_vector_from_tree): Likewise.
27976         * optabs.c: Include rtx-vector-builder.h.
27977         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
27978         sequence of "u" values.
27979         * vec-perm-indices.c: Include rtx-vector-builder.h.
27980         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
27981         directly on the vec_perm_indices encoding.
27983 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27985         * doc/rtl.texi (const_vector): Describe new encoding scheme.
27986         * Makefile.in (OBJS): Add rtx-vector-builder.o.
27987         * rtx-vector-builder.h: New file.
27988         * rtx-vector-builder.c: Likewise.
27989         * rtl.h (rtx_def::u2): Add a const_vector field.
27990         (CONST_VECTOR_NPATTERNS): New macro.
27991         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
27992         (CONST_VECTOR_DUPLICATE_P): Likewise.
27993         (CONST_VECTOR_STEPPED_P): Likewise.
27994         (CONST_VECTOR_ENCODED_ELT): Likewise.
27995         (const_vec_duplicate_p): Check for a duplicated vector encoding.
27996         (unwrap_const_vec_duplicate): Likewise.
27997         (const_vec_series_p): Check for a non-duplicated vector encoding.
27998         Say that the function only returns true for integer vectors.
27999         * emit-rtl.c: Include rtx-vector-builder.h.
28000         (gen_const_vec_duplicate_1): Delete.
28001         (gen_const_vector): Call gen_const_vec_duplicate instead of
28002         gen_const_vec_duplicate_1.
28003         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
28004         (gen_const_vec_duplicate): Use rtx_vector_builder.
28005         (gen_const_vec_series): Likewise.
28006         (gen_rtx_CONST_VECTOR): Likewise.
28007         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
28008         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
28009         Build a new vector rather than modifying a CONST_VECTOR in-place.
28010         (handle_special_swappables): Update call accordingly.
28011         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
28012         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
28013         Build a new vector rather than modifying a CONST_VECTOR in-place.
28014         (handle_special_swappables): Update call accordingly.
28016 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28018         * simplify-rtx.c (simplify_const_binary_operation): Use
28019         CONST_VECTOR_ELT instead of XVECEXP.
28021 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28023         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
28024         the selector elements to be different from the data elements
28025         if the selector is a VECTOR_CST.
28026         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
28027         ssizetype for the selector.
28029 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28031         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
28032         before testing each element individually.
28033         * tree-vect-generic.c (lower_vec_perm): Likewise.
28035 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28037         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
28038         * selftest-run-tests.c (selftest::run_tests): Call it.
28039         * vector-builder.h (vector_builder::operator ==): New function.
28040         (vector_builder::operator !=): Likewise.
28041         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
28042         (vec_perm_indices::all_from_input_p): New function.
28043         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28044         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
28045         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
28046         instead of reading the VECTOR_CST directly.  Detect whether both
28047         vector inputs are the same before constructing the vec_perm_indices,
28048         and update the number of inputs argument accordingly.  Use the
28049         utility functions added above.  Only construct sel2 if we need to.
28051 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28053         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
28054         the broadcast of the low byte.
28055         (expand_mult_highpart): Use an explicit encoding for the permutes.
28056         * optabs-query.c (can_mult_highpart_p): Likewise.
28057         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
28058         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28059         (vectorizable_bswap): Likewise.
28060         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
28061         explicit encoding for the power-of-2 permutes.
28062         (vect_permute_store_chain): Likewise.
28063         (vect_grouped_load_supported): Likewise.
28064         (vect_permute_load_chain): Likewise.
28066 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28068         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
28069         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
28070         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
28071         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28072         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
28073         (vect_gen_perm_mask_any): Likewise.
28075 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28077         * int-vector-builder.h: New file.
28078         * vec-perm-indices.h: Include int-vector-builder.h.
28079         (vec_perm_indices): Redefine as an int_vector_builder.
28080         (auto_vec_perm_indices): Delete.
28081         (vec_perm_builder): Redefine as a stand-alone class.
28082         (vec_perm_indices::vec_perm_indices): New function.
28083         (vec_perm_indices::clamp): Likewise.
28084         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
28085         (vec_perm_indices::new_vector): New function.
28086         (vec_perm_indices::new_expanded_vector): Update for new
28087         vec_perm_indices class.
28088         (vec_perm_indices::rotate_inputs): New function.
28089         (vec_perm_indices::all_in_range_p): Operate directly on the
28090         encoded form, without computing elided elements.
28091         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
28092         encoding.  Update for new vec_perm_indices class.
28093         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
28094         the given vec_perm_builder.
28095         (expand_vec_perm_var): Update vec_perm_builder constructor.
28096         (expand_mult_highpart): Use vec_perm_builder instead of
28097         auto_vec_perm_indices.
28098         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
28099         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
28100         or double series encoding as appropriate.
28101         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
28102         vec_perm_indices instead of auto_vec_perm_indices.
28103         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28104         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28105         (vect_permute_store_chain): Likewise.
28106         (vect_grouped_load_supported): Likewise.
28107         (vect_permute_load_chain): Likewise.
28108         (vect_shift_permute_load_chain): Likewise.
28109         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
28110         (vect_transform_slp_perm_load): Likewise.
28111         (vect_schedule_slp_instance): Likewise.
28112         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28113         (vectorizable_mask_load_store): Likewise.
28114         (vectorizable_bswap): Likewise.
28115         (vectorizable_store): Likewise.
28116         (vectorizable_load): Likewise.
28117         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
28118         vec_perm_indices instead of auto_vec_perm_indices.  Use
28119         tree_to_vec_perm_builder to read the vector from a tree.
28120         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
28121         vec_perm_builder instead of a vec_perm_indices.
28122         (have_whole_vector_shift): Use vec_perm_builder and
28123         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
28124         truncation to calc_vec_perm_mask_for_shift.
28125         (vect_create_epilog_for_reduction): Likewise.
28126         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
28127         from auto_vec_perm_indices to vec_perm_indices.
28128         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
28129         instead of changing individual elements.
28130         (aarch64_vectorize_vec_perm_const): Use new_vector to install
28131         the vector in d.perm.
28132         * config/arm/arm.c (expand_vec_perm_d::perm): Change
28133         from auto_vec_perm_indices to vec_perm_indices.
28134         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
28135         instead of changing individual elements.
28136         (arm_vectorize_vec_perm_const): Use new_vector to install
28137         the vector in d.perm.
28138         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
28139         Update vec_perm_builder constructor.
28140         (rs6000_expand_interleave): Likewise.
28141         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
28142         (rs6000_expand_interleave): Likewise.
28144 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28146         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
28147         to qimode could truncate the indices.
28148         * optabs.c (expand_vec_perm_var): Likewise.
28150 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28152         * Makefile.in (OBJS): Add vec-perm-indices.o.
28153         * vec-perm-indices.h: New file.
28154         * vec-perm-indices.c: Likewise.
28155         * target.h (vec_perm_indices): Replace with a forward class
28156         declaration.
28157         (auto_vec_perm_indices): Move to vec-perm-indices.h.
28158         * optabs.h: Include vec-perm-indices.h.
28159         (expand_vec_perm): Delete.
28160         (selector_fits_mode_p, expand_vec_perm_var): Declare.
28161         (expand_vec_perm_const): Declare.
28162         * target.def (vec_perm_const_ok): Replace with...
28163         (vec_perm_const): ...this new hook.
28164         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
28165         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
28166         * doc/tm.texi: Regenerate.
28167         * optabs.def (vec_perm_const): Delete.
28168         * doc/md.texi (vec_perm_const): Likewise.
28169         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
28170         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
28171         expand_vec_perm for constant permutation vectors.  Assert that
28172         the mode of variable permutation vectors is the integer equivalent
28173         of the mode that is being permuted.
28174         * optabs-query.h (selector_fits_mode_p): Declare.
28175         * optabs-query.c: Include vec-perm-indices.h.
28176         (selector_fits_mode_p): New function.
28177         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
28178         is defined, instead of checking whether the vec_perm_const_optab
28179         exists.  Use targetm.vectorize.vec_perm_const instead of
28180         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
28181         fit in the vector mode before using a variable permute.
28182         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
28183         vec_perm_indices instead of an rtx.
28184         (expand_vec_perm): Replace with...
28185         (expand_vec_perm_const): ...this new function.  Take the selector
28186         as a vec_perm_indices rather than an rtx.  Also take the mode of
28187         the selector.  Update call to shift_amt_for_vec_perm_mask.
28188         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
28189         Use vec_perm_indices::new_expanded_vector to expand the original
28190         selector into bytes.  Check whether the indices fit in the vector
28191         mode before using a variable permute.
28192         (expand_vec_perm_var): Make global.
28193         (expand_mult_highpart): Use expand_vec_perm_const.
28194         * fold-const.c: Includes vec-perm-indices.h.
28195         * tree-ssa-forwprop.c: Likewise.
28196         * tree-vect-data-refs.c: Likewise.
28197         * tree-vect-generic.c: Likewise.
28198         * tree-vect-loop.c: Likewise.
28199         * tree-vect-slp.c: Likewise.
28200         * tree-vect-stmts.c: Likewise.
28201         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
28202         Delete.
28203         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
28204         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
28205         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
28206         (aarch64_vectorize_vec_perm_const): ...this new function.
28207         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28208         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28209         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
28210         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
28211         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28212         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28213         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
28214         into...
28215         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
28216         check for NEON modes.
28217         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
28218         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
28219         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
28220         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
28221         into...
28222         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
28223         the old VEC_PERM_CONST conditions.
28224         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
28225         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
28226         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
28227         (ia64_vectorize_vec_perm_const_ok): Merge into...
28228         (ia64_vectorize_vec_perm_const): ...this new function.
28229         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
28230         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
28231         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
28232         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
28233         * config/mips/mips.c (mips_expand_vec_perm_const)
28234         (mips_vectorize_vec_perm_const_ok): Merge into...
28235         (mips_vectorize_vec_perm_const): ...this new function.
28236         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
28237         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
28238         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
28239         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
28240         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
28241         (rs6000_expand_vec_perm_const): Delete.
28242         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
28243         Delete.
28244         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28245         (altivec_expand_vec_perm_const_le): Take each operand individually.
28246         Operate on constant selectors rather than rtxes.
28247         (altivec_expand_vec_perm_const): Likewise.  Update call to
28248         altivec_expand_vec_perm_const_le.
28249         (rs6000_expand_vec_perm_const): Delete.
28250         (rs6000_vectorize_vec_perm_const_ok): Delete.
28251         (rs6000_vectorize_vec_perm_const): New function.
28252         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28253         an element count and rtx array.
28254         (rs6000_expand_extract_even): Update call accordingly.
28255         (rs6000_expand_interleave): Likewise.
28256         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
28257         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
28258         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
28259         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
28260         (rs6000_expand_vec_perm_const): Delete.
28261         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28262         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28263         (altivec_expand_vec_perm_const_le): Take each operand individually.
28264         Operate on constant selectors rather than rtxes.
28265         (altivec_expand_vec_perm_const): Likewise.  Update call to
28266         altivec_expand_vec_perm_const_le.
28267         (rs6000_expand_vec_perm_const): Delete.
28268         (rs6000_vectorize_vec_perm_const_ok): Delete.
28269         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
28270         reference to the SPE evmerge intructions.
28271         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28272         an element count and rtx array.
28273         (rs6000_expand_extract_even): Update call accordingly.
28274         (rs6000_expand_interleave): Likewise.
28275         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
28276         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
28277         new function.
28278         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28280 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28282         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
28283         vector mode and that that mode matches the mode of the data
28284         being permuted.
28285         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
28286         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
28287         directly using expand_vec_perm_1 when forcing selectors into
28288         registers.
28289         (expand_vec_perm_var): New function, split out from expand_vec_perm.
28291 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28293         * optabs-query.h (can_vec_perm_p): Delete.
28294         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
28295         * optabs-query.c (can_vec_perm_p): Split into...
28296         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
28297         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
28298         particular selector is valid.
28299         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28300         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28301         (vect_grouped_load_supported): Likewise.
28302         (vect_shift_permute_load_chain): Likewise.
28303         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
28304         (vect_transform_slp_perm_load): Likewise.
28305         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28306         (vectorizable_bswap): Likewise.
28307         (vect_gen_perm_mask_checked): Likewise.
28308         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
28309         implementations of variable permutation vectors into account
28310         when deciding which selector to use.
28311         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
28312         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
28313         with a false third argument.
28314         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
28315         to test whether the constant selector is valid and can_vec_perm_var_p
28316         to test whether a variable selector is valid.
28318 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28320         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
28321         * optabs-query.c (can_vec_perm_p): Likewise.
28322         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
28323         instead of vec_perm_indices.
28324         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
28325         (vect_gen_perm_mask_checked): Likewise,
28326         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
28327         (vect_gen_perm_mask_checked): Likewise,
28329 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28331         * optabs-query.h (qimode_for_vec_perm): Declare.
28332         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
28333         (qimode_for_vec_perm): ...this new function.
28334         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
28336 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28338         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
28339         does not have a conditional at the top.
28341 2018-01-02  Richard Biener  <rguenther@suse.de>
28343         * ipa-inline.c (big_speedup_p): Fix expression.
28345 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
28347         PR target/81616
28348         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
28349         for generic 4->6.
28351 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
28353         PR target/81616
28354         Generic tuning.
28355         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
28356         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
28357         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
28358         cond_taken_branch_cost 3->4.
28360 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
28362         PR tree-optimization/83581
28363         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
28364         TODO_cleanup_cfg if any changes have been made.
28366         PR middle-end/83608
28367         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
28368         convert_modes if target mode has the right side, but different mode
28369         class.
28371         PR middle-end/83609
28372         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
28373         last argument when extracting from CONCAT.  If either from_real or
28374         from_imag is NULL, use expansion through memory.  If result is not
28375         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
28376         the parts directly to inner mode, if even that fails, use expansion
28377         through memory.
28379         PR middle-end/83623
28380         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
28381         check for bswap in mode rather than HImode and use that in expand_unop
28382         too.
28384 Copyright (C) 2018 Free Software Foundation, Inc.
28386 Copying and distribution of this file, with or without modification,
28387 are permitted in any medium without royalty provided the copyright
28388 notice and this notice are preserved.