Run selftests for C++ as well as C
[official-gcc.git] / gcc / ChangeLog
blob1332e08e5ce2468e4dc2af0cfaadab0329984d2b
1 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
3         * Makefile.in (SELFTEST_TARGETS): New.
4         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
5         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
6         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
7         c/Make-lang.in.
8         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
9         (selftest-c++-gdb, selftest-c++-valgrind): Move to
10         cp/Make-lang.in.
11         * configure: Regenerate.
12         * configure.ac (selftest_languages): New.
14 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
16         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
17         overflow wraps argument.
18         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
19         wide_int_range_multiplicative_op.
20         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
21         overflow wraps argument.
22         (wide_int_range_multiplicative_op): Same.
23         (wide_int_range_lshift): Same.
24         (wide_int_range_div): Same.
25         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
26         (wide_int_range_lshift): Same.
27         (wide_int_range_div): Same.
29 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
31         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
32         use sign as argument.
33         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
34         wide_int_range_shift_undefined_p.
36 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
38         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
39         Rename to...
40         (@despeculate_copy<ALLI_TI:mode>): ... This.
41         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
42         switch statement.
44 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
46         * config.gcc: Obsolete *-*-solaris2.10*.
47         * doc/install.texi (Specific, *-*-solaris2*): Document it.
49 2018-10-12  Jeff Law  <law@redhat.com>
51         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
52         reg + sym +- const_int addressing modes.
54 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
56         * common.opt (fdiagnostics-minimum-margin-width=): New option.
57         * diagnostic-show-locus.c (layout::layout): Apply the minimum
58         margin width.
59         (layout::start_annotation_line): Only print up to 3 of the
60         margin character, to avoid touching the left-hand side.
61         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
62         minimum margin width, as set by test_diagnostic_context's ctor.
63         (selftest::test_fixit_insert_containing_newline): Likewise.
64         (selftest::test_fixit_insert_containing_newline_2): Likewise.
65         (selftest::test_line_numbers_multiline_range): Clear
66         dc.min_margin_width.
67         * diagnostic.c (diagnostic_initialize): Initialize
68         min_margin_width.
69         * diagnostic.h (struct diagnostic_context): Add field
70         "min_margin_width".
71         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
72         * opts.c (common_handle_option): Handle
73         OPT_fdiagnostics_minimum_margin_width_.
74         * selftest-diagnostic.c
75         (selftest::test_diagnostic_context::test_diagnostic_context):
76         Initialize min_margin_width to 6.
77         * toplev.c (general_init): Initialize global_dc->min_margin_width.
79 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
81         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
82         Fix usage of "error_at_rich_loc" in the comment.
84 2018-10-15  Renlin Li  <renlin.li@arm.com>
86         PR target/87563
87         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
88         if-conversioned loop when it contains ifn with types not
89         supported by backend.
90         * internal-fn.c (expand_direct_optab_fn): Add an assert.
91         (direct_internal_fn_supported_p): New helper function.
92         * internal-fn.h (direct_internal_fn_supported_p): Declare.
94 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
96         PR target/87572
97         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
98         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
99         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
101 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
103         PR tree-optimization/87022
104         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
105         bits in dist vector rather than the first one.
107 2018-10-15  Richard Biener  <rguenther@suse.de>
109         PR middle-end/87610
110         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
111         (visit_loadstore): When a used restrict tag escaped verify that
112         the points-to solution of "other" pointers do not include
113         escaped.
114         (compute_dependence_clique): If a used restrict tag escaped
115         communicated that down to visit_loadstore.
117 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
119         * config/s390/s390.c (s390_expand_vec_init): Force vector element
120         into reg if it isn't a general operand.
122 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
124         PR target/87599
125         * config/i386/sse.md (*vec_dupv2di): Add register source to
126         movddup.
128 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
130         PR target/87572
131         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
132         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
133         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
134         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
136 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
138         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
139         (notice_args_size): Set it in the current trace if no insn that can
140         throw internally has been seen yet.
141         (connect_traces): When connecting args_size between traces, allow the
142         incoming values not to match if there is an insn setting it before the
143         first insn that can throw internally; in that case, force the creation
144         of a CFI note on this latter insn.
146 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
148         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
149         the base class, because using the injected-class-name was not clearly
150         specified until DR 176.
152 2018-10-12  Paul Koning  <ni1d@arrl.net>
154         * config/pdp11/pdp11.md (doloop_end): New expander.
155         (doloop_end_insn): renamed from "doloop_end".
156         (addqi3): New pattern.
157         (subqi3): New pattern.
158         * config/pdp11/predicates.md (incdec_operand): New predicate.
160 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
162         PR middle-end/81376
163         * real.c (format_helper::can_represent_integral_type_p): New function
164         * real.h (format_helper::can_represent_integral_type_p): Ditto.
165         * match.pd: New pattern.
167 2018-10-12  Alexandre Oliva <oliva@adacore.com>
169         * configure.ac: Introduce --enable-large-address-aware
170         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
171         * doc/install.texi: Document it.
172         * configure, config.in: Rebuilt.
173         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
174         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
175         (LINK_SPEC): Insert it.
176         * config/i386/mingw-264.h: Likewise.
178         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
180 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
182         PR rtl-optimization/87600
183         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
185 2018-10-12  Paul Koning  <ni1d@arrl.net>
187         * doc/md.texi (doloop_end): Document that the pattern code may
188         need to check operand mode.
190 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
192         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
193         to zero-extend between int and floating-point registers.
194         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
195         ldp into floating-point registers.  Add type and arch attributes.
196         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
197         Use f_loads for type attribute.
199 2018-10-11  Martin Sebor  <msebor@redhat.com>
201         * doc/extend.texi (attribute packed): Correct typos.
203 2018-10-11  Martin Sebor  <msebor@redhat.com>
205         * doc/extend.texi (attribute flatten): Mention interaction with
206         noinline.
208 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
210         PR target/87156
211         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
212         Set new_decl virtual flag to zero.
214 2018-10-11  Martin Sebor  <msebor@redhat.com>
216         PR middle-end/87593
217         * doc/extend.texi (attribute format_arg): Discuss using multiple
218         attributes on a single function.
220 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
222         PR tree-optimization/86829
223         * match.pd (sin (atan (x))): New simplification rules.
224         (cos (atan (x))): Likewise.
225         * real.c (build_sinatan_real): New function.
226         * real.h (build_sinatan_real): Prototype.
228 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
230         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
231         function.
232         (fold_mergeeo_helper): New helper function.
233         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
234         intrinsics.  Correct some whitespace indentation issues.
236 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
238         PR target/87511
239         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
240         Use HOST_WIDE_INT_1U for shift.
242 2018-10-11  Doug Rupp  <rupp@adacore.com>
243             Olivier Hainque  <hainque@adacore.com>
245         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
246         Pass --relax to the linker for RTPs.
247         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
249 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
250             Jan Hubicka  <jh@suse.cz>
251             Martin Jambor  <mjambor@suse.cz>
253         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
254         the same elements are repeated rather than printing all of them.
255         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
256         "repeated" elements.
257         * read-rtl-function.c (test_loading_repeat): New function.
258         (read_rtl_function_c_tests): Call test_loading_repeat.
259         * rtl-tests.c (test_dumping_repeat): New function.
260         (rtl_tests_c_tests): Call test_dumping_repeat.
262 2018-10-11  Richard Biener  <rguenther@suse.de>
264         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
265         bdver?_cost): Unify to ...
266         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
267         * config/i386/i386.c (processor_cost_table): Adjust.
269 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
271         PR middle-end/87574
272         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
273         the thunk when expanding to GIMPLE.
275 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
277         * varasm.c (mergeable_string_section): Don't try to move zero-length
278         strings to the merge section.
280 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
282         PR target/87573
283         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
285 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
287         PR target/87550
288         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
289         to special_args set.
291 2018-10-10  Richard Biener  <rguenther@suse.de>
293         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
294         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
295         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
296         and recursing and pattern terminating the recursion on SSE
297         vector width using ix86_expand_reduc.
298         (reduc_sminmax_scal_<mode>): Split into part reducing to half
299         width and recursing and SSE2 vector variant doing the final
300         reduction with ix86_expand_reduc.
301         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
302         with terminating the recursion at AVX level, splitting that
303         to SSE there.
305 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
307         * genmatch.c (error_cb): Rename to...
308         (diagnostic_cb): ...this, converting int params to enums.
309         (fatal_at): Update for renaming.
310         (warning_at): Likewise.
311         (main): Likewise.
312         * input.c (selftest::ebcdic_execution_charset::apply):
313         Update for renaming of...
314         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
315         to...
316         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
317         converting level and reason to enums.
318         (class selftest::lexer_error_sink): Rename to...
319         (class selftest::lexer_test_options): ...this, renaming field
320         "m_errors" to "m_diagnostics".
321         (selftest::lexer_test_options::apply): Update for renaming of...
322         (selftest::lexer_test_options::on_error): ...this, renaming to...
323         (selftest::lexer_test_options::on_diagnostic): ...this
324         converting level and reason to enums.
325         (selftest::test_lexer_string_locations_raw_string_unterminated):
326         Update for renamings.
327         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
328         "reason".
330 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
332         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
333         * config/rs6000/pmmintrin.h: New file.
335 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
337         PR tree-optimization/86659
338         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
340 2018-10-09  Richard Biener  <rguenther@suse.de>
342         PR tree-optimization/63155
343         * tree-ssa-structalias.c: Include tree-ssa.h.
344         (get_constraint_for_ssa_var): For undefs return nothing_id.
345         (find_func_aliases): Cleanup PHI handling.
347 2018-10-09  Richard Biener  <rguenther@suse.de>
349         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
350         replacements.
352 2018-10-09  Martin Liska  <mliska@suse.cz>
354         * asan.c (asan_emit_stack_protection): If a stack variable
355         is located in a same file as current function, then emit
356         line info into variable definition string.
358 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
360         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
361         information.
363 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
365         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
366         on the thunk.
368 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
370         PR tree-optimization/86659
371         * gimple-match.h (struct gimple_match_op): Add reverse field.
372         (gimple_match_op::set_op): New overloaded method.
373         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
374         the REF_REVERSE_STORAGE_ORDER flag on the value.
375         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
376         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
377         
378 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
380         PR middle-end/63155
381         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
382         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
384 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
386         PR target/87517
387         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
388         Defined with __builtin_ia32_vfmaddsubpd512_mask.
390 2018-10-08  Richard Biener  <rguenther@suse.de>
392         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
393         cost the same as AVX128 ones.
395 2018-10-08  Paul Koning  <ni1d@arrl.net>
397         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
398         (expand_block_move): New function.
399         * config/pdp11/pdp11.c (output_block_move): Remove.
400         (expand_block_move): New function.
401         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
402         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
403         (*movmemhi1): Remove.
405 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
407         * config/s390/2827.md: Increase latencies for some FP instructions.
409 2018-10-08  Richard Biener  <rguenther@suse.de>
411         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
412         Open a dump scope.
413         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
414         * tree-vectorizer.h (dump_stmt_cost): Adjust.
415         (add_stmt_cost): Dump return value of the hook.
417 2018-10-08  Richard Biener  <rguenther@suse.de>
419         PR tree-optimization/63155
420         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
421         (ssa_propagation_engine::ssa_propagate): Remove redundant
422         bitmap bit clearing.
424 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
426         PR rtl-optimization/86939
427         PR rtl-optimization/87479
428         * ira.h (non_conflicting_reg_copy_p): New prototype.
429         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
430         (make_hard_regno_dead): Don't add conflicts for register
431         ignore_reg_for_conflicts.
432         (make_object_dead): Likewise.
433         (non_conflicting_reg_copy_p): New function.
434         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
435         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
436         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
437         (make_hard_regno_dead): Don't add conflicts for register
438         ignore_reg_for_conflicts.  Remove special conflict handling of
439         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
440         check_pic_pseudo_p and update callers.
441         (mark_pseudo_dead): Don't add conflicts for register
442         ignore_reg_for_conflicts.
443         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
445 2018-10-05  Andrew Waterman  <andrew@sifive.com>
446             Jim Wilson  <jimw@sifive.com>
448         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
449         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
450         new pattern using HONOR_SNANS that emits one extra instruction.
452 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
454         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
455         patterns): Merge SI and DI patterns to a GPR pattern.
456         (unnamed define_insn and define_split for record form of that): Merge
457         to a single define_insn_and_split pattern.
459 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
461         PR c++/56856
462         * input.c (expand_location_to_spelling_point): Add param "aspect"
463         and use rather than hardcoding LOCATION_ASPECT_CARET.
464         (get_substring_ranges_for_loc): Handle the case of a single token
465         within a macro expansion.
466         * input.h (expand_location_to_spelling_point): Add "aspect" param,
467         defaulting to LOCATION_ASPECT_CARET.
469 2018-10-05  Paul Koning  <ni1d@arrl.net>
471         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
472         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
473         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
474         (pdp11_guard_type): New function.
476 2018-10-05  Paul Koning  <ni1d@arrl.net>
478         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
479         * config/pdp11/pdp11.opt (mfloat32): Remove.
480         (mfloat64): Remove.
481         * doc/invoke.texi (pdp11 -mfloat32): Remove:
482         (pdp11 -mfloat64): Remove.
484 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
486         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
487         (*cmp<mode>_cc_i387): Ditto.
488         (*cmpu<mode>_cc_i387): Ditto.
489         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
490         * config/i386/i386.c (ix86_expand_fp_compare): Remove
491         "scratch" argument.
492         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
493         Emit x86_sahf_1 pattern.
494         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
495         (ix86_expand_carry_flag_compare): Ditto.
497 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
499         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
500         to reg_or_0_operand.  Add "C" constraint.
501         (*cmpxf_cc_i387): Ditto.
502         (*cmp<mode>_i387): Change operand 2 predicate
503         to nonimm_or_0_operand.  Add "C" constraint.
504         (*cmp<mode>_cc_i387): Ditto.
505         (*cmp<mode>_0_i387): Remove insn pattern.
506         (*cmp<mode>_0_cc_i387): Ditto.
508 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
510         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
511         * config/i386/predicates.md (nonimm_or_0_operand): Rename
512         from vector_move_operand.  Update all uses.
514 2018-10-05  Martin Sebor  <msebor@redhat.com>
516         PR tree-optimization/87490
517         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
518         consistently.
520 2018-10-05  Richard Biener  <rguenther@suse.de>
522         PR tree-optimization/63155
523         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
524         vertical space in dumpfiles.
525         * tree-ssa-propagate.h
526         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
527         * tree-ssa-propagate.c (cfg_blocks_back): New global.
528         (ssa_edge_worklist_back): Likewise.
529         (curr_order): Likewise.
530         (cfg_blocks_get): Remove abstraction.
531         (cfg_blocks_add): Likewise.
532         (cfg_blocks_empty_p): Likewise.
533         (add_ssa_edge): Add to current or next worklist based on
534         RPO index.
535         (add_control_edge): Likewise.
536         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
537         into ...
538         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
539         iteration from CFG and SSA edge worklist so we process
540         everything in RPO order, prioritizing forward progress
541         over iteration.
542         (ssa_prop_init): Allocate new worklists, do not dump
543         immediate uses.
544         (ssa_prop_fini): Free new worklists.
546 2018-10-05  Richard Biener  <rguenther@suse.de>
548         * tree-core.h (tree_block::abstract_flag): Remove.
549         (tree_block::block_num): Make full 32bits.
550         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
551         * tree.h (BLOCK_ABSTRACT): Remove.
552         * dwarf2out.c (gen_lexical_block_die): Remove dead code
553         resulting from BLOCK_ABSTRACT being always false.
554         (gen_inlined_subroutine_die): Likewise.
555         (gen_block_die): Likewise.
556         * tree.c (block_ultimate_origin): Likewise.
557         * tree-pretty-print.c (dump_block_node): Remove code dealing
558         with BLOCK_ABSTRACT.
559         * tree-ssa-live.c (dump_scope_block): Likewise.
560         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
561         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
563 2018-10-05   Richard Biener  <rguenther@suse.de>
565         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
566         is asked for initialize mode to the component mode of the
567         vector type.
569 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
571         PR target/87522
572         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
573         assembler for -mavx.
574         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
576 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
578         PR target/87509
579         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
580         RS6000_BTM_DFP.
581         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
582         to be DImode.  When using mffscrn, force the operand to a register.
584 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
586         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
587         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
588         X87MODEF mode iterator.
589         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
590         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
591         X87MODEF mode iterator.
593 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
595         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
596         -Wno-prio-ctor-dtor.
598 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
600         * Makefile.in (OBJS): Add opt-problem.o.
601         * dump-context.h: Include "selftest.h.
602         (selftest::temp_dump_context): New forward decl.
603         (class dump_context): Make friend of class
604         selftest::temp_dump_context.
605         (dump_context::dump_loc_immediate): New decl.
606         (class dump_pretty_printer): Move here from dumpfile.c.
607         (class temp_dump_context): Move to namespace selftest.
608         (temp_dump_context::temp_dump_context): Add param
609         "forcibly_enable_dumping".
610         (selftest::verify_dumped_text):
611         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
612         (selftest::verify_item):
613         (ASSERT_IS_TEXT): Move here from dumpfile.c.
614         (ASSERT_IS_TREE): Likewise.
615         (ASSERT_IS_GIMPLE): Likewise.
616         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
617         to...
618         (dump_context::dump_loc_immediate): ...this new function.
619         (class dump_pretty_printer): Move to dump-context.h.
620         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
621         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
622         (temp_dump_context::temp_dump_context): Move to "selftest"
623         namespace.  Add param "forcibly_enable_dumping", and use it to
624         conditionalize the use of m_pp;
625         (selftest::verify_dumped_text): Make non-static.
626         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
627         (selftest::verify_item): Make non-static.
628         (ASSERT_IS_TEXT): Move to dump-context.h.
629         (ASSERT_IS_TREE): Likewise.
630         (ASSERT_IS_GIMPLE): Likewise.
631         (selftest::test_capture_of_dump_calls): Pass "true" for new
632         param of temp_dump_context.
633         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
634         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
635         TDF_COMPARE_DEBUG.
636         * opt-problem.cc: New file.
637         * opt-problem.h: New file.
638         * optinfo-emit-json.cc
639         (selftest::test_building_json_from_dump_calls): Pass "true" for
640         new param of temp_dump_context.
641         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
642         (optinfo::emit_for_opt_problem): New function.
643         (optinfo::emit): Clarity which emit_item is used.
644         * optinfo.h (optinfo::get_dump_location): New accessor.
645         (optinfo::emit_for_opt_problem): New decl.
646         (optinfo::emit): Make const.
647         * selftest-run-tests.c (selftest::run_tests): Call
648         selftest::opt_problem_cc_tests.
649         * selftest.h (selftest::opt_problem_cc_tests): New decl.
650         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
651         bool to opt_result, converting fprintf messages to
652         opt_result::failure_at calls.  Add "stmt" param for use by the
653         failure_at calls.
654         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
655         (runtime_alias_check_p): Convert return type from bool to
656         opt_result, converting dump_printf calls to
657         opt_result::failure_at, using the statement DDR_A for their
658         location.
659         (find_data_references_in_stmt): Convert return type from bool to
660         opt_result, converting "return false" to opt_result::failure_at
661         with a new message.
662         * tree-data-ref.h: Include "opt-problem.h".
663         (dr_analyze_innermost): Convert return type from bool to opt_result,
664         and add a const gimple * param.
665         (find_data_references_in_stmt): Convert return type from bool to
666         opt_result.
667         (runtime_alias_check_p): Likewise.
668         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
669         dr_analyze_innermost.
670         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
671         Convert return type from bool to opt_result, adding a message for
672         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
673         (vect_analyze_data_ref_dependence): Convert return type from bool
674         to opt_result.  Change sense of return type from "false"
675         effectively meaning "no problems" to "false" meaning a problem,
676         so that "return false" becomes "return opt_result::success".
677         Convert "return true" calls to opt_result::failure_at, using
678         the location of statement A rather than vect_location.
679         (vect_analyze_data_ref_dependences): Convert return type from bool
680         to opt_result.
681         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
682         calls to opt_result::failure_at, using the stmt location rather
683         than vect_location.
684         (vect_verify_datarefs_alignment): Convert return type from bool
685         to opt_result.
686         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
687         into multiple more-tightly-scoped copies.
688         (vect_analyze_data_refs_alignment): Convert return type from bool
689         to opt_result.
690         (vect_analyze_data_ref_accesses): Likewise, converting a
691         "return false" to a "return opt_result::failure_at", adding a
692         new message.
693         (vect_prune_runtime_alias_test_list): Convert return type from
694         bool to opt_result, converting dump_printf_loc to
695         opt_result::failure_at.  Add a %G to show the pertinent statement,
696         and use the stmt's location rather than vect_location.
697         (vect_find_stmt_data_reference): Convert return type from
698         bool to opt_result, converting dump_printf_loc to
699         opt_result::failure_at, using stmt's location.
700         (vect_analyze_data_refs):  Convert return type from bool to
701         opt_result.  Convert "return false" to "return
702         opt_result::failure_at", adding messages as needed.
703         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
704         type from bool to opt_result.
705         (vect_determine_vf_for_stmt): Likewise.
706         (vect_determine_vectorization_factor): Likewise, converting
707         dump_printf_loc to opt_result::failure_at, using location of phi
708         rather than vect_location.
709         (vect_analyze_loop_form_1): Convert return type from bool to
710         opt_result, converting dump_printf_loc calls, retaining the use of
711         vect_location.
712         (vect_analyze_loop_form): Convert return type from loop_vec_info
713         to opt_loop_vec_info.
714         (vect_analyze_loop_operations): Convert return type from bool to
715         opt_result, converting dump_printf_loc calls, using the location
716         of phi/stmt rather than vect_location where available.  Convert
717         various "return false" to "return opt_result::failure_at" with
718         "unsupported phi" messages.
719         (vect_get_datarefs_in_loop): Convert return type from bool to
720         opt_result.  Add a message for the
721         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
722         (vect_analyze_loop_2): Convert return type from bool to
723         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
724         each "goto again;", adding new messages where needed.
725         Add "unsupported grouped {store|load}" messages.
726         (vect_analyze_loop): Convert return type from loop_vec_info to
727         opt_loop_vec_info.
728         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
729         bool to opt_result.
730         * tree-vect-stmts.c (process_use): Likewise, converting
731         dump_printf_loc call and using stmt location, rather than
732         vect_location.
733         (vect_mark_stmts_to_be_vectorized): Likeise.
734         (vect_analyze_stmt): Likewise, adding a %G.
735         (vect_get_vector_types_for_stmt): Convert return type from bool to
736         opt_result, converting dump_printf_loc calls and using stmt
737         location, rather than vect_location.
738         (vect_get_mask_type_for_stmt): Convert return type from tree to
739         opt_tree, converting dump_printf_loc calls and using stmt location.
740         * tree-vectorizer.c: Include "opt-problem.h.
741         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
742         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
743         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
744         enabled, use it to report at the top level "couldn't vectorize
745         loop" followed by the problem.
746         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
747         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
748         to opt_result.
749         (vect_analyze_stmt): Likewise.
750         (vect_get_vector_types_for_stmt): Likewise.
751         (tree vect_get_mask_type_for_stmt): Likewise.
752         (vect_analyze_data_ref_dependences): Likewise.
753         (vect_enhance_data_refs_alignment): Likewise.
754         (vect_analyze_data_refs_alignment): Likewise.
755         (vect_verify_datarefs_alignment): Likewise.
756         (vect_analyze_data_ref_accesses): Likewise.
757         (vect_prune_runtime_alias_test_list): Likewise.
758         (vect_find_stmt_data_reference): Likewise.
759         (vect_analyze_data_refs): Likewise.
760         (vect_analyze_loop): Convert return type from loop_vec_info to
761         opt_loop_vec_info.
762         (vect_analyze_loop_form): Likewise.
763         (vect_analyze_slp): Convert return type from bool to opt_result.
765 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
767         * doc/invoke.texi (-fopt-info): Document new "internals"
768         sub-option.
769         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
770         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
771         MSG_ALL_KINDS.
772         (optinfo_verbosity_options): Add "internals".
773         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
774         (dump_context::apply_dump_filter_p): New member function.
775         (dump_context::dump_loc): Use apply_dump_filter_p rather than
776         explicitly masking the dump_kind.
777         (dump_context::begin_scope): Increment the scope depth first.  Use
778         apply_dump_filter_p rather than explicitly masking the dump_kind.
779         (dump_context::emit_item): Use apply_dump_filter_p rather than
780         explicitly masking the dump_kind.
781         (dump_dec): Likewise.
782         (dump_hex): Likewise.
783         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
784         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
785         (opt_info_switch_p): Update handling of default
786         MSG_OPTIMIZED_LOCATIONS to cope with default of
787         MSG_PRIORITY_USER_FACING.
788         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
789         masking the dump_kind.
790         (selftest::test_capture_of_dump_calls): Update test_dump_context
791         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
792         than MSG_ALL.  Generalize scope test to be run at all four
793         combinations of with/without MSG_PRIORITY_USER_FACING and
794         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
795         for each of the two values.
796         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
797         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
798         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
799         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
800         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
801         with MSG_PRIORITY_*.
802         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
803         dump messages as MSG_PRIORITY_USER_FACING.
804         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
805         about the interaction with MSG_PRIORITY_*.
807 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
809         * varasm.c (output_constant): Add new parameter merge_strings.
810         Make strings properly zero terminated in merge string sections.
811         (mergeable_string_section): Don't fail if the last char is non-zero.
812         (assemble_variable_contents): Handle merge string sections.
813         (assemble_variable): Likewise.
814         (assemble_constant_contents): Likewise.
815         (output_constant_def_contents): Likewise.
816         (output_constructor_array_range,
817         output_constructor_regular_field): Adjust call to output_constant.
818         (output_object_block): Adjust call to assemble_constant_contents
819         and assemble_variable_contents.
821 2018-10-04  Martin Liska  <mliska@suse.cz>
823         PR c/87483
824         * cgraphunit.c (process_function_and_variable_attributes):
825         Warn about a function with alias attribute and a body.
827 2018-10-04  Martin Liska  <mliska@suse.cz>
829         PR ipa/82625
830         * multiple_target.c (redirect_to_specific_clone): New function.
831         (ipa_target_clone): Use it.
832         * tree-inline.c: Fix comment.
834 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
836         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
837         fields.
838         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
839         (gcc::dump_manager::register_pass): New member function, adapted
840         from loop body in gcc::pass_manager::register_pass, adding a
841         call to update_dfi_for_opt_info.
842         (gcc::dump_manager::opt_info_enable_passes): Store the
843         -fopt-info options into the new fields.  Move the loop
844         bodies into...
845         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
846         function.
847         * dumpfile.h (struct opt_pass): New forward decl.
848         (gcc::dump_manager::register_pass): New decl.
849         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
850         (class gcc::dump_manager): Add fields "m_optgroup_flags",
851         "m_optinfo_flags", and "m_optinfo_filename".
852         * passes.c (gcc::pass_manager::register_pass): Move all of the
853         dump-handling code to gcc::dump_manager::register_pass.
855 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
857         PR rtl-optimization/87466
858         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
859         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
860         * doc/tm.texi: Regenerate.
861         * ira-lives.c (process_bb_node_lives): Use the new target hook.
862         * lra-lives.c (process_bb_lives): Likewise.
863         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
864         Define.
866 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
868         * params.c (add_params): Fix initialization.
870 2018-10-04  Martin Liska  <mliska@suse.cz>
872         PR gcov-profile/84107
873         * tree-profile.c (init_ic_make_global_vars):
874         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
875         Come up with new ic_tuple* variables.  Emit
876         __gcov_indirect_call{,_topn} variables.
877         (gimple_gen_ic_profiler): Access the variable
878         and emit gimple.
879         (gimple_gen_ic_func_profiler): Access
880         __gcov_indirect_call.callee field.
881         (gimple_init_gcov_profiler): Use ptr_type_node.
882         * value-prof.c (gimple_ic): Use ptr_type_node.
884 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
886         PR tree-optimization/85787
887         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
888         into this function and add support for detecting multiple phis.
889         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
891 2018-10-04  Martin Liska  <mliska@suse.cz>
893         PR ipa/87491
894         * ipa-inline.c (inline_to_all_callers_1):
895         Call ultimate_alias_target for node being inlined.
897 2018-10-03  Jeff Law  <law@redhat.com>
899         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
900         target's wchar_t.
901         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
902         * tree.h (get_typenode_from_name): Prototype.
904 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
906         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
907         Change operand 2 predicate to nonimmediate_operand.
908         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
910 2018-10-03  Martin Sebor  <msebor@redhat.com>
911             Jeff Law  <law@redhat.com>
913         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
914         initialize it.
915         (get_string_length): Detect unterminated arrays.
916         (format_string): Same.
917         (format_directive): Warn about unterminated arrays.
918         (handle_gimple_call): Mark statements with no_warning as needed.
920 2018-10-03  Jim Wilson  <jimw@sifive.com>
922         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
923         also define __riscv_abi_rve.  Delete trailing white space.
925 2018-10-03  Paul Koning  <ni1d@arrl.net>
927         Enable LRA register allocator for PDP11.
928         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
929         (R): Likewise.
930         (D): Likewise.
931         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
932         * config/pdp11/pdp11.opt (-mlra): New option.
933         * doc/invoke.texi (PDP-11 Options): Document -mlra.
935 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
937         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
938         (*<absneg:code>extend<mode>xf2): Ditto.
940 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
942         PR tree-optimization/87415
943         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
944         precision fields.
946 2018-10-02  Jeff Law  <law@redhat.com>
948         * gimple-fold.c (get_range_strlen): Only set *nonstr when
949         an unterminated string is discovered.  Bubble up range
950         even for unterminated strings.
951         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
952         indicates the string was not terminated via NONSTR.
954 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
956         * tree-vrp.c (extract_range_from_unary_expr): Special case all
957         pointer conversions.
958         Do not do anything special for anti-ranges.
960 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
962         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
963         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
965 2018-10-03  Martin Liska  <mliska@suse.cz>
967         PR gcov-profile/86109
968         * coverage.c (coverage_begin_function): Do not
969         mark lambdas as artificial.
970         * tree-core.h (struct GTY): Remove tm_clone_flag
971         and introduce new lambda_function.
972         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
974 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
976         PR target/87474
977         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
978         P8_VECTOR and VSX are enabled.
980 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
982         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
983         0x3907 as CPU model number.
985 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
987         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
988         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
989         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
990         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
991         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
992         * config/s390/s390.md: Likewise. Rename also the cpu attribute
993         value from arch12 to z14.
995 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
997         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
998         (isinfxf2): Ditto.
999         (isinf<mode>2): Ditto.
1001 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
1003         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
1004         before emitting fxam.  Perform calculations in XFmode.
1006 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
1008         * match.pd (((X /[ex] A) +- B) * A): New transformation.
1010 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
1012         PR middle-end/87319
1013         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
1014         * tree.c (signed_or_unsigned_type_for): Handle complex.
1016 2018-10-02  Jeff Law  <law@redhat.com>
1018         * gimple-fold.c (get_range_strlen): Remove dead code.
1020 2018-10-02  Martin Sebor  <msebor@redhat.com>
1021             Jeff Law  <law@redhat.com>
1023         * builtins.c (unterminated_array): Add new arguments.
1024         If argument is not terminated, bubble up size and exact
1025         state to callers.
1026         (expand_builtin_strnlen): Detect, avoid expanding
1027         and diagnose unterminated arrays.
1028         (c_strlen): Fill in offset of start of unterminated strings.
1029         * builtins.h (unterminated_array): Update prototype.
1031 2018-10-02  Richard Biener  <rguenther@suse.de>
1033         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
1034         of haddv4df, first reduce to SSE width and exploit the fact
1035         that we only need element zero with the reduction result.
1036         (reduc_plus_scal_v2df): Likewise.
1038 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
1040         * dojump.h (do_jump): Delete.
1041         (do_jump_1): Likewise.
1042         (split_comparison): Move around.
1043         * dojump.c (do_jump): Make static.
1044         (do_jump_1): Likewise.
1045         (jumpifnot): Move around.
1046         (jumpifnot_1): Likewise.
1047         (jumpif): Likewise.
1048         (jumpif_1): Likewise.
1049         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
1051 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
1053         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
1054         insns in the delay slot and add_insn_after for the jump insn.
1056 2018-10-02  Richard Biener  <rguenther@suse.de>
1058         * tree-inline.c (expand_call_inline): Use the location of
1059         the callee declaration for the inline-entry marker.
1060         * final.c (notice_source_line): Remove special-casing of
1061         NOTE_INSN_INLINE_ENTRY.
1063 2018-10-01  Carl Love  <cel@us.ibm.com>
1065         PR 69431
1066         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
1067         (__builtin_mtfsb0): New.
1068         (__builtin_mtfsb1): New.
1069         ( __builtin_set_fpscr_rn): New.
1070         (__builtin_set_fpscr_drn): New.
1071         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
1072         (rs6000_expand_set_fpscr_rn_builtin): Add.
1073         (rs6000_expand_set_fpscr_drn_builtin): Add.
1074         (rs6000_expand_builtin): Add case statement entries for
1075         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
1076         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
1077         RS6000_BUILTIN_MFFSL.
1078         (rs6000_init_builtins): Add ftype initialization and def_builtin
1079         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
1080         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
1081         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
1082         rs6000_mffscdrn): Add define_insn.
1083         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
1084         * doc/extend.texi: Add documentation for the builtins.
1086 2018-10-01  Richard Biener  <rguenther@suse.de>
1088         PR tree-optimization/87465
1089         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
1090         causing branch miscounts.
1092 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1094         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
1095         aarch64_option_default_param):  New.
1096         (params.h): Include.
1097         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
1098         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
1099         stack-clash protection validation code.
1101 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1103         * params.c (validate_param): New.
1104         (add_params): Use it.
1105         (set_param_value): Refactor param validation into validate_param.
1106         (diagnostic.h): Include.
1107         * diagnostic.h (diagnostic_ready_p): New.
1109 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1111         * params.c (set_param_value):
1112         Add index of parameter being validated.
1113         * common/common-target.def (option_validate_param): New.
1114         * common/common-targhooks.h (default_option_validate_param): New.
1115         * common/common-targhooks.c (default_option_validate_param): New.
1116         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
1117         * doc/tm.texi: Regenerate.
1119 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1121         PR target/86486
1122         * config/aarch64/aarch64.c (aarch64_override_options_internal):
1123         Add validation for stack-clash parameters and set defaults.
1125 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1127         PR target/86486
1128         * configure.ac: Add stack-clash-protection-guard-size.
1129         * doc/install.texi: Document it.
1130         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
1131         * params.def: Update comment for guard-size.
1132         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
1133         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
1134         * configure: Regenerate.
1136 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1138         PR target/86486
1139         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
1140         STACK_DYNAMIC_OFFSET): New.
1141         * config/aarch64/aarch64.c (aarch64_layout_frame):
1142         Update outgoing args size.
1143         (aarch64_stack_clash_protection_alloca_probe_range,
1144         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1146 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1148         PR target/86486
1149         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
1150         probe ranges.
1151         * target.def (stack_clash_protection_alloca_probe_range): New.
1152         (stack_clash_protection_final_dynamic_probe): Remove.
1153         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
1154         (default_stack_clash_protection_final_dynamic_probe): Remove.
1155         * targhooks.c: Likewise.
1156         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1157         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
1158         * doc/tm.texi: Regenerate.
1160 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1162         PR target/86486
1163         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
1164         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
1165         aarch64_clamp_to_uimm12_shift): New.
1166         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
1167         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
1169 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1171         PR target/86486
1172         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
1174 2018-10-01  Jeff Law  <law@redhat.com>
1175             Richard Sandiford <richard.sandiford@linaro.org>
1176             Tamar Christina  <tamar.christina@arm.com>
1178         PR target/86486
1179         * config/aarch64/aarch64.md
1180         (probe_stack_range): Add k (SP) constraint.
1181         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
1182         STACK_CLASH_MAX_UNROLL_PAGES): New.
1183         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
1184         stack probes for stack clash.
1185         (aarch64_allocate_and_probe_stack_space): New.
1186         (aarch64_expand_prologue): Use it.
1187         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
1188         (aarch64_sub_sp): Add emit_move_imm optional param.
1190 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
1192         PR tree-optimization/87261
1193         * match.pd: Remove trailing whitespace.
1194         Add (x & y) | ~(x | y) -> ~(x ^ y),
1195         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
1197 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
1199         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
1200         constraints.
1201         (ashlsi3_insn): Update instruction constraints.
1202         (ashrsi3_insn): Likewise.
1203         (rotrsi3): Likewise.
1204         (add_shift): Likewise.
1205         * config/arc/constraints.md (Csz): New 32 bit constraint. It
1206         avoids placing in the limm field small constants which, otherwise,
1207         could end into a small instruction.
1209 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
1211         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
1212         destination register is not odd-even.
1213         (umaddsidi4_split): Likewise.
1215 2018-10-01  Richard Biener  <rguenther@suse.de>
1217         * tree-inline.c (expand_call_inline): Store origin of fn
1218         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
1219         * tree.c (block_ultimate_origin): Simplify and do some
1220         checking.
1222 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
1224         * config/i386/mmx.md (EMMS): New int iterator.
1225         (emms): New int attribute.
1226         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
1227         EMMS int iterator.  Explicitly declare clobbers.
1228         (mmx_emms): Remove expander.
1229         (mmx_femms): Ditto.
1230         * config/i386/predicates.md (emms_operation): Remove predicate.
1231         (vzeroall_pattern): New predicate.
1232         (vzeroupper_pattern): Rename from vzeroupper_operation.
1233         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
1234         vzeroupper_pattern and vzeroall_pattern predicates.
1236 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
1238         PR rtl-optimization/86939
1239         * ira-lives.c (make_hard_regno_born): Rename from this...
1240         (make_hard_regno_live): ... to this.  Remove update to conflict
1241         information.  Update function comment.
1242         (make_hard_regno_dead): Add conflict information update.  Update
1243         function comment.
1244         (make_object_born): Rename from this...
1245         (make_object_live): ... to this.  Remove update to conflict information.
1246         Update function comment.
1247         (make_object_dead):  Add conflict information update.  Update function
1248         comment.
1249         (mark_pseudo_regno_live): Call make_object_live.
1250         (mark_pseudo_regno_subword_live): Likewise.
1251         (mark_hard_reg_dead): Update function comment.
1252         (mark_hard_reg_live): Call make_hard_regno_live.
1253         (process_bb_node_lives): Likewise.
1254         * lra-lives.c (make_hard_regno_born): Rename from this...
1255         (make_hard_regno_live): ... to this.  Remove update to conflict
1256         information.  Remove now uneeded check_pic_pseudo_p argument.
1257         Update function comment.
1258         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
1259         to conflict information.  Update function comment.
1260         (mark_pseudo_live): Remove update to conflict information.  Update
1261         function comment.
1262         (mark_pseudo_dead): Add conflict information update.
1263         (mark_regno_live): Call make_hard_regno_live.
1264         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
1265         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
1267 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
1269         PR target/87370
1270         * config/i386/i386.c (construct_container): Use TImode for
1271         BLKmode values in 2 integer registers.
1273 2018-09-29  Jeff Law  <law@redhat.com>
1275         * builtins.c (unterminated_array): Pass in c_strlen_data * to
1276         c_strlen rather than just a tree *.
1277         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
1278         Update recursive calls appropriately.  If caller did not provide a
1279         suitable data pointer, create a local one.  When a non-terminated
1280         string is discovered, bubble up information about the string via the
1281         c_strlen_data object.
1282         * builtins.h (c_strlen): Update prototype.
1283         (c_strlen_data): New structure.
1284         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
1285         For a type 2 call, if c_strlen indicates a non-terminated string
1286         use the length of the non-terminated string.
1287         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
1289 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
1291         PR target/87467
1292         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
1293         __m512d type for __A argument rather than __m512.
1295 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
1297         * match.pd (simple_comparison): Don't optimize if either operand is
1298         a function pointer when target needs function pointer canonicalization.
1300 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1302         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
1303         power5 .. power9 to remove indirection.
1304         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
1305         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
1306         ASM_CPU_476_SPEC): Delete.
1307         (ASM_CPU_SPEC): Adjust.
1308         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
1309         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
1311 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1313         * config.in: Delete HAVE_AS_DCI.
1314         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
1315         * config/rs6000/rs6000.h: Ditto.
1316         * configure.ac: Delete HAVE_AS_DCI.
1317         * configure: Regenerate.
1319 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1321         * config.in (HAVE_AS_LWSYNC): Delete.
1322         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1323         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
1324         do it as a .long .
1325         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1326         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
1327         as a .long .
1328         * configure.ac: Delete HAVE_AS_LWSYNC.
1329         * configure: Regenerate.
1331 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
1332             Pierre-Marie de Rodat  <derodat@adacore.com>
1334         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
1335         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
1336         (cgraph_node::create_thunk): Add indirect_offset parameter.
1337         (thunk_adjust): Likewise.
1338         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
1339         and initialize the corresponding field with it.
1340         (cgraph_node::dump): Dump indirect_offset field.
1341         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
1342         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
1343         (thunk_adjust): Add indirect_offset parameter and deal with it.
1344         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
1345         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
1346         or if the thunk is external or local.  Fix formatting.  Do not chain
1347         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
1348         if any, in the GIMPLE representation.
1349         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
1350         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
1351         (input_node): Read indirect_offset field.
1352         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
1353         call to thunk_adjust.
1354         * tree-nested.c (struct nesting_info): Add thunk_p field.
1355         (create_nesting_tree): Set it.
1356         (convert_all_function_calls): Copy static chain from targets to thunks.
1357         (finalize_nesting_tree_1): Return early for thunks.
1358         (unnest_nesting_tree_1): Do not finalize thunks.
1359         (gimplify_all_functions): Do not gimplify thunks.
1361 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
1363         * opt-suggestions.c (option_proposer::build_option_suggestions):
1364         Release "option_values".
1366 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
1368         * coverage.c (get_coverage_counts): Convert problem-reporting dump
1369         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
1370         * dumpfile.c (kind_as_string): New function.
1371         (dump_loc): Rather than a hardcoded prefix of "note: ", use
1372         kind_as_string to vary the prefix based on dump_kind.
1373         (selftest::test_capture_of_dump_calls): Update for above.
1375 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
1377         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
1378         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
1380 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
1382         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
1383         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
1384         INVALID_REGNUM instead of FPSR_REG.
1385         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
1386         * config/i386/i386.md: Update comment of FP compares.
1387         (fldenv): Do not clobber FPSR_REG.
1389 2018-09-28  Richard Biener  <rguenther@suse.de>
1391         * tree.h (BLOCK_ORIGIN): New.
1392         * omp-expand.c (grid_expand_target_grid_body): Assign
1393         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
1394         * tree-inline.c (remap_block): Likewise.
1395         * auto-profile.c (get_function_decl_from_block): Simplify
1396         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
1397         * langhooks.c (lhd_print_error_function): Likewise.
1398         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
1399         Likewise.
1400         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
1401         * tree.c (block_nonartificial_location): Likewise.
1402         (block_ultimate_origin): Likewise.
1403         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
1404         no longer needed LTO case.
1406 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
1407             Jan Hubicka  <jh@suse.cz>
1408             Martin Jambor  <mjambor@suse.cz>
1410         * simplify-rtx.c (simplify_merge_mask): New function.
1411         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
1412         same masks are used in op1 or op2.
1413         (test_vec_merge): New function.
1414         (test_vector_ops): Call test_vec_merge.
1416 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
1418         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
1419         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
1420         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
1421         (cypress_costs): Set it.
1422         (supersparc_costs): Likewise.
1423         (hypersparc_costs): Likewise.
1424         (leon_cost): Likewise.
1425         (leon3_costs): Likewise.
1426         (sparclet_costs): Likewise.
1427         (ultrasparc_costs): Likewise.
1428         (ultrasparc_costs): Likewise.
1429         (niagara_costs): Likewise.
1430         (niagara2_costs): Likewise.
1431         (niagara3_costs): Likewise.
1432         (niagara4_costs): Likewise.
1433         (niagara7_costs): Likewise.
1434         (m8_costs): Likewise.
1435         (TARGET_CAN_FOLLOW_JUMP): Define.
1436         (pass_work_around_errata::gate): Minor tweak.
1437         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
1438         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
1439         Automaitcally clear MASK_FSMULD mask for V7 processors.
1440         (sparc_can_follow_jump): New static function.
1441         (output_ubranch): Deal with CROSSING_JUMP_P.
1442         (sparc_use_sched_lookahead): Rewrite using switch statement.
1443         (sparc_issue_rate): Reorder.
1444         (sparc_branch_cost): New function.
1446 2018-09-27  Martin Sebor  <msebor@redhat.com>
1448         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
1449         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
1450         (int_fits_type_p): Same.
1452 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
1454         * config/i386/i386.md (FPCR_REG): Remove.
1455         (UNSPEC_FLDCW): Remove.
1456         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
1457         (x86_fldcw_1): Remove insn pattern.
1458         (fnstenv): Do not clobber FPCR_REG.
1459         (fldenv): Ditto.
1460         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
1461         (CALL_USED_REGISTERS): Ditto.
1462         (REG_ALLOC_ORDER): Ditto.
1463         (REG_CLASS_CONTENTS): Ditto.
1464         (HI_REGISTER_NAMES): Ditto.
1465         (ADDITIONAL_REGISTER_NAMES): Use defines instead
1466         of numerical constants.
1467         * config/i386/i386.c (regclass_map): Remove fpsr register.
1468         (dbx_register_map): Ditto.
1469         (dbx64_register_map): Ditto.
1470         (svr4_dbx_register_map): Ditto.
1471         (print_reg): Do not handle FPCR_REG.
1473 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
1475         PR target/87149
1476         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
1477         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
1478         Delete, always treat as true.
1479         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1480         Ditto.  Simplify remaining code.
1481         * config/powerpcspe/powerpcspe.h: Ditto.
1482         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
1483         Simplify remaining code.
1484         (rs6000_expand_builtin): Ditto.
1485         * config/rs6000/rs6000.h: Ditto.
1486         * configure.ac: Ditto.
1487         * configure: Regenerate.
1489 2018-09-27  Martin Liska  <mliska@suse.cz>
1491         * coverage.c (get_coverage_counts): Revert the formatting
1492         of missing profile opt info.
1494 2018-09-27  Richard Biener  <rguenther@suse.de>
1496         PR debug/37801
1497         PR debug/87440
1498         * dwarf2out.c (set_block_origin_self): Do not mark outermost
1499         block as we do not output that.
1500         (gen_inlined_subroutine_die): Elide the originally outermost
1501         block, matching what we do for concrete instances.
1502         (decls_for_scope): Add parameter specifying whether to recurse
1503         to subblocks.
1505 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
1506             Tom de Vries  <tom@codesourcery.com>
1508         PR 82089
1510         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
1511         STORE_FLAG_VALUE == 1.
1513 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
1515         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
1516         constant definitions.
1517         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
1518         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
1519         ("speculation_barrier"): New expander definition.
1521 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
1523         PR gcov-profile/86957
1524         * common.opt: New warning option -Wmissing-profile.
1525         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
1526         * doc/invoke.texi: Document -Wmissing-profile.
1528 2018-09-26  Jim Wilson  <jimw@sifive.com>
1530         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
1531         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
1533 2018-09-26  Martin Sebor  <msebor@redhat.com>
1535         * tree.c (zerop): Change return type to bool.
1536         (integer_zerop, integer_onep, integer_each_onep): Same.
1537         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1538         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1539         (real_onep, real_minus_onep, chain_index): Same.
1540         (print_type_hash_statistics, type_list_equal): Same.
1541         * tree.h (zerop): Same.
1542         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
1543         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1544         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1545         (real_onep, real_minus_onep, chain_index): Same.
1546         (print_type_hash_statistics, type_list_equal): Same.
1548 2018-09-26  Jim Wilson  <jimw@sifive.com>
1550         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
1552 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
1554         PR target/87414
1555         * config/i386/i386.c: Include debug.h and dwarf2out.h.
1556         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
1557         call.
1559 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
1561         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
1563 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
1565         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
1566         and FP_SECOND_SSE_REGS.
1567         (REG_CLASS_NAMES): Ditto.
1568         (REG_CLASS_CONTENTS): Ditto.
1569         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
1570         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
1571         (ix86_preferred_output_reload_class): Ditto.
1572         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
1573         clobber constraint to "=&f".
1574         (fix_truncdi_i387): Ditto.
1575         (lrintxfdi2): Ditto.
1576         (fistdi2_<rounding>): Ditto.
1577         (fpremxf4_i387): Change "=u" constraint to "=f".
1578         (fprem1xf4_i387): Ditto.
1579         (sincosxf3): Ditto.
1580         (fptanxf4_i387): Ditto.
1581         (fxtractxf3_i387): Ditto.
1582         (fscalexf4_i387): Ditto.
1583         (atan2xf3): Change "u" constraint to "f".
1584         (fyl2xxf3_i387): Ditto.
1585         (fyl2xp1xf3_i387): Ditto.
1587 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
1589         PR target/87439
1590         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
1591         for removed I387_MASK_PM entity.
1594 2018-09-26  Jeff Law  <law@redhat.com>
1595         Revert
1596         2018-09-26  Alexey Neyman  <stilor@att.net>
1598         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1599         headers are no longer pulled in by <isl/val.h>.
1601 2018-09-26  Richard Biener  <rguenther@suse.de>
1603         PR debug/87443
1604         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
1605         or concrete instance DIE to the tree.  Create abstract origin
1606         attributes also for concrete instances.
1608 2018-09-26  Alexey Neyman  <stilor@att.net>
1610         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1611         headers are no longer pulled in by <isl/val.h>.
1613 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
1615         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
1616         Use new helper functions.
1617         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
1618         Use new helper functions.
1619         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
1620         aarch_mm_needs_release): New declarations.
1621         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
1622         aarch_mm_needs_release): New.
1624 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1626         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
1627         (arm32_output_mi_thunk): Deal with long calls.
1629 2018-09-26  Richard Biener  <rguenther@suse.de>
1631         PR debug/87428
1632         PR debug/87362
1633         * tree-inline.c (expand_call_inline): When the location
1634         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
1635         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
1636         the inserted BLOCK to make inlined_function_outer_scope_p
1637         recognize it.
1638         * dwarf2out.c (add_call_src_coords_attributes): Do not add
1639         coords for reserved locations.
1641 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
1643         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
1644         (*call_indirect_nonlocal_sysv<mode>): Ditto.
1645         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
1646         (*sibcall_nonlocal_sysv<mode>): Ditto.
1647         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
1648         (<bd>_<mode>): Ditto.
1649         (<bd>tf_<mode>): Ditto.
1651 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
1653         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
1654         control string as a list of templates instead of as C code.
1655         (*altivec_movti): Ditto.
1656         * config/rs6000/darwin.md (movdf_low_di): Ditto.
1658 2018-09-25  Jim Wilson  <jimw@sifive.com>
1660         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
1661         when target symbol is weak.
1663 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1665         PR c/87387
1666         * builtins.c (unterminated_array): Simplify.
1667         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
1668         where pointer arithmetic is safe.
1670 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
1672         PR target/86987
1673         * config/rs6000/altivec.md (altivec_vspltb): Use
1674         const_0_to_15_operand instead of u5bit_cint_operand.
1675         (*altivec_vspltb_internal): Ditto.
1676         (altivec_vspltb_direct): Ditto.
1677         (altivec_vsplth): Use const_0_to_7_operand instead of
1678         u5bit_cint_operand.
1679         (*altivec_vsplth_internal): Ditto.
1680         (altivec_vsplth_direct): Ditto.
1681         (altivec_vspltw): Use const_0_to_3_operand instead of
1682         u5bit_cint_operand.
1683         (*altivec_vspltw_internal): Ditto.
1684         (altivec_vspltw_direct): Ditto.
1685         (altivec_vspltsf): Ditto.
1686         (*altivec_vspltsf_internal): Ditto.
1687         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
1688         various splats with the proper size immediate.  Reorder the various
1689         cases by ascending size of immediate, and put all such together.
1691 2018-09-25  Richard Biener  <rguenther@suse.de>
1693         PR debug/83941
1694         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
1695         GC-ification.
1696         (maybe_create_die_with_external_ref): Do not create
1697         DW_TAG_imported_unit here.
1698         (add_abstract_origin_attribute): Handle external BLOCK refs.
1699         (dwarf2out_abstract_function): Simplify LTO case.
1700         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
1701         rather than using maybe_create_die_with_external_ref.
1703 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
1705         PR target/71278
1706         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
1707         (frndintxf2_mask_pm_i387): Ditto.
1708         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
1709         Enable for !flag_trapping_math.
1710         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
1711         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
1712         Change operand 1 predicate to nonimmediate_operand.
1713         (attr "i387_cw"): Remove mask_pm.
1714         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
1715         (enum ix86_entity): Remove I387_MASK_PM.
1716         * config/i386/i386.c (ix86_i387_mode_needed): Do not
1717         handle I387_MASK_PM.
1718         (ix86_mode_needed): Ditto.
1719         (ix86_mode_after): Ditto.
1720         (ix86_mode_entry): Ditto.
1721         (ix86_mode_exit): Ditto.
1722         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
1724 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
1726         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
1727         to_update_switch_stmts to vNULL instead of calling create on them
1728         immediately.
1730 2018-09-25  Richard Biener  <rguenther@suse.de>
1732         PR tree-optimization/87402
1733         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
1734         (visit_phi): Re-instantiate handling of supposed to be VARYING
1735         but non-VARYING backedge value.
1737 2018-09-25  Richard Biener  <rguenther@suse.de>
1739         PR debug/83941
1740         * dwarf2out.c (struct sym_off_pair): New.
1741         (external_die_map): New global.
1742         (lookup_decl_die): When in LTO create DIEs lazily from the
1743         external_die_map.
1744         (lookup_block_die): New function, create DIEs lazily in LTO.
1745         (equate_block_to_die): New function.
1746         (dwarf2out_die_ref_for_decl): During WPA get the association
1747         from the external DIE map.
1748         (dwarf2out_register_external_die): Record mapping into the
1749         external DIE map.
1750         (maybe_create_die_with_external_ref): New function split out from
1751         DIE generation part of old dwarf2out_register_external_die.
1752         (add_abstract_origin_attribute): Do not return the DIE.  When
1753         in LTO reference externals directly.
1754         (dwarf2out_abstract_function): When in LTO ignore calls for
1755         decls with external DIEs (already present abstract instances).
1756         (gen_call_site_die): Adjust.
1757         (add_high_low_attributes): Likewise.
1758         (gen_lexical_block_die): Likewise.
1759         (gen_inlined_subroutine_die): Likewie.
1760         (gen_block_die): Likewise.
1761         (dwarf2out_inline_entry): Likewise.
1762         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
1763         DIEs.
1765 2018-09-25  Martin Liska  <mliska@suse.cz>
1767         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
1768         integers and not by a float value.
1770 2018-09-25  Martin Liska  <mliska@suse.cz>
1772         PR fortran/87394
1773         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
1774         instead of NULL.
1775         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
1776         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
1777         * godump.c (go_format_type): Remove extra parenthesis.
1779 2018-09-25  Martin Liska  <mliska@suse.cz>
1781         * alias.c (set_dest_equal_p): Remove unused function.
1782         * config/i386/i386.c (def_builtin_pure2): Likewise.
1783         * diagnostic-show-locus.c (class layout): Remove
1784         unused field.
1785         (layout::layout): Likewise here.
1786         * dump-context.h (class temp_dump_context): Likewise.
1787         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
1788         (add_AT_loclistsptr): Likewise.
1789         (add_AT_offset): Likewise.
1790         (get_AT_hi_pc): Likewise.
1791         (is_comdat_die): Likewise.
1792         (type_is_enum): Likewise.
1793         (ceiling): Likewise.
1794         (add_AT_vms_delta): Likewise.
1795         (is_class_die): Likewise.
1796         * edit-context.c (class line_event): Remove unused field.
1797         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
1798         unused function.
1799         * ipa-cp.c (ipa_get_vr_lat): Likewise.
1800         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
1801         (ok_for_base_p_nonstrict): Likewise.
1802         * tree-chrec.c (is_not_constant_evolution): Likewise.
1803         (chrec_fold_poly_cst): Likewise.
1804         * tree-if-conv.c (has_pred_critical_p): Likewise.
1805         * tree-ssa-coalesce.c (print_exprs): Likewise.
1806         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
1807         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
1808         * tree-vrp.c (value_ranges_intersect_p): Likewise.
1809         (value_range_nonnegative_p): Likewise.
1811 2018-09-25  Martin Liska  <mliska@suse.cz>
1813         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
1814         Do not handle "GNU Pascal".
1815         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1816         Likewise.
1817         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
1818         from documentation. Likewise.
1819         * dbxout.c (dbxout_range_type): Likewise.
1820         * doc/cpp.texi: Likewise.
1821         * doc/extend.texi: Likewise.
1822         * doc/frontends.texi: Likewise.
1823         * doc/invoke.texi: Remove Pascal entry.
1824         * tree.def (CLEANUP_POINT_EXPR): Likewise.
1825         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
1827 2018-09-25  Martin Liska  <mliska@suse.cz>
1829         PR middle-end/86078
1830         * doc/invoke.texi: Document all parameters and remove default
1831         of the parameters.
1833 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
1835         PR bootstrap/87417
1836         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
1837         contains HOST_WIDE_INTs when computing its size.
1839 2018-09-24  Jim Wilson  <jimw@sifive.com>
1841         PR target/87391
1842         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
1843         not TARGET_RVE.
1844         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
1846 2018-09-24  Andrew Pinski  <apinski@marvell.com>
1848         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
1849         access prev before checking it for NULLness in the
1850         AARCH64_FUSE_CMP_BRANCH case.
1852 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
1854         PR target/82699
1855         * config/i386/i386.c (rest_of_insert_endbranch): Set
1856         endbr_queued_at_entrance to true and don't insert ENDBR if
1857         x86_function_profiler will be called.
1858         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
1859         is true.
1860         * config/i386/i386.h (machine_function): Add
1861         endbr_queued_at_entrance.
1863 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
1865         * genattrtab.c (mk_attr_alt): Use alternative_mask.
1866         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
1867         types.
1868         (check_attr_test): Use alternative_mask.
1869         (get_attr_value): Likewise.
1870         (compute_alternative_mask): Use alternative_mask and XWINT.
1871         (make_alternative_compare): Use alternative_mask.
1872         (attr_alt_subset_p): Use XWINT.
1873         (attr_alt_subset_of_compl_p): Likewise.
1874         (attr_alt_intersection): Use alternative_mask and XWINT.
1875         (attr_alt_union): Likewise.
1876         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
1877         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
1878         (simplify_test_exp): Use alternative_mask and XWINT.
1879         (write_test_expr): Use alternative_mask and XWINT, adjust bit
1880         number calculation to support 64 bits.  Generate code that
1881         checks 64-bit masks.
1882         (main): Use alternative_mask.
1883         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
1885 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
1887         PR target/80080
1888         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
1889         RETURN+USE when returning via %r14.
1891 2018-09-24  Martin Liska  <mliska@suse.cz>
1893         * gcov.c (output_lines): Print colorization legend
1894         for both flag_use_colors and flag_use_hotness_colors.
1895         Reword the help.
1897 2018-09-24  Martin Liska  <mliska@suse.cz>
1899         * coverage.c (get_coverage_counts): Use warning_at
1900         with current_function_decl location. Use %qD in warning
1901         message.
1903 2018-09-24  Martin Liska  <mliska@suse.cz>
1905         * memory-block.h (memory_block_pool::release): Annotate with
1906         valgrind that the memory is not accessible.
1908 2018-09-24  Martin Liska  <mliska@suse.cz>
1910         PR sanitizer/85774
1911         * asan.c: Make asan_handled_variables extern.
1912         * asan.h: Likewise.
1913         * cfgexpand.c (expand_stack_vars): Make sure
1914         a representative is unpoison if another
1915         variable in the partition is handled by
1916         use-after-scope sanitization.
1918 2018-09-24  Richard Biener  <rguenther@suse.de>
1920         PR tree-optimization/63155
1921         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
1922         the worklist when the edge of the respective argument isn't
1923         executable.
1925 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
1927         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
1928         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
1929         (MASK_CLASS_P): Update for rename.
1930         (MAYBE_MASK_CLASS_P): Ditto.
1931         (REG_CLASS_NAMES): Update.
1932         (REG_CLASS_CONTENT): Update.
1933         * config/i386/i386.c (regclass_map): Update for MASK_REG
1934         and ALL_MASK_REGS rename.
1935         * config/i386/constraints.md (Yk): Update for rename.
1936         (k): Ditto.
1938 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
1940         * config/i386/i386.h (enum reg_class): Remove
1941         EVEX_SSE_REGS and MOD4_SSE_REGS.
1942         (REG_CLASS_NAMES): Update.
1943         (REG_CLASS_CONTENT): Update.
1944         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
1945         registers as ALL_SSE_REGS.
1946         (ix86_additional_allocno_class_p): Remove.
1947         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
1948         (ix86_register_priority): Lower priority of EVEX SSE registers.
1949         Use IN_RANGE macro where appropriate.
1950         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
1951         AVX-5124VNNIW checks.
1952         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
1953         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
1954         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
1955         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
1956         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
1957         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
1958         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
1959         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
1960         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
1961         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
1962         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
1963         * config/i386/constraints.md (Yh): Remove.
1965 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
1967         * config/i386/i386.c (regclass_map): Declare integer REX registers
1968         as GENERAL_REGS.
1970 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
1972         * doc/service.texi (Service): Switch the fsf.org link to https.
1974 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
1976         PR target/86798
1977         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1978         Define to speculation_safe_value_not_needed.
1980 2018-09-21  Florian Weimer  <fweimer@redhat.com>
1982         PR middle-end/81035
1983         * doc/extend.texi (Common Function Attributes): Mention that
1984         noreturn suppresses tail call optimization.
1986 2018-09-21  Jeff Law  <law@redhat.com>
1988         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
1989         vr_values::cleanup_edges_and_switches.
1990         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
1991         vr_values class.
1992         (identify_jump_threads): Remove EDGE_IGNORE handling.
1993         (execute_vrp): Move handling of to_remove_edges and
1994         to_update_switch_stmts into vr_values class member functions.
1995         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
1996         (to_update_switch_stmts): Likewise.
1997         * vr-values.c: Include cfghooks.h.
1998         (vr_values::vr_values): Initialize to_remove_edges and
1999         to_update_switch_stmts.
2000         (vr_values::~vr_values): Verify to_remove_edges and
2001         to_update_switch_stmts are empty.
2002         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
2003         (vr_values::cleanup_edges_and_switches): New member function.
2004         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
2005         function.  Add new data members.
2007 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
2009         PR tree-optimization/87309
2010         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
2011         calls with pflags and alt_flags.
2012         (selftest::test_capture_of_dump_calls): Add test of interaction of
2013         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
2015 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2017         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
2019 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2021         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
2023 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2025         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
2026         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
2027         (VXWORKS_LIBS_RTP): Minor reordering.
2029 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2031         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
2032         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
2034 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2036         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
2037         (PTRDIFF_TYPE): Likewise.
2039 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2041         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
2042         triplet, similar to support for VxWorks7.
2043         * config/vxworks-dummy.h: Provide a default definition
2044         of TARGET_VXWORKS64 to 0.
2046 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2048         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
2049         * config/vxworks-dummy.h: here.
2051 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2053         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
2055 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
2056             Bo Zhou  <zbo.zhou@hisilicon.com>
2058         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
2059         * config/aarch64/aarch64-tune.md: Regenerated.
2060         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
2061         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
2062         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
2064 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
2065             Julian Brown  <julian@codesourcery.com>
2067         * builtins.c (get_builtin_sync_mem): Handle address spaces.
2069 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
2071         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
2072         if the call takes a static chain.
2074 2018-09-21  Martin Liska  <mliska@suse.cz>
2076         * auto-profile.c (autofdo_source_profile::read): Do not
2077         set sum_all.
2078         (read_profile): Do not add working sets.
2079         (read_autofdo_file): Remove sum_all.
2080         (afdo_callsite_hot_enough_for_early_inline): Remove const
2081         qualifier.
2082         * coverage.c (struct counts_entry): Remove gcov_summary.
2083         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
2084         do not support GCOV_TAG_PROGRAM_SUMMARY.
2085         (get_coverage_counts): Remove summary and expected
2086         arguments.
2087         * coverage.h (get_coverage_counts): Likewise.
2088         * doc/gcov-dump.texi: Remove -w option.
2089         * gcov-dump.c (dump_working_sets): Remove.
2090         (main): Do not support '-w' option.
2091         (print_usage): Likewise.
2092         (tag_summary): Likewise.
2093         * gcov-io.c (gcov_write_summary): Do not dump
2094         histogram.
2095         (gcov_read_summary): Likewise.
2096         (gcov_histo_index): Remove.
2097         (gcov_histogram_merge): Likewise.
2098         (compute_working_sets): Likewise.
2099         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
2100         it not obsolete.
2101         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
2102         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
2103         (GCOV_HISTOGRAM_SIZE): Remove.
2104         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
2105         (struct gcov_summary): Simplify rapidly just
2106         to runs and sum_max fields.
2107         (gcov_histo_index): Remove.
2108         (NUM_GCOV_WORKING_SETS): Likewise.
2109         (compute_working_sets): Likewise.
2110         * gcov-tool.c (print_overlap_usage_message): Remove
2111         trailing empty line.
2112         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
2113         (output_lines): Remove program related line.
2114         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
2115         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
2116         histogram.
2117         (input_profile_summary): Do not read it.
2118         (merge_profile_summaries): And do not merge it.
2119         (input_symtab): Do not call removed function.
2120         * modulo-sched.c (sms_schedule): Do not print sum_max.
2121         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
2122         removed when histogram method was invented.
2123         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
2124         mode.
2125         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
2126         GCOV coding style.
2127         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
2128         and dump selected value.
2129         * profile.c (add_working_set): Remove.
2130         (get_working_sets): Likewise.
2131         (find_working_set): Likewise.
2132         (get_exec_counts): Do not work with working sets.
2133         (read_profile_edge_counts): Do not inform as sum_max is removed.
2134         (compute_branch_probabilities): Likewise.
2135         (compute_value_histograms): Remove argument for call of
2136         get_coverage_counts.
2137         * profile.h: Do not make gcov_summary const.
2139 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
2141         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
2143 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
2145         PR tree-optimization/86990
2146         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
2147         Check that the entire merged store group is made of constants only for
2148         overlapping stores.
2150 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
2152         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
2153         (VTABLE_VERIFICATION_SPEC): Likewise.
2154         (SANITIZER_EARLY_SPEC): Likewise.
2155         (SANITIZER_SPEC): Likewise.
2156         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
2157         * doc/invoke.texi (Link Options): Document -r.
2159 2018-09-20  Richard Biener <rguenther@suse.de>
2161         PR middle-end/87054
2162         * gimplify.c (gimplify_expr): Retain alignment of
2163         addressable lvalue in dereference.
2165 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
2167         PR bootstrap/87013
2168         * configure.ac: Check for .loc is_stmt support.
2169         * configure, config.in: Rebuilt.
2170         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
2171         if not supported.
2173 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
2175         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
2176         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
2177         -misel=no.
2179 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
2181         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2182         VECTOR_OTHER.
2183         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
2184         case VECTOR_OTHER.
2186 2018-09-20  Marek Polacek  <polacek@redhat.com>
2188         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
2190 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
2192         PR tree-optimization/87288
2193         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
2194         into account when determining PEELING_FOR_NITERS.
2196 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
2198         PR tree-optimization/86877
2199         * tree-vect-loop.c (vect_analyze_loop_2): Call
2200         vect_verify_datarefs_alignment.
2202 2018-09-19  Marek Polacek  <polacek@redhat.com>
2204         * doc/invoke.texi: Document -Wclass-conversion.
2206 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
2208         * config/pa/pa.c (pa_adjust_priority): Delete.
2209         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
2211         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
2212         (atomic_storehi): Likewise.
2213         (atomic_storesi): Likewise.
2214         (atomic_loaddi): Restore compare and swap exchange loop code.
2216 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
2218         PR rtl-optimization/86902
2219         * combine.c (try_combine): When changing the CC mode used, don't change
2220         an unrelated mode in other_insn to that new CC mode.
2222 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
2224         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
2225         with %T in place of calls to dump_generic_expr.
2226         (prune_runtime_alias_test_list): Likewise.
2227         (create_runtime_alias_checks): Likewise.
2228         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
2229         (vect_analyze_data_ref_dependence): Likewise.
2230         (vect_slp_analyze_data_ref_dependence): Likewise.
2231         (vect_record_base_alignment): Likewise.  Use %G in place of call
2232         to dump_gimple_stmt.
2233         (vect_compute_data_ref_alignment): Likewise.
2234         (verify_data_ref_alignment): Likewise.
2235         (vect_find_same_alignment_drs): Likewise.
2236         (vect_analyze_group_access_1): Likewise.
2237         (vect_analyze_data_ref_accesses): Likewise.
2238         (dependence_distance_ge_vf): Likewise.
2239         (dump_lower_bound): Likewise.
2240         (vect_prune_runtime_alias_test_list): Likewise.
2241         (vect_find_stmt_data_reference): Likewise.
2242         (vect_analyze_data_refs): Likewise.
2243         (vect_create_addr_base_for_vector_ref): Likewise.
2244         (vect_create_data_ref_ptr): Likewise.
2245         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
2246         (vect_can_advance_ivs_p): Likewise.
2247         (vect_update_ivs_after_vectorizer): Likewise.
2248         (vect_gen_prolog_loop_niters): Likewise.
2249         (vect_prepare_for_masked_peels): Likewise.
2250         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2251         (vect_determine_vectorization_factor): Likewise.
2252         (vect_is_simple_iv_evolution): Likewise.
2253         (vect_analyze_scalar_cycles_1): Likewise.
2254         (vect_analyze_loop_operations): Likewise.
2255         (report_vect_op): Likewise.
2256         (vect_is_slp_reduction): Likewise.
2257         (check_reduction_path): Likewise.
2258         (vect_is_simple_reduction): Likewise.
2259         (vect_create_epilog_for_reduction): Likewise.
2260         (vect_finalize_reduction:): Likewise.
2261         (vectorizable_induction): Likewise.
2262         (vect_transform_loop_stmt): Likewise.
2263         (vect_transform_loop): Likewise.
2264         (optimize_mask_stores): Likewise.
2265         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
2266         (vect_split_statement): Likewise.
2267         (vect_recog_over_widening_pattern): Likewise.
2268         (vect_recog_average_pattern): Likewise.
2269         (vect_determine_min_output_precision_1): Likewise.
2270         (vect_determine_precisions_from_range): Likewise.
2271         (vect_determine_precisions_from_users): Likewise.
2272         (vect_mark_pattern_stmts): Likewise.
2273         (vect_pattern_recog_1): Likewise.
2274         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2275         (vect_record_max_nunits): Likewise.
2276         (vect_build_slp_tree_1): Likewise.
2277         (vect_build_slp_tree_2): Likewise.
2278         (vect_print_slp_tree): Likewise.
2279         (vect_analyze_slp_instance): Likewise.
2280         (vect_detect_hybrid_slp_stmts): Likewise.
2281         (vect_detect_hybrid_slp_1): Likewise.
2282         (vect_slp_analyze_operations): Likewise.
2283         (vect_slp_analyze_bb_1): Likewise.
2284         (vect_transform_slp_perm_load): Likewise.
2285         (vect_schedule_slp_instance): Likewise.
2286         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2287         (vect_mark_stmts_to_be_vectorized): Likewise.
2288         (vect_init_vector_1): Likewise.
2289         (vect_get_vec_def_for_operand): Likewise.
2290         (vect_finish_stmt_generation_1): Likewise.
2291         (vect_check_load_store_mask): Likewise.
2292         (vectorizable_call): Likewise.
2293         (vectorizable_conversion): Likewise.
2294         (vectorizable_operation): Likewise.
2295         (vectorizable_load): Likewise.
2296         (vect_analyze_stmt): Likewise.
2297         (vect_is_simple_use): Likewise.
2298         (vect_get_vector_types_for_stmt): Likewise.
2299         (vect_get_mask_type_for_stmt): Likewise.
2300         * tree-vectorizer.c (increase_alignment): Likewise.
2302 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
2304         * doc/rtl.texi: Adjust vec_select description.
2305         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
2306         non-constant selectors.
2308 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
2310         * config/aarch64/aarch64-protos.h
2311         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
2312         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
2313         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
2314         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
2315         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
2316         (AARCH64_FL_PROFILE): Move index so flags are ordered.
2317         (AARCH64_ISA_RCPC8_4): New flag.
2318         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
2319         to aarch64_offset_9bit_signed_unscaled_p.
2320         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
2321         and use stlur.
2322         * config/aarch64/constraints.md (Ust): New constraint.
2323         * config/aarch64/predicates.md.
2324         (aarch64_9bit_offset_memory_operand): New predicate.
2325         (aarch64_rcpc_memory_operand): New predicate.
2327 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
2329         PR rtl-optimization/87361
2330         * rtlanal.c (nonzero_bits1): Revert accidental change.
2332 2018-09-19  Richard Biener  <rguenther@suse.de>
2334         PR tree-optimization/87349
2335         PR tree-optimization/87342
2336         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
2338 2018-09-18  Marek Polacek  <polacek@redhat.com>
2340         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
2341         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
2343 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
2345         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
2347 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
2349         PR rtl-optimization/86882
2350         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
2352 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
2354         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
2355         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
2357 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
2359         PR other/87353
2360         * doc/invoke.texi (Link Options): Fix formatting and grammar.
2362 2018-09-18  Richard Biener  <rguenther@suse.de>
2364         PR middle-end/63155
2365         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
2366         (compute_samebase_partition_bases): Likewise.
2367         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
2368         (gimple_can_coalesce_p): Simplify.
2370 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
2372         Handle a library implementation of ffs calling __builtin_ffs.
2373         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
2374         (mmix_init_libfuncs): New function: make __builtin_ffs expand
2375         to __ffsdi2.
2377 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
2379         * diagnostic-show-locus.c (class layout_range): Add field
2380         "m_original_idx".
2381         (layout_range::layout_range): Add "original_idx" param and use it
2382         to initialize new field.
2383         (make_range): Use 0 for original_idx.
2384         (layout::layout): Pass in index to calls to
2385         maybe_add_location_range.
2386         (layout::maybe_add_location_range): Add param "original_idx" and
2387         pass it on to layout_range.
2388         (layout::print_any_labels): Pass on range->m_original_idx to
2389         get_text call.
2390         (gcc_rich_location::add_location_if_nearby): Use 0 for
2391         original_idx.
2392         * gcc-rich-location.h (text_range_label::get_text): Update for new
2393         param.
2394         (range_label_for_type_mismatch::get_text): Likewise.
2396 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
2398         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
2400 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
2402         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
2403         format_string_diagnostic_t.
2404         (fmtwarn_n): Likewise.
2405         * substring-locations.c
2406         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
2407         (format_warning_n_va): Convert to...
2408         (format_string_diagnostic_t::emit_warning_n_va): ...this.
2409         (format_warning_va): Convert to...
2410         (format_string_diagnostic_t::emit_warning_va): ...this.
2411         (format_warning_at_substring): Convert to...
2412         (format_string_diagnostic_t::emit_warning): ...this.
2413         (format_warning_at_substring_n): Convert to...
2414         (format_string_diagnostic_t::emit_warning_n): ...this.
2415         * substring-locations.h (class format_string_diagnostic_t): New
2416         class.
2417         (format_warning_va): Convert to
2418         format_string_diagnostic_t::emit_warning_va.
2419         (format_warning_n_va): Convert to
2420         format_string_diagnostic_t::emit_warning_n_va.
2421         (format_warning_at_substring): Convert to
2422         format_string_diagnostic_t::emit_warning.
2423         (format_warning_at_substring_n): Convert to
2424         format_string_diagnostic_t::emit_warning_n.
2426 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
2427             Bernd Schmidt <bernds_cb1@t-online.de>
2429         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
2430         SImode args.
2432 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
2434         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
2435         operand 0 predicate to nonimmediate operand.
2436         (rint<mode>2_frndint): Remove insn pattern.
2437         (rint<mode>2): Change operand 1 predicate to general_operand.
2438         Extend operand 1 to XFmode and generate rintxf2 insn.
2439         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
2440         Do not use X87MODEF mode macro.
2441         (frndintxf2_<rounding>_i387): Rename from
2442         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
2443         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
2444         to XFmode and generate significandxf3 insn.
2446 2018-09-17  Richard Biener  <rguenther@suse.de>
2448         PR tree-optimization/87328
2449         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
2450         visiting unexecutable backedges when not iterating.
2451         (do_rpo_vn): Mark all edges not executable even when not
2452         iterating.
2454 2018-09-17  Martin Jambor  <mjambor@suse.cz>
2456         PR c/63886
2457         * doc/invoke.texi (Warning Options): Likewise.
2459 2018-09-17  Richard Biener  <rguenther@suse.de>
2461         PR tree-optimization/87301
2462         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
2463         clean EH info from leftover copy assignments.
2465 2018-09-17  Martin Liska  <mliska@suse.cz>
2467         PR gcov-profile/85871
2468         * gcov.c (output_intermediate_file): Fix out of bounds
2469         access.
2471 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
2473         * config/arc/arc.c: Object attributes for core4 not reflected
2474         correctly.
2475         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
2476         core3).
2478 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
2480         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2482 2018-09-17  Martin Liska  <mliska@suse.cz>
2484         * doc/gcov.texi: Document new option --use-hotness-colors.
2485         * gcov.c (struct source_info): Declare new field.
2486         (source_info::source_info): Set default for maximum_count.
2487         (print_usage): Add new -q option.
2488         (process_args): Process it.
2489         (accumulate_line_info): Save src->maximum_count.
2490         (output_line_beginning): Make color line number if
2491         flag_use_hotness_colors is set.
2492         (output_line_details): Pass default argument value.
2493         (output_lines): Pass src->maximum_count.
2495 2018-09-17  Martin Liska  <mliska@suse.cz>
2497         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
2498         Use processor_names table.
2499         * config/i386/i386.c (ix86_default_align): Use
2500         processor_cost_table for alignment values.
2501         (ix86_option_override_internal): Use processor_names.
2502         (ix86_function_specific_print): Likewise.
2503         * config/i386/i386.h (struct processor_costs):
2504         Add alignment values.
2505         (struct ptt): Remove and replace with const char *.
2506         * config/i386/x86-tune-costs.h (struct processor_costs):
2507         Declare default alignments for all costs.
2509 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
2511         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
2512         symbolics or VR_VARYING ranges for ABS_EXPR.
2513         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
2514         when range will wrap.
2516 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
2518         PR middle-end/86864
2519         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
2520         before and after a JUMP_TABLE_DATA.
2522 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
2524         PR middle-end/87188
2525         * dojump.c (do_compare_and_jump): Canonicalize function pointers
2526         when one operand is a function pointer.  Use POINTER_TYPE_P and
2527         FUNC_OR_METHOD_TYPE_P.
2528         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
2529         * fold-const.c (build_range_check): Likewise.
2530         * match.pd (simple_comparison): Likewise.
2532 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
2534         PR c/82967
2535         * spellcheck.c (get_edit_distance_cutoff): New function.
2536         (selftest::test_edit_distance_unit_test_oneway): Rename to...
2537         (selftest::test_get_edit_distance_one_way): ...this.
2538         (selftest::test_get_edit_distance_unit): Rename to...
2539         (selftest::test_get_edit_distance_both_ways): ...this.
2540         (selftest::test_edit_distances): Move tests to this new function,
2541         and test some more pairs of strings.  Update for above renaming.
2542         (selftest::get_old_cutoff): New function.
2543         (selftest::test_get_edit_distance_cutoff): New function.
2544         (selftest::assert_suggested_for): New function.
2545         (ASSERT_SUGGESTED_FOR): New macro.
2546         (selftest::assert_not_suggested_for): New function.
2547         (ASSERT_NOT_SUGGESTED_FOR): New macro.
2548         (selftest::test_suggestions): New function.
2549         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
2550         tests to selftest::test_edit_distances and call it.  Add calls to
2551         selftest::test_get_edit_distance_cutoff and
2552         selftest::test_suggestions.
2553         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
2554         (best_match::consider): Replace hard-coded cutoff calculation with
2555         a call to...
2556         (best_match::get_cutoff): New declaration.
2557         (best_match::get_best_meaningful_candidate): Likewise.
2559 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2561         * builtins.c (fold_builtin_strlen): Remove TODO comment.
2563 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2565         revert:
2566         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2568         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2569         terminated string literal.
2571 2018-09-14  Martin Sebor  <msebor@redhat.com>
2573         * builtins.c (unterminated_array): Handle ARRAY_REF.
2574         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
2575         * builtins.h (unterminated_array): Declare extern.
2576         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
2577         arrays.
2578         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
2579         calls.
2581 2018-09-14  Martin Sebor  <msebor@redhat.com>
2582             Jeff Law  <law@redhat.com>
2584         * builtins.c (unterminated_array): New.
2585         (expand_builtin_strcpy): Adjust.
2586         (expand_builtin_strcpy_args): Detect unterminated arrays.
2587         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
2588         unterminated arrays.
2589         * gimple-fold.h (get_maxval_strlen): Add argument.
2590         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
2592         * gimple-fold.c (get_range_strlen): Add argument.
2593         (get_maxval_strlen): Adjust.
2594         * gimple-fold.h (get_range_strlen): Add argument.
2596 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
2598         * config/i386/movdirintrin.h: Fix copyright year.
2600 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
2602         * reg-stack.c: Include regs.h.
2603         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
2604         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
2605         FIRST_STACK_REG, not DFmode.
2606         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
2607         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
2608         (change stack): Default register mode to the reg_raw_mode of
2609         FIRST_STACK_REG, not DFmode.
2610         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
2611         (*swapxf): Rename from swapxf.
2613 2018-09-14  Carl Love  <cel@us.ibm.com>
2615         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
2616         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
2618 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
2620         PR target/87224
2621         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
2622         alternatives.
2624 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
2626         PR target/85628
2627         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
2629 2018-09-14  Jason Merrill  <jason@redhat.com>
2631         Fix --enable-gather-detailed-mem-stats.
2632         * hash-table.c (hash_table_usage): Change from variable to function.
2633         * hash-table.h: Adjust.
2634         * Makefile.in: Add missing dependencies on hash-table.h.
2636 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2638         PR tree-optimization/87259
2639         PR lto/87283
2640         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
2641         execute_cse_reciprocals_1 has tried transforming.
2643 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
2645         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
2646         VR_VARYING for PLUS/MINUS_EXPR.
2648 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
2650         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
2651         formatting.
2653 2018-09-14  Richard Biener  <rguenther@suse.de>
2655         PR middle-end/63155
2656         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
2657         bits for the merged partition.
2659 2018-09-13  Martin Sebor  <msebor@redhat.com>
2660             Bernd Edlinger  <bernd.edlinger@hotmail.de>
2662         * builtins.h (c_srlen): Add argument.
2663         * builtins.c (warn_string_no_nul): New function.
2664         (c_strlen): Add argument and use it.  Update recursive calls.
2665         Pass DECL argument to string_constant to get info on non
2666         terminated strings.  Update *NONSTR as needed.
2667         (fold_builtin_strlen): Add argument to calls to c_strlen.
2668         Warn for unterminated arrays.
2669         (warn_string_no_null): Add prototype.
2670         * expr.c (string_constant): Update arguments.  Update recursive
2671         calls appropriately.  Detect missing NUL terminator and outermost
2672         declaration its missing in.
2673         Improve checks for arrays with nonzero lower bound or elements
2674         that are not a single byte.  Simplify offset computation.
2675         Simplify checks for non-NUL terminated strings.
2676         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
2677         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
2679 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2681         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
2682         correctly.
2683         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
2684         argument.  Fix range checks.
2685         * fold-const.h (c_getstr): Adjust protoype.
2686         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
2687         string is constant but contains no NUL byte.
2689         * expr.c (string_constant): Adjust function comment.
2690         Remove bogus check for zero termination.
2692         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
2694         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
2695         (get_constant_size): Don't make STRING_CSTs larger than they are.
2696         (check_string_literal): New check function for STRING_CSTs.
2697         (output_constant): Use it.
2699 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
2701         PR target/86812
2702         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
2704 2018-09-13  Richard Biener  <rguenther@suse.de>
2706         PR tree-optimization/87263
2707         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
2708         (struct unwind_state): Add max_rpo field.
2709         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
2710         Compute max_rpo, the max RPO number a block can be backwards reached
2711         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
2712         separating it from the iterating mode.
2714 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
2716         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
2717         (rfs_decision): New scheduling decision.
2719 2018-09-13  Richard Biener  <rguenther@suse.de>
2721         PR bootstrap/87134
2722         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
2723         (vn_nary_op_insert_pieces_predicated): Do not write useless
2724         valid_dominated_by_p entry outside of the allocated storage.
2726 2018-09-13  Omar Sandoval  <osandov@osandov.com>
2727             Tom de Vries  <tdevries@suse.de>
2729         PR debug/86985
2730         * dwarf2out.c (is_c): New function.
2731         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
2733 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
2735         PR target/85628
2736         * config/aarch64/aarch64.md (*aarch64_bfxil):
2737         Define.
2738         * config/aarch64/constraints.md (Ulc): Define.
2739         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
2740         Define.
2741         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
2742         New function.
2744 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
2746         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
2747         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
2748         aarch64_layout_frame call.
2749         (aarch64_expand_epilogue): Likewise.
2750         (aarch64_initial_elimination_offset): Likewise.
2751         (aarch64_get_separate_components): Likewise.
2752         (aarch64_use_return_insn_p): Likewise.
2753         (aarch64_layout_frame): Remove unneeded check.
2755 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
2757         * configure.ac: Only append
2758         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
2759         gcc_config_arguments if it was never reconfigured or last reconfigure
2760         was with different arguments.
2761         * configure: Regenerated.
2763 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
2764             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2766         PR middle-end/87290
2767         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
2768         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
2770 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
2772         PR tree-optimization/87287
2773         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
2774         X % C == 0 to X % (unsigned) C == 0 optimization to ...
2775         * match.pd (X % C == 0): ... here.  New optimization.
2777 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
2779         PR middle-end/82853
2780         * expr.h (maybe_optimize_mod_cmp): Declare.
2781         * expr.c (mod_inv): New function.
2782         (maybe_optimize_mod_cmp): New function.
2783         (do_store_flag): Use it.
2784         * cfgexpand.c (expand_gimple_cond): Likewise.
2786 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
2787             Julian Brown  <julian@codesourcery.com>
2789         PR middle-end/86336
2790         * gimplify.c (gimplify_scan_omp_clauses): Set
2791         target_firstprivatize_array_bases in OpenACC parallel and kernels
2792         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
2793         OpenACC data regions.
2795 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
2797         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
2798         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
2800 2018-09-12  Richard Biener  <rguenther@suse.de>
2802         PR tree-optimization/87280
2803         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
2804         edge but unreachable target.
2805         (do_rpo_vn): For conservatively handling a PHI only mark
2806         the backedge executable but not the block reachable.
2808 2018-09-12  Richard Biener  <rguenther@suse.de>
2810         PR tree-optimization/87266
2811         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
2812         visited blocks.
2814 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
2816         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
2817         constants.
2818         ("trunc<BFP:mode><DFP_ALL:mode>2")
2819         ("trunc<DFP_ALL:mode><BFP:mode>2")
2820         ("extend<BFP:mode><DFP_ALL:mode>2")
2821         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
2822         according to the target operand type.
2824 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
2825             Andreas Krebbel  <krebbel@linux.ibm.com>
2827         PR tree-optimization/86844
2828         * gimple-ssa-store-merging.c
2829         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
2830         there are any overlapping stores in between them, make sure they are
2831         also coalesced or we give up completely.
2833 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
2835         PR middle-end/87248
2836         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
2837         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
2839 2018-09-12  Tom de Vries  <tdevries@suse.de>
2841         * common.opt (gdescribe-dies): Add option.
2842         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
2843         attribute for artifical and nameless decls.
2844         (dwarf2out_register_external_die): Add description attribute to
2845         external reference die.
2846         (add_desc_attribute): New functions.
2847         (gen_subprogram_die): Add description attribute to
2848         DW_TAG_call_site_parameter.
2849         * tree-pretty-print.c (print_generic_expr_to_str): New function.
2850         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
2851         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
2852         -gno-describe-dies.
2853         (@item -gdescribe-dies): Add.
2855 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
2857         * tree-vrp.c (vrp_shift_undefined_p): Remove.
2858         (extract_range_from_binary_expr_1: Call
2859         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
2860         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
2861         depend on sign.
2863 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
2865         * gimple-ssa-warn-alloca.c
2866         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
2867         field for ALLOCA_BOUND_*_LARGE.
2869 2018-09-11  Nathan Sidwell  <nathan@acm.org>
2871         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
2873 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
2875         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
2876         for clobbers.  Remove obsolete comment.
2878 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
2880         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
2881         mpxchk, mpxld and mpxst types.
2882         (define_attr length_immediate): Remove all processing of mpx types.
2883         (define_attr prefix_0f): Ditto.
2884         (define_attr memory): Ditto.
2886 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
2888         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
2889         (log<mode>2): Change operand 1 predicate to general_operand.
2890         Extend operand 1 to XFmode and generate logxf3 insn.
2891         (log10<mode>2): Change operand 1 predicate to general_operand.
2892         Extend operand 1 to XFmode and generate log10xf3 insn.
2893         (log2<mode>2): Change operand 1 predicate to general_operand.
2894         Extend operand 1 to XFmode and generate log2xf3 insn.
2895         (fyl2xp1_extend<mode>xf3_i387): Remove.
2896         (log1p<mode>2): Change operand 1 predicate to general_operand.
2897         Extend operand 1 to XFmode and generate log1pxf3 insn.
2898         (fxtract_extend<mode>xf3_i387): Remove.
2899         (logb<mode>2): Change operand 1 predicate to general_operand.
2900         Extend operand 1 to XFmode and generate logbxf3 insn.
2901         (ilogb<mode>2): Change operand 1 predicate to general_operand.
2902         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
2903         (significand<mode>2): Change operand 1 predicate to general_operand.
2904         Extend operand 1 to XFmode and generate significandxf3 insn.
2906 2018-09-11  Nathan Sidwell  <nathan@acm.org>
2908         * gcc.c (perror_with_name, pfatal_with_name): Delete.
2909         (load_specs): Use fatal_error.
2910         (DELETE_IF_ORDINARY, process_command): Use error.
2911         (execute, run_attempt): Use fatal_error.
2913 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
2915         * diagnostic-core.h (sorry_at): New prototype.
2916         * diagnostic.c (sorry_at): New function.
2918 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
2920         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
2921         by zero as VR_UNDEFINED.
2923 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
2925         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
2926         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
2927         (<sincos>mode2): New expander.
2928         (sincos_extend<mode>xf3_i387): Remove insn pattern.
2929         (sincos -> sin, cos splitters): Remove splitter patterns.
2930         (sincos<mode>3): Change operand 2 predicate to general_operand.
2931         Extend operand 2 to XFmode and generate sincosxf3 insn.
2932         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
2933         Change operand 3 predicate to const1_operand.
2934         (fptan_extend<mode>xf4_i387): Remove insn pattern.
2935         (tanxf2): Update operands in the call to fptanxf4_i387.
2936         (tan<mode>2): Change operand 1 predicate to general_operand.
2937         Extend operand 1 to XFmode and generate tanxf3 insn.
2938         (atan2xf3): Rename from *fpatanxf3_i387.
2939         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
2940         (atan2xf3): Remove expander.
2941         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
2942         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
2943         (atan<mode>2): Change operand 1 predicate to general_operand.
2944         Extend operand 1 to XFmode and generate atanxf3 insn.
2946 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
2948         * config/i386/i386.md (x87/SSE constant load splitter): Use
2949         memory_operand instead of nonimmediate_operand for input operand
2950         predicate.
2952 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
2954         * config/i386/i386.md (float partial SSE register stall splitter): Move
2955         splitter near its instruction pattern.
2956         (float_extend partial SSE register stall splitter): Ditto.
2957         (float_truncate partial SSE register stall splitter): Ditto.
2959 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
2961         PR target/86794
2962         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2963         to speculation_safe_value_not_needed.
2965         PR target/85666
2966         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
2967         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
2968         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
2969         leaf_function_p, instead use has_hard_reg_initial_val.
2971 2018-09-09  Nathan Sidwell  <nathan@acm.org>
2973         * gcc.h (pfatal_with_name): Don't declare here.
2974         * gcc.c (pfatal_with_name): Make static.
2976 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
2978         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
2979         earlyclobber.
2981 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
2983         PR rtl-optimization/85458
2984         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
2985         priority hook to reduce the priority of EXPR.
2987 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
2989         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
2990         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
2991         with X87_ENABLE_FLOAT.  Remove preparation code.
2992         (*float<SWI48:mode><MODEF:mode>2): Rename from
2993         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
2994         math using "enabled" attribute.
2995         (*floatdi<MODEF:mode>2_i387): Rename from
2996         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
2997         enable for 32bit targets only.
2998         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
2999         splitter.
3000         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
3001         as operand 1 predicate.  Rewrite as define_insn_and_split.
3002         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
3004 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
3006         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
3007         to fallthru to FLOAT case.
3009 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
3011         PR target/86731
3012         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
3013         around folding of vec_sl to handle out of range shift values.
3015 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
3017         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
3018         Update callers to gen_fix_trunc<mode>_i387_fisttp
3019         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
3020         nonimmediate_operand.
3021         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
3022         and corresponding splitters.
3023         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
3024         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
3025         (fix_truncdi_i387_with_temp): Remove insn pattern
3026         and corresponding splitters.
3027         (fix_trunc<mode>_i387): Change operand 0 predicate to
3028         nonimmediate_operand.
3029         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
3030         and corresponding splitters.
3031         (*fistdi2_1): Remove.
3032         (fistdi2): Ditto.
3033         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
3034         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
3035         (*fist<mode>2_1): Remove.
3036         (fist<mode>2): Ditto.
3037         (fist<mode>2_with_temp): Remove insn pattern and corresponding
3038         splitters.
3039         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
3040         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
3041         (fistdi2_<rounding>): Change operand 0 predicate to
3042         nonimmediate_operand.
3043         (fistdi2_<rounding>_with_temp): Remove insn pattern
3044         and corresponding splitters.
3045         (fist<mode>2_<rounding>): Change operand 0 predicate to
3046         nonimmediate_operand.
3047         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
3048         and corresponding splitters.
3050         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
3052 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3054         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
3055         the init value.
3057 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
3059         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
3060         early gimple folding of vec_splat().
3061         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
3062         * gimple-fold.h: Add an extern define for tree_vec_extract().
3064 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
3066         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
3067         wrappers around TREE_TYPE comparisons.
3069 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3071         PR target/80080
3072         * config/s390/predicates.md: Add nonsym_memory_operand.
3073         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
3074         contains a SYMBOL_REF, load it into an intermediate pseudo.
3075         (s390_emit_compare_and_swap): Legitimize operand.
3076         * config/s390/s390.md: Use the new nonsym_memory_operand
3077         with UNSPECV_CAS patterns.
3079 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3081         PR target/80080
3082         * config/s390/s390-passes.def: New file.
3083         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
3084         declaration.
3085         (make_pass_s390_early_mach): Add declaration.
3086         * config/s390/s390.c (make_pass_s390_early_mach):
3087         (s390_option_override): Remove dynamic registration.
3088         * config/s390/t-s390: Add s390-passes.def.
3090 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3092         * config/s390/s390.c (s390_decompose_constant_pool_ref):
3093         Remove UNSPEC_LTREL_BASE check.
3094         (annotate_constant_pool_refs): Likewise.
3095         (find_constant_pool_ref): Likewise.
3096         (find_ltrel_base): Removed.
3097         (replace_ltrel_base): Removed.
3098         (s390_mainpool_finish): Remove replace_ltrel_base call.
3099         (s390_chunkify_start): Remove pending LTREL_BASE logic.
3100         (s390_chunkify_finish): Remove replace_ltrel_base call.
3101         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
3103 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
3105         PR target/86779
3106         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3107         to speculation_safe_value_not_needed.
3109 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
3110             Bernd Schmidt  <bernds_cb1@t-online.de>
3112         * config/nvptx/nvptx-opts.h: New file.
3113         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
3114         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
3115         (ASM_SPEC): Define.
3116         (TARGET_SM35): New macro.
3117         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
3118         correct predicate.
3119         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
3120         values.
3121         (misa=): New option.
3122         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
3124 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
3126         * config/i386/i386.md (truncdfsf2): Remove expander.
3127         (truncdfsf2_with_temp): Ditto.
3128         (truncxf<mode>2): Ditto.
3129         (*truncdfsf_fast_mixed): Remove insn pattern.
3130         (*truncdfsf_fast_i387): Ditto.
3131         (*truncdfsf_mixed): Ditto.
3132         (*truncdfsf_i387): Ditto.
3133         (*truncdfsf2_i387_1): Ditto.
3134         (*truncxfsf2_mixed): Ditto.
3135         (*truncxfdf2_mixed): Ditto.
3136         (*truncxf<mode>2_i387_noop): Ditto. Update callers
3137         to call gen_truncxf<mode>2 instead.
3138         (*truncxf<mode>2_i387): Remove.
3139         (reg->reg splitters): Remove splitter pattern.
3140         (reg->mem splitters): Ditto.
3142         (truncdfsf2): New insn pattern.
3143         (truncxf<mode>2): Ditto.
3145 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3147         * tree-ssa-math-opts.c (is_mult_by): New function.
3148         (is_square_of): Use the above.
3149         (optimize_recip_sqrt): New function.
3150         (pass_cse_reciprocals::execute): Use the above.
3152 2018-09-05  Richard Biener  <rguenther@suse.de>
3154         PR bootstrap/87134
3155         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
3156         to zero-init the emplaced vec.
3158 2018-09-05  Martin Liska  <mliska@suse.cz>
3160         PR tree-optimization/87205
3161         * tree-switch-conversion.c (pass_lower_switch::execute):
3162         Group cases for switch statements.
3164 2018-09-05  Richard Biener  <rguenther@suse.de>
3166         PR tree-optimization/87217
3167         * tree-ssa-sccvn.c (vuse_valueize): New.
3168         (vn_reference_lookup_pieces): Use it.
3169         (vn_reference_lookup): Likewise.
3171 2018-09-05  Nathan Sidwell  <nathan@acm.org>
3173         PR c++/87137
3174         * stor-layout.c (place_field): Scan forwards to check last
3175         bitfield when ms_bitfield_placement is in effect.
3177 2018-09-05  Richard Biener  <rguenther@suse.de>
3179         PR bootstrap/87225
3180         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
3181         return.
3183 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
3184             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
3186         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
3187         * config.gcc (extra_objs): Build it.
3188         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
3189         Likewise.
3190         * config/aarch64/aarch64-passes.def
3191         (pass_tag_collision_avoidance): New pass.
3192         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
3193         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
3194         (aarch64_classify_address): Remove static qualifier.
3195         (aarch64_address_info, aarch64_address_type): Move to...
3196         * config/aarch64/aarch64-protos.h: ... here.
3197         (make_pass_tag_collision_avoidance): New function.
3198         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
3199         New tuning flag.
3201 2018-09-05  Martin Liska  <mliska@suse.cz>
3203         * doc/gcov.texi: Update documentation of humar
3204         readable mode.
3205         * gcov.c (format_count): Print one decimal place, it provides
3206         more fine number of situations like '1G' vs. '1.4G'.
3208 2018-09-05  Martin Liska  <mliska@suse.cz>
3210         PR target/87164
3211         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
3212         * optc-gen.awk: Allow 'Var' for Deprecated options in order
3213         to generate a MASK value.
3215 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
3217         PR debug/86593
3218         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
3219         if frame pointer isn't used.
3220         (compute_frame_pointer_to_fb_displacement): Likewise.
3222 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
3224         PR target/87198
3225         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
3226         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
3227         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
3228         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
3229         and OPTION_MASK_ISA_XSAVEC_UNSET.
3231 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
3233         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
3234         XOR operations in NAND case.
3236 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
3238         * wide-int-range.cc (wide_int_range_convert): New.
3239         * wide-int-range.h (wide_int_range_convert): New.
3240         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
3241         code into wide_int_range_convert.
3242         (extract_range_into_wide_ints): Do not munge anti range constants
3243         into the entire domain.  Just return the range back.
3245 2018-09-04  Martin Liska  <mliska@suse.cz>
3247         * genmatch.c (output_line_directive): Add new argument
3248         fnargs.
3249         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
3251 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
3253         * doc/invoke.texi (Option Summary): Add whitespace.
3255         * doc/invoke.texi (Option Summary): Add -Waligned-new.
3257 2018-09-04  Richard Biener  <rguenther@suse.de>
3259         PR tree-optimization/87211
3260         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
3261         backedge value we're supposed to treat as VARYING also number
3262         the PHI to VARYING in case it got a different value-number already.
3264 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
3266         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
3267         (extract_range_from_binary_expr_1): Do not call
3268         vrp_can_optimize_bit_op.
3269         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
3270         static.
3271         (wide_int_range_get_mask_and_bounds): New.
3272         (wide_int_range_optimize_bit_op): New.
3273         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
3274         (wide_int_range_bit_and): Same.
3275         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
3276         (wide_int_range_optimize_bit_op): New.
3277         (wide_int_range_get_mask_and_bounds): New.
3279 2018-09-04  Richard Biener  <rguenther@suse.de>
3281         PR tree-optimization/87176
3282         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
3283         variable.  When value-numbering a virtual PHI node make sure
3284         to not value-number to the backedge value.
3286 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
3288         * doc/extend.texi (Long Long, Hex Floats): Document support for
3289         long long and hex floats in more recent versions of ISO C++.
3291 2018-09-03  Richard Biener  <rguenther@suse.de>
3293         PR tree-optimization/87177
3294         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
3295         cleanup.
3297 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3299         * bb-reorder.c (edge_order): Convert to C-qsort-style
3300         tri-state comparator.
3301         (reorder_basic_blocks_simple): Change std::stable_sort to
3302         gcc_stablesort.
3304 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3306         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
3307         tri-state comparator.
3308         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
3310 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3312         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
3313         (mergesort): ... here as maximum count for using netsort.
3314         (gcc_qsort): Set nlim to 3 if stable sort is requested.
3315         (gcc_stablesort): New.
3316         * system.h (gcc_stablesort): Declare.
3318 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3320         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
3321         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
3322         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
3324 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
3326         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
3327         lxsdx and stxsdx alternatives.
3328         (*mov<mode>_hardfloat64): Ditto.
3329         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
3331 2018-09-03  Richard Biener  <rguenther@suse.de>
3333         PR tree-optimization/87200
3334         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
3335         simplify result.
3337 2018-09-03  Martin Liska  <mliska@suse.cz>
3339         PR tree-optimization/87201
3340         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3341         Fix parenthesis in an expression.
3343 2018-09-03  Richard Biener  <rguenther@suse.de>
3345         PR tree-optimization/87197
3346         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
3347         visited.  CSE the VN_INFO hashtable lookup.
3349         PR tree-optimization/87169
3350         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
3351         iterating make sure there's no extra backedges from irreducible
3352         regions feeding the header.  Mark the destination block
3353         executable.
3355 2018-09-03  Martin Liska  <mliska@suse.cz>
3357         PR driver/83193
3358         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
3359         * common/common-targhooks.c (default_get_valid_option_values):
3360         New function.
3361         * common/common-targhooks.h (default_get_valid_option_values):
3362         Likewise.
3363         * common/config/i386/i386-common.c: Move processor_target_table
3364         from i386.c.
3365         (ix86_get_valid_option_values): New function.
3366         (TARGET_GET_VALID_OPTION_VALUES): New macro.
3367         * config/i386/i386.c (struct ptt): Move to i386-common.c.
3368         (PTA_*): Move all defined masks into i386-common.c.
3369         (ix86_function_specific_restore): Use new processor_cost_table.
3370         * config/i386/i386.h (struct ptt): Moved from i386.c.
3371         (struct pta): Likewise.
3372         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
3373         * doc/tm.texi.in: Likewise.
3374         * opt-suggestions.c (option_proposer::suggest_option):
3375         Pass prefix to build_option_suggestions.
3376         (option_proposer::get_completions): Likewise.
3377         (option_proposer::build_option_suggestions): Use the new target
3378         hook.
3379         * opts.c (struct option_help_tuple): New struct.
3380         (print_filtered_help): Use the new target hook.
3382 2018-09-03  Martin Liska  <mliska@suse.cz>
3384         PR middle-end/59521
3385         * predict.c (set_even_probabilities): Add likely_edges
3386         argument and handle cases where we have precisely one
3387         likely edge.
3388         (combine_predictions_for_bb): Catch also likely_edges.
3389         (tree_predict_by_opcode): Handle gswitch statements.
3390         * tree-cfg.h (find_case_label_for_value): New declaration.
3391         (find_taken_edge_switch_expr): Likewise.
3392         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3393         Find pivot in decision tree based on probabily, not by number of
3394         nodes.
3396 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
3398         * doc/standards.texi (Standards): Update Objective-C reference.
3400 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
3402         * doc/install.texi (Prerequisites): Update link for MPC.
3404 2018-09-01  Michael Matz  <matz@suse.de>
3406         PR tree-optimization/87074
3407         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
3408         PHIs for outer-loop uses.
3410 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
3412         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
3413         * doc/invoke.texi (C Dialect Options): Ditto.
3415 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
3417         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
3419 2018-08-31  Richard Biener  <rguenther@suse.de>
3421         PR tree-optimization/87168
3422         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
3423         (rpo_elim::eliminate_avail): When OP was not visited it must
3424         be available.
3426 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
3428         * tree-vrp.c (copy_value_range): Convert param "from" from
3429         "value_range *" to "const value_range *".
3430         (range_is_null): Likewise for param "vr".
3431         (range_int_cst_p): Likewise.
3432         (range_int_cst_singleton_p): Likewise.
3433         (symbolic_range_p): Likewise.
3434         (value_ranges_intersect_p): Likewise for both params.
3435         (value_range_nonnegative_p): Likewise for param "vr".
3436         (value_range_constant_singleton): Likewise.
3437         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
3438         (extract_range_into_wide_ints): Likewise for param "vr".
3439         (extract_range_from_multiplicative_op): Likewise for params "vr0"
3440         and "vr1".
3441         (vrp_can_optimize_bit_op): Likewise.
3442         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
3443         "vr1_".
3444         (extract_range_from_unary_expr): Likewise.
3445         (debug_value_range): Likewise for param "vr".
3446         (value_range::dump): Add "const" qualifier.
3447         (vrp_prop::check_array_ref): Convert local "vr" from
3448         "value_range *" to "const value_range *".
3449         (vrp_prop::check_mem_ref): Likewise.
3450         (vrp_prop::visit_stmt): Likewise for local "old_vr".
3451         (vrp_intersect_ranges_1): Likewise for param "vr_1".
3452         (vrp_intersect_ranges): Likewise.
3453         (simplify_stmt_for_jump_threading): Likewise for local "vr".
3454         (vrp_prop::vrp_finalize): Likewise.
3455         * tree-vrp.h (value_range::dump): Add "const" qualifier.
3456         (vrp_intersect_ranges): Add "const" qualifier to params as above.
3457         (extract_range_from_unary_expr): Likewise.
3458         (value_range_constant_singleton): Likewise.
3459         (symbolic_range_p): Likewise.
3460         (copy_value_range): Likewise.
3461         (extract_range_from_binary_expr_1): Likewise.
3462         (range_int_cst_p): Likewise.
3463         (vrp_set_zero_nonzero_bits): Likewise.
3464         (range_int_cst_singleton_p): Likewise.
3466 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
3468         * config/aarch64/arm_neon.h (vabsd_s64): New.
3469         (vnegd_s64): Likewise.
3471 2018-08-31  Martin Jambor  <mjambor@suse.cz>
3473         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
3475 2018-08-31  Martin Liska  <mliska@suse.cz>
3477         * ipa-icf.c (sem_item::add_type): Use
3478         sem_item::m_type_hash_cache.
3479         * ipa-icf.h: Move the cache from sem_item_optimizer
3480         to sem_item.
3482 2018-08-31  Nathan Sidwell  <nathan@acm.org>
3484         * doc/extend.texi (Backwards Compatibility): Remove implicit
3485         extern C leeway of () being (...).
3487 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3489         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
3491 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
3493         PR target/86684
3494         PR target/87149
3495         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
3497 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
3499         PR middle-end/87138
3500         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
3501         gen_int_mode.  Formatting fixes.
3503 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
3505         * target.def (custom_function_descriptors): Improve documentation.
3506         * doc/tm.texi.in (Trampolines): Expand discussion of function
3507         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
3508         beginning of the section.
3509         * doc/tm.texi: Regenerated.
3511 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
3513         * cfg.h (class auto_edge_flag): Spell out the template-id of the
3514         base class in the initializer list.  This is a workaround for
3515         building with older GCC.
3516         (class auto_bb_flag): Likewise.
3518 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
3520         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
3521         (altivec_vcmpequ<VI_char>_p): Remove star.
3522         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
3523         vector load modes.
3524         (expand_strncmp_vec_sequence): New function.
3525         (emit_final_str_compare_vec): New function.
3526         (expand_strn_compare): Add support for vector strncmp.
3527         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
3528         length specification to bytes.
3529         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
3530         (vcmpnezb_p): New pattern.
3531         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
3532         for option -mstring-compare-inline-limit.
3534 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
3536         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
3537         (PTA_SKYLAKE): Add PTA_AES.
3538         (PTA_GOLDMONT): Likewise.
3540 2018-08-29  Jan Hubicka  <jh@suse.cz>
3542         PR lto/86517
3543         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
3544         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
3546 2018-08-29  Jan Hubicka  <jh@suse.cz>
3548         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
3549         TYPE_STUB_DECL.
3550         (hash_tree): Do not visit TYPE_STUB_DECL.
3551         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
3552         stream TYPE_STUB_DECL.
3553         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
3554         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
3555         after free_lang_data.
3556         (type_in_anonymous_namespace_p): Likewise.
3558 2018-08-29  Jan Hubicka  <jh@suse.cz>
3560         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3561         comment that it has to be even number.
3562         (class sreal): Change m_sig type to int32_t.
3563         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3564         int64_t for temporary calculations.
3565         (sreal_verify_basics): Drop one bit from minimum and maximum.
3567 2018-08-30  Richard Biener  <rguenther@suse.de>
3569         PR tree-optimization/87147
3570         * tree-ssa-sccvn.c (SSA_VISITED): New function.
3571         (visit_phi): When the degenerate result is from the backedge and
3572         we didn't visit its definition yet drop to VARYING.
3573         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
3575 2018-08-29  Jan Hubicka  <jh@suse.cz>
3577         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
3578         DECL_VINDEX.
3579         (hash_tree): Likewise.
3581 2018-08-29  Jan Hubicka  <jh@suse.cz>
3583         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
3584         and TYPE_NEXT_REF_TO.
3586 2018-08-29  Jan Hubicka  <jh@suse.cz>
3588         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3589         comment that it has to be even number.
3590         (class sreal): Change m_sig type to int32_t.
3591         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3592         int64_t for temporary calculations.
3593         (sreal_verify_basics): Drop one bit from minimum and maximum.
3595 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
3597         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
3599 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
3601         PR middle-end/86995
3602         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
3603         if to_add is negative.
3605 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3607         PR middle-end/87053
3608         * builtins.c (c_strlen): Improve range checks.
3610 2018-08-29  Martin Sebor  <msebor@redhat.com>
3611             Jeff Law  <law@redhat.com>
3613         PR tree-optimization/86714
3614         PR tree-optimization/86711
3615         * builtins.c (c_strlen): Add arguments to call to string_constant.
3616         * expr.c (string_constant): Add argument.  Detect missing nul
3617         terminator and outermost declaration it's missing in.
3618         * expr.h (string_constant): Add argument.
3619         * fold-const.c (read_from_constant_string): Add arguments to call to
3620         string_constant.
3621         (c_getstr): Likewise.
3622         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3623         to string_constant.
3624         * tree-ssa-strlen.c (get_stridx): Likewise.
3626 2018-08-29  Jan Hubicka  <jh@suse.cz>
3628         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
3629         Do not stream DECL_VINDEX.
3630         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
3631         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
3632         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
3634 2018-08-29  Richard Biener  <rguenther@suse.de>
3636         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
3637         virtual operands that are not default defs to honor region
3638         boundaries.
3639         (rpo_vn_valueize): Remove ineffective code here.
3641 2018-08-29  Richard Biener  <rguenther@suse.de>
3643         PR tree-optimization/87132
3644         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
3645         when skipping defs reachable over backedges.
3647 2018-08-29  Richard Biener  <rguenther@suse.de>
3649         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
3650         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
3651         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
3652         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
3653         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
3654         (vn_reference_lookup_3): Remove use of const_parms.
3655         (free_rpo_vn): Do not free const_parms.
3656         (do_rpo_vn): Do not call init_const_parms.
3657         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
3658         SSA_NAME_POINTS_TO_READONLY_MEMORY.
3659         (call_may_clobber_ref_p_1): Likewise.
3661 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
3663         PR other/86726
3664         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
3665         (-O): Ditto.
3666         (-ftree-scev-cprop): Document.
3668 2018-08-29  Jan Hubicka  <jh@suse.cz>
3670         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
3671         parameters.
3672         (sreal constructor): Update.
3673         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
3674         sreal:operator/): Update.
3676 2018-08-29  Martin Liska  <mliska@suse.cz>
3678         * tree-switch-conversion.c (switch_conversion::expand):
3679         Strenghten assumption about gswitch statements.
3681 2018-08-29  Richard Biener  <rguenther@suse.de>
3683         PR tree-optimization/87117
3684         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
3685         re-value-number released SSA VDEFs.
3687 2018-08-29  Richard Biener  <rguenther@suse.de>
3689         PR tree-optimization/87126
3690         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
3692 2018-08-28  Jim Wilson  <jimw@sifive.com>
3694         * config/riscv/pic.md: Rewrite.
3695         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
3696         invalid address.
3697         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
3698         (SOFTF, default_load, softload, softstore): New.
3700 2018-08-28  Jeff Law  <law@redhat.com>
3702         * fold-const.c (fold_binary_loc): Remove recently added assert.
3704 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
3706         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
3707         to OP parmeter of generated function.
3709 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
3711         PR tree-optimization/87009
3712         * match.pd: Add boolean optimizations.
3714 2018-08-28  Martin Sebor  <msebor@redhat.com>
3716         PR middle-end/86631
3717         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
3718         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
3719         (pass_walloca::gate): Use it.
3720         (alloca_call_type): Same.
3721         (pass_walloca::execute): Same.
3722         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
3724 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
3726         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
3727         GCC_VERSION for usage of "__gcc_dump_printf__" format from
3728         >= 3005 to >= 9000.
3730 2018-08-28  Richard Biener  <rguenther@suse.de>
3732         PR tree-optimization/87124
3733         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
3734         constants before looking up avail.
3736 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
3738         PR middle-end/87099
3739         * calls.c (maybe_warn_nonstring_arg): Punt early if
3740         warn_stringop_overflow is zero.  Don't call get_range_strlen
3741         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
3742         Swap comparison operands to have constants on rhs.  Only use
3743         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
3744         increment lenrng[0].
3746 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
3748         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
3749         use of tree_to_shwi.  Remove duplicated test for the size being
3750         a whole number of bytes.
3752 2018-08-28  Richard Biener  <rguenther@suse.de>
3754         PR tree-optimization/87117
3755         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
3756         Handle removed stmt without LHS (GIMPLE_NOP).
3758 2018-08-28  Richard Biener  <rguenther@suse.de>
3760         PR tree-optimization/87117
3761         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
3762         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
3764 2018-08-28  Richard Biener  <rguenther@suse.de>
3766         PR tree-optimization/87117
3767         * tree-ssa-pre.c (compute_avail): Do not make expressions
3768         with predicated values available.
3769         (get_expr_value_id): Assert we do not run into predicated value
3770         expressions.
3772 2018-08-28  Richard Biener  <rguenther@suse.de>
3774         PR tree-optimization/87117
3775         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
3776         get virtual operands.
3777         (get_expr_operands): Handle STRING_CST like other decls.
3779 2018-08-28  Martin Liska  <mliska@suse.cz>
3781         * tree.h: Update documentation of fndecl_built_in_p
3782         functions.
3785 2018-08-27  Jeff Law  <law@redhat.com>
3786         PR tree-optimization/87110
3787         * tree-ssa-dse.c (compute_trims): Handle non-constant
3788         TYPE_SIZE_UNIT.
3790 2018-08-27  Martin Sebor  <msebor@redhat.com>
3792         PR tree-optimization/86914
3793         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
3795 2018-08-27  Martin Sebor  <msebor@redhat.com>
3797         PR tree-optimization/87112
3798         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
3799         the type of the bound argument.
3801 2018-08-27  Jeff Law  <law@redhat.com>
3803         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
3804         type does not have a TYPE_SIZE_UNIT.
3806 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
3808         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
3809         with include of backend.h.
3811 2018-08-27  Richard Biener  <rguenther@suse.de>
3813         PR tree-optimization/86927
3814         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
3815         use const cond reduction code.
3817 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
3819         PR tree-optimization/85758
3820         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
3822 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
3824         PR c++/87091
3825         * diagnostic-show-locus.c (class layout_range): Update for
3826         conversion of show_caret_p to a tri-state.
3827         (layout_range::layout_range): Likewise.
3828         (make_range): Likewise.
3829         (layout::maybe_add_location_range): Likewise.
3830         (layout::should_print_annotation_line_p): Don't show annotation
3831         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
3832         (layout::get_state_at_point): Update for conversion of
3833         show_caret_p to a tri-state.  Bail out early for
3834         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
3835         underlining or source colorization.
3836         (gcc_rich_location::add_location_if_nearby): Update for conversion
3837         of show_caret_p to a tri-state.
3838         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
3839         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
3840         Likewise.
3841         (selftest::test_one_liner_labels): Likewise.
3842         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
3843         conversion of show_caret_p to a tri-state.
3844         * pretty-print.c (text_info::set_location): Likewise.
3845         * pretty-print.h (text_info::set_location): Likewise.
3846         * substring-locations.c (format_warning_n_va): Likewise.
3847         * tree-diagnostic.c (default_tree_printer): Likewise.
3848         * tree-pretty-print.c (newline_and_indent): Likewise.
3850 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
3852         PR c++/87091
3853         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
3854         line above for line-insertion fix-it hints.
3855         (selftest::test_fixit_insert_containing_newline): Update the
3856         expected results, and add a test with line-numbering enabled.
3858 2018-08-27  Martin Liska  <mliska@suse.cz>
3860         PR sanitizer/86962
3861         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
3862         params with DECL_HAS_VALUE_EXPR_P.
3864 2018-08-27  Martin Liska  <mliska@suse.cz>
3866         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
3867         selected expansion strategy.
3869 2018-08-27  Martin Liska  <mliska@suse.cz>
3871         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
3872         * builtins.c (is_builtin_fn): Likewise.
3873         * attribs.c (diag_attr_exclusions): Use new function
3874         fndecl_built_in_p and remove check for FUNCTION_DECL if
3875         possible.
3876         (builtin_mathfn_code): Likewise.
3877         (fold_builtin_expect): Likewise.
3878         (fold_call_expr): Likewise.
3879         (fold_builtin_call_array): Likewise.
3880         (fold_call_stmt): Likewise.
3881         (set_builtin_user_assembler_name): Likewise.
3882         (is_simple_builtin): Likewise.
3883         * calls.c (gimple_alloca_call_p): Likewise.
3884         (maybe_warn_nonstring_arg): Likewise.
3885         * cfgexpand.c (expand_call_stmt): Likewise.
3886         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
3887         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
3888         (cgraph_node::verify_node): Likewise.
3889         * cgraphclones.c (build_function_decl_skip_args): Likewise.
3890         (cgraph_node::create_clone): Likewise.
3891         * config/arm/arm.c (arm_insert_attributes): Likewise.
3892         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
3893         * dse.c (scan_insn): Likewise.
3894         * expr.c (expand_expr_real_1): Likewise.
3895         * fold-const.c (operand_equal_p): Likewise.
3896         (fold_binary_loc): Likewise.
3897         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
3898         * gimple-low.c (lower_stmt): Likewise.
3899         * gimple-pretty-print.c (dump_gimple_call): Likewise.
3900         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
3901         Likewise.
3902         * gimple.c (gimple_build_call_from_tree): Likewise.
3903         (gimple_call_builtin_p): Likewise.
3904         (gimple_call_combined_fn): Likewise.
3905         * gimplify.c (gimplify_call_expr): Likewise.
3906         (gimple_boolify): Likewise.
3907         (gimplify_modify_expr): Likewise.
3908         (gimplify_addr_expr): Likewise.
3909         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
3910         * ipa-cp.c (determine_versionability): Likewise.
3911         * ipa-fnsummary.c (compute_fn_summary): Likewise.
3912         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
3913         * ipa-split.c (visit_bb): Likewise.
3914         (split_function): Likewise.
3915         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3916         * lto-cgraph.c (input_node): Likewise.
3917         * lto-streamer-out.c (write_symbol): Likewise.
3918         * omp-low.c (setjmp_or_longjmp_p): Likewise.
3919         (lower_omp_1): Likewise.
3920         * predict.c (strip_predict_hints): Likewise.
3921         * print-tree.c (print_node): Likewise.
3922         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
3923         * trans-mem.c (is_tm_irrevocable): Likewise.
3924         (is_tm_load): Likewise.
3925         (is_tm_simple_load): Likewise.
3926         (is_tm_store): Likewise.
3927         (is_tm_simple_store): Likewise.
3928         (is_tm_abort): Likewise.
3929         (tm_region_init_1): Likewise.
3930         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
3931         * tree-cfg.c (verify_gimple_call): Likewise.
3932         (move_stmt_r): Likewise.
3933         (stmt_can_terminate_bb_p): Likewise.
3934         * tree-eh.c (lower_eh_constructs_2): Likewise.
3935         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
3936         * tree-inline.c (remap_gimple_stmt): Likewise.
3937         (copy_bb): Likewise.
3938         (estimate_num_insns): Likewise.
3939         (fold_marked_statements): Likewise.
3940         * tree-sra.c (scan_function): Likewise.
3941         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
3942         (optimize_stack_restore): Likewise.
3943         (pass_fold_builtins::execute): Likewise.
3944         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
3945         (mark_all_reaching_defs_necessary_1): Likewise.
3946         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
3947         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3948         (pass_forwprop::execute): Likewise.
3949         * tree-ssa-loop-im.c (stmt_cost): Likewise.
3950         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3951         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
3952         * tree-ssa-strlen.c (get_string_length): Likewise.
3953         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
3954         (find_func_aliases_for_call): Likewise.
3955         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
3956         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
3957         * tree-tailcall.c (find_tail_calls): Likewise.
3958         * tree.c (need_assembler_name_p): Likewise.
3959         (free_lang_data_in_decl): Likewise.
3960         (get_call_combined_fn): Likewise.
3961         * ubsan.c (is_ubsan_builtin_p): Likewise.
3962         * varasm.c (incorporeal_function_p): Likewise.
3963         * tree.h (DECL_BUILT_IN): Remove and replace with
3964         fndecl_built_in_p.
3965         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
3966         (fndecl_built_in_p): New.
3968 2018-08-27  Martin Liska  <mliska@suse.cz>
3970         PR tree-optimization/86847
3971         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
3972         Dump also subtree probability.
3973         (switch_decision_tree::do_jump_if_equal): New function.
3974         (switch_decision_tree::emit_case_nodes): Handle special
3975         situations in balanced tree that can be emitted much simpler.
3976         Fix calculation of probabilities that happen in tree expansion.
3977         * tree-switch-conversion.h (struct cluster): Add
3978         is_single_value_p.
3979         (struct simple_cluster): Likewise.
3980         (struct case_tree_node): Add new function has_child.
3981         (do_jump_if_equal): New.
3983 2018-08-27  Martin Liska  <mliska@suse.cz>
3985         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
3986         Add new argument to bit_test_cluster constructor.
3987         (bit_test_cluster::emit): Set bits really number of values
3988         handlel by a test.
3989         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
3990         probability argument.
3991         * tree-switch-conversion.h (struct bit_test_cluster):
3992         Add m_handles_entire_switch.
3994 2018-08-27  Martin Liska  <mliska@suse.cz>
3996         PR tree-optimization/86702
3997         * tree-switch-conversion.c (jump_table_cluster::emit):
3998         Make probabilities even for values in jump table
3999         according to number of cases handled.
4000         (switch_decision_tree::compute_cases_per_edge): Pass
4001         argument to reset_out_edges_aux function.
4002         (switch_decision_tree::analyze_switch_statement): Likewise.
4003         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
4004         Make it static.
4006 2018-08-27  Martin Liska  <mliska@suse.cz>
4008         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
4009         cfun argument explicitly.
4010         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
4011         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
4012         function gimple_switch_default_bb.
4013         (convert_switch_statements):
4014         (expand_builtins):
4015         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
4016         * stmt.c (label_to_block_fn): Use label_to_block and pass
4017         cfun argument explicitly and use gimple_switch_label_bb.
4018         (expand_case): Likewise.
4019         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
4020         cfun argument explicitly. Likewise.
4021         (make_edges_bb): Likewise.
4022         (make_cond_expr_edges): Likewise.
4023         (get_cases_for_edge): Likewise.
4024         (make_gimple_switch_edges): Likewise.
4025         (label_to_block_fn): Likewise.
4026         (label_to_block): Likewise.
4027         (make_goto_expr_edges): Likewise.
4028         (make_gimple_asm_edges): Likewise.
4029         (main_block_label): Likewise.
4030         (group_case_labels_stmt): Likewise.
4031         (find_taken_edge_computed_goto): Likewise.
4032         (find_taken_edge_switch_expr): Likewise.
4033         (gimple_verify_flow_info): Likewise.
4034         (gimple_redirect_edge_and_branch): Likewise.
4035         (gimple_switch_label_bb): New function.
4036         (gimple_switch_default_bb): Likewise.
4037         (gimple_switch_edge): Likewise.
4038         (gimple_switch_default_edge): Likewise.
4039         * tree-cfg.h (label_to_block_fn): Remove and replace ...
4040         (label_to_block): ... with this.
4041         (gimple_switch_label_bb): New.
4042         (gimple_switch_default_bb): Likewise.
4043         (gimple_switch_edge): Likewise.
4044         (gimple_switch_default_edge): Likewise.
4045         * tree-cfgcleanup.c (convert_single_case_switch): Use
4046         new gimple functions and pass new argument to label_to_block.
4047         (cleanup_control_flow_bb):
4048         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
4049         cfun argument explicitly.
4050         (make_eh_edges): Likewise.
4051         (redirect_eh_dispatch_edge): Likewise.
4052         (lower_resx): Likewise.
4053         (lower_eh_dispatch): Likewise.
4054         (maybe_remove_unreachable_handlers): Likewise.
4055         (unsplit_eh): Likewise.
4056         (cleanup_empty_eh): Likewise.
4057         (verify_eh_edges): Likewise.
4058         (verify_eh_dispatch_edge): Likewise.
4059         * tree-ssa-dom.c (record_edge_info): Likewise.
4060         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
4061         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
4062         (thread_through_normal_block): Likewise.
4063         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
4064         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
4065         * tree-switch-conversion.c (switch_conversion::collect): Use new
4066         gimple functions.
4067         (switch_conversion::check_final_bb): Likewise.
4068         (switch_conversion::gather_default_values): Pass new argument
4069         to label_to_block.
4070         (switch_conversion::build_constructors): Likewise.
4071         (switch_decision_tree::compute_cases_per_edge): Use new
4072         gimple_switch_edge function.
4073         (switch_decision_tree::analyze_switch_statement): Pass new argument
4074         to label_to_block.
4075         (switch_decision_tree::try_switch_expansion): Use
4076         gimple_switch_default_edge.
4077         * tree-vrp.c (find_switch_asserts): Pass new argument
4078         to label_to_block.
4079         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
4080         (vr_values::simplify_switch_using_ranges): Likewise.
4082 2018-08-27  Richard Biener  <rguenther@suse.de>
4084         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
4085         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
4087         * tree-ssa-sccvn.h (struct vn_pval): New structure.
4088         (struct vn_nary_op_s): Add unwind_to member.  Add
4089         predicated_values flag and put result into a union together
4090         with a linked list of vn_pval.
4091         (struct vn_ssa_aux): Add name member to make maintaining
4092         a map of SSA name to vn_ssa_aux possible.  Remove no longer
4093         needed info, dfsnum, low, visited, on_sccstack, use_processed
4094         and range_info_anti_range_p members.
4095         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
4096         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
4097         New functions.
4098         (vn_valueize): New global.
4099         (vn_context_bb): Likewise.
4100         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
4101         VN_INFO_PTR_INFO): Remove.
4102         * tree-ssa-sccvn.c: ... (rewrite)
4103         (pass_fre::execute): For -O2+ initialize loops and run
4104         RPO VN in optimistic mode (iterating).  For -O1 and -Og
4105         run RPO VN in non-optimistic mode.
4106         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
4107         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
4108         * doc/invoke.texi (sccvn-max-scc-size): Remove.
4109         (rpo-vn-max-loop-depth): Document.
4110         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
4111         when valuezing the VUSE signals we walked out of the region.
4112         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
4113         (phi_translate): Set VN context block to use for availability
4114         lookup.
4115         (compute_avail): Likewise.
4116         (pre_valueize): New function.
4117         (pass_pre::execute): Adjust to the RPO VN API.
4119         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
4120         (propagate_constants_for_unrolling): Remove.
4121         (tree_unroll_loops_completely): Perform value-numbering
4122         on the unrolled bodies loop parent.
4124 2018-08-27  Richard Biener  <rguenther@suse.de>
4126         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
4127         for partial antic compute.
4129 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
4131         PR rtl-optimization/87065
4132         * combine.c (simplify_if_then_else): Formatting fix.
4133         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
4134         check.
4135         (known_cond): Don't return const_true_rtx for vector modes.  Use
4136         CONST0_RTX instead of const0_rtx.  Formatting fixes.
4138 2018-08-27  Martin Liska  <mliska@suse.cz>
4140         PR gcov-profile/87069
4141         * gcov.c (process_file): Record files already processed
4142         and warn about a file being processed multiple times.
4144 2018-08-27  Martin Liska  <mliska@suse.cz>
4146         PR driver/83193
4147         * config/aarch64/aarch64.c (aarch64_override_options_internal):
4148         Set default values for x_aarch64_*_string strings.
4149         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
4150         prefix.  For -mabi do not print '=ABI' in help and use
4151         <option_value> format for -msve-vector-bits and -moverride
4152         options.
4154 2018-08-26  Jeff Law  <law@redhat.com>
4156         * config/mips/frame-header-opt.c: Include "backend.h" rather than
4157         "cfg.h"
4159 2018-08-26  Marek Polacek  <polacek@redhat.com>
4161         PR c++/87029, Implement -Wredundant-move.
4162         * doc/invoke.texi: Document -Wredundant-move.
4164 2018-08-25  Martin Sebor  <msebor@redhat.com>
4166         PR tree-optimization/87059
4167         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
4168         to the same type as the other.
4169         * fold-const.c (fold_binary_loc): Assert expectation.
4171 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
4173         * config/darwin.c (machopic_legitimize_pic_address): Clean up
4174         extraneous parentheses, dead code section and formatting.
4176 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
4178         PR c++/87091
4179         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
4180         wide enough for jumps in the line-numbering to be visible.
4181         (layout::print_gap_in_line_numbering): New member function.
4182         (layout::calculate_line_spans): When using line numbering, merge
4183         line spans that are only 1 line apart.
4184         (diagnostic_show_locus): When printing line numbers, show gaps in
4185         line numbering directly, rather than printing headers.
4186         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
4187         line-numbering with multiple line spans.
4188         (selftest::test_fixit_insert_containing_newline_2): Add test of
4189         line-numbering, in which the spans are close enough to be merged.
4191 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
4193         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
4194         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
4195         * tree-vrp.c (range_is_nonnull): Remove.
4196         (range_includes_zero_p): Accept value_range instead of min/max.
4197         (extract_range_from_binary_expr_1): Do not early bail on
4198         POINTER_PLUS_EXPR.
4199         Use range_includes_zero_p instead of range_is_nonnull.
4200         (extract_range_from_unary_expr): Use range_includes_zero_p instead
4201         of range_is_nonnull.
4202         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
4203         special case VR_ANTI_RANGE.
4204         (vrp_finalize): Same.
4205         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
4206         instead of min/max.
4207         (range_is_nonnull): Remove.
4208         * vr-values.c (vrp_stmt_computes_nonzero): Use
4209         range_includes_zero_p instead of range_is_nonnull.
4210         (extract_range_basic): Pass value_range to range_includes_zero_p
4211         instead of range_is_nonnull.
4213 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
4215         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
4216         * emit-rtl.h (rtl_data): Remove return_bnd.
4217         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
4218         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
4219         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
4220         (POINTER_BOUNDS_MODE): Remove definition.
4221         (make_pointer_bounds_mode): Remove.
4222         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
4223         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
4224         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
4225         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
4226         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
4227         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
4228         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
4230         * config/i386/i386-modes.def (BND32, BND64): Remove.
4231         * config/i386/i386.c (dbx_register_map): Remove bound registers.
4232         (dbx64_register_map): Ditto.
4233         (svr4_dbx_register_map): Ditto.
4234         (indirect_thunk_bnd_needed): Remove.
4235         (indirect_thunks_bnd_used): Ditto.
4236         (indirect_return_bnd_needed): Ditto.
4237         (indirect_return_via_cx_bnd): Ditto.
4238         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
4239         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
4240         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
4241         (output_indirect_thunk_function): Remove handling of
4242         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
4243         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
4244         (ix86_save_reg): Remove handling of crtl->return_bnd.
4245         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
4246         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
4247         and UNSPEC_BNDLX_ADDR.
4248         (ix86_output_indirect_branch_via_reg): Remove handling of
4249         indirect_thunk_prefix_bnd.
4250         (ix86_output_indirect_branch_via_push): Ditto.
4251         (ix86_output_function_return): Ditto.
4252         (ix86_output_indirect_function_return): Ditto.
4253         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
4254         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
4255         (CALL_USED_REGISTERS): Ditto.
4256         (REG_ALLOC_ORDER): Update for removal of bound registers.
4257         (HI_REGISTER_NAMES): Ditto.
4258         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
4259         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
4260         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
4261         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
4262         (FIRST_PSEUDO_REG): Update.
4263         (BND): Remove mode iterator.
4264         * config/i386/predicates.md (bnd_mem_operator): Remove.
4266 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
4268         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
4269         vectors.
4271 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
4273         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
4274         the case in which the permute needs only a single element and
4275         repeats for every vector of the result.  Extend that case to
4276         handle variable-length vectors.
4277         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4279 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
4281         PR debug/79342
4282         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
4283         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
4285 2018-08-24  Richard Biener  <rguenther@suse.de>
4287         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
4288         bb_flags_allocated members.
4289         (auto_flag): New RAII class for allocating flags.
4290         (auto_edge_flag): New RAII class for allocating edge flags.
4291         (auto_bb_flag): New RAII class for allocating bb flags.
4292         * cfgloop.c (verify_loop_structure): Allocate temporary edge
4293         flag dynamically.
4294         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
4295         in favor of temporarily allocated BB flag.
4296         * hsa-brig.c: Re-order includes.
4297         * hsa-dump.c: Likewise.
4298         * hsa-regalloc.c: Likewise.
4299         * print-rtl.c: Likewise.
4300         * profile-count.c: Likewise.
4302 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
4304         PR target/86989
4305         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
4306         the TOC register.
4308 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
4310         PR 87073/bootstrap
4311         * wide-int-range.cc (wide_int_range_div): Do not ignore result
4312         from wide_int_range_multiplicative_op.
4314 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4316         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
4317         "permutaion".
4319 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
4321         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
4322         to 'expanded'.
4324 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
4326         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
4327         full GENERIC expression used for replacement.
4329 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
4331         * tree-vrp.c (abs_extent_range): Remove.
4332         (extract_range_into_wide_ints): Pass wide ints by reference.
4333         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
4334         Pass wide ints by reference in all calls to
4335         extract_range_into_wide_ints.
4336         * wide-int-range.cc (wide_int_range_div): New.
4337         * wide-int-range.h (wide_int_range_div): New.
4338         (wide_int_range_includes_zero_p): New.
4339         (wide_int_range_zero_p): New.
4341 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
4343         * config/aarch64/aarch64.md (arches): New enum.
4344         (arch): New enum attr.
4345         (arch_enabled): New attr.
4346         (enabled): Now uses arch_enabled only.
4347         (simd, sve, fp16): Removed attribute.
4348         (fp): Attr now defined in terms of 'arch'.
4349         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
4350         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
4351         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
4352         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
4353         attributes into 'arch'.
4354         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
4355         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
4356         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
4357         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
4358         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
4359         'simd' attribute into 'arch'.
4360         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
4361         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
4362         Convert use of 'fp' attribute to 'arch'.
4363         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
4364         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
4365         into 'arch'.
4366         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
4367         (different modes) Merge 'fp' and 'simd' into 'arch'.
4368         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
4369         'simd' into 'arch'.
4371 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
4373         PR rtl-optimization/87026
4374         * expmed.c (canonicalize_comparison): If we can no longer create
4375         pseudoregisters, don't.
4377 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
4379         PR target/86951
4380         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
4381         prototype.
4382         * config/arm/arm.c (speculation_barrier_libfunc): New static
4383         variable.
4384         (arm_init_libfuncs): Initialize it.
4385         (arm_emit_speculation_barrier): New function.
4386         * config/arm/arm.md (speculation_barrier): Call
4387         arm_emit_speculation_barrier for architectures that do not have
4388         DSB or ISB.
4389         (speculation_barrier_insn): Only match on Armv7 or later.
4391 2018-08-23  Richard Biener  <rguenther@suse.de>
4393         PR middle-end/87024
4394         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
4395         calls.
4397 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
4399         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
4400         of single-vector TBLs.
4401         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
4402         one input is given.
4404 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
4406         PR target/85910
4407         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
4408         aarch64_evpc_tbl guard.
4410 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4412         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
4413         behaviour.
4415 2018-08-22  Martin Sebor  <msebor@redhat.com>
4417         PR middle-end/87052
4418         * tree-pretty-print.c (pretty_print_string): Add argument.
4419         (dump_generic_node): Call to pretty_print_string with string size.
4421 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
4423         PR rtl-optimization/86771
4424         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
4425         of two SETs into those two SETs, one to be placed at i2, if that SETs
4426         destination is modified between i2 and i3.
4428 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4430         PR tree-optimization/86725
4431         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
4432         function.
4433         (vect_analyze_scalar_cycles_1): Check it.
4435 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4437         PR tree-optimization/86725
4438         * tree-vect-loop.c (vect_is_simple_reduction): When treating
4439         an outer loop phi as a double reduction, make sure that the
4440         single user of the phi result is an inner loop phi.
4442 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4444         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
4445         grouped stores with gaps to a strided group.
4447 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4449         * tree-vect-stmts.c (get_group_load_store_type)
4450         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
4451         first statement in a group.
4453 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4455         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
4456         the sequence used in gcc/gcc.c.
4458 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4460         PR other/704
4461         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
4462         building it.
4464 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4466         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
4467         Darwin10-specific unwinder-shim.
4468         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
4469         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
4470         New to cater for Darwin10 Rosetta.
4472 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4474         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
4475         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
4477 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4479         PR bootstrap/81033
4480         PR target/81733
4481         PR target/52795
4482         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
4483         (dwarf2out_switch_text_section): Generate a local label for the
4484         second function sub-section and apply it as the second FDE start
4485         label.
4486         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
4487         second sub-section start.
4489 2018-08-22  Richard Biener  <rguenther@suse.de>
4491         PR tree-optimization/86988
4492         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
4494 2018-08-22  Richard Biener  <rguenther@suse.de>
4496         PR tree-optimization/86945
4497         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
4499 2018-08-22  Alexandre Oliva <oliva@adacore.com>
4501         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
4502         a comment about how uses of r2 for .sdata2 come about.
4504 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
4506         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
4508 2018-08-21  Marek Polacek  <polacek@redhat.com>
4510         PR c++/86981, Implement -Wpessimizing-move.
4511         * doc/invoke.texi: Document -Wpessimizing-move.
4513 2018-08-21  Jan Hubicka  <jh@suse.cz>
4515         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
4516         * tree.h (is_redundant_typedef): Remove.
4517         * dwarf2out.c (is_redundant_typedef): Turn into static function.
4519 2018-08-21  Jan Hubicka  <jh@suse.cz>
4521         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
4522         when possible.
4524 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
4526         * expmed.c (extract_low_bits): Reject invalid subregs early.
4528 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4530         PR middle-end/86121
4531         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
4532         behaviour.
4534 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4536         * config/vxworks.h: Guard vxworks_asm_out_constructor and
4537         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
4538         * config/vxworks.c: Likewise.
4540 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4542         * config/vxworks.c: Set targetm.have_ctors_dtors
4543         if HAVE_INITFINI_ARRAY_SUPPORT.
4544         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
4545         if HAVE_INITFINI_ARRAY_SUPPORT.
4547 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4549         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
4550         default search path for VxWorks < 7.
4552 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4554         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
4555         (get_format_string): Refer to c_getstr.
4557 2018-08-21  Tom de Vries  <tdevries@suse.de>
4559         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4560         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4561         (debuginfo_early_stop): Declare.
4562         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4563         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4564         (debuginfo_early_stop): New function.
4565         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
4566         and debuginfo_early_stop.
4567         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
4568         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
4569         (general_init): Call debuginfo_early_init.
4570         (finalize): Call debuginfo_fini.
4571         (do_compile): Call debuginfo_init.
4572         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
4573         -fdump-early-debug.
4574         (@item -fdump-debug, @item -fdump-earlydebug): Add.
4576 2018-08-21  Tom de Vries  <tdevries@suse.de>
4578         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
4579         flag_dump_noaddr and flag_dump_unnumbered.
4581 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
4583         * wide-int-range.cc (wide_int_range_abs): New.
4584         (wide_int_range_order_set): Rename from wide_int_range_min_max.
4585         * wide-int-range.h (wide_int_range_abs): New.
4586         (wide_int_range_min_max): New.
4587         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
4588         case to call wide_int_range_abs.
4589         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
4590         (extract_range_from_abs_expr): Delete.
4592 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
4594         PR target/87033
4595         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
4596         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
4597         for indexed loads.
4599 2018-08-20  Nathan Sidwell  <nathan@acm.org>
4600             Jeff Law <law@redhat.com>
4602         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
4603         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
4605 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
4607         PR other/84889
4608         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
4609         (decl_attributes): Likewise.
4610         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
4611         instance.
4612         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4613         * diagnostic-core.h (class auto_diagnostic_group): New class.
4614         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
4615         (diagnostic_report_diagnostic): Handle the first diagnostics within
4616         a group.
4617         (emit_diagnostic): Add auto_diagnostic_group instance.
4618         (inform): Likewise.
4619         (inform_n): Likewise.
4620         (warning): Likewise.
4621         (warning_at): Likewise.
4622         (warning_n): Likewise.
4623         (pedwarn): Likewise.
4624         (permerror): Likewise.
4625         (error): Likewise.
4626         (error_n): Likewise.
4627         (error_at): Likewise.
4628         (sorry): Likewise.
4629         (fatal_error): Likewise.
4630         (internal_error): Likewise.
4631         (internal_error_no_backtrace): Likewise.
4632         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
4633         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
4634         * diagnostic.h (struct diagnostic_context): Add fields
4635         "diagnostic_group_nesting_depth",
4636         "diagnostic_group_emission_count", "begin_group_cb",
4637         "end_group_cb".
4638         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
4639         Add auto_diagnostic_group instance(s).
4640         (find_explicit_erroneous_behavior): Likewise.
4641         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
4642         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
4643         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
4644         (gimplify_va_arg_expr): Likewise.
4645         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
4646         (HSA_SORRY_AT): Likewise.
4647         * ipa-devirt.c (compare_virtual_tables): Likewise.
4648         (warn_odr): Likewise.
4649         * multiple_target.c (expand_target_clones): Likewise.
4650         * opts-common.c (cmdline_handle_error): Likewise.
4651         * reginfo.c (globalize_reg): Likewise.
4652         * substring-locations.c (format_warning_n_va): Likewise.
4653         * tree-inline.c (expand_call_inline): Likewise.
4654         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
4655         * tree-ssa-loop-niter.c
4656         (do_warn_aggressive_loop_optimizations): Likewise.
4657         * tree-ssa-uninit.c (warn_uninit): Likewise.
4658         * tree.c (warn_deprecated_use): Likewise.
4660 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
4662         PR target/87014
4663         * config/i386/i386.md (eh_return): Always update EH return
4664         address in word_mode.
4666 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
4668         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
4669         TARGET_SPLIT_COMPLEX_ARG is defined.
4671 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4673         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
4675 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4677         PR target/86984
4678         * expr.c (expand_assignment): Assert that bitpos is positive.
4679         (store_field): Likewise
4680         (expand_expr_real_1): Make sure that bitpos is positive.
4681         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
4682         integer overflow.
4684 2018-08-20  Nathan Sidwell  <nathan@acm.org>
4686         * Makefile.in (CPP_ID_DATA_H): Delete.
4687         (CPP_INTERNAL_H): Don't add it.
4688         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
4689         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
4691 2018-08-20  Richard Biener  <rguenther@suse.de>
4693         PR tree-optimization/78655
4694         * tree-vrp.c (extract_range_from_binary_expr_1): Make
4695         pointer + offset nonnull if either operand is nonnull work.
4697 2018-08-20  Tom de Vries  <tdevries@suse.de>
4699         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
4700         unless the referenced die describes the added property using
4701         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
4702         Otherwise, add a DW_AT_location to the referenced die.
4704 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
4706         PR target/86994
4707         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
4708         register_operand when calling ix86_set_reg_reg_cost.
4709         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
4710         Set *total to 0 for operands that satisfy x86_64_immediate_operand
4711         predicate and to 1 otherwise.
4713 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
4715         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
4716         emit a diagnostic that it is not supported and reset the option.
4717         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
4718         supported and consume the option.  (ASM_FINAL_SPEC): New.
4720 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
4722         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
4723         a sentence.
4725 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
4727         C-SKY port: Documentation
4729         * doc/extend.texi (C-SKY Function Attributes): New section.
4730         * doc/invoke.texi (Option Summary): Add C-SKY options.
4731         (C-SKY Options): New section.
4732         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
4734 2018-08-17  Jojo  <jijie_rong@c-sky.com>
4735             Huibin Wang  <huibin_wang@c-sky.com>
4736             Sandra Loosemore  <sandra@codesourcery.com>
4737             Chung-Lin Tang  <cltang@codesourcery.com>
4739         C-SKY port: Backend implementation
4741         * config/csky/*: New.
4742         * common/config/csky/*: New.
4744 2018-08-17  Jojo  <jijie_rong@c-sky.com>
4745             Huibin Wang  <huibin_wang@c-sky.com>
4746             Sandra Loosemore  <sandra@codesourcery.com>
4747             Chung-Lin Tang  <cltang@codesourcery.com>
4748             Andrew Jenner  <andrew@codesourcery.com>
4750         C-SKY port: Configury
4752         * config.gcc (csky-*-*): New.
4753         * configure.ac: Add csky to targets for dwarf2 debug_line support.
4754         * configure: Regenerated.
4756 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
4758         * dump-context.h: Include "dumpfile.h".
4759         (dump_context::dump_printf_va): Convert final param from va_list
4760         to va_list *.  Convert from ATTRIBUTE_PRINTF to
4761         ATTRIBUTE_GCC_DUMP_PRINTF.
4762         (dump_context::dump_printf_loc_va): Likewise.
4763         * dumpfile.c: Include "stringpool.h".
4764         (make_item_for_dump_printf_va): Delete.
4765         (make_item_for_dump_printf): Delete.
4766         (class dump_pretty_printer): New class.
4767         (dump_pretty_printer::dump_pretty_printer): New ctor.
4768         (dump_pretty_printer::emit_items): New member function.
4769         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
4770         function.
4771         (dump_pretty_printer::emit_item): New member function.
4772         (dump_pretty_printer::stash_item): New member function.
4773         (dump_pretty_printer::format_decoder_cb): New member function.
4774         (dump_pretty_printer::decode_format): New member function.
4775         (dump_context::dump_printf_va): Reimplement in terms of
4776         dump_pretty_printer.
4777         (dump_context::dump_printf_loc_va): Convert final param from va_list
4778         to va_list *.
4779         (dump_context::begin_scope): Reimplement call to
4780         make_item_for_dump_printf.
4781         (dump_printf): Update for change to dump_printf_va.
4782         (dump_printf_loc): Likewise.
4783         (selftest::test_capture_of_dump_calls): Convert "stmt" from
4784         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
4785         with %T, %E, and %G.
4786         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
4787         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
4788         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
4789         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
4790         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
4791         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
4792         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
4793         within a dump_printf_loc call to "%wu".
4794         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
4795         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
4796         missing space after "=".
4797         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
4798         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
4799         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
4800         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
4801         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
4802         duplicate "vectorized" from message.
4804 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4806         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
4807         polyNxK_t element's TYPE_STRING_FLAG.
4809 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
4811         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
4812         (they were unnamed before).  Fix comments.
4814 2018-08-17  Nathan Sidwell  <nathan@acm.org>
4816         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
4818 2018-08-17  Richard Biener  <rguenther@suse.de>
4820         PR tree-optimization/86841
4821         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
4823 2018-08-17  Martin Liska  <mliska@suse.cz>
4825         * common.opt: Remove Warn, Init and Report for options with
4826         Ignore/Deprecated flag. Warning is done automatically for
4827         Deprecated flags.
4828         * config/i386/i386.opt: Likewise.
4829         * config/ia64/ia64.opt: Likewise.
4830         * config/rs6000/rs6000.opt: Likewise.
4831         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
4832         Remove usage of flag_check_pointer_bounds.
4833         * lto-wrapper.c (merge_and_complain): Do not handle
4834         OPT_fcheck_pointer_bounds.
4835         (append_compiler_options): Likewise.
4836         * opt-functions.awk: Do not handle Deprecated.
4837         * optc-gen.awk: Check that Var, Report and Init are not
4838         used for an option with Ignore/Deprecated flag.
4839         * opts-common.c (decode_cmdline_option): Do not report
4840         CL_ERR_DEPRECATED.
4841         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
4842         options.
4843         * opts.h (struct cl_option): Remove cl_deprecated flag.
4844         (CL_ERR_DEPRECATED): Remove error enum value.
4846 2018-08-17  Richard Biener  <rguenther@suse.de>
4848         PR middle-end/86505
4849         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
4850         across a va-arg-pack using call adjust its return value accordingly.
4852 2018-08-16  Martin Sebor  <msebor@redhat.com>
4854         PR tree-optimization/86853
4855         * gimple-ssa-sprintf.c (struct format_result): Rename member.
4856         (struct fmtresult): Add member and initialize it in ctors.
4857         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
4858         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
4859         (format_directive): Set POSUNDER4K when MAYFAIL is set.
4860         (parse_directive): Handle %C same as %c.
4861         (sprintf_dom_walker::compute_format_length): Adjust.
4862         (is_call_safe): Adjust.
4864 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4866         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
4867         for determining how to count the elements.
4868         * builtins.h (c_strlen): Adjust prototype.
4869         * expr.c (string_constant): Add new parameter mem_size.
4870         Set *mem_size appropriately.
4871         * expr.h (string_constant): Adjust protoype.
4872         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
4873         * gimple-fold.h (get_range_strlen): Adjust prototype.
4874         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
4875         (format_string): Call get_string_length with eltsize.
4877 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
4879         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
4880         to emit the span, rather than setting it as the prefix.
4882 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
4884         * diagnostic-show-locus.c (layout::start_annotation_line): Add
4885         "margin_char" parameter, defaulting to space.  Use it in place
4886         of pp_space for the initial part of the margin.
4887         (layout::print_leading_fixits): Use '+' when filling the margin
4888         of line-insertion fix-it hints.
4890 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4892         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
4893         Delete.
4895 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4897         * config/rs6000/altivec.md: Don't set length attribute to the default
4898         value.
4899         * config/rs6000/darwin.md: Ditto.
4900         * config/rs6000/dfp.md: Ditto.
4901         * config/rs6000/htm.md: Ditto.
4902         * config/rs6000/rs6000.md: Ditto.
4903         * config/rs6000/sync.md: Ditto.
4904         * config/rs6000/vsx.md: Ditto.
4906 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4908         * config/rs6000/altivec.md: Don't set length attribute to the default
4909         value, for branch instructions.
4910         * config/rs6000/darwin.md: Ditto.
4911         * config/rs6000/rs6000.md: Ditto.
4913 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4915         * config/rs6000/rs6000.md (length): Always define as const_int 4.
4916         (unnamed conditional branch define_insn): Set length to 4 or 8
4917         depending on offset.
4918         (<bd>_<mode>): Similar, for alternative 0.
4919         (<bd>tf_<mode>): Ditto.
4921 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
4923         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
4925 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
4927         * doc/rtl.texi: Replace old RTX class names with new names.
4930 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
4932         * expmed.h (canonicalize_comparison): New declaration.
4933         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
4934         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
4935         * optabs.c (prepare_cmp_insn): Likewise.
4936         * rtl.h (unsigned_condition_p): New function which checks if a
4937         comparison operator is unsigned.
4939 2018-08-16  Nathan Sidwell  <nathan@acm.org>
4941         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
4942         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
4944 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
4946         PR target/84711
4947         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
4948         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
4949         (mov<mov>): ..this and enable unconditionally.
4951 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
4953         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
4955 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
4957         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
4958         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
4959         "Common" with "Target".
4961 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
4963         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
4964         * doc/invoke.texi (mmitigate-rop): Remove.
4965         * config/i386/i386.c: Do not include "regrename.h".
4966         (ix86_rop_should_change_byte_p, reg_encoded_number)
4967         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
4968         Remove.
4969         (ix86_reorg): Remove call to ix86_mitigate_rop.
4970         * config/i386/i386.md (attr "modrm_class"): Remove.
4971         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
4972         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
4973         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
4975 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
4977         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
4978         allow folding of mergeh() and mergel() for the float and double types.
4979         (fold_mergehl_helper): Rework to handle building a permute tree
4980         for float vectors.
4982 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
4984         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
4985         for TARGET_SSE.
4987 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
4989         * common.opt (fdiagnostics-show-labels): New option.
4990         * diagnostic-show-locus.c (class layout_range): Add field
4991         "m_label".
4992         (class layout): Add field "m_show_labels_p".
4993         (layout_range::layout_range): Add param "label" and use it to
4994         initialize m_label.
4995         (make_range): Pass in NULL for new "label" param of layout_range's
4996         ctor.
4997         (layout::layout): Initialize m_show_labels_p.
4998         (layout::maybe_add_location_range): Pass in loc_range->m_label
4999         when constructing layout_range instances.
5000         (struct line_label): New struct.
5001         (layout::print_any_labels): New member function.
5002         (layout::print_line): Call it if label-printing is enabled.
5003         (selftest::test_one_liner_labels): New test.
5004         (selftest::test_diagnostic_show_locus_one_liner): Call it.
5005         * diagnostic.c (diagnostic_initialize): Initialize
5006         context->show_labels_p.
5007         * diagnostic.h (struct diagnostic_context): Add field
5008         "show_labels_p".
5009         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5010         -fno-diagnostics-show-labels.
5011         * dwarf2out.c (gen_producer_string): Add
5012         OPT_fdiagnostics_show_labels to the ignored options.
5013         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
5014         param.
5015         (gcc_rich_location::maybe_add_expr): Likewise.
5016         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
5017         label" param, defaulting to NULL.
5018         (gcc_rich_location::add_expr): Add "label" param.
5019         (gcc_rich_location::maybe_add_expr): Likewise.
5020         (class text_range_label): New class.
5021         (class range_label_for_type_mismatch): New class.
5022         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
5023         of format_warning_va.
5024         (fmtwarn_n): Likewise for new params of format_warning_n_va.
5025         * lto-wrapper.c (merge_and_complain): Add
5026         OPT_fdiagnostics_show_labels to the "pick one setting" options.
5027         (append_compiler_options): Likewise to the dropped options.
5028         (append_diag_options): Likewise to the passed-on options.
5029         * opts.c (common_handle_option): Handle the new option.
5030         * selftest-diagnostic.c
5031         (test_diagnostic_context::test_diagnostic_context): Enable
5032         show_labels_p.
5033         * substring-locations.c: Include "gcc-rich-location.h".
5034         (format_warning_n_va): Add "fmt_label" and "param_label" params
5035         and use them as appropriate.
5036         (format_warning_va): Add "fmt_label" and "param_label" params,
5037         passing them on to format_warning_n_va.
5038         (format_warning_at_substring): Likewise.
5039         (format_warning_at_substring_n): Likewise.
5040         * substring-locations.h (format_warning_va): Add "fmt_label" and
5041         "param_label" params.
5042         (format_warning_n_va): Likewise.
5043         (format_warning_at_substring): Likewise.
5044         (format_warning_at_substring_n): Likewise.
5045         * toplev.c (general_init): Initialize global_dc->show_labels_p.
5047 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
5049         PR testsuite/86519
5050         * builtins.c (expand_builtin_memcmp): Do not expand the call
5051         when overflow is detected.
5053 2018-08-15  Martin Sebor  <msebor@redhat.com>
5055         PR tree-optimization/71625
5056         * config/aarch64/aarch64-builtins.c
5057         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
5059 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
5061         * config/s390/s390.c (s390_reorg): Remove loop.
5063 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
5065         * config/darwin.c
5066          (darwin_function_switched_text_sections): Delete.
5067         * gcc/config/darwin.h
5068          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
5070 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
5072         PR target/81685
5073         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
5074         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
5075         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
5077 2018-08-15  Martin Liska  <mliska@suse.cz>
5079         PR tree-optimization/86925
5080         * predict.c (expr_expected_value_1): When taking
5081         later predictor, assign also probability.
5082         Use fold_build2_initializer_loc in order to fold
5083         the expression in -frounding-math.
5085 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
5087         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
5088         patterns.
5089         (expand_vec_perm_1): Try the new method.
5091 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
5093         PR target/86547
5094         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
5095         Check whether lra_live_max_point is 0 before dividing.
5097 2018-08-14  Martin Sebor  <msebor@redhat.com>
5099         PR tree-optimization/86650
5100         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
5101         (vrp_prop::check_mem_ref): Same.
5103 2018-08-13  Liu Hao <lh_mouse@126.com>
5105         * pretty-print.c (eat_esc_sequence): Swap the foreground and
5106         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
5107         and clear it thereafter, as it only works for DBCS.
5109 2018-08-13  Liu Hao <lh_mouse@126.com>
5111         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
5112         handle returned by _get_osf_handle().
5114 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
5116         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
5117         for folding vec_perm.
5119 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
5121         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
5122         Add support for gimple-folding of vec_pack() and vec_unpack()
5123         intrinsics.
5125 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
5127         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
5128         vec_xst variants to the list.
5129         (rs6000_gimple_fold_builtin): Add support for folding unaligned
5130         vector loads and stores.
5132 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
5134         * config.gcc (rs6000-ibm-aix4.x): Delete.
5135         (rs6000-ibm-aix5.1): Delete.
5136         (rs6000-ibm-aix5.2): Delete.
5137         (rs6000-ibm-aix5.3): Delete.
5138         * config/rs6000/aix43.h: Delete.
5139         * config/rs6000/aix51.h: Delete.
5140         * config/rs6000/aix52.h: Delete.
5141         * config/rs6000/t-aix43: Delete.
5143 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
5145         * config/s390/s390.c (s390_decompose_constant_pool_ref):
5146         New function.
5147         (s390_decompose_address): Factor out constant pool ref
5148         decomposition.
5150 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5152         * config/nds32/nds32-predicates.c
5153         (nds32_can_use_bclr_p): Change return type as bool.
5154         (nds32_can_use_bset_p): Ditto.
5155         (nds32_can_use_btgl_p): Ditto.
5156         (nds32_can_use_bitci_p): Ditto.
5157         * config/nds32/nds32-protos.h
5158         (nds32_can_use_bclr_p): Change declaration.
5159         (nds32_can_use_bset_p): Ditto.
5160         (nds32_can_use_btgl_p): Ditto.
5161         (nds32_can_use_bitci_p): Ditto.
5163 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5165         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
5166         Support -msched-prolog-epilog option.
5167         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
5169 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5171         * common/config/nds32/nds32-common.c
5172         (nds32_option_optimization_table): Enalbe -malways-align.
5174 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5176         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
5177         extra_headers.
5178         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
5179         OPT_misr_secure_ case.
5180         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
5181         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
5182         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
5183         secure attribute.
5184         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
5185         (nds32_isr_info): New field security_level.
5186         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
5187         * config/nds32/nds32.md (return_internal): Consider critical attribute.
5188         * config/nds32/nds32.opt (misr-secure): New option.
5189         * config/nds32/nds32_init.inc: New file.
5190         * config/nds32/nds32_isr.h: New file.
5192 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
5194         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
5195         Update comment for atomic instructions.
5196         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
5197         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
5198         Remove.
5199         (atomic_loaddi): Revise fence expansion to only emit fence prior to
5200         load for __ATOMIC_SEQ_CST model.
5201         (atomic_loaddi_1): Remove float register target.
5202         (atomic_storedi): Handle CONST_INT values.
5203         (atomic_storedi_1): Remove float register source.  Add special case
5204         for zero value.
5205         (memory_barrier): New expander and insn.
5207 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
5209         PR tree-optimization/86835
5210         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
5211         new_stmt after def_gsi, make sure to insert new_square_stmt after
5212         that stmt, not 2 stmts before it.
5214 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
5216         PR target/82418
5217         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
5218         instead of SWI48.
5220 2018-08-10  Martin Liska  <mliska@suse.cz>
5222         PR target/83610
5223         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
5224         function type.
5225         * builtins.c (expand_builtin_expect_with_probability):
5226         New function.
5227         (expand_builtin_expect_with_probability): New function.
5228         (build_builtin_expect_predicate): Add new argumnet probability
5229         for BUILT_IN_EXPECT_WITH_PROBABILITY.
5230         (fold_builtin_expect):
5231         (fold_builtin_2):
5232         (fold_builtin_3):
5233         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
5234         * builtins.h (fold_builtin_expect): Set new argument.
5235         * doc/extend.texi: Document __builtin_expect_with_probability.
5236         * doc/invoke.texi: Likewise.
5237         * gimple-fold.c (gimple_fold_call): Pass new argument.
5238         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
5239         also BUILT_IN_EXPECT_WITH_PROBABILITY.
5240         * predict.c (get_predictor_value): New function.
5241         (expr_expected_value): Add new argument probability. Assume
5242         that predictor and probability are always non-null.
5243         (expr_expected_value_1): Likewise.  For __builtin_expect and
5244         __builtin_expect_with_probability set probability.  Handle
5245         combination in binary expressions.
5246         (tree_predict_by_opcode): Simplify code by simply calling
5247         get_predictor_value.
5248         (pass_strip_predict_hints::execute): Add handling of
5249         BUILT_IN_EXPECT_WITH_PROBABILITY.
5250         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
5251         new predictor.
5252         * tree.h (DECL_BUILT_IN_P): New function.
5254 2018-08-10  Martin Liska  <mliska@suse.cz>
5256         PR tree-optimization/85799
5257         * passes.def: Add argument for pass_strip_predict_hints.
5258         * predict.c (class pass_strip_predict_hints): Add new argument
5259         early_p.
5260         (strip_predictor_early): New function.
5261         (pass_strip_predict_hints::execute): Call the function to
5262         strip predictors.
5263         (strip_predict_hints): New function.
5264         * predict.def: Fix comment.
5266 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
5268         * Makefile.in: Clarify which tm.texi to copy over to assert the
5269         right to grant a GFDL license for all.
5271 2018-08-09  Jeff Law  <law@redhat.com>
5273         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
5274         unused variable.
5276 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
5278         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
5279         prototype.
5281 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
5283         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
5284         reductions for variable-length vectors.
5286 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
5288         PR other/84889
5289         * common.opt (fdiagnostics-show-line-numbers): New option.
5290         * diagnostic-show-locus.c (class layout): Add fields
5291         "m_show_line_numbers_p" and "m_linenum_width";
5292         (num_digits): New function.
5293         (test_num_digits): New function.
5294         (layout::layout): Initialize new fields.  Update m_x_offset
5295         logic to handle any left margin.
5296         (layout::print_source_line): Print line number when requested.
5297         (layout::start_annotation_line): New member function.
5298         (layout::print_annotation_line): Call it.
5299         (layout::print_leading_fixits): Likewise.
5300         (layout::print_trailing_fixits): Likewise.  Update calls to
5301         move_to_column for new parameter.
5302         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
5303         it to potentially call start_annotation_line.
5304         (layout::show_ruler): Call start_annotation_line.
5305         (selftest::test_line_numbers_multiline_range): New selftest.
5306         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
5307         and selftest::test_line_numbers_multiline_range.
5308         * diagnostic.c (diagnostic_initialize): Initialize
5309         show_line_numbers_p.
5310         * diagnostic.h (struct diagnostic_context): Add field
5311         "show_line_numbers_p".
5312         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5313         -fno-diagnostics-show-line-numbers.
5314         * dwarf2out.c (gen_producer_string): Add
5315         OPT_fdiagnostics_show_line_numbers to the ignored options.
5316         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
5317         one setting" options.
5318         (append_compiler_options): Likewise to the dropped options.
5319         (append_diag_options): Likewise to the passed-on options.
5320         * opts.c (common_handle_option): Handle the new option.
5321         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
5323 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5325         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
5326         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
5327         third argument of type "const signed char" to descriptions of
5328         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
5329         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
5330         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
5331         __builtin_bcdsub_ov functions.
5333 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
5335         PR tree-optimization/86858
5336         * tree-vect-loop.c (vect_is_simple_reduction): Restore
5337         flow_bb_inside_loop_p calls.
5339 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
5341         PR tree-optimization/86871
5342         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
5343         instead of gimple_assign_lhs.
5345 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
5347         PR target/86887
5348         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
5349         register constraint to operand 0.
5350         (add<mode>3_carryinC): Likewise.
5351         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
5353 2018-08-09  Martin Liska  <mliska@suse.cz>
5355         PR c/86895
5356         * common.opt: Remove extra line.
5358 2018-08-09  Martin Liska  <mliska@suse.cz>
5360         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
5361         at the end of a line, make first letter capital and end up
5362         a sentence with a dot.
5363         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
5364         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
5365         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
5366         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
5367         (PARAM_MAX_ISL_OPERATIONS): Likewise.
5368         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
5369         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
5370         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
5371         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
5372         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
5373         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
5374         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
5375         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
5376         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
5377         (PARAM_TREE_REASSOC_WIDTH): Likewise.
5378         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
5379         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
5380         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
5382 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
5384         PR target/84332
5385         * config/s390/s390.c (s390_option_override_internal): Reduce the
5386         stack-clash-protection-probe-interval param if it would be too big
5387         for z900.
5389 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
5391         PR target/46179
5392         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
5393         * config/m68k/m68k.c (handle_move_double): Don't call
5394         m68k_final_prescan_insn.
5395         (m68k_adjust_decorated_operand): Renamed from
5396         m68k_final_prescan_insn, remove first and third operand and
5397         simplify.
5398         (print_operand): Call it.
5399         (print_operand_address): Call it.
5401 2018-08-08  Nathan Sidwell  <nathan@acm.org>
5403         * diagnostic.c (diagnostic_report_current_module): Use
5404         linemap_included_from & linemap_included_from_linemap.
5406 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
5408         * config/aarch64/aarch64-cores.def: Add phecda core.
5409         * config/aarch64/aarch64-tune.md: Regenerate.
5410         * doc/invoke.texi: Add phecda core.
5412 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
5414         PR target/85295
5415         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
5416         definitions.
5417         * config/s390/s390.md ("movti"): Add more alternatives for
5418         constant to GPR copies.
5420 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
5422         * config/s390/s390.c: Fix whitespace damage throughout the file.
5423         * config/s390/s390.h: Likewise.
5424         * config/s390/tpf.h: Likewise.
5426 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
5428         * config/s390/s390.c (s390_loadrelative_operand_p):
5429         Remove TARGET_CPU_ZARCH usages.
5430         (s390_rtx_costs): Likewise.
5431         (s390_legitimate_constant_p): Likewise.
5432         (s390_cannot_force_const_mem): Likewise.
5433         (legitimate_reload_constant_p): Likewise.
5434         (s390_preferred_reload_class): Likewise.
5435         (legitimize_pic_address): Likewise.
5436         (legitimize_tls_address): Likewise.
5437         (s390_split_branches): Removed.
5438         (s390_add_execute): Removed.
5439         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
5440         (s390_mainpool_start): Likewise.
5441         (s390_mainpool_finish): Likewise.
5442         (s390_mainpool_cancel): Removed.
5443         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
5444         (s390_chunkify_cancel): Likewise.
5445         (s390_return_addr_rtx): Likewise.
5446         (s390_register_info): Remove split_branches_pending_p uages.
5447         (s390_optimize_register_info): Likewise.
5448         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
5449         split_branches_pending_p usages.
5450         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
5451         (s390_load_got): Likewise.
5452         (s390_expand_split_stack_prologue): Likewise.
5453         (output_asm_nops): Likewise.
5454         (s390_function_profiler): Likewise.
5455         (s390_emit_call): Likewise.
5456         (s390_conditional_register_usage): Likewise.
5457         (s390_optimize_prologue): Likewise.
5458         (s390_reorg): Remove TARGET_CPU_ZARCH and
5459         split_branches_pending_p usages.
5460         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
5461         usages.
5462         (s390_output_indirect_thunk_function): Likewise.
5463         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
5464         (TARGET_CPU_ZARCH_P): Removed.
5465         (struct machine_function): Remove split_branches_pending_p.
5466         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
5468 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
5470         * common/config/s390/s390-common.c (processor_flags_table):
5471         Remove flags.
5472         * config.gcc: Remove with_arch/with_tune support.
5473         * config/s390/2064.md: Remove cpu attribute comparisons.
5474         * config/s390/driver-native.c (s390_host_detect_local_cpu):
5475         Remove MTN.
5476         * config/s390/linux.h (ASM_SPEC):
5477         Remove -march support.
5478         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
5479         Use a table to get an arch level.
5480         * config/s390/s390-opts.h (enum processor_type):
5481         Remove enum values.
5482         * config/s390/s390.c
5483         (processor_table): Remove entries, add arch_level values.
5484         (s390_issue_rate): Remove cases.
5485         (s390_option_override): Adjust
5486         s390_option_override_internal() call.
5487         (s390_option_override_internal): Remove deprecation warning.
5488         (s390_valid_target_attribute_tree): Adjust
5489         s390_option_override_internal() call.
5490         * config/s390/s390.h (struct s390_processor):
5491         Share with s390-c.c, add arch_level field.
5492         * config/s390/s390.md:
5493         Remove occurrences in cpu attribute.
5494         * config/s390/s390.opt: Remove -march/-mtune support.
5495         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
5496         * doc/invoke.texi: Remove deprecation warning.
5498 2018-08-08  Luis Machado  <luis.machado@linaro.org>
5500         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
5501         global.
5502         (qdf24xx_tunings): Set vector cost structure to
5503         qdf24xx_vector_cost.
5505         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
5506         <register_sextend>: Set to 3.
5508 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
5510         PR target/86838
5511         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
5512         * config/aarch64/aarch64-simd.md
5513         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
5514         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
5515         (aarch64_frecpx<mode>): ...this new pattern.
5516         * config/aarch64/aarch64-simd-builtins.def: Remove comment
5517         about aarch64_frecp<FRECP:frecp_suffix><mode>.
5519 2018-08-07  Martin Liska  <mliska@suse.cz>
5521         PR middle-end/83023
5522         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
5523         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
5524         * predict.def (PRED_MALLOC_NONNULL): New predictor.
5525         * doc/extend.texi: Document that malloc attribute adds
5526         hit to compiler.
5528 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
5530         PR target/86785
5531         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5532         Define to speculation_safe_value_not_needed.
5534 2018-08-06  Jeff Law  <law@redhat.com>
5536         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
5537         the vr_values instance to cprop_into_stmt.
5538         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
5539         (cprop_operand): Also query EVRP to determine if OP is a constant.
5541 2018-08-06  Nathan Sidwell  <nathan@acm.org>
5543         * diagnostic.c (diagnostic_report_current_module): Reroll
5544         included-at loop.  Translate text.
5546 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
5548         * function-tests.c (selftest::test_expansion_to_rtl): Call
5549         free_after_compilation.
5551 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5553         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
5555 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
5557         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
5558         loops with memory block operations from getting unrolled.
5560 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
5562         PR target/86807
5563         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5564         Define to speculation_safe_value_not_needed.
5566 2018-08-06  Jeff Law  <law@redhat.com>
5568         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
5569         assert.
5571 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5573         PR target/86662
5574         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
5575         with all enabled __intN types.
5577         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
5579 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5581         * alias.c (record_set): Check for clobber high.
5582         * cfgexpand.c (expand_gimple_stmt): Likewise.
5583         * combine-stack-adj.c (single_set_for_csa): Likewise.
5584         * combine.c (find_single_use_1): Likewise.
5585         (set_nonzero_bits_and_sign_copies): Likewise.
5586         (get_combine_src_dest): Likewise.
5587         (is_parallel_of_n_reg_sets): Likewise.
5588         (try_combine): Likewise.
5589         (record_dead_and_set_regs_1): Likewise.
5590         (reg_dead_at_p_1): Likewise.
5591         (reg_dead_at_p): Likewise.
5592         * dce.c (deletable_insn_p): Likewise.
5593         (mark_nonreg_stores_1): Likewise.
5594         (mark_nonreg_stores_2): Likewise.
5595         * df-scan.c (df_find_hard_reg_defs): Likewise.
5596         (df_uses_record): Likewise.
5597         (df_get_call_refs): Likewise.
5598         * dwarf2out.c (mem_loc_descriptor): Likewise.
5599         * haifa-sched.c (haifa_classify_rtx): Likewise.
5600         * ira-build.c (create_insn_allocnos): Likewise.
5601         * ira-costs.c (scan_one_insn): Likewise.
5602         * ira.c (equiv_init_movable_p): Likewise.
5603         (rtx_moveable_p): Likewise.
5604         (interesting_dest_for_shprep): Likewise.
5605         * jump.c (mark_jump_label_1): Likewise.
5606         * postreload-gcse.c (record_opr_changes): Likewise.
5607         * postreload.c (reload_cse_simplify): Likewise.
5608         (struct reg_use): Add source expr.
5609         (reload_combine): Check for clobber high.
5610         (reload_combine_note_use): Likewise.
5611         (reload_cse_move2add): Likewise.
5612         (move2add_note_store): Likewise.
5613         * print-rtl.c (print_pattern): Likewise.
5614         * recog.c (decode_asm_operands): Likewise.
5615         (store_data_bypass_p): Likewise.
5616         (if_test_bypass_p): Likewise.
5617         * regcprop.c (kill_clobbered_value): Likewise.
5618         (kill_set_value): Likewise.
5619         * reginfo.c (reg_scan_mark_refs): Likewise.
5620         * reload1.c (maybe_fix_stack_asms): Likewise.
5621         (eliminate_regs_1): Likewise.
5622         (elimination_effects): Likewise.
5623         (mark_not_eliminable): Likewise.
5624         (scan_paradoxical_subregs): Likewise.
5625         (forget_old_reloads_1): Likewise.
5626         * reorg.c (find_end_label): Likewise.
5627         (try_merge_delay_insns): Likewise.
5628         (redundant_insn): Likewise.
5629         (own_thread_p): Likewise.
5630         (fill_simple_delay_slots): Likewise.
5631         (fill_slots_from_thread): Likewise.
5632         (dbr_schedule): Likewise.
5633         * resource.c (update_live_status): Likewise.
5634         (mark_referenced_resources): Likewise.
5635         (mark_set_resources): Likewise.
5636         * rtl.c (copy_rtx): Likewise.
5637         * rtlanal.c (reg_referenced_p): Likewise.
5638         (single_set_2): Likewise.
5639         (noop_move_p): Likewise.
5640         (note_stores): Likewise.
5641         * sched-deps.c (sched_analyze_reg): Likewise.
5642         (sched_analyze_insn): Likewise.
5644 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5646         * cse.c (invalidate_reg): New function extracted from...
5647         (invalidate): ...here.
5648         (canonicalize_insn): Check for clobber high.
5649         (invalidate_from_clobbers): invalidate clobber highs.
5650         (invalidate_from_sets_and_clobbers): Likewise.
5651         (count_reg_usage): Check for clobber high.
5652         (insn_live_p): Likewise.
5653         * cselib.c (cselib_expand_value_rtx_1):Likewise.
5654         (cselib_invalidate_regno): Check for clobber in setter.
5655         (cselib_invalidate_rtx): Pass through setter.
5656         (cselib_invalidate_rtx_note_stores):
5657         (cselib_process_insn): Check for clobber high.
5658         * cselib.h (cselib_invalidate_rtx): Add operand.
5660 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5662         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
5663         (mark_not_eliminable): Likewise.
5664         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
5665         * lra-lives.c (process_bb_lives): Check for clobber high.
5666         * lra.c (new_insn_reg): Remember clobber highs.
5667         (collect_non_operand_hard_regs): Check for clobber high.
5668         (lra_set_insn_recog_data): Likewise.
5669         (add_regs_to_insn_regno_info): Likewise.
5670         (lra_update_insn_regno_info): Likewise.
5672 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5674         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
5675         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
5677 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5679         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
5680         (copy_insn_1): Likewise.
5681         (gen_hard_reg_clobber_high): New gen function.
5682         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
5683         * genemit.c (gen_exp): Likewise.
5684         (gen_emit_seq): Pass through info.
5685         (gen_insn): Check for CLOBBER_HIGH.
5686         (gen_expand): Pass through info.
5687         (gen_split): Likewise.
5688         (output_add_clobbers): Likewise.
5689         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
5690         (remove_clobbers): Likewise.
5691         * rtl.h (gen_hard_reg_clobber_high): New declaration.
5693 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5695         * doc/rtl.texi (clobber_high): Add.
5696         (parallel): Add in clobber high
5697         * rtl.c (rtl_check_failed_code3): Add function.
5698         * rtl.def (CLOBBER_HIGH): Add expression.
5699         * rtl.h (RTL_CHECKC3): Add macro.
5700         (rtl_check_failed_code3): Add declaration.
5701         (XC3EXP): Add macro.
5703 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
5705         PR target/86386
5706         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
5707         cfun->machine->max_used_stack_alignment if needed.
5709 2018-08-04  Martin Sebor  <msebor@redhat.com>
5711         PR tree-optimization/86571
5712         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
5713         NaN output to 4.
5715 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
5717         PR target/86799
5718         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5719         Define.
5721 2018-08-03  Jeff Law  <law@redhat.com>
5723         PR target/86795
5724         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5725         Define to speculation_safe_value_not_needed.
5727 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
5729         * doc/gcov.texi (-x): Remove duplicate "to".
5730         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
5731         (-Wif-not-aligned): Remove duplicate "is".
5732         (-flto): Remove duplicate "the".
5733         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
5734         duplicate "v5.00.b".
5735         (MSP430 Options): Remove duplicate "and" from the description
5736         of "-mgprel-sec=regexp".
5737         (x86 Options): Remove duplicate copies of "vmldLog102" and
5738         vmlsLog104 from description of "-mveclibabi=type".
5740 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
5742         * internal-fn.h (first_commutative_argument): Declare.
5743         * internal-fn.c (first_commutative_argument): New function.
5744         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
5745         restrictions for pattern statements.  Use first_commutative_argument
5746         to look for commutative operands in calls to internal functions.
5748 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
5750         * Makefile.in (wide-int-range.o): New.
5751         * tree-vrp.c: Move all the wide_int_* functions to...
5752         * wide-int-range.cc: ...here.
5753         * tree-vrp.h: Move all the wide_int_* prototypes to...
5754         * wide-int-range.h: ...here.
5756 2018-08-03  Tom de Vries  <tdevries@suse.de>
5758         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
5759         UI_NONE.
5760         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
5761         * except.c (output_function_exception_table): Do early exit if
5762         targetm_common.except_unwind_info (&global_options) == UI_NONE.
5764 2018-08-03  Martin Liska  <mliska@suse.cz>
5766         * predict.c (dump_prediction): Change to 2 digits
5767         in fraction part.
5769 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5771         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
5772         neon_dup_q to...
5773         (falkor_am_1_gtov_gtov): ... a new insn reservation.
5775 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
5777         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
5778         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
5779         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
5780         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
5781         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
5783 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
5785         * diagnostic-show-locus.c (diagnostic_show_locus): Use
5786         pp_take_prefix when saving the existing prefix.
5787         * diagnostic.c (diagnostic_append_note): Likewise.
5788         * langhooks.c (lhd_print_error_function): Likewise.
5789         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
5790         param's type.  Free the existing prefix.
5791         (pp_take_prefix): New function.
5792         (pretty_printer::pretty_printer): Drop the prefix parameter.
5793         Rename the length parameter to match the comment.
5794         (pretty_printer::~pretty_printer): Free the prefix.
5795         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
5796         parameter.
5797         (struct pretty_printer): Drop the "const" from "prefix" field's
5798         type and clarify memory management.
5799         (pp_set_prefix): Drop the "const" from the 2nd param.
5800         (pp_take_prefix): New decl.
5802 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
5804         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
5805         for word_mode_ok here instead of passing as argument.
5806         (expand_block_compare): Change select_block_compare_mode() call.
5807         (expand_strncmp_gpr_sequence): New function.
5808         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
5810 2018-08-02  Jeff Law  <law@redhat.com>
5812         PR target/86790
5813         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5814         Define to speculation_safe_value_not_needed.
5816         PR target/86784
5817         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5818         Define to speculation_safe_value_not_needed.
5820 2018-08-02  Tom de Vries  <tdevries@suse.de>
5822         PR target/86660
5823         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
5824         function.  Return UI_TARGET unconditionally.
5825         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
5826         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
5828 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
5830         * genemit.c (print_overload_test): Fix typo.
5832 2018-08-02  Richard Biener  <rguenther@suse.de>
5834         PR tree-optimization/86816
5835         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
5836         which checks for value availability before querying it.
5837         (gvn_uses_equal): Use it.
5838         (same_succ_hash): Likewise.
5839         (gimple_equal_p): Likewise.
5841 2018-08-02  Nick Clifton  <nickc@redhat.com>
5843         PR target/86813
5844         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5845         Define to speculation_safe_value_not_needed.
5847         PR target/86810
5848         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5849         Define to speculation_safe_value_not_needed.
5851         PR target/86810
5852         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5853         Define to speculation_safe_value_not_needed.
5855         PR target/86803
5856         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5857         Define to speculation_safe_value_not_needed.
5859         PR target/86797
5860         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5861         Define to speculation_safe_value_not_needed.
5863         PR target/86791
5864         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5865         Define to speculation_safe_value_not_needed.
5867         PR target/86789
5868         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5869         Define to speculation_safe_value_not_needed.
5871         PR target/86787
5872         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5873         Define to speculation_safe_value_not_needed.
5875         PR target/86782
5876         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5877         speculation_safe_value_not_needed.
5879         PR target/86781
5880         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
5881         to speculation_safe_value_not_needed.
5883 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
5885         * doc/md.texi: Expand the documentation of instruction names
5886         to mention port-local uses.  Document '@' in pattern names.
5887         * read-md.h (overloaded_instance, overloaded_name): New structs.
5888         (mapping): Declare.
5889         (md_reader::handle_overloaded_name): New member function.
5890         (md_reader::get_overloads): Likewise.
5891         (md_reader::m_first_overload): New member variable.
5892         (md_reader::m_next_overload_ptr): Likewise.
5893         (md_reader::m_overloads_htab): Likewise.
5894         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
5895         m_next_overload_ptr and m_overloads_htab.
5896         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
5897         (get_mode_token, get_code_token, get_int_token): New functions.
5898         (map_attr_string): Add an optional argument that passes back
5899         the associated iterator.
5900         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
5901         (md_reader::handle_overloaded_name, add_overload_instance): New
5902         functions.
5903         (apply_iterators): Handle '@' names.  Report an error if '@'
5904         is used without iterators.
5905         (initialize_iterators): Initialize the new iterator_group fields.
5906         * genopinit.c (handle_overloaded_code_for)
5907         (handle_overloaded_gen): New functions.
5908         (main): Use them to print declarations of maybe_code_for_* and
5909         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
5910         * genemit.c (print_overload_arguments, print_overload_test)
5911         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
5912         (main): Use it to print definitions of maybe_code_for_* and
5913         maybe_gen_* functions.
5914         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
5915         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
5916         instead of explicit mode checks.
5917         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
5918         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
5919         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
5920         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
5921         (aarch64_expand_compare_and_swap): Likewise
5922         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
5923         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
5924         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
5925         (aarch64_constant_pool_reload_icode): Delete.
5926         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
5927         instead of aarch64_constant_pool_reload_icode.  Use
5928         code_for_aarch64_reload_mov instead of explicit mode checks.
5929         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
5930         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
5931         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
5932         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
5933         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
5934         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
5935         (aarch64_atomic_load_op_code): Delete.
5936         (aarch64_emit_atomic_load_op): Likewise.
5937         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
5938         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
5939         instead of aarch64_emit_atomic_load_op.
5940         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
5941         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
5942         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
5943         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
5944         character before the pattern name.
5945         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
5946         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
5947         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
5948         (aarch64_frecps<mode>): Likewise.
5949         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
5950         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
5951         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
5952         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
5953         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
5955 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
5957         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
5958         Allow HFmode constants if TARGET_FP_F16INST.
5960 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
5962         PR target/86014
5963         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
5964         No longer check last store for clobber of address register.
5966 2018-08-02  Martin Liska  <mliska@suse.cz>
5968         PR gcov-profile/86817
5969         * gcov.c (process_all_functions): New function.
5970         (main): Call it.
5971         (process_file): Move functions processing to
5972         process_all_functions.
5974 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
5976         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
5977         "const" to the "gimple *" and "rtx_insn *" parameters.
5978         * dumpfile.h (dump_user_location_t::dump_user_location_t):
5979         Likewise.
5980         (dump_location_t::dump_location_t): Likewise.
5982 2018-08-01  Martin Sebor  <msebor@redhat.com>
5984         PR tree-optimization/86650
5985         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
5986         rather than a "gcall *".  Directly pass the data of interest
5987         to percent_K_format, rather than building a temporary CALL_EXPR
5988         to hold it.
5989         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
5990         (gimple_fold_builtin_strncat): Adjust.
5991         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
5992         gcall* argument with gimple*.
5993         * gimple-ssa-warn-restrict.c (check_call): Same.
5994         (wrestrict_dom_walker::before_dom_children): Same.
5995         (builtin_access::builtin_access): Same.
5996         (check_bounds_or_overlap): Same
5997         (maybe_diag_overlap): Same.
5998         (maybe_diag_offset_bounds): Same.
5999         * tree-diagnostic.c (default_tree_printer): Move usage of
6000         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
6001         to this callsite.
6002         * tree-pretty-print.c (percent_K_format): Add argument.
6003         * tree-pretty-print.h: Add argument.
6004         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
6005         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
6006         (maybe_diag_stxncpy_trunc): Same.
6007         (handle_builtin_stxncpy): Same.
6008         (handle_builtin_strcat): Same.
6010 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6012         * match.pd: Optimise pointer range checks.
6014 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6016         PR tree-optimization/86758
6017         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
6018         to remove pattern statements.
6020 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6022         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
6023         result of dfs_enumerate_from when constructing stmt_vec_infos,
6024         instead of additionally calling get_loop_body.
6026 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6028         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
6029         parameter.
6030         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
6031         When creating an iv, assert that the step is not known to be zero.
6032         (vect_setup_realignment): Update call accordingly.
6033         * tree-vect-stmts.c (vectorizable_store): Likewise.
6034         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
6036 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6038         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
6039         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
6040         (vectorizable_reduction): Likewise.
6041         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6042         (vect_detect_hybrid_slp_stmts): Likewise.
6043         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6045 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
6047         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
6048         (wide_int_set_zero_nonzero_bits): ...this.
6049         (zero_nonzero_bits_from_vr): Rename to...
6050         (vrp_set_zero_nonzero_bits): ...this.
6051         (extract_range_from_multiplicative_op_1): Abstract wide int
6052         code...
6053         (wide_int_range_multiplicative_op): ...here.
6054         (extract_range_from_binary_expr_1): Extract wide int binary
6055         operations into their own functions.
6056         (wide_int_range_lshift): New.
6057         (wide_int_range_can_optimize_bit_op): New.
6058         (wide_int_range_shift_undefined_p): New.
6059         (wide_int_range_bit_xor): New.
6060         (wide_int_range_bit_ior): New.
6061         (wide_int_range_bit_and): New.
6062         (wide_int_range_trunc_mod): New.
6063         (extract_range_into_wide_ints): New.
6064         (vrp_shift_undefined_p): New.
6065         (extract_range_from_multiplicative_op): New.
6066         (vrp_can_optimize_bit_op): New.
6067         * tree-vrp.h (value_range::dump): New.
6068         (wide_int_range_multiplicative_op): New.
6069         (wide_int_range_lshift):New.
6070         (wide_int_range_shift_undefined_p): New.
6071         (wide_int_range_bit_xor): New.
6072         (wide_int_range_bit_ior): New.
6073         (wide_int_range_bit_and): New.
6074         (wide_int_range_trunc_mod): New.
6075         (zero_nonzero_bits_from_bounds): Rename to...
6076         (wide_int_set_zero_nonzero_bits): ...this.
6077         (zero_nonzero_bits_from_vr): Rename to...
6078         (vrp_set_zero_nonzero_bits): ...this.
6079         (range_easy_mask_min_max): Rename to...
6080         (wide_int_range_can_optimize_bit_op): this.
6081         * vr-values.c (simplify_bit_ops_using_ranges): Rename
6082         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
6084 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6086         * tree-vectorizer.h (vect_orig_stmt): New function.
6087         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
6088         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
6089         (vect_create_epilog_for_reduction): Likewise.
6090         (vectorizable_live_operation): Likewise.
6091         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6092         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
6093         * tree-vect-stmts.c (vectorizable_call): Likewise.
6094         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
6096 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6098         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
6099         argument.
6100         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
6101         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
6102         (vect_transform_loop): Likewise.
6103         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6105 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6107         * tree-vectorizer.h (vect_schedule_slp): Return void.
6108         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6109         (vect_schedule_slp): Likewise.
6111 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6113         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
6114         argument.
6115         (vect_transform_loop): Update calls accordingly.  Schedule SLP
6116         instances before the main loop, if any exist.
6118 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6120         PR tree-optimization/86749
6121         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
6122         If the lhs is used in a COND_EXPR, check that it is being used
6123         as the "then" or "else" value.
6125 2018-08-01  Tom de Vries  <tdevries@suse.de>
6127         PR target/86800
6128         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6129         speculation_safe_value_not_needed.
6131 2018-08-01  Richard Biener  <rguenther@suse.de>
6133         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
6134         as base and offset.
6136 2018-08-01  Martin Liska  <mliska@suse.cz>
6138         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
6139         format how successful transformation is dumped.
6140         (gimple_mod_pow2_value_transform): Likewise.
6141         (gimple_mod_subtract_transform): Likewise.
6142         (gimple_stringops_transform): Likewise.
6144 2018-08-01  Martin Liska  <mliska@suse.cz>
6146         PR value-prof/35543
6147         * value-prof.c (interesting_stringop_to_profile_p):
6148         Simplify the code and add BUILT_IN_MEMMOVE.
6149         (gimple_stringops_transform): Likewise.
6151 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
6153         * config/aarch64/aarch64-simd.md
6154         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
6155         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
6156         use GPI iterator instead of SI mode.
6158 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
6160         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
6161         rs6000_speculation_barrier.
6162         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
6163         new barrier pattern name.
6165 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
6167         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
6168         (speculation_barrier): New insn.
6170 2018-08-01  Richard Biener  <rguenther@suse.de>
6172         PR bootstrap/86724
6173         * graphite.h: Include isl/id.h and isl/space.h to allow build
6174         with ISL 0.20.
6176 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
6178         PR target/86651
6179         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
6180         mode for COFF targets.
6181         * defaults.h (TARGET_COFF): Define.
6182         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
6183         TARGET_COFF): Define.
6184         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
6185         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
6186         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
6188 2018-07-31  Alexandre Oliva <oliva@adacore.com>
6190         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
6191         * gimple-streamer-out.c (output_bb): Save it.
6192         * lto-streamer-in.c (input_struct_function_base): Restore
6193         instance discriminator if available.  Create map on demand.
6194         * lto-streamer-out.c (output_struct_function_base): Save it if
6195         available.
6196         * final.c (decl_to_instance_map): Document LTO strategy.
6198 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
6199             Olivier Hainque  <hainque@adacore.com>
6201         * debug.h (decl_to_instance_map_t): New type.
6202         (decl_to_instance_map): Declare.
6203         (maybe_create_decl_to_instance_map): New inline function.
6204         * final.c (bb_discriminator, last_bb_discriminator): New statics,
6205         to track basic block discriminators.
6206         (final_start_function_1): Initialize them.
6207         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
6208         bb_discriminator.
6209         (decl_to_instance_map): New variable.
6210         (map_decl_to_instance, maybe_set_discriminator): New functions.
6211         (notice_source_line): Set discriminator.
6213 2018-07-31  Ian Lance Taylor  <iant@golang.org>
6215         * targhooks.c (default_have_speculation_safe_value): Add
6216         ATTRIBUTE_UNUSED.
6218 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
6220         * dump-context.h: Include "pretty-print.h".
6221         (dump_context::refresh_dumps_are_enabled): New decl.
6222         (dump_context::emit_item): New decl.
6223         (class dump_context): Add fields "m_test_pp" and
6224         "m_test_pp_flags".
6225         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6226         (temp_dump_context::get_dumped_text): New decl.
6227         (class temp_dump_context): Add field "m_pp".
6228         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
6229         (dump_context::refresh_dumps_are_enabled): ...and add a test for
6230         m_test_pp.
6231         (set_dump_file): Update for above change.
6232         (set_alt_dump_file): Likewise.
6233         (dump_loc): New overload, taking a pretty_printer *.
6234         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
6235         to any test pretty-printer.
6236         (make_item_for_dump_gimple_stmt): New function, adapted from
6237         optinfo::add_gimple_stmt.
6238         (dump_context::dump_gimple_stmt): Call it, and use the result,
6239         eliminating the direct usage of dump_file and alt_dump_file in
6240         favor of indirectly using them via emit_item.
6241         (make_item_for_dump_gimple_expr): New function, adapted from
6242         optinfo::add_gimple_expr.
6243         (dump_context::dump_gimple_expr): Call it, and use the result,
6244         eliminating the direct usage of dump_file and alt_dump_file in
6245         favor of indirectly using them via emit_item.
6246         (make_item_for_dump_generic_expr): New function, adapted from
6247         optinfo::add_tree.
6248         (dump_context::dump_generic_expr): Call it, and use the result,
6249         eliminating the direct usage of dump_file and alt_dump_file in
6250         favor of indirectly using them via emit_item.
6251         (make_item_for_dump_printf_va): New function, adapted from
6252         optinfo::add_printf_va.
6253         (make_item_for_dump_printf): New function.
6254         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
6255         and use the result, eliminating the direct usage of dump_file and
6256         alt_dump_file in favor of indirectly using them via emit_item.
6257         (make_item_for_dump_dec): New function.
6258         (dump_context::dump_dec): Call it, and use the result,
6259         eliminating the direct usage of dump_file and alt_dump_file in
6260         favor of indirectly using them via emit_item.
6261         (make_item_for_dump_symtab_node): New function, adapted from
6262         optinfo::add_symtab_node.
6263         (dump_context::dump_symtab_node): Call it, and use the result,
6264         eliminating the direct usage of dump_file and alt_dump_file in
6265         favor of indirectly using them via emit_item.
6266         (dump_context::begin_scope): Reimplement, avoiding direct usage
6267         of dump_file and alt_dump_file in favor of indirectly using them
6268         via emit_item.
6269         (dump_context::emit_item): New member function.
6270         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6271         Set up test pretty-printer on the underlying context.  Call
6272         refresh_dumps_are_enabled.
6273         (temp_dump_context::~temp_dump_context): Call
6274         refresh_dumps_are_enabled.
6275         (temp_dump_context::get_dumped_text): New member function.
6276         (selftest::verify_dumped_text): New function.
6277         (ASSERT_DUMPED_TEXT_EQ): New macro.
6278         (selftest::test_capture_of_dump_calls): Run all tests twice, with
6279         and then without optinfo enabled.  Add uses of
6280         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
6281         * dumpfile.h: Update comment for the dump_* API.
6282         * optinfo-emit-json.cc
6283         (selftest::test_building_json_from_dump_calls): Update for new
6284         param for temp_dump_context ctor.
6285         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
6286         and "m_owned" field.
6287         (optinfo_item::~optinfo_item): Likewise.
6288         (optinfo::add_item): New member function.
6289         (optinfo::emit): Update comment.
6290         (optinfo::add_string): Delete.
6291         (optinfo::add_printf): Delete.
6292         (optinfo::add_printf_va): Delete.
6293         (optinfo::add_gimple_stmt): Delete.
6294         (optinfo::add_gimple_expr): Delete.
6295         (optinfo::add_tree): Delete.
6296         (optinfo::add_symtab_node): Delete.
6297         (optinfo::add_dec): Delete.
6298         * optinfo.h (class dump_context): New forward decl.
6299         (optinfo::add_item): New decl.
6300         (optinfo::add_string): Delete.
6301         (optinfo::add_printf): Delete.
6302         (optinfo::add_printf_va): Delete.
6303         (optinfo::add_gimple_stmt): Delete.
6304         (optinfo::add_gimple_expr): Delete.
6305         (optinfo::add_tree): Delete.
6306         (optinfo::add_symtab_node): Delete.
6307         (optinfo::add_dec): Delete.
6308         (optinfo::add_poly_int): Delete.
6309         (optinfo_item::optinfo_item): Remove "owned" param.
6310         (class optinfo_item): Remove field "m_owned".
6312 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6314         PR middle-end/86705
6315         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
6316         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
6317         requested variable alignment.
6318         (expand_one_ssa_partition): Likewise.
6319         (expand_one_var): Likewise.
6321 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6323         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6324         to speculation_safe_value_not_needed.
6326 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6328         * targhooks.h (speculation_safe_value_not_needed): New prototype.
6329         * targhooks.c (speculation_safe_value_not_needed): New function.
6330         * target.def (have_speculation_safe_value): Update documentation.
6331         * doc/tm.texi: Regenerated.
6333 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6335         * config/aarch64/iterators.md (ALLI_TI): New iterator.
6336         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
6337         expand.
6338         (despeculate_copy<ALLI:mode>_insn): New insn.
6339         (despeculate_copyti_insn): New insn.
6340         (despeculate_simple<ALLI:mode>): New insn
6341         (despeculate_simpleti): New insn.
6342         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
6343         function.
6344         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
6345         aarch64_speculation_safe_value.
6346         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
6348 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6350         * config/aarch64/aarch64-speculation.cc: New file.
6351         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
6352         before pass_reorder_blocks.
6353         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
6354         prototype.
6355         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
6356         X14 and X15 when tracking speculation.
6357         * config/aarch64/aarch64.md (register name constants): Add
6358         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
6359         (unspec): Add UNSPEC_SPECULATION_TRACKER.
6360         (speculation_barrier): New insn attribute.
6361         (cmp<mode>): Allow SP in comparisons.
6362         (speculation_tracker): New insn.
6363         (speculation_barrier): Add speculation_barrier attribute.
6364         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
6365         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
6366         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
6368 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6370         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
6371         aarch64_track_speculation is true.
6372         (tb<optab><mode>1): Likewise.
6373         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
6374         generate CB[N]Z when tracking speculation.
6375         (aarch64_split_compare_and_swap): Likewise.
6376         (aarch64_split_atomic_op): Likewise.
6378 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6380         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
6382 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6384         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
6385         (speculation_barrier): New insn.
6387 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6389         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
6390         * config/arm/arm.md (speculation_barrier): New expand.
6391         (speculation_barrier_insn): New pattern.
6393 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6395         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
6396         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
6397         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
6398         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
6399         list.
6400         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
6401         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
6402         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
6403         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
6404         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
6405         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
6406         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
6407         * builtins.c (expand_speculation_safe_value): New function.
6408         (expand_builtin): Call it.
6409         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
6410         * doc/extend.texi: Document __builtin_speculation_safe_value.
6411         * doc/md.texi: Document "speculation_barrier" pattern.
6412         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
6413         TARGET_HAVE_SPECULATION_SAFE_VALUE.
6414         * doc/tm.texi: Regenerated.
6415         * target.def (have_speculation_safe_value, speculation_safe_value): New
6416         hooks.
6417         * targhooks.c (default_have_speculation_safe_value): New function.
6418         (default_speculation_safe_value): New function.
6419         * targhooks.h (default_have_speculation_safe_value): Add prototype.
6420         (default_speculation_safe_value): Add prototype.
6422 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
6424         * dump-context.h (dump_context::dump_loc): New decl.
6425         * dumpfile.c (dump_context::dump_loc): New member function.
6426         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
6427         and dump_gimple_stmt.
6428         (dump_context::dump_gimple_expr_loc): Likewise, using
6429         dump_gimple_expr.
6430         (dump_context::dump_generic_expr_loc): Likewise, using
6431         dump_generic_expr.
6432         (dump_context::dump_printf_loc_va): Likewise, using
6433         dump_printf_va.
6434         (dump_context::begin_scope): Explicitly using the global function
6435         "dump_loc", rather than the member function.
6437 2018-07-31  Martin Sebor  <msebor@redhat.com>
6439         PR tree-optimization/86741
6440         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
6442 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
6444         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
6445         depend on whether prefetch instructions will be emitted or not.
6446         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
6447         will be emitted or not.
6448         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
6449         (TARGET_SETMEM_PFD): New macros.
6451 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6453         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
6454         (NULL_STMT_VEC_INFO): Delete.
6455         (stmt_vec_info::operator*): Likewise.
6456         (stmt_vec_info::operator gimple *): Likewise.
6457         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
6458         of NULL_STMT_VEC_INFO.
6459         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6460         (vect_reassociating_reduction_p): Likewise.
6461         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6462         (vectorizable_store): Likewise.
6463         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
6464         (vec_info::free_stmt_vec_infos): Likewise.
6466 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6468         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
6469         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
6471 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6473         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
6474         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6475         (vec_info::free_stmt_vec_info): New private member functions.
6476         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
6477         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
6478         * tree-parloops.c (gather_scalar_reductions): Remove calls to
6479         set_stmt_vec_info_vec and free_stmt_vec_infos.
6480         * tree-vect-loop.c (_loop_vec_info): Remove call to
6481         set_stmt_vec_info_vec.
6482         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
6483         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
6484         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
6485         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6486         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
6487         assignments in {vec_info::,}new_stmt_vec_info that are redundant
6488         with the clearing in the xcalloc.
6489         (stmt_vec_info_vec): Delete.
6490         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
6491         (vectorize_loops): Likewise.
6492         (vec_info::~vec_info): Remove argument from call to
6493         free_stmt_vec_infos.
6494         (vec_info::add_stmt): Remove vinfo argument from call to
6495         new_stmt_vec_info.
6497 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6499         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
6500         rather than a gimple stmt.
6501         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
6502         information for pattern statements when passed the original
6503         statement; instead wait to be passed the pattern statement itself.
6504         Don't call set_vinfo_for_stmt here.
6505         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
6506         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
6507         stmt_vec_infos here.
6508         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
6509         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
6510         stmt_vec_infos entry.
6512 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6514         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
6515         * tree-vectorizer.c (vec_info::replace_stmt): New function.
6516         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
6517         * tree-vect-stmts.c (vectorizable_call): Likewise.
6518         (vectorizable_simd_clone_call): Likewise.
6520 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6522         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
6523         * tree-vectorizer.c (vec_info::remove_stmt): New function.
6524         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
6525         * tree-vect-loop.c (vect_transform_loop): Likewise.
6526         * tree-vect-slp.c (vect_schedule_slp): Likewise.
6527         * tree-vect-stmts.c (vect_remove_stores): Likewise.
6529 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6531         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
6532         (vect_dr_stmt): Delete.
6533         * tree-vectorizer.c (vec_info::lookup_dr): New function.
6534         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
6535         of DR_VECT_AUX.
6536         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
6537         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
6538         (vect_verify_datarefs_alignment, vect_peeling_supportable)
6539         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6540         (vect_analyze_data_refs): Likewise.
6541         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
6542         argument.
6543         (vect_find_same_alignment_drs): Likewise.
6544         (vect_slp_analyze_node_dependences): Update calls accordingly.
6545         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
6546         instead of DR_VECT_AUX.
6547         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
6548         of a vector data references.  Use vec_info::lookup_dr instead of
6549         DR_VECT_AUX.
6550         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
6551         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
6552         instead of DR_VECT_AUX.
6554 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6556         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
6557         dr_vec_info.
6558         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6559         accordingly.
6560         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6561         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6562         (vect_gen_prolog_loop_niters): Likewise.
6564 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6566         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
6567         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
6568         (vect_known_alignment_in_bytes, vect_dr_behavior)
6569         (vect_get_scalar_dr_size): Take references as dr_vec_infos
6570         instead of data_references.  Update calls to other routines for
6571         which the same change has been made.
6572         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
6573         dr_vec_infos instead of stmt_vec_infos.
6574         (vect_analyze_data_ref_dependence): Update call accordingly.
6575         (vect_slp_analyze_data_ref_dependence)
6576         (vect_record_base_alignments): Use DR_VECT_AUX.
6577         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
6578         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
6579         (vector_alignment_reachable_p, vect_get_data_access_cost)
6580         (vect_peeling_supportable, vect_analyze_group_access_1)
6581         (vect_analyze_group_access, vect_analyze_data_ref_access)
6582         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
6583         (vect_compile_time_alias, vect_small_gap_p)
6584         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
6585         (vect_supportable_dr_alignment): Take references as dr_vec_infos
6586         instead of data_references.  Update calls to other routines for
6587         which the same change has been made.
6588         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
6589         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6590         (vect_slp_analyze_and_verify_node_alignment)
6591         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6592         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6593         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
6594         above changes.
6595         (_vect_peel_info::dr): Replace with...
6596         (_vect_peel_info::dr_info): ...this new field.
6597         (vect_peeling_hash_get_most_frequent)
6598         (vect_peeling_hash_choose_best_peeling): Update accordingly.
6599         (vect_peeling_hash_get_lowest_cost):
6600         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
6601         routines for which the same change has been made.
6602         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
6603         data_reference.
6604         * tree-vect-loop-manip.c (get_misalign_in_elems)
6605         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
6606         above changes.
6607         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6608         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
6609         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
6610         (get_group_load_store_type, get_negative_load_store_type)
6611         (vect_get_data_ptr_increment, vectorizable_store)
6612         (vectorizable_load): Likewise.
6613         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
6614         Update calls to other routines for which the same change has been made.
6616 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6618         * tree-vectorizer.h (vec_info::move_dr): New member function.
6619         (dataref_aux): Rename to...
6620         (dr_vec_info): ...this and add "dr" and "stmt" fields.
6621         (_stmt_vec_info::dr_aux): Update accordingly.
6622         (_stmt_vec_info::data_ref_info): Delete.
6623         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
6624         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
6625         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
6626         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
6627         of data_ref.
6628         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
6629         (STMT_VINFO_DR_INFO): New macro.
6630         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
6631         (set_dr_misalignment): Update after rename of dataref_aux.
6632         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
6633         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
6634         initialization of STMT_VINFO_DATA_REF.
6635         * tree-vectorizer.c (vec_info::move_dr): New function.
6636         * tree-vect-patterns.c (vect_recog_bool_pattern)
6637         (vect_recog_mask_conversion_pattern)
6638         (vect_recog_gather_scatter_pattern): Use it.
6639         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
6640         the "dr" and "stmt" fields of dr_vec_info instead of
6641         STMT_VINFO_DATA_REF.
6643 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6645         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
6646         (is_pattern_stmt_p): Use it.
6647         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
6648         on pattern statements.
6650 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6652         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
6653         original stmt as a stmt_vec_info rather than a gimple stmt.
6654         (vect_pattern_recog_1): Take the statement directly as a
6655         stmt_vec_info, rather than via a gimple_stmt_iterator.
6656         Update call to vect_mark_pattern_stmts.
6657         (vect_pattern_recog): Update calls accordingly.
6659 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6661         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
6662         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
6663         a vect_def_type for the first argument.
6664         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
6665         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
6666         operand if it isn't defined by a vectorized statement.
6667         (vect_build_gather_load_calls): Remove the mask_dt argument and
6668         update calls to vect_get_vec_def_for_stmt_copy.
6669         (vectorizable_bswap): Likewise the dt argument.
6670         (vectorizable_call): Update calls to vectorizable_bswap and
6671         vect_get_vec_def_for_stmt_copy.
6672         (vectorizable_simd_clone_call, vectorizable_assignment)
6673         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
6674         (vectorizable_comparison): Update calls to
6675         vect_get_vec_def_for_stmt_copy.
6676         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
6677         vect_is_simple_use.
6678         (vect_get_loop_based_defs): Remove dt argument and update call
6679         to vect_get_vec_def_for_stmt_copy.
6680         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
6681         and vect_get_vec_def_for_stmt_copy.
6682         (vectorizable_load): Update calls to vect_build_gather_load_calls
6683         and vect_get_vec_def_for_stmt_copy.
6684         * tree-vect-loop.c (vect_create_epilog_for_reduction)
6685         (vectorizable_reduction, vectorizable_live_operation): Update calls
6686         to vect_get_vec_def_for_stmt_copy.
6688 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6690         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
6691         and gimple stmt arguments with a stmt_vec_info.
6692         (vect_record_base_alignments): Update calls accordingly.
6693         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
6694         and gimple stmt arguments with a stmt_vec_info.
6695         (vect_build_slp_tree_1): Remove vinfo argument and update call
6696         to vect_record_max_nunits.
6697         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
6698         and vect_record_max_nunits.
6700 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6702         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
6703         file and take a stmt_vec_info instead of a gimple stmt.
6704         (supportable_widening_operation, vect_finish_replace_stmt)
6705         (vect_finish_stmt_generation, vect_get_store_rhs)
6706         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
6707         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
6708         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
6709         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
6710         (vect_create_data_ref_ptr, bump_vector_ptr)
6711         (vect_permute_store_chain, vect_setup_realignment)
6712         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
6713         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
6714         (vectorizable_reduction, vectorizable_induction)
6715         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
6716         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
6717         than gimple stmts as arguments.
6718         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
6719         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
6720         (can_group_stmts_p, vect_check_gather_scatter)
6721         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6722         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
6723         (vect_permute_load_chain, vect_shift_permute_load_chain)
6724         (vect_transform_grouped_load)
6725         (vect_record_grouped_load_vectors): Likewise.
6726         * tree-vect-loop.c (vect_fixup_reduc_chain)
6727         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
6728         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
6729         (vectorizable_reduction, vectorizable_induction)
6730         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
6731         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
6732         (vect_get_load_store_mask): Likewise.
6733         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
6734         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
6735         * tree-vect-stmts.c (vect_mark_relevant)
6736         (is_simple_and_all_uses_invariant)
6737         (exist_non_indexing_operands_for_use_p, process_use)
6738         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
6739         (vect_get_vec_def_for_operand, vect_get_vec_defs)
6740         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
6741         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
6742         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
6743         (get_negative_load_store_type, get_load_store_type)
6744         (vect_check_load_store_mask, vect_check_store_rhs)
6745         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
6746         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6747         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6748         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6749         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
6750         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
6751         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
6752         (supportable_widening_operation): Likewise.
6754 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6756         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
6757         a stmt_vec_info instead of a gcall.
6758         (vect_check_gather_scatter): Update call accordingly.
6759         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
6760         of a gphi.
6761         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
6762         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
6763         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
6764         instead of a gimple stmt.
6765         (vect_transform_loop): Update calls accordingly.
6766         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
6767         stmt_vec_infos instead of gimple stmts.
6768         (vect_analyze_slp_instance): Update use accordingly.
6769         * tree-vect-stmts.c (read_vector_array, write_vector_array)
6770         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
6771         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
6772         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
6773         (vect_gen_widened_results_half, vect_get_loop_based_defs)
6774         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
6775         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
6776         down to subroutines.
6778 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6780         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
6781         of the worklist from a vector of gimple stmts to a vector of
6782         stmt_vec_infos.
6783         * tree-vect-stmts.c (vect_mark_relevant, process_use)
6784         (vect_mark_stmts_to_be_vectorized): Likewise
6786 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6788         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
6789         statement before passing it to vect_analyze_stmt.
6790         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
6791         the chain of phi vector definitions.  Track the exit phi via its
6792         stmt_vec_info.
6793         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
6794         STMT_VINFO_REDUC_DEF.
6795         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
6796         stmt_vec_infos to handle the statement chains.
6797         (vect_get_slp_defs): Record the first statement in the node
6798         using a stmt_vec_info.
6799         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
6800         statements here and pass their stmt_vec_info down to subroutines.
6801         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
6802         down to vect_finish_stmt_generation.
6803         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
6804         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
6805         stmt_vec_infos to subroutines.
6806         (vect_remove_stores): Use stmt_vec_infos to handle the statement
6807         chains.
6809 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6811         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
6812         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
6813         (vect_permute_store_chain, vect_setup_realignment)
6814         (vect_permute_load_chain, vect_shift_permute_load_chain)
6815         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
6816         stmts internally, and when passing values to other vectorizer routines.
6817         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6818         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
6819         (vect_analyze_loop_operations, get_initial_def_for_reduction)
6820         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
6821         (vectorizable_reduction, vectorizable_induction)
6822         (vectorizable_live_operation, vect_transform_loop_stmt)
6823         (vect_transform_loop): Likewise.
6824         * tree-vect-patterns.c (vect_reassociating_reduction_p)
6825         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
6826         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
6827         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6828         (vect_slp_analyze_node_operations_1): Likewise.
6829         * tree-vect-stmts.c (vect_mark_relevant, process_use)
6830         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
6831         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
6832         (vect_finish_stmt_generation_1, get_group_load_store_type)
6833         (get_load_store_type, vect_build_gather_load_calls)
6834         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6835         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6836         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6837         (vectorizable_store, vectorizable_load, vectorizable_condition)
6838         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
6839         (supportable_widening_operation): Likewise.
6840         (vect_get_vector_types_for_stmt): Likewise.
6841         * tree-vectorizer.h (vect_dr_behavior): Likewise.
6843 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6845         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6846         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
6847         (vect_permute_store_chain, vect_permute_load_chain)
6848         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
6849         repeated stmt_vec_info lookups.
6850         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6851         (vect_update_ivs_after_vectorizer): Likewise.
6852         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
6853         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6854         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
6855         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6856         (vect_bb_slp_scalar_cost): Likewise.
6857         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
6859 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6861         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
6862         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
6863         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
6864         to get gassigns and gcalls, rather than operating on generc gimple
6865         stmts.
6866         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
6867         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
6868         (vectorizable_load, vect_analyze_stmt): Likewise.
6869         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
6871 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6873         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
6874         return stmt_vec_infos rather than gimple stmts.  Do not accept
6875         null arguments.
6876         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
6877         of a gimple stmt.
6878         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6879         Update use of get_later_stmt.
6880         (vect_get_constant_vectors): Update call accordingly.
6881         (vect_schedule_slp_instance): Likewise
6882         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
6883         (vect_slp_analyze_instance_dependence): Likewise.
6884         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
6886 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6888         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
6889         (stmt_info_for_cost::stmt_info): ...this new field.
6890         (add_stmt_costs): Update accordingly.
6891         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6892         (vect_get_known_peeling_cost): Likewise.
6893         (vect_estimate_min_profitable_iters): Likewise.
6894         * tree-vect-stmts.c (record_stmt_cost): Likewise.
6896 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6898         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
6899         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6900         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6901         accordingly.
6902         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
6904 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6906         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
6907         a gimple stmt to a stmt_vec_info.
6908         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6910 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6912         * tree-vectorizer.h (vec_info::grouped_stores): Change from
6913         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6914         (_loop_vec_info::reduction_chains): Likewise.
6915         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
6916         accordingly.
6917         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6919 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6921         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
6922         a gimple stmt to a stmt_vec_info.
6923         (_stmt_vec_info::next_element): Likewise.
6924         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
6925         (vect_slp_analyze_and_verify_node_alignment)
6926         (vect_analyze_group_access_1, vect_analyze_group_access)
6927         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
6928         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
6929         (vect_supportable_dr_alignment): Update accordingly.
6930         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
6931         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
6932         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
6933         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6934         * tree-vect-slp.c (vect_build_slp_tree_1)
6935         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
6936         (vect_split_slp_store_group, vect_analyze_slp_instance)
6937         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
6938         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
6939         (get_group_load_store_type, get_load_store_type)
6940         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
6941         (vect_transform_stmt, vect_remove_stores): Likewise.
6943 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6945         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
6946         than a gimple stmt.
6947         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6948         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
6949         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
6950         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
6951         (vector_alignment_reachable_p, vect_get_data_access_cost)
6952         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
6953         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
6954         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6955         (vect_analyze_group_access_1, vect_analyze_group_access)
6956         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
6957         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
6958         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
6959         result of vect_dr_stmt and use the stmt_vec_info instead of
6960         the associated gimple stmt.
6961         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6962         (vect_gen_prolog_loop_niters): Likewise.
6963         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6965 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6967         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
6968         to a vec<stmt_vec_info>.
6969         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
6970         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
6971         vec<stmt_vec_info>.
6972         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
6973         to a vec<stmt_vec_info>.
6974         (bst_traits::value_type, bst_traits::value_type): Likewise.
6975         (bst_traits::hash): Update accordingly.
6976         (vect_get_and_check_slp_defs): Change the stmts parameter from
6977         a vec<gimple *> to a vec<stmt_vec_info>.
6978         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
6979         (vect_build_slp_tree): Likewise.
6980         (vect_build_slp_tree_2): Likewise.  Update uses of
6981         SLP_TREE_SCALAR_STMTS.
6982         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
6983         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
6984         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
6985         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
6986         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
6987         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
6988         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
6989         (vect_get_constant_vectors, vect_get_slp_defs)
6990         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
6991         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
6992         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
6993         instead of gimple stmts.
6994         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
6995         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
6996         (vect_slp_analyze_instance_dependence): Update uses of
6997         SLP_TREE_SCALAR_STMTS.
6998         (vect_slp_analyze_and_verify_node_alignment): Likewise.
6999         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
7000         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
7001         (get_initial_defs_for_reduction): Likewise.
7002         (vect_create_epilog_for_reduction): Likewise.
7003         (vectorize_fold_left_reduction): Likewise.
7004         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
7005         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
7006         (can_vectorize_live_stmts): Likewise.
7008 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7010         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
7011         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7012         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
7013         than gimple stmts.
7014         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
7015         of a gimple stmt.
7016         (gather_scalar_reductions): Update after above interface changes.
7017         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
7018         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
7019         than gimple stmts.
7020         (vect_force_simple_reduction): Likewise.
7021         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
7022         LOOP_VINFO_REDUCTIONS.
7023         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7025 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7027         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
7028         a gimple stmt to a stmt_vec_info.
7029         * tree-vect-loop.c (vect_active_double_reduction_p)
7030         (vect_force_simple_reduction, vectorizable_reduction): Update
7031         accordingly.
7033 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7035         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
7036         vec<gimple *> to a vec<stmt_vec_info>.
7037         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
7038         the reduction_phis argument from a vec<gimple *> to a
7039         vec<stmt_vec_info>.
7040         (vectorizable_reduction): Likewise the phis local variable that
7041         is passed to vect_create_epilog_for_reduction.  Update for new type
7042         of SLP_TREE_VEC_STMTS.
7043         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
7044         (vectorizable_live_operation): Likewise.
7045         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
7046         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
7048 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7050         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
7051         a gimple stmt to a stmt_vec_info.
7052         (vectorizable_condition, vectorizable_live_operation)
7053         (vectorizable_reduction, vectorizable_induction): Pass back the
7054         vectorized statement as a stmt_vec_info.
7055         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
7056         use of STMT_VINFO_VEC_STMT.
7057         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
7058         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
7059         as stmt_vec_infos rather than gimple stmts.
7060         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
7061         to a stmt_vec_info.
7062         (vectorizable_live_operation): Likewise.
7063         (vectorizable_reduction, vectorizable_induction): Likewise,
7064         updating use of STMT_VINFO_VEC_STMT.
7065         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
7066         of STMT_VINFO_VEC_STMT.
7067         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
7068         (vectorizable_simd_clone_call, vectorizable_conversion)
7069         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7070         (vectorizable_store, vectorizable_load, vectorizable_condition)
7071         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
7072         from a gimple stmt to a stmt_vec_info.
7073         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
7074         pointer to a stmt_vec_info to the vectorizable_* routines.
7076 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7078         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
7079         a gimple stmt to a stmt_vec_info.
7080         (is_pattern_stmt_p): Update accordingly.
7081         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
7082         (vect_record_grouped_load_vectors): Likewise.
7083         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
7084         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
7085         (vect_model_reduction_cost): Likewise.
7086         (vect_create_epilog_for_reduction): Likewise.
7087         (vectorizable_reduction, vectorizable_induction): Likewise.
7088         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7089         Return the stmt_vec_info for the pattern statement.
7090         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
7091         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
7092         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7093         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
7094         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
7095         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
7096         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
7097         (free_stmt_vec_info, vect_is_simple_use): Likewise.
7099 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7101         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
7102         (vect_finish_stmt_generation): Likewise.
7103         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7104         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
7105         (vect_build_gather_load_calls): Use the return value of the above
7106         functions instead of a separate call to vinfo_for_stmt.  Use narrow
7107         scopes for the input gimple stmt and wider scopes for the associated
7108         stmt_vec_info.  Use vec_info::lookup_def when setting these
7109         stmt_vec_infos from an SSA_NAME definition.
7110         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7111         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7112         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7113         (vectorizable_store, vectorizable_load, vectorizable_condition)
7114         (vectorizable_comparison): Likewise.
7115         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
7116         (vectorizable_reduction): Likewise.
7118 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7120         * tree-vectorizer.h (vect_is_simple_use): Add an optional
7121         stmt_vec_info * parameter before the optional gimple **.
7122         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7123         (process_use, vect_get_vec_def_for_operand_1): Update callers.
7124         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
7125         * tree-vect-loop.c (vectorizable_reduction): Likewise.
7126         (vectorizable_live_operation): Likewise.
7127         * tree-vect-patterns.c (type_conversion_p): Likewise.
7128         (vect_look_through_possible_promotion): Likewise.
7129         (vect_recog_rotate_pattern): Likewise.
7130         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7132 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7134         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
7135         a typedef to a wrapper class.
7136         (NULL_STMT_VEC_INFO): New macro.
7137         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
7138         (stmt_vec_info::operator*): New function.
7139         (stmt_vec_info::operator gimple *): Likewise.
7140         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
7141         (add_stmt_costs): Likewise.
7142         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
7143         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7144         (vect_get_known_peeling_cost): Likewise.
7145         (vect_estimate_min_profitable_iters): Likewise.
7146         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7147         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
7148         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7149         (vectorizable_store, free_stmt_vec_infos): Likewise.
7150         (new_stmt_vec_info): Change return type of xcalloc to
7151         _stmt_vec_info *.
7153 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7155         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
7156         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
7157         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
7158         a single_imm_use-based sequence.
7159         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
7161 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7163         * tree-vectorizer.h (vec_info::lookup_def): Declare.
7164         * tree-vectorizer.c (vec_info::lookup_def): New function.
7165         * tree-vect-patterns.c (vect_get_internal_def): Use it.
7166         (vect_widened_op_tree): Likewise.
7167         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7168         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
7169         (vectorizable_reduction): Likewise.
7170         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
7171         of a gimple *.
7172         (vect_is_slp_reduction): Update calls accordingly.  Use
7173         vec_info::lookup_def.
7174         (vect_is_simple_reduction): Likewise
7175         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
7177 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7179         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
7180         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
7181         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
7182         of vinfo_for_stmt.
7183         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
7184         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
7185         (vect_update_vf_for_slp, vect_analyze_loop_operations)
7186         (vect_is_slp_reduction, vectorizable_induction)
7187         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
7188         * tree-vect-patterns.c (vect_init_pattern_stmt):
7189         (vect_determine_min_output_precision_1, vect_determine_precisions)
7190         (vect_pattern_recog): Likewise.
7191         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
7192         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
7193         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
7194         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7195         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
7196         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
7197         info field from a loop to a loop_vec_info.
7199 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7201         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
7202         (vec_info::add_stmt): Declare.
7203         * tree-vectorizer.c (vec_info::add_stmt): New function.
7204         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
7205         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
7206         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7207         (vectorizable_induction): Likewise.
7208         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
7209         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7210         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
7211         (vectorizable_load): Likewise.
7212         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7213         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
7214         (vect_recog_gather_scatter_pattern): Likewise.
7215         (append_pattern_def_seq): Likewise.  Remove a check that is
7216         performed by add_stmt itself.
7218 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7220         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
7221         which make_ssa_name was called with new_stmt before new_stmt
7222         had been created.
7224 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7226         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
7227         split out from...
7228         (vect_is_slp_reduction): ...here...
7229         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
7230         that are already known to be false.
7232 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7234         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
7235         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
7236         STMT_VINFO_NUM_SLP_USES when it's true.
7237         (vect_free_slp_instance): Add a final_p parameter and pass it to
7238         vect_free_slp_tree.
7239         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
7240         (vect_analyze_slp_instance): Likewise.
7241         (vect_slp_analyze_operations): Likewise.
7242         (vect_slp_analyze_bb_1): Likewise.
7243         * tree-vectorizer.c (vec_info): Likewise.
7244         * tree-vect-loop.c (vect_transform_loop): Likewise.
7246 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7248         * tree-vect-loop.c (vectorizable_reduction): Assert that the
7249         function is not called for second and subsequent members of
7250         a reduction group.
7252 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7254         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
7255         cases for nested loops from here to ...
7256         (vect_create_epilog_for_reduction): ...here.  Only call
7257         vect_is_simple_use for inner-loop reductions.
7259 2018-07-31  Martin Liska  <mliska@suse.cz>
7261         PR gcov-profile/85338
7262         PR gcov-profile/85350
7263         PR gcov-profile/85372
7264         * profile.c (struct location_triplet): New.
7265         (struct location_triplet_hash): Likewise.
7266         (output_location): Do not output a BB that
7267         is already recorded for a line.
7268         (branch_prob): Use streamed_locations.
7270 2018-07-31  Martin Liska  <mliska@suse.cz>
7272         PR gcov-profile/85370
7273         * coverage.c (coverage_begin_function): Do not mark target
7274         clones as artificial functions.
7276 2018-07-31  Martin Liska  <mliska@suse.cz>
7278         PR gcov-profile/83813
7279         PR gcov-profile/84758
7280         PR gcov-profile/85217
7281         PR gcov-profile/85332
7282         * profile.c (branch_prob): Do not record GOTO expressions
7283         for GIMPLE statements which locations are already streamed.
7285 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7287         * gcc.c (handle_spec_function): Accept a soft_matched_part
7288         argument, as do_spec_1.  Pass it down to ...
7289         (eval_spec_function): Accept a soft_matched_part argument,
7290         and pass it down to ...
7291         (do_spec_2): Accept a soft_matched_part argument, and pass
7292         it down to do_spec_1.
7293         (do_spec_1): Pass soft_matched_part to handle_spec_function.
7294         (handle_braces): Update call to handle_spec_function.
7295         (driver::set_up_specs): Update calls to do_spec_2.
7296         (compare_debug_dump_opt_spec_function): Likewise.
7297         (compare_debug_self_opt_spec_function): Likewise.
7299 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7301         * common.opt (nolibc): New option.
7302         * doc/invoke.texi (Link Options): Document it.
7303         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
7304         * config/alpha/linux.h: Likewise.
7305         * config/arc/elf.h: Likewise.
7306         * config/arm/uclinux-elf.h: Likewise.
7307         * config/arm/unknown-elf.h: Likewise.
7308         * config/avr/avrlibc.h: Likewise.
7309         * config/bfin/bfin.h: Likewise.
7310         * config/bfin/linux.h: Likewise.
7311         * config/bfin/uclinux.h: Likewise.
7312         * config/darwin.h: Likewise.
7313         * config/darwin10.h: Likewise.
7314         * config/darwin12.h: Likewise.
7315         * config/gnu-user.h: Likewise.
7316         * config/lm32/uclinux-elf.h: Likewise.
7317         * config/pa/pa-hpux11.h: Likewise.
7318         * config/pa/pa64-hpux.h: Likewise.
7319         * config/sparc/sparc.h: Likewise.
7321 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7323         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
7324         undefined variables.
7326 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
7328         PR target/86640
7329         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
7330         instead of GEN_INT.
7332 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7334         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7335         terminated string literal.
7337 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
7339         PR rtl-optimization/85160
7340         * combine.c (is_just_move): New function.
7341         (try_combine): Allow combining two instructions into two if neither of
7342         the original instructions was a move.
7344 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
7346         PR target/86673
7347         * doc/extend.texi (Global Register Variables): Discourage use of type
7348         qualifiers.
7349         (Local Register Variables): Likewise.
7351 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
7353         PR tree-optimization/86506
7354         * hwint.h (ceil_log2): Resync with hwint.c implementation.
7356 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
7358         PR target/86547
7359         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
7360         hard_regno, make sure no insn between `from` and `to` clobbers it.
7362 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
7363             Tom de Vries  <tdevries@suse.de>
7365         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
7366         (PTX_DEFAULT_RUNTIME_DIM): ... this.
7367         (nvptx_goacc_validate_dims): Set default worker and gang dims to
7368         PTX_DEFAULT_RUNTIME_DIM.
7369         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
7371 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
7373         * config/pa/pa.c (pa_output_addr_vec): Align address table.
7374         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
7375         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
7377 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
7379         * config/rs6000/constraints.md (wG constraint): Delete, no longer
7380         used.
7381         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
7382         predicate to reflect toc fusion has been deleted.
7383         (toc_fusion_mem_raw): Delete, no longer used.
7384         (toc_fusion_mem_wrapped): Likewise.
7385         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
7386         fusion mask bit.
7387         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
7388         Delete, no longer used.
7389         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
7390         meant to be used for toc fusion.
7391         (rs6000_debug_print_mode): Delete toc fusion debugging.
7392         (rs6000_debug_reg_global): Likewise.
7393         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
7394         fusion and secondary reload support that were never used.
7395         (rs6000_option_override_internal): Delete TOC fusion, that was only
7396         partially defined, and it did not work unless you also used the
7397         -mcmodel= switch.
7398         (rs6000_legitimate_address_p): Delete TOC fusion support.
7399         (rs6000_opt_masks): Likewise.
7400         (fusion_wrap_memory_address): Delete function, no longer used.
7401         (fusion_split_address); Delete TOC fusion support.
7402         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
7403         longer used with toc fusion being deleted.
7404         (TARGET_TOC_FUSION_FP): Likewise.
7405         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
7406         UNSPEC.
7407         (toc fusion spliter): Delete TOC fusion support.
7408         (toc_fusionload_<mode>): Likewise.
7409         (toc_fusionload_di): Likewise.
7410         (fusion_gpr_load_<mode>): Delete generator function, this insn no
7411         longer needs to be named.  Rename predicate to delete TOC fusion.
7412         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7413         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7414         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7415         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7416         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
7418 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7420         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
7421         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
7422         __int128 in built-in function prototypes.
7423         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
7424         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
7426 2018-07-27  Martin Sebor  <msebor@redhat.com>
7428         PR tree-optimization/86696
7429         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
7430         types, including enums.
7431         (handle_char_store): Be prepared for the above function to fail.
7433 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
7435         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
7436         when optimization level is lower than 2 or optimize for size.
7438 2018-07-26  Martin Sebor  <msebor@redhat.com>
7440         PR tree-optimization/86043
7441         PR tree-optimization/86042
7442         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
7443         (get_string_cst_length): Rename...
7444         (get_min_string_length): ...to this.  Add argument.
7445         (handle_char_store): Extend to handle multi-character stores by
7446         MEM_REF.
7447         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
7448         * tree.h (initializer_zerop): Add argument.
7450 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
7452         PR middle-end/86660
7453         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
7454         declare target to variables if they have always,{to,from,tofrom} map
7455         kinds.
7457 2018-07-26  Martin Liska  <mliska@suse.cz>
7459         PR lto/86548
7460         * lto-wrapper.c: Add linker_output as prefix
7461         for ltrans_output_file.
7463 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
7465         PR rtl-optimization/85805
7466         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
7467         value for hard registers if that was written in the same mode.
7469 2018-07-26  Martin Liska  <mliska@suse.cz>
7471         PR gcov-profile/86536
7472         * gcov.c (format_gcov): Use printf format %.*f directly
7473         and do not handle special values.
7475 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7477         * common/config/arc/arc-common.c (arc_option_optimization_table):
7478         Update default optimizations for size.
7480 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7482         * config/arc/arc.md (movsf_insn): Add short instruction selection.
7483         * config/arc/constraints.md (CfZ): New constraint.
7484         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
7485         (subsf3_fpu): Likewise.
7486         (cmpsf_fpu): Likewise.
7487         (cmpsf_fpu_uneq): Likewise.
7489 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7491         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
7492         accesses as well.
7493         (arc_is_uncached_mem_p): uncached applies to both the variable and
7494         the pointer.
7496 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7498         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
7499         register names.
7501 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
7503         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
7504         field "m_scopes" from vec to auto_vec.
7506 2018-07-25  Martin Liska  <mliska@suse.cz>
7508         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
7509         return type.
7511 2018-07-25  Richard Biener  <rguenther@suse.de>
7513         PR debug/86654
7514         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
7515         special wrt context_die late.
7516         (gen_subprogram_die): Re-use DIEs in local scope.
7518 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
7520         PR tree-optimization/86644
7521         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
7523 2018-07-25  Martin Liska  <mliska@suse.cz>
7525         PR middle-end/86645
7526         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
7527         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
7529 2018-07-25  Martin Liska  <mliska@suse.cz>
7531         PR sanitizer/79635
7532         * params.def: Explain ASan abbreviation and provide
7533         a documentation link.
7535 2018-07-24  Martin Sebor  <msebor@redhat.com>
7537         PR tree-optimization/86622
7538         PR tree-optimization/86532
7539         * builtins.h (string_length): Declare.
7540         * builtins.c (c_strlen): Correct handling of non-constant offsets.
7541         (check_access): Be prepared for non-constant length ranges.
7542         (string_length): Make extern.
7543         * expr.c (string_constant): Only handle the minor non-constant
7544         array index.  Use string_constant to compute the length of
7545         a generic string constant.
7547 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
7549         PR tree-optimization/86618
7550         * tree-vect-stmts.c (vectorizable_call): Don't take the address
7551         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
7553 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
7555         PR tree-optimization/86636
7556         * json.cc (json::object::set): Fix comment.  Add assertions.
7557         (json::array::append): Move here from json.h.  Add comment and an
7558         assertion.
7559         (json::string::string): Likewise.
7560         * json.h (json::array::append): Move to json.cc.
7561         (json::string::string): Likewise.
7562         * optinfo-emit-json.cc
7563         (optrecord_json_writer::impl_location_to_json): Assert that we
7564         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
7565         wrapper around it.  Expand the location once, rather than three
7566         times.
7567         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
7568         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
7569         wrappers.
7570         (optrecord_json_writer::optinfo_to_json): Likewise, in four
7571         places.  Fix some overlong lines.
7573 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
7575         * config/aarch64/aarch64-simd.md
7576         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
7577         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
7578         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
7579         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
7580         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
7581         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
7582         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
7583         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
7584         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
7586 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
7588         PR middle-end/86627
7589         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
7590         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
7591         and abs_d == d, do the power of two handling if profitable.
7593 2018-07-24  Richard Biener  <rguenther@suse.de>
7595         * match.pd: Add BIT_FIELD_REF canonicalizations.
7597 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7599         PR c/86617
7600         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
7602 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7604         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
7605         terminated STRING_CST object.
7607 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7609         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
7611 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
7613         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
7614         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
7615         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
7616         the elements into a register.
7617         (rs6000_split_v4si_init_di_reg): Delete.
7618         (rs6000_split_v4si_init): Delete.
7619         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
7620         (vsx_init_v4si): Rewrite as a define_expand.
7622 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
7624         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
7625         zero_extend argument from memory): New.
7627 2018-07-22  Martin Sebor  <msebor@redhat.com>
7629         PR bootstrap/86621
7630         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
7631         diagnosing calls with unknown arguments unless -Walloca-larger-than
7632         is restricted to less than PTRDIFF_MAX bytes.
7634 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
7636         * doc/gcov.texi (Invoking Gcov): Editorial changes.
7638 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
7640         * pretty-print.c (text_info::set_location): Remove redundant
7641         "line_table" parameter from call to rich_location::set_range.
7643 2018-07-20  Martin Sebor  <msebor@redhat.com>
7645         PR middle-end/82063
7646         * builtins.c (expand_builtin_alloca): Adjust.
7647         * calls.c (alloc_max_size): Simplify.
7648         * cgraphunit.c (cgraph_node::expand): Adjust.
7649         * common.opt (larger_than_size, warn_frame_larger_than): Remove
7650         variables.
7651         (frame_larger_than_size): Same.
7652         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
7653         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
7654         Initialize.
7655         * doc/invoke.texi (GCC Command Options): Document option arguments.
7656         Explain byte-size arguments and suffixes.
7657         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
7658         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
7659         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
7660         * doc/options.texi (UInteger): Expand.
7661         (Host_Wide_Int, ByteSize): Document new properties.
7662         * final.c (final_start_function_1): Include sizes in an error message.
7663         * function.c (frame_offset_overflow): Same.
7664         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
7665         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
7666         Diagnose unbounded alloca calls only for limits of less than
7667         PTRDIFF_MAX.
7668         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
7669         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
7670         for alloca(0).
7671         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
7672         only for limits of less than PTRDIFF_MAX.
7673         * langhooks-def.h (lhd_handle_option): Change function argument
7674         to HOST_WIDE_INT.
7675         * langhooks.c (lhd_handle_option): Same.
7676         * langhooks.h (handle_option): Same.
7677         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
7678         ByteSize flags.
7679         (var_type, var_type_struct): Same.
7680         (var_set): Handle ByteSize flag.
7681         * optc-gen.awk: Add comments to output to ease debugging.  Make
7682         use of HOST_WIDE_INT where appropriate.
7683         * opts-gen-save.awk:  Use %lx to format unsigned long.
7684         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
7685         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
7686         arguments.  Parse bytes-size suffixes.
7687         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
7688         (enum_value_to_arg): Same.
7689         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
7690         (handle_option): Adjust.
7691         (generate_option): Change function argument to HOST_WIDE_INT.
7692         (cmdline_handle_error): Adjust.
7693         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
7694         (set_option): Change function argument to HOST_WIDE_INT.
7695         (option_enabled): Handle cl_host_wide_int.
7696         (get_option_state): Handle CLVC_SIZE.
7697         (control_warning_option): Same.
7698         * opts.c (common_handle_option): Change function argument to
7699         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
7700         OPT_Wvla_larger_than_.
7701         * opts.h (enum cl_var_type): Add an enumerator.
7702         * stor-layout.c (layout_decl): Print a more meaningful warning.
7703         * toplev.c (output_stack_usage): Adjust.
7705 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
7707         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
7708         call to inline_expand_builtin_string_cmp.
7709         (expand_builtin_strcmp): Likewise.
7710         (expand_builtin_strncmp): Likewise.
7711         (inline_string_cmp): Delete the last parameter, change char_type_node
7712         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
7713         two operands.
7714         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
7715         the inlining expansion on target where the type of the call has same or
7716         narrower precision than unsigned char.
7718 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
7720         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
7721         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
7722         * common.opt (fsave-optimization-record): New option.
7723         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
7724         * doc/invoke.texi (-fsave-optimization-record): New option.
7725         * dumpfile.c: Include "optinfo-emit-json.h".
7726         (struct kv_pair): Move to coretypes.h.
7727         (optgroup_options): Make non-static.
7728         (dump_context::end_scope): Call
7729         optimization_records_maybe_pop_dump_scope.
7730         * dumpfile.h (optgroup_options): New decl.
7731         * json.cc: New file.
7732         * json.h: New file.
7733         * optinfo-emit-json.cc: New file.
7734         * optinfo-emit-json.h: New file.
7735         * optinfo.cc: Include "optinfo-emit-json.h".
7736         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
7737         (optinfo_enabled_p): Check optimization_records_enabled_p.
7738         (optinfo_wants_inlining_info_p): Likewise.
7739         * optinfo.h: Update comment.
7740         * profile-count.c (profile_quality_as_string): New function.
7741         * profile-count.h (profile_quality_as_string): New decl.
7742         (profile_count::quality): New accessor.
7743         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
7744         and optinfo_emit_json_cc_tests.
7745         * selftest.h (selftest::json_cc_tests): New decl.
7746         (selftest::optinfo_emit_json_cc_tests): New decl.
7747         * toplev.c: Include "optinfo-emit-json.h".
7748         (compile_file): Call optimization_records_finish.
7749         (do_compile): Call optimization_records_start.
7750         * tree-ssa-live.c: Include optinfo.h.
7751         (remove_unused_scope_block_p): Retain inlining information if
7752         optinfo_wants_inlining_info_p returns true.
7754 2018-07-20  Richard Biener  <rguenther@suse.de>
7756         PR debug/86585
7757         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
7758         to cover -flto-partition=none.
7760 2018-07-20  Martin Liska  <mliska@suse.cz>
7762         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
7763         (get_decl_source_range): Remove unused function.
7765 2018-07-20  Richard Biener  <rguenther@suse.de>
7767         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
7768         (struct vn_phi_s): Likewise.
7769         (struct vn_reference_s): Likewise.
7770         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
7771         for searching the slot of an entry known to be in the hash itself.
7772         (vn_phi_hasher::equal): Likewise.
7773         (vn_reference_hasher::equal): Likewise.
7774         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
7775         globals.
7776         (optimistic_info, current_info): Remove, keeping only valid_info.
7777         (vn_reference_lookup_1): Remove fallback lookup.
7778         (vn_reference_lookup_2): Likewise.
7779         (vn_nary_op_lookup_1): Likewise.
7780         (vn_phi_lookup): Likewise.
7781         (vn_nary_build_or_lookup_1): Make sure to not chain the built
7782         hash element.
7783         (vn_reference_insert): Adjust, chain the inserted hash element
7784         at last_inserted_ref.
7785         (vn_reference_insert_pieces): Likewise.
7786         (visit_reference_op_call): Likewise.
7787         (vn_nary_op_insert_into): Chain the inserted hash element at
7788         last_inserted_nary.
7789         (vn_nary_op_insert_pieces): Adjust.
7790         (vn_nary_op_insert): Likewise.
7791         (vn_nary_op_insert_stmt): Likewise.
7792         (vn_phi_insert): Adjust, chain the inserted hash element at
7793         last_inserted_phi.
7794         (process_scc): Remove clearing and copying the optimistic
7795         table.  Instead remove elements inserted during an optimistic
7796         iteration from the single table we maintain.
7797         (init_scc_vn): Adjust.
7798         (free_scc_vn): Likewise.
7799         (sccvn_dom_walker::record_cond): Likewise.
7800         (sccvn_dom_walker::after_dom_children): Likewise.
7802 2018-07-19  Martin Sebor  <msebor@redhat.com>
7804         PR tree-optimization/84047
7805         PR tree-optimization/83776
7806         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
7807         (check_array_bounds): Call it.
7809 2018-07-19  Martin Sebor  <msebor@redhat.com>
7811         * align.h (align_flags): Use member initialization.
7813 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
7815         * Makefile.in (OBJS): Add optinfo.o.
7816         * coretypes.h (class symtab_node): New forward decl.
7817         (struct cgraph_node): New forward decl.
7818         (class varpool_node): New forward decl.
7819         * dump-context.h: New file.
7820         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
7821         "tree-pass.h".
7822         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
7823         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
7824         (set_alt_dump_file): Likewise.
7825         (dump_context::~dump_context): New dtor.
7826         (dump_gimple_stmt): Move implementation to...
7827         (dump_context::dump_gimple_stmt): ...this new member function.
7828         Add the stmt to any pending optinfo, creating one if need be.
7829         (dump_gimple_stmt_loc): Move implementation to...
7830         (dump_context::dump_gimple_stmt_loc): ...this new member function.
7831         Start a new optinfo and add the stmt to it.
7832         (dump_gimple_expr): Move implementation to...
7833         (dump_context::dump_gimple_expr): ...this new member function.
7834         Add the stmt to any pending optinfo, creating one if need be.
7835         (dump_gimple_expr_loc): Move implementation to...
7836         (dump_context::dump_gimple_expr_loc): ...this new member function.
7837         Start a new optinfo and add the stmt to it.
7838         (dump_generic_expr): Move implementation to...
7839         (dump_context::dump_generic_expr): ...this new member function.
7840         Add the tree to any pending optinfo, creating one if need be.
7841         (dump_generic_expr_loc): Move implementation to...
7842         (dump_context::dump_generic_expr_loc): ...this new member
7843         function.  Add the tree to any pending optinfo, creating one if
7844         need be.
7845         (dump_printf): Move implementation to...
7846         (dump_context::dump_printf_va): ...this new member function.  Add
7847         the text to any pending optinfo, creating one if need be.
7848         (dump_printf_loc): Move implementation to...
7849         (dump_context::dump_printf_loc_va): ...this new member function.
7850         Start a new optinfo and add the stmt to it.
7851         (dump_dec): Move implementation to...
7852         (dump_context::dump_dec): ...this new member function.  Add the
7853         value to any pending optinfo, creating one if need be.
7854         (dump_context::dump_symtab_node): New member function.
7855         (dump_context::get_scope_depth): New member function.
7856         (dump_context::begin_scope): New member function.
7857         (dump_context::end_scope): New member function.
7858         (dump_context::ensure_pending_optinfo): New member function.
7859         (dump_context::begin_next_optinfo): New member function.
7860         (dump_context::end_any_optinfo): New member function.
7861         (dump_context::s_current): New global.
7862         (dump_context::s_default): New global.
7863         (dump_scope_depth): Delete global.
7864         (dumpfile_ensure_any_optinfo_are_flushed): New function.
7865         (dump_symtab_node): New function.
7866         (get_dump_scope_depth): Reimplement in terms of dump_context.
7867         (dump_begin_scope): Likewise.
7868         (dump_end_scope): Likewise.
7869         (selftest::temp_dump_context::temp_dump_context): New ctor.
7870         (selftest::temp_dump_context::~temp_dump_context): New dtor.
7871         (selftest::verify_item): New function.
7872         (ASSERT_IS_TEXT): New macro.
7873         (ASSERT_IS_TREE): New macro.
7874         (ASSERT_IS_GIMPLE): New macro.
7875         (selftest::test_capture_of_dump_calls): New test.
7876         (selftest::dumpfile_c_tests): Call it.
7877         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
7878         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
7879         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
7880         descriptive comment.
7881         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
7882         (dump_node, dump_bb): Move these unrelated decls.
7883         (class dump_manager): Add leading comment.
7884         * optinfo.cc: New file.
7885         * optinfo.h: New file.
7887 2018-07-19  Michael Collison  <michael.collison@arm.com>
7888             Richard Henderson <rth@redhat.com>
7890         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
7891         (subti): Handle op1 zero.
7892         (subvti4, usub4ti4): New.
7893         (*sub<GPI>3_compare1_imm): New.
7894         (sub<GPI>3_carryinCV): New.
7895         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
7896         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
7898 2018-07-19  Michael Collison  <michael.collison@arm.com>
7899             Richard Henderson <rth@redhat.com>
7901         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
7902         (addti3): Create simpler code if low part is already known to be 0.
7903         (addvti4, uaddvti4): New.
7904         (*add<GPI>3_compareC_cconly_imm): New.
7905         (*add<GPI>3_compareC_cconly): New.
7906         (*add<GPI>3_compareC_imm): New.
7907         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
7908         handle constants within this pattern..
7909         (*add<GPI>3_compareV_cconly_imm): New.
7910         (*add<GPI>3_compareV_cconly): New.
7911         (*add<GPI>3_compareV_imm): New.
7912         (add<GPI>3_compareV): New.
7913         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
7914         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
7915         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
7916         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
7917         with 'comparison' operator.
7918         (*add<GPI>3_compareV_cconly_imm): Ditto.
7919         (*add<GPI>3_compareV_cconly): Ditto.
7920         (*add<GPI>3_compareV_imm): Ditto.
7921         (add<GPI>3_compareV): Ditto.
7922         (add<mode>3_carryinC): Ditto.
7923         (*add<mode>3_carryinC_zero): Ditto.
7924         (*add<mode>3_carryinC): Ditto.
7925         (add<mode>3_carryinV): Ditto.
7926         (*add<mode>3_carryinV_zero): Ditto.
7927         (*add<mode>3_carryinV): Ditto.
7929 2018-07-19  Michael Collison  <michael.collison@arm.com>
7930             Richard Henderson <rth@redhat.com>
7932         * config/aarch64/aarch64-modes.def (CC_V): New.
7933         * config/aarch64/aarch64-protos.h
7934         (aarch64_addti_scratch_regs): Declare
7935         (aarch64_subvti_scratch_regs): Declare.
7936         (aarch64_expand_subvti): Declare.
7937         (aarch64_gen_unlikely_cbranch): Declare
7938         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
7939         for signed overflow using CC_Vmode.
7940         (aarch64_get_condition_code_1): Handle CC_Vmode.
7941         (aarch64_gen_unlikely_cbranch): New function.
7942         (aarch64_addti_scratch_regs): New function.
7943         (aarch64_subvti_scratch_regs): New function.
7944         (aarch64_expand_subvti): New function.
7946 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7948         * config/aarch64/aarch64-option-extensions.def: New entry for profile
7949         extension.
7950         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
7951         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
7952         extension.
7954 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7956         PR target/83009
7957         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7958         address check not strict.
7960 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7962         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
7963         Umq with Umn.
7964         (store_pair_lanes<mode>): Likewise.
7965         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
7966         enum value 'ADDR_QUERY_LDP_STP_N'.
7967         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
7968         (aarch64_print_address_internal): Add declaration.
7969         (aarch64_print_ldpstp_address): Remove.
7970         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
7971         (aarch64_print_operand): Change printing of 'y'.
7972         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
7973         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
7974         'true' rather than '1'.
7975         * config/aarch64/constraints.md (Uml): Likewise.
7976         (Uml): Rename to Umn.
7977         (Umq): Remove.
7979 2018-07-19  Richard Biener  <rguenther@suse.de>
7981         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
7982         a trailing array.
7983         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
7984         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
7985         (vn_reference_hasher): Likewise.
7986         (struct vn_tables_s): Remove obstack and alloc-pool members.
7987         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
7988         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
7989         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
7990         (vn_reference_insert_pieces): Likewise.
7991         (alloc_vn_nary_op_noinit): Adjust.
7992         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
7993         (vn_phi_eq): Adjust.
7994         (shared_lookup_phiargs): Remove.
7995         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
7996         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
7997         (visit_reference_op_call): Likewise.
7998         (copy_nary, copy_phi, copy_reference): Remove.
7999         (process_scc): Rewind the obstack when iterating.  Do not
8000         copy the elements to valid_info but just move them from one
8001         hashtable to the other.
8002         (allocate_vn_table): Adjust.
8003         (free_vn_table): Likewise.
8004         (init_scc_vn): Likewise.
8005         (free_scc_vn): Likewise.
8007 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
8009         PR target/86560
8010         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
8011         indirect_return as function type attribute.
8012         (ix86_attribute_table): Change indirect_return to function
8013         type attribute.
8014         * doc/extend.texi: Update indirect_return attribute.
8016 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
8018         * wide-int.h (widest2_int): New.
8019         * gimple-fold.c (arith_overflowed_p): Use it.
8020         * tree.h (widest2_int_cst): New.
8021         * tree-vrp.c (wide_int_binop_overflow): Rename from
8022         vrp_int_const_binop.
8023         Rewrite to work on trees.
8024         (extract_range_from_multiplicative_op_1): Abstract code to...
8025         (wide_int_range_min_max): ...here.
8026         (wide_int_range_cross_product): ...and here.
8027         (extract_range_from_binary_expr_1): Abstract overflow code to...
8028         (wide_int_range_mult_wrapping): ...here.
8029         * tree-vrp.h (wide_int_range_cross_product): New.
8030         (wide_int_range_mult_wrapping): New.
8032 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
8033             Julia Koval  <julia.koval@intel.com>
8035         * config/i386/x86-tune-costs.h (skylake_memcpy,
8036         skylake_memset): Replace rep_prefix with unrolling for size 512.
8038 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
8040         PR middle-end/86544
8041         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
8042         comparision with EQ_EXPR in last stmt.
8044 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8046         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
8047         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
8048         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
8049         previously known as "PowerPC AltiVec Built-in Functions".  Move
8050         some material to new subsubsections "PowerPC AltiVec Built-in
8051         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
8052         ISA 2.07".
8053         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
8054         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
8055         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
8056         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
8058 2018-07-18  Richard Biener  <rguenther@suse.de>
8060         PR tree-optimization/86557
8061         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
8062         EXACT_DIV_EXPR.
8064 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
8066         * config/s390/s390.c (s390_function_profiler): Generate CFI.
8068 2018-07-17  Jeff Law  <law@redhat.com>
8070         * config/arm/arm.c (get_label_padding): Update for recent
8071         changes to label_to_alignment.
8073         PR tree-optimization/86010
8074         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
8076         * config/mips/mips.c (vr4130_align_insns): Update for recent
8077         changes to label_to_alignment.
8079         * config/frv/frv.c (frv_label_align): Update for recent changes
8080         to label_to_alignment.
8082         * config/nios2/nios2.c (nios2_label_align): Update for recent
8083         changes which dropped ALIGN_LABELS_LOG.
8085 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
8087         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
8088         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
8090 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
8092         * config/arc/arc.c (arc_label_align): Use align_labels instead of
8093         deprecated align_labels_log.
8095 2018-07-17  Richard Biener  <rguenther@suse.de>
8097         PR lto/86456
8098         * dwarf2out.c (init_sections_and_labels): Always generate
8099         a debug_line_str_section for early LTO debug.
8100         (dwarf2out_finish): Reset debug_line_str_hash output early.
8101         Bump counter for extra dwarf5 .debug_loc labels to not conflict
8102         with fat LTO part.
8103         (dwarf2out_early_finish): Output debug_line_str.
8105 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
8107         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
8108         index register on z196 or later.
8110 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
8112         * config/s390/s390.c (s390_default_align): Set default function
8113         alignment to 16.
8114         (s390_override_options_after_change): Call s390_default align.
8115         (s390_option_override_internal): Call s390_default_align.
8116         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
8118 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
8120         PR middle-end/86542
8121         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
8122         to _looptemp_ clauses, other than the first two.
8124 2018-07-17  Martin Liska  <mliska@suse.cz>
8126         * opts.c: Do not enable OPT_falign_* for -Os.
8128 2018-07-17  Martin Liska  <mliska@suse.cz>
8130         * align.h (MAX_CODE_ALIGN): New.
8131         (MAX_CODE_ALIGN_VALUE): New.
8132         * common/config/i386/i386-common.c (ix86_handle_option):
8133         (MAX_CODE_ALIGN): Moved to align.h.
8134         * final.c (MAX_CODE_ALIGN): Likewise.
8135         * opts.c (parse_and_check_align_values):
8136         (MAX_CODE_ALIGN): Likewise.
8137         (MAX_CODE_ALIGN_VALUE): Likewise.
8139 2018-07-17  Martin Liska  <mliska@suse.cz>
8141         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
8142         in order to fulfil coding style.
8143         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
8144         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8145         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8146         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
8147         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
8148         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
8149         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
8150         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
8151         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8153 2018-07-17  Martin Liska  <mliska@suse.cz>
8155         * align.h: New file.
8156         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
8157         directly.
8158         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
8159         align_flags of label_to_alignment.
8160         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
8161         align_flags class.
8162         * config/m68k/m68k.c: Do not use removed align_labels_value and
8163         align_loops_value.
8164         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
8165         (LOOP_ALIGN): Likewise.
8166         (LABEL_ALIGN): Likewise.
8167         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8168         Remove not used macro.
8169         (rs6000_loop_align): Change return type to align_flags.
8170         (rs6000_loop_align_max_skip): Remove.
8171         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
8172         Change return type to align_flags.
8173         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8174         Remove not used macro.
8175         (rs6000_loop_align):  Change return type to align_flags.
8176         (rs6000_loop_align_max_skip): Remove.
8177         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
8178         * config/rx/rx-protos.h (rx_align_for_label): Make it
8179         static function.
8180         * config/rx/rx.c (rx_align_for_label): Change return type
8181         to align_flags.
8182         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
8183         macro definitions.
8184         into align_flags class.
8185         (LABEL_ALIGN): Likewise.
8186         (LOOP_ALIGN): Likewise.
8187         * config/s390/s390.c (s390_label_align): Use align_flags
8188         class member.
8189         (s390_asm_output_function_label): Likewise.
8190         * config/sh/sh.c (sh_override_options_after_change):
8191         Use align_flags class directly without macros.
8192         (find_barrier): Likewise.
8193         (barrier_align): Likewise.
8194         (sh_loop_align): Likewise.
8195         * config/spu/spu.c (spu_option_override):
8196         Use align_flags_tuple::get_value instead of removed macros.
8197         (spu_sched_init): Likewise.
8198         * config/spu/spu.h (GTY): Likewise.
8199         * config/visium/visium.c (visium_option_override):
8200         Set "8" as default secondary alignment.
8201         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
8202         in order to guarantee secondary alignment of 8.
8203         * coretypes.h: Include align.h header file.
8204         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
8205         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
8206         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
8207         * doc/tm.texi.in: Likewise.
8208         * final.c (struct label_alignment): Remove not used structure.
8209         (LABEL_ALIGN): Change type to align_flags.
8210         (LOOP_ALIGN): Likewise.
8211         (JUMP_ALIGN): Likewise.
8212         (default_loop_align_max_skip): Remove.
8213         (default_label_align_max_skip): Likewise.
8214         (default_jump_align_max_skip): Likewise.
8215         (default_label_align_after_barrier_max_skip):
8216         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
8217         (LABEL_TO_MAX_SKIP): Remove.
8218         (label_to_alignment): Return align_flags type instead of integer.
8219         (label_to_max_skip): Remove.
8220         (align_fuzz): Use align_flags type.
8221         (compute_alignments): Use align_flags type and use align_flags::max
8222         to combine multiple alignments.
8223         (grow_label_align): Grow vec instead of C array.
8224         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
8225         (shorten_branches):  Use align_flags type and use align_flags::max
8226         to combine multiple alignments.
8227         (final_scan_insn_1): Remove usage of secondary alignment that comes
8228         from label alignment, but instead use proper secondary alignment
8229         which is computed in grow_label_align.
8230         * flags.h (struct align_flags_tuple): Move to align.h.
8231         (struct align_flags): Likewise.
8232         (state_align_loops): Rename to align_loops.
8233         (state_align_jumps): Rename to align_jumps.
8234         (state_align_labels): Rename to align_labels.
8235         (state_align_functions): Rename to align_functions.
8236         (align_loops_log): Remove.
8237         (align_jumps_log): Remove.
8238         (align_labels_log): Remove.
8239         (align_functions_log): Remove.
8240         (align_loops_max_skip): Remove.
8241         (align_jumps_max_skip): Remove.
8242         (align_labels_max_skip): Remove.
8243         (align_functions_max_skip): Remove.
8244         (align_loops_value): Remove.
8245         (align_jumps_value): Remove.
8246         (align_labels_value): Remove.
8247         (align_functions_value): Remove.
8248         * output.h (label_to_alignment): Change return type to align_flags.
8249         (label_to_max_skip): Remove.
8250         * target.def: Remove loop_align_max_skip, label_align_max_skip,
8251         jump_align_max_skip macros.
8252         * targhooks.h (default_loop_align_max_skip): Remove.
8253         (default_label_align_max_skip): Likewise.
8254         (default_jump_align_max_skip): Likewise.
8255         (default_label_align_after_barrier_max_skip): Remove.
8256         * toplev.c (read_log_maxskip): Use ::normalize function.
8257         (parse_N_M): Remove not used argument and also call ::normalize.
8258         (parse_alignment_opts): Do not pass unused arguments.
8259         * varasm.c (assemble_start_function): Use directly align_functions
8260         instead of removed macros.
8261         * system.h: Do not poison removed macros.
8263 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
8265         PR middle-end/86539
8266         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
8267         and cond temporaries don't have reference type if iterator has
8268         pointer type.  For init use &for_pre_body instead of pre_p if
8269         for_pre_body is non-empty.
8271 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8273         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
8274         double-double modes to SFmode directly directly.
8275         (trunc<mode>sf2_fprs): Delete.
8277 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8279         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
8280         for conversions between IFmode and the decimal floating point modes.
8281         (init_float128_ieee): Use the correct names for conversions between
8282         KFmode and the decimal floating point modes.
8284 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8286         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
8287         for the conversions between TDmode and IFmode.
8288         (init_float128_ieee): Use more correct names for the conversions
8289         between TDmode and KFmode.
8291 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
8293         PR tree-optimization/86526
8294         * builtins.c (expand_builtin_memcmp): Formatting fixes.
8295         (inline_expand_builtin_string_cmp): Likewise.
8296         (inline_string_cmp): Likewise.  Use c_readstr instead of
8297         builtin_memcpy_read_str.  Add unit_mode temporary.
8299 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8301         PR middle-end/86528
8302         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
8303         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
8305 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8307         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
8308         Alphabetize prototypes of built-in functions, separating out
8309         built-in functions that are listed in this section but should be
8310         described elsewhere.
8312 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
8314         PR target/86511
8315         * expmed.c (emit_store_flag): Do not emit setcc followed by a
8316         conditional move when trapping comparison was split to a
8317         non-trapping one (and vice versa).
8319 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8321         * config/s390/s390.c (s390_function_profiler): Generate nops
8322         instead of profiler call sequences.
8323         * config/s390/s390.opt: Add the new option.
8325 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8327         * config/s390/s390.c (s390_function_profiler): Generate
8328         __mcount_loc section.
8329         * config/s390/s390.opt: Add the new option.
8331 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8333         * common.opt: Add the new warning.
8334         * config/s390/s390.c (s390_function_profiler): Emit "brasl
8335         %r0,__fentry__" when -mfentry is specified.
8336         (s390_option_override_internal): Disallow -mfentry for 31-bit
8337         CPUs.
8338         * config/s390/s390.opt: Add the new option.
8340 2018-07-16  Richard Biener  <rguenther@suse.de>
8342         PR lto/86523
8343         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
8344         for function-local FUNCTION_DECL and RESULT_DECL immediately.
8346 2018-07-16  Martin Liska  <mliska@suse.cz>
8348         PR ipa/86529
8349         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
8350         to ::get_create.
8352 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
8354         * config/arc/arcHS.md: Update ARCHS scheduling rules.
8356 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
8358         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
8359         for ARCHS4x.
8360         * config/arc/arc-cpus.def (hs4x): New cpu.
8361         (hs4xd): Likewise.
8362         * config/arc/arc-tables.opt: Regenerate.
8363         * config/arc/arc.c (arc_sched_issue_rate): New function.
8364         (TARGET_SCHED_ISSUE_RATE): Define.
8365         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
8366         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
8367         fpu_cvt.
8368         (attr tune): Add ARCHS4x tune values.
8369         (attr tune_dspmpy): Define.
8370         (*tst): Correct instruction type.
8371         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
8372         * config/arc/arcHS4x.md: New file.
8373         * config/arc/fpu.md: Update instruction type attributes.
8374         * config/arc/t-multilib: Regenerate.
8376 2018-07-16  Tom de Vries  <tdevries@suse.de>
8378         PR debug/86455
8379         * var-tracking.c (vt_initialize): Fix pre_dec handling.
8381 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8383         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
8384         early clobber.
8386 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
8388         PR tree-optimization/86514
8389         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
8390         conversion to a boolean type from a type with greater precision.
8392 2018-07-16  Tom de Vries  <tdevries@suse.de>
8394         * var-tracking.c (vt_initialize): Print adjusted insn slim if
8395         dump_flags request TDF_SLIM.
8397 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
8399         * fold-const.c (int_const_binop_1): Abstract...
8400         (wide_int_binop): ...wide int code here.
8401         (poly_int_binop): ...poly int code here.
8402         Abstract the rest of int_const_binop_1 into int_const_binop.
8403         * fold-const.h (wide_int_binop): New.
8404         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
8405         Remove useless PLUS/MINUS_EXPR case.
8406         (zero_nonzero_bits_from_vr): Move wide int code...
8407         (zero_nonzero_bits_from_bounds): ...here.
8408         (extract_range_from_binary_expr_1): Move mask optimization code...
8409         (range_easy_mask_min_max): ...here.
8410         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
8411         (range_easy_mask_min_max): New.
8413 2018-07-15  Jeff Law  <law@redhat.com>
8415         PR target/85993
8416         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
8417         block.
8419 2018-07-14  Jim Wilson  <jimw@sifive.com>
8421         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
8423 2018-07-14  Paul Koning  <ni1d@arrl.net>
8425         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
8427 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
8429         * lto-streamer-out.c (copy_function_or_variable): Dump info about
8430         copying section.
8432 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
8433             Steve Munroe  <munroesj52@gmail.com>
8435         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
8436         (_mm_andnot_si128): Likewise.
8437         (_mm_or_si128): Likewise.
8438         (_mm_xor_si128): Likewise.
8440 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
8442         PR middle-end/78809
8443         * builtins.c (expand_builtin_memcmp): Inline the calls first
8444         when result_eq is false.
8445         (expand_builtin_strcmp): Inline the calls first.
8446         (expand_builtin_strncmp): Likewise.
8447         (inline_string_cmp): New routine. Expand a string compare
8448         call by using a sequence of char comparison.
8449         (inline_expand_builtin_string_cmp): New routine. Inline expansion
8450         a call to str(n)cmp/memcmp.
8451         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
8452         New option.
8453         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
8455 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
8457         * config/arm/driver-arm.c: Include arm-native.h.
8458         (host_detect_local_cpu): Use auto-generated data tables.
8459         (vendors, arm_cpu_table): Delete.  Move part information to ...
8460         * config/arm/arm-cpus.in: ... here.
8461         * config/arm/parsecpu.awk (gen_native): New function.
8462         (vendor, part): New CPU fields.
8463         (END): Add support for building the native CPU detection tables.
8464         * config/arm/t-arm (arm-native.h): Add build rule.
8465         (driver-arm.o): Add dependency on arm-native.h.
8467 2018-07-13  Richard Biener  <rguenther@suse.de>
8469         PR middle-end/85974
8470         * match.pd (addr1 - addr2): Allow either of the operand to
8471         have a conversion.
8473 2018-07-13  Tom de Vries  <tdevries@suse.de>
8475         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
8476         in remap_ssa_name.
8478 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
8480         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
8481         arrays instead of numbered variables.
8483 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
8485         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
8486         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
8488 2018-07-13  Richard Biener  <rguenther@suse.de>
8490         PR debug/86452
8491         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
8492         instead of get_context_die.
8494 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
8495             Richard Biener  <rguenther@suse.de>
8497         PR middle-end/86489
8498         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
8499         that the loop latch destination where phi is defined.
8501 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
8503         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
8504         (riscv_expand_epilogue): Add assertion to check interrupt mode.
8505         (riscv_set_current_function): Extract getting interrupt type to new
8506         function.
8507         (riscv_get_interrupt_type): New function.
8508         (riscv_merge_decl_attributes): New function, checking interrupt type is
8509         same.
8510         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
8512 2018-07-12  Paul Koning  <ni1d@arrl.net>
8514         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
8515         directive.
8517 2018-07-12  Paul Koning  <ni1d@arrl.net>
8519         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
8520         zero reference, add doloop_end instead.
8521         * doc/md.texi (decrement_and_branch_until_zero): Remove.
8522         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
8523         detail for doloop_end.
8525 2018-07-12  Martin Sebor  <msebor@redhat.com>
8527         PR c/86453
8528         * attribs.c (decl_attributes): Reject conflicting attributes before
8529         calling attribute handlers.
8531 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
8533         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
8534          parameter.
8535         (gcc::dump_manager::get_dump_file_name): likewise.
8536         (dump_begin): Likewise.
8537         * dumpfile.h (dump_begin): Update prototype.
8538         (gcc::dump_manager::get_dump_file_name,
8539         gcc::dump_manager::get_dump_file_name): Update prototype.
8541 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8543         * internal-fn.h (vectorizable_internal_fn_p): New function.
8544         * tree-vect-slp.c (compatible_calls_p): Likewise.
8545         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
8546         to internal functions.
8547         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
8549 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8551         * fold-const.h (inverse_conditions_p): Declare.
8552         * fold-const.c (inverse_conditions_p): New function.
8553         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
8554         that test the inverse condition of a conditional internal function.
8555         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
8556         * internal-fn.c (internal_fn_mask_index): Handle conditional
8557         internal functions.
8558         (vectorized_internal_fn_supported_p): New function.
8559         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
8560         (any_pred_load_store): Replace with...
8561         (need_to_predicate): ...this new variable.
8562         (redundant_ssa_names): New variable.
8563         (ifcvt_can_use_mask_load_store): Move initial checks to...
8564         (ifcvt_can_predicate): ...this new function.  Handle tree codes
8565         for which a conditional internal function exists.
8566         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
8567         instead of ifcvt_can_use_mask_load_store.  Update after variable
8568         name change.
8569         (predicate_load_or_store): New function, split out from
8570         predicate_mem_writes.
8571         (check_redundant_cond_expr): New function.
8572         (value_available_p): Likewise.
8573         (predicate_rhs_code): Likewise.
8574         (predicate_mem_writes): Rename to...
8575         (predicate_statements): ...this.  Use predicate_load_or_store
8576         and predicate_rhs_code.
8577         (combine_blocks, tree_if_conversion): Update after above name changes.
8578         (ifcvt_local_dce): Handle redundant_ssa_names.
8579         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
8580         general conditional functions.
8581         * tree-vect-stmts.c (vectorizable_call): Likewise.
8583 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8584             Alan Hayward  <alan.hayward@arm.com>
8585             David Sherwood  <david.sherwood@arm.com>
8587         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
8588         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
8589         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
8590         plus and minus and convert them into IFN_COND_FMA-based sequences.
8591         (convert_mult_to_fma): Handle conditional plus and minus.
8593 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8595         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
8596         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
8597         (cond_fnms_optab): New optabs.
8598         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
8599         internal functions.
8600         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
8601         * internal-fn.h (get_conditional_internal_fn): Declare.
8602         (get_unconditional_internal_fn): Likewise.
8603         * internal-fn.c (cond_ternary_direct): New macro.
8604         (expand_cond_ternary_optab_fn): Likewise.
8605         (direct_cond_ternary_optab_supported_p): Likewise.
8606         (FOR_EACH_COND_FN_PAIR): Likewise.
8607         (get_conditional_internal_fn): New function.
8608         (get_unconditional_internal_fn): Likewise.
8609         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
8610         (gimple_match_op::gimple_match_op): Add a new overload for 5
8611         operands.
8612         (gimple_match_op::set_op): Likewise.
8613         (gimple_resimplify5): Declare.
8614         * genmatch.c (decision_tree::gen): Generate simplifications for
8615         5 operands.
8616         * gimple-match-head.c (gimple_simplify): Define an overload for
8617         5 operands.  Handle calls with 5 arguments in the top-level overload.
8618         (convert_conditional_op): Handle conversions from unconditional
8619         internal functions to conditional ones.
8620         (gimple_resimplify5): New function.
8621         (build_call_internal): Pass a fifth operand.
8622         (maybe_push_res_to_seq): Likewise.
8623         (try_conditional_simplification): Try converting conditional
8624         internal functions to unconditional internal functions.
8625         Handle 3-operand unconditional forms.
8626         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
8627         Define ternary equivalents of the current rules for binary conditional
8628         internal functions.
8629         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
8630         ternary operations.
8631         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
8632         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
8633         (optab): Handle them.
8634         (SVE_COND_FP_TERNARY): New int iterator.
8635         (sve_fmla_op, sve_fmad_op): New int attributes.
8636         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
8637         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
8638         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
8640 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8642         * target.def (preferred_else_value): New target hook.
8643         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
8644         * doc/tm.texi: Regenerate.
8645         * targhooks.h (default_preferred_else_value): Declare.
8646         * targhooks.c (default_preferred_else_value): New function.
8647         * internal-fn.h (conditional_internal_fn_code): Declare.
8648         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
8649         (get_conditional_internal_fn): Use it.
8650         (conditional_internal_fn_code): New function.
8651         * gimple-match.h (gimple_match_cond): New struct.
8652         (gimple_match_op): Add a cond member function.
8653         (gimple_match_op::gimple_match_op): Update all forms to take a
8654         gimple_match_cond.
8655         * genmatch.c (expr::gen_transform): Use the same condition as res_op
8656         for the suboperation, but don't specify a particular else_value.
8657         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
8658         (visit_nary_op, visit_reference_op_load): Pass
8659         gimple_match_cond::UNCOND to the gimple_match_op constructor.
8660         * gimple-match-head.c: Include tree-eh.h
8661         (convert_conditional_op): New function.
8662         (maybe_resimplify_conditional_op): Likewise.
8663         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
8664         (gimple_resimplify2): Likewise.
8665         (gimple_resimplify3): Likewise.
8666         (gimple_resimplify4): Likewise.
8667         (maybe_push_res_to_seq): Return null for conditional operations.
8668         (try_conditional_simplification): New function.
8669         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
8670         constructor.
8671         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
8672         IFN_COND_* call.
8673         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
8674         function.
8675         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
8677 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
8679         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8680         DECL_FCONTEXT
8681         (hash_tree): Do not hash DECL_FCONTEXT
8682         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
8683         Do not stream DECL_FCONTEXT.
8684         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
8685         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
8687 2018-07-12  Richard Biener  <rguenther@suse.de>
8689         PR debug/86462
8690         * dwarf2out.c (gen_block_die): Only output blocks when they have
8691         at least one !DECL_IGNORED_P variable.
8693 2018-07-12  Richard Biener  <rguenther@suse.de>
8695         PR target/84829
8696         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
8697         Remove -mieee-fp handling.
8699 2018-07-12  Richard Biener  <rguenther@suse.de>
8701         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
8702         left-over from last patch.
8704 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
8706         PR tree-optimization/86492
8707         * gimple-ssa-store-merging.c
8708         (imm_store_chain_info::coalesce_immediate_stores): Call
8709         check_no_overlap even for the merge_overlapping case.  Formatting fix.
8711 2018-07-12  Richard Biener  <rguenther@suse.de>
8713         PR middle-end/86479
8714         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
8715         move possibly trapping operations into the conditional.
8717 2018-07-12  Richard Biener  <rguenther@suse.de>
8719         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
8720         (vn_lookup_simplify_result): Remove recursion limit applied
8721         here.
8722         (vn_nary_build_or_lookup_1): Adjust.
8723         (try_to_simplify): Likewise.
8724         * gimple-match-head.c (gimple_resimplify1): Instead apply one
8725         here.
8726         (gimple_resimplify2): Likewise.
8727         (gimple_resimplify3): Likewise.
8728         (gimple_resimplify4): Likewise.
8730 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
8732         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
8733         Use __mmask64 type instead of __mmask8 for __M argument.
8734         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
8735         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
8736         __U argument.
8737         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
8738         __mmask16 for __M argument.
8739         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
8740         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
8741         to __mmask16 instead of __mmask8.
8742         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
8743         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
8744         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
8745         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
8746         instead of __mmask16 for __U argument.
8747         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
8748         __mmask16 instead of __mmask8 for __U argument.
8749         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
8750         __U argument.
8751         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
8752         __mmask16.
8753         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
8754         argument.
8755         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
8756         __U argument.
8757         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
8758         __mmask16.
8759         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
8760         of __mmask16.
8761         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
8762         __U argument.
8763         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
8764         __U argument.
8765         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
8766         __U argument.
8767         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
8768         __U argument.
8769         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
8770         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
8771         return type as well as __M argument type and all casts from __mmask8
8772         to __mmask32.
8773         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
8774         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
8775         return type as well as __M argument type and all casts from __mmask8
8776         to __mmask16.
8777         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
8778         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
8779         return type as well as __M argument type and all casts from __mmask8
8780         to __mmask32.
8781         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
8782         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
8783         return type as well as __M argument type and all casts from __mmask8
8784         to __mmask16.
8785         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
8786         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
8787         __mmask16.
8789 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
8791         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
8792         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
8793         for __U argument.
8795 2018-07-11  Paul Koning  <ni1d@arrl.net>
8797         * doc/md.texi (define_subst): Document how multiple occurrences of
8798         the same argument in the replacement pattern are handled.
8800 2018-07-11  Paul Koning  <ni1d@arrl.net>
8802         * doc/extend.texi (Common Variable Attributes): Move "mode" into
8803         alphabetical order.
8804         (Common Type Attributes): Add "mode" attribute.
8806 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
8808         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
8809         stream DECL_ORIGINAL_TYPE.
8810         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
8811         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
8812         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
8813         Do not walk original type.
8814         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
8815         external decls.
8816         (write_ts_decl_non_common_tree_pointers): Do not stream
8817         DECL_ORIGINAL_TYPE
8818         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
8819         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
8821 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
8823         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
8824         thread twice from the same starting edge.
8826 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
8828         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
8829         * gimple.c (gimple_call_nonnull_result_p): ...here...
8830         (gimple_call_nonnull_arg): ...and here.
8831         * gimple.h (gimple_call_nonnull_result_p): New.
8832         (gimple_call_nonnull_arg): New.
8834 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
8836         * config/arm/arm-cpus.in: Move information from fpu field of each
8837         cpu definition to the isa field.
8838         * config/arm/parsecpu.awk (fpu): Delete match rule.
8839         (gen_comm_data): Don't add bits from the CPU's FPU entry.
8841 2018-07-11  Richard Biener  <rguenther@suse.de>
8843         PR debug/86457
8844         * dwarf2out.c (init_sections_and_labels): Use
8845         output_asm_line_debug_info consistently.
8846         (dwarf2out_early_finish): Likewise.
8847         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
8848         type units.
8850 2018-07-11  Richard Biener  <rguenther@suse.de>
8852         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
8853         Rework father_bb setting in a way to avoid propagating constants
8854         multiple times on a loop body.
8856 2018-07-10  Mark Wielaard  <mark@klomp.org>
8858         PR debug/86459
8859         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
8861 2018-07-10  Richard Biener  <rguenther@suse.de>
8863         * hash-map.h (hash_map::iterator::operator*): Return
8864         references to key and value.
8866 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
8868         PR c++/86443
8869         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
8870         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
8871         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
8872         (gimplify_omp_for): For composite loops, move outer
8873         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
8874         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
8875         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
8876         TREE_LIST for both the original class iterator and the "last" helper
8877         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
8878         loop, remember has_decl_expr from outer composite loops for the
8879         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
8881 2018-07-09  Martin Sebor  <msebor@redhat.com>
8883         PR middle-end/77357
8884         PR middle-end/86428
8885         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
8886         accessing implicitly initialized array elements.
8887         * expr.c (string_constant): Handle string initializers of
8888         character arrays within aggregates.
8889         * gimple-fold.c (fold_array_ctor_reference): Add argument.
8890         Store element offset.  As a special case, handle zero size.
8891         (fold_nonarray_ctor_reference): Same.
8892         (fold_ctor_reference): Add argument.  Store subobject offset.
8893         * gimple-fold.h (fold_ctor_reference): Add argument.
8895 2018-07-09  Paul Koning  <ni1d@arrl.net>
8897         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
8898         (pdp11_insn_cost): New function.
8899         (pdp11_md_asm_adjust): New function.
8900         (TARGET_INVALID_WITHIN_DOLOOP): Define.
8901         (pdp11_rtx_costs): Update to match machine better.
8902         (output_addr_const_pdp11): Correct format mismatch warnings.
8903         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
8904         * config/pdp11/pdp11.md: General change to add base_cost and/or
8905         length attributes for use by new pdp11_insn_cost function.
8906         (MIN_BRANCH): Correct definition.
8907         (MIN_SOB): Ditto.
8908         (doloop_end): Use standard pattern name for looping pattern.
8909         (doloop_end_nocc): New.
8910         (movsf): Add another constraint alternative.
8911         (zero_extendqihi2): Add constraint alternatives for not in place
8912         extend.
8913         (zero_extendhisi2): Remove.
8914         (shift patterns): Add CC handling variants.
8915         (bswaphi2): New.
8916         (bswapsi2): New.
8917         (rothi3): New.
8918         (define_peephole2): New peephole to recognize mov that sets CC for
8919         subsequent test.
8921 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8923         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
8924         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
8925         wi::add.
8927 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
8929         PR c/86420
8930         * real.c (real_nextafter): Return true if result is denormal.
8932 2018-07-09  Martin Liska  <mliska@suse.cz>
8934         * common.opt: Add back wrongly removed attribute.
8936 2018-07-09  Richard Biener  <rguenther@suse.de>
8938         PR debug/86413
8939         * dwarf2out.c (gen_block_die): For an early generated DIE
8940         always output high/low PC attributes.
8942 2018-07-09  Tom de Vries  <tdevries@suse.de>
8944         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
8945         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
8946         onto VAR_DECL with abstract origin.
8948 2018-07-07  Jim Wilson  <jimw@sifive.com>
8950         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
8952 2018-07-07  Tom de Vries  <tdevries@suse.de>
8954         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
8956 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
8958         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
8959         overflow_type.
8960         (combine_bound): Use wide-int overflow calculation instead of
8961         rolling our own.
8962         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
8963         overflow_type.
8964         * fold-const.c (int_const_binop_2): Same.
8965         (extract_muldiv_1): Same.
8966         (fold_div_compare): Same.
8967         (fold_abs_const): Same.
8968         * match.pd: Same.
8969         * poly-int.h (add): Same.
8970         (sub): Same.
8971         (neg): Same.
8972         (mul): Same.
8973         * predict.c (predict_iv_comparison): Same.
8974         * profile-count.c (slow_safe_scale_64bit): Same.
8975         * simplify-rtx.c (simplify_const_binary_operation): Same.
8976         * tree-chrec.c (tree_fold_binomial): Same.
8977         * tree-data-ref.c (split_constant_offset_1): Same.
8978         * tree-if-conv.c (idx_within_array_bound): Same.
8979         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
8980         * tree-ssa-phiopt.c (minmax_replacement): Same.
8981         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
8982         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
8983         * vr-values.c (vr_values::adjust_range_with_scev): Same.
8984         * wide-int.cc (wi::add_large): Same.
8985         (wi::mul_internal): Same.
8986         (wi::sub_large): Same.
8987         (wi::divmod_internal): Same.
8988         * wide-int.h: Change overflow type to overflow_type for neg, add,
8989         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
8990         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
8991         mul_internal, divmod_internal.
8992         (overflow_type): New enum.
8993         (accumulate_overflow): New.
8995 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
8997         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
8998         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
9000 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
9002         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
9003         argument is checked for zero before entering loop, avoid checking again.
9005 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
9007         * gimplify.h (generic_expr_could_trap_p): Set as global function.
9008         * gimplify.h (generic_expr_could_trap_p): Likwise.
9009         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
9011 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
9013         PR tree-optimization/86401
9014         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
9015         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
9016         (fold_bit_and_mask): ... here.  New helper function for match.pd.
9017         * fold-const.h (fold_bit_and_mask): Declare.
9018         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
9020 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
9022         PR target/86324
9023         * target.def (translate_mode_attribute): New hook.
9024         * targhooks.h (default_translate_mode_attribute): Declare.
9025         * targhooks.c (default_translate_mode_attribute): New function.
9026         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
9027         * doc/tm.texi: Regenerate.
9028         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
9029         (rs6000_translate_mode_attribute): New function.
9031 2018-07-06  Paul Koning  <ni1d@arrl.net>
9033         * doc/md.texi (define_split): Document DONE and FAIL.
9034         (define_peephole2): Ditto.
9036 2018-07-05  Jeff Law  <law@redhat.com>
9038         PR tree-optimization/86010
9039         * tree-ssa-dse.c (compute_trims): More aggressively trim at
9040         both the head and tail of mem* and str* calls.
9042 2018-07-05  Jim Wilson  <jimw@sifive.com>
9044         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
9046 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
9048         * config/aarch64/aarch64-simd.md: correct flags text for
9049         MIN_EXPR replacement.
9051 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
9053         * configure: Regenerated.
9055 2018-07-05  Carl Love  <cel@us.ibm.com>
9057         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
9058         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
9059         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
9060         VSX_BUILTIN_DOUBLEL_V4SF.
9062 2018-07-05  Martin Sebor  <msebor@redhat.com>
9064         PR c++/86400
9065         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
9066         than its domain to compute its the upper bound of a char array.
9068 2018-07-05  Nathan Sidwell  <nathan@acm.org>
9070         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
9071         * doc/cpp.texi: Update comment.
9072         * doc/tm.texi: Rebuilt.
9073         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
9074         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
9075         * doc/extend.texi (Backwards Compatibility): Clarify it is system
9076         headers affected by extern "C".
9077         * system.h: Poison NO_IMPLICIT_EXTERN_C.
9078         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
9079         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
9080         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
9081         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
9082         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
9083         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
9084         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
9085         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
9086         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
9087         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
9088         config/sparc/sp64-elf.h, config/spu/spu.h,
9089         config/stormy16/stormy16.h, config/v850/v850.h,
9090         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
9091         define NO_IMPLICIT_EXTERN_C.
9092         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
9094 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
9096         PR target/84711
9097         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
9098         instead of GET_MODE_SIZE when comparing Units.
9100 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
9102         PR target/84711
9103         * rtlanal.c (set_noop_p): Constrain on mode change,
9104         include hard-reg-set.h
9106 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
9108         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
9110 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
9112         Revert
9113         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
9115         PR sanitizer/84250
9116         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9117         libasan.
9118         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9120 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
9122         PR sanitizer/84250
9123         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9124         libasan.
9125         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9127 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
9129         PR middle-end/86380
9130         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
9132 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
9134         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
9135         neg_*_op* variables.
9137 2018-07-04  Martin Liska  <mliska@suse.cz>
9139         * tree-switch-conversion.c: Define
9140         max_ratio_for_speed and max_ratio_for_size constants.
9142 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
9143             Martin Liska  <mliska@suse.cz>
9145         PR middle-end/66240
9146         PR target/45996
9147         PR c/84100
9148         * common.opt: Rename align options with 'str_' prefix.
9149         * common/config/i386/i386-common.c (set_malign_value): New
9150         function.
9151         (ix86_handle_option): Use it to set -falign-* options/
9152         * config/aarch64/aarch64-protos.h (struct tune_params): Change
9153         type from int to string.
9154         * config/aarch64/aarch64.c: Update default values from int
9155         to string.
9156         * config/alpha/alpha.c (alpha_override_options_after_change):
9157         Likewise.
9158         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
9159         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9160         max skip conditionally.
9161         * config/i386/freebsd.h (SUBALIGN_LOG): New.
9162         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9163         max skip conditionally.
9164         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9165         max skip conditionally.
9166         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
9167         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9168         max skip conditionally.
9169         * config/i386/i386.c (struct ptt): Change type from int to
9170         string.
9171         (ix86_default_align): Set default values.
9172         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
9173         max skip conditionally.
9174         * config/i386/iamcu.h (SUBALIGN_LOG): New.
9175         (ASM_OUTPUT_MAX_SKIP_ALIGN):
9176         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
9177         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9178         max skip conditionally.
9179         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
9180         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
9181         * config/i386/x86-64.h (SUBALIGN_LOG): New.
9182         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9183         max skip conditionally.
9184         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9185         * config/ia64/ia64.c (ia64_option_override): Set default values
9186         for alignment options.
9187         * config/m68k/m68k.c: Handle new str_align_* options.
9188         * config/mips/mips.c (mips_set_compression_mode): Change
9189         type of constants.
9190         (mips_option_override): Set default values for options.
9191         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
9192         Likewise.
9193         * config/rs6000/rs6000.c (rs6000_option_override_internal):
9194         Likewise.
9195         * config/rx/rx.c (rx_option_override): Likewise.
9196         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
9197         (LABEL_ALIGN): Use align_labels_log.
9198         (LOOP_ALIGN): Use align_loops_align.
9199         * config/s390/s390.c (s390_asm_output_function_label): Use new
9200         macros.
9201         * config/sh/sh.c (sh_override_options_after_change):
9202         Change type of constants.
9203         * config/spu/spu.c (spu_sched_init): Likewise.
9204         * config/sparc/sparc.c (sparc_option_override): Set default
9205         values for options.
9206         * config/visium/visium.c (visium_option_override): Likewise.
9207         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
9208         emit p2align format with last argument if it's not needed.
9209         * doc/invoke.texi: Document extended format of -falign-*.
9210         * final.c: Use align_labels alignment.
9211         * flags.h (struct target_flag_state): Change type to use
9212         align_flags.
9213         (struct align_flags_tuple): New.
9214         (struct align_flags): Likewise.
9215         (align_loops_log): Redefine macro to use new types.
9216         (align_loops_max_skip): Redefine macro to use new types.
9217         (align_jumps_log): Redefine macro to use new types.
9218         (align_jumps_max_skip): Redefine macro to use new types.
9219         (align_labels_log): Redefine macro to use new types.
9220         (align_labels_max_skip): Redefine macro to use new types.
9221         (align_functions_log): Redefine macro to use new types.
9222         (align_loops): Redefine macro to use new types.
9223         (align_jumps): Redefine macro to use new types.
9224         (align_labels): Redefine macro to use new types.
9225         (align_functions): Redefine macro to use new types.
9226         (align_functions_max_skip): Redefine macro to use new types.
9227         (align_loops_value): New macro.
9228         (align_jumps_value): New macro.
9229         (align_labels_value): New macro.
9230         (align_functions_value): New macro.
9231         * function.c (invoke_set_current_function_hook): Propagate
9232         alignment values from flags to global variables default in
9233         topleev.h.
9234         * ipa-icf.c (sem_function::equals_wpa): Use
9235         cl_optimization_option_eq instead of memcmp.
9236         * lto-streamer.h (cl_optimization_stream_out): Support streaming
9237         of string types.
9238         (cl_optimization_stream_in): Likewise.
9239         * optc-save-gen.awk: Support strings in cl_optimization.
9240         * opth-gen.awk: Likewise.
9241         * opts.c (finish_options): Remove error checking of invalid
9242         value ranges.
9243         (MAX_CODE_ALIGN): Remove.
9244         (MAX_CODE_ALIGN_VALUE): Likewise.
9245         (parse_and_check_align_values): New function.
9246         (check_alignment_argument): Likewise.
9247         (common_handle_option): Use check_alignment_argument.
9248         * opts.h (parse_and_check_align_values): Declare.
9249         * toplev.c (init_alignments): Remove.
9250         (read_log_maxskip): New.
9251         (parse_N_M): Likewise.
9252         (parse_alignment_opts): Likewise.
9253         (backend_init_target): Remove usage of init_alignments.
9254         * toplev.h (parse_alignment_opts): Declare.
9255         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
9256         argument.
9257         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
9258         * tree.c (cl_option_hasher::equal): New.
9259         * varasm.c: Use new global macros.
9261 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
9263         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
9264         Use a simpler align directive also if MAXSKIP = ALIGN-1.
9265         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9266         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9267         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9268         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9269         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
9270         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
9271         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
9272         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9273         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9274         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9275         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9277 2018-07-04  Martin Liska  <mliska@suse.cz>
9278             Jonathan Wakely  <jwakely@redhat.com>
9280         * coverage.c: Use correct type.
9281         * doc/invoke.texi: Language correction.
9283 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
9285         PR target/85620
9286         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
9287         ENDBRANCH for non-tail call which may return via indirect branch.
9288         * doc/extend.texi: Document indirect_return attribute.
9290 2018-07-03  Martin Sebor  <msebor@redhat.com>
9292         PR tree-optimization/86274
9293         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
9294         precondition.
9295         (format_floating): Correct handling of infinities and NaNs.
9297 2018-07-03  Martin Sebor  <msebor@redhat.com>
9299         * print-tree.c (print_real_cst): New function.
9300         (print_node_brief): Call it.
9301         (print_node): Ditto.
9303 2018-07-03  Jeff Law  <law@redhat.com>
9305         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
9306         into a single pattern.
9308         * config/h8300/h8300.md (ors code_iterator): New.
9309         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
9310         a single pattern and single splitter.
9311         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
9312         (iorqi3_1, xorqi3_1): Likewise.
9313         (iorqi3, xorqi3 expanders): Similarly.
9315         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
9316         (movmd_internal) into a single pattern using the P mode iterator.
9317         (movmd splitters): Similarly.
9318         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
9319         (movsd splitters): Similarly.
9321         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
9322         ADDB, ADDW and ADDL into a single ADD attribute which selects the
9323         right table based on the size of the operand.
9324         * config/h8300/h8300.md (length_table): Corresponding changes. All
9325         references to "addb", "addw" and "addl" changed to "add".
9326         (btst patterns): Merge two variants into a single pattern.
9327         (tstqi, tsthi): Likewise.
9328         (addhi3_incdec, addsi3_incdec): Likewise.
9329         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
9330         (mulhi3, mulsi3): Likewise.
9331         (udivhi3, udivsi3): Likewise.
9332         (divhi3, divsi3): Likewise.
9333         (andorqi3, andorhi3, andorsi3): Likewise.
9335 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
9337         PR target/85694
9338         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
9339         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
9341 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9343         PR tree-optimization/85694
9344         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
9345         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
9346         UNSPEC_URHADD.
9347         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
9348         (<u>avg<mode>3_ceil): New patterns.
9350 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
9352         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
9353         scan-tree-dump directive.
9354         * gcc.dg/vect/slp-perm-2.c: Likewise.
9355         * gcc.dg/vect/slp-perm-3.c: Likewise.
9356         * gcc.dg/vect/slp-perm-5.c: Likewise.
9357         * gcc.dg/vect/slp-perm-6.c: Likewise.
9358         * gcc.dg/vect/slp-perm-7.c: Likewise.
9359         * gcc.dg/vect/slp-perm-8.c: Likewise.
9361 2018-07-03  Marek Polacek  <polacek@redhat.com>
9363         PR middle-end/86202
9364         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
9366 2018-07-03  Richard Biener  <rguenther@suse.de>
9368         PR ipa/86389
9369         * tree-ssa-structalias.c (find_func_clobbers): Properly
9370         handle indirect calls.
9372 2018-07-03  Jeff Law  <law@redhat.com>
9374         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
9375         (shifts): New code iterator.
9376         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
9377         expander.  Fix HImode handling on H8/SX.
9378         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
9379         (subqi3, subhi3, subsi3 expanders): Likewise.
9380         (andqi3, andhi3, andsi3 expanders): Likewise.
9381         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
9382         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
9383         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
9384         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
9385         (zero_extendqihi2, zero_extendqisi2): Likewise.
9386         (extendqihi2, extendqisi2): Likewise.
9387         (rotlqi3, rotlhi3, rotlsi3): Likewise.
9388         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
9389         (rotlqi3_1, rotlhi3_1): Likewise.
9390         (logicalhi3_sn, logicalsi3_sn): Likewise.
9391         (logicalhi3, logicalsi3): Likewise.
9393 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9395         * tree-vect-patterns.c (vect_recog_rotate_pattern)
9396         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9397         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
9398         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
9399         type to append_pattern_def_seq instead of creating a stmt_vec_info
9400         directly.
9401         (build_mask_conversion): Likewise.  Remove vinfo argument.
9402         (vect_add_conversion_to_patterm): Likewise, renaming to...
9403         (vect_add_conversion_to_pattern): ...this.
9404         (vect_recog_mask_conversion_pattern): Update call to
9405         build_mask_conversion.  Pass the vector type to
9406         append_pattern_def_seq here too.
9407         (vect_recog_gather_scatter_pattern): Update call to
9408         vect_add_conversion_to_pattern.
9410 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9412         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
9413         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9414         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
9415         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
9416         STMT_VINFO_PATTERN_DEF_SEQ to null here.
9417         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
9418         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
9419         append_pattern_def_seq instead of new_pattern_def_seq.
9420         (vect_recog_divmod_pattern): Do both of the above.
9421         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
9422         is null.
9424 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9426         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
9427         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
9428         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
9429         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
9430         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
9431         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9432         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
9433         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9434         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9435         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
9436         parameter with a single stmt_vec_info.
9437         (vect_recog_func_ptr): Likewise.
9438         (vect_recog_gather_scatter_pattern): Likewise, folding in...
9439         (vect_try_gather_scatter_pattern): ...this.
9440         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
9441         the stmt_vec_info of the statement to be matched.  Don't clear
9442         STMT_VINFO_RELATED_STMT.
9443         (vect_pattern_recog): Update call accordingly.
9445 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9447         PR tree-optimization/85694
9448         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
9449         (uavgM3_ceil): Document new optabs.
9450         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
9451         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
9452         functions.
9453         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
9454         (savg_ceil_optab): New optabs.
9455         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
9456         (vect_vect_recog_func_ptrs): Add it.
9457         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
9458         constant directly from the associated lhs.
9460 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9462         * tree-vect-patterns.c (vect_split_statement): New function.
9463         (vect_convert_input): Use it to try to split an existing cast.
9465 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9467         * poly-int.h (print_hex): New function.
9468         * dumpfile.h (dump_dec, dump_hex): Declare.
9469         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
9470         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
9471         min_input_precision, operation_precision and operation_sign.
9472         * tree-vect-patterns.c (vect_get_range_info): New function.
9473         (vect_same_loop_or_bb_p, vect_single_imm_use)
9474         (vect_operation_fits_smaller_type): Delete.
9475         (vect_look_through_possible_promotion): Add an optional
9476         single_use_p parameter.
9477         (vect_recog_over_widening_pattern): Rewrite to use new
9478         stmt_vec_info infomration.  Handle one operation at a time.
9479         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
9480         (vect_truncatable_operation_p, vect_set_operation_type)
9481         (vect_set_min_input_precision): New functions.
9482         (vect_determine_min_output_precision_1): Likewise.
9483         (vect_determine_min_output_precision): Likewise.
9484         (vect_determine_precisions_from_range): Likewise.
9485         (vect_determine_precisions_from_users): Likewise.
9486         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
9487         (vect_vect_recog_func_ptrs): Put over_widening first.
9488         Add cast_forwprop.
9489         (vect_pattern_recog): Call vect_determine_precisions.
9491 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9493         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
9494         statements that have been replaced by further pattern statements.
9495         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
9497 2018-07-03  Richard Biener  <rguenther@suse.de>
9499         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
9500         always set *dt.  Dump vectype in vectype overload.
9501         * dumpfile.h (dump_gimple_expr): New function.
9502         (dump_gimple_expr_loc): Likewise.
9503         * dumpfile.c (dump_gimple_expr): New function.
9504         (dump_gimple_expr_loc): Likewise.
9506 2018-07-02  Jeff Law  <law@redhat.com>
9508         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
9509         the H8/300, H8/300H and H8/S variants into a single pattern.
9510         (movhi_h8300, movqi_h8300hs): Similarly.
9511         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
9512         (QHI mode iterator): New.
9514         * config/h8300/h8300.md: Remove trailing whitespace.
9516 2018-07-02  Jim Wilson  <jimw@sifive.com>
9518         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
9519         instead of emit_insn for interrupt returns.
9520         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
9521         (riscv_sret, riscv_uret): Likewise.
9523 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
9525         * pretty-print.c (selftest::test_pp_format): Move save and restore
9526         of quotes to class auto_fix_quotes, and add an instance.
9527         * selftest.c: Include "intl.h".
9528         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
9529         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
9530         * selftest.h (selftest::auto_fix_quotes): New class.
9532 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
9534         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
9535         (aarch64_sve_prepare_conditional_op): Remove.
9536         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
9537         Allow aarch64_simd_reg_or_zero as select operand; remove
9538         the aarch64_sve_prepare_conditional_op call.
9539         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
9540         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9541         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
9542         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
9543         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
9544         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
9545         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
9546         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
9547         and a splitters to match all of the *_any patterns.
9548         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
9550         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
9551         (SVE_COND_FP_BINARY_REV): Remove.
9552         (sve_int_op_rev, sve_fp_op_rev): New.
9553         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
9554         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
9555         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
9556         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
9557         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
9558         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
9559         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
9560         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
9561         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
9563         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
9564         Remove match_dup 1 from the inner unspec.
9565         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9567         * config/aarch64/aarch64.md (movprfx): New attr.
9568         (length): Default movprfx to 8.
9569         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
9570         (*madd<SVE_I>, *msub<SVE_I): Likewise.
9571         (*<su>mul<SVE_I>3_highpart): Likewise.
9572         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
9573         (*v<ASHIFT><SVE_I>3): Likewise.
9574         (*<su><MAXMIN><SVE_I>3): Likewise.
9575         (*<su><MAXMIN><SVE_F>3): Likewise.
9576         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
9577         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
9578         (*div<SVE_F>4): Likewise.
9580 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
9582         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
9583         in dump string.
9585 2018-07-02  Richard Biener  <rguenther@suse.de>
9587         PR tree-optimization/86363
9588         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
9589         memset argument refers to a non-variable address.
9591 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
9593         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
9594         {PLUS,MINUS}_EXPR code to...
9595         (adjust_symbolic_bound): ...here,
9596         (combine_bound): ...here,
9597         (set_value_range_with_overflow): ...and here.
9599 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
9601         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
9602         code...
9603         (extract_range_from_abs_expr): ...here.
9605 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
9607         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
9608         -fno-omit-frame-pointer when not optimizing.
9610 2018-07-02  Martin Liska  <mliska@suse.cz>
9612         PR ipa/86279
9613         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
9614         (propagate_nothrow): Likewise.
9616 2018-07-02  Martin Liska  <mliska@suse.cz>
9618         PR ipa/86323
9619         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
9621 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
9623         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
9624         function in r262149, changing "loc" param from source_location to
9625         const dump_location_t &.
9626         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
9627         declaration, as above.
9629 2018-07-01  Paul Koning  <ni1d@arrl.net>
9631         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9632         -munit-asm, -mgnu-asm, -mdec-asm.
9633         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
9634         (pdp11_output_labelref): New.
9635         (pdp11_output_def): New.
9636         (pdp11_output_addr_vec_elt): New.
9637         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
9638         %# and %@ format codes.
9639         (pdp11_option_override): New.
9640         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
9641         (pdp11_output_ident): New.
9642         (pdp11_asm_named_section): New.
9643         (pdp11_asm_init_sections): New.
9644         (pdp11_file_start): New.
9645         (pdp11_file_end): New.
9646         (output_ascii): Use .ascii/.asciz for -mdec-asm.
9647         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
9648         %o, like %c but octal.
9649         (pdp11_option_override): New.
9650         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
9651         -mdec-asm.
9652         (DATA_SECTION_ASM_OP): Ditto.
9653         (READONLY_DATA_SECTION_ASM_OP): New.
9654         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
9655         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
9656         (ASM_OUTPUT_LABELREF): Ditto.
9657         (ASM_OUTPUT_DEF): Ditto.
9658         (ASM_OUTPUT_EXTERNAL): New.
9659         (ASM_OUTPUT_SOURCE_FILENAME): New.
9660         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
9661         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
9662         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
9663         %# and %@ format codes.
9664         * config/pdp11/pdp11.opt (mgnu-asm): New.
9665         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
9666         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
9667         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
9669 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
9671         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
9672         dereferencing path[] beyond its length.
9673         (debug_path): New.
9674         (debug_all_paths): New.
9675         (rewire_first_differing_edge): New.
9676         (adjust_paths_after_duplication): New.
9677         (duplicate_thread_path): Call adjust_paths_after_duplication.
9678         Add new argument.
9679         (thread_through_all_blocks): Add new argument to
9680         duplicate_thread_path.
9682 2018-06-30  Jim Wilson  <jimw@sifive.com>
9684         * config/riscv/predicates.md (p2m1_shift_operand): New.
9685         (high_mask_shift_operand): New.
9686         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
9687         pattern using p2m1_shift_operand.
9688         (lshsi3_zero_extend_3+2): New combiner pattern using
9689         high_mask_shift_operand.
9691 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9693         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
9694         split out from...
9695         (vect_recog_rotate_pattern): ...here.
9696         (vect_convert_input): Try to insert casts of invariants in the
9697         preheader.
9698         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
9699         preheader to be empty.
9701 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9703         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
9704         vector type.  If given, install it in the new statement's
9705         STMT_VINFO_VECTYPE.
9706         (vect_element_precision): New function.
9707         (vect_unpromoted_value): New struct.
9708         (vect_unpromoted_value::vect_unpromoted_value): New function.
9709         (vect_unpromoted_value::set_op): Likewise.
9710         (vect_look_through_possible_promotion): Likewise.
9711         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
9712         (vect_widened_op_tree, vect_convert_input): Likewise.
9713         (vect_convert_inputs, vect_convert_output): Likewise.
9714         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
9715         to handle the optional cast of the multiplication result and
9716         vect_widened_op_tree to detect the widened multiplication itself.
9717         Do not require the input and output of promotion casts to have
9718         the same sign, but base the signedness of the operation on the
9719         input rather than the result.  If the pattern includes two
9720         promotions, check that those promotions have the same sign.
9721         Do not restrict the MULT_EXPR handling to a double-width result;
9722         handle quadruple-width results and wider.  Use vect_convert_inputs
9723         to convert the inputs to the common type.
9724         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
9725         to handle the optional cast of the ABS result.  Also allow a sign
9726         change or a sign extension between the ABS and MINUS.
9727         Use vect_widened_op_tree to detect the widened subtraction and use
9728         vect_convert_inputs to convert the inputs to the common type.
9729         (vect_handle_widen_op_by_const): Delete.
9730         (vect_recog_widen_op_pattern): New function.
9731         (vect_recog_widen_mult_pattern): Use it.
9732         (vect_recog_widen_shift_pattern): Likewise.
9733         (vect_recog_widen_sum_pattern): Use
9734         vect_look_through_possible_promotion to handle the promoted
9735         PLUS_EXPR operand.
9737 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9739         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
9740         the containing gimple_seq *.
9741         * gimple-iterator.h (gsi_for_stmt): Declare it.
9742         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
9743         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
9744         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9745         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9746         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
9747         checks.
9748         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
9749         split out from...
9750         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
9751         statement being replaced is part of an existing pattern
9752         definition sequence, inserting the new pattern statements before
9753         the original one.
9754         (vect_pattern_recog_1): Don't return a bool.  If the statement
9755         is already part of a pattern, instead apply pattern matching
9756         to the pattern definition statements.  Don't clear the
9757         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
9758         (vect_pattern_recog): Don't break after the first match;
9759         continue processing the pattern definition statements instead.
9760         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
9762 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9764         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9765         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9766         (vect_recog_widen_sum_pattern): Use it.
9768 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9770         * tree-vect-loop.c (vectorizable_reduction): Assert that the
9771         phi is not a pattern statement and has not been replaced by
9772         a pattern statement.
9773         * tree-vect-patterns.c (type_conversion_p): Don't check
9774         STMT_VINFO_IN_PATTERN_P.
9775         (vect_recog_vector_vector_shift_pattern): Likewise.
9776         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
9777         the pattern statement rather than the original statement; check
9778         directly for a WIDEN_MULT_EXPR here.
9779         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
9780         vect_is_simple_use to return the pattern statement rather
9781         than the original statement; use is_pattern_stmt_p to check
9782         for such a pattern statement.
9783         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
9784         to return the pattern statement rather than the original statement;
9785         don't do the same transformation here.
9786         (vect_is_simple_use): If the defining statement has been replaced
9787         by a pattern statement, return the pattern statement instead.
9788         Remove the corresponding (local) transformation from the vectype
9789         overload.
9791 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9793         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
9794         end and default to null.
9795         * tree-vect-loop.c (vect_create_epilog_for_reduction)
9796         (vectorizable_reduction): Update calls accordingly, dropping the
9797         gimple ** argument if the passed-back statement isn't needed.
9798         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
9799         (vect_recog_rotate_pattern): Likewise.
9800         (vect_recog_mask_conversion_pattern): Likewise.
9801         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9802         (vect_mask_constant_operand_p): Likewise.
9803         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
9804         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
9805         (get_group_load_store_type, get_load_store_type): Likewise.
9806         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
9807         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
9808         (vectorizable_conversion, vectorizable_assignment): Likewise.
9809         (vectorizable_shift, vectorizable_operation): Likewise.
9810         (vectorizable_store, vect_is_simple_cond): Likewise.
9811         (vectorizable_condition, vectorizable_comparison): Likewise.
9812         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
9813         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
9814         and move it to the end.  Cope with null def_stmt_outs.
9816 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9818         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
9820 2018-06-29  Jeff Law  <law@redhat.com>
9822         * config/v850/v850.c (v850_legitimate_address_p): Handle large
9823         displacements for TARGET_V850E2V3 and newer.
9824         (TARGET_LRA_P): Remove.  Defaults to LRA now.
9825         * config/v850/v850.md (sign23byte_load): Remove.
9826         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
9827         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
9829 2018-06-29  Martin Liska  <mliska@suse.cz>
9831         PR lto/85759
9832         * coverage.c (coverage_init): Mangle full path name.
9833         * doc/invoke.texi: Document the change.
9834         * gcov-io.c (mangle_path): New.
9835         * gcov-io.h (mangle_path): Likewise.
9836         * gcov.c (mangle_name): Use mangle_path for path mangling.
9838 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9840         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
9841         if starting source register is not even.
9843 2018-06-29  Martin Liska  <mliska@suse.cz>
9845         PR tree-optimization/86263
9846         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
9847         Make edge redirection.
9849 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
9851         * dumpfile.c (dump_loc): Add indentation based on scope depth.
9852         (dump_scope_depth): New variable.
9853         (get_dump_scope_depth): New function.
9854         (dump_begin_scope): New function.
9855         (dump_end_scope): New function.
9856         * dumpfile.h (get_dump_scope_depth): New declaration.
9857         (dump_begin_scope): New declaration.
9858         (dump_end_scope): New declaration.
9859         (class auto_dump_scope): New class.
9860         (AUTO_DUMP_SCOPE): New macro.
9861         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
9862         AUTO_DUMP_SCOPE.
9864 2018-06-29  Richard Biener  <rguenther@suse.de>
9866         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
9867         compute_all_dependences succeeds.
9868         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
9869         exceed --param loop-max-datarefs-for-datadeps.
9871 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
9873         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
9875 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
9877         PR target/86348
9878         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
9879         alternative 0 in preferred_for_speed attribute.
9881 2018-06-28  Paul Koning  <ni1d@arrl.net>
9883         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
9884         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
9885         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
9886         * config/pdp11/pdp11.md: Correct "length" attribute calculation
9887         for shift insn patterns.
9889 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
9891         * cgraph.c (cgraph_node::get_body): Replace assignments to
9892         "dump_file" with calls to set_dump_file.
9893         * dumpfile.c (alt_dump_file): Make static, and group with...
9894         (alt_flags): ...this definition.
9895         (dumps_are_enabled): New variable.
9896         (refresh_dumps_are_enabled): New function.
9897         (set_dump_file): New function.
9898         (set_alt_dump_file): New function.
9899         (gcc::dump_manager::dump_start): Replace assignments to
9900         "dump_file" and "alt_dump_file" with calls to set_dump_file and
9901         set_alt_dump_file.
9902         (gcc::dump_manager::dump_finish): Likewise.
9903         * dumpfile.h (alt_dump_file): Delete decl.
9904         (dumps_are_enabled): New variable decl.
9905         (set_dump_file): New function decl.
9906         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
9907         global.
9908         * tree-nested.c (lower_nested_functions): Replace assignments to
9909         "dump_file" with calls to set_dump_file.
9911 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
9913         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
9914         goto_locus of each outgoing edge of each basic block.
9916 2018-06-28  Richard Biener  <rguenther@suse.de>
9918         * dwarf2out.c (decl_scope_table): Remove.
9919         (push_decl_scope): Likewise.
9920         (pop_decl_scope): Likewise.
9921         (gen_type_die_for_member): Do not call push/pop_decl_scope.
9922         (gen_struct_or_union_type_die): Likewise.
9923         (gen_tagged_type_die): Likewise.
9924         (dwarf2out_init): Do not initialize decl_scope_table.
9925         (dwarf2out_c_finalize): Do not free it.
9927 2018-06-28  Richard Biener  <rguenther@suse.de>
9929         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
9930         deciding whether to not re-use a DIE.
9932 2018-06-28  Richard Biener  <rguenther@suse.de>
9934         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
9935         DW_AT_abstract_origin attribute.
9937 2018-06-28  Martin Liska  <mliska@suse.cz>
9939         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
9940         Use newly introduced constants.
9941         * tree-switch-conversion.h (struct jump_table_cluster):
9942         Define max_ratio_for_size and max_ratio_for_speed.
9944 2018-06-28  Martin Liska  <mliska@suse.cz>
9946         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9947         Add new checking assert to catch invalid state.
9948         (jump_table_cluster::can_be_handled): Handle single case
9949         clusters.
9950         (jump_table_cluster::is_beneficial): Bail out for such case.
9951         (bit_test_cluster::find_bit_tests):
9952         Add new checking assert to catch invalid state.
9953         (bit_test_cluster::can_be_handled): Handle single case
9954         clusters.
9955         (bit_test_cluster::is_beneficial): Bail out for such case.
9956         (switch_decision_tree::analyze_switch_statement):
9957         Fix comment.
9959 2018-06-28  Martin Liska  <mliska@suse.cz>
9961         * common.opt: Introduce -completion option.
9962         * gcc.c (driver_handle_option): Handle it.
9963         (driver::main): Print completions if completion
9964         is set.
9965         * opt-suggestions.c (option_proposer::get_completions):
9966         New function.
9967         (option_proposer::suggest_completion): Likewise.
9968         (option_proposer::find_param_completions): Likewise.
9969         (verify_autocompletions): Likewise.
9970         (test_completion_valid_options): Likewise.
9971         (test_completion_valid_params): Likewise.
9972         (in_completion_p): Likewise.
9973         (empty_completion_p): Likewise.
9974         (test_completion_partial_match): Likewise.
9975         (test_completion_garbage): Likewise.
9976         (opt_proposer_c_tests): Likewise.
9977         * opt-suggestions.h: Declare new functions.
9978         * opts.c (common_handle_option): Handle OPT__completion_.
9979         * selftest-run-tests.c (selftest::run_tests): Add
9980         opt_proposer_c_tests.
9981         * selftest.c (assert_str_startswith): New.
9982         * selftest.h (assert_str_startswith): Likewise.
9983         (opt_proposer_c_tests): New.
9984         (ASSERT_STR_STARTSWITH): Likewise.
9986 2018-06-28  Martin Liska  <mliska@suse.cz>
9988         * Makefile.in: Add opt-suggestions.o.
9989         * gcc-main.c: Include opt-suggestions.h.
9990         * gcc.c (driver::driver): Likewise.
9991         (driver::~driver): Remove m_option_suggestions.
9992         (driver::build_option_suggestions): Moved to option_proposer.
9993         (driver::suggest_option): Likewise.
9994         (driver::handle_unrecognized_options): Use option_proposer.
9995         * gcc.h (class driver): Add new memver m_option_proposer.
9996         * opt-suggestions.c: New file.
9997         * opt-suggestions.h: New file.
9999 2018-06-28  Martin Liska  <mliska@suse.cz>
10001         * vec.h (class auto_string_vec): New (moved from auto_argvec).
10002         (auto_string_vec::~auto_string_vec): Likewise.
10004 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
10006         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
10007         prevent_decl_creation_for_types fields up and add reset_location field.
10008         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
10009         statement if id->reset_location is true.
10010         (copy_edges_for_bb): Do not set goto_locus on the new edges if
10011         id->reset_location is true.
10012         (copy_phis_for_bb): Force input_location on the arguments if
10013         id->reset_location is true.
10014         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
10015         is set on the function to be inlined.
10017 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
10019         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
10021 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
10023         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
10024         registers for Pmode.
10025         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
10026         hard registers for the clobbered pseudo.
10028 2018-06-27  Paul Koning  <ni1d@arrl.net>
10030         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
10031         mutually exclusive options.
10032         * config/pdp11/constraints.md (h): New constraint.
10033         (O): Update definition to match shift code generation.
10034         (D): New constraint.
10035         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
10036         (CCFP): Remove.
10037         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
10038         function.
10039         (output_jump): Change arguments.
10040         (pdp11_fixed_cc_regs): New function.
10041         (pdp11_cc_mode): Ditto.
10042         (pdp11_expand_shift): Ditto.
10043         (pdp11_assemble_shift): Ditto.
10044         (pdp11_small_shift): Ditto.
10045         (pdp11_branch_cost): Remove.
10046         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
10047         from output.
10048         (pdp11_register_move_cost): Update for CC registers.
10049         (pdp11_rtx_costs): Add case for LSHIFTRT.
10050         (pdp11_output_jump): Add CCNZ mode conditional branches.
10051         (notice_update_cc_on_set): Remove.
10052         (pdp11_cc_mode): New function.
10053         (simple_memory_operand): Correct pre/post decrement case.
10054         (no_side_effect_operand): New function.
10055         (pdp11_regno_reg_class): Add CC_REGS class.
10056         (pdp11_fixed_cc_regs): New function.
10057         (pdp11_small_shift): New function.
10058         (pdp11_expand_shift): New function to expand shift insns.
10059         (pdp11_assemble_shift): New function to output shifts.
10060         (pdp11_branch_cost): Remove.
10061         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
10062         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
10063         (WCHAR_TYPE): Ditto.
10064         (PTRDIFF_TYPE): Ditto.
10065         (ADJUST_INSN_LENGTH): New macro.
10066         (FIXED_REGISTERS): Add CC registers.
10067         (CALL_USED_REGISTERS): Ditto.
10068         (reg_class): Ditto.
10069         (REG_CLASS_NAMES): Ditto.
10070         (REG_CLASS_CONTENTS): Ditto.
10071         (SELECT_CC_MODE): Use new function.
10072         (TARGET_FLAGS_REGNUM): New macro.
10073         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
10074         (cc0_reg_rtx): Remove.
10075         (CC_STATUS_MDEP): Remove.
10076         (CC_STATUS_MDEFP_INIT): Remove.
10077         (CC_IN_FPU): Remove.
10078         (NOTICE_UPDATE_CC): Remove.
10079         (REGISTER_NAMES): Add CC registers.
10080         (BRANCH_COST): Change to constant 1.
10081         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
10082         handling.
10083         * config/pdp11/pdp11.opt (mbcopy): Remove.
10084         (mbcopy-builtin): Remove.
10085         (mbranch-cheap): Remove.
10086         (mbranch-expensive): Remove.
10087         * config/pdp11/predicates.md (expand_shift_operand): Update to
10088         match shift code generation.
10089         (ccnz_operator): New predicate.
10090         * doc/invoke.texi (PDP-11 Options): Remove deleted options
10091         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
10092         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
10093         exclusive options.
10094         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
10095         description of O constraint.
10097 2018-06-27  Jeff Law  <law@redhat.com>
10098             Austin Law  <austinklaw@gmail.com>
10100         * config/v850/v850.md (addsi3_set_flags): New pattern.
10101         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
10102         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
10103         (zero_extendhisi2_v850_set_flags): Likewise.
10104         (zero_extendqisi2_v850_set_flags): Likewise.
10105         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
10106         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
10107         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
10109         * config/v850/v850-protos.h (notice_update_cc): Remove.
10110         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
10111         (v850_print_operand): Handle 'D' and "d".
10112         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
10113         Add handling of arithmetic/logical operations compared against zero.
10114         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
10115         Do not look at v850_compare_op, instead get mode from last argument.
10116         (v850_gen_compare): Remove
10117         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
10118         after reload for prologue insns.
10119         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
10120         patterns.
10121         (construct_save_jarl): Likewise.
10122         (TARGET_FLAGS_REGNUM): Define.
10123         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
10124         (NOTICE_UPDATE_CC): Remove.
10125         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
10126         than cc0.  Conditionalize on reload_completed.
10127         (cmpsi_insn, setfcc_insn): Likewise.
10128         (tst1 splitter): Turn into define_and_split which sets the flags
10129         after reload.
10130         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
10131         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
10132         (cstoresf4, cstoredf4): Clobber the flags.
10133         (cmpsi, cmpsf, cmpdf): Remove expanders.
10134         (setf_insn): Remove pattern.
10135         (addsi3): Turn into define_and_split which clobbers the flags after
10136         reload and a suitable pattern (addsi3_clobber_flags) for use after
10137         reload.
10138         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
10139         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
10140         (ashrsi3, ashrsi3_v850e2): Likewise.
10141         (bins): Clobber the flags.
10142         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
10143         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
10144         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
10145         (call_value_internal_short, call_value_internal_long): Likewise.
10146         (callt_save_interrupt, callt_return_interrupt): Likewise.
10147         (save_interrupt, return_interrupt): Likewise.
10148         (callt_save_all_interrupt, save_all_interrupt): Likewise.
10149         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
10150         (restore_all_interrupt, _restore_all_interrupt): Likewise.
10151         (All FP comparisons): Only allow after reload has completed.
10152         (trfsr): Likewise.
10153         (divh, divhu): Tweak output template.
10154         (branch_z_normal, branch_z_invert): Remove
10155         (branch_nz_normal, branch_nz_invert): Likewise.
10156         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
10158         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
10159         * config/v850/v850.c (notice_update_cc): Remove.
10160         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
10161         (CC_NO_CARRY): Likewise.
10162         (NOTICE_UPDATE_CC): Define to nothing.
10163         * config/v850/v850.md: Remove block comment on cc0 handling
10164         Remove "cc" attribute from all patterns.  Remove cc_status handling
10165         from all patterns.  Minor formatting fixes.
10167 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10169         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
10170         (cortex-a76.cortex-a55): Likewise.
10171         * config/aarch64/aarch64-tune.md: Regenerate.
10172         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
10173         cortex-a76.cortex-a55.
10175 2018-06-27  Jeff Law  <law@redhat.com>
10177         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
10178         (MULTILIB_DIRNAMES): Similarly.
10180 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
10182         * gimple.h (gimple_return_retbnd): Delete.
10183         (gimple_return_set_retbnd): Likewise.
10184         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
10185         gimple_return_set_retbnd.
10186         * gimple-pretty-print.c (dump_gimple_return): Remove call to
10187         gimple_return_retbnd and adjust.
10188         * tree-inline.h (struct copy_body_data): Remove retbnd field.
10189         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
10190         Explicitly return NULL in a couple more cases.  Move assertion
10191         on debug statements and remove unreachable code.
10192         (reset_debug_binding): Do not test id->retbnd.
10193         (expand_call_inline): Do not set it.
10195 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
10197         * configure.ac: Add --disable-gcov option.
10198         * configure: Regenerate.
10199         * Makefile.in: Honour @enable_gcov@.
10200         * doc/install.texi: Document --disable-gcov.
10202 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10204         * config/arm/arm-cpus.in (cortex-a76): New entry.
10205         (cortex-a76.cortex-a55): Likewise.
10206         * config/arm/arm-tables.opt: Regenerate.
10207         * config/arm/arm-tune.md: Likewise.
10208         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
10209         * doc/invoke.texi (ARM Options): Document cortex-a76 and
10210         cortex-a76.cortex-a55.
10212 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
10214         PR target/85769
10215         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
10217 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
10219         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
10220         comment.
10221         (EPILOGUE_USES): Likewise.
10223 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
10225         * tree-inline.c (remap_location): New function extracted from...
10226         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
10227         (copy_phis_for_bb): ...here.  Call remap_location.
10228         (copy_cfg_body): Adjust call to copy_edges_for_bb.
10230 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
10232         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
10233         unaligned vsx for 16B memset.
10235 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
10237         PR target/86285
10238         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
10239         ieee128_float_type_node to long_double_type_node unless
10240         TARGET_LONG_DOUBLE_128 is set.
10242 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
10244         * cfgloop.c (get_loop_location): Convert return type from
10245         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
10246         by implicit construction from rtx_insn *, and using
10247         dump_user_location_t::from_function_decl for the fallback case.
10248         * cfgloop.h (get_loop_location): Convert return type from
10249         location_t to dump_user_location_t.
10250         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
10251         dump_printf_loc to pass in a dump_location_t rather than a
10252         location_t, via the gimple stmt.
10253         * coverage.c (get_coverage_counts): Update calls to
10254         dump_printf_loc to pass in dump_location_t rather than a
10255         location_t.
10256         * doc/optinfo.texi (Dump types): Convert example of
10257         dump_printf_loc from taking "locus" to taking "insn".  Update
10258         description of the "_loc" calls to cover dump_location_t.
10259         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
10260         "selftest.h".
10261         (dump_user_location_t::dump_user_location_t): New constructors,
10262         from gimple *stmt and rtx_insn *.
10263         (dump_user_location_t::from_function_decl): New function.
10264         (dump_loc): Make static.
10265         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
10266         const dump_location_t &.
10267         (dump_generic_expr_loc): Delete.
10268         (dump_printf_loc): Convert param "loc" from location_t to
10269         const dump_location_t &.
10270         (selftest::test_impl_location): New function.
10271         (selftest::dumpfile_c_tests): New function.
10272         * dumpfile.h: Include "profile-count.h".
10273         (class dump_user_location_t): New class.
10274         (struct dump_impl_location_t): New struct.
10275         (class dump_location_t): New class.
10276         (dump_printf_loc): Convert 2nd param from source_location to
10277         const dump_location_t &.
10278         (dump_generic_expr_loc): Delete.
10279         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
10280         const dump_location_t &.
10281         * gimple-fold.c (fold_gimple_assign): Update call to
10282         dump_printf_loc to pass in a dump_location_t rather than a
10283         location_t, via the gimple stmt.
10284         (gimple_fold_call): Likewise.
10285         * gimple-loop-interchange.cc
10286         (loop_cand::analyze_iloop_reduction_var): Update for change to
10287         check_reduction_path.
10288         (tree_loop_interchange::interchange): Update for change to
10289         find_loop_location.
10290         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
10291         change in return-type of find_loop_location.
10292         (graphite_regenerate_ast_isl): Likewise.
10293         * graphite-optimize-isl.c (optimize_isl): Likewise.
10294         * graphite.c (graphite_transform_loops): Likewise.
10295         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
10296         pass in a dump_location_t rather than a location_t, via the
10297         gimple stmt.
10298         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10299         * ipa.c (walk_polymorphic_call_targets): Likewise.
10300         * loop-unroll.c (report_unroll): Convert "locus" param from
10301         location_t to dump_location_t.
10302         (decide_unrolling): Update for change to get_loop_location's
10303         return type.
10304         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
10305         location_t to dump_user_location_t.
10306         (grid_find_single_omp_among_assignments_1): Updates calls to
10307         dump_printf_loc to pass in a dump_location_t rather than a
10308         location_t, via the gimple stmt.
10309         (grid_parallel_clauses_gridifiable): Convert "tloc" from
10310         location_t to dump_location_t.  Updates calls to dump_printf_loc
10311         to pass in a dump_location_t rather than a location_t, via the
10312         gimple stmt.
10313         (grid_inner_loop_gridifiable_p): Likewise.
10314         (grid_dist_follows_simple_pattern): Likewise.
10315         (grid_gfor_follows_tiling_pattern): Likewise.
10316         (grid_target_follows_gridifiable_pattern): Likewise.
10317         (grid_attempt_target_gridification): Convert initialization
10318         of local "grid" from memset to zero-initialization; FIXME: does
10319         this require C++11?  Update call to dump_printf_loc to pass in a
10320         optinfo_location rather than a location_t, via the gimple stmt.
10321         * profile.c (read_profile_edge_counts): Updates call to
10322         dump_printf_loc to pass in a dump_location_t rather than a
10323         location_t
10324         (compute_branch_probabilities): Likewise.
10325         * selftest-run-tests.c (selftest::run_tests): Call
10326         dumpfile_c_tests.
10327         * selftest.h (dumpfile_c_tests): New decl.
10328         * tree-loop-distribution.c (pass_loop_distribution::execute):
10329         Update for change in return type of find_loop_location.
10330         * tree-parloops.c (parallelize_loops): Likewise.
10331         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
10332         "locus" from location_t to dump_user_location_t.
10333         (canonicalize_loop_induction_variables): Likewise.
10334         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
10335         for change in return type of find_loop_location.
10336         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
10337         to dump_printf_loc to pass in a dump_location_t rather than a
10338         location_t, via the stmt.
10339         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
10340         Likewise.
10341         * tree-vect-loop-manip.c (find_loop_location): Convert return
10342         type from source_location to dump_user_location_t.
10343         (vect_do_peeling): Update for above change.
10344         (vect_loop_versioning): Update for change in type of
10345         vect_location.
10346         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
10347         from location_t to dump_user_location_t.
10348         (vect_estimate_min_profitable_iters): Update for change in type
10349         of vect_location.
10350         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
10351         location_t to dump_location_t.
10352         (vect_slp_bb): Update for change in type of vect_location.
10353         * tree-vectorizer.c (vect_location): Convert from source_location
10354         to dump_user_location_t.
10355         (try_vectorize_loop_1): Update for change in vect_location's type.
10356         (vectorize_loops): Likewise.
10357         (increase_alignment): Likewise.
10358         * tree-vectorizer.h (vect_location): Convert from source_location
10359         to dump_user_location_t.
10360         (find_loop_location): Convert return type from source_location to
10361         dump_user_location_t.
10362         (check_reduction_path): Convert 1st param from location_t to
10363         dump_user_location_t.
10364         * value-prof.c (check_counter): Update call to dump_printf_loc to
10365         pass in a dump_user_location_t rather than a location_t; update
10366         call to error_at for change in type of "locus".
10367         (check_ic_target): Update call to dump_printf_loc to
10368         pass in a dump_user_location_t rather than a location_t, via the
10369         call_stmt.
10371 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
10373         * config/s390/s390.h (enum processor_flags): Do not use
10374         default tune parameter when -march was specified.
10376 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
10378         PR target/86314
10379         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
10380         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
10381         operands.
10383 2018-06-26  Richard Biener  <rguenther@suse.de>
10385         PR tree-optimization/86287
10386         PR bootstrap/86316
10387         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
10388         (vect_analyze_loop): Initialize n_stmts.
10390 2018-06-26  Richard Biener  <rguenther@suse.de>
10392         PR middle-end/86271
10393         * fold-const.c (fold_convertible_p): Pointer extension
10394         isn't valid.
10396 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
10398         PR debug/86064
10399         * dwarf2out.c (loc_list_has_views): Adjust comments.
10400         (dw_loc_list): Split single cross-partition range with
10401         nonzero locview.
10403 2018-06-25  Jeff Law  <law@redhat.com>
10405         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
10406         on -mbig-switch by default.
10408         * config/v850/predicates.md (const_float_1_operand): Fix match_code
10409         test.
10410         (const_float_0_operand): Remove unused predicate.
10411         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
10412         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
10413         (recipsf2): New expander.  Original pattern now called
10414         (recipsf2_insn).
10415         (recipdf2, recipdf2_insn): Similarly.
10416         (rsqrtsf2, rsqrtsf2_insn): Similarly
10417         (rsqrtdf2, rsqrtdf2_insn): Similarly
10419 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
10421         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
10422         Simplify logic for FreeBSD (twice).
10424 2018-06-25  Martin Sebor  <msebor@redhat.com>
10426         PR tree-optimization/86204
10427         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
10428         a strnlen result if it's less than the length of the string.
10430 2018-06-25  Martin Sebor  <msebor@redhat.com>
10432         PR tree-optimization/85700
10433         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
10434         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
10435         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
10437 2018-06-25  Martin Sebor  <msebor@redhat.com>
10439         * doc/extend.texi (Zero-length arrays): Update and clarify.
10441 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
10443         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
10444         added IEEE/IBM long double multilib support on PowerPC little
10445         endian Linux systems.
10446         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
10447         (MULTILIB_DEFAULTS): Likewise.
10448         * config/rs6000/rs6000.c (rs6000_option_override_internal):
10449         Likewise.
10450         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
10451         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
10452         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
10454 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
10456         PR middle-end/86311
10457         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
10458         (REORDER_45): Likewise.
10460 2018-06-25  Jeff Law  <law@redhat.com>
10462         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
10463         dividend to 32 bits.  Adjust length.
10464         (udivmodhi4): Cleanup output template.  Fix length.
10466 2018-06-25  Carl Love  <cel@us.ibm.com>
10468         * config/rs6000/vsx.md: Change word selector to prefered location.
10470 2018-06-25  Richard Biener  <rguenther@suse.de>
10472         PR tree-optimization/86304
10473         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
10474         epilogue-if-converted loops as well.
10476 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
10478         * lto-section-out.c (lto_begin_section): Do not print section
10479         name for noaddr and unnumbered dumps.
10481 2018-06-25  Richard Biener  <rguenther@suse.de>
10483         * tree-vectorizer.h (struct vec_info_shared): New structure
10484         with parts split out from struct vec_info and loop_nest from
10485         struct _loop_vec_info.
10486         (struct vec_info): Adjust accordingly.
10487         (struct _loop_vec_info): Likewise.
10488         (LOOP_VINFO_LOOP_NEST): Adjust.
10489         (LOOP_VINFO_DATAREFS): Likewise.
10490         (LOOP_VINFO_DDRS): Likewise.
10491         (struct _bb_vec_info): Likewise.
10492         (BB_VINFO_DATAREFS): Likewise.
10493         (BB_VINFO_DDRS): Likewise.
10494         (struct _stmt_vec_info): Add dr_aux member.
10495         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
10496         (DR_MISALIGNMENT_UNINITIALIZED): New.
10497         (set_dr_misalignment): Adjust.
10498         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
10499         (vect_analyze_loop): Adjust prototype.
10500         (vect_analyze_loop_form): Likewise.
10501         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10502         Compute dependences lazily.
10503         (vect_record_base_alignments): Use shared datarefs/ddrs.
10504         (vect_verify_datarefs_alignment): Likewise.
10505         (vect_analyze_data_refs_alignment): Likewise.
10506         (vect_analyze_data_ref_accesses): Likewise.
10507         (vect_analyze_data_refs): Likewise.
10508         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
10509         constructor parameter for shared part.
10510         (vect_analyze_loop_form): Pass in shared part and adjust.
10511         (vect_analyze_loop_2): Pass in storage for the number of
10512         stmts.  Move loop nest finding to the caller.  Compute
10513         datarefs lazily.
10514         (vect_analyze_loop): Pass in shared part.
10515         (vect_transform_loop): Verify shared datarefs are unchanged.
10516         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
10517         constructor parameter for shared part.
10518         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
10519         (vect_slp_bb): Verify shared datarefs are unchanged before
10520         transform.
10521         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
10522         change.
10523         (new_stmt_vec_info): Initialize DR_AUX misalignment to
10524         DR_MISALIGNMENT_UNINITIALIZED.
10525         * tree-vectorizer.c (vec_info::vec_info): Add constructor
10526         parameter for shared part.
10527         (vec_info::~vec_info): Adjust.
10528         (vec_info_shared::vec_info_shared): New.
10529         (vec_info_shared::~vec_info_shared): Likewise.
10530         (vec_info_shared::save_datarefs): Likewise.
10531         (vec_info_shared::check_datarefs): Likewise.
10532         (try_vectorize_loop_1): Construct shared part live for analyses
10533         of a single loop for multiple vector sizes.
10534         * tree-parloops.c (gather_scalar_reductions): Adjust.
10536 2018-06-25  Richard Biener  <rguenther@suse.de>
10538         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
10539         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
10540         (vect_analyze_data_refs): Remove similar code from here and
10541         simplify accordingly.
10543 2018-06-25  Richard Biener  <rguenther@suse.de>
10545         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
10546         for reverse storage order accesses rather than asserting
10547         they cannot happen here.
10549 2018-06-25  Tom de Vries  <tdevries@suse.de>
10551         PR debug/86257
10552         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
10553         Use data16 instead of .byte for insn prefix.
10555 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
10557         PR C++/86082
10558         * parser.c (make_char_string_pack): Pass this literal chars
10559         through cpp_interpret_string.
10560         (cp_parser_userdef_numeric_literal): Check the result of
10561         make_char_string_pack.
10563 2018-06-24  Maya Rashish  <coypu@sdf.org>
10565         * ginclude/stddef.h: Simplify conditions around avoiding
10566         re-definition of __size_t.
10568 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
10570         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
10571         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
10573 2018-06-22  Maya Rashish  <coypu@sdf.org>
10575         * doc/invoke.texi (mno-fancy-math-387): Update for changes
10576         made to OpenBSD and NetBSD through the years.
10578 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10580         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10581         behavior of vec_pack (vector double, vector double) to match
10582         behavior of vec_float2 (vector double, vector double).
10584 2018-06-22  Olivier Hainque  <hainque@adacore.com>
10586         * gimplify.c (gimplify_function_tree): Prevent creation
10587         of a trampoline for the address of the current function
10588         passed to entry/exit instrumentation hooks.
10590 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
10592         PR target/86222
10593         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
10594         correctly.
10596 2018-06-22  Martin Liska  <mliska@suse.cz>
10598         PR tree-optimization/86263
10599         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10600         Bail out if is_enabled is false.
10601         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
10602         New declaration.
10603         (jump_table_cluster::is_enabled): New function.
10605 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
10607         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10608         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
10609         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
10610         (lto_input_ts_binfo_tree_pointers): Likewise.
10611         * tree-streamer-out.c (streamer_write_tree_bitfields,
10612         write_ts_binfo_tree_pointers): Likewise.
10613         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
10615 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
10617         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
10619 2018-06-22  Martin Liska  <mliska@suse.cz>
10621         * symbol-summary.h (get): Make it pure and inline move
10622         functionality from ::get function.
10623         (get): Remove and inline into ::get and ::get_create.
10624         (get_create): Move code from ::get function.
10626 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10628         PR target/85994
10629         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
10630         -x assembler-with-cpp.
10632 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10634         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
10635         _FILE_OFFSET_BITS=64 for C++.
10637 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
10639         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
10640         conversion insn that shows up when pr85657-3.c is compiled using
10641         IEEE 128-bit long double.
10642         (neg<mode>2_internal): Use the correct mode to check whether the
10643         mode is IBM extended.
10644         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
10645         multiply and divide external functions from being created more
10646         than once.
10648 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10650         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
10651         functions.
10652         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
10653         the edge can be forwarded.
10654         (cfg_layout_merge_blocks): Likewise.
10656 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10658         * except.c (finish_eh_generation): Commit edge insertions only after
10659         the EH edges have been redirected from post-landing to landing pads.
10661 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10663         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
10664         create_tmp_var_for to create the FRAME decl.
10665         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
10667 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10669         * tree-inline.c (copy_edges_for_bb): Minor tweak.
10670         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
10671         debug statement when resetting its value.
10672         (expand_call_inline): Copy the locus of the call onto the assignment
10673         of the return value, if any.  Use local variable in more cases.
10675 2018-06-21  Martin Liska  <mliska@suse.cz>
10677         * ipa-pure-const.c (propagate_nothrow): Use
10678         funct_state_summaries->get.
10679         (dump_malloc_lattice): Likewise.
10680         (propagate_malloc): Likewise.
10682 2018-06-21  Richard Biener  <rguenther@suse.de>
10684         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
10685         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
10686         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
10687         comment.
10688         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
10689         BLOCK_ABSTRACT_ORIGIN unconditionally.
10691 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
10693         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
10694         deleting it.
10695         * ipa-reference.c (ipa_reference_c_finalize): Delete
10696         ipa_ref_opt_sum_summaries and set it to NULL.
10698 2018-06-21  Tom de Vries  <tdevries@suse.de>
10700         PR tree-optimization/85859
10701         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
10702         test with comment from bb_no_side_effects_p.
10704 2018-06-21  Richard Biener  <rguenther@suse.de>
10706         PR tree-optimization/86232
10707         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
10708         max for constant niter.
10710 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10712         * config/aarch64/aarch64-simd.md
10713         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
10715 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10717         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
10718         Make opernads of the unspec commutative.
10720 2018-06-21  Richard Biener  <rguenther@suse.de>
10722         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
10723         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
10724         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
10725         (vect_analyze_data_ref_dependence): Re-order checks to deal with
10726         NULL DR_STEP.
10727         (vect_record_base_alignments): Do not record base alignment
10728         for gathers or scatters.
10729         (vect_compute_data_ref_alignment): Drop return value that is always
10730         true.  Bail out early for gathers or scatters.
10731         (vect_enhance_data_refs_alignment): Bail out early for gathers
10732         or scatters.
10733         (vect_find_same_alignment_drs): Likewise.
10734         (vect_analyze_data_refs_alignment): Remove dead code.
10735         (vect_slp_analyze_and_verify_node_alignment): Likewise.
10736         (vect_analyze_data_refs): For possible gathers or scatters do
10737         not create an alternate DR, just check their possible validity
10738         and mark them.  Adjust DECL_NONALIASED handling to not rely
10739         on DR_BASE_ADDRESS.
10740         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
10741         update inits of gathers or scatters.
10742         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
10743         Also copy gather/scatter flag to pattern vinfo.
10745 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10747         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10748         behavior of vec_packsu (vector unsigned long long, vector unsigned
10749         long long) to match behavior of vec_packs with same signature.
10751 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
10752             Thomas Schwinge <thomas@codesourcery.com>
10753             Cesar Philippidis  <cesar@codesourcery.com>
10755         * gimplify.c (gimplify_scan_omp_clauses): Add support for
10756         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10757         (gimplify_adjust_omp_clauses): Likewise.
10758         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
10759         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
10760         (gimplify_omp_target_update): Update handling of acc update and
10761         enter/exit data.
10762         * omp-low.c (install_var_field): Remove unused parameter
10763         base_pointers_restrict.
10764         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
10765         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
10766         FINALIZE}
10767         (omp_target_base_pointers_restrict_p): Delete.
10768         (scan_omp_target): Update call to scan_sharing_clauses.
10769         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
10770         FINALIZE}.
10771         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
10772         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10773         (convert_local_omp_clauses): Likewise.
10774         * tree-pretty-print.c (dump_omp_clause): Likewise.
10775         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
10776         FINALIZE}.
10777         (omp_clause_code_name): Likewise.
10779 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
10781         PR debug/86194
10782         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
10783         be narrowed.
10785         PR tree-optimization/86231
10786         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
10787         anti-range don't overwrite *vr0min before using it to compute *vr0max.
10789 2018-06-20  Tom de Vries  <tdevries@suse.de>
10791         PR tree-optimization/86097
10792         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
10793         iv type if signedness of iv type is not the same as that of *nit.
10795 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
10797         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
10798         EDGE_EH edges, verify they are all EDGE_EH.
10800 2018-06-20  Maya Rashish  <coypu@sdf.org>
10802         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
10804 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10806         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
10807         * config/aarch64/aarch64.c (xgene1_tunings): Add
10808         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
10809         (aarch64_mode_valid_for_sched_fusion_p):
10810         Allow 16-byte modes.
10811         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
10812         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
10813         128-bit modes.
10814         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
10815         New pattern.
10816         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
10817         * config/aarch64/iterators.md (VQ2): New mode iterator.
10819 2018-06-20  Martin Liska  <mliska@suse.cz>
10821         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10822         Change default ratio from 10 to 8.
10824 2018-06-20  Martin Liska  <mliska@suse.cz>
10826         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10827         New.
10828         (bit_test_cluster::find_bit_tests): Likewise.
10829         (switch_decision_tree::analyze_switch_statement): Find clusters.
10830         * tree-switch-conversion.h (struct jump_table_cluster): Document
10831         hierarchy.
10833 2018-06-20  Martin Liska  <mliska@suse.cz>
10835         * tree-switch-conversion.c (switch_conversion::collect):
10836         Record m_uniq property.
10837         (switch_conversion::expand): Bail out for special conditions.
10838         (group_cluster::~group_cluster): New.
10839         (group_cluster::group_cluster): Likewise.
10840         (group_cluster::dump): Likewise.
10841         (jump_table_cluster::emit): New.
10842         (switch_decision_tree::fix_phi_operands_for_edges): New.
10843         (struct case_node): Remove struct.
10844         (jump_table_cluster::can_be_handled): New.
10845         (case_values_threshold): Moved to header.
10846         (reset_out_edges_aux): Likewise.
10847         (jump_table_cluster::is_beneficial): New.
10848         (bit_test_cluster::can_be_handled): Likewise.
10849         (add_case_node): Remove.
10850         (bit_test_cluster::is_beneficial): New.
10851         (case_bit_test::cmp): New.
10852         (bit_test_cluster::emit): New.
10853         (expand_switch_as_decision_tree_p): Remove.
10854         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
10855         (fix_phi_operands_for_edge): Likewise.
10856         (switch_decision_tree::analyze_switch_statement): New.
10857         (compute_cases_per_edge): Move ...
10858         (switch_decision_tree::compute_cases_per_edge): ... here.
10859         (try_switch_expansion): Likewise.
10860         (switch_decision_tree::try_switch_expansion): Likewise.
10861         (record_phi_operand_mapping): Likewise.
10862         (switch_decision_tree::record_phi_operand_mapping): Likewise.
10863         (emit_case_decision_tree): Likewise.
10864         (switch_decision_tree::emit): Likewise.
10865         (balance_case_nodes): Likewise.
10866         (switch_decision_tree::balance_case_nodes): Likewise.
10867         (dump_case_nodes): Likewise.
10868         (switch_decision_tree::dump_case_nodes): Likewise.
10869         (emit_jump): Likewise.
10870         (switch_decision_tree::emit_jump): Likewise.
10871         (emit_cmp_and_jump_insns): Likewise.
10872         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
10873         (emit_case_nodes): Likewise.
10874         (switch_decision_tree::emit_case_nodes): Likewise.
10875         (conditional_probability): Remove.
10876         * tree-switch-conversion.h (enum cluster_type): New.
10877         (PRINT_CASE): New.
10878         (struct cluster): Likewise.
10879         (cluster::cluster): Likewise.
10880         (struct simple_cluster): Likewise.
10881         (simple_cluster::simple_cluster): Likewise.
10882         (struct group_cluster): Likewise.
10883         (struct jump_table_cluster): Likewise.
10884         (struct bit_test_cluster): Likewise.
10885         (struct min_cluster_item): Likewise.
10886         (struct case_tree_node): Likewise.
10887         (case_tree_node::case_tree_node): Likewise.
10888         (jump_table_cluster::case_values_threshold): Likewise.
10889         (struct case_bit_test): Likewise.
10890         (struct switch_decision_tree): Likewise.
10891         (struct switch_conversion): Likewise.
10892         (switch_decision_tree::reset_out_edges_aux): Likewise.
10894 2018-06-20  Martin Liska  <mliska@suse.cz>
10896         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
10897         (hoist_edge_and_branch_if_true): Likewise.
10898         (expand_switch_using_bit_tests_p): Likewise.
10899         (struct case_bit_test): Likewise.
10900         (case_bit_test_cmp): Likewise.
10901         (emit_case_bit_tests): Likewise.
10902         (switch_conversion::switch_conversion): New class.
10903         (struct switch_conv_info): Remove old struct.
10904         (collect_switch_conv_info): More to ...
10905         (switch_conversion::collect): ... this.
10906         (check_range): Likewise.
10907         (switch_conversion::check_range): Likewise.
10908         (check_all_empty_except_final): Likewise.
10909         (switch_conversion::check_all_empty_except_final): Likewise.
10910         (check_final_bb): Likewise.
10911         (switch_conversion::check_final_bb): Likewise.
10912         (create_temp_arrays): Likewise.
10913         (switch_conversion::create_temp_arrays): Likewise.
10914         (free_temp_arrays): Likewise.
10915         (gather_default_values): Likewise.
10916         (switch_conversion::gather_default_values): Likewise.
10917         (build_constructors): Likewise.
10918         (switch_conversion::build_constructors): Likewise.
10919         (constructor_contains_same_values_p): Likewise.
10920         (switch_conversion::contains_same_values_p): Likewise.
10921         (array_value_type): Likewise.
10922         (switch_conversion::array_value_type): Likewise.
10923         (build_one_array): Likewise.
10924         (switch_conversion::build_one_array): Likewise.
10925         (build_arrays): Likewise.
10926         (switch_conversion::build_arrays): Likewise.
10927         (gen_def_assigns): Likewise.
10928         (switch_conversion::gen_def_assigns): Likewise.
10929         (prune_bbs): Likewise.
10930         (switch_conversion::prune_bbs): Likewise.
10931         (fix_phi_nodes): Likewise.
10932         (switch_conversion::fix_phi_nodes): Likewise.
10933         (gen_inbound_check): Likewise.
10934         (switch_conversion::gen_inbound_check): Likewise.
10935         (process_switch): Use the newly created class.
10936         (switch_conversion::expand): New.
10937         (switch_conversion::~switch_conversion): New.
10938         * tree-switch-conversion.h: New file.
10940 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10942         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
10943         tree-vect-patterns.c.
10944         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
10945         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
10946         (vect_recog_sad_pattern): Likewise.
10947         (vect_recog_widen_sum_pattern): Likewise.
10948         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
10949         (vect_recog_widen_shift_pattern): Remove the type_in argument.
10950         (vect_recog_rotate_pattern): Likewise.
10951         (vect_recog_mult_pattern): Likewise.
10952         (vect_recog_vector_vector_shift_pattern): Likewise.
10953         (vect_recog_divmod_pattern): Likewise.
10954         (vect_recog_mixed_size_cond_pattern): Likewise.
10955         (vect_recog_bool_pattern): Likewise.
10956         (vect_recog_mask_conversion_pattern): Likewise.
10957         (vect_try_gather_scatter_pattern): Likewise.
10958         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
10959         (vect_recog_over_widening_pattern): Likewise.
10960         (vect_recog_gather_scatter_pattern): Likewise.
10961         (vect_recog_func_ptr): Move from tree-vectorizer.h
10962         (vect_vect_recog_func_ptrs): Move further down the file.
10963         (vect_recog_func): Likewise.  Remove the third argument.
10964         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
10965         (vect_pattern_recog_1): Expect the pattern function to do any
10966         necessary target tests.  Also expect it to provide a vector type.
10967         Remove the type_in handling.
10969 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10971         * tree-vect-patterns.c (vect_pattern_detected): New function.
10972         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
10973         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
10974         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
10975         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
10976         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10977         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10978         (vect_recog_mask_conversion_pattern)
10979         (vect_try_gather_scatter_pattern): Likewise.
10981 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10983         * tree-vect-patterns.c (vect_get_internal_def): New function.
10984         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10985         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
10986         (search_type_for_mask_1): Use it.
10988 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10990         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10991         redundant WIDEN_SUM_EXPR handling.
10992         (vect_recog_sad_pattern): Likewise.
10994 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10996         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10997         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
10998         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
10999         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
11000         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
11002 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11004         * tree-vect-stmts.c (vectorizable_call): Make sure that we
11005         use the stmt_vec_info of the original bb statement for the
11006         new zero assignment, even if the call is part of a pattern.
11008 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11010         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
11011         that the sequence is attached to the original statement rather
11012         than the pattern statement.
11013         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
11014         PATTERN_DEF_SEQ from the original statement rather than
11015         the main pattern statement.
11016         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
11017         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
11018         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
11020 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11022         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
11023         definition statements before the early exit for statements that aren't
11024         live or relevant.
11025         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
11026         split out from...
11027         (vect_transform_loop): ...here.  Process pattern definition
11028         statements without first checking whether the main pattern
11029         statement is live or relevant.
11031 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
11033         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
11034         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
11036 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
11038         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
11039         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
11040         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
11041         (expand_block_compare): Change select_block_compare_mode call.
11042         (expand_strncmp_align_check): Use new functions, fix comment.
11043         (emit_final_str_compare_gpr): New function.
11044         (expand_strn_compare): Refactor and clean up code.
11045         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
11047 2018-06-19  Tony Reix  <tony.reix@atos.com>
11048             Damien Bergamini  <damien.bergamini@atos.com>
11049             David Edelsohn  <dje.gcc@gmail.com>
11051         * collect2.c (static_obj): New variable.
11052         (static_libs): New variable.
11053         (is_in_list): Uncomment declaration.
11054         (main): Track AIX libraries linked statically.
11055         (is_in_list): Uncomment definition.
11056         (scan_prog_file): Don't add AIX shared libraries initializer
11057         to constructor list if linking statically.
11059 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
11061         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
11062         constant.
11063         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
11065 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
11067         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
11068         blocks.
11070 2018-06-19  Martin Liska  <mliska@suse.cz>
11072         * config/i386/i386.c (ix86_can_inline_p): Do not use
11073         ipa_fn_summaries::get_create.
11074         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
11075         get.
11076         (devirtualization_time_bonus): Likewise.
11077         (ipcp_propagate_stage): Likewise.
11078         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
11079         (edge_set_predicate): Likewise.
11080         (evaluate_conditions_for_known_args): Likewise.
11081         (evaluate_properties_for_edge): Likewise.
11082         (ipa_call_summary::reset): Tranform to ...
11083         (ipa_call_summary::~ipa_call_summary): ... this.
11084         (ipa_fn_summary::reset): Transform to ...
11085         (ipa_fn_summary::~ipa_fn_summary): ... this.
11086         (ipa_fn_summary_t::remove): Rename to ...
11087         (ipa_fn_summary_t::remove_callees): ... this.
11088         (ipa_fn_summary_t::duplicate): Use placement new
11089         instead of memory copy.
11090         (ipa_call_summary_t::duplicate): Likewise.
11091         (ipa_call_summary_t::remove): Remove.
11092         (dump_ipa_call_summary): Change get_create to get.
11093         (ipa_dump_fn_summary): Dump only when summary exists.
11094         (analyze_function_body): Use symbol_summary::get instead
11095         of get_create.
11096         (compute_fn_summary): Likewise.
11097         (estimate_edge_devirt_benefit): Likewise.
11098         (estimate_edge_size_and_time): Likewise.
11099         (inline_update_callee_summaries): Likewise.
11100         (remap_edge_change_prob): Likewise.
11101         (remap_edge_summaries): Likewise.
11102         (ipa_merge_fn_summary_after_inlining): Likewise.
11103         (write_ipa_call_summary): Likewise.
11104         (ipa_fn_summary_write): Likewise.
11105         (ipa_free_fn_summary): Likewise.
11106         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
11107         (struct ipa_call_summary): Likewise.
11108         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
11109         of get_create.
11110         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
11111         (estimate_size_after_inlining): Likewise.
11112         (estimate_growth): Likewise.
11113         (growth_likely_positive): Likewise.
11114         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
11115         (inline_call): Likewise.
11116         * ipa-inline.c (caller_growth_limits): Likewise.
11117         (can_inline_edge_p): Likewise.
11118         (can_inline_edge_by_limits_p): Likewise.
11119         (compute_uninlined_call_time): Likewise.
11120         (compute_inlined_call_time): Likewise.
11121         (want_inline_small_function_p): Likewise.
11122         (edge_badness): Likewise.
11123         (update_caller_keys): Likewise.
11124         (update_callee_keys): Likewise.
11125         (inline_small_functions): Likewise.
11126         (inline_to_all_callers_1): Likewise.
11127         (dump_overall_stats): Likewise.
11128         (early_inline_small_functions): Likewise.
11129         (early_inliner): Likewise.
11130         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
11131         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11132         * ipa-pure-const.c (malloc_candidate_p): Likewise.
11133         * ipa-split.c (execute_split_functions): Likewise.
11134         * symbol-summary.h: Likewise.
11135         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
11137 2018-06-19  Richard Biener  <rguenther@suse.de>
11139         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
11140         (vectorize_loops): ... here.  Fix dbgcnt handling.
11141         (try_vectorize_loop): Wrap try_vectorize_loop_1.
11143 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
11145         PR target/86197
11146         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
11147         ieee128 argument takes up only one (vector) register, not two (floating
11148         point) registers.
11150 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
11152         * gimplify.c (gimplify_init_constructor): Really never clear for an
11153         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
11155 2018-06-19  Richard Biener  <rguenther@suse.de>
11157         PR tree-optimization/86179
11158         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
11159         after failed recognition.
11161 2018-06-18  Martin Sebor  <msebor@redhat.com>
11163         PR middle-end/85602
11164         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
11165         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
11166         Handle integer subtraction.
11167         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
11168         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
11170 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
11172         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
11173         param from rtx to rtx_insn *.
11174         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
11175         param.
11176         (frv_ifcvt_modify_insn): Likwise.
11177         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
11178         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
11179         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
11180         as_a <rtx_insn *> cast to local "unprotected_region" once
11181         it's been established that it's not NULL or pc_rtx.
11182         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
11183         param "sethi" from rtx to rtx_insn *.
11184         (nds32_group_float_insns): Likewise for param "insn".
11185         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
11186         param.
11187         (vax_output_int_subtract): Likewise.
11188         * config/vax/vax.c (vax_output_int_add): Likewise for param
11189         "insn".
11190         (vax_output_int_subtract): Likewise.
11191         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
11192         (emit_pattern_after): Likewise for param "after".
11193         (emit_insn_after): Likewise.
11194         (emit_jump_insn_after): Likewise.
11195         (emit_call_insn_after): Likewise.
11196         (emit_debug_insn_after): Likewise.
11197         (emit_pattern_before): Likewise for param "before".
11198         (emit_insn_before): Likewise.
11199         (emit_jump_insn_before): Likewise.
11200         * final.c (get_insn_template): Likewise for param "insn", removing
11201         a cast.
11202         * output.h (get_insn_template): Likewise for 2nd param.
11203         * rtl.h (emit_insn_before): Likewise.
11204         (emit_jump_insn_before): Likewise.
11205         (emit_debug_insn_before_noloc): Likewise.
11206         (emit_insn_after): Likewise.
11207         (emit_jump_insn_after): Likewise.
11208         (emit_call_insn_after): Likewise.
11209         (emit_debug_insn_after): Likewise.
11210         (set_insn_deleted): Likewise for param.
11212 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
11214         PR target/85358
11215         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
11216         floating point modes, so that IFmode is numerically greater than
11217         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
11218         to declare the ordering.  This prevents IFmode from being
11219         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
11220         machine.  Include rs6000-modes.h to share the fractional values
11221         between genmodes* and the rest of the compiler.
11222         (IFmode): Likewise.
11223         (KFmode): Likewise.
11224         (TFmode): Likewise.
11225         * config/rs6000/rs6000-modes.h: New file.
11226         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
11227         meaning of rs6000_long_double_size so that 126..128 selects an
11228         appropriate 128-bit floating point type.
11229         (rs6000_option_override_internal): Likewise.
11230         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
11231         (TARGET_LONG_DOUBLE_128): Change the meaning of
11232         rs6000_long_double_size so that 126..128 selects an appropriate
11233         128-bit floating point type.
11234         (LONG_DOUBLE_TYPE_SIZE): Update comment.
11235         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
11236         source and destination to match the standard usage.
11237         (truncifkf2): Likewise.
11238         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
11239         ISA 2.07 to use an explicit clobber, instead of passing in a
11240         temporary.
11241         (copysign<mode>3_soft): Likewise.
11243 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
11245         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11246         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
11247         (vect_slp_analyze_instance_dependence): Likewise.
11248         (vect_enhance_data_refs_alignment): Likewise.
11249         (vect_analyze_data_refs_alignment): Likewise.
11250         (vect_slp_analyze_and_verify_instance_alignment
11251         (vect_analyze_data_ref_accesses): Likewise.
11252         (vect_prune_runtime_alias_test_list): Likewise.
11253         (vect_analyze_data_refs): Likewise.
11254         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
11255         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11256         (vect_analyze_scalar_cycles_1): Likewise.
11257         (vect_get_loop_niters): Likewise.
11258         (vect_analyze_loop_form_1): Likewise.
11259         (vect_update_vf_for_slp): Likewise.
11260         (vect_analyze_loop_operations): Likewise.
11261         (vect_analyze_loop): Likewise.
11262         (vectorizable_induction): Likewise.
11263         (vect_transform_loop): Likewise.
11264         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
11265         * tree-vect-slp.c (vect_analyze_slp): Likewise.
11266         (vect_make_slp_decision): Likewise.
11267         (vect_detect_hybrid_slp): Likewise.
11268         (vect_slp_analyze_operations): Likewise.
11269         (vect_slp_bb): Likewise.
11270         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
11271         (vectorizable_bswap): Likewise.
11272         (vectorizable_call): Likewise.
11273         (vectorizable_simd_clone_call): Likewise.
11274         (vectorizable_conversion): Likewise.
11275         (vectorizable_assignment): Likewise.
11276         (vectorizable_shift): Likewise.
11277         (vectorizable_operation): Likewise.
11278         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
11280 2018-06-18  Martin Sebor  <msebor@redhat.com>
11282         PR tree-optimization/81384
11283         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
11284         * builtins.c (expand_builtin_strnlen): New function.
11285         (expand_builtin): Call it.
11286         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
11287         * builtins.def (BUILT_IN_STRNLEN): New.
11288         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
11289         Warn for bounds in excess of maximum object size.
11290         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
11291         single-value ranges.  Handle strnlen.
11292         (handle_builtin_strlen): Handle strnlen.
11293         (strlen_check_and_optimize_stmt): Same.
11294         * doc/extend.texi (Other Builtins): Document strnlen.
11296 2018-06-18  Maya Rashish  <coypu@sdf.org>
11298         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
11299         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
11300         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
11302         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
11303         here to ...
11304         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
11306 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11308         * tree.c (escaped_string::escape): Replace cast to char * by
11309         const_cast<char *> (unescaped).
11311 2018-06-18  Nick Clifton  <nickc@redhat.com>
11313         PR 84195
11314         * tree.c (escaped_string): New class.  Converts an unescaped
11315         string into its escaped equivalent.
11316         (warn_deprecated_use): Use the new class to convert the
11317         deprecation message, if present.
11318         (test_escaped_strings): New self test.
11319         (test_c_tests): Add test_escaped_strings.
11320         * doc/extend.texi (deprecated): Add a note that the
11321         deprecation message is affected by the -fmessage-length
11322         option, and that control characters will be escaped.
11323         (#pragma GCC error): Document this pragma.
11324         (#pragma GCC warning): Likewise.
11325         * doc/invoke.texi (-fmessage-length): Document this option's
11326         effect on the #warning and #error preprocessor directives and
11327         the deprecated attribute.
11329 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11331         * tree.c (decl_value_expr_lookup): Revert latest change.
11332         (decl_value_expr_insert): Likewise.
11334 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
11336         * gimplify.c (nonlocal_vlas): Delete.
11337         (nonlocal_vla_vars): Likewise.
11338         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
11339         referenced VLAs.
11340         (gimplify_body): Do not create and destroy nonlocal_vlas.
11341         * tree-nested.c: Include diagnostic.h.
11342         (use_pointer_in_frame): Tweak.
11343         (lookup_field_for_decl): Add assertion and declare the transformation.
11344         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
11345         internal error when the reference is in a wrong context.  Do not
11346         create a debug decl by default.
11347         (note_nonlocal_block_vlas): Delete.
11348         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
11349         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
11350         create a debug decl by default.
11351         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
11352         call is in a wrong context.
11353         (fixup_vla_decls): New function.
11354         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
11355         debug variables were created.
11356         * tree.c (decl_value_expr_lookup): Add checking assertion.
11357         (decl_value_expr_insert): Likewise.
11359 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
11361         PR middle-end/82479
11362         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
11363         * tree-scalar-evolution.c (interpret_expr): Likewise.
11364         (expression_expensive_p): Likewise.
11365         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
11366         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
11367         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
11368         (ssa_defined_by_minus_one_stmt_p): New.
11370 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
11372         PR middle-end/64946
11373         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
11374         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
11375         * dojump.c (do_jump): Likewise.
11376         * expr.c (expand_expr_real_2): Check operand type's sign.
11377         * fold-const.c (const_unop): Handle ABSU_EXPR.
11378         (fold_abs_const): Likewise.
11379         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
11380         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
11381         (strip_sign_op_1): Likesise.
11382         * match.pd: Add new pattern to generate ABSU_EXPR.
11383         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
11384         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11385         * tree-eh.c (operation_could_trap_helper_p): Likewise.
11386         * tree-inline.c (estimate_operator_cost): Likewise.
11387         * tree-pretty-print.c (dump_generic_node): Likewise.
11388         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
11389         * tree.def (ABSU_EXPR): New.
11391 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
11393         PR middle-end/86095
11394         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
11395         documented as preserved for backward compatibility only.
11396         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
11398         PR rtl-optimization/86108
11399         * bb-reorder.c (create_forwarder_block): Renamed to ...
11400         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
11401         jump from new landing pad to the second part.
11402         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
11403         Adjust callers.
11405 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
11407         PR middle-end/85878
11408         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
11409         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
11410         Only call store_expr for halves if the mode is the same.
11412         PR middle-end/86123
11413         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
11414         Fix up comment formatting.
11416 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11418         * typed-splay-tree.h (typed_splay_tree::remove): New function.
11419         (typed_splay_tree::closure,
11420         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
11421         (typed_splay_tree::typed_splay_tree,
11422         typed_splay_tree::operator =): Declared private.
11423         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
11424         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
11425         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
11426         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
11427         typed_splay_tree::splay_tree_splay,
11428         typed_splay_tree::splay_tree_foreach_helper,
11429         typed_splay_tree::splay_tree_insert,
11430         typed_splay_tree::splay_tree_remove,
11431         typed_splay_tree::splay_tree_lookup,
11432         typed_splay_tree::splay_tree_predecessor,
11433         typed_splay_tree::splay_tree_successor,
11434         typed_splay_tree::splay_tree_min,
11435         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
11436         (typed_splay_tree::root, typed_splay_tree::comp,
11437         typed_splay_tree::delete_key,
11438         typed_splay_tree::delete_value): New data members.
11439         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
11440         typed_splay_tree::remove.
11442 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
11444         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
11445         -mginv and -mno-ginv to the assembler.
11446         * config/mips/mips.opt (-mcrc): New option.
11447         (-mginv): Likewise.
11448         * doc/invoke.text (-mcrc): Document.
11449         (-mginv): Likewise.
11451 2018-06-15  Nick Clifton  <nickc@redhat.com>
11453         PR 84195
11454         * tree.c (escaped_string): New class.  Converts an unescaped
11455         string into its escaped equivalent.
11456         (warn_deprecated_use): Use the new class to convert the
11457         deprecation message, if present.
11458         (test_escaped_strings): New self test.
11459         (test_c_tests): Add test_escaped_strings.
11460         * doc/extend.texi (deprecated): Add a note that the
11461         deprecation message is affected by the -fmessage-length
11462         option, and that control characters will be escaped.
11463         (#pragma GCC error): Document this pragma.
11464         (#pragma GCC warning): Likewise.
11465         * doc/invoke.texi (-fmessage-length): Document this option's
11466         effect on the #warning and #error preprocessor directives and
11467         the deprecated attribute.
11469 2018-06-15  Richard Biener  <rguenther@suse.de>
11471         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
11472         here, also noting vector size used.
11473         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
11474         size used in MSG_OPTIMIZED_LOCATIONS dump.
11475         (pass_slp_vectorize::execute): Adjust.
11477 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
11479         PR target/85968
11480         * config/arc/arc.c (arc_return_address_register): Fix
11481         if-condition.
11483 2018-06-15  Richard Biener  <rguenther@suse.de>
11485         PR middle-end/86159
11486         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
11487         leave useless conversion stripping to force_gimple_operand_gsi.
11488         (gimplify_build2): Likewise.
11489         (gimplify_build1): Likewise.
11491 2018-06-15  Richard Biener  <rguenther@suse.de>
11493         PR middle-end/86076
11494         * tree-cfg.c (move_stmt_op): unshare invariant addresses
11495         before adjusting their block.
11497 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11499         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
11500         multilibs for *-*-rtems*.
11501         * config/riscv/t-rtems: New file.
11503 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
11505         PR middle-end/86122
11506         * match.pd ((A +- CST1) +- CST2): Punt if last resort
11507         unsigned_type_for returns NULL.
11509         PR target/85945
11510         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
11511         subregs of multi-word pseudos unless the float mode has word size.
11513 2018-06-14  Richard Biener  <rguenther@suse.de>
11515         PR middle-end/86139
11516         * tree-vect-generic.c (build_word_mode_vector_type): Remove
11517         duplicate and harmful type_hash_canon.
11518         * tree.c (type_hash_canon): Assert we didn't find ourselves.
11520 2018-06-14  Richard Biener  <rguenther@suse.de>
11522         PR ipa/86124
11523         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
11524         NULL cgraph_node.
11526 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11528         * config/rtems.h (STDINT_LONG32): Define.
11530 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
11531             Prachi Godbole  <prachi.godbole@imgtec.com>
11533         * config/mips/mips-cpus.def: Define P6600.
11534         * config/mips/mips-tables.opt: Regenerate.
11535         * config/mips/mips.c (mips_ucbranch_type): New enum.
11536         (mips_rtx_cost_data): Add support for P6600.
11537         (mips_issue_rate): Likewise.
11538         (mips_multipass_dfa_lookahead): Likewise.
11539         (mips_avoid_hazard): Likewise.
11540         (mips_reorg_process_insns): Likewise.
11541         (mips_classify_branch_p6600): New function.
11542         * config/mips/mips.h (TUNE_P6600): New define.
11543         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
11544         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
11545         * config/mips/mips.md: Include p6600.md.
11546         (processor): Add p6600.
11547         * config/mips/p6600.md: New file.
11548         * doc/invoke.texi: Add p6600 to supported architectures.
11550 2018-06-13  Martin Sebor  <msebor@redhat.com>
11552         PR tree-optimization/86114
11553         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
11554         of integer types.
11555         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
11557 2018-06-13  Richard Biener  <rguenther@suse.de>
11559         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
11560         Properly set vector type of the intermediate stmt.
11561         * tree-vect-stmts.c (vectorizable_operation): The destination
11562         var always has vectype_out type.
11564 2018-06-13  Jeff Law  <law@redhat.com>
11566         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
11567         integer 0 for argument to print_rtl_with_bb.
11568         (rl78_reorg): Likewise.
11570 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
11572         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
11573         from rtx to rtx_insn *.
11574         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
11575         "label".
11576         (add_sched_insns_for_speculation): Likewise for local "target",
11577         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11578         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
11579         from rtx_insn ** to rtx_code_label **.
11580         (reorg_emit_nops): Likewise.
11581         (c6x_reorg): Likewise for local "call_labels".
11582         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
11583         rtx to rtx_insn *.
11584         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
11585         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
11586         the loops over LABEL_REFS.
11587         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
11588         braf_label.
11589         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11590         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
11591         (split_branches): Strengthen local "olabel" from rtx to
11592         rtx_insn *, adding a safe_as_a cast.
11593         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
11594         to "rtx_insn *".
11595         (add_insn_after): Likewise for first two params.
11596         (add_insn_before): Likewise.
11597         (remove_insn): Likewise for param.
11598         (emit_pattern_before_noloc): Likewise for second and third params.
11599         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
11600         (emit_call_insn_before_noloc): Likewise.
11601         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
11602         to "rtx_insn *".
11603         (emit_barrier_before): Likewise.
11604         (emit_label_before): Strengthen "label" param from "rtx" to
11605         "rtx_code_label *".  Strengthen "before" param from "rtx" to
11606         "rtx_insn *".
11607         (emit_insn_after_1): Strengthen "after" param from "rtx" to
11608         "rtx_insn *".
11609         (emit_pattern_after_noloc): Likewise.
11610         (emit_insn_after_noloc): Likewise.
11611         (emit_jump_insn_after_noloc): Likewise.
11612         (emit_call_insn_after_noloc): Likewise.
11613         (emit_debug_insn_after_noloc): Likewise.
11614         (emit_barrier_after): Likewise.
11615         (emit_label_after): Likewise for both params.
11616         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
11617         "loc" param from "int" to "location_t".
11618         (emit_insn_after_setloc): Likewise.
11619         (emit_jump_insn_after_setloc): Likewise.
11620         (emit_call_insn_after_setloc): Likewise.
11621         (emit_debug_insn_after_setloc): Likewise.
11622         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
11623         "loc" param from "int" to "location_t".
11624         (emit_pattern_before): Convert NULL_RTX to NULL.
11625         (emit_insn_before_setloc): Convert "loc" param from "int" to
11626         "location_t".
11627         (emit_jump_insn_before_setloc): Likewise.
11628         (emit_call_insn_before_setloc): Likewise.
11629         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
11630         rtx_insn *.  Convert "loc" param from "int" to "location_t".
11631         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
11632         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
11633         Convert 3rd param from "int" to "location_t".
11634         (emit_barrier_before, emit_barrier_after, next_real_insn):
11635         Strengthen param from rtx to rtx_insn *.
11636         (emit_label_before): Strengthen 1st param from "rtx" to
11637         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
11638         "rtx_insn *".
11639         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
11640         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
11641         Strengthen 2nd param from "rtx" to "rtx_insn *".
11642         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
11643         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
11644         Likewise. Convert 3rd param from "int" to "location_t".
11645         (emit_label_after): Strengthen 1st param from "rtx" to
11646         "rtx_code_label *".
11647         (next_real_insn, remove_insn): Strengthen param from "rtx" to
11648         "rtx_insn *".
11649         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
11650         from "rtx" to "rtx_insn *".
11652 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
11654         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
11655         bodies streamed in with -Q.
11656         * dumpfile.c (dump_files): Add lto-stream-out dump file.
11657         * dumpfile.h (tree_dump_index): Add lto_stream_out.
11658         * gimple-streamer-out.c: Include gimple-pretty-print.h
11659         (output_bb): Dump stmts streamed.
11660         * lto-section-out.c: Include print-tree.h
11661         (lto_begin_section): Dump sections created.
11662         (lto_output_decl_index): Dump decl encoded.
11663         * lto-streamer-out.c: Include print-tree.h
11664         (create_output_block): Dump output block created.
11665         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
11666         (output_function): Dump function output.
11667         (output_constructor): Dump constructor streamed.
11668         (write_global_stream): Output indexes encoded.
11669         (produce_asm_for_decls): Dump streams encoded.
11670         * lto-streamer.c (streamer_dump_file): New global var.
11671         * lto-streamer.h (streamer_dump_file): Declare.
11672         * passes.c (ipa_write_summaries): Initialize streamer dump.
11673         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
11674         in.
11676 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
11678         PR target/86048
11679         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
11680         offsets for register save directives.  Emit a second batch of save
11681         directives, if need be, when the function accesses prior frames.
11683 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11685         * config/arc/fpu.md (fmasf4): Force operand to register.
11686         (fnmasf4): Likewise.
11688 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11690         * config/arc/arc-protos.h (arc_pad_return): Remove.
11691         * config/arc/arc.c (machine_function): Remove force_short_suffix
11692         and size_reason.
11693         (arc_print_operand): Adjust printing of '&'.
11694         (arc_verify_short): Remove conditional printing of short suffix.
11695         (arc_final_prescan_insn): Remove reference to size_reason.
11696         (pad_return): New function.
11697         (arc_reorg): Call pad_return.
11698         (arc_pad_return): Remove.
11699         (arc_init_machine_status): Remove reference to force_short_suffix.
11700         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
11701         (attr length): When attribute iscompact is true force to 2
11702         regardless; in the case of maybe check if we want to force the
11703         instruction to have 4 bytes length.
11704         (nopv): Change it to generate 4 byte long nop as well.
11705         (blockage): New pattern.
11706         (simple_return): Remove call to arc_pad_return.
11707         (p_return_i): Likewise.
11709 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11711         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
11713 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11715         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
11716         ARC cores.
11718 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11720         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
11721         for ARC700 and ARCv2.
11723 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
11725         PR target/86076
11726         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
11727         operands[2] instead of operands[1].
11730 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
11732         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
11733         case, check whether the outer register overlaps an unallocatable
11734         register, not just whether it fits the required class.
11736 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
11738         * poly-int.h (can_div_trunc_p): Add new overload in which all values
11739         are poly_ints.
11740         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
11741         (memrefs_conflict_p): Likewise.
11742         (init_alias_analysis): Likewise.
11743         * cfgexpand.c (expand_debug_expr): Likewise.
11744         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
11745         * cse.c (fold_rtx): Likewise.
11746         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
11747         * expr.c (emit_block_move_hints): Likewise.
11748         (clear_storage_hints, push_block, emit_push_insn): Likewise.
11749         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
11750         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
11751         (emit_group_store): Likewise.
11752         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
11753         to read the PRE/POST_MODIFY increment.
11754         * calls.c (store_one_arg): Use strip_offset.
11755         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
11756         poly_int_rtx_p.
11757         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
11758         by a VEC_SELECT.
11759         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
11760         (simplify_binary_operation_1): Extend CONST_INT handling to
11761         poly_int_rtx_p.
11762         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
11763         than a HOST_WIDE_INT.
11764         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
11765         poly_int64.
11766         (adjust_mems, add_stores): Update accodingly.
11767         (vt_canonicalize_addr): Track polynomial offsets.
11768         (emit_note_insn_var_location): Likewise.
11769         (vt_add_function_parameter): Likewise.
11770         (vt_initialize): Likewise.
11772 2018-06-12  Jeff Law  <law@redhat.com>
11774         * config.gcc (alpha*-*-freebsd*): Remove.
11775         * config/alpha/freebsd.h: Remove.
11777 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
11779         PR other/69968
11780         * spellcheck-tree.c (levenshtein_distance): Rename to...
11781         (get_edit_distance): ...this, and update for underlying renaming.
11782         * spellcheck-tree.h (levenshtein_distance): Rename to...
11783         (get_edit_distance): ...this.
11784         * spellcheck.c (levenshtein_distance): Rename to...
11785         (get_edit_distance): ...this.  Convert from Levenshtein distance
11786         to Damerau-Levenshtein distance by supporting transpositions of
11787         adjacent characters.  Rename "v1" to "v_next" and "v0" to
11788         "v_one_ago".
11789         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
11790         (selftest::test_edit_distance_unit_test_oneway): ...this, and
11791         update for underlying renaming.
11792         (selftest::levenshtein_distance_unit_test): Rename to...
11793         (selftest::test_get_edit_distance_unit): ...this, and update for
11794         underlying renaming.
11795         (selftest::test_find_closest_string): Add example from PR 69968
11796         where transposition helps
11797         (selftest::test_metric_conditions): Update for renaming.
11798         (selftest::test_metric_conditions): Likewise.
11799         (selftest::spellcheck_c_tests): Likewise.
11800         * spellcheck.h (levenshtein_distance): Rename both overloads to...
11801         (get_edit_distance): ...this.
11802         (best_match::consider): Update for renaming.
11804 2018-06-12  Martin Sebor  <msebor@redhat.com>
11806         PR tree-optimization/85259
11807         * builtins.c (compute_objsize): Handle constant offsets.
11808         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
11809         true iff a warning has been issued.
11810         * gimple.h (gimple_nonartificial_location): New function.
11811         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
11812         gimple_nonartificial_location and handle -Wno-system-headers.
11813         (handle_builtin_stxncpy): Same.
11815 2018-06-12  Martin Sebor  <msebor@redhat.com>
11817         PR c/85931
11818         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
11820 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
11822         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
11823         BUILTIN_VEC_XST entries for pointer to double and long long.
11825 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
11827         PR target/85990
11828         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11829         Update comments.
11830         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11831         Likewise.
11833 2018-06-12  Martin Liska  <mliska@suse.cz>
11835         * doc/options.texi: Document IntegerRange.
11837 2018-06-12  Martin Liska  <mliska@suse.cz>
11839         * config/i386/i386.opt: Make MPX-related options as Deprecated.
11840         * opt-functions.awk: Handle Deprecated flag.
11841         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
11842         and report error.
11843         (read_cmdline_option): Report warning for a deprecated option.
11844         * opts.h (struct cl_option): Add new field cl_deprecated.
11845         (CL_ERR_DEPRECATED): New.
11847 2018-06-12  Martin Liska  <mliska@suse.cz>
11849         * doc/options.texi: Document Deprecated option flag.
11851 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11853         * config/arc/arc-arch.h (arc_extras): New enum.
11854         (arc_cpu_t):Add field extra.
11855         (arc_cpu_types): Consider the extras.
11856         * config/arc/arc-cpus.def: Add extras info.
11857         * config/arc/arc-opts.h (processor_type): Consider extra field.
11858         * config/arc/arc.c (arc_override_options): Handle extra field.
11860 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11862         * config/arc/arc-arch.h: Update ARC_OPTX macro.
11863         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
11864         field.
11865         * config/arc/arc.c (arc_init): Update pic warning.
11866         (irq_range): Update irq range parsing warnings.
11867         (arc_override_options): Update various warning messages.
11868         (arc_handle_aux_attribute): Likewise.
11870 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
11872         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
11874 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11876         * doc/sourcebuild.texi: Document usage of line number 0 in verify
11877         compiler messages directives.
11879 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
11881         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
11882         * config/mips/mips-tables.opt: Regenerate.
11883         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
11884         mips64r6.
11885         * doc/invoke.texi: Document -march=i6500.
11887 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
11889         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
11890         (i6400_gpmul): Add cpu_unit.
11891         (i6400_gpdiv): Likewise.
11892         (i6400_msa_add_d): Update reservations.
11893         (i6400_msa_int_add) Likewise.
11894         (i6400_msa_short_logic3) Likewise.
11895         (i6400_msa_short_logic2) Likewise.
11896         (i6400_msa_short_logic) Likewise.
11897         (i6400_msa_move) Likewise.
11898         (i6400_msa_cmp) Likewise.
11899         (i6400_msa_short_float2) Likewise.
11900         (i6400_msa_div_d) Likewise.
11901         (i6400_msa_long_logic1) Likewise.
11902         (i6400_msa_long_logic2) Likewise.
11903         (i6400_msa_mult) Likewise.
11904         (i6400_msa_long_float2) Likewise.
11905         (i6400_msa_long_float4) Likewise.
11906         (i6400_msa_long_float5) Likewise.
11907         (i6400_msa_long_float8) Likewise.
11908         (i6400_fpu_fadd): Include frint type.
11909         (i6400_fpu_store): New define_insn_reservation.
11910         (i6400_fpu_load): Likewise.
11911         (i6400_fpu_move): Likewise.
11912         (i6400_fpu_fcmp): Likewise.
11913         (i6400_fpu_fmadd): Likewise.
11914         (i6400_int_mult): Include imul3nc type and update reservation.
11915         (i6400_int_div): Include idiv3 type and update reservation.
11916         (i6400_int_load): Update to check type not move_type.
11917         (i6400_int_store): Likewise.
11918         (i6400_int_prefetch): Set zero latency.
11920 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
11922         * gcc.c: Document new %@{...} sequence.
11923         (LINK_COMMAND_SPEC): Use it for the -L switches.
11924         (cpp_unique_options): Use it for the -I switches.
11925         (at_file_argbuf): New global variable.
11926         (in_at_file): Likewise.
11927         (alloc_args): Create at_file_argbuf.
11928         (clear_args): Truncate at_file_argbuf.
11929         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
11930         (open_at_file): New function.
11931         (close_at_file): Likewise.
11932         (create_at_file): Delete.
11933         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
11934         <'o'>: Likewise.
11935         <'@'>: New case.
11936         (validate_switches_from_spec): Deal with %@{...} sequence.
11937         (validate_switches): Likewise.
11938         (driver::finalize): Call clear_args.
11940 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
11942         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
11944 2018-06-11  Martin Sebor  <msebor@redhat.com>
11946         * doc/invoke.texi (-Wall): List -Wc++17-compat.
11947         (Wno-class-memaccess): Add @opindex.
11948         (Wno-templates, Wno-multiple-inheritance): Same.
11949         (Wno-virtual-inheritance, Wno-namespaces): Same.
11950         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
11951         (Wno-format-overflow, Wno-format-truncation): Same.
11952         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
11953         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
11954         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
11955         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
11956         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
11957         (Wno-misspelled-isr): Same.
11959 2018-06-11  Martin Sebor  <msebor@redhat.com>
11961         * PR tree-optimization/86083
11962         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
11964 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
11966         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
11968 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
11970         PR target/85755
11971         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
11972         on the correct operand.
11973         (*movdi_internal64): Ditto.
11975 2018-06-11  Martin Liska  <mliska@suse.cz>
11977         PR tree-optimization/86089
11978         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
11980 2018-06-11  Julia Koval  <julia.koval@intel.com>
11982         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
11983         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
11984         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
11986 2018-06-11  Olivier Hainque  <hainque@adacore.com>
11988         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
11989         for Ada with strict dwarf2.
11991 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
11993         PR target/85755
11994         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
11995         addresses.
11997 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
11999         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
12001 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
12003         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
12004         TARGET_ELF.
12006 2018-06-08  Martin Liska  <mliska@suse.cz>
12008         * tree-cfg.h (debug_function): Fix argument type to match
12009         implementation.
12011 2018-06-08  Martin Liska  <mliska@suse.cz>
12013         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
12014         Remove usage of MPX-related (and removed) fields.
12015         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
12017 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
12019         * cfg.c (debug): Use TDF_NONE rather than 0.
12020         * cfghooks.c (debug): Likewise.
12021         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
12022         (struct dump_option_value_info): Convert to...
12023         (struct kv_pair): ...this template type.
12024         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
12025         rather than 0.
12026         (optinfo_verbosity_options): Likewise.
12027         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
12028         OPTGROUP_NONE.
12029         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
12030         than int for "optgroup_flags" param.
12031         (dump_generic_expr_loc): Use dump_flags_t rather than int for
12032         "dump_kind" param.
12033         (dump_dec): Likewise.
12034         (dump_finish): Use TDF_NONE rather than 0.
12035         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
12036         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
12037         than 0.  Update for change to option_ptr.
12038         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
12039         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
12040         0.  Update for changes to optinfo_verbosity_options and
12041         optgroup_options.
12042         (opt_info_switch_p): Convert optgroup_flags from int to
12043         optgroup_flags_t.
12044         (dump_basic_block): Use dump_flags_t rather than int
12045         for "dump_kind" param.
12046         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
12047         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
12048         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
12049         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
12050         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
12051         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
12052         TDF_NONE): Convert from macros to...
12053         (enum dump_flag): ...this new enum.
12054         (dump_flags_t): Update to use enum.
12055         (operator|, operator&, operator~, operator|=, operator&=):
12056         Implement for dump_flags_t.
12057         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
12058         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
12059         Convert from macros to...
12060         (enum optgroup_flag): ...this new enum.
12061         (optgroup_flags_t): New typedef.
12062         (operator|, operator|=): Implement for optgroup_flags_t.
12063         (struct dump_file_info): Convert field "alt_flags" to
12064         dump_flags_t.  Convert field "optgroup_flags" to
12065         optgroup_flags_t.
12066         (dump_basic_block): Use dump_flags_t rather than int for param.
12067         (dump_generic_expr_loc): Likewise.
12068         (dump_dec): Likewise.
12069         (dump_register): Convert param "optgroup_flags" to
12070         optgroup_flags_t.
12071         (opt_info_enable_passes): Likewise.
12072         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
12073         than 0.
12074         * gimple-pretty-print.c (debug): Likewise.
12075         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
12076         (merged_store_group::apply_stores): Likewise.
12077         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
12078         * gimple.c (verify_gimple_pp): Likewise.
12079         * graphite-poly.c (print_pbb_body): Likewise.
12080         * passes.c (pass_manager::register_one_dump_file): Convert
12081         local "optgroup_flags" to optgroup_flags_t.
12082         * print-tree.c (print_node): Use TDF_NONE rather than 0.
12083         (debug): Likewise.
12084         (debug_body): Likewise.
12085         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
12086         to optgroup_flags_t.
12087         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
12088         than 0.
12089         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
12090         (convert_mult_to_fma): Likewise.
12091         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
12092         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
12093         * tree-vect-data-refs.c (dump_lower_bound): Convert param
12094         "dump_kind" to dump_flags_t.
12096 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
12098         * config/rs6000/rs6000.c (min, max): Delete.
12100 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
12102         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
12103         -mabi=spe and -mabi=no-spe.
12105 2018-06-08  Martin Liska  <mliska@suse.cz>
12107         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
12108         where we expect an existing summary.
12110 2018-06-08  Martin Liska  <mliska@suse.cz>
12112         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
12113         * ipa-inline.h (estimate_edge_growth): Likewise.
12115 2018-06-08  Martin Liska  <mliska@suse.cz>
12117         * cgraph.c (function_version_hasher::hash): Use
12118         cgraph_node::get_uid ().
12119         (function_version_hasher::equal):
12120         * cgraph.h (cgraph_node::get_uid): New method.
12121         * ipa-inline.c (update_caller_keys): Use
12122         cgraph_node::get_uid ().
12123         (update_callee_keys): Likewise.
12124         * ipa-utils.c (searchc): Likewise.
12125         (ipa_reduced_postorder): Likewise.
12126         * lto-cgraph.c (input_node): Likewise.
12127         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
12128         * symbol-summary.h (symtab_insertion): Likewise.
12129         (symtab_removal): Likewise.
12130         (symtab_duplication): Likewise.
12131         * tree-pretty-print.c (dump_function_header): Likewise.
12132         * tree-sra.c (convert_callers_for_node): Likewise.
12134 2018-06-08  Martin Liska  <mliska@suse.cz>
12136         * cgraph.c (symbol_table::create_edge): Always assign a new
12137         unique number.
12138         (symbol_table::free_edge): Do not recycle numbers.
12139         * cgraph.h (cgraph_edge::get): New method.
12140         * symbol-summary.h (symtab_removal): Use it.
12141         (symtab_duplication): Likewise.
12142         (call_summary::hashable_uid): Remove.
12144 2018-06-08  Martin Liska  <mliska@suse.cz>
12146         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
12147         (initialize_growth_caches): Remove.
12148         (free_growth_caches): Likewise.
12149         (do_estimate_edge_time): Use edge_growth_cache.
12150         (do_estimate_edge_size): Likewise.
12151         (do_estimate_edge_hints): Likewise.
12152         * ipa-inline.c (reset_edge_caches): Likewise.
12153         (recursive_inlining): Likewise.
12154         (inline_small_functions): Likewise.
12155         * ipa-inline.h (initialize_growth_caches): Remove.
12156         (estimate_edge_size): Likewise.
12157         (estimate_edge_time): Likewise.
12158         (estimate_edge_hints): Likewise.
12159         (reset_edge_growth_cache): Likewise.
12160         * symbol-summary.h (call_summary::remove): New method.
12162 2018-06-08  Martin Liska  <mliska@suse.cz>
12164         * ipa-cp.c (class edge_clone_summary): New summary.
12165         (grow_edge_clone_vectors): Remove.
12166         (ipcp_edge_duplication_hook): Remove.
12167         (class edge_clone_summary_t): New call_summary class.
12168         (ipcp_edge_removal_hook): Remove.
12169         (edge_clone_summary_t::duplicate): New function.
12170         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
12171         (create_specialized_node): Likewise.
12172         (ipcp_driver): Initialize edge_clone_summaries and do not
12173         register hooks.
12175 2018-06-08  Martin Liska  <mliska@suse.cz>
12177         * symbol-summary.h (get): New function.
12178         (call_summary::m_initialize_when_cloning): New class member.
12180 2018-06-08  Martin Liska  <mliska@suse.cz>
12182         * cgraph.c (cgraph_node::remove): Do not recycle uid.
12183         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
12184         (symbol_table::allocate_cgraph_symbol): Do not set uid.
12185         * passes.c (uid_hash_t): Record removed_nodes by their uids.
12186         (remove_cgraph_node_from_order): Use the removed_nodes set.
12187         (do_per_function_toporder): Likwise.
12188         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
12189         instead of summary_uid.
12190         (symtab_removal): Likewise.
12191         (symtab_duplication): Likewise.
12193 2018-06-08  Martin Liska  <mliska@suse.cz>
12195         * ipa-cp.c (ipcp_store_bits_results): Use
12196         ipcp_transformation_sum.
12197         (ipcp_store_vr_results): Likewise.
12198         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
12199         to ...
12200         (ipcp_transformation_initialize): ... this.
12201         (ipa_set_node_agg_value_chain):
12202         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
12203         (write_ipcp_transformation_info): Likewise.
12204         (read_ipcp_transformation_info): Likewise.
12205         (ipcp_update_bits): Likewise.
12206         (ipcp_update_vr): Likewise.
12207         (ipcp_transform_function): Likewise.
12208         * ipa-prop.h: Rename ipcp_transformation_summary to
12209         ipcp_transformation.
12210         (class ipcp_transformation_t): New function summary.
12211         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
12212         (ipa_get_agg_replacements_for_node): Likewise.
12214 2018-06-08  Martin Liska  <mliska@suse.cz>
12216         * ipa-pure-const.c (struct funct_state_d): Do it class instead
12217         of struct.
12218         (class funct_state_summary_t): New function_summary class.
12219         (has_function_state): Remove.
12220         (get_function_state): Likewise.
12221         (set_function_state): Likewise.
12222         (add_new_function): Likewise.
12223         (funct_state_summary_t::insert): New function.
12224         (duplicate_node_data): Remove.
12225         (remove_node_data): Remove.
12226         (funct_state_summary_t::duplicate): New function.
12227         (register_hooks): Create new funct_state_summaries.
12228         (pure_const_generate_summary): Use it.
12229         (pure_const_write_summary): Likewise.
12230         (pure_const_read_summary): Likewise.
12231         (propagate_pure_const): Likewise.
12232         (propagate_nothrow): Likewise.
12233         (dump_malloc_lattice): Likewise.
12234         (propagate_malloc): Likewise.
12235         (execute): Do not register hooks, just remove summary
12236         instead.
12237         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
12238         constructor.
12240 2018-06-08  Martin Liska  <mliska@suse.cz>
12242         * ipa-reference.c (remove_node_data): Remove.
12243         (duplicate_node_data): Likewise.
12244         (class ipa_ref_var_info_summary_t): New class.
12245         (class ipa_ref_opt_summary_t): Likewise.
12246         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
12247         (get_reference_optimization_summary): Use
12248         ipa_ref_opt_sum_summaries.
12249         (set_reference_vars_info): Remove.
12250         (set_reference_optimization_summary): Likewise.
12251         (ipa_init): Create summaries.
12252         (init_function_info): Use function summary.
12253         (ipa_ref_opt_summary_t::duplicate): New function.
12254         (ipa_ref_opt_summary_t::remove): New function.
12255         (get_read_write_all_from_node): Fix GNU coding style.
12256         (propagate): Use function summary.
12257         (write_node_summary_p): Fix GNU coding style.
12258         (stream_out_bitmap): Likewise.
12259         (ipa_reference_read_optimization_summary): Use function summary.
12260         (ipa_reference_c_finalize): Do not release hooks.
12262 2018-06-08  Martin Liska  <mliska@suse.cz>
12264         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
12265         (analyze_function_body): Extract multiple calls of get_create.
12266         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12267         * ipa-inline.c (recursive_inlining): Use ::get method.
12268         * ipa-inline.h (estimate_edge_growth): Likewise.
12270 2018-06-08  Martin Liska  <mliska@suse.cz>
12272         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
12273         HSA_INVALID.
12274         (hsa_function_summary::hsa_function_summary): Use the new enum
12275         value.
12276         (hsa_gpu_implementation_p): Use hsa_summaries::get.
12277         * hsa-gen.c (hsa_get_host_function): Likewise.
12278         (get_brig_function_name): Likewise.
12279         * ipa-hsa.c (process_hsa_functions): Likewise.
12280         (ipa_hsa_write_summary): Likewise.
12281         * symbol-summary.h (symtab_duplication): Use ::get function/
12282         (get): New function.
12284 2018-06-08  Martin Liska  <mliska@suse.cz>
12286         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
12287         of get.
12288         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
12289         (hsa_register_kernel): Likewise.
12290         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
12291         * hsa-gen.c (hsa_get_host_function): Likewise.
12292         (get_brig_function_name): Likewise.
12293         (generate_hsa): Likewise.
12294         (pass_gen_hsail::execute): Likewise.
12295         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
12296         (devirtualization_time_bonus): Likewise.
12297         (ipcp_propagate_stage): Likewise.
12298         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12299         (edge_set_predicate): Likewise.
12300         (evaluate_conditions_for_known_args): Likewise.
12301         (evaluate_properties_for_edge): Likewise.
12302         (ipa_fn_summary::reset): Likewise.
12303         (ipa_fn_summary_t::duplicate): Likewise.
12304         (dump_ipa_call_summary): Likewise.
12305         (ipa_dump_fn_summary): Likewise.
12306         (analyze_function_body): Likewise.
12307         (compute_fn_summary): Likewise.
12308         (estimate_edge_devirt_benefit): Likewise.
12309         (estimate_edge_size_and_time): Likewise.
12310         (estimate_calls_size_and_time): Likewise.
12311         (estimate_node_size_and_time): Likewise.
12312         (inline_update_callee_summaries): Likewise.
12313         (remap_edge_change_prob): Likewise.
12314         (remap_edge_summaries): Likewise.
12315         (ipa_merge_fn_summary_after_inlining): Likewise.
12316         (ipa_update_overall_fn_summary): Likewise.
12317         (read_ipa_call_summary): Likewise.
12318         (inline_read_section): Likewise.
12319         (write_ipa_call_summary): Likewise.
12320         (ipa_fn_summary_write): Likewise.
12321         (ipa_free_fn_summary): Likewise.
12322         * ipa-hsa.c (process_hsa_functions): Likewise.
12323         (ipa_hsa_write_summary): Likewise.
12324         (ipa_hsa_read_section): Likewise.
12325         * ipa-icf.c (sem_function::merge): Likewise.
12326         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12327         (do_estimate_edge_time): Likewise.
12328         (estimate_size_after_inlining): Likewise.
12329         (estimate_growth): Likewise.
12330         (growth_likely_positive): Likewise.
12331         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12332         (inline_call): Likewise.
12333         * ipa-inline.c (caller_growth_limits): Likewise.
12334         (can_inline_edge_p): Likewise.
12335         (can_inline_edge_by_limits_p): Likewise.
12336         (compute_uninlined_call_time): Likewise.
12337         (compute_inlined_call_time): Likewise.
12338         (want_inline_small_function_p): Likewise.
12339         (edge_badness): Likewise.
12340         (update_caller_keys): Likewise.
12341         (update_callee_keys): Likewise.
12342         (recursive_inlining): Likewise.
12343         (inline_small_functions): Likewise.
12344         (inline_to_all_callers_1): Likewise.
12345         (dump_overall_stats): Likewise.
12346         (early_inline_small_functions): Likewise.
12347         (early_inliner): Likewise.
12348         * ipa-inline.h (estimate_edge_growth): Likewise.
12349         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12350         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12351         * ipa-prop.h (IPA_NODE_REF): Likewise.
12352         (IPA_EDGE_REF): Likewise.
12353         * ipa-pure-const.c (malloc_candidate_p): Likewise.
12354         (propagate_malloc): Likewise.
12355         * ipa-split.c (execute_split_functions): Likewise.
12356         * symbol-summary.h: Rename get to get_create.
12357         (get): Likewise.
12358         (get_create): Likewise.
12359         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12361 2018-06-08  Martin Liska  <mliska@suse.cz>
12363         * symbol-summary.h (release): Move definition out of class
12364         declaration.
12365         (symtab_removal): Likewise.
12366         (symtab_duplication): Likewise.
12368 2018-06-08  Martin Liska  <mliska@suse.cz>
12370         * symbol-summary.h (function_summary): Move constructor
12371         implementation out of class declaration.
12372         (release): Likewise.
12373         (symtab_insertion): Likewise.
12374         (symtab_removal): Likewise.
12375         (symtab_duplication): Likewise.
12376         (get): Likewise.
12378 2018-06-08  Martin Liska  <mliska@suse.cz>
12380         * Makefile.in: Remove support for MPX (macros, related functions,
12381         fields in cgraph_node, ...).
12382         * builtin-types.def (BT_BND): Likewise.
12383         (BT_FN_BND_CONST_PTR): Likewise.
12384         (BT_FN_CONST_PTR_BND): Likewise.
12385         (BT_FN_VOID_PTR_BND): Likewise.
12386         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
12387         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
12388         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
12389         (expand_builtin_mempcpy_with_bounds): Likewise.
12390         (expand_builtin_memset_with_bounds): Likewise.
12391         (expand_builtin_memset_args): Likewise.
12392         (std_expand_builtin_va_start): Likewise.
12393         (expand_builtin): Likewise.
12394         (expand_builtin_with_bounds): Likewise.
12395         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
12396         (DEF_LIB_BUILTIN_CHKP): Likewise.
12397         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
12398         (DEF_CHKP_BUILTIN): Likewise.
12399         (BUILT_IN_MEMCPY): Likewise.
12400         (BUILT_IN_MEMMOVE): Likewise.
12401         (BUILT_IN_MEMPCPY): Likewise.
12402         (BUILT_IN_MEMSET): Likewise.
12403         (BUILT_IN_STPCPY): Likewise.
12404         (BUILT_IN_STRCAT): Likewise.
12405         (BUILT_IN_STRCHR): Likewise.
12406         (BUILT_IN_STRCPY): Likewise.
12407         (BUILT_IN_STRLEN): Likewise.
12408         (BUILT_IN_MEMCPY_CHK): Likewise.
12409         (BUILT_IN_MEMMOVE_CHK): Likewise.
12410         (BUILT_IN_MEMPCPY_CHK): Likewise.
12411         (BUILT_IN_MEMSET_CHK): Likewise.
12412         (BUILT_IN_STPCPY_CHK): Likewise.
12413         (BUILT_IN_STRCAT_CHK): Likewise.
12414         (BUILT_IN_STRCPY_CHK): Likewise.
12415         * calls.c (store_bounds): Likewise.
12416         (emit_call_1): Likewise.
12417         (special_function_p): Likewise.
12418         (maybe_warn_nonstring_arg): Likewise.
12419         (initialize_argument_information): Likewise.
12420         (finalize_must_preallocate): Likewise.
12421         (compute_argument_addresses): Likewise.
12422         (expand_call): Likewise.
12423         * cfgexpand.c (expand_call_stmt): Likewise.
12424         (expand_return): Likewise.
12425         (expand_gimple_stmt_1): Likewise.
12426         (pass_expand::execute): Likewise.
12427         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
12428         (cgraph_node::remove): Likewise.
12429         (cgraph_node::dump): Likewise.
12430         (cgraph_node::verify_node): Likewise.
12431         * cgraph.h (chkp_function_instrumented_p): Likewise.
12432         (symtab_node::get_alias_target): Likewise.
12433         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
12434         (cgraph_local_p): Likewise.
12435         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
12436         (cgraph_edge::rebuild_references): Likewise.
12437         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
12438         (walk_polymorphic_call_targets): Likewise.
12439         (cgraph_node::expand_thunk): Likewise.
12440         (symbol_table::output_weakrefs): Likewise.
12441         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
12442         (ix86_handle_option): Likewise.
12443         * config/i386/constraints.md: Likewise.
12444         * config/i386/i386-builtin-types.def (BND): Likewise.
12445         (VOID): Likewise.
12446         (PVOID): Likewise.
12447         (ULONG): Likewise.
12448         * config/i386/i386-builtin.def (BDESC_END): Likewise.
12449         (BDESC_FIRST): Likewise.
12450         (BDESC): Likewise.
12451         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
12452         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
12453         * config/i386/i386.c (enum reg_class): Likewise.
12454         (ix86_target_string): Likewise.
12455         (ix86_option_override_internal): Likewise.
12456         (ix86_conditional_register_usage): Likewise.
12457         (ix86_valid_target_attribute_inner_p): Likewise.
12458         (ix86_set_indirect_branch_type): Likewise.
12459         (ix86_set_current_function): Likewise.
12460         (ix86_function_arg_regno_p): Likewise.
12461         (init_cumulative_args): Likewise.
12462         (ix86_function_arg_advance): Likewise.
12463         (ix86_function_arg): Likewise.
12464         (ix86_pass_by_reference): Likewise.
12465         (ix86_function_value_regno_p): Likewise.
12466         (ix86_function_value_1): Likewise.
12467         (ix86_function_value_bounds): Likewise.
12468         (ix86_return_in_memory): Likewise.
12469         (ix86_setup_incoming_vararg_bounds): Likewise.
12470         (ix86_va_start): Likewise.
12471         (indirect_thunk_need_prefix): Likewise.
12472         (print_reg): Likewise.
12473         (ix86_print_operand): Likewise.
12474         (ix86_expand_call): Likewise.
12475         (ix86_output_function_return): Likewise.
12476         (reg_encoded_number): Likewise.
12477         (BDESC_VERIFYS): Likewise.
12478         (ix86_init_mpx_builtins): Likewise.
12479         (ix86_init_builtins): Likewise.
12480         (ix86_emit_cmove): Likewise.
12481         (ix86_emit_move_max): Likewise.
12482         (ix86_expand_builtin): Likewise.
12483         (ix86_builtin_mpx_function): Likewise.
12484         (ix86_get_arg_address_for_bt): Likewise.
12485         (ix86_load_bounds): Likewise.
12486         (ix86_store_bounds): Likewise.
12487         (ix86_load_returned_bounds): Likewise.
12488         (ix86_store_returned_bounds): Likewise.
12489         (ix86_class_likely_spilled_p): Likewise.
12490         (ix86_hard_regno_mode_ok): Likewise.
12491         (x86_order_regs_for_local_alloc): Likewise.
12492         (ix86_mitigate_rop): Likewise.
12493         (ix86_bnd_prefixed_insn_p): Likewise.
12494         (ix86_mpx_bound_mode): Likewise.
12495         (ix86_make_bounds_constant): Likewise.
12496         (ix86_initialize_bounds): Likewise.
12497         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
12498         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
12499         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
12500         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
12501         (TARGET_CHKP_BOUND_MODE): Likewise.
12502         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
12503         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
12504         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
12505         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
12506         * config/i386/i386.h (TARGET_MPX): Likewise.
12507         (TARGET_MPX_P): Likewise.
12508         (VALID_BND_REG_MODE): Likewise.
12509         (FIRST_BND_REG): Likewise.
12510         (LAST_BND_REG): Likewise.
12511         (enum reg_class): Likewise.
12512         (BND_REG_P): Likewise.
12513         (BND_REGNO_P): Likewise.
12514         (BNDmode): Likewise.
12515         (ADJUST_INSN_LENGTH): Likewise.
12516         * config/i386/i386.md: Likewise.
12517         * config/i386/i386.opt: Likewise.
12518         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
12519         (defined): Likewise.
12520         (LINK_MPX): Likewise.
12521         (MPX_SPEC): Likewise.
12522         (LIBMPX_SPEC): Likewise.
12523         (LIBMPXWRAPPERS_SPEC): Likewise.
12524         (CHKP_SPEC): Likewise.
12525         * config/i386/predicates.md: Likewise.
12526         * dbxout.c (dbxout_type): Likewise.
12527         * doc/extend.texi: Likewise.
12528         * doc/invoke.texi: Likewise.
12529         * doc/md.texi: Likewise.
12530         * doc/tm.texi: Likewise.
12531         * doc/tm.texi.in: Likewise.
12532         * dwarf2out.c (is_base_type): Likewise.
12533         (gen_formal_types_die): Likewise.
12534         (gen_subprogram_die): Likewise.
12535         (gen_type_die_with_usage): Likewise.
12536         (gen_decl_die): Likewise.
12537         (dwarf2out_late_global_decl): Likewise.
12538         * expr.c (expand_assignment): Likewise.
12539         (emit_storent_insn): Likewise.
12540         (store_expr_with_bounds): Likewise.
12541         (store_expr): Likewise.
12542         (expand_expr_real_1): Likewise.
12543         * expr.h (store_expr_with_bounds): Likewise.
12544         * function.c (use_register_for_decl): Likewise.
12545         (struct bounds_parm_data): Likewise.
12546         (assign_parms_augmented_arg_list): Likewise.
12547         (assign_parm_find_entry_rtl): Likewise.
12548         (assign_parm_is_stack_parm): Likewise.
12549         (assign_parm_load_bounds): Likewise.
12550         (assign_bounds): Likewise.
12551         (assign_parms): Likewise.
12552         (expand_function_start): Likewise.
12553         * gcc.c (CHKP_SPEC): Likewise.
12554         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
12555         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
12556         (wrestrict_dom_walker::check_call): Likewise.
12557         * gimple.c (gimple_build_call_from_tree): Likewise.
12558         * gimple.h (enum gf_mask): Likewise.
12559         (gimple_call_with_bounds_p): Likewise.
12560         (gimple_call_set_with_bounds): Likewise.
12561         * gimplify.c (gimplify_init_constructor): Likewise.
12562         * ipa-cp.c (initialize_node_lattices): Likewise.
12563         (propagate_constants_across_call): Likewise.
12564         (find_more_scalar_values_for_callers_subset): Likewise.
12565         * ipa-hsa.c (process_hsa_functions): Likewise.
12566         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
12567         * ipa-icf.c (sem_function::merge): Likewise.
12568         * ipa-inline.c (early_inliner): Likewise.
12569         * ipa-pure-const.c (warn_function_noreturn): Likewise.
12570         (warn_function_cold): Likewise.
12571         (propagate_pure_const): Likewise.
12572         * ipa-ref.h (enum GTY): Likewise.
12573         * ipa-split.c (find_retbnd): Likewise.
12574         (consider_split): Likewise.
12575         (split_function): Likewise.
12576         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
12577         * ipa.c (walk_polymorphic_call_targets): Likewise.
12578         (symbol_table::remove_unreachable_nodes): Likewise.
12579         (process_references): Likewise.
12580         (cgraph_build_static_cdtor_1): Likewise.
12581         * lto-cgraph.c (lto_output_node): Likewise.
12582         (output_refs): Likewise.
12583         (compute_ltrans_boundary): Likewise.
12584         (input_overwrite_node): Likewise.
12585         (input_node): Likewise.
12586         (input_cgraph_1): Likewise.
12587         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
12588         * passes.c (pass_manager::execute_early_local_passes): Likewise.
12589         (class pass_chkp_instrumentation_passes): Likewise.
12590         (make_pass_chkp_instrumentation_passes): Likewise.
12591         * passes.def: Likewise.
12592         * rtl.h (struct GTY): Likewise.
12593         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
12594         * stor-layout.c (layout_type): Likewise.
12595         * symtab.c: Likewise.
12596         * target.def: Likewise.
12597         * targhooks.c (default_chkp_bound_type): Likewise.
12598         (default_chkp_bound_mode): Likewise.
12599         (default_builtin_chkp_function): Likewise.
12600         (default_chkp_function_value_bounds): Likewise.
12601         (default_chkp_make_bounds_constant): Likewise.
12602         (default_chkp_initialize_bounds): Likewise.
12603         * targhooks.h (default_chkp_bound_type): Likewise.
12604         (default_chkp_bound_mode): Likewise.
12605         (default_builtin_chkp_function): Likewise.
12606         (default_chkp_function_value_bounds): Likewise.
12607         (default_chkp_make_bounds_constant): Likewise.
12608         (default_chkp_initialize_bounds): Likewise.
12609         * toplev.c (compile_file): Likewise.
12610         (process_options): Likewise.
12611         * tree-core.h (DEF_BUILTIN): Likewise.
12612         (DEF_BUILTIN_CHKP): Likewise.
12613         * tree-inline.c (declare_return_variable): Likewise.
12614         (remap_gimple_stmt): Likewise.
12615         (copy_bb): Likewise.
12616         (initialize_inlined_parameters): Likewise.
12617         (expand_call_inline): Likewise.
12618         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
12619         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
12620         (make_pass_ipa_chkp_produce_thunks): Likewise.
12621         (make_pass_chkp): Likewise.
12622         (make_pass_chkp_opt): Likewise.
12623         (make_pass_chkp_instrumentation_passes): Likewise.
12624         * tree-pretty-print.c (dump_generic_node): Likewise.
12625         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
12626         * tree-ssa-dce.c (propagate_necessity): Likewise.
12627         (eliminate_unnecessary_stmts): Likewise.
12628         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
12629         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
12630         * tree-ssa-sccvn.h: Likewise.
12631         * tree-ssa-strlen.c (get_string_length): Likewise.
12632         (valid_builtin_call): Likewise.
12633         (adjust_last_stmt): Likewise.
12634         (handle_builtin_strchr): Likewise.
12635         (handle_builtin_strcpy): Likewise.
12636         (handle_builtin_stxncpy): Likewise.
12637         (handle_builtin_memcpy): Likewise.
12638         (handle_builtin_strcat): Likewise.
12639         (strlen_check_and_optimize_stmt): Likewise.
12640         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
12641         * tree-streamer-in.c: Likewise.
12642         * tree-streamer.c (record_common_node): Likewise.
12643         * tree.c (tree_code_size): Likewise.
12644         (wide_int_to_tree_1): Likewise.
12645         (type_contains_placeholder_1): Likewise.
12646         (build_common_tree_nodes): Likewise.
12647         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
12648         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
12649         (POINTER_BOUNDS_P): Likewise.
12650         (BOUNDED_TYPE_P): Likewise.
12651         (BOUNDED_P): Likewise.
12652         (CALL_WITH_BOUNDS_P): Likewise.
12653         (pointer_bounds_type_node): Likewise.
12654         * value-prof.c (gimple_ic): Likewise.
12655         * var-tracking.c (vt_add_function_parameters): Likewise.
12656         * varasm.c (make_decl_rtl): Likewise.
12657         (assemble_start_function): Likewise.
12658         (output_constant): Likewise.
12659         (maybe_assemble_visibility): Likewise.
12660         * varpool.c (ctor_for_folding): Likewise.
12661         * chkp-builtins.def: Remove.
12662         * ipa-chkp.c: Remove.
12663         * ipa-chkp.h: Remove.
12664         * rtl-chkp.c: Remove.
12665         * rtl-chkp.h: Remove.
12666         * tree-chkp-opt.c: Remove.
12667         * tree-chkp.c: Remove.
12668         * tree-chkp.h: Remove.
12670 2018-06-07  Carl Love  <cel@us.ibm.com>
12672         * config/rs6000/vsx.md (vextract_fp_from_shorth,
12673         vextract_fp_from_shortl): Add BE support.
12675 2018-06-07  Paul Koning  <ni1d@arrl.net>
12677         * compare-elim.c (try_merge_compare): Don't merge compare if
12678         address contains a side effect.
12679         (try_eliminate_compare): Likewise.
12681 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
12683         * config.gcc: Support "tremont".
12684         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
12685         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12686         PROCESSOR_TREMONT.
12687         * config/i386/i386.c (m_TREMONT): Define.
12688         (processor_target_table): Add "tremont".
12689         (PTA_TREMONT): Define.
12690         (ix86_lea_outperforms): Add TARGET_TREMONT.
12691         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
12692         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
12693         and M_INTEL_GOLDMONT_PLUS.
12694         (fold_builtin_cpu): Add "tremont".
12695         (ix86_add_stmt_cost): Add TARGET_TREMONT.
12696         (ix86_option_override_internal): Add "tremont".
12697         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
12698         (processor_type): Add PROCESSOR_TREMONT.
12699         * config/i386/x86-tune.def: Add m_TREMONT.
12700         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
12702 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12704         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
12705         symbol defined for msp430i* devices to be lower case.
12707 2018-06-07  Richard Biener  <rguenther@suse.de>
12709         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
12710         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
12711         Properly wrap signed arithmetic if overflow wraps.
12713 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
12715         PR tree-optimization/69615
12716         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
12717         of a cast from a same precision integral SSA_NAME in a bb dominated
12718         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
12719         cast to utype if rhs2 has already a compatible type.
12721 2018-06-07  Richard Biener  <rguenther@suse.de>
12723         PR tree-optimization/85935
12724         * graphite-scop-detection.c (find_params_in_bb): Analyze
12725         condition operands with respect to the correct loop.  Assert
12726         the analysis doesn't fail.
12728 2018-06-04  Carl Love  <cel@us.ibm.com>
12730         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
12731         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
12732         as it is slightly cheaper.
12733         (first_match_or_eos_index_<mode>):
12734         Calculate index using natural element order.
12735         (first_match_index_<mode>):
12736         Calculate index using natural element order.
12737         (first_match_or_eos_index_<mode>):
12738         Calculate index using natural order.
12739         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
12740         for BE and LE modes.
12741         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
12742         P9V_BUILTIN_VCLZLSBB_V16QI.
12743         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
12744         specific.
12746 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12748         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
12749         indentation and line wrap for many prototypes.  Add missing
12750         @smallexample directives around block of prototypes for vec_xl and
12751         vec_xst.
12753 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
12755         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
12756         track if we pass or return IEEE 128-bit floating point.
12757         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
12758         C++ mangling that is compatible with GCC 8.1.
12759         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
12760         (init_cumulative_args): Note if we pass or return IEEE 128-bit
12761         floating point types.
12762         (rs6000_function_arg_advance_1): Likewise.
12763         (rs6000_mangle_type): Optionally generate mangled names that match
12764         what GCC 8.1 generated for IEEE 128-bit floating point types.
12765         (rs6000_globalize_decl_name): If we have an external function that
12766         passes or returns IEEE 128-bit types, generate a weak reference
12767         from the mangled name used in GCC 8.1 to the current mangled
12768         name.
12769         (rs6000_init_builtins): Make __ibm128 use the long double type if
12770         long double is IBM extended double.  Make __float128 use the long
12771         double type if long double is IEEE 128-bit.
12773         PR target/85657
12774         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
12775         macro for __ibm128 built-in functions.
12776         (PACK_IF): Add __ibm128 pack/unpack functions.
12777         (UNPACK_IF): Likewise.
12778         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
12779         enable long double built-in functions if long double is IEEE
12780         128-bit floating point.
12781         (rs6000_invalid_builtin): Update long double built-in function
12782         error message.
12783         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
12784         functions, adjust the built-in function to use the long double
12785         built-in function if __ibm128 and long double are the same type.
12786         * doc/extend.texi (PowerPC builtins): Update documention for
12787         __builtin_{,un}pack_longdouble.  Add documentation for
12788         __builtin_{,un}pack_ibm128.
12790 2018-06-06  Jim Wilson  <jimw@sifive.com>
12792         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
12793         (struct machine_function): New field interrupt_mode.
12794         (riscv_handle_type_attribute): New function.  Add forward declaration.
12795         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
12796         (riscv_expand_epilogue): Check interrupt_mode field.
12797         (riscv_set_current_function): Check interrupt attribute args and
12798         set interrupt_mode field.
12799         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
12800         (riscv_sret, riscv_uret): New.
12801         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
12802         new arguments to interrupt attribute.
12804 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
12806         PR target/63177
12807         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
12808         Don't handle -mcpu=power8 if -mpower9-vector is also used.
12810 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12812         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
12813         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
12814         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12815         several redundant entries.
12817 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
12819         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
12820         type from "rtx" to "rtx_insn *".
12821         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
12822         for local "call_insn", removing cast.
12823         (ix86_expand_call): Likewise, introducing a "call_insn" local.
12825 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12827         PR tree-optimization/86066
12828         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
12829         for BIT_INSERT_EXPR stores.
12831 2018-06-06  Richard Biener  <rguenther@suse.de>
12833         PR tree-optimization/86062
12834         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12835         component refs ontop
12836         of to be offsetted base.
12838 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12840         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
12841         to be static and remove check on interrupt attribute name.
12843 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12845         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
12846         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
12848 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
12850         PR target/79924
12851         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
12852         second argument.
12853         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
12854         Remove second argument, change how error is called.
12855         (aarch64_layout_arg): Remove second argument from
12856         aarch64_err_no_fpadvsimd call.
12857         (aarch64_init_cumulative_args): Ditto.
12858         (aarch64_gimplify_va_arg_expr): Ditto.
12859         * config/aarch64/aarch64.md (mov<mode>): Ditto.
12861 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
12863         * config/i386/i386.md (simple_return_indirect_internal): New expander.
12864         (*simple_return_indirect_internal<mode>): Rename from
12865         simple_return_indirect_internal.  Use W mode iterator.
12866         (rstorssp): New expander.
12867         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
12868         (clrssbsy): New expander.
12869         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
12871 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12873         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
12874         __typeof__.
12875         (cmse_check_pointed_object): Likewise.
12877 2018-06-05  Martin Liska  <mliska@suse.cz>
12879         PR gcov-profile/47618
12880         * doc/invoke.texi: Document how -fprofile-dir format
12881         is extended.
12883 2018-06-05  Richard Biener  <rguenther@suse.de>
12885         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
12886         removal pretend DOM info isn't available so we do not update
12887         it and only remove edges, not dominated blocks.  Actually free
12888         DOM info in case we removed something.  Remove unreachable blocks.
12889         (mfb_keep_latches): Work with either DOM info or marked backedges.
12890         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
12891         first.  Mark backedges if DOM info isn't available.
12892         (Re-)compute DOM info after cleanup_control_flow_pre.
12894 2018-06-05  Richard Biener  <rguenther@suse.de>
12896         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
12897         (locus_discrim_hasher::hash): Adjust.
12898         (locus_discrim_hasher::equal): Likewise.
12899         (next_discriminator_for_locus): Work on line directly.
12900         (same_line_p): Pass in expanded locus1 as well.
12901         (assign_discriminators): Avoid redundant location expansions.
12903 2018-06-05  Richard Biener  <rguenther@suse.de>
12905         PR tree-optimization/86046
12906         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
12907         if required after clearing TREE_ADDRESSABLE.
12909 2018-06-05  Richard Biener  <rguenther@suse.de>
12911         PR tree-optimization/86047
12912         * tree-ssa-loop.c (for_each_index): Glob handling of all
12913         decls and constants and really handle all of them.
12915 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12917         PR target/81497
12918         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
12919         qualifier_void_pointer and qualifier_const_void_pointer.
12920         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
12921         (arm_init_builtins): Handle the above.
12922         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
12923         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
12924         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
12925         void intrinsics.
12927 2018-06-05  Martin Liska  <mliska@suse.cz>
12929         * auto-profile.c (read_autofdo_file): Do not use
12930         gcov_ctr_summary struct.
12931         (afdo_callsite_hot_enough_for_early_inline): Likewise.
12932         * coverage.c (struct counts_entry): Likewise.
12933         (read_counts_file): Read just single summary entry.
12934         (get_coverage_counts): Use gcov_summary struct.
12935         * coverage.h (get_coverage_counts): Likewise.
12936         * gcov-dump.c (dump_working_sets): Likewise.
12937         (tag_summary): Dump just single summary.
12938         * gcov-io.c (gcov_write_summary): Write just histogram
12939         summary.
12940         (gcov_read_summary): Read just single summary.
12941         (compute_working_sets): Use gcov_summary struct.
12942         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
12943         of GCOV_COUNTERS_SUMMABLE.
12944         (GCOV_COUNTERS_SUMMABLE): Remove.
12945         (GCOV_FIRST_VALUE_COUNTER): Replace with
12946         GCOV_COUNTER_V_INTERVAL.
12947         (struct gcov_ctr_summary): Remove.
12948         (struct gcov_summary): Directly use fields of former
12949         gcov_ctr_summary.
12950         (compute_working_sets): Use gcov_summary struct.
12951         * gcov.c (read_count_file): Do not use ctrs fields.
12952         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
12953         struct.
12954         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
12955         struct.
12956         * profile.c: Likewise.
12957         * profile.h: Likewise.
12959 2018-06-05  Martin Liska  <mliska@suse.cz>
12961         PR gcov-profile/84846
12962         * gcov.c (output_lines): Print working directory only
12963         in intermediate format.
12965 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
12967         * config/s390/s390-builtin-types.def: Add void function type.
12968         * config/s390/s390-builtins.def: Use the function type for the
12969         tbeginc builtin.
12971 2018-06-04  Jim Wilson  <jimw@sifive.com>
12973         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
12974         to int.
12975         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
12976         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
12977         handle EH_RETURN_DATA_REGNO registers properly.
12978         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
12979         (riscv_expand_epilogue): Update comment.  Change argument name and
12980         type.  Update code to use new name and type.  Pass new args to
12981         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
12982         EXCEPTION_RETURN.
12983         * config/riscv/riscv.md (NORMAL_RETURN): New.
12984         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
12985         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
12986         (eh_return): Call gen_eh_return_internal and emit barrier.
12987         (eh_return_internal): Call riscv_expand_epilogue.
12989 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
12991         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
12992         bit_insertion field and declare can_be_merged_into method.
12993         (merged_store_group::can_be_merged_into): New method.
12994         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
12995         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
12996         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
12998 2018-06-04  Richard Biener  <rguenther@suse.de>
13000         PR tree-optimization/85955
13001         * builtins.c (fold_builtin_sincos): Convert pointers to
13002         destination to appropriate type before dereferencing.
13004 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
13006         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
13008 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
13010         * expr.c (expand_expr_real_1): Force the operand into memory if
13011         its TYPE_MODE is BLKmode and if there is no integer mode for
13012         the number of bits being extracted.
13014 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
13016         PR target/85832
13017         PR target/86036
13018         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13019         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
13021 2018-06-04  Richard Biener  <rguenther@suse.de>
13023         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
13024         (cleanup_tree_cfg_noloop): ... single caller.  Do
13025         start_recording_case_labels later.
13027 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
13029         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
13030         to _IMMINTRIN_H_INCLUDED.
13031         * config/i386/pconfigintrin.h: Ditto.
13032         * config/i386/waitpkgintrin.h: Ditto.
13033         * config/i386/immintrin.h: Add includes for sgxintrin.h,
13034         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
13035         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
13036         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
13037         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
13038         waitpkgintrin.h and cldemoteintrin.h.
13040 2018-06-04  Richard Biener  <rguenther@suse.de>
13042         PR tree-optimization/86038
13043         * tracer.c (find_best_successor): Check probability for
13044         being initialized, bail out if not.
13046 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
13048         PR target/86003
13049         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
13050         of bits to ignore when comparing architectures.
13052 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
13054         PR tree-optimization/69615
13055         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
13056         maximum or minimum of the type, try to merge it also as if
13057         range1 is + [-, x - 1] or + [x + 1, -].
13059         PR c++/86025
13060         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
13062 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
13064         PR tree-optimization/86034
13065         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
13066         the unsigned bitfield type in a bit insertion sequence if it does not
13067         have a larger precision than the bitfield size.
13068         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
13070 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
13072         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
13074 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
13076         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
13077         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
13078         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
13079         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
13081 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
13083         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
13084         Disable -fdelete-null-pointer-checks for ELF toolchain.
13086 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13087             Kito Cheng  <kito.cheng@gmail.com>
13089         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
13090         (nds32le-*-*, nds32be-*-*): Integrate checking process.
13091         (nds32*-*-*): Add glibc and uclibc conditions.
13092         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
13093         (TARGET_EXCEPT_UNWIND_INFO): Define.
13094         * config/nds32/elf.h: New file.
13095         * config/nds32/linux.h: New file.
13096         * config/nds32/nds32-elf.opt: New file.
13097         * config/nds32/nds32-linux.opt: New file.
13098         * config/nds32/nds32-fp-as-gp.c
13099         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
13100         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
13101         TARGET_LINUX_ABI.
13102         (nds32_asm_file_end): Ditto.
13103         (nds32_print_operand): Ditto.
13104         (nds32_insert_attributes): Ditto.
13105         (nds32_init_libfuncs): New function.
13106         (TARGET_HAVE_TLS): Define.
13107         (TARGET_INIT_LIBFUNCS): Define.
13108         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
13109         spec content.
13110         (TARGET_ELF): Apply different mcmodel setting.
13111         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
13112         been migrated into elf.h and linux.h files.
13113         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
13114         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
13115         (mcmodel): The content has been migrated into nds32-elf.opt and
13116         nds32-linux.opt files.
13117         * config/nds32/t-elf: New file.
13118         * config/nds32/t-linux: New file.
13120 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13121             Shiva Chen  <shiva0217@gmail.com>
13123         * config/nds32/constants.md (unspec_volatile_element): Add
13124         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
13125         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
13126         optimization.
13127         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
13128         (make_pass_nds32_fp_as_gp): Declare.
13129         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
13130         optmization pass.
13131         (nds32_asm_function_end_prologue): Remove unused asm output.
13132         (nds32_asm_function_begin_epilogue): Remove unused asm output.
13133         (nds32_asm_file_start): Output necessary fp_as_gp information.
13134         (nds32_option_override): Adjust register usage.
13135         (nds32_expand_prologue): Consider fp_as_gp situation.
13136         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
13137         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
13138         (epilogue): Ditto.
13139         (return): Ditto.
13140         (simple_return): Ditto.
13141         (omit_fp_begin): Output special directive for fp_as_gp.
13142         (omit_fp_end): Output special directive for fp_as_gp.
13143         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
13144         mforbid-fp-as-gp): New options.
13146 2018-06-01  Mark Wielaard  <mark@klomp.org>
13148         * dwarf2out.c (dwarf2out_finish): Remove generation of
13149         DW_AT_loclists_base.
13151 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
13153         * gimple-ssa-store-merging.c: Include gimple-fold.h.
13154         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
13155         (struct merged_store_group): Add bit_insertion field.
13156         (dump_char_array): Use standard hexadecimal format.
13157         (merged_store_group::merged_store_group): Set bit_insertion to false.
13158         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
13159         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
13160         also print the mask in the dump file.
13161         (pass_store_merging::gate): Minor tweak.
13162         (imm_store_chain_info::coalesce_immediate): Fix wrong association
13163         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
13164         stores with INTEGER_CST stores.
13165         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
13166         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
13167         and use it throughout.  Generate bit insertion sequences if need be.
13168         (pass_store_merging::process_store): Remove redundant condition.
13169         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
13171 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
13173         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
13174         the 128-bit floating point types.  Fix function comment.
13176 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13178         * config/aarch64/aarch64-simd.md
13179         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
13180         mnemonics.
13181         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
13182         mnemonics.
13184 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
13186         PR tree-optimization/85989
13187         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
13188         variable.
13189         (backprop::intersect_uses): Check it when deciding whether this
13190         is a backedge reference.
13191         (backprop::process_block): Add each phi to m_visited_phis
13192         after visiting it, then clear it at the end.
13194 2018-06-01  Richard Biener  <rguenther@suse.de>
13196         * tree-vectorizer.h (vect_dr_stmt): New function.
13197         (vect_get_load_cost): Adjust.
13198         (vect_get_store_cost): Likewise.
13199         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
13200         Use vect_dr_stmt instead of DR_SMTT.
13201         (vect_record_base_alignments): Likewise.
13202         (vect_calculate_target_alignment): Likewise.
13203         (vect_compute_data_ref_alignment): Likewise and make static.
13204         (vect_update_misalignment_for_peel): Likewise.
13205         (vect_verify_datarefs_alignment): Likewise.
13206         (vector_alignment_reachable_p): Likewise.
13207         (vect_get_data_access_cost): Likewise.  Pass down
13208         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
13209         (vect_get_peeling_costs_all_drs): Likewise.
13210         (vect_peeling_hash_get_lowest_cost): Likewise.
13211         (vect_enhance_data_refs_alignment): Likewise.
13212         (vect_find_same_alignment_drs): Likewise.
13213         (vect_analyze_data_refs_alignment): Likewise.
13214         (vect_analyze_group_access_1): Likewise.
13215         (vect_analyze_group_access): Likewise.
13216         (vect_analyze_data_ref_access): Likewise.
13217         (vect_analyze_data_ref_accesses): Likewise.
13218         (vect_vfa_segment_size): Likewise.
13219         (vect_small_gap_p): Likewise.
13220         (vectorizable_with_step_bound_p): Likewise.
13221         (vect_prune_runtime_alias_test_list): Likewise.
13222         (vect_analyze_data_refs): Likewise.
13223         (vect_supportable_dr_alignment): Likewise.
13224         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13225         (vect_gen_prolog_loop_niters): Likewise.
13226         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13227         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
13228         modify DR_STMT.
13229         (vect_recog_mask_conversion_pattern): Likewise.
13230         (vect_try_gather_scatter_pattern): Likewise.
13231         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
13232         to vect_get_store_cost.
13233         (vect_get_store_cost): Get stmt_info instead of DR.
13234         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
13235         (vect_get_load_cost): Get stmt_info instead of DR.
13237 2018-06-01  Richard Biener  <rguenther@suse.de>
13239         PR middle-end/86017
13240         * gimple-fold.c (var_decl_component_p): Also allow offsetted
13241         vars wrapped in MEM_REFs.
13243 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
13245         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13246         Fix subreg tests so that we only return a choice between
13247         GENERAL_REGS and FP_REGS if the original classes included both.
13249 2018-06-01  Richard Biener  <rguenther@suse.de>
13251         PR ipa/85960
13252         * tree-ssa-structalias.c (get_function_part_constraint):
13253         Handle NULL fi->decl.
13254         (find_func_aliases_for_call): Properly handle indirect
13255         fi from direct call.
13256         (find_func_clobbers): Likewise.
13257         (ipa_pta_execute): Likewise.
13258         (create_variable_info_for): For functions that are ifunc_resolver
13259         resolve to a varinfo that contains the result of the resolver call.
13260         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
13261         aliases.
13263 2018-05-31  Michael Collison  <michael.collison@arm.com>
13265         * config/aarch64/aarch64.md:
13266         (*fix_to_zero_extenddfdi2): New pattern.
13267         * gcc.target/aarch64/fix_extend1.c: New testcase.
13269 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
13271         PR middle-end/78809
13272         PR middle-end/83026
13273         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
13274         and BUILT_IN_STRNCMP_EQ.
13275         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
13276         BUILT_IN_STRNCMP_EQ.
13277         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
13278         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13279         (gimple_fold_builtin): Likewise.
13280         * tree-ssa-strlen.c (compute_string_length): New function.
13281         (determine_min_obsize): New function.
13282         (handle_builtin_string_cmp): New function to handle calls to
13283         string compare functions.
13284         (strlen_optimize_stmt): Add handling to builtin string compare
13285         calls.
13286         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
13287         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13288         * tree.c (build_common_builtin_nodes): Add new defines of
13289         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
13291 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
13293         PR target/85984
13294         * bb-reorder.c (pass_partition_blocks::gate): Return false for
13295         functions with naked attribute.
13297 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
13299         * config/i386/sse.md (avx_vec_concat<mode>):
13300         Substitute concat_tg_mode mode attribute with xtg_mode.
13301         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
13302         (concat_tg_mode): Remove mode attribute.
13304 2018-05-31  Martin Sebor  <msebor@redhat.com>
13306         PR c/82063
13307         * calls.c (alloc_max_size): Correct a logic error/typo.
13308         Treat excessive arguments as infinite.  Warn for invalid arguments.
13309         * doc/invoke.texi (-Walloc-size-larger-than): Update.
13311 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
13313         PR target/85829
13314         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
13315         and movx for Haswell.
13317 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
13318             Cesar Philippidis  <cesar@codesourcery.com>
13320         PR middle-end/85879
13321         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
13322         when emitting error on private/firstprivate reductions.
13323         * omp-low.c (lower_omp_target): Avoid reference-type processing
13324         on pointers for firstprivate clause.
13326 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
13328         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
13329         (st1x2): Likewise.
13330         (st1x3): Likewise.
13331         * config/aarch64/aarch64-simd.md
13332         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
13333         (aarch64_ld1_x3_<mode>): Likewise
13334         (aarch64_st1x2<VALLDIF:mode>): Likewise
13335         (aarch64_st1_x2_<mode>): Likewise
13336         (aarch64_st1x3<VALLDIF:mode>): Likewise
13337         (aarch64_st1_x3_<mode>): Likewise
13338         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
13339         (vld1_s8_x3): Likewise.
13340         (vld1_u16_x3): Likewise.
13341         (vld1_s16_x3): Likewise.
13342         (vld1_u32_x3): Likewise.
13343         (vld1_s32_x3): Likewise.
13344         (vld1_u64_x3): Likewise.
13345         (vld1_s64_x3): Likewise.
13346         (vld1_f16_x3): Likewise.
13347         (vld1_f32_x3): Likewise.
13348         (vld1_f64_x3): Likewise.
13349         (vld1_p8_x3): Likewise.
13350         (vld1_p16_x3): Likewise.
13351         (vld1_p64_x3): Likewise.
13352         (vld1q_u8_x3): Likewise.
13353         (vld1q_s8_x3): Likewise.
13354         (vld1q_u16_x3): Likewise.
13355         (vld1q_s16_x3): Likewise.
13356         (vld1q_u32_x3): Likewise.
13357         (vld1q_s32_x3): Likewise.
13358         (vld1q_u64_x3): Likewise.
13359         (vld1q_s64_x3): Likewise.
13360         (vld1q_f16_x3): Likewise.
13361         (vld1q_f32_x3): Likewise.
13362         (vld1q_f64_x3): Likewise.
13363         (vld1q_p8_x3): Likewise.
13364         (vld1q_p16_x3): Likewise.
13365         (vld1q_p64_x3): Likewise.
13366         (vst1_s64_x2): Likewise.
13367         (vst1_u64_x2): Likewise.
13368         (vst1_f64_x2): Likewise.
13369         (vst1_s8_x2): Likewise.
13370         (vst1_p8_x2): Likewise.
13371         (vst1_s16_x2): Likewise.
13372         (vst1_p16_x2): Likewise.
13373         (vst1_s32_x2): Likewise.
13374         (vst1_u8_x2): Likewise.
13375         (vst1_u16_x2): Likewise.
13376         (vst1_u32_x2): Likewise.
13377         (vst1_f16_x2): Likewise.
13378         (vst1_f32_x2): Likewise.
13379         (vst1_p64_x2): Likewise.
13380         (vst1q_s8_x2): Likewise.
13381         (vst1q_p8_x2): Likewise.
13382         (vst1q_s16_x2): Likewise.
13383         (vst1q_p16_x2): Likewise.
13384         (vst1q_s32_x2): Likewise.
13385         (vst1q_s64_x2): Likewise.
13386         (vst1q_u8_x2): Likewise.
13387         (vst1q_u16_x2): Likewise.
13388         (vst1q_u32_x2): Likewise.
13389         (vst1q_u64_x2): Likewise.
13390         (vst1q_f16_x2): Likewise.
13391         (vst1q_f32_x2): Likewise.
13392         (vst1q_f64_x2): Likewise.
13393         (vst1q_p64_x2): Likewise.
13394         (vst1_s64_x3): Likewise.
13395         (vst1_u64_x3): Likewise.
13396         (vst1_f64_x3): Likewise.
13397         (vst1_s8_x3): Likewise.
13398         (vst1_p8_x3): Likewise.
13399         (vst1_s16_x3): Likewise.
13400         (vst1_p16_x3): Likewise.
13401         (vst1_s32_x3): Likewise.
13402         (vst1_u8_x3): Likewise.
13403         (vst1_u16_x3): Likewise.
13404         (vst1_u32_x3): Likewise.
13405         (vst1_f16_x3): Likewise.
13406         (vst1_f32_x3): Likewise.
13407         (vst1_p64_x3): Likewise.
13408         (vst1q_s8_x3): Likewise.
13409         (vst1q_p8_x3): Likewise.
13410         (vst1q_s16_x3): Likewise.
13411         (vst1q_p16_x3): Likewise.
13412         (vst1q_s32_x3): Likewise.
13413         (vst1q_s64_x3): Likewise.
13414         (vst1q_u8_x3): Likewise.
13415         (vst1q_u16_x3): Likewise.
13416         (vst1q_u32_x3): Likewise.
13417         (vst1q_u64_x3): Likewise.
13418         (vst1q_f16_x3): Likewise.
13419         (vst1q_f32_x3): Likewise.
13420         (vst1q_f64_x3): Likewise.
13421         (vst1q_p64_x3): Likewise.
13423 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13425         * config/msp430/msp430.c (msp430_output_labelref): Prepend
13426         user_label_prefix to name.
13428         * tree-core.h: Update comment about the format of NAME string
13429         passed to handler in attribute_spec.
13431         * config/msp430/msp430.md: Remove erroneous subreg expression from
13432         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
13433         zero_extend{q,h}isi2.
13435 2018-05-30  Borislav Petkov  <bp@suse.de>
13437         * doc/extend.texi: Document some architecture specific
13438         constraints and sort entries.
13440 2018-05-30  Martin Sebor  <msebor@redhat.com>
13442         PR middle-end/85369
13443         * builtins.c (expand_builtin_stpcpy_1): New function.
13444         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
13445         only if the former succeeds.
13447 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
13449         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
13450         in saphira.
13452 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13454         * doc/invoke.texi (-flinker-output): Document
13456 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13458         * passes.c (ipa_write_summaries): Only modify statements if body
13459         is in memory.
13460         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
13461         incrementally linking.
13462         (ipa_passes): Likewise.
13463         * lto-cgraph.c (lto_output_node): When incrementally linking do not
13464         pass down resolution info.
13465         * common.opt (flag_incremental_link): Update info.
13466         * gcc.c (plugin specs): Turn flinker-output=* to
13467         -plugin-opt=-linker-output-known
13468         * toplev.c (compile_file): Also cut compilation when doing incremental
13469         link.
13470         * flag-types. (enum lto_partition_model): Add
13471         LTO_LINKER_OUTPUT_NOLTOREL.
13472         (invoke.texi): Add -flinker-output docs.
13473         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
13474         link same way as WPA; do not stream in dead initializers.
13476         * dwarf2out.c (dwarf2out_die_ref_for_decl,
13477         darf2out_register_external_decl): Support incremental link.
13479 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13481         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
13483 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13485         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
13486         it down to simple_object_copy_lto_debug_sections.
13487         (run_gcc): Determine incremental LTO link time and configure
13488         lto1 into non-wpa mode, disable renaming of debug sections.
13490 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13492         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13493         descriptions of various incorrectly documented functions.
13495 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13497         Revert:
13498         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13499         address check not strict.
13501 2018-05-30  Richard Biener  <rguenther@suse.de>
13503         PR tree-optimization/85964
13504         * tracer.c (better_p): Drop initialized count check, we only
13505         call the function with initialized counts now.
13506         (find_best_successor): Do find a best edge if one
13507         has uninitialized count.
13508         (find_best_predecessor): Likewise.  Do BB frequency check only
13509         if count is initialized.
13511 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
13513         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
13514         (aarch64_ldrstr_offset_compare): New.
13515         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
13516         load/store orderings.
13517         (aarch64_gen_adjusted_ldpstp): Likewise.
13519 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
13521         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13522         Check for subset of GENERAL_REGS and FP_REGS.
13523         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
13524         r=w alternative.
13526 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
13528         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
13529         and wi::to_poly_offset.  Add the current offset and then check
13530         whether the sum fits, rather than using an unchecked addition of
13531         a checked term.  Check for a shwi rather than a uhwi.
13532         * expr.c (get_bit_range): Use tree_to_poly_uint64.
13533         (store_constructor): Use poly_int_tree_p.
13534         (expand_expr_real_1): Likewise.
13535         * function.c (assign_temp): Likewise.
13536         * fold-const.c (const_binop): Use poly_int_tree_p and
13537         wi::to_poly_offset.
13538         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
13539         division.
13540         * ipa-icf-gimple.c (func_checker::compare_operand): Use
13541         to_poly_offset for MEM offsets.
13542         * ipa-icf.c (sem_variable::equals): Likewise.
13543         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
13544         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
13545         wi::to_poly_offset for BIT_FIELD_REF offsets.
13546         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
13547         wi::to_poly_offset.
13548         * var-tracking.c (emit_note_insn_var_location): Use
13549         tree_to_poly_uint64.
13551 2018-05-29  Jim Wilson  <jimw@sifive.com>
13553         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
13555 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
13557         PR target/85950
13558         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
13559         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
13560         sequence.
13561         (sse4_1_round<mode>2): Use nonimmediate_operand
13562         for operand 1 predicate.
13564 2018-05-29  Martin Sebor  <msebor@redhat.com>
13565             Richard Biener  <rguenther@suse.de>
13567         PR testsuite/85888
13568         * calls.c (get_size_range): Call determine_value_range instead
13569         of get_value_range..
13570         * tree-vrp.h (determine_value_range): Declared new function.
13571         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
13573 2018-05-29  Richard Biener  <rguenther@suse.de>
13575         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
13576         sure to use non-pattern stmts for get_earlier_stmt arguments.
13577         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
13578         called on pattern stmts.
13579         (get_later_stmt): Likewise.
13581 2018-05-29  Martin Liska  <mliska@suse.cz>
13583         PR gcov-profile/85759
13584         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
13585         env variables.
13587 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
13589         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
13590         VEC_UNPACK_*_EXPR.
13591         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
13592         VEC_PACK_*_EXPR.
13594         PR target/85918
13595         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13596         VEC_PACK_FLOAT_EXPR): New tree codes.
13597         * tree-pretty-print.c (op_code_prio): Handle
13598         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13599         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13600         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13601         * tree-inline.c (estimate_operator_cost): Likewise.
13602         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
13603         * fold-const.c (const_binop): Likewise.
13604         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
13605         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13606         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13607         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
13608         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13609         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13610         * expr.c (expand_expr_real_2): Likewise.
13611         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
13612         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
13613         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
13614         optabs.
13615         * optabs.c (expand_widen_pattern_expr): For
13616         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
13617         sign from result type rather than operand's type.
13618         (expand_binop_directly): For vec_packu_float_optab and
13619         vec_packs_float_optab allow result type to be different from operand's
13620         type.
13621         * optabs-tree.c (optab_for_tree_code): Handle
13622         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13623         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
13624         * tree-vect-generic.c (expand_vector_operations_1):  Handle
13625         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13626         VEC_PACK_FLOAT_EXPR.
13627         * tree-vect-stmts.c (supportable_widening_operation): Handle
13628         FIX_TRUNC_EXPR.
13629         (supportable_narrowing_operation): Handle FLOAT_EXPR.
13630         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
13631         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
13632         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
13633         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
13634         mode attributes.
13635         (vec_pack<floatprefix>_float_<mode>): New expander.
13636         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
13637         attributes.
13638         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
13639         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
13640         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
13641         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
13642         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
13643         Document.
13644         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
13645         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
13646         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13647         VEC_PACK_FLOAT_EXPR): Document.
13649 2018-05-29  Richard Biener  <rguenther@suse.de>
13651         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
13652         member.
13653         (stmt_vec_info_vec): Make pointer.
13654         (init_stmt_vec_info_vec): Remove.
13655         (free_stmt_vec_info_vec): Likewise.
13656         (set_stmt_vec_info_vec): New function.
13657         (free_stmt_vec_infos): Likewise.
13658         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
13659         (set_vinfo_for_stmt): Likewise.
13660         (get_earlier_stmt): Likewise.
13661         (get_later_stmt): Likewise.
13662         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
13663         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
13664         (vec_info::~vec_info): Free stmt_vec_infos.
13665         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
13666         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
13667         (pass_slp_vectorize::execute): Likewise.
13668         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
13669         (free_stmt_vec_info_vec): Likewise.
13670         (set_stmt_vec_info_vec): New function.
13671         (free_stmt_vec_infos): Likewise.
13672         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
13673         the global stmt_vec_info_vec.
13674         * tree-parloops.c (gather_scalar_reductions): Use
13675         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
13676         vector.
13678 2018-05-29  Richard Biener  <rguenther@suse.de>
13680         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
13682 2018-05-29  Martin Liska  <mliska@suse.cz>
13683             David Malcolm  <dmalcolm@redhat.com>
13685         * vec.c (test_reverse): New.
13686         (vec_c_tests): Add new test.
13687         * vec.h (vl_ptr>::reverse): New function.
13689 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
13691         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
13693         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
13694         and later.
13696 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13698         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
13700 2018-05-28  Richard Biener  <rguenther@suse.de>
13702         PR tree-optimization/85933
13703         * tree-vect-data-refs.c (vect_record_base_alignments): Only
13704         look at stmts marked as vectorizable.
13706 2018-05-28  Richard Biener  <rguenther@suse.de>
13708         PR tree-optimization/85934
13709         * tree-vect-generic.c (expand_vector_operations_1): Hoist
13710         vector boolean check before scalar optimization.
13712 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
13714         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
13715         for armv5te.
13717 2018-05-28  Mark Wielaard  <mark@klomp.org>
13719         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
13720         if it is an expression containing a minus sign.
13722 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
13724         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
13726 2018-05-27  Paul Koning  <ni1d@arrl.net>
13728         * config/pdp11/pdp11.md (truncsihi2): Remove.
13730 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
13731             Chung-Ju Wu  <jasonwucj@gmail.com>
13733         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
13734         implementation.
13735         (unaligned_store_dw): Ditto.
13736         * config/nds32/nds32-memory-manipulation.c
13737         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
13738         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
13739         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
13740         (emit_setmem_word_loop): Rename to ...
13741         (emit_setmem_doubleword_loop): ... this.
13742         (nds32_gen_dup_4_byte_to_word_value): New function.
13743         (nds32_gen_dup_8_byte_to_double_word_value): New function.
13744         (nds32_expand_setmem_loop): Refine implementation.
13745         (nds32_expand_setmem_loop_v3m): Ditto.
13746         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
13747         pattern.
13749 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13751         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
13753 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13755         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
13756         (nds32_init_machine_status): Initialize machine->attr_naked_p and
13757         machine->attr_no_prologue_p.
13758         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
13759         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
13760         (nds32_expand_epilogue): Consider attr_naked_p.
13761         (nds32_expand_epilogue_v3pop): Likewise.
13762         (nds32_can_use_return_insn): Likewise.
13763         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
13764         attr_no_prologue_p fields.
13765         * config/nds32/nds32.opt (mret-in-naked-func): New option.
13767 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
13769         PR target/85918
13770         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
13771         attributes.
13772         * config/i386/sse.md
13773         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
13774         Rename to ...
13775         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
13776         ... this.
13777         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
13778         Rename to ...
13779         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
13780         ... this.
13781         (*<floatsuffix>floatv2div2sf2): Rename to ...
13782         (*float<floatunssuffix>v2div2sf2): ... this.
13783         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
13784         (float<floatunssuffix>v2div2sf2_mask): ... this.
13785         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
13786         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
13787         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
13788         to ...
13789         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
13790         ... this.
13791         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13792         Rename to ...
13793         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13794         ... this.
13795         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13796         Rename to ...
13797         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13798         ... this.
13799         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
13800         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
13801         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
13802         gen_ufix_truncv8dfv8si2.
13803         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
13804         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
13805         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
13806         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
13807         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
13808         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
13809         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
13810         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
13812 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
13814         PR target/85900
13815         PR target/85345
13816         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
13818 2018-05-25  Jim Wilson  <jimw@sifive.com>
13820         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
13821         * config/riscv/riscv.c (struct machine_function): Add
13822         interrupt_handler_p and attribute_checked_p fields.
13823         (riscv_attribute_table): Add interrupt.
13824         (riscv_interrupt_type_p): New.
13825         (riscv_save_reg_p): Save extra regs for interrupt handler.
13826         (riscv_use_save_libcall): Return false  for interrupt handler.
13827         (riscv_first_stack_step): Add forward declaration.
13828         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
13829         for interrupt handler with large frame.  Use it for saved reg list.
13830         (riscv_expand_prologue): Move flag_stack_usage_info support to
13831         eliminate duplication.
13832         (riscv_expand_epilogue): Generate mret for interrupt handler.
13833         (riscv_epilogue_uses): New.
13834         (riscv_can_use_return_insn): Return false for interrupt handler.
13835         (riscv_function_ok_for_sibcall): Likewise.
13836         (riscv_set_current_function): Add interrupt handler support.
13837         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
13838         * config/riscv/riscv.md (UNSPECV_MRET): New.
13839         (GP_REGNUM): New.
13840         (riscv_frflags, riscv_fsflags): Use tab after opcode.
13841         (riscv_mret): New.
13842         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
13844 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
13846         PR tree-optimization/85712
13847         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
13848         this candidate has already been replaced in-situ by a copy.
13850 2018-05-25  Jason Merrill  <jason@redhat.com>
13852         PR c++/80485 - inline function non-zero address.
13853         * symtab.c (nonzero_address): Check DECL_COMDAT.
13855 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
13857         PR target/83628
13858         * config/alpha/alpha.md (ashlsi3): New insn pattern.
13859         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
13860         extension of SImode operation.  Use const123_operand predicate.
13861         (*saddsi_1): Remove.
13862         (*saddl_se_1): Ditto.
13863         (*ssubsi_1): Ditto.
13864         (*ssubl_se_1): Ditto.
13865         * config/alpha/predicates.md (const123_operand): New predicate.
13866         * config/alpha/constraints.md (P): Use IN_RANGE.
13868 2018-05-25  Richard Biener  <rguenther@suse.de>
13870         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
13871         defaulted to true.
13872         (ref_maybe_used_by_stmt_p): Likewise.
13873         (stmt_may_clobber_ref_p): Likewise.
13874         (stmt_may_clobber_ref_p_1): Likewise.
13875         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
13876         and pass it along.
13877         (ref_maybe_used_by_stmt_p): Likewise.
13878         (stmt_may_clobber_ref_p): Likewise.
13879         (stmt_may_clobber_ref_p_1): Likewise.
13880         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
13881         the alias oracle to disambiguate DRs with stmts DR analysis
13882         couldn't handle.
13883         (vect_analyze_data_refs): Do not give up on not analyzable
13884         DRs for BB vectorization.  Remove code truncating the dataref
13885         vector.
13887 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
13889         PR target/85832
13890         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13891         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
13892         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
13894 2018-05-25  Richard Biener  <rguenther@suse.de>
13896         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
13897         function, combining stmt data ref gathering and fatal analysis
13898         parts.
13899         (vect_analyze_data_refs): Remove now redudnant code and simplify.
13900         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
13901         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
13902         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
13903         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
13905 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
13907         PR tree-optimization/85720
13908         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
13909         SCC if all partitions are builtins.
13910         (version_loop_by_alias_check): New parameter.  Generate cancelable
13911         runtime alias check if all partitions are builtins.
13912         (distribute_loop): Update call to above function.
13914 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
13916         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
13917         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
13918         (parm_default_def_partition_arg): Ditto.
13919         (set_parm_default_def_partition): Ditto.
13920         (get_parm_default_def_partitions): Ditto and make it static.
13921         (get_undefined_value_partitions): Ditto and make it static.
13922         (remove_ssa_form): Refactor call to init_var_map here.
13923         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
13924         computation for loop region.
13925         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
13926         (register_default_def): Delete.
13927         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
13928         (parm_default_def_partition_arg): Ditto.
13929         (set_parm_default_def_partition): Ditto.
13930         (get_parm_default_def_partitions): Ditto and make it static.
13931         (get_undefined_value_partitions): Ditto and make it static.
13932         (coalesce_with_default, coalesce_with_default): Update comment.
13933         (create_coalesce_list_for_region): New func factored out from
13934         create_outofssa_var_map.
13935         (populate_coalesce_list_for_outofssa): New func factored out from
13936         create_outofssa_var_map and coalesce_ssa_name.
13937         (create_outofssa_var_map): Delete.
13938         (coalesce_ssa_name): Refactor to support live range computation.
13939         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
13940         (get_parm_default_def_partitions): Delete.
13941         (get_undefined_value_partitions): Ditto.
13942         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
13943         computation for loop region.
13944         (new_tree_live_info, loe_visit_block): Ditto.
13945         (live_worklist, set_var_live_on_entry): Ditto.
13946         (calculate_live_on_exit, verify_live_on_entry): Ditto.
13947         * tree-ssa-live.h (struct _var_map): New fields.
13948         (init_var_map): Change decl.
13949         (region_contains_p): New.
13951 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
13953         * tree-ssa-live.h (live_merge_and_clear): Delete.
13955 2018-05-25  Richard Biener  <rguenther@suse.de>
13957         PR c++/85912
13958         * tree-dump.c (dequeue_and_dump): Remove access to removed
13959         operand 2 of a SWITCH_EXPR.
13961 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13963         * doc/sourcebuild.texi (vect_double_cond_arith): Include
13964         multiplication and division.
13965         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
13966         (cond_udiv@var{m}, cond_umod@var{m}): Document.
13967         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
13968         (cond_udiv_optab, cond_umod_optab): New optabs.
13969         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
13970         (IFN_COND_RDIV): New internal functions.
13971         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
13972         TRUNC_MOD_EXPR and RDIV_EXPR.
13973         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
13974         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
13975         New unspecs.
13976         (SVE_INT_BINARY): Include mult.
13977         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
13978         (optab, sve_int_op): Handle mult.
13979         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
13980         UNSPEC_COND_DIV.
13981         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
13982         for SVE_INT_BINARY_SD.
13984 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13986         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
13987         (optab, sve_int_op): Handle div and udiv.
13988         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
13989         for SVE_INT_BINARY_SD.
13990         (*<optab><mode>3): New insn for the same.
13992 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13994         * tree-vect-patterns.c: Include predict.h.
13995         (vect_recog_divmod_pattern): Restrict check for division support
13996         to when optimizing for size.
13998 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14000         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
14001         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
14002         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
14003         (gimple_match_op::set_op): Likewise.
14004         (gimple_resimplify4): Declare.
14005         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
14006         (expr::gen_transform): Likewise.
14007         (decision_tree::gen): Generate a simplification routine for 4 operands.
14008         * gimple-match-head.c (gimple_simplify): Add an overload for
14009         4 operands.  In the top-level function, handle up to 4 call
14010         arguments and call gimple_resimplify4.
14011         (gimple_resimplify4): New function.
14012         (build_call_internal): Pass a fourth operand.
14013         (maybe_push_to_seq): Likewise.
14014         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
14015         Fold VEC_COND_EXPRs of an operation and a default value into
14016         an IFN_COND_* function if possible.
14017         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
14018         New unspecs.
14019         (SVE_COND_FP_BINARY): Include them.
14020         (optab, sve_fp_op): Handle them.
14021         (SVE_INT_BINARY_REV): New code iterator.
14022         (SVE_COND_FP_BINARY_REV): New int iterator.
14023         (commutative): New int attribute.
14024         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
14025         Declare.
14026         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
14027         function.
14028         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
14029         (*cond_<optab><mode>): New patterns for reversed operands.
14031 2018-05-25  Richard Biener  <rguenther@suse.de>
14033         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
14034         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
14035         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
14036         (STMT_VINFO_GROUPED_ACCESS): Adjust.
14037         * tree-vect-data-refs.c (everywhere): Adjust users.
14038         * tree-vect-loop.c (everywhere): Likewise.
14039         * tree-vect-slp.c (everywhere): Likewise.
14040         * tree-vect-stmts.c (everywhere): Likewise.
14041         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
14043 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14045         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
14046         Rename to...
14047         (gcc_cv_as_section_exclude): ... this.
14048         Try Solaris as #exclude syntax.
14049         * configure: Regenerate.
14050         * config.in: Regenerate.
14051         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
14052         SECTION_EXCLUDE.
14053         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
14054         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
14056         * varasm.c (default_elf_asm_named_section): Don't check if
14057         HAVE_GAS_SECTION_EXCLUDE is defined.
14059 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14061         * doc/md.texi: Update the documentation of the cond_* optabs
14062         to mention the new final operand.  Fix GET_MODE_NUNITS call.
14063         Describe the scalar case too.
14064         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
14065         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
14066         instead of 2.
14067         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
14068         (get_conditional_internal_fn): Update comment.
14069         * tree-vect-loop.c (vectorizable_reduction): Pass the original
14070         accumulator value as a final argument to conditional functions.
14071         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
14072         a define_expand and add an "else" operand.  Assert for now that
14073         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
14074         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
14075         (*cond_<optab><mode>): New patterns.
14076         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
14077         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
14078         (UNSPEC_COND_EOR): Delete.
14079         (optab): Remove associated mappings.
14080         (SVE_INT_BINARY): New code iterator.
14081         (sve_int_op): Remove int attribute and add "minus" to the code
14082         attribute.
14083         (SVE_COND_INT_OP): Delete.
14084         (SVE_COND_FP_OP): Rename to...
14085         (SVE_COND_FP_BINARY): ...this.
14087 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14089         * optabs.c (can_reuse_operands_p): New function.
14090         (maybe_legitimize_operands): Try to reuse the results for
14091         earlier operands.
14093 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
14095         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
14096         Add {q} suffix to insn mnemonic.
14098 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14100         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
14101         (msp430_warn_func_return): New.
14103 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
14105         * fold-const.c (tree_nonzero_bits): New function.
14106         * fold-const.h (tree_nonzero_bits): Likewise.
14107         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
14108         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
14110 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
14112         PR target/85900
14113         PR target/85345
14114         * varasm.c (assemble_alias): Check ifunc_resolver only on
14115         FUNCTION_DECL.
14117 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
14119         PR target/85903
14120         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
14121         when memory input operand is handled.
14123 2018-05-24  Luis Machado  <luis.machado@linaro.org>
14125         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
14126         global.
14127         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
14129 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
14131         * match.pd: Delay FMA folds until after vectorization.
14133 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14135         PR target/83009
14136         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14137         address check not strict.
14139 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
14141         * gimple-match.h (gimple_match_op): New class.
14142         (mprts_hook): Replace parameters with a gimple_match_op *.
14143         (maybe_build_generic_op): Likewise.
14144         (gimple_simplified_result_is_gimple_val): Replace parameters with
14145         a const gimple_match_op *.
14146         (gimple_simplify): Replace code_helper * and tree * parameters with
14147         a gimple_match_op * parameter.
14148         (gimple_resimplify1): Replace code_helper *, tree and tree *
14149         parameters with a gimple_match_op * parameter.
14150         (gimple_resimplify2): Likewise.
14151         (gimple_resimplify3): Likewise.
14152         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
14153         parameters with a gimple_match_op * parameter.
14154         * gimple-match-head.c (gimple_simplify): Change prototypes of
14155         auto-generated functions to take a gimple_match_op * instead of
14156         separate code_helper * and tree * parameters.  Make the same
14157         change in the top-level overload and update calls to the
14158         gimple_resimplify routines.  Update calls to the auto-generated
14159         functions and to maybe_push_res_to_seq in the publicly-facing
14160         operation-specific gimple_simplify overloads.
14161         (gimple_match_op::MAX_NUM_OPS): Define.
14162         (gimple_resimplify1): Replace rcode and ops with a single res_op
14163         parameter.  Update call to gimple_simplify.
14164         (gimple_resimplify2): Likewise.
14165         (gimple_resimplify3): Likewise.
14166         (mprts_hook): Replace parameters with a gimple_match_op *.
14167         (maybe_build_generic_op): Likewise.
14168         (build_call_internal): Replace type, nargs and ops with
14169         a gimple_match_op *.
14170         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
14171         with a single gimple_match_op *.  Update calls to mprts_hook,
14172         build_call_internal and gimple_simplified_result_is_gimple_val.
14173         Factor out code that is common to the tree_code and combined_fn cases.
14174         * genmatch.c (expr::gen_transform): Replace tem_code and
14175         tem_ops with a gimple_match_op called tem_op.  Update calls
14176         to the gimple_resimplify functions and maybe_push_res_to_seq.
14177         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
14178         res_ops.  Update call to the gimple_resimplify functions.
14179         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
14180         (decision_tree::gen): Make the functions take a gimple_match_op *
14181         called res_op instead of separate res_code and res_ops parameters.
14182         Update call accordingly.
14183         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
14184         and ops with a single res_op parameter.  Update calls to
14185         maybe_build_generic_op and maybe_push_res_to_seq.
14186         (fold_stmt_1): Update calls to gimple_simplify and
14187         replace_stmt_with_simplification.
14188         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
14189         and gimple_simplified_result_is_gimple_val.
14190         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
14191         gimple_simplify.
14192         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
14193         with a gimple_match_op *.
14194         (vn_nary_build_or_lookup): Likewise.  Update call to
14195         vn_nary_build_or_lookup_1.
14196         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
14197         gimple_match_op *.  Update calls to the gimple_resimplify routines
14198         and to gimple_simplified_result_is_gimple_val.
14199         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
14200         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
14201         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
14202         (visit_nary_op): Likewise.
14203         (visit_reference_op_load): Likewise.
14205 2018-05-23  Luis Machado  <luis.machado@linaro.org>
14207         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
14208         modifier for printing the step amount.
14210 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
14212         PR target/78849
14213         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
14214         types.
14216 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
14218         * doc/sourcebuild.texi (Endianness): New subsubsection.
14220 2018-05-23  Luis Machado  <luis.machado@linaro.org>
14222         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14223         <prefetch_dynamic_strides>: New const bool field.
14224         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14225         prefetch_dynamic_strides.
14226         (exynosm1_prefetch_tune): Likewise.
14227         (thunderxt88_prefetch_tune): Likewise.
14228         (thunderx_prefetch_tune): Likewise.
14229         (thunderx2t99_prefetch_tune): Likewise.
14230         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
14231         false.
14232         (aarch64_override_options_internal): Update to set
14233         PARAM_PREFETCH_DYNAMIC_STRIDES.
14234         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14235         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14236         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14237         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14238         prefetch-dynamic-strides setting.
14240 2018-05-23  Luis Machado  <luis.machado@linaro.org>
14242         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14243         <minimum_stride>: New const int field.
14244         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14245         minimum_stride field defaulting to -1.
14246         (exynosm1_prefetch_tune): Likewise.
14247         (thunderxt88_prefetch_tune): Likewise.
14248         (thunderx_prefetch_tune): Likewise.
14249         (thunderx2t99_prefetch_tune): Likewise.
14250         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
14251         <default_opt_level>: Set to 3.
14252         (aarch64_override_options_internal): Update to set
14253         PARAM_PREFETCH_MINIMUM_STRIDE.
14254         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14255         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14256         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14257         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14258         stride is constant and is below the minimum stride threshold.
14260 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14262         * config/arm/arm-cpus.in (mode26): Delete.
14263         (armv4): Delete mode26 reference.
14264         * config/arm/arm.c (arm_configure_build_target): Delete use of
14265         isa_bit_mode26.
14267 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
14269         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
14270         New insn pattern.
14271         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
14272         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
14273         for non-SSE modes.
14274         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
14275         (floatunsdidf2): Ditto.
14277 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
14279         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
14280         (fixuns_trunc<mode>si2_avx512f): Ditto.
14281         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
14282         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
14283         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
14285 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
14287         PR rtl-optimization/79985
14288         * df-scan.c (df_insn_refs_collect): Remove special case for
14289         global registers and asm statements.
14291 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
14293         * extend.texi (Global Register Variables): Rewrite the bullet list.
14294         Note that the register is available for allocation. Note that access
14295         via inline asm must use constraints. Add note about async-signal
14296         handlers. Remove paragraph about automagic register selection.
14298 2018-05-23  Richard Biener  <rguenther@suse.de>
14300         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
14301         of fixed offset from memset VN.
14303 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
14305         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
14306         first_interp field.
14307         (alloc_cand_and_find_basis): Initialize first_interp field.
14308         (slsr_process_mul): Modify first_interp field.
14309         (slsr_process_add): Likewise.
14310         (slsr_process_cast): Modify first_interp field for each new
14311         interpretation.
14312         (slsr_process_copy): Likewise.
14313         (dump_candidate): Dump first_interp field.
14314         (replace_mult_candidate): Process all interpretations, not just
14315         subsequent ones.
14316         (replace_rhs_if_not_dup): Likewise.
14317         (replace_one_candidate): Likewise.
14319 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
14321         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
14322         Add new boolean.
14323         (aarch64_needs_frame_chain): New function.
14324         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
14326 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
14328         PR target/84882
14329         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
14330         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
14331         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
14332         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
14333         as true for strict-align.
14334         (aarch64_can_inline_p): Perform checks even when callee has no
14335         attributes to check for strict alignment.
14336         * doc/extend.texi (AArch64 Function Attributes): Document
14337         no-strict-align.
14338         * doc/invoke.texi: (AArch64 Options): Likewise.
14340 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
14342         PR tree-optimization/85853
14343         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
14344         the handling of the root of the node to...
14345         (vect_slp_analyze_node_operations_1): ...this new function,
14346         and run the whole thing with the child nodes' def types
14347         set according to their SLP node's def type.
14349 2018-05-23  Richard Biener  <rguenther@suse.de>
14351         PR middle-end/85874
14352         * tree-data-ref.c (create_runtime_alias_checks): Defer
14353         and ignore overflow warnings.
14355 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
14357         PR tree-optimization/85822
14358         * tree-vrp.c (is_masked_range_test): Fix handling of negative
14359         constants.
14361 2018-05-23  Richard Biener  <rguenther@suse.de>
14363         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14364         memset constants via native_interpret_expr.
14366 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
14368         PR target/85345
14369         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
14370         attribute.
14371         (cgraph_node::create_alias): Likewise.
14372         (cgraph_node::get_availability): Check ifunc_resolver instead
14373         of looking up ifunc attribute.
14374         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
14375         * varasm.c (do_assemble_alias): Likewise.
14376         (assemble_alias): Likewise.
14377         (default_binds_local_p_3): Likewise.
14378         * cgraph.h (cgraph_node): Add ifunc_resolver.
14379         (cgraph_node::only_called_directly_or_aliased_p): Return false
14380         for IFUNC resolver.
14381         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
14382         attribute.
14383         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
14384         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
14385         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
14386         instead of looking up ifunc attribute.
14388 2018-05-22  Luis Machado  <luis.machado@linaro.org>
14390         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
14392 2018-05-22  Martin Sebor  <msebor@redhat.com>
14394         PR middle-end/85359
14395         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
14396         only when expasion succeeds.
14397         (expand_builtin_strcmp): Same.
14398         (expand_builtin_strncmp): Same.
14400 2018-05-22  Martin Sebor  <msebor@redhat.com>
14402         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
14404 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
14405             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14407         * config/aarch64/aarch64-ldpstp.md: Replace uses of
14408         aarch64_mem_pair_operand with memory_operand and delete operand swapping
14409         code.
14410         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14411         Add check for legitimate_address.
14412         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
14413         (aarch64_swap_ldrstr_operands): New.
14414         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
14415         Define prototype.
14417 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
14418             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14420         * config/aarch64/aarch64.md: New patterns to generate stp
14421         and ldp.
14422         (store_pair_sw, store_pair_dw): New patterns to generate stp for
14423         single words and double words.
14424         (load_pair_sw, load_pair_dw): Likewise.
14425         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
14426         Delete.
14427         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
14428         Delete.
14429         * config/aarch64/aarch64-ldpstp.md: Modify peephole
14430         for different mode ldpstp and add peephole for merged zero stores.
14431         Likewise for loads.
14432         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14433         Add size check.
14434         (aarch64_gen_store_pair): Rename calls to match new patterns.
14435         (aarch64_gen_load_pair): Rename calls to match new patterns.
14436         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
14437         (load_pair<DREG:mode><DREG2:mode>): ... This.
14438         (store_pair<mode>): Rename to...
14439         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
14440         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
14441         New mode iterators.
14442         (V_INT_EQUIV): Handle SImode.
14443         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
14444         New predicate.
14446 2018-05-22  Martin Sebor  <msebor@redhat.com>
14448         PR c/85623
14449         * calls.c (maybe_warn_nonstring_arg): Use string length to set
14450         or ajust the presumed bound on an operation to avoid unnecessary
14451         warnings.
14453 2018-05-22  Martin Sebor  <msebor@redhat.com>
14455         PR tree-optimization/85826
14456         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
14457         assuming that a DECL necesarily has a constant size.
14459 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
14461         PR middle-end/85862
14462         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
14464 2018-05-22  Richard Biener  <rguenther@suse.de>
14466         PR tree-optimization/85834
14467         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
14468         non-constant and non-zero memset arguments.
14470 2018-05-22  Martin Liska  <mliska@suse.cz>
14472         PR ipa/85607
14473         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
14475 2018-05-22  Richard Biener  <rguenther@suse.de>
14477         PR tree-optimization/85863
14478         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
14479         comparisons when vectype is specified.
14480         (vectorizable_condition): Do not specify vectype for
14481         vect_is_simple_cond when SLP vectorizing.
14483 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
14485         PR target/85657
14486         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
14487         define __ibm128 as long double.
14488         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
14489         as a distinct type when IEEE 128-bit support is enabled.
14490         (init_float128_ieee): Fix up conversions between IFmode and IEEE
14491         128-bit types to use the correct functions.
14492         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
14493         convert between 128-bit floating point types that have different
14494         modes but the same representation, instead of using gen_lowpart to
14495         makean alias.
14496         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
14497         KFmode.
14498         (IFKF_reg): New attributes to give the register constraints for
14499         IFmode and KFmode.
14500         (extend<mode>tf2_internal): New insns to mark an explicit
14501         conversion between 128-bit floating point types that have a
14502         different mode but share the same representation.
14504 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
14506         PR tree-optimization/85814
14507         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
14508         a null return from get_strinfo when unsharing the next
14509         strinfo in the chain.
14511 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14513         PR gcc/84923
14514         * varasm.c (weak_finish): Clean up weak_decls.
14516 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14518         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
14519         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
14520         UNSPEC_UADALP values.
14521         * config/aarch64/iterators.md (ABAL): New int iterator.
14522         (ABDL2): Likewise.
14523         (ADALP): Likewise.
14524         (sur): Add mappings for the above.
14525         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
14526         New define_insn.
14527         (aarch64_<sur>abal<mode>_4): Likewise.
14528         (aarch64_<sur>adalp<mode>_3): Likewise.
14529         (<sur>sadv16qi): New define_expand.
14531 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
14533         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
14534         (*movdf_internal): Ditto.
14535         (*rcpsf2_sse): Ditto.
14536         (*rsqrtsf2_sse): Ditto.
14537         (*sqrt<mode>2_sse): Ditto.
14539 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
14541         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
14542         eor3q<mode>4.
14543         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
14544         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
14545         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
14546         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
14547         vbcaxq_s64): New.
14548         * config/aarch64/arm_neon.h: Likewise.
14549         * config/aarch64/iterators.md (VQ_I): New.
14551 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
14553         * config.gcc: Add arc/t-multilib-linux to tmake_file for
14554         arc*-*-linux*.
14555         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
14556         MULTILIB_DIRNAMES
14558 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
14560         * config/nds32/constraints.md (S): New constraint.
14561         * config/nds32/nds32.md (call_internal): Use constraint S.
14562         (call_value_internal): Likewise.
14563         (sibcall_internal): Likewise.
14564         (sibcall_value_internal): Likewise.
14566 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
14567             Chung-Ju Wu  <jasonwucj@gmail.com>
14569         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
14570         into consideration.
14572 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
14573             Chung-Ju Wu  <jasonwucj@gmail.com>
14575         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
14576         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
14577         (nds32_rtx_costs_impl): Simplify.
14578         (nds32_address_cost_impl): Simplify.
14579         (nds32_init_rtx_costs): New function.
14580         (nds32_rtx_costs_speed_prefer): Likewise.
14581         (nds32_rtx_costs_size_prefer): Likewise.
14582         (nds32_address_cost_speed_prefer): Likewise.
14583         (nds32_address_cost_speed_fwprop): Likewise.
14584         (nds32_address_cost_size_prefer): Likewise.
14585         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
14586         * config/nds32/nds32.c (nds32_option_override): Use
14587         nds32_init_rtx_costs function.
14589 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
14591         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
14592         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
14593         (TARGET_PIPELINE_N8): Likewise.
14594         (TARGET_PIPELINE_N10): Likewise.
14595         (TARGET_PIPELINE_N13): Likewise.
14596         (TARGET_PIPELINE_GRAYWOLF): Likewise.
14598 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
14600         * config/nds32/nds32-fpu.md: Update copyright year.
14602 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14604         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
14606 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14608         * config/nds32/nds32.c
14609         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
14610         * config/nds32/nds32.opt (minline-asm-r15): New option.
14612 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14614         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
14615         MASK_HW_ABS.
14616         * config/nds32/nds32.md (abssi2): New pattern.
14618 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
14620         * config/i386/i386.md (rex64namesuffix): New mode attribute.
14621         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
14622         Merge insn pattern from sse_cvtsi2ss<round_name> and
14623         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
14624         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
14625         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
14626         using SWI48 mode iterator.
14627         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
14628         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
14629         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
14630         pattern from sse_cvttss2si<round_saeonly_name>
14631         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
14632         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
14633         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
14634         using SWI48 mode iterator.
14635         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
14636         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
14637         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
14638         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
14639         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
14640         using SWI48 mode iterator.
14641         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
14642         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
14643         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
14644         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
14645         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
14646         SWI48 mode iterator.
14647         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
14648         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
14649         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
14650         pattern from sse_cvttsd2si<round_saeonly_name>
14651         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
14653 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14655         * config/nds32/nds32-md-auxiliary.c
14656         (nds32_valid_smw_lwm_base_p): Refine.
14657         (nds32_output_smw_single_word): Refine.
14658         (nds32_output_smw_double_word): New.
14659         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
14661 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14663         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
14664         (nds32_output_stack_pop): Refine.
14665         (nds32_expand_unaligned_load): Refine.
14666         (nds32_expand_unaligned_store): Refine.
14668 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
14669             Chung-Ju Wu  <jasonwucj@gmail.com>
14671         * config/nds32/constants.md: Add TP_REGNUM constant.
14672         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
14673         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
14674         UNSPEC_ADD32.
14675         * config/nds32/nds32-doubleword.md: Consider flag_pic.
14676         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
14677         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
14678         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
14679         and PIC code generation.
14680         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
14681         code generation.
14682         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
14683         optimization.
14684         * config/nds32/nds32.md: Support TLS and PIC.
14685         * config/nds32/nds32.c: Support TLS and PIC.
14686         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
14687         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
14688         predicate.
14690 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14692         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
14693         mode with E_ prefix.
14695 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
14696             Chung-Ju Wu  <jasonwucj@gmail.com>
14698         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
14699         * config/nds32/nds32-md-auxiliary.c
14700         (symbolic_reference_mentioned_p): New.
14701         (nds32_legitimize_ict_address): New.
14702         (nds32_expand_ict_move): New.
14703         (nds32_indirect_call_referenced_p): New.
14704         (nds32_symbol_binds_local_p): Delete.
14705         (nds32_long_call_p): Modify.
14706         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
14707         * config/nds32/nds32-protos.h
14708         (symbolic_reference_mentioned_p): Declare.
14709         (nds32_legitimize_ict_address): Declare.
14710         (nds32_expand_ict_move): Declare.
14711         (nds32_indirect_call_referenced_p): Declare.
14712         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
14713         (nds32_relax_group): Use nds32_ict_const_p as condition.
14714         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
14715         (nds32_asm_file_start): Output ict_model directive in asm code.
14716         (nds32_legitimate_address_p): Consider indirect call.
14717         (nds32_print_operand): Consider indirect call.
14718         (nds32_print_operand_address): Consider indirect call.
14719         (nds32_insert_attributes): Handle "indirect_call" attribute.
14720         (TARGET_LEGITIMATE_ADDRESS_P): Define.
14721         (TARGET_LEGITIMATE_CONSTANT_P): Define.
14722         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
14723         (TARGET_DELEGITIMIZE_ADDRESS): Define.
14724         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
14725         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
14726         (TARGET_ICT_MODEL_SMALL): Define.
14727         (TARGET_ICT_MODEL_LARGE): Define.
14728         * config/nds32/nds32.md (movsi): Consider ict model.
14729         (call, call_value): Consider ict model.
14730         (sibcall, sibcall_value): Consider ict model.
14731         * config/nds32/nds32.opt (mict-model): New option.
14732         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
14733         model.
14735 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
14736             Monk Chiang  <sh.chiang04@gmail.com>
14737             Jim Wilson <jimw@sifive.com>
14739         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
14740         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
14741         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
14742         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
14743         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
14744         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
14745         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
14746         compute save_libcall_adjustment properly.
14747         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
14748         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
14749         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
14750         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
14751         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
14752         (ABI_SPEC): Handle mabi=ilp32e.
14753         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
14754         (RVE): Add RVE mask.
14755         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
14756         <-march>: Add rv32e as an example.
14758 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
14760         PR c++/82899
14761         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
14762         (intra_create_variable_infos): Handle C++ constructors.
14764 2018-05-18  Martin Liska  <mliska@suse.cz>
14766         * passes.def: Remove a redundant pass.
14768 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
14770         PR bootstrap/85838
14771         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
14773 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14775         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
14776         (ARMv4): Update.
14777         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
14778         (ARMv6m): Update.
14779         (armv2, armv2a, armv3, armv3m): Delete architectures.
14780         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
14781         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
14782         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
14783         Delete cpus.
14784         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
14785         (*mulsidi3adddi): Likewise.
14786         (mulsidi3): Likewise.
14787         (*mulsidi3_nov6): Likewise.
14788         (umulsidi3): Likewise.
14789         (umulsidi3_nov6): Likewise.
14790         (umaddsidi4): Likewise.
14791         (*umulsidi3adddi): Likewise.
14792         (smulsi3_highpart): Likewise.
14793         (*smulsi3_highpart_nov6): Likewise.
14794         (umulsi3_highpart): Likewise.
14795         (*umulsi3_highpart_nov6): Likewise.
14796         * config/arm/arm.h (arm_arch3m): Delete.
14797         * config/arm/arm.c (arm_arch3m): Delete.
14798         (arm_option_override_internal): Update armv3-related comment.
14799         (arm_configure_build_target): Delete use of isa_bit_mode32.
14800         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
14801         (arm_rtx_costs_internal): Delete check of arm_arch3m.
14802         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
14803         (mulsa3): Likewise.
14804         (mulusa3): Likewise.
14805         * config/arm/arm-protos.h (arm_arch3m): Delete.
14806         * config/arm/arm-tables.opt: Regenerate.
14807         * config/arm/arm-tune.md: Likewise.
14808         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
14809         deleted architectures.
14811 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14813         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
14814         (armv5t, armv5te): New features.
14815         (ARMv5, ARMv5e): Delete fgroups.
14816         (ARMv5t, ARMv5te): Adjust for above changes.
14817         (ARMv6m): Likewise.
14818         (armv5, armv5e): Delete arches.
14819         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
14820         arm_arch5.
14821         (*call_reg_arm): Likewise.
14822         (*call_value_reg_armv5): Likewise.
14823         (*call_value_reg_arm): Likewise.
14824         (*call_symbol): Likewise.
14825         (*call_value_symbol): Likewise.
14826         (*sibcall_insn): Likewise.
14827         (*sibcall_value_insn): Likewise.
14828         (clzsi2): Likewise.
14829         (prefetch): Likewise.
14830         (define_split and define_peephole2 dependent on arm_arch5):
14831         Likewise.
14832         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
14833         arm_arch5e.
14834         (TARGET_ARM_QBIT): Likewise.
14835         (TARGET_DSP_MULTIPLY): Likewise.
14836         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
14837         (arm_arch5, arm_arch5e): Delete.
14838         (arm_arch5t, arm_arch5te): Declare.
14839         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
14840         (arm_arch5t): Declare.
14841         (arm_option_reconfigure_globals): Update for the above.
14842         (arm_options_perform_arch_sanity_checks): Update comment, replace
14843         use of arm_arch5 with arm_arch5t.
14844         (use_return_insn): Likewise.
14845         (arm_emit_call_insn): Likewise.
14846         (output_return_instruction): Likewise.
14847         (arm_final_prescan_insn): Likewise.
14848         (arm_coproc_builtin_available): Likewise.
14849         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
14850         arm_arch5e with arm_arch5t and arm_arch5te.
14851         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
14852         (arm_arch5t, arm_arch5te): Declare.
14853         * config/arm/arm-tables.opt: Regenerate.
14854         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
14855         * config/arm/t-multilib: Likewise.
14856         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
14857         instead of arm_arch5.
14858         (*call_reg_thumb1): Likewise.
14859         (*call_value_reg_thumb1_v5): Likewise.
14860         (*call_value_reg_thumb1): Likewise.
14861         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
14862         unreachable path.
14863         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
14865 2018-05-18  Martin Liska  <mliska@suse.cz>
14867         PR gcov-profile/84846
14868         * doc/gcov.texi: Document -t option of gcov tool.
14870 2018-05-18  Martin Liska  <mliska@suse.cz>
14872         PR gcov-profile/84846
14873         * gcov.c (print_usage): Add new -t option.
14874         (process_args): Handle the option.
14875         (generate_results): Use stdout as output when requested by
14876         the option.
14878 2018-05-18  Martin Liska  <mliska@suse.cz>
14880         PR gcov-profile/84846
14881         * coverage.c (coverage_init): Write PWD to .gcno file.
14882         * doc/gcov.texi: Document how working directory is printed.
14883         * gcov-dump.c (dump_gcov_file): Print PWD.
14884         * gcov.c (output_intermediate_file): Likewise.
14885         (read_graph_file): Read PWD string.
14886         (output_lines): Print PWD.
14888 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
14890         PR middle-end/85817
14891         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
14892         for retval and return false if all args to phi are zero.
14894 2018-05-18  Richard Biener  <rguenther@suse.de>
14896         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
14897         method.
14898         (evrp_dom_walker::before_dom_children): Call it.
14900 2018-05-18  Richard Biener  <rguenther@suse.de>
14902         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
14903         results when processing array refs with variable index.
14905 2018-05-18  Toon Moene  <toon@moene.org>
14907         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
14908         directly after that of -floop-interchange. Indicate that both
14909         options are enabled by default when specifying -O3.
14911 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14913         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
14914         iterator.  Delete separate integer-mode vec_set<mode> expander.
14915         (aarch64_simd_vec_setv2di): Delete.
14916         (vec_setv2di): Delete.
14917         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
14918         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
14919         the "w, r" alternative.
14921 2018-05-18  Martin Liska  <mliska@suse.cz>
14923         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
14924         * tree-pass.h (make_pass_lower_switch_O0): New function.
14925         * tree-switch-conversion.c (node_has_low_bound): Remove.
14926         (node_has_high_bound): Likewise.
14927         (node_is_bounded): Likewise.
14928         (class pass_lower_switch): Make it a template type and create
14929         two instances.
14930         (pass_lower_switch::execute): Add template argument.
14931         (make_pass_lower_switch): New function.
14932         (make_pass_lower_switch_O0): New function.
14933         (do_jump_if_equal): Remove.
14934         (emit_case_nodes): Simplify to just handle all 3 cases and leave
14935         all the hard work to tree optimization passes.
14937 2018-05-18  Martin Liska  <mliska@suse.cz>
14939         * dbgcnt.c (limit_low): Renamed from limit.
14940         (limit_high): New variable.
14941         (dbg_cnt_is_enabled): Check for upper limit.
14942         (dbg_cnt): Adjust dumping.
14943         (dbg_cnt_set_limit_by_index): Add new argument for high
14944         value.
14945         (dbg_cnt_set_limit_by_name): Likewise.
14946         (dbg_cnt_process_single_pair): Parse new format.
14947         (dbg_cnt_process_opt): Use strtok.
14948         (dbg_cnt_list_all_counters): Remove 'value' and add
14949         'limit_high'.
14950         * doc/invoke.texi: Document changes.
14952 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
14954         * doc/sourcebuild.texi (scalar_all_fma): Document.
14955         * tree.def (FMA_EXPR): Delete.
14956         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
14957         * internal-fn.c (ternary_direct): New macro.
14958         (expand_ternary_optab_fn): Likewise.
14959         (direct_ternary_optab_supported_p): Likewise.
14960         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
14961         * builtins.c (fold_builtin_fma): Delete.
14962         (fold_builtin_3): Don't call it.
14963         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
14964         * expr.c (expand_expr_real_2): Likewise.
14965         * fold-const.c (operand_equal_p): Likewise.
14966         (fold_ternary_loc): Likewise.
14967         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
14968         * gimple.c (DEFTREECODE): Likewise.
14969         * gimplify.c (gimplify_expr): Likewise.
14970         * optabs-tree.c (optab_for_tree_code): Likewise.
14971         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
14972         * tree-eh.c (operation_could_trap_p): Likewise.
14973         (stmt_could_throw_1_p): Likewise.
14974         * tree-inline.c (estimate_operator_cost): Likewise.
14975         * tree-pretty-print.c (dump_generic_node): Likewise.
14976         (op_code_prio): Likewise.
14977         * tree-ssa-loop-im.c (stmt_cost): Likewise.
14978         * tree-ssa-operands.c (get_expr_operands): Likewise.
14979         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
14980         * fold-const-call.h (fold_fma): Delete.
14981         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
14982         CFN_FNMA and CFN_FNMS.
14983         (fold_fma): Delete.
14984         * genmatch.c (combined_fn): New enum.
14985         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
14986         (commutative_op): New function.
14987         (commutate): Use it.  Handle more than 2 operands.
14988         (dt_operand::gen_gimple_expr): Use commutative_op.
14989         (parser::parse_expr): Allow :c to be used with non-binary
14990         operators if the commutative operand is known.
14991         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
14992         CFN_FMS, CFN_FNMA and CFN_FNMS.
14993         (backprop::process_assign_use): Remove FMA_EXPR handling.
14994         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
14995         (gen_hsa_fma): New function.
14996         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
14997         IFN_FNMA and IFN_FNMS.
14998         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
14999         * gimple-fold.h (follow_all_ssa_edges): Declare.
15000         * gimple-fold.c (follow_all_ssa_edges): New function.
15001         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
15002         gimple_build interface and use follow_all_ssa_edges to fold the result.
15003         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
15004         instead of checking for optabs directly.
15005         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
15006         rather than FMA_EXPRs.
15007         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
15008         call to IFN_FMA instead of an FMA_EXPR.
15010 2018-05-17  Jim Wilson  <jimw@sifive.com>
15012         * expr.c (do_tablejump): When converting index to Pmode, if we have a
15013         sign extended promoted subreg, and the range does not have the sign bit
15014         set, then do a sign extend.
15016         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
15017         test, check for sign extended subreg and/or constant operands, and
15018         do a sign extend in that case.
15020 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
15022         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
15023         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
15024         Add untyped.
15025         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
15026         Change logics_shift_reg to logics_shift_imm.
15027         (thunderx2t99_fp_loadpair_basic): Delete.
15028         (thunderx2t99_fp_storepair_basic): Delete.
15029         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
15030         (thunderx2t99_asimd_polynomial): Delete.
15031         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
15032         and neon_fp_mul_d_scalar_q.
15033         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
15034         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
15035         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
15036         (thunderx2t99_asimd_lut): Add missing tbl types.
15037         (thunderx2t99_asimd_ext): Delete.
15038         (thunderx2t99_asimd_load1_1_mult): Delete.
15039         (thunderx2t99_asimd_load1_2_mult): Delete.
15040         (thunderx2t99_asimd_load1_ldp): New.
15041         (thunderx2t99_asimd_load1): New.
15042         (thunderx2t99_asimd_load2): Add missing *load2* types.
15043         (thunderx2t99_asimd_load3): New.
15044         (thunderx2t99_asimd_load4): New.
15045         (thunderx2t99_asimd_store1_1_mult): Delete.
15046         (thunderx2t99_asimd_store1_2_mult): Delete.
15047         (thunderx2t99_asimd_store2_mult): Delete.
15048         (thunderx2t99_asimd_store2_onelane): Delete.
15049         (thunderx2t99_asimd_store_stp): New.
15050         (thunderx2t99_asimd_store1): New.
15051         (thunderx2t99_asimd_store2): New.
15052         (thunderx2t99_asimd_store3): New.
15053         (thunderx2t99_asimd_store4): New.
15055 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
15057         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
15058         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
15060 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
15061             Segher Boessenkool  <segher@kernel.crashing.org>
15063         PR target/85698
15064         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
15065         operand.
15067 2018-05-17  Richard Biener  <rguenther@suse.de>
15069         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
15070         for pruning loop and prune defs feeding only already visited PHIs.
15072 2018-05-17  Richard Biener  <rguenther@suse.de>
15074         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
15076 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
15077             Richard Biener  <rguenther@suse.de>
15079         PR tree-optimization/85793
15080         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
15081         for VMAT_ELEMENTWISE.
15083 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
15085         * internal-fn.h (lookup_internal_fn): Declare
15086         * internal-fn.c (lookup_internal_fn): New function.
15087         * gimple.c (gimple_build_call_from_tree): Handle calls to
15088         internal functions.
15089         * gimple-pretty-print.c (dump_gimple_call): Print "." before
15090         internal function names.
15091         * tree-pretty-print.c (dump_generic_node): Likewise.
15092         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
15094 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
15096         * gimple-fold.h (gimple_build): Make the function forms take
15097         combined_fn rather than built_in_function.
15098         (gimple_simplify): Likewise.
15099         * gimple-match-head.c (gimple_simplify): Likewise.
15100         * gimple-fold.c (gimple_build): Likewise.
15101         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
15102         rather than gimple_build_call_internal.
15103         (get_initial_defs_for_reduction): Likewise.
15104         (vect_create_epilog_for_reduction): Likewise.
15105         (vectorizable_live_operation): Likewise.
15107 2018-05-17  Martin Liska  <mliska@suse.cz>
15109         * gimple-ssa-sprintf.c (format_directive): Do not use
15110         space in between 'G_' and '('.
15112 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
15114         PR target/85323
15115         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
15116         even if the mask is not all ones.
15118         PR target/85323
15119         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
15120         vector.
15121         (ix86_gimple_fold_builtin): Likewise.
15123         PR target/85323
15124         * config/i386/i386.c: Include tree-vector-builder.h.
15125         (ix86_vector_shift_count): New function.
15126         (ix86_fold_builtin): Fold shift builtins by scalar count.
15127         (ix86_gimple_fold_builtin): Likewise.
15129         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
15130         _mm512_setzero): New intrinsics.
15132 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
15133             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15135         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
15136         code generation for cases where splatting a value is not useful.
15137         * simplify-rtx.c (simplify_ternary_operation): Simplify
15138         vec_merge across a vec_duplicate and a paradoxical subreg forming
15139         a vector mode to a vec_concat.
15141 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
15143         * config.gcc: Support "goldmont-plus".
15144         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15145         "goldmont-plus".
15146         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15147         PROCESSOR_GOLDMONT_PLUS.
15148         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
15149         (processor_target_table): Add "goldmont-plus".
15150         (PTA_GOLDMONT_PLUS): Define.
15151         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
15152         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
15153         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
15154         (fold_builtin_cpu): Add "goldmont-plus".
15155         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
15156         (ix86_option_override_internal): Add "goldmont-plus".
15157         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
15158         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
15159         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
15160         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
15162 2018-05-17  Richard Biener  <rguenther@suse.de>
15164         PR tree-optimization/85757
15165         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
15166         remove defs that only feed that PHI from further processing.
15168 2018-05-16  Jim Wilson  <jimw@sifive.com>
15170         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
15171         asterisk to name.
15172         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
15174 2018-05-16  Mark Wielaard  <mark@klomp.org>
15176         * dwarf2out.c (count_index_strings): New function.
15177         (output_indirect_strings): Call count_index_strings and generate
15178         header for dwarf_version >= 5.
15180 2018-05-16  Mark Wielaard  <mark@klomp.org>
15182         * dwarf2out.c (dwarf_FORM): New function.
15183         (set_indirect_string): Use dwarf_FORM.
15184         (reset_indirect_string): Likewise.
15185         (size_of_die): Likewise.
15186         (value_format): Likewise.
15187         (output_die): Likewise.
15188         (add_skeleton_AT_string): Likewise.
15189         (output_macinfo_op): Likewise.
15190         (index_string): Likewise.
15191         (output_index_string_offset): Likewise.
15192         (output_index_string): Likewise.
15193         (count_index_strings): Likewise.
15195 2018-05-16  Carl Love  <cel@us.ibm.com>
15197         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15198         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
15200 2018-05-16  Martin Jambor  <mjambor@suse.cz>
15202         * ipa-prop.c (ipa_free_all_edge_args): Remove.
15203         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
15205 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
15207         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
15208         (fnma<mode>4): Likewise.
15209         (fms<mode>4): Likewise.
15210         (fnms<mode>4): Likewise.
15211         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
15212         (aarch64_fnma<mode>4): Likewise.
15213         (aarch64_fms<mode>4): Likewise.
15214         (aarch64_fnms<mode>4): Likewise.
15215         (aarch64_fnmadd<mode>4): Likewise.
15217 2018-05-16  Jason Merrill  <jason@redhat.com>
15219         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
15221 2018-05-16  Richard Biener  <rguenther@suse.de>
15223         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
15224         (dump_stmt_cost): Declare.
15225         (add_stmt_cost): Dump cost we add.
15226         (add_stmt_costs): New function.
15227         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
15228         No longer exported.
15229         (vect_analyze_stmt): Adjust prototype.
15230         (vectorizable_condition): Likewise.
15231         (vectorizable_live_operation): Likewise.
15232         (vectorizable_reduction): Likewise.
15233         (vectorizable_induction): Likewise.
15234         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
15235         cost vector to pass to vectorizable_ and record afterwards.
15236         (vect_model_reduction_cost): Take cost vector argument and adjust.
15237         (vect_model_induction_cost): Likewise.
15238         (vectorizable_reduction): Likewise.
15239         (vectorizable_induction): Likewise.
15240         (vectorizable_live_operation): Likewise.
15241         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
15242         SLP_TREE_NUMBER_OF_VEC_STMTS.
15243         (vect_analyze_slp_cost_1): Remove.
15244         (vect_analyze_slp_cost): Likewise.
15245         (vect_slp_analyze_node_operations): Take visited args and
15246         a target cost vector.  Avoid processing already visited stmt sets.
15247         (vect_slp_analyze_operations): Use a local cost vector to gather
15248         costs and register those of non-discarded instances.
15249         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
15250         (vect_schedule_slp_instance): Remove copying of
15251         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
15252         zero.
15253         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
15254         adding cost.  Record cost entry location.
15255         (vect_prologue_cost_for_slp_op): Function to compute cost of
15256         a constant or invariant generated for SLP vect in the prologue,
15257         split out from vect_analyze_slp_cost_1.
15258         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
15259         (vect_model_promotion_demotion_cost): Likewise.
15260         (vect_model_store_cost): Likewise, make static.
15261         (vect_model_load_cost): Likewise.
15262         (vectorizable_bswap): Add cost vector arg and adjust.
15263         (vectorizable_call): Likewise.
15264         (vectorizable_simd_clone_call): Likewise.
15265         (vectorizable_conversion): Likewise.
15266         (vectorizable_assignment): Likewise.
15267         (vectorizable_shift): Likewise.
15268         (vectorizable_operation): Likewise.
15269         (vectorizable_store): Likewise.
15270         (vectorizable_load): Likewise.
15271         (vectorizable_condition): Likewise.
15272         (vectorizable_comparison): Likewise.
15273         (can_vectorize_live_stmts): Likewise.
15274         (vect_analyze_stmt): Likewise.
15275         (vect_transform_stmt): Adjust calls to vectorizable_*.
15276         * tree-vectorizer.c: Include gimple-pretty-print.h.
15277         (dump_stmt_cost): New function.
15279 2018-05-16  Richard Biener  <rguenther@suse.de>
15281         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
15282         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
15283         * tree-ssa-dse.c: Include tree-ssa-loop.h.
15284         (check_name): New callback.
15285         (dse_classify_store): Track cycles via a visited bitmap of PHI
15286         defs and simplify handling of in-loop and across loop dead stores
15287         and properly fail for loop-variant refs.  Handle byte-tracking with
15288         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
15289         limiting the walk.
15291 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
15293         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
15294         (vect_get_mask_type_for_stmt): Likewise.
15295         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
15296         split out from...
15297         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
15298         to determine the statement's vector type and the vector type that
15299         should be used for calculating nunits.  Deal with cases in which
15300         the type has to be deferred.
15301         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
15302         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
15303         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
15304         (vect_determine_vf_for_stmt): New functions, split out from...
15305         (vect_determine_vectorization_factor): ...here.
15306         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
15307         (vect_get_mask_type_for_stmt): New functions, split out from
15308         vect_determine_vectorization_factor.
15310 2018-05-16  Richard Biener  <rguenther@suse.de>
15312         * tree-cfg.c (verify_gimple_assign_ternary): Properly
15313         verify the [VEC_]COND_EXPR embedded comparison.
15315 2018-05-15  Martin Sebor  <msebor@redhat.com>
15317         PR tree-optimization/85753
15318         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
15319         RECORD_TYPE in addition to ARRAY_TYPE.
15321 2018-05-15  Martin Sebor  <msebor@redhat.com>
15323         PR middle-end/85643
15324         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
15326 2018-05-15  Richard Biener  <rguenther@suse.de>
15328         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
15329         add by_clobber_p one.  Change algorithm to collect all defs
15330         representing uses we need to walk and try reducing them to
15331         a single one before failing.
15332         (dse_dom_walker::dse_optimize_stmt): Adjust.
15334 2018-05-13  Mark Wielaard  <mark@klomp.org>
15336         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
15337         (size_of_loc_descr): Likewise.
15338         (output_loc_operands): Likewise.
15339         (output_loc_operands_raw): Likewise.
15340         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
15341         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
15342         (hash_loc_operands): Likewise.
15343         (compare_loc_operands): Likewise.
15345 2018-05-14  Mark Wielaard  <mark@klomp.org>
15347         * dwarf2out.c (count_index_addrs): New function.
15348         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
15350 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15352         PR tree-optimization/83648
15353         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
15354         return value as malloc candidate.
15356 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15358         PR ipa/85734
15359         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
15360         param as true in call to suggest_attribute.
15362 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
15364         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
15365         -mreadonly-in-sdata.
15367 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15369         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
15370         New pattern.
15371         (aarch64_crypto_aesd_fused): Likewise.
15373 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
15375         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
15376         (movsi_aarch64): Likewise.
15377         (load_pairsi): Likewise.
15378         (load_pairdi): Likewise.
15379         (store_pairsi): Likewise.
15380         (store_pairdi): Likewise.
15381         (load_pairsf): Likewise.
15382         (load_pairdf): Likewise.
15383         (store_pairsf): Likewise.
15384         (store_pairdf): Likewise.
15385         (zero_extend): Likewise.
15386         (trunc): Swap alternatives.
15387         (fcvt_target): Add '?' to prefer w over r.
15389 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
15391         PR target/85756
15392         * config/i386/i386.md: Disallow non-commutative arithmetics in
15393         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
15394         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
15395         in the peephole2 before it.
15397 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
15399         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
15400         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
15401         (ix86_handle_option): Handle -mcldemote.
15402         * config.gcc: New header.
15403         * config/i386/cldemoteintrin.h: New file.
15404         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
15405         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15406         -mcldemote.
15407         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15408         OPTION_MASK_ISA_CLDEMOTE.
15409         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
15410         (ix86_valid_target_attribute_inner_p): Ditto.
15411         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
15412         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
15413         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
15414         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
15415         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
15416         (cldemote): New.
15417         * config/i386/i386.opt: Add -mcldemote.
15418         * config/i386/x86intrin.h: New header.
15419         * doc/invoke.texi: Add -mcldemote.
15421 2018-05-14  Richard Biener  <rguenther@suse.de>
15423         * doc/match-and-simplify.texi: Adjust :s documentation.
15425 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
15427         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
15428         intended memcpy size.
15429         (REORDER_45): Likewise.
15431 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
15433         * sort.cc: New file.
15434         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
15435         * vec.c (qsort_chk): Use gcc_qsort.
15436         * Makefile.in (OBJS-libcommon): Add sort.o.
15437         (build/sort.o): New target.  Use it...
15438         (BUILD_RTL): ... here, and...
15439         (build/gencfn-macros): ... here, and...
15440         (build/genmatch): ... here.
15442 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
15443             Chung-Ju Wu  <jasonwucj@gmail.com>
15445         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
15446         * config/nds32/nds32-graywolf.md: New file.
15447         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
15448         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
15449         pipeline.
15450         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
15451         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
15452         * config/nds32/nds32.md (pipeline_model): Add graywolf.
15453         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
15454         * config/nds32/pipelines.md: Include n15 settings.
15456 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
15457             Chung-Ju Wu  <jasonwucj@gmail.com>
15459         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
15460         * config/nds32/nds32-n13.md: New file.
15461         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
15462         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
15463         pipeline.
15464         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
15465         * config/nds32/nds32.md (pipeline_model): Add n13.
15466         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
15467         * config/nds32/pipelines.md: Include n13 settings.
15469 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
15470             Chung-Ju Wu  <jasonwucj@gmail.com>
15472         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
15473         * config/nds32/nds32-n10.md: New file.
15474         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
15475         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
15476         pipeline.
15477         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
15478         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
15479         * config/nds32/nds32.md (pipeline_model): Add n10.
15480         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
15481         * config/nds32/pipelines.md: Include n10 settings.
15483 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
15484             Kito Cheng  <kito.cheng@gmail.com>
15485             Chung-Ju Wu  <jasonwucj@gmail.com>
15487         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
15488         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15489         Add enum values for DSP extension instructions.
15490         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
15491         New constraints.
15492         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
15493         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
15494         New code iterators.
15495         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
15496         * config/nds32/nds32-dspext.md: New file for DSP implementation.
15497         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
15498         * config/nds32/nds32-intrinsic.md: Likewise.
15499         * config/nds32/nds32_intrinsic.h: Likewise.
15500         * config/nds32/nds32-md-auxiliary.c: Likewise.
15501         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
15502         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
15503         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
15504         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
15505         * config/nds32/nds32-protos.h: New declarations for DSP extension.
15506         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
15507         TYPE_DMAC in switch statement.
15508         * config/nds32/nds32.c: New checking and implementation for DSP
15509         extension instructions.
15510         * config/nds32/nds32.h: Likewise.
15511         * config/nds32/nds32.md: Likewise.
15512         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
15513         * config/nds32/predicates.md: Implement new predicates for DSP
15514         extension.
15516 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
15518         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
15519         Reformat alternatives and attributes so it is easier to identify
15520         which constraints/attributes go with which instruction.
15521         (mov<mode>_hardfloat32, FMOVE64): Likewise.
15522         (mov<mode>_softfloat32, FMOVE64): Likewise.
15523         (mov<mode>_hardfloat64, FMOVE64): Likewise.
15524         (mov<mode>_softfloat64, FMOVE64): Likewise.
15526 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15528         * doc/extend.texi (PowerPC Built-in Functions): Rename this
15529         subsection.
15530         (Basic PowerPC Built-in Functions): The new name of the
15531         subsection previously known as "PowerPC Built-in Functions".
15532         (Basic PowerPC Built-in Functions Available on all Configurations):
15533         New subsubsection.
15534         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
15535         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
15536         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
15537         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
15539 2018-05-11  Martin Jambor  <mjambor@suse.cz>
15541         PR ipa/85655
15542         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
15543         single const.
15545 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
15547         PR target/85733
15548         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
15550 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
15552         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
15553         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
15554         (ix86_handle_option): Handle -mwaitpkg.
15555         * config.gcc: New header.
15556         * config/i386/cpuid.h (bit_WAITPKG): New bit.
15557         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
15558         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
15559         function type.
15560         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15561         OPTION_MASK_ISA_WAITPKG.
15562         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
15563         (ix86_option_override_internal): Add PTA_WAITPKG.
15564         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
15565         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
15566         IX86_BUILTIN_TPAUSE.
15567         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
15568         __builtin_ia32_umwait and __builtin_ia32_tpause.
15569         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
15570         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
15571         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
15572         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
15573         UNSPECV_TPAUSE): New.
15574         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
15575         * config/i386/i386.opt: Add -mwaitpkg.
15576         * config/i386/waitpkgintrin.h: New file.
15577         * config/i386/x86intrin.h: New header.
15578         * doc/invoke.texi: Add -mwaitpkg.
15580 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
15582         PR target/85606
15583         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
15584         equivalent.
15585         (cortex-m0): Use armv6s-m isa.
15586         (cortex-m0plus): Likewise.
15587         (cortex-m1): Likewise.
15588         (cortex-m0.small-multiply): Likewise.
15589         (cortex-m0plus.small-multiply): Likewise.
15590         (cortex-m1.small-multiply): Likewise.
15592 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
15593             Jakub Jelinek  <jakub@redhat.com>
15595         PR tree-optimization/85692
15596         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
15597         source permute as well.
15599 2018-05-11  Martin Liska  <mliska@suse.cz>
15601         PR sanitizer/85556
15602         * doc/extend.texi: Document LLVM style format for no_sanitize
15603         attribute.
15605 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
15607         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
15608         mode_supports_vsx_dform_quad to mode_supports_dq_form.
15609         (mode_supports_vsx_dform_quad): Likewise.
15610         (mode_supports_vmx_dform): Move these functions to be next to the
15611         other mode_supports functions.
15612         (mode_supports_dq_form): Likewise.
15613         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
15614         mode_supports_dq_form.
15615         (reg_offset_addressing_ok_p): Likewise.
15616         (offsettable_ok_by_alignment): Likewise.
15617         (rs6000_legitimate_offset_address_p): Likewise.
15618         (legitimate_lo_sum_address_p): Likewise.
15619         (rs6000_legitimize_address): Likewise.
15620         (rs6000_legitimize_reload_address): Likewise.
15621         (rs6000_secondary_reload_inner): Likewise.
15622         (rs6000_preferred_reload_class): Likewise.
15623         (rs6000_output_move_128bit): Likewise.
15625 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
15627         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
15628         Generate SImode target register for null target.
15629         <case IX86_BUILTIN_XGETBV>: Ditto.
15630         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
15631         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
15633 2018-05-10  Carl Love  <cel@us.ibm.com>
15635         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15636         dcbtt and dcbtstt if operands[2] is 0.
15638 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
15640         PR target/85693
15641         * config/i386/sse.md (usadv64qi): New expander.
15643 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
15645         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
15646         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
15647         -maltivec=be support.
15648         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
15649         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
15650         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
15651         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
15652         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
15653         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
15654         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
15655         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
15656         altivec_vsumsws): Adjust.
15657         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
15658         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
15659         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
15660         support.
15661         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
15662         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
15663         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
15664         (altivec_lve<VI_char>x): Delete expand.
15665         (*altivec_lve<VI_char>x_internal): Rename to...
15666         (altivec_lve<VI_char>x): ... this.
15667         (altivec_lvxl_<mode>): Delete expand.
15668         (*altivec_lvxl_<mode>_internal): Rename to ...
15669         (altivec_lvxl_<mode>): ... this.
15670         (altivec_stvxl_<mode>): Delete expand.
15671         (*altivec_stvxl_<mode>_internal): Rename to ...
15672         (altivec_stvxl_<mode>): ... this.
15673         (altivec_stve<VI_char>x): Delete expand.
15674         (*altivec_stve<VI_char>x_internal): Rename to ...
15675         (altivec_stve<VI_char>x): ... this.
15676         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
15677         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
15678         reduc_plus_scal_<mode>): Adjust.
15679         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
15680         comment.
15681         (rs6000_cpu_cpp_builtins): Adjust.
15682         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
15683         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
15684         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
15685         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
15686         -maltivec=be support.
15687         (rs6000_split_vec_extract_var): Adjust.
15688         (rs6000_split_v4si_init): Adjust.
15689         (swap_selector_for_mode): Delete.
15690         (altivec_expand_lvx_be, altivec_expand_stvx_be,
15691         altivec_expand_stvex_be): Delete.
15692         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
15693         -maltivec=be support.
15694         (rs6000_gimple_fold_builtin): Ditto.
15695         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
15696         Adjust.
15697         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
15698         (TARGET_DIRECT_MOVE_64BIT): Adjust.
15699         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
15700         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
15701         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
15702         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
15703         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
15704         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
15705         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
15706         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
15707         anonymous split): Adjust.
15708         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
15709         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
15711 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
15713         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
15714         when --with-gxx-include-dir is also specified.
15715         * configure: Regenerate.
15717 2018-05-09  Jim Wilson  <jimw@sifive.com>
15719         PR target/84797
15720         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
15721         * config/riscv/t-withmultilib: New.
15722         * config/riscv/withmultilib.h: New.
15723         * doc/install.texi: Document RISC-V --with-multilib-list support.
15725 2018-05-09  Richard Biener  <rguenther@suse.de>
15727         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
15728         vector.
15729         (vect_bb_vectorization_profitable_p): Adjust.  Compute
15730         actual scalar cost using the cost vector and the add_stmt_cost
15731         machinery.
15733 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15735         PR rtl-optimization/85645
15736         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
15737         in the REG_CFA_REGISTER note for LR, don't leave it empty.
15739 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15741         PR rtl-optimization/85645
15742         * shrink-wrap.c (spread_components): Return a boolean saying if
15743         anything was changed.
15744         (try_shrink_wrapping_separate): Iterate spread_components until
15745         nothing changes anymore.
15747 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15749         PR rtl-optimization/85645
15750         * regrename.c (build_def_use): Also kill the chains that include the
15751         destination of a REG_CFA_REGISTER note.
15753 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15755         PR rtl-optimization/85645
15756         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
15757         insn that has a REG_CFA_REGISTER note.
15759 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
15761         * cfgexpand.c (expand_clobber): New function.
15762         (expand_gimple_stmt_1): Use it.
15763         * tree-vect-stmts.c (vect_clobber_variable): New function,
15764         split out from...
15765         (vectorizable_simd_clone_call): ...here.
15766         (vectorizable_store): Emit a clobber either side of an
15767         IFN_STORE_LANES sequence.
15768         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
15770 2018-05-09  Tom de Vries  <tom@codesourcery.com>
15772         PR target/85626
15773         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
15774         (define_insn "trap_if_false"): Add exit after trap.
15776 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
15778         PR rtl-optimization/85638
15779         * bb-reorder.c: Include common/common-target.h.
15780         (create_forwarder_block): New function extracted from...
15781         (fix_up_crossing_landing_pad): ...here.  Rename into...
15782         (dw2_fix_up_crossing_landing_pad): ...this.
15783         (sjlj_fix_up_crossing_landing_pad): New function.
15784         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
15785         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
15786         from both partitions and exit the loop after one iteration.
15788 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15790         Revert:
15791         * doc/extend.texi (PowerPC Built-in Functions): Rename this
15792         subsection.
15793         (Basic PowerPC Built-in Functions): The new name of the
15794         subsection previously known as "PowerPC Built-in Functions".
15795         (Basic PowerPC Built-in Functions Available on all Configurations):
15796         New subsubsection.
15797         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15798         subsubsection.
15799         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15800         subsubsection.
15801         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15802         subsubsection.
15803         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15804         subsubsection.
15806 2018-05-08  Jim Wilson  <jimw@sifive.com>
15808         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
15809         (LD_EMUL_SUFFIX): New.
15810         (LINK_SPEC): Use it.
15812 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15814         * doc/extend.texi (PowerPC Built-in Functions): Rename this
15815         subsection.
15816         (Basic PowerPC Built-in Functions): The new name of the
15817         subsection previously known as "PowerPC Built-in Functions".
15818         (Basic PowerPC Built-in Functions Available on all Configurations):
15819         New subsubsection.
15820         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15821         subsubsection.
15822         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15823         subsubsection.
15824         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15825         subsubsection.
15826         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15827         subsubsection.
15829 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
15831         PR target/85683
15832         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
15833         after cmpelim optimization.
15835 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
15837         * config.gcc: Support "goldmont".
15838         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
15839         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15840         PROCESSOR_GOLDMONT.
15841         * config/i386/i386.c (m_GOLDMONT): Define.
15842         (processor_target_table): Add "goldmont".
15843         (PTA_GOLDMONT): Define.
15844         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
15845         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
15846         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
15847         (fold_builtin_cpu): Add "goldmont".
15848         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
15849         (ix86_option_override_internal): Add "goldmont".
15850         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
15851         (processor_type): Add PROCESSOR_GOLDMONT.
15852         * config/i386/i386.md: Add CPU "glm".
15853         * config/i386/glm.md: New file.
15854         * config/i386/x86-tune.def: Add m_GOLDMONT.
15855         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
15857 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
15859         PR target/85572
15860         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
15861         E_V4DImode.
15862         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
15863         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
15864         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
15866         PR target/85317
15867         * config/i386/i386.c (ix86_fold_builtin): Handle
15868         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
15870         PR target/85480
15871         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
15872         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
15874 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
15876         PR target/85658
15877         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
15878         (check_arch): Likewise.
15879         (check_fpu): Return the result rather than printing it.
15880         (end arch): Fix operator precedence.
15881         (end cpu): Likewise.
15882         (END): Print the result from check_fpu.
15884 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
15885             Alan Hayward  <alan.hayward@arm.com>
15886             David Sherwood  <david.sherwood@arm.com>
15888         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
15889         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
15890         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
15891         (*fcmuo<mode>_and): New patterns.
15893 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
15895         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
15896         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
15897         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
15898         (cmp_op, sve_imm_con): New code attributes.
15899         (SVE_COND_INT_CMP, imm_con): Delete.
15900         (cmp_op): Remove above unspecs from int attribute.
15901         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
15902         to...
15903         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
15904         comparison-specific unspecs.
15905         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
15906         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
15907         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
15908         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
15909         (*vec_fcm<cmp_op><mode>): Rename to...
15910         (*fcm<cmp_op><mode>): ...this and adjust likewise.
15911         (*vec_fcmuo<mode>): Rename to...
15912         (*fcmuo<mode>): ...this and adjust likewise.
15913         (*pred_fcm<cmp_op><mode>): New pattern.
15914         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
15915         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
15916         functions.
15917         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
15918         and UNORDERED.
15919         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
15920         (aarch64_emit_sve_predicated_cond): New function.
15921         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
15922         (aarch64_emit_unspec_cond_or): Replace with...
15923         (aarch64_emit_sve_or_conds): ...this new function.  Use
15924         aarch64_emit_sve_ptrue_op for the individual comparisons and
15925         aarch64_emit_binop to OR them together.
15926         (aarch64_emit_inverted_unspec_cond): Replace with...
15927         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
15928         aarch64_emit_sve_ptrue_op for the comparison and
15929         aarch64_emit_unop to invert the result.
15930         (aarch64_expand_sve_vec_cmp_float): Update after the above
15931         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
15933 2018-05-07  Nathan Sidwell  <nathan@acm.org>
15935         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
15936         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
15937         (Backwards Compatibility): Likewise.
15939 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15941         PR bootstrap/85681
15942         Revert:
15943         2018-05-07  Luis Machado  <luis.machado@linaro.org>
15945         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15946         <prefetch_dynamic_strides>: New const bool field.
15947         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15948         prefetch_dynamic_strides.
15949         (exynosm1_prefetch_tune): Likewise.
15950         (thunderxt88_prefetch_tune): Likewise.
15951         (thunderx_prefetch_tune): Likewise.
15952         (thunderx2t99_prefetch_tune): Likewise.
15953         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15954         to false.
15955         (aarch64_override_options_internal): Update to set
15956         PARAM_PREFETCH_DYNAMIC_STRIDES.
15957         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15958         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15959         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15960         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15961         prefetch-dynamic-strides setting.
15963         2018-05-07  Luis Machado  <luis.machado@linaro.org>
15965         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15966         <minimum_stride>: New const int field.
15967         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15968         minimum_stride field.
15969         (exynosm1_prefetch_tune): Likewise.
15970         (thunderxt88_prefetch_tune): Likewise.
15971         (thunderx_prefetch_tune): Likewise.
15972         (thunderx2t99_prefetch_tune): Likewise.
15973         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15974         (aarch64_override_options_internal): Update to set
15975         PARAM_PREFETCH_MINIMUM_STRIDE.
15976         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15977         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15978         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15979         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15980         stride is constant and is below the minimum stride threshold.
15982 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15984         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
15985         to 512.
15987 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15989         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15990         <prefetch_dynamic_strides>: New const bool field.
15991         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15992         prefetch_dynamic_strides.
15993         (exynosm1_prefetch_tune): Likewise.
15994         (thunderxt88_prefetch_tune): Likewise.
15995         (thunderx_prefetch_tune): Likewise.
15996         (thunderx2t99_prefetch_tune): Likewise.
15997         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15998         to false.
15999         (aarch64_override_options_internal): Update to set
16000         PARAM_PREFETCH_DYNAMIC_STRIDES.
16001         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16002         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16003         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16004         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16005         prefetch-dynamic-strides setting.
16007 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16009         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16010         <minimum_stride>: New const int field.
16011         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16012         minimum_stride field.
16013         (exynosm1_prefetch_tune): Likewise.
16014         (thunderxt88_prefetch_tune): Likewise.
16015         (thunderx_prefetch_tune): Likewise.
16016         (thunderx2t99_prefetch_tune): Likewise.
16017         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
16018         (aarch64_override_options_internal): Update to set
16019         PARAM_PREFETCH_MINIMUM_STRIDE.
16020         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16021         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16022         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16023         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16024         stride is constant and is below the minimum stride threshold.
16026 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
16028         PR c++/85659
16029         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
16030         the type is addressable.  Don't force op into register if it has
16031         BLKmode.
16033 2018-05-05  Roland McGrath  <mcgrathr@google.com>
16035         PR other/77609
16036         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
16037         any section for which we don't know a specific type it should have,
16038         regardless of name.  Previously this was done only for the exact
16039         names ".init_array", ".fini_array", and ".preinit_array".
16040         (default_elf_asm_named_section): Add comment about
16041         relationship with default_section_type_flags and SECTION_NOTYPE.
16042         (get_section): Don't consider it a type conflict if one side has
16043         SECTION_NOTYPE and the other doesn't, as long as neither has the
16044         SECTION_BSS et al used in the default_section_type_flags logic.
16046 2018-05-05  Tom de Vries  <tom@codesourcery.com>
16048         PR target/85653
16049         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
16050         (workaround_barsyncs): New function.
16051         (nvptx_reorg): Use workaround_barsyncs.
16052         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
16053         (define_expand "nvptx_membar_cta"): New define_expand.
16054         (define_insn "*nvptx_membar_cta"): New insn.
16056 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
16058         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
16059         To improve optimization opportunities.
16060         * builtin-types.def: The new needed builtin types for the above.
16062 2018-05-04  Richard Biener  <rguenther@suse.de>
16064         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
16065         * gimple-ssa-store-merging.c
16066         (imm_store_chain_info::output_merged_store): Remove redundant create,
16067         release split_store vector contents on failure.
16068         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
16069         scalar stmt vector on cache hit.
16071 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
16073         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
16074         Xilinx FP support.
16075         * config.gcc (powerpc-xilinx-eabi*): Remove.
16076         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
16077         support.
16078         (fusion_addis_mem_combo_load): Ditto.
16079         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
16080         FP support.
16081         (rs6000_cpu_cpp_builtins): Ditto.
16082         * config/rs6000/rs6000-linux.c
16083         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
16084         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
16085         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
16086         support.
16087         (rs6000_setup_reg_addr_masks): Ditto.
16088         (rs6000_init_hard_regno_mode_ok): Ditto.
16089         (rs6000_option_override_internal): Ditto.
16090         (legitimate_lo_sum_address_p): Ditto.
16091         (rs6000_legitimize_address): Ditto.
16092         (rs6000_legitimize_reload_address): Ditto.
16093         (rs6000_legitimate_address_p): Ditto.
16094         (abi_v4_pass_in_fpr): Ditto.
16095         (setup_incoming_varargs): Ditto.
16096         (rs6000_gimplify_va_arg): Ditto.
16097         (rs6000_split_multireg_move): Ditto.
16098         (rs6000_savres_strategy): Ditto.
16099         (rs6000_emit_prologue_components): Ditto.
16100         (rs6000_emit_epilogue_components): Ditto.
16101         (rs6000_emit_prologue): Ditto.
16102         (rs6000_emit_epilogue): Ditto.
16103         (rs6000_elf_file_end): Ditto.
16104         (rs6000_function_value): Ditto.
16105         (rs6000_libcall_value): Ditto.
16106         * config/rs6000/rs6000.h: Ditto.
16107         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
16108         (TARGET_MINMAX): ... this.  New.
16109         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
16110         * config/rs6000/rs6000.md: Remove Xilinx FP support.
16111         (*movsi_internal1_single): Delete.
16112         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
16113         mfpu=, mxilinx-fpu): Delete.
16114         * config/rs6000/singlefp.h: Delete.
16115         * config/rs6000/sysv4.h: Remove Xilinx FP support.
16116         * config/rs6000/t-rs6000: Ditto.
16117         * config/rs6000/t-xilinx: Delete.
16118         * config/rs6000/titan.md: Adjust for fp_type removal.
16119         * config/rs6000/vsx.md: Remove Xilinx FP support.
16120         (VStype_simple): Delete.
16121         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
16122         * config/rs6000/xfpu.h: Delete.
16123         * config/rs6000/xfpu.md: Delete.
16124         * config/rs6000/xilinx.h: Delete.
16125         * config/rs6000/xilinx.opt: Delete.
16126         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
16127         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
16129 2018-05-04  Tom de Vries  <tom@codesourcery.com>
16131         PR libgomp/85639
16132         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
16133         if ignore == 0.
16135 2018-05-04  Richard Biener  <rguenther@suse.de>
16137         PR middle-end/85627
16138         * tree-complex.c (update_complex_assignment): We are always in SSA form.
16139         (expand_complex_div_wide): Likewise.
16140         (expand_complex_operations_1): Likewise.
16141         (expand_complex_libcall): Preserve EH info of the original stmt.
16142         (tree_lower_complex): Handle removed blocks.
16143         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
16144         on complex multiplication and division libcall builtins.
16146 2018-05-04  Richard Biener  <rguenther@suse.de>
16148         PR middle-end/85574
16149         * fold-const.c (negate_expr_p): Restrict negation of operand
16150         zero of a division to when we know that can happen without
16151         overflow.
16152         (fold_negate_expr_1): Likewise.
16154 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
16156         PR libstdc++/85466
16157         * real.h (real_nextafter): Declare.
16158         * real.c (real_nextafter): New function.
16159         * fold-const-call.c (fold_const_nextafter): New function.
16160         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
16161         CASE_CFN_NEXTTOWARD.
16162         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
16163         even when arg1_mode is different from arg0_mode.
16165 2018-05-03  Nathan Sidwell  <nathan@acm.org>
16167         * doc/extend.texi (Deprecated Features): Remove
16168         -ffriend-injection.
16169         (Backwards Compatibility): Likewise.
16170         * doc/invoke.texi (C++ Language Options): Likewise.
16171         (C++ Dialect Options): Likewise.
16173 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
16175         PR target/85530
16176         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
16177         _mm512_mask_mullox_epi64): New intrinsics.
16179 2018-05-03  Tom de Vries  <tom@codesourcery.com>
16181         PR testsuite/85106
16182         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16183         dump files): Add offload-tree.
16185 2018-05-03  Richard Biener  <rguenther@suse.de>
16187         PR tree-optimization/85615
16188         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
16189         to loops not nested in BBs loop father to avoid creating multi-entry
16190         loops.
16192 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16194         PR tree-optimization/70291
16195         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
16196         arguments.  Change return type to tree.  Emit libcall as a new
16197         statement rather than replacing existing one when inplace_p is true.
16198         (expand_complex_multiplication_components): New function.
16199         (expand_complex_multiplication): Expand floating-point complex
16200         multiplication using the above.
16201         (expand_complex_division): Rename inner_type parameter to type.
16202         Update expand_complex_libcall call-site.
16203         (expand_complex_operations_1): Update expand_complex_multiplication
16204         and expand_complex_division call-sites.
16206 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
16208         PR target/85582
16209         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16210         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16211         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
16212         the highest significant bit of the shift count mask is clear.  In
16213         check whether and[sq]i3 is needed verify that all significant bits
16214         of the shift count other than the highest are set.
16216 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16218         PR libgomp/82428
16219         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
16220         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
16221         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
16222         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
16223         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
16224         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
16225         __builtin_goacc_parlevel_size.
16227 2018-05-02  Richard Biener  <rguenther@suse.de>
16229         PR tree-optimization/85597
16230         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
16231         do not use split vect_get_vec_defs call but call vect_get_slp_defs
16232         directly.
16234 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16236         PR testsuite/85106
16237         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16238         dump files): Add ltrans-tree.
16240 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16242         PR testsuite/85106
16243         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16244         dump files): Add wpa-ipa.
16246 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
16248         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
16249         powerpc*-*-linux*paired* target.
16250         * config/rs6000/750cl.h: Delete.
16251         * config/rs6000/paired.h: Delete.
16252         * config/rs6000/paired.md: Delete.
16253         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
16254         float support.
16255         * config/rs6000/rs6000-builtin.def: Remove paired float support.
16256         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
16257         comment.  Remove paired float support.
16258         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
16259         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
16260         VECTOR_PAIRED.
16261         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
16262         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
16263         declarations.
16264         * config/rs6000/rs6000.c: Remove paired float support.
16265         (paired_expand_vector_init, paired_expand_vector_move,
16266         paired_emit_vector_compare, paired_emit_vector_cond_expr,
16267         (paired_expand_lv_builtin, paired_expand_stv_builtin,
16268         paired_expand_builtin, paired_expand_predicate_builtin,
16269         paired_init_builtins): Delete.
16270         * config/rs6000/rs6000.h: Remove paired float support.
16271         * config/rs6000/rs6000.md: Remove paired float support.
16272         (move_from_CR_ov_bit): Delete.
16273         * config/rs6000/rs6000.opt (mpaired): Delete.
16274         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
16275         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
16277 2018-05-02  Richard Biener  <rguenther@suse.de>
16279         PR middle-end/85567
16280         * gimplify.c (gimplify_save_expr): When in SSA form allow
16281         SAVE_EXPRs to compute to SSA vars.
16283 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
16285         PR target/85582
16286         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16287         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16288         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
16289         clobber operands[2], instead use a new pseudo.  Formatting fixes.
16291 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
16293         PR tree-optimization/85586
16294         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
16295         exit early for statements in the same group if the accesses are
16296         not strided.
16298 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16300         PR lto/85451
16301         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
16302         error message.
16304 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
16306         PR tree-optimization/85143
16307         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
16309 2018-05-01  Tom de Vries  <tom@codesourcery.com>
16311         PR lto/85451
16312         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
16313         not found" error message.
16315 2018-05-01  Tom de Vries  <tom@codesourcery.com>
16317         PR other/83786
16318         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
16319         * vec.c (test_ordered_remove_if): New function.
16320         (vec_c_tests): Call test_ordered_remove_if.
16321         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
16322         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
16323         * tree-vect-patterns.c (vect_pattern_recog_1): Use
16324         VEC_ORDERED_REMOVE_IF.
16326 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16328         PR tree-optimization/82665
16329         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
16330         pointer subtraction where arguments come from a memchr call.
16332 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
16334         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
16335         --push-state --as-needed and --pop-state instead of --as-needed and
16336         --no-as-needed if ld supports it.
16337         * configure: Regenerated.
16339         PR web/85578
16340         * doc/install.texi2html: Replace _002d with - and _002a with * in
16341         generated html files using sed.
16343 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16345         PR c++/85523
16346         * gcc-rich-location.c (blank_line_before_p): New function.
16347         (use_new_line): New function.
16348         (gcc_rich_location::add_fixit_insert_formatted): New function.
16349         * gcc-rich-location.h
16350         (gcc_rich_location::add_fixit_insert_formatted): New function.
16352 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16354         * selftest.c (assert_streq): Rename "expected" and "actual" to
16355         "val1" and "val2".  Extend NULL-handling to cover both inputs
16356         symmetrically, while still requiring both to be non-NULL for a pass.
16357         * selftest.h (assert_streq): Rename "expected" and "actual" to
16358         "val1" and "val2".
16359         (ASSERT_EQ): Likewise.
16360         (ASSERT_EQ_AT): Likewise.
16361         (ASSERT_KNOWN_EQ): Likewise.
16362         (ASSERT_KNOWN_EQ_AT): Likewise.
16363         (ASSERT_NE): Likewise.
16364         (ASSERT_MAYBE_NE): Likewise.
16365         (ASSERT_MAYBE_NE_AT): Likewise.
16366         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
16367         the assertion to pass.
16368         (ASSERT_STREQ_AT): Likewise.
16370 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
16372         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
16373         interaction with -pie.
16375 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16377         * selftest.h: Fix alphabetization of per-source-file selftest
16378         declarations.
16380 2018-04-30  Jason Merrill  <jason@redhat.com>
16382         PR c++/61982 - dead stores to destroyed objects.
16383         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
16384         of clobber.
16386 2018-04-30  Jason Merrill  <jason@redhat.com>
16388         * tree.c (build_clobber): New.
16389         * tree.h: Declare it.
16390         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
16392 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16394         * diagnostic-show-locus.c (layout::layout): Update for
16395         location_get_source_line returning a char_span.
16396         (struct char_span): Move to input.h.
16397         (struct correction): Update for fields in char_span becoming
16398         private.
16399         (struct source_line): Update for location_get_source_line
16400         returning a char_span.
16401         (layout::print_line): Likewise.
16402         * edit-context.c (edited_file::print_content): Likewise.
16403         (edited_file::print_diff_hunk): Likewise.
16404         (edited_file::print_run_of_changed_lines): Likewise.
16405         (edited_file::get_num_lines): Likewise.
16406         (edited_line::edited_line): Likewise.
16407         * final.c (asm_show_source): Likewise.
16408         * input.c (location_get_source_line): Convert return type
16409         from const char * to char_span, losing the final "line_len"
16410         param.
16411         (dump_location_info): Update for the above.
16412         (get_substring_ranges_for_loc): Likewise.  Use a char_span
16413         when handling the literal within the line.
16414         (test_reading_source_line): Update for location_get_source_line
16415         returning a char_span.
16416         * input.h (class char_span): Move here from
16417         diagnostic-show-locus.c, converting from a struct to a class.
16418         Make data members private.
16419         (char_span::operator bool): New.
16420         (char_span::length): New.
16421         (char_span::get_buffer): New.
16422         (char_span::operator[]): New.
16423         (char_span::subspan): Make const.
16424         (char_span::xstrdup): New.
16425         (location_get_source_line): Convert return type from const char *
16426         to char_span, losing the final "line_size" param.
16428 2018-04-30  Jan Hubicka  <jh@suse.cz>
16430         * lto-wrapper.c (ltrans_priorities): New static var.
16431         (cmp_priority): New.
16432         (run_gcc): Read priorities and if doing parallel build order
16433         the Makefile by them.
16435 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16437         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
16439 2018-04-30  Richard Biener  <rguenther@suse.de>
16441         * tree-cfg.c (verify_address): Remove base argument, add
16442         flag whether to check TREE_ADDRESSABLE and do that.
16443         (verify_expr): Remove.
16444         (verify_types_in_gimple_reference): Add pieces from verify_expr.
16445         (verify_gimple_assign_single): Likewise.
16446         (verify_gimple_switch): Likewise.
16447         (verify_expr_location_1): Dereference tp once.  Add (disabled)
16448         piece from verify_expr.
16449         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
16451 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
16453         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
16455 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
16457         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
16458         (small_data_pattern): Likewise.
16459         (arc_rewrite_small_data): Likewise.
16460         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
16461         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
16462         (get_symbol_alignment): New function.
16463         (legitimate_small_data_address_p): Likewise.
16464         (legitimate_scaled_address): Update, call
16465         legitimate_small_data_address_p.
16466         (output_sdata): New static variable.
16467         (arc_print_operand): Update how we handle small data operands.
16468         (arc_print_operand_address): Likewise.
16469         (arc_legitimate_address_p): Update, use
16470         legitimate_small_data_address_p.
16471         (arc_rewrite_small_data_p): Remove.
16472         (arc_rewrite_small_data_1): Likewise.
16473         (arc_rewrite_small_data): Likewise.
16474         (small_data_pattern): Likewise.
16475         (compact_sda_memory_operand): Update to use
16476         legitimate_small_data_address_p and get_symbol_alignment.
16477         (prepare_move_operands): Don't rewite sdata pattern.
16478         (prepare_extend_operands): Remove.
16479         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
16480         pattern.
16481         (zero_extendqisi2): Likewise.
16482         (zero_extendhisi2): Likewise.
16483         (extendqihi2): Likewise.
16484         (extendqisi2): Likewise.
16485         (extendhisi2): Likewise.
16486         (addsi3): Likewise.
16487         (subsi3): Likewise.
16488         (andsi3): Likewise.
16489         * config/arc/constraints.md (Usd): Change it to memory constraint.
16491 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
16493         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
16494         as source of std instructions.
16495         * config/arc/arc.md (movsi_insn): Update pattern predicate to
16496         allow 6-bit constants as source for store instructions.
16497         (movdi_insn): Update instruction pattern to allow 6-bit constants
16498         as source for store instructions.
16500 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
16502         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
16504 2018-04-30  Nathan Sidwell  <nathan@acm.org>
16505             Sandra Loosemore <sandra@codesourcery.com>
16507         * dumpfile.c (dump_open): Allow '-' for stdout.
16508         * doc/invoke.texi (Developer Options): Document dump filename
16509         determination early.  Document stdin/stdout selection.
16511 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
16513         Microblaze Target: PIC data text relative
16515         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
16516         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
16517         Add declaration.
16518         * config/microblaze/microblaze.h (microblaze_constant_address_p):
16519         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
16520         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
16521         New addressing mode for data-text relative position indepenedent code.
16522         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
16523         'ADDRESS_SYMBOLIC_TXT_REL'.
16524         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
16525         (microblaze_legitimate_pic_operand): Exclude function calls from
16526         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
16527         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
16528         addresses cases.
16529         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16530         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16531         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
16532         for 'address + offset'.
16533         (microblaze_expand_prologue): Add new function prologue call for
16534         'r20' assignation.
16535         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
16536         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
16537         table in case of TARGET_PIC_DATA_TEXT_REL.
16538         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
16539         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
16540         Add new macros 'UNSPEC_TEXT',
16541         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
16542         + exclude function calls from 'UNSPEC_PLT' in case of data text
16543         relative mode.
16544         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16545         new target hook for generating address diff vector tables in case of
16546         flag_pic.
16547         * doc/tm.texi : Regenerate.
16548         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
16549         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
16550         of addr diff vector generation.
16551         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16552         target hook definition.
16553         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
16554         Add default function for generate_pic_addr_diff_vec -> flag_pic.
16555         * doc/invoke.texi (Add new pic option): Add new microblaze pic
16556         option for data text relative.
16558 2018-04-30  Richard Biener  <rguenther@suse.de>
16560         * tree-chrec.h (evolution_function_is_constant_p): Remove
16561         redundant check.
16562         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
16564 2018-04-30  Richard Biener  <rguenther@suse.de>
16566         PR bootstrap/85571
16567         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
16569 2018-04-30  Richard Biener  <rguenther@suse.de>
16571         PR tree-optimization/28364
16572         PR tree-optimization/85275
16573         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
16574         copying first exit test.
16576 2018-04-28  Mark Wielaard  <mark@klomp.org>
16578         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
16579         dwarf_version >= 5.
16580         (dwarf_AT): Handle DW_AT_addr_base.
16581         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
16583 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
16585         PR target/84431
16586         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
16587         (*ashl<dwi>3_doubleword_mask_1): Ditto.
16588         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
16589         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
16591 2018-04-28  Richard Biener  <rguenther@suse.de>
16593         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
16594         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
16595         to reflect use.  Only add interesting stmts.
16597 2018-04-27  Martin Jambor  <mjambor@suse.cz>
16599         PR ipa/85549
16600         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
16601         the jump function allows for passing through aggregate values.
16603 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
16605         * input.h (in_system_header_at): Convert from macro to inline
16606         function.
16607         (from_macro_expansion_at): Likewise.
16608         (from_macro_definition_at): Likewise.
16610 2018-04-27  Jeff Law  <law@redhat.com>
16612         * config.gcc: Mark tile* targets as deprecated/obsolete.
16614 2018-04-27  Richard Biener  <rguenther@suse.de>
16616         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
16617         fix for ILP32.
16619 2018-04-27  Richard Biener  <rguenther@suse.de>
16621         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
16623 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
16625         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
16626         with Yd constraint. Set "preferred_for_speed" attribute from
16627         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
16628         with Yd constraint.
16629         (*movdi_internal): Ditto.
16630         (movti_interunit splitters): Remove
16631         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
16632         (movdi_interunit splitters): Ditto.
16633         * config/i386/constraints.md (Ye): Remove.
16634         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
16636 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16638         PR target/85512
16639         * config/aarch64/constraints.md (Usg): Limit to 31.
16640         (Usj): Limit to 63.
16642 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
16644         PR tree-optimization/85529
16645         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
16646         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
16647         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
16648         zero extension or masking of the MSB bit.
16649         (optimize_range_tests): Add FIRST_BB argument, pass it through
16650         to optimize_range_tests_var_bound.
16651         (maybe_optimize_range_tests, reassociate_bb): Adjust
16652         optimize_range_tests callers.
16654 2018-04-26  Richard Biener  <rguenther@suse.de>
16655             Jakub Jelinek  <jakub@redhat.com>
16657         * cgraph.h (symbol_table): Just declare debug method here.
16658         * symtab.c (symbol_table::debug): Define.
16660 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
16662         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
16664 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
16666         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
16667         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
16668         (*movdi_internal): Substitute Yi and Yj constraint with x
16669         and Ym and Yn constraint with y constraint.  Update "isa"
16670         attribute and set "preferred_for_speed" attribute from
16671         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
16672         (*movsi_internal): Ditto.
16673         (*movdf_internal): Ditto.
16674         (*movsf_internal): Ditto.
16675         (*zero_extendsidi2): Ditto.
16676         * config/i386/sse.md (vec_set<mode>_0): Ditto.
16677         (sse2_loadld): Ditto.
16678         (*vec_extract<ssevecmodelower>_0): Ditto.
16679         (*vec_extractv4si_0_zext_sse4): Ditto.
16680         (vec_concatv2di): Ditto.
16681         (*vec_dup<mode>): Ditto.
16682         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
16683         * config/i386/constraints.md (Yi): Remove.
16684         (Yj): Remove.
16685         (Ym): Remove.
16686         (Yn): Remove.
16688 2018-04-26  Nathan Sidwell  <nathan@acm.org>
16690         * dumpfile.c (dump_open): New.
16691         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
16692         (dump_finish): Detect stdio/stderr by value not name.
16694 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
16696         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
16698 2018-04-26  Tom de Vries  <tom@codesourcery.com>
16700         PR target/84952
16701         * config/nvptx/nvptx.c (verify_neutering_jumps)
16702         (verify_neutering_labels): New function
16703         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
16705 2018-04-26  Tom de Vries  <tom@codesourcery.com>
16707         PR target/84025
16708         * config/nvptx/nvptx.c (needs_neutering_p): New function.
16709         (nvptx_single): Use needs_neutering_p to skip over insns that do not
16710         need neutering.
16712 2018-04-26  Richard Biener <rguenther@suse.de>
16713             Tom de Vries  <tom@codesourcery.com>
16715         PR lto/85422
16716         * lto-streamer-out.c (output_function): Fixup loops if required to match
16717         discovery done in the reader.
16719 2018-04-26  Richard Biener  <rguenther@suse.de>
16721         PR tree-optimization/85116
16722         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
16723         have a loop exit from the single latch predecessor.  Remove
16724         case of header with just condition.
16725         (ch_base::copy_headers): Exclude infinite loops from any
16726         processing.
16727         (pass_ch::execute): Record exits.
16729 2018-04-26  Richard Biener  <rguenther@suse.de>
16731         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
16732         prologue cost vector and pass it to vect_get_load_cost.
16733         (vect_get_peeling_costs_all_drs): Likewise.
16734         (vect_peeling_hash_get_lowest_cost): Likewise.
16735         (vect_enhance_data_refs_alignment): Likewise.
16737 2018-04-26  Richard Biener  <rguenther@suse.de>
16739         PR middle-end/85450
16740         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
16741         checking of integer<->pointer conversions.
16742         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
16743         sign-/zero-extending pointer types.
16744         (expand_omp_for_static_chunk): Likewise.
16746 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
16747             Jean Lee  <xiaoyur347@gmail.com>
16749         * config/mips/mips.c (mips_asan_shadow_offset): New function.
16750         (TARGET_ASAN_SHADOW_OFFSET): Define.
16751         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
16752         true for -fsanitize=address.
16754 2018-04-25  Mark Wielaard  <mark@klomp.org>
16756         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
16757         shorter ones.
16759 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
16761         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
16762         than "alu", remove explicit "memory" and "imm_disp" attributes.
16763         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
16765         PR middle-end/85414
16766         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
16767         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
16768         gen_lowpart_no_emit.
16770 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
16772         PR target/85473
16773         * config/i386/i386.c (ix86_expand_builtin): Change memory
16774         operand to XI, extend p0 to Pmode.
16775         * config/i386/i386.md: Change unspec volatile and operand
16776         1 mode to XI, change operand 0 mode to P.
16778 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16780         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
16781         GET_MODE_MASK before any checking.
16782         (nds32_can_use_bset_p): Likewise.
16783         (nds32_can_use_btgl_p): Likewise.
16785 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16787         * config/nds32/nds32-doubleword.md: New define_split pattern for
16788         illegal register number.
16790 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16792         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
16794 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16796         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
16798 2018-04-25  Richard Biener  <rguenther@suse.de>
16800         * lto-streamer.h (LTO_major_version): Bump to 8.
16802 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
16804         * BASE-VER: Set to 9.0.0.
16806 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
16808         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
16809         in __abskf2 and __powikf2.
16811 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16813         PR target/85512
16814         * config/aarch64/constraints.md (Usg, Usj): New constraints.
16815         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
16816         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
16817         Use the above on operand 2.  Reindent.
16818         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
16820 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
16822         PR target/85485
16823         * common/config/i386/i386-common.c (ix86_handle_option): Don't
16824         handle OPT_mcet.
16825         * config/i386/i386.opt (mcet): Removed.
16826         * doc/install.texi: Remove -mcet documentation.
16827         * doc/invoke.texi: Likewise.
16829 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
16831         PR target/85485
16832         * doc/install.texi: Remove -mcet from bootstrap-cet.
16834 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
16836         PR target/85511
16837         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
16838         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
16839         if TARGET_64BIT.
16841         PR target/85503
16842         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
16843         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
16844         containing a CONST_VECTOR.
16846 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
16848         * doc/install.texi: Update newlib dependency for nvptx.
16850 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
16852         PR target/85508
16853         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
16854         instead of INTVAL when shifting x left.
16856 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
16858         PR tree-optimization/85478
16859         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
16860         vect_grouped_store_supported for single element vectors.
16862 2018-04-24  Richard Biener  <rguenther@suse.de>
16864         PR target/85491
16865         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
16866         load cost increase to the case of non-constant step.
16868 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
16870         PR target/84828
16871         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
16872         destination if any_malformed_asm.
16874 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
16876         PR middle-end/85496
16877         * expr.c (store_field): In the bitfield case, if the value comes from
16878         a function call and is returned in registers by means of a PARALLEL,
16879         do not change the mode of the temporary unless BLKmode and VOIDmode.
16881 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
16883         PR rtl-optimization/85423
16884         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
16885         dependencies to debug insns when the previous insn is non-debug.
16887 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
16889         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
16890         enums into a single definition.
16891         (fls): Fix predicates and printing.
16892         (seti): Likewise.
16894 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
16896         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
16897         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
16898         and short u6 immediate.
16899         (check_if_valid_sleep_operand): Remove.
16900         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
16902 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16904         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
16905         flag_always_save_lp condition.
16906         * config/nds32/nds32.opt (malways-save-lp): New option.
16908 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
16910         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
16911         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
16912         * config/nds32/nds32.h
16913         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
16914         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
16916 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
16918         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
16919         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
16921 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
16922             Chung-Ju Wu  <jasonwucj@gmail.com>
16924         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
16925         Declare.
16926         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
16927         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
16929 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16931         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
16933 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16935         * config/nds32/nds32-protos.h (nds32_data_alignment,
16936         nds32_local_alignment): Declare.
16937         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
16938         nds32_local_alignment): New functions.
16939         (TARGET_CONSTANT_ALIGNMENT): Define.
16940         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
16942 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16944         * config/nds32/nds32.c
16945         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
16946         (TARGET_MODES_TIEABLE_P): Likewise.
16948 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16950         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
16951         level Ofast and Og.
16953 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
16954             Chung-Ju Wu  <jasonwucj@gmail.com>
16956         * config/nds32/constants.md (unspec_volatile_element): Add enum values
16957         for unaligned access.
16958         * config/nds32/nds32-intrinsic.c: Implementation of expanding
16959         unaligned access.
16960         * config/nds32/nds32-intrinsic.md: Likewise.
16961         * config/nds32/nds32_intrinsic.h: Likewise.
16962         * config/nds32/nds32.h (nds32_builtins): Likewise.
16963         * config/nds32/nds32.opt (munaligned-access): New option.
16964         * config/nds32/nds32.c (nds32_asm_file_start): Display
16965         flag_unaligned_access status.
16967 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
16969         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
16970         -mno-relax is present.
16971         * config/riscv/linux.h (LINK_SPEC): Ditto.
16973 2018-04-20  Martin Sebor  <msebor@redhat.com>
16975         PR c/85365
16976         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
16977         for null pointers.
16978         (gimple_fold_builtin_stxcpy_chk): Same.
16979         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
16981 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
16983         PR target/85456
16984         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
16985         __powikf2 when long double is IEEE 128-bit.
16987 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
16989         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
16990         step to make sure stack always aligned.
16992 2018-04-20  Carl Love  <cel@us.ibm.com>
16994         PR target/83402
16995         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
16996         size check for arg0.
16998 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
16999             Tom de Vries  <tom@codesourcery.com>
17001         PR target/85445
17002         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
17003         Emit insns for calls too.
17004         (nvptx_find_par): Always look for worker-level predecessor insn.
17005         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
17006         calls.
17007         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
17008         (nvptx_process_pars): Propagate frames for calls.
17010 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
17012         PR target/85469
17013         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
17014         Removed.
17015         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
17016         (ix86_handle_option): Don't handle OPT_mibt.
17017         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
17018         __SHSTK__.
17019         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
17020         has_ibt and ibt.
17021         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
17022         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
17023         (ix86_target_macros): Define __CET__ with flag_cf_protection
17024         for -fcf-protection.
17025         * config/i386/i386.c (isa2_opts): Remove -mibt.
17026         * config/i386/i386.h (TARGET_IBT): Removed.
17027         (TARGET_IBT_P): Likewise.
17028         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
17029         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
17030         * config/i386/i386.opt (mcet): Update help message.
17031         (mshstk): Likewise.
17032         (mibt): Removed.
17033         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
17034         -mcet as an alias for -mshstk.
17036 2018-04-20  Richard Biener <rguenther@suse.de>
17038         PR middle-end/85475
17039         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
17040         complexity by forcing a single use of the multiply operand.
17042 2018-04-20  Martin Jambor  <mjambor@suse.cz>
17044         ipa/85449
17045         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
17046         recursion dependency to only apply to non-clones.
17048 2018-04-20  Martin Jambor  <mjambor@suse.cz>
17050         ipa/85447
17051         * ipa-cp.c (create_specialized_node): Check that clones of
17052         self-recursive edges exist during IPA-CP.
17054 2018-04-19  Toon Moene  <toon@moene.org>
17056         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
17057         by -O3.
17059 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
17061         PR tree-optimization/85467
17062         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
17063         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
17064         VECTOR_CST element to type.
17066 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
17068         PR target/85397
17069         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
17070         * config/i386/i386.md (builtin_setjmp_setup): Removed.
17071         (builtin_longjmp): Likewise.
17072         (save_stack_nonlocal): New pattern.
17073         (restore_stack_nonlocal): Likewise.
17075 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
17077         PR target/85404
17078         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17079         Replace ASM_OUTPUT_LABEL with fprintf.
17081 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
17083         PR target/85417
17084         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17085         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
17086         * config/i386/i386-c.c (ix86_target_macros_internal): Also
17087         define __IBT__ and __SHSTK__ for -fcf-protection.
17088         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
17089         TARGET_IBT.
17090         (ix86_trampoline_init): Likewise.
17091         (x86_output_mi_thunk): Likewise.
17092         (ix86_notrack_prefixed_insn_p): Likewise.
17093         (ix86_option_override_internal): Don't disallow -fcf-protection.
17094         * config/i386/i386.md (rdssp<mode>): Also enable for
17095         -fcf-protection.
17096         (incssp<mode>): Likewise.
17097         (nop_endbr): Likewise.
17098         * config/i386/i386.opt (mcet): Change help message to built-in
17099         functions only.
17100         (mibt): Likewise.
17101         (mshstk): Likewise.
17102         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
17103         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
17104         enable CET built-in functions.
17106 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
17108         * common/config/i386/i386-common.c
17109         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
17110         OPTION_MASK_ISA_MOVDIRI_UNSET,
17111         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
17112         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
17113         * config.gcc (movdirintrin.h): New header.
17114         * config/i386/cpuid.h (bit_MOVDIRI,
17115         bit_MOVDIR64B): New bits.
17116         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
17117         and -mmvodir64b.
17118         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
17119         (VOID, PVOID, PCVOID)): New function types.
17120         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
17121         __builtin_ia32_directstoreu_u64,
17122         __builtin_ia32_movdir64b): New builtins.
17123         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
17124         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
17125         and -mmovdiri.
17126         (ix86_valid_target_attribute_inner_p): Ditto.
17127         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
17128         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
17129         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
17130         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
17131         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
17132         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
17133         (movdiri<mode>, movdir64b_<mode>): New.
17134         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
17135         * config/i386/immintrin.h: Include movdirintrin.h.
17136         * config/i386/movdirintrin.h: New file.
17137         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
17139 2018-04-19  Richard Biener  <rguenther@suse.de>
17141         PR middle-end/85455
17142         * cfg.c (clear_bb_flags): When loop state says we have
17143         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
17145 2018-04-19  Richard Biener  <rguenther@suse.de>
17147         PR tree-optimization/84737
17148         * tree-vect-data-refs.c (vect_copy_ref_info): New function
17149         copying restrict info.
17150         (vect_setup_realignment): Use it.
17151         * tree-vectorizer.h (vect_copy_ref_info): Declare.
17152         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
17153         the first DR to all generated stores.
17154         (vectorizable_load): Likewise for loads.
17156 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
17158         PR tree-optimization/85446
17159         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
17160         the integral and pointer types to have the same precision.
17162         * doc/install.texi: Document --disable-cet being the default and
17163         --enable-cet=auto.
17165 2018-04-18  Martin Liska  <mliska@suse.cz>
17167         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
17168         style.
17170 2018-04-18  Martin Liska  <mliska@suse.cz>
17172         Revert
17173         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
17175         PR ipa/83983
17176         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17177         arguments if they are comparable.
17179 2018-04-18  Martin Liska  <mliska@suse.cz>
17181         Revert
17182         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
17184         PR lto/84805
17185         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17186         incomplete types.
17188 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
17190         PR target/85388
17191         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
17192         ENDBR after calling __morestack.
17194 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
17196         PR jit/85384
17197         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
17198         by using gcc_base_ver to generate a gcc_driver_version, and use
17199         it when generating GCC_DRIVER_NAME.
17200         * configure: Regenerate.
17202 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
17204         PR target/81084
17205         * config.gcc: Obsolete powerpc*-*-*spe*.
17207 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17209         PR debug/84637
17210         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
17211         (stabstr_D): Change type of unum from unsigned int to
17212         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
17213         type.
17215 2018-04-17  Jim Wilson  <jimw@sifive.com>
17217         PR 84856
17218         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
17219         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
17220         Set arg_pointer_offset after using pretend_args_size.
17222 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17224         PR rtl-optimization/85431
17225         * dse.c (record_store): Ignore zero width stores.
17227         PR sanitizer/85230
17228         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
17229         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
17230         __builtin_stack_restore rather than after it.
17231         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
17232         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
17233         argument instead of virtual_dynamic_stack_rtx.
17235 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17237         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
17238         New prototype.
17239         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
17240         Add note to error message to explain internal mapping of overloaded
17241         built-in function name to non-overloaded built-in function name.
17242         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
17243         function.
17245 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
17247         PR target/85424
17248         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
17249         where the inputs overlap with the output.
17251 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17253         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
17254         (=v, v) alternative and explicit "memory" attribute.
17255         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
17256         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17257         attributes.
17258         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
17259         "sselog1" type instead of "sselog".
17260         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
17261         "sselog".  Remove explicit "memory" attribute.
17262         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
17263         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17264         attributes.
17265         (vec_extract_hi_v32hi): Merge all alternatives into one, use
17266         "sselog1" type instead of "sselog".  Remove explicit "memory"
17267         attribute.
17268         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
17269         use "sselog1" type instead of "sselog".  Remove explicit "memory"
17270         attribute.
17271         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
17272         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17273         attributes.
17274         (vec_extract_hi_v64qi): Merge all alternatives into one, use
17275         "sselog1" type instead of "sselog".  Remove explicit "memory"
17276         attribute.
17277         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
17278         use "sselog1" type instead of "sselog".  Remove explicit "memory"
17279         attribute.
17281         PR target/85430
17282         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
17284         PR middle-end/85414
17285         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
17286         on a SUBREG.
17288 2018-04-17  Martin Jambor  <mjambor@suse.cz>
17290         PR ipa/85421
17291         * ipa-cp.c (create_specialized_node): Call
17292         expand_all_artificial_thunks if necessary.
17294 2018-04-17  Martin Liska  <mliska@suse.cz>
17296         PR lto/85405
17297         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
17298         in message, remote space in between '_G' and '('.
17300 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17302         PR target/85281
17303         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
17304         avx512f_vmcmp<mode>3<round_saeonly_name>,
17305         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
17306         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
17307         avx512f_rndscale<mode><round_saeonly_name>,
17308         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
17309         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
17310         Use %<iptr>2 instead of %2 for -masm=intel.
17311         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
17312         avx512f_vcvttss2usi<round_saeonly_name>,
17313         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
17314         -masm=intel.
17315         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
17316         avx512f_vcvttsd2usi<round_saeonly_name>,
17317         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
17318         Use %q1 instead of %1 for -masm=intel.
17319         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
17320         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
17321         of %3 for -masm=intel.
17322         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
17323         -masm=intel.
17324         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
17325         -masm=intel.
17326         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
17327         -masm=intel.
17328         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
17329         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
17330         %g1.
17331         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
17332         -masm=intel.
17333         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
17334         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
17335         %g1 and one with %0 and %1.
17336         (avx512er_vmrcp28<mode><round_saeonly_name>,
17337         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
17338         %1 for -masm=intel.
17339         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
17340         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
17341         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
17342         of %0 and %{%4%} for -masm=intel.
17343         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
17344         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
17345         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
17346         order of %0 and %{%5%}%{z%} for -masm=intel.
17348 2018-04-17  Jan Hubicka  <jh@suse.cz>
17350         PR lto/85405
17351         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
17353 2018-04-17  Martin Liska  <mliska@suse.cz>
17355         PR ipa/85329
17356         * multiple_target.c (create_dispatcher_calls): Set apostrophes
17357         for target_clone error message.  Make default implementation
17358         clone to be a local declaration.
17359         (separate_attrs): Add new argument and check for an empty
17360         string.
17361         (expand_target_clones): Handle it.
17362         (ipa_target_clone): Make redirection just for target_clones
17363         functions.
17365 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
17366             Tom de Vries  <tom@codesourcery.com>
17368         PR middle-end/84955
17369         * omp-expand.c (expand_oacc_for): Add dummy false branch for
17370         tiled basic blocks without omp continue statements.
17372 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
17374         PR target/83660
17375         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
17376         vec_extract expression as having side effects to make sure it gets
17377         a cleanup point.
17379 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
17381         PR target/85403
17382         * config/i386/i386.c (get_builtin_code_for_version): Check
17383         error_mark_node.
17385 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
17387         PR target/84331
17388         * config.gcc: Support "skylake".
17389         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17390         PROCESSOR_SKYLAKE.
17391         * config/i386/i386.c (m_SKYLAKE): Define.
17392         (processor_target_table): Add "skylake".
17393         (ix86_option_override_internal): Add "skylake".
17394         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
17395         PROCESSOR_CANNONLAKE.
17396         (get_builtin_code_for_version): Fix priority for
17397         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
17398         PROCESSOR_SKYLAKE-AVX512.
17399         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
17400         (processor_type): Add PROCESSOR_SKYLAKE.
17402 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
17403             Jason Merrill  <jason@redhat.com>
17405         PR c++/85112
17406         * convert.c (convert_to_integer_1): Use direct recursion for
17407         enumeral types and types with a precision less than the number
17408         of bits in their mode.
17410 2018-04-16  Julia Koval  <julia.koval@intel.com>
17412         PR target/84413
17413         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
17414         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
17416 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
17418         PR target/85293
17419         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
17420         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
17421         and -mno-direct-move.
17423 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
17425         PR target/83402
17426         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
17427         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
17428         Ensure negative shifts result in {0}.
17430 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
17432         PR rtl-optimization/79916
17433         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
17434         regs (if any) to define how to gnerate SD moves when LRA is in
17435         progress.
17437 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
17439         PR rtl-optimization/85393
17440         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
17441         * except.c (expand_dw2_landing_pad_for_region): Make static.
17442         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
17443         a label and unconditional jump to old_bb, rather than
17444         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
17445         basic block.
17447         PR rtl-optimization/85376
17448         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
17449         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
17450         instead of a specific value.
17452 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
17453             Bin Cheng  <bin.cheng@arm.com>
17455         PR tree-optimization/82965
17456         PR tree-optimization/83991
17457         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
17458         by_profile_only parameter.
17459         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
17460         information if the loop was predicted to iterate too many times.
17461         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
17463 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
17465         PR lto/71991
17466         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
17467         always inline.
17469 2018-04-13  Martin Liska  <mliska@suse.cz>
17470             Jakub Jelinek  <jakub@redhat.com>
17472         PR middle-end/81657
17473         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
17474         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
17475         * builtins.c (expand_builtin_memory_copy_args): Use
17476         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
17477         handle dest_addr == pc_rtx.
17479 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
17481         PR target/85291
17482         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
17483         asked to not generate direct moves.
17484         (fix_trunc<mode>si2_stfiwx): Similar.
17485         (fix_trunc<mode>si2_internal): Similar.
17487 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
17489         PR debug/83157
17490         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
17491         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
17492         lookup if dest in some wider mode is known to be const0_rtx and
17493         if so, record permanent equivalence for it to be ZERO_EXTEND of
17494         the narrower mode destination.
17496 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
17498         * lto-streamer-out.c (output_function): Revert 259346.
17499         * omp-expand.c (expand_oacc_for): Likewise.
17501 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
17503         PR rtl-optimization/85354
17504         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
17505         * sel-sched.c (sel_global_init): ... here.
17507 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
17509         PR target/85238
17510         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
17511         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
17512         mode for PE-COFF targets.
17513         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
17514         (i386_pe_asm_lto_end): Likewise.
17515         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
17516         (TARGET_ASM_LTO_END): Likewise.
17517         * config/i386/winnt.c (saved_debug_info_level): New static variable.
17518         (i386_pe_asm_lto_start): New function.
17519         (i386_pe_asm_lto_end): Likewise.
17521 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
17522             Richard Biener  <rguenther@suse.de>
17524         PR middle-end/84955
17525         * lto-streamer-out.c (output_function): Fix CFG loop state before
17526         streaming out.
17527         * omp-expand.c (expand_oacc_for): Handle calls to internal
17528         functions like regular functions.
17530 2018-04-12  Richard Biener  <rguenther@suse.de>
17532         PR lto/85371
17533         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
17534         for the early LTO debug to properly generate references to it
17535         during DIE emission.  Do not re-use that for the skeleton for
17536         split-dwarf.
17537         (dwarf2out_early_finish): Likewise.
17539 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
17541         PR target/85328
17542         * config/i386/sse.md
17543         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
17544         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
17545         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
17546         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
17547         and output is a reg, avoid creating invalid lowpart subreg, but
17548         instead split into a 512-bit move.  Don't split if not AVX512VL,
17549         input is xmm16+ reg and output is a mem.
17550         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
17551         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
17552         xmm16+ reg and output is a mem.
17554 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17556         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
17557         also for flag_dwarf2_cfi_asm.
17559 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
17561         PR rtl-optimization/85342
17562         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
17563         a bool scalar var inside of the loop instead.  Don't try to update
17564         recog_data.operand after failed apply_change_group.
17566 2018-04-12  Tom de Vries  <tom@codesourcery.com>
17568         PR target/85296
17569         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
17570         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
17571         array with flexible array member as array without given dimension.
17572         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
17573         argument for undefined param to true.
17575 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
17577         PR target/85321
17578         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17579         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
17580         from PowerPC section.
17581         * config/rs6000/sysv4.opt (mcall-): Improve help text.
17582         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
17583         help text that is too long.
17584         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
17585         help text that is too long.
17586         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
17587         help text that is too long.
17589 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
17591         * config/alpha/alpha.md (stack_probe_internal): Rename
17592         from "probe_stack".  Update all callers.
17594 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
17596         PR rtl-optimization/84566
17597         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
17598         sched_macro_fuse_insns.
17600 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
17602         PR target/84301
17603         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
17604         (compute_block_dependences): ... from here.
17606 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
17608         PR tree-optimization/85331
17609         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
17610         from int to HOST_WIDE_INT.
17612 2018-04-11  Martin Jambor  <mjambor@suse.cz>
17614         PR ipa/84149
17615         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
17616         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
17617         not the same as the source val.
17618         (cgraph_edge_brings_value_p): New parameter.
17619         (gather_edges_for_value): Pass destination value to
17620         cgraph_edge_brings_value_p.
17621         (perhaps_add_new_callers): Likewise.
17622         (get_info_about_necessary_edges): Likewise and exclude values brought
17623         only by self-recursive edges.
17624         (create_specialized_node): Redirect only clones of self-calling edges.
17625         (+self_recursive_pass_through_p): New function.
17626         (find_more_scalar_values_for_callers_subset): Use it.
17627         (find_aggregate_values_for_callers_subset): Likewise.
17628         (known_aggs_to_agg_replacement_list): Removed.
17629         (decide_whether_version_node): Re-calculate known constants for all
17630         remaining context clones.
17632 2018-04-11  Richard Biener  <rguenther@suse.de>
17634         PR lto/85339
17635         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
17636         from early DWARF output.
17637         (dwarf2out_early_finish): Output line info unconditionally into
17638         early DWARF and add reference to it.
17640 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
17642         PR target/85281
17643         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
17644         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
17645         other than V2DFmode using iptr mode attribute.
17646         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
17648 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
17650         PR rtl-optimization/84659
17651         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
17653 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
17655         PR debug/85302
17656         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
17657         SIZEP is NULL.
17658         (output_loc_list): Pass address of a dummy size variable even in the
17659         locview handling loop.
17660         (index_location_lists): Add comment on why skip_loc_list_entry can't
17661         call size_of_locs.
17663 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17665         PR target/85261
17666         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
17667         into register.
17669 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
17671         PR target/85321
17672         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17673         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
17674         and -mstring-compare-inline-limit.
17676 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
17678         PR target/85287
17679         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
17680         for stack clash protection in a register whenever we need it to be in
17681         a register.
17683 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
17685         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
17686         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
17688 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
17690         PR target/85321
17691         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
17692         the help text.
17693         (mlong-double-): Ditto.
17694         * config/rs6000/sysv4.opt (msdata=): Ditto.
17695         (mtls-size=): Ditto.
17697 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17699         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17700         erroneous entries for
17701         "vector int vec_ldl (int, long int *)", and
17702         "vector unsigned int vec_ldl (int, unsigned long int *)".
17703         Add comments and entries for
17704         "vector bool char vec_ldl (int, bool char *)",
17705         "vector bool short vec_ldl (int, bool short *)",
17706         "vector bool int vec_ldl (int, bool int *)",
17707         "vector bool long long vec_ldl (int, bool long long *)",
17708         "vector pixel vec_ldl (int, pixel *)",
17709         "vector long long vec_ldl (int, long long *)",
17710         "vector unsigned long long vec_ldl (int, unsigned long long *)".
17711         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
17712         type tree bool_long_long_type_node and correct definition of
17713         bool_V2DI_type_node to make reference to this new type tree.
17714         (rs6000_mangle_type): Replace erroneous reference to
17715         bool_long_type_node with bool_long_long_type_node.
17716         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
17717         comments to emphasize sign distinctions for char and int types and
17718         replace RS6000_BTI_bool_long constant with
17719         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
17720         use of RS6000_BTI_pixel.
17721         (bool_long_type_node): Remove this macro definition.
17722         (bool_long_long_type_node): New macro definition
17724 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
17726         PR rtl-optimization/85300
17727         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
17728         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
17729         simplify_unary_operation fails.
17731 2018-04-10  Martin Liska  <mliska@suse.cz>
17733         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
17734         cgraph_edge and ipa_ref.
17736 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
17738         PR target/85177
17739         PR target/85255
17740         * config/i386/sse.md
17741         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
17742         computation of the VEC_MERGE selector from mask.
17743         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
17744         Fix decoding of the VEC_MERGE selector into mask.
17746 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
17748         PR tree-optimization/85286
17749         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
17751 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
17753         * final.c (final_1): Set insn_last_address as well as
17754         insn_current_address.
17756 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17758         PR target/85173
17759         * explow.c (emit_stack_probe): Call validize_mem on memory location
17760         before passing it to gen_probe_stack.  Create address operand and
17761         legitimize it for the probe_stack_address case.
17763 2018-04-09  Jan Hubicka  <jh@suse.cz>
17765         PR lto/85078
17766         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
17767         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
17768         * tree.c (free_lang_data_in_type): Fix handling of binfos;
17769         walk basetypes.
17770         (free_lang_data): Rebuild type inheritance graph.
17772 2018-04-09  Martin Sebor  <msebor@redhat.com>
17774         * invoke.texi (-finline-small-functions): Mention other optimization
17775         options.
17776         (-findirect-inlining, -fpartial-inlining): Same.
17777         (-finline-functions-called-once): Same.
17778         (-freorder-blocks-and-partition): Same.
17780 2018-04-09  Jan Hubicka  <jh@suse.cz>
17782         PR rtl/84058
17783         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
17784         jumps; choose last target that matches the criteria (i.e.
17785         no partition changes for non-crossing jumps).
17786         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
17787         support for redirecting crossing jumps to non-crossing.
17789 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
17791         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
17792         also for naked functions.
17794 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
17796         * config/arc/arc.md (add_shift): New pattern.
17797         (add_shift2): Likewise.
17798         (sub_shift): Likewise.
17799         (sub_shift_cmp0_noout): Likewise.
17800         (compare_si_ashiftsi): Likewise.
17801         (xbfu_cmp0_noout): New combine pattern.
17802         (xbfu_cmp0"): Likewise.
17803         (movsi_set_cc_insn): Place the predicable variant first.
17804         (commutative_binary_cmp0_noout): Remove clobber.
17805         (commutative_binary_cmp0): New pattern.
17806         (noncommutative_binary_cmp0): Likewise.
17807         (noncommutative_binary_cmp0_noout): Likewise.
17808         (noncommutative_binary_comparison_result_used): Removed.
17809         (rsub_cmp0): New pattern.
17810         (rsub_cmp0_noout): Likewise.
17811         (extzvsi): Changed, keep only meaningful variants.
17812         (SQH, SEZ): New iterators.
17813         (SQH_postfix): New mode attribute.
17814         (SEZ_prefix): New code attribute.
17815         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
17816         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
17817         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
17818         of numerical value.
17819         (noncommutative_operator): Check the availability of barrel
17820         shifter option.
17822 2018-04-09  Richard Biener  <rguenther@suse.de>
17824         PR tree-optimization/85284
17825         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
17826         Only use the niter constraining form of simple_iv when the exit
17827         is always executed.
17829 2018-04-09  Tom de Vries  <tom@codesourcery.com>
17831         PR target/84041
17832         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17833         (define_expand "*memory_barrier"): New define_expand.
17834         (define_insn "memory_barrier"): New insn.
17836 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
17838         PR rtl-optimization/80463
17839         PR rtl-optimization/83972
17840         PR rtl-optimization/83480
17842         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
17843         correct producer for the insn.
17844         (tidy_control_flow): Fixup seqnos in case of debug insns.
17846 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
17848         PR rtl-optimization/83913
17850         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
17851         different sched-times when merging exprs.
17853 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
17855         PR rtl-optimization/83962
17857         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
17858         tidy_fallthru_edge and tidy_control_flow.
17860 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
17862         PR rtl-optimization/83530
17864         * sel-sched.c (force_next_insn): New global variable.
17865         (remove_insn_for_debug): When force_next_insn is true, also leave only
17866         next insn in the ready list.
17867         (sel_sched_region): When the region wasn't scheduled, make another pass
17868         over it with force_next_insn set to 1.
17870 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
17872         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
17873         into tm_file.
17874         * config/nds32/constants.md (unspec_volatile_element): Add enum values
17875         for interrupt control.
17876         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17877         functions for interrupt control.
17878         * config/nds32/nds32-intrinsic.md: Likewise.
17879         * config/nds32/nds32_intrinsic.h: Likewise.
17880         * config/nds32/nds32.h (nds32_builtins): Likewise.
17882 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
17884         * config/nds32/nds32.c (nds32_init_machine_status,
17885         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
17886         strict_aligned_p field.
17887         (nds32_expand_to_rtl_hook): New function.
17888         (TARGET_EXPAND_TO_RTL_HOOK): Define.
17889         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
17891 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17892             Chung-Ju Wu  <jasonwucj@gmail.com>
17894         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
17895         * config/nds32/nds32-n7.md: New file.
17896         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
17897         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
17898         pipeline.
17899         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
17900         * config/nds32/nds32.md (pipeline_model): Add n7.
17901         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
17902         * config/nds32/pipelines.md: Include n7 settings.
17904 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17905             Chung-Ju Wu  <jasonwucj@gmail.com>
17907         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
17908         * config/nds32/nds32-e8.md: New file.
17909         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
17910         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
17911         pipeline.
17912         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
17913         * config/nds32/nds32.md (pipeline_model): Add e8.
17914         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
17915         * config/nds32/pipelines.md: Include e8 settings.
17917 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17918             Chung-Ju Wu  <jasonwucj@gmail.com>
17920         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
17921         * config/nds32/nds32-n8.md: New file.
17922         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
17923         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
17924         pipeline.
17925         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
17926         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
17927         * config/nds32/nds32.md (pipeline_model): Add n8.
17928         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
17929         * config/nds32/pipelines.md: Include n8 settings.
17931 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17932             Chung-Ju Wu  <jasonwucj@gmail.com>
17934         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
17935         * config/nds32/nds32-n9-2r1w.md: New file.
17936         * config/nds32/nds32-n9-3r2w.md: New file.
17937         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
17938         nds32_register_ports): New or modify for cpu n9.
17939         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
17940         pipeline.
17941         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
17942         * config/nds32/nds32-utils.c: New file.
17943         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
17944         TARGET_MUL_SLOW): Define.
17945         * config/nds32/nds32.md (pipeline_model): New attribute.
17946         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
17947         New options that support cpu n9.
17948         * config/nds32/pipelines.md: Include n9 settings.
17949         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
17951 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
17953         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
17954         information if necessary.
17955         (output_cond_branch_compare_zero): Likewise.
17956         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
17957         (nds32_target_alignment): Refine for alignment.
17958         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
17959         (FUNCTION_BOUNDARY): Modify.
17960         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
17961         align case.
17962         * config/nds32/nds32.opt (malways-align, malign-functions): New.
17964 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
17966         * config/nds32/constants.md (unspec_volatile_element): Add values for
17967         TLB operation and data prefetch.
17968         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17969         functions for TLB operation and data prefetch.
17970         * config/nds32/nds32-intrinsic.md: Likewise.
17971         * config/nds32/nds32_intrinsic.h: Likewise.
17972         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
17973         (nds32_print_operand): Likewise.
17974         * config/nds32/nds32.h (nds32_builtins): Likewise.
17976 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
17977         Andrew Pinski <pinsika@gcc.gnu.org>
17979         PR middle-end/82976
17980         * match.pd: Use constant_boolean_node of correct type instead of
17981         boolean_true_node or boolean_false_node for simplifying
17982         pointer comparisons to zero.
17984 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
17986         PR tree-optimization/80021
17987         * tree.c (verify_type_variant): Make error call in verify_variant_match
17988         translatable and remove final full stop.
17990 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17992         * config/nds32/constants.md (unspec_volatile_element): Add
17993         UNSPEC_VOLATILE_EH_RETURN.
17994         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
17995         nds32_output_stack_pop): Support dwarf exception handling process.
17996         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
17997         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
17998         exception handling process.
17999         (nds32_compute_stack_frame): Likewise.
18000         (nds32_return_addr_rtx): Likewise.
18001         (nds32_initial_elimination_offset): Likewise.
18002         (nds32_expand_prologue): Likewise.
18003         (nds32_expand_epilogue): Likewise.
18004         (nds32_dynamic_chain_address): New function.
18005         * config/nds32/nds32.h (machine_function): Add fields for dwarf
18006         exception handling.
18007         (DYNAMIC_CHAIN_ADDRESS): Define.
18008         (EH_RETURN_DATA_REGNO): Define.
18009         (EH_RETURN_STACKADJ_RTX): Define.
18010         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
18011         patterns for dwarf exception handling.
18013 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18015         * config/nds32/nds32.h: Clean up obsolete macros.
18017 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18019         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18020         Add enum values for particular instructions.
18021         * config/nds32/nds32-intrinsic.c: Implementation of expanding
18022         particular intrinsic functions.
18023         * config/nds32/nds32-intrinsic.md: Likewise.
18024         * config/nds32/nds32_intrinsic.h: Likewise.
18025         * config/nds32/nds32.h (nds32_builtins): Likewise.
18026         * config/nds32/nds32.md (type): Add pbsad and pbsada.
18027         (btst, ave): New patterns for particular instructions.
18029 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18031         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18032         Add enum values for atomic load/store and memory sync.
18033         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
18034         and memory sync.
18035         * config/nds32/nds32-intrinsic.md: Likewise.
18036         * config/nds32/nds32_intrinsic.h: Likewise.
18037         * config/nds32/nds32.h (nds32_builtins): Likewise.
18039 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
18041         PR tree-optimization/85257
18042         * fold-const.c (native_encode_vector): If not all elts could fit
18043         and off is -1, return 0 rather than offset.
18044         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
18045         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
18046         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
18047         adjust buffer in native_interpret_expr call.
18049 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18051         * config/nds32/constants.md (unspec_volatile_element): Add cache
18052         control enum values.
18053         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
18054         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
18055         * config/nds32/nds32.c (nds32_cctl_names): New.
18056         (nds32_print_operand): Handle cache control register names.
18057         * config/nds32/nds32.h (nds32_builtins): New enum values.
18058         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
18059         macros.
18060         * config/nds32/nds32.md (type): Add mmu.
18061         * config/nds32/pipelines.md (simple_insn): Add mmu.
18063 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18065         * config/nds32/nds32.md (type): Remove call.
18066         * config/nds32/pipelines.md (simple_insn): Likewise.
18068 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18070         * config/nds32/constants.md (unspec_volatile_element): Add
18071         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
18072         UNSPEC_VOLATILE_FMFCFG.
18073         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
18074         description for fmfcfg and fmfcsr.
18075         (bdesc_1arg): Add fmtcsr.
18076         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
18077         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
18078         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
18079         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
18080         unspec_fmfcfg): New patterns.
18081         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
18082         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
18083         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
18084         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
18085         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
18086         __nds32__fmfcfg): Define.
18088 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18090         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
18091         intrinsic register names.
18092         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
18093         intrinsic register enum values and macros.
18095 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18097         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
18098         for load/store addressing form.
18099         (nds32_print_operand_address): Likewise.
18101 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
18103         PR target/85196
18104         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
18105         based on LABEL_REF.  Remove useless assertion.
18106         (pic_address_needs_scratch): Fix formatting.
18107         (sparc_legitimize_pic_address): Minor tweaks.
18108         (sparc_delegitimize_address): Adjust assertion accordingly.
18109         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
18110         into symbolic_operand.
18111         (movsi_high_pic_label_ref): Likewise.
18112         (movsi_lo_sum_pic_label_ref): Likewise.
18113         (movdi_pic_label_ref): Likewise.
18114         (movdi_high_pic_label_ref): Likewise.
18115         (movdi_lo_sum_pic_label_ref): Likewise.
18117 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
18119         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
18120         custom LIB_SPEC setup.
18122 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
18123             Kito Cheng  <kito.cheng@gmail.com>
18125         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
18126         * config/riscv/freebsd.h: New.
18128 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
18130         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
18131         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
18132         file.
18134 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
18135             Kito Cheng  <kito.cheng@gmail.com>
18137         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
18138         nds32_output_call, nds32_symbol_binds_local_p): New functions.
18139         * config/nds32/nds32-protos.h (nds32_output_call,
18140         nds32_output_return): Declare.
18141         * config/nds32/nds32.md: Refine all the call and return patterns.
18143 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
18145         PR debug/85252
18146         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
18147         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
18149         PR rtl-optimization/84872
18150         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
18151         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
18152         EDGE_CROSSING edge.
18154 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
18156         * expr.c (copy_blkmode_to_reg): Revert 254862.
18157         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
18159 2018-04-06  Richard Biener  <rguenther@suse.de>
18161         PR middle-end/85244
18162         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
18163         after seeing a component reference with an adjacent field.  Treat
18164         refs to arrays at struct end of external decls similar to
18165         refs to unconstrained commons.
18167 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
18169         PR sanitizer/85213
18170         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
18171         look through SAVE_EXPRs with non-side-effects argument.  Adjust
18172         recursive calls.
18173         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
18174         save_p here.
18176 2018-04-06  Richard Biener  <rguenther@suse.de>
18178         PR middle-end/85180
18179         * alias.c (find_base_term): New wrapper around find_base_term
18180         unwinding CSELIB_VAL_PTR changes.
18181         (find_base_term): Do not restore CSELIB_VAL_PTR during the
18182         recursion.
18184 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18186         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
18187         instructions.
18188         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
18189         constant definitions.
18190         ("nop"): lr 0,0 -> nopr r0
18191         ("nop_lr0", "nop_lr1"): New insn definitions.
18193 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
18195         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
18196         NDS32_V3PUSH_AVAILABLE_P macro.
18198 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
18199             Chung-Ju Wu  <jasonwucj@gmail.com>
18201         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
18202         (nds32*-*-*): Add float and fpu_config into supported_defaults.
18203         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
18204         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
18205         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
18206         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
18207         * config/nds32/constraints.md: New constraints and checking for hard
18208         float configuration.
18209         * config/nds32/iterators.md: New mode iterator and attribute for hard
18210         float configuration.
18211         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
18212         patterns.
18213         * config/nds32/nds32-fpu.md: New file.
18214         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
18215         deal with hard float code generation.
18216         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
18217         ARCH_V3S.
18218         (abi_type, float_reg_number): New enum type.
18219         * config/nds32/nds32-predicates.c: New predicates for hard float.
18220         * config/nds32/nds32-protos.h: Declare functions for hard float.
18221         * config/nds32/nds32.c: Implementation for hard float configuration.
18222         * config/nds32/nds32.h: Definitions for hard float configuration.
18223         * config/nds32/nds32.md: Include hard float machine description and
18224         modify patterns for hard float configuration.
18225         * config/nds32/nds32.opt: New options for hard float configuration.
18226         * config/nds32/predicates.md: New predicates for hard float
18227         configuration.
18229 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
18231         * common/config/nds32/nds32-common.c
18232         (nds32_option_optimization_table): Enable -mreleax-hint by default.
18234 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
18236         PR middle-end/85195
18237         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
18238         CONSTRUCTOR_ELT (ctor, ...)->value.
18240 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
18242         PR target/85193
18243         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
18245 2018-04-05  Tom de Vries  <tom@codesourcery.com>
18247         PR target/85204
18248         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
18249         cond jump.
18251 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
18252             Kito Cheng  <kito.cheng@gmail.com>
18254         * config/nds32/constraints.md (U33): Fine-tune checking condition.
18255         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
18256         * config/nds32/nds32.h (nds32_16bit_address_type): Add
18257         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
18259 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
18260             Kito Cheng  <kito.cheng@gmail.com>
18262         * config/nds32/constraints.md (Ufe): New memory constraint.
18263         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
18264         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
18265         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
18266         operands.
18267         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
18268         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
18270 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18272         * config/nds32/nds32.md: Use optimize_size in the condition for
18273         alu-shift instructions.
18275 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18277         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
18279 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18281         * config/nds32/nds32.md (negsi2): Refine pattern.
18283 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
18284             Chung-Ju Wu  <jasonwucj@gmail.com>
18286         * config/nds32/iterators.md (shift_rotate): New code iterator.
18287         (shift): New code attribute.
18288         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
18289         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
18290         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
18291         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
18292         bit-wise operations.
18293         (andsi3, *andsi3): Ditto.
18294         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
18295         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
18296         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
18297         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
18298         nds32_ior_operand, nds32_xor_operand): New predicates.
18300 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18302         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
18303         (addsi3, subsi3): ... this.
18305 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18307         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
18309 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18311         * config/nds32/nds32.md: Adjust indention.
18313 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
18315         * config/nds32/nds32.md (feature): New attribute.
18317 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18319         * config/nds32/nds32.md (subtype): New attribute.
18321 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18323         PR target/85203
18324         * config/arm/arm-builtins.c (arm_expand_builtin): Change
18325         expansion to perform a bitwise AND of the argument followed by a
18326         boolean negation of the result.
18328 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
18330         PR rtl-optimization/84878
18331         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
18332         the basic block.  Assert the use reference is not artificial and that
18333         it has an associated insn.
18335 2018-04-04  Michael Matz  <matz@suse.de>
18337         * builtins.c (compute_objsize): Pass correct operand
18338         to array_at_struct_end_p.
18340 2018-04-04  Richard Biener  <rguenther@suse.de>
18342         PR lto/85176
18343         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
18344         from contexts for DINFO_LEVEL_TERSE and below.
18346 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
18348         * config/nds32/nds32-doubleword.md (move_<mode>): Require
18349         resiter_operand condition.
18350         * config/nds32/nds32.md (*move<mode>): Ditto.
18352 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
18353             Monk Chiang  <sh.chiang04@gmail.com>
18355         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
18357 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18359         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
18361 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18362             Kito Cheng  <kito.cheng@gmail.com>
18364         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
18365         nds32_cond_code_str, output_cond_branch,
18366         output_cond_branch_compare_zero, nds32_expand_cbranch,
18367         nds32_expand_cstore, nds32_expand_movcc,
18368         nds32_output_cbranchsi4_equality_zero,
18369         nds32_output_cbranchsi4_equality_reg,
18370         nds32_output_cbranchsi4_equality_reg_or_const_int,
18371         nds32_output_cbranchsi4_greater_less_zero: New functions.
18372         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
18373         nds32_expand_cstore, nds32_expand_movcc,
18374         nds32_output_cbranchsi4_equality_zero,
18375         nds32_output_cbranchsi4_equality_reg,
18376         nds32_output_cbranchsi4_equality_reg_or_const_int,
18377         nds32_output_cbranchsi4_greater_less_zero): Declare.
18378         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
18379         nds32_rimm11s_operand): New predicates.
18380         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
18381         * config/nds32/nds32.md: Rewrite all the branch and conditional move
18382         patterns.
18384 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
18386         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
18387         * config/nds32/nds32.md: Ditto.
18388         * config/nds32/pipelines.md: Ditto.
18390 2018-04-04  Richard Biener  <rguenther@suse.de>
18392         PR tree-optimization/85168
18393         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
18394         propagating abnormals.
18396 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18398         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
18400 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18401             Kito Cheng  <kito.cheng@gmail.com>
18403         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
18404         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
18405         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
18406         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
18407         * config/nds32/nds32.md (sibcall_internal): New.
18408         (sibcall_register): Remove.
18409         (sibcall_immediate): Remove.
18410         (sibcall_value_internal): New.
18411         (sibcall_value_register): Remove.
18412         (sibcall_value_immediate): Remove.
18413         * config/nds32/predicates.md (nds32_general_register_operand): New.
18414         (nds32_call_address_operand): New.
18416 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
18418         PR rtl-optimization/85167
18419         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
18420         bb_defs if *split_p, instead preinitialize it to NULL.
18422         PR tree-optimization/85156
18423         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
18424         evaluating the argument multiple times.
18426 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
18428         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
18429         than vector.
18430         (_mm_cvtpd_ps): Likewise.
18431         (_mm_cvttpd_epi32): Likewise.
18432         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
18433         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
18434         vector, pixel, and bool following altivec.h include.
18436 2018-04-03  Martin Sebor  <msebor@redhat.com>
18438         * doc/extend.texi (Common Function Attributes): Clarify.
18439         (const attribute): Likewise.
18440         (pure attribute): Likewise.
18442 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
18444         PR target/85169
18445         * config/i386/i386.c (ix86_expand_vector_set): Use
18446         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
18448 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
18450         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
18451         instructions when changing rounding bits to preserve precision bits
18452         in the x87 control word.
18454 2018-04-03  Martin Liska  <mliska@suse.cz>
18456         PR tree-optimization/82491
18457         * rtl.h (strip_offset_and_add): Replace += suboffset with
18458         poly_uint64 () + suboffset.
18460 2018-03-29  Martin Liska  <mliska@suse.cz>
18461             Martin Jambor  <mjambor@suse.cz>
18463         PR ipa/84947
18464         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
18465         param_type is not an integral or pointer type.
18467 2018-04-03  Richard Biener  <rguenther@suse.de>
18469         * sese.h (recompute_all_dominators): Remove.
18471 2018-04-02  Martin Sebor  <msebor@redhat.com>
18473         * doc/invoke.texi (-Wrestrict): Fix typos.
18475 2018-04-02  Jim Wilson  <jimw@sifive.com>
18477         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
18478         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
18479         (<optab>di3, <optab>si3_extend): Likewise.
18480         (<optab>si3_mask, <optab>si3_mask_1): New.
18481         (<optab>di3_mask, <optab>di3_mask_1): New.
18482         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
18483         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
18484         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
18486 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
18488         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
18489         example.
18491 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
18493         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
18494         (nds32_canonicalize_comparison): New function.
18496 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
18497             Kito Cheng  <kito.cheng@gmail.com>
18498             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
18500         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
18501         * config/nds32/constants.md (unspec_volatile_element): Add
18502         UNSPEC_VOLATILE_RELAX_GROUP.
18503         * config/nds32/nds32-relax-opt.c: New file.
18504         * config/nds32/nds32-predicates.c
18505         (nds32_symbol_load_store_p): New function.
18506         * config/nds32/nds32-protos.h
18507         (nds32_symbol_load_store_p): Declare function.
18508         (make_pass_nds32_relax_opt): Declare new rtl pass function.
18509         * config/nds32/nds32.c
18510         (nds32_register_pass): New function to register pass.
18511         (nds32_register_passes): New function to register passes.
18512         * config/nds32/nds32.md (relax_group): New pattern.
18513         * config/nds32/nds32.opt (mrelax-hint): New option.
18514         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
18516 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
18518         * config/nds32/t-nds32: Modify files dependency.
18520 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
18522         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
18523         (PROFILE_HOOK): Define its implementation.
18525 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
18527         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
18528         type and 32-bit size.
18530 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
18532         PR middle-end/85090
18533         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
18534         (V_128_256): New mode iterator.
18535         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
18536         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
18537         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
18538         of V.
18539         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
18540         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
18542 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
18544         PR target/83315
18545         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
18546         NaN inputs correctly.
18548 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
18550         PR target/80546
18551         * config/rs6000/vsx.md (??r): New mode attribute.
18552         (*vsx_mov<mode>_64bit): Use it.
18553         (*vsx_mov<mode>_32bit): Likewise.
18555 2018-03-30  Martin Sebor  <msebor@redhat.com>
18557         PR tree-optimization/84818
18558         * builtins.c (check_access): Use warning_n.
18560 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18562         PR target/83822
18563         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
18564         condition.
18565         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
18566         condition.
18568 2018-03-30  Julia Koval  <julia.koval@intel.com>
18570         PR target/84413
18571         * x86-tune.def (movx, partial_reg_dependency): Enable for
18572         m_SKYLAKE_AVX512.
18574 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
18576         PR inline-asm/84985
18577         * lra-constraints.c (process_alt_operands): Move setting
18578         this_alternative_matches below.
18580 2018-03-29  Martin Liska  <mliska@suse.cz>
18582         PR lto/84995.
18583         * doc/invoke.texi: Document how LTO works with debug info.
18584         Describe auto-load support of binutils.  Mention 'x86-64'
18585         as valid option value of -march option.
18587 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
18589         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
18591         PR c/85094
18592         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
18593         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
18594         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
18595         checking.
18597 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
18599         PR target/84912
18600         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
18601         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
18602         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
18603         for RS6000_BTM_POWERPC64.
18604         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
18605         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
18606         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
18607         definition.
18608         (DIVDE): Use it.
18609         (DIVDEU): Likewise.
18611 2018-03-28  Carl Love  <cel@us.ibm.com>
18613         Revert
18614         2017-09-27  Carl Love  <cel@us.ibm.com>
18616         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
18617         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
18618         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
18619         fctiw instruction.
18621 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18623         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
18624         instead of __vector bool.
18625         (_mm_max_pu8): Likewise.
18626         (_mm_min_pi16): Likewise.
18628 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
18630         PR target/84912
18631         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
18632         (DIVWEUO): Likewise.
18633         (DIVDEO): Likewise.
18634         (DIVDEUO): Likewise.
18635         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
18636         DIVWEUO and DIVDEUO.
18637         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
18638         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
18639         (div_extend): Likewise.
18640         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
18641         builtin function.
18642         (__builtin_divweuo): Likewise.
18643         (__builtin_divdeo): Likewise.
18644         (__builtin_divdeuo): Likewise.
18646 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
18648         PR target/85095
18649         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
18650         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
18652         PR tree-optimization/82004
18653         * gimple-match-head.c (optimize_pow_to_exp): New function.
18654         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
18655         Don't fold to exp if optimize_pow_to_exp is false.
18657 2018-03-28  Martin Liska  <mliska@suse.cz>
18659         PR other/84819
18660         * calls.c (initialize_argument_information): Fix trailing space.
18661         * common.opt: Fix typo and provide better explanation for
18662         -fsanitize-coverage option.
18663         * config/i386/i386.opt: Fix typo.
18665 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
18666             Martin Liska  <mliska@suse.cz>
18668         PR sanitizer/85081
18669         * gimplify.c (asan_poison_variable): Don't do the check for
18670         gimplify_omp_ctxp here.
18671         (gimplify_decl_expr): Do it here.
18672         (gimplify_target_expr): Likewise.
18674 2018-03-28  Martin Liska  <mliska@suse.cz>
18676         PR target/84988
18677         * config/i386/i386.c (ix86_function_arg_advance): Do not call
18678         chkp_type_bounds_count if MPX is not enabled.
18680 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
18682         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
18684 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
18686         PR target/84914
18687         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
18688         function to create the function decl for complex long double
18689         multiply and divide for -mabi=ieeelongdouble.
18690         (init_float128_ieee): Call it.
18692 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
18694         PR target/85044
18695         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
18696         -fcf-protection=branch -mibt.
18697         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
18699 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
18701         PR target/81863
18702         * config/arm/arm.c (arm_valid_symbolic_address): Handle
18703         arm_word_relocations.
18705 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
18707         PR target/85056
18708         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
18709         extern array declarations.
18711 2018-03-27  Richard Biener  <rguenther@suse.de>
18713         PR middle-end/84067
18714         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
18715         explicit single_use checks.
18717 2018-03-27  Richard Biener  <rguenther@suse.de>
18719         PR tree-optimization/85082
18720         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
18721         Valueize the VUSE.
18723 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
18725         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
18726         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
18727         Turn on fasynchronous-unwind-tables and funwind-tables.
18729 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
18731         PR target/85073
18732         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
18733         (*bmi_blsr_<mode>_ccz): Ditto.
18735 2018-03-26  Tom de Vries  <tom@codesourcery.com>
18737         PR tree-optimization/85063
18738         * omp-general.c (offloading_function_p): New function.  Factor out
18739         of ...
18740         * omp-offload.c (pass_omp_target_link::gate): ... here.
18741         * omp-general.h (offloading_function_p): Declare.
18742         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
18743         with attribute omp declare target for offloading functions.
18745 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
18747         PR tree-optimization/84005
18748         * tree-data-ref.h (get_base_for_alignment): Declare.
18749         * tree-data-ref.c (get_base_for_alignment_1): New function.
18750         (get_base_for_alignment): Likewise.
18751         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
18752         get_base_for_alignment to find a suitable base object, instead
18753         of always using drb->base_address.
18755 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
18757         PR inline-asm/85022
18758         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
18759         known size by default.
18761 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
18763         PR inline-asm/85030
18764         * lra-constraints.c (process_alt_operands): Don't match BLKmode
18765         and non BLKmode operands.
18767 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18769         PR target/85026
18770         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
18771         Clean up attributes.
18773 2018-03-23  Richard Biener  <rguenther@suse.de>
18775         PR debug/85020
18776         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
18777         we are going to emit early debug for LTO.
18779 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
18781         PR inline-asm/85034
18782         * function.c (match_asm_constraints_1): Don't optimize if input
18783         doesn't satisfy general_operand predicate for output's mode.
18785         PR inline-asm/85022
18786         * alias.c (write_dependence_p): Don't require for x_canonicalized
18787         non-VOIDmode if x has VOIDmode.
18789         PR sanitizer/85029
18790         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
18791         just don't try to optimize it rather than assert it never happens.
18793 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18795         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
18796         macro expansions for definition of ST_INTERNAL_<mode> and
18797         LD_INTERNAL_<mode> builtins.
18798         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
18799         Remove prototype.
18800         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
18801         function.
18802         (altivec_expand_st_builtin): Likewise.
18803         (altivec_expand_builtin): Remove calls to deleted functions.
18804         (rs6000_address_for_altivec): Delete this function.
18805         * config/rs6000/vector.md: Remove expands for
18806         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
18808 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
18810         PR target/84826
18811         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
18812         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
18813         re-computing once computed.
18814         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
18815         (arm_init_machine_status): Initialize
18816         machine->static_chain_stack_bytes.
18818 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18820         PR target/84760
18821         * doc/extend.texi: Add four new prototypes for vec_ld.
18822         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
18823         definitions for more logical presentation.
18824         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
18825         entries for V1TI variants of __builtin_altivec_ld builtin.
18826         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
18827         handling of V1TI variant of LVX icode pattern.
18828         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
18829         (rs6000_gimple_fold_builtin): Likewise.
18830         (altivec_init_builtins): Add code to define
18831         __builtin_altivec_lvx_v1ti function.
18833 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
18835         PR inline-asm/84941
18836         * function.c (match_asm_constraints_1): Don't do the optimization
18837         if input isn't a REG, SUBREG, MEM or constant.
18839 2018-03-22  Tom de Vries  <tom@codesourcery.com>
18841         PR tree-optimization/84956
18842         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
18843         bb_has_abnormal_pred.
18845 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
18847         PR sanitizer/85018
18848         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
18849         DECL_INITIAL (decl) to decl at the end.
18850         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
18851         adjust the comment.
18853 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
18855         * doc/extend.texi (__builtin_tgmath): Document when complex
18856         integer types are treated as _Complex _Float64.
18858 2018-03-21  Tom de Vries  <tom@codesourcery.com>
18860         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
18862 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
18864         PR tree-optimization/84960
18865         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
18866         if it is ENTRY block, move them into single succ of ENTRY in that case.
18868 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
18870         PR tree-optimization/84811
18871         * poly-int.h (poly_span_traits): Remove the T3 parameter and
18872         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
18873         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
18874         (known_subrange_p): Update accordingly.  Cast each value involved
18875         in the size comparison, rather than casting the result of the
18876         subtraction.
18878 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
18880         PR tree-optimization/84982
18881         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
18882         by flipping the least significant bit rather than all bits from
18883         bitpos to bitpos + bitsize - 1.
18885 2018-03-21  Nathan Sidwell  <nathan@acm.org>
18887         * doc/extend.texi (Deprecated Features): Remove mention of
18888         long-deleted deprecations.
18890 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18892         PR jit/84288
18893         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
18894         * configure: Regenerate.
18896 2018-03-21  Tom de Vries  <tom@codesourcery.com>
18898         PR tree-optimization/83126
18899         * tree-parloops.c (num_phis): New function.
18900         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
18902 2018-03-21  Nathan Sidwell  <nathan@acm.org>
18904         * doc/extend.texi (Deprecated Features): Update deprecated flags,
18905         mention anon-struct/union members and trailing attributes.
18907 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
18909         PR tree-optimization/84969
18910         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
18911         builtin memset partitions if they set different rhs values.
18913 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
18915         PR rtl-optimization/84989
18916         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
18917         VEC_DUPLICATE with scalar result mode.
18919 2018-03-21  Martin Liska  <mliska@suse.cz>
18921         PR ipa/84963
18922         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
18923         not intended return statement.
18925 2018-03-21  Martin Liska  <mliska@suse.cz>
18927         PR target/84988
18928         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
18929         (chkp_find_bound_slots_1): Limit number of iterations.
18931 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
18933         PR target/84838
18934         * Minor grammar fixes for x86 options.
18936 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
18938         PR debug/84875
18939         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
18940         holding REG_CFA_RESTORE notes, instead turn them into a USE.
18942 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
18944         PR target/83789
18945         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
18946         (altivec_lvx_<mode>_1op): Likewise.
18947         (altivec_stvx_<mode>_2op): Likewise.
18948         (altivec_stvx_<mode>_1op): Likewise.
18949         (altivec_lvx_<VM2:mode>): New define_expand.
18950         (altivec_stvx_<VM2:mode>): Likewise.
18951         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
18952         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18953         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
18954         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18955         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
18956         (rs6000_gen_lvx): Likewise.
18957         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
18958         (altivec_expand_stv_builtin): Likewise.
18959         (altivec_expand_builtin): Likewise.
18960         * config/rs6000/vector.md: Likewise.
18962 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18964         PR target/82518
18965         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
18966         BYTES_BIG_ENDIAN.
18968 2018-03-20  Richard Biener  <rguenther@suse.de>
18970         PR target/84986
18971         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
18972         sign-conversions as zero, fall back to standard scalar_stmt
18973         cost for the rest.
18975 2018-03-20  Martin Liska  <mliska@suse.cz>
18977         PR ipa/84825
18978         * predict.c (rebuild_frequencies): Handle case when we have
18979         PROFILE_ABSENT, but flag_guess_branch_prob is false.
18981 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
18983         PR target/84990
18984         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
18985         flag_section_anchors.
18986         * varasm.c (use_blocks_for_decl_p): Remove hack for
18987         dw2_force_const_mem.
18989         PR target/84845
18990         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
18991         to ...
18992         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
18993         be created, use lowpart_subreg of operands[0] rather than operands[0]
18994         itself.
18995         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
18996         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
18997         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
18998         and n constraint instead of aarch64_shift_imm_di and Usd.
18999         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
19000         (*aarch64_<optab>_reg_minus<mode>3): ... this.
19002 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
19004         PR target/82989
19005         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
19006         to favor GPR over NEON registers.
19007         (<shift>di3_neon): Likewise.
19009 2018-03-20  Tom de Vries  <tom@codesourcery.com>
19011         PR target/84952
19012         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
19013         (nvptx_process_pars): Emit bar.sync asap and alap.
19015 2018-03-20  Tom de Vries  <tom@codesourcery.com>
19017         PR target/84954
19018         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
19019         seen_label if seen_label is already set.
19021 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
19023         PR target/84945
19024         * config/i386/i386.c (fold_builtin_cpu): For features above 31
19025         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
19026         Use 1U instead of 1.  Formatting fixes.
19028         PR c/84953
19029         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
19030         instead of TREE_TYPE (s1) for the return value.
19032 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
19034         PR tree-optimization/84946
19035         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
19036         bitsize + bitsize in poly_uint64 rather than poly_int64.
19038         PR sanitizer/78651
19039         * dwarf2asm.c: Include fold-const.c.
19040         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
19041         of decl rather than decl itself.
19043         PR rtl-optimization/84643
19044         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
19046 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
19048         PR sanitizer/78651
19049         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
19050         calling assemble_variable.
19052 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
19054         PR target/81647
19055         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
19056         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
19058 2018-03-19  Jim Wilson  <jimw@sifive.com>
19060         PR bootstrap/84856
19061         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
19062         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
19063         (riscv_first_stack_step): Likewise.
19064         (riscv_option_override): Use STACK_BOUNDARY instead of
19065         MIN_STACK_BOUNDARY.
19066         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
19067         MIN_STACK_BOUNDARY.
19068         (BIGGEST_ALIGNMENT): Set to 128.
19069         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
19070         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
19071         STACK_BOUNDARY.
19073 2018-03-19  Richard Biener  <rguenther@suse.de>
19075         PR tree-optimization/84933
19076         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
19077         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
19079 2018-03-19  Richard Biener  <rguenther@suse.de>
19081         PR tree-optimization/84859
19082         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
19083         (cond_if_else_store_replacement): Perform sinking operation on
19084         single-store BBs regardless of MAX_STORES_TO_SINK setting.
19085         Generalize what a BB with a single eligible store is.
19087 2018-03-19  Richard Biener  <rguenther@suse.de>
19089         PR tree-optimization/84929
19090         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
19091         chrec_is_positive against non-chrec arg.
19093 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
19095         PR target/84711
19096         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
19098 2018-03-18  Martin Liska  <mliska@suse.cz>
19100         PR rtl-optimization/84635
19101         * regrename.c (build_def_use): Use matches_mode only when
19102         matches >= 0.
19104 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
19106         PR tree-optimization/84913
19107         * tree-vect-loop.c (vectorizable_reduction): Don't try to
19108         vectorize chains of COND_EXPRs.
19110 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
19112         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
19114 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
19116         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
19118 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
19120         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
19122 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
19123             Kito Cheng  <kito.cheng@gmail.com>
19125         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
19126         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
19127         (nds32_adjust_reg_alloc_order): New function.
19128         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
19130 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
19132         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
19133         nds32_print_operand, nds32_print_operand_address): Use
19134         HOST_WIDE_INT_PRINT_DEC instead.
19136 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
19138         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
19140 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
19142         PR target/84902
19143         * config/i386/i386.c (initial_ix86_tune_features,
19144         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
19145         unsigned long long.
19146         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
19147         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
19148         rather than 1u << ix86_tune.  Formatting fix.
19149         (ix86_option_override_internal): Change ix86_arch_mask from
19150         unsigned int to unsigned HOST_WIDE_INT, initialize to
19151         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
19152         (ix86_function_specific_restore): Likewise.
19154 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
19156         PR target/84899
19157         * postreload.c (reload_combine_recognize_pattern): Perform
19158         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
19159         truncate_int_for_mode the result for the destination's mode.
19161         PR c/84909
19162         * hsa-gen.c (mem_type_for_type): Fix comment typo.
19163         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
19164         Likewise.
19165         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19166         Likewise.
19168 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
19170         PR target/84876
19171         * lra-assigns.c (lra_split_hard_reg_for): Don't use
19172         regno_allocno_class_array and sorted_pseudos.
19173         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
19174         insns where regno is used.
19176 2018-03-16  Martin Liska  <mliska@suse.cz>
19178         PR ipa/84833
19179         * multiple_target.c (create_dispatcher_calls): Redirect
19180         reference in the symbol table.
19182 2018-03-16  Martin Liska  <mliska@suse.cz>
19184         PR ipa/84722
19185         * multiple_target.c (create_dispatcher_calls): Redirect also
19186         an alias.
19188 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
19190         PR c++/79937
19191         PR c++/82410
19192         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
19193         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
19194         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
19196 2018-03-16  Julia Koval  <julia.koval@intel.com>
19198         * doc/invoke.texi (Skylake Server): Add CLWB.
19199         Cannonlake): Remove CLWB.
19201 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
19203         PR tree-optimization/84841
19204         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
19205         1 << 3.
19206         (FLOAT_ONE_CONST_TYPE): Define.
19207         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
19208         (sort_by_operand_rank): Put entries with higher constant_type last
19209         rather than first to match comments.
19211 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
19213         * config/nios2/nios2.md (movsi_internal): Fix thinko in
19214         split predicate.
19216 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
19218         PR c++/79085
19219         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
19220         check and use address of target always.
19222 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
19224         PR target/84574
19225         * config/i386/i386.c (indirect_thunk_needed): Update comments.
19226         (indirect_thunk_bnd_needed): Likewise.
19227         (indirect_thunks_used): Likewise.
19228         (indirect_thunks_bnd_used): Likewise.
19229         (indirect_return_needed): New.
19230         (indirect_return_bnd_needed): Likewise.
19231         (output_indirect_thunk_function): Add a bool argument for
19232         function return.
19233         (output_indirect_thunk_function): Don't generate alias for
19234         function return thunk.
19235         (ix86_code_end): Call output_indirect_thunk_function to generate
19236         function return thunks.
19237         (ix86_output_function_return): Set indirect_return_bnd_needed
19238         and indirect_return_needed instead of indirect_thunk_bnd_needed
19239         and indirect_thunk_needed.
19241 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
19243         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
19244         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
19245         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
19247 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
19248             Paul Hua <paul.hua.gm@gmail.com>
19250         PR c/84852
19251         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
19253 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
19255         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
19256         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
19257         resp. SFmode cases.
19259 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
19261         PR target/84711
19262         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
19263         instead of GET_MODE_SIZE when comparing Units.
19265 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
19267         PR target/68256
19268         * varasm.c (hash_section): Return an unchangeble hash value
19269         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
19270         Return !aarch64_can_use_per_function_literal_pools_p ().
19272 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
19274         PR target/84860
19275         * optabs.c (emit_conditional_move): Pass address of cmode's copy
19276         rather than address of cmode as last argument to prepare_cmp_insn.
19278 2018-03-15  Julia Koval  <julia.koval@intel.com>
19280         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
19281         F_AVX512VNNI, F_AVX512BITALG): New.
19283 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
19285         PR target/83451
19286         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
19287         insn for floating-point loads and stores.
19289 2018-03-14  Carl Love  <cel@us.ibm.com>
19291         * config/rs6000/rs6000-c.c: Add macro definitions for
19292         ALTIVEC_BUILTIN_VEC_PERMXOR.
19293         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
19294         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
19295         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
19296         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
19297         UNSPEC_VPERMXOR.
19298         * config/doc/extend.texi: Add prototypes for vec_permxor.
19300 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
19302         PR c/84852
19303         * diagnostic-show-locus.c (class layout_point): Convert m_line
19304         from int to linenum_type.
19305         (line_span::comparator): Use linenum "compare" function when
19306         comparing line numbers.
19307         (test_line_span): New function.
19308         (layout_range::contains_point): Convert param "row" from int to
19309         linenum_type.
19310         (layout_range::intersects_line_p): Likewise.
19311         (layout::will_show_line_p): Likewise.
19312         (layout::print_source_line): Likewise.
19313         (layout::should_print_annotation_line_p): Likewise.
19314         (layout::print_annotation_line): Likewise.
19315         (layout::print_leading_fixits): Likewise.
19316         (layout::annotation_line_showed_range_p): Likewise.
19317         (struct line_corrections): Likewise for field m_row.
19318         (line_corrections::line_corrections): Likewise for param "row".
19319         (layout::print_trailing_fixits): Likewise.
19320         (layout::get_state_at_point): Likewise.
19321         (layout::get_x_bound_for_row): Likewise.
19322         (layout::print_line): Likewise.
19323         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
19324         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
19325         * input.c (selftest::test_linenum_comparisons): New function.
19326         (selftest::input_c_tests): Call it.
19327         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
19328         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
19329         * selftest.h (ASSERT_GT): New macro.
19330         (ASSERT_GT_AT): New macro.
19331         (ASSERT_LT): New macro.
19332         (ASSERT_LT_AT): New macro.
19334 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
19336         PR rtl-optimization/84780
19337         * combine.c (distribute_links): Don't make a link based on pc_rtx.
19339 2018-03-14  Martin Liska  <mliska@suse.cz>
19341         * tree.c (record_node_allocation_statistics): Use
19342         get_stats_node_kind.
19343         (get_stats_node_kind): New function extracted from
19344         record_node_allocation_statistics.
19345         (free_node): Use get_stats_node_kind.
19347 2018-03-14  Richard Biener  <rguenther@suse.de>
19349         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
19350         that the value-set of ANTIC_IN doesn't grow.
19352         Revert
19353         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19354         member.
19355         (BB_VISITED_WITH_VISITED_SUCCS): New define.
19356         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19358 2018-03-14  Julia Koval  <julia.koval@intel.com>
19360         * config.gcc (icelake-client, icelake-server): New.
19361         (icelake): Remove.
19362         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
19363         (initial_ix86_arch_features): Ditto.
19364         (PTA_SKYLAKE): Add SGX.
19365         (PTA_ICELAKE): Remove.
19366         (PTA_ICELAKE_CLIENT): New.
19367         (PTA_ICELAKE_SERVER): New.
19368         (ix86_option_override_internal): Split up icelake on icelake client and
19369         icelake server.
19370         (get_builtin_code_for_version): Ditto.
19371         (fold_builtin_cpu): Ditto.
19372         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
19373         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
19374         * config/i386/i386.h (processor_type): Ditto.
19375         * doc/invoke.texi: Ditto.
19377 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
19379         PR sanitizer/83392
19380         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
19381         INTEGER_CST offset, add it together with bitpos / 8 and
19382         sign extend based on POINTER_SIZE.
19384         PR target/84844
19385         Revert
19386         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
19388         PR target/78090
19389         * config/i386/constraints.md (Yc): New register constraint.
19390         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
19391         Use Yc constraint for alternative 2 of operand 0.  Remove
19392         preferred_for_speed attribute.
19394 2018-03-14  Richard Biener  <rguenther@suse.de>
19396         PR tree-optimization/84830
19397         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
19398         with the old one to avoid oscillations.
19400 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
19402         PR target/83712
19403         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
19404         pseudos.
19405         (assign_by_spills): Return a flag of reload assignment failure.
19406         Do not process the reload assignment failures.  Do not spill other
19407         reload pseudos if they has the same reg class.  Update n if
19408         necessary.
19409         (lra_assign): Add a return arg.  Set up from the result of
19410         assign_by_spills call.
19411         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19412         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
19413         usage_insns if it is not NULL.
19414         (spill_hard_reg_in_range): New function.
19415         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19416         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19417         function prototypes.
19418         (lra_assign): Change prototype.
19419         * lra.c (lra): Add code to deal with fails by splitting hard reg
19420         live ranges.
19422 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
19424         * config/riscv/riscv.opt (mrelax): New option.
19425         * config/riscv/riscv.c (riscv_file_start): Emit ".option
19426         "norelax" when riscv_mrelax is disabled.
19427         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
19429 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19431         PR target/84743
19432         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
19433         reassociation for int modes.
19435 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
19437         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
19438         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
19439         for big-endian.
19440         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
19441         * config/aarch64/aarch64-sve.md
19442         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
19443         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
19444         (*extend<mode><Vwide>2): Rename to...
19445         (aarch64_sve_extend<mode><Vwide>2): ...this.
19446         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
19447         renaming the old pattern to...
19448         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
19449         unsigned packs.
19450         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
19451         define_expand, renaming the old pattern to...
19452         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
19453         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
19454         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
19455         account when deciding which SVE instruction the optab should use.
19456         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
19458 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
19460         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
19461         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
19462         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
19463         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
19464         (tlsdesc_small_<mode>): Turn a define_expand and use
19465         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
19466         (tlsdesc_small_advsimd_<mode>): ...this.
19467         (tlsdesc_small_sve_<mode>): New pattern.
19469 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
19471         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
19472         (UNSPEC_UMUL_HIGHPART): New constants.
19473         (MUL_HIGHPART): New int iteraor.
19474         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
19475         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
19476         define_expand.
19477         (*<su>mul<mode>3_highpart): New define_insn.
19479 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
19481         PR lto/84805
19482         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19483         incomplete types.
19485 2018-03-13  Martin Liska  <mliska@suse.cz>
19487         PR ipa/84658.
19488         * (sem_item_optimizer::sem_item_optimizer): Initialize new
19489         vector.
19490         (sem_item_optimizer::~sem_item_optimizer): Release it.
19491         (sem_item_optimizer::merge_classes): Register variable aliases.
19492         (sem_item_optimizer::fixup_pt_set): New function.
19493         (sem_item_optimizer::fixup_points_to_sets): Likewise.
19494         * ipa-icf.h: Declare new variables and functions.
19496 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
19498         PR middle-end/84834
19499         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
19500         integer_pow2p@2 and test integer_pow2p in condition.
19501         (A < 0 ? C : 0): Similarly for @1.
19503         PR middle-end/84831
19504         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
19505         characters starting at p contain '\0' character, don't look beyond
19506         that.
19508         PR target/84827
19509         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
19510         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
19512         PR target/84828
19513         * reg-stack.c (change_stack): Change update_end var from int to
19514         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
19515         also call set_block_for_insn on the newly added insns and rescan.
19517         PR target/84786
19518         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
19519         on the last operand.
19521         PR c++/84704
19522         * tree.c (stabilize_reference_1): Return save_expr (e) for
19523         STATEMENT_LIST even if it doesn't have side-effects.
19525 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
19527         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
19529 2018-03-12  Renlin Li  <renlin.li@arm.com>
19531         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
19532         aarch64_output_scalar_simd_mov_immediate.
19534 2018-03-12  Martin Sebor  <msebor@redhat.com>
19536         PR tree-optimization/83456
19537         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
19538         for perfectly overlapping calls to memcpy.
19539         (gimple_fold_builtin_memory_chk): Same.
19540         (gimple_fold_builtin_strcpy): Handle no-warning.
19541         (gimple_fold_builtin_stxcpy_chk): Same.
19542         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
19544 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
19546         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
19547         parameter.  Use it for SFmode.
19548         (rs6000_function_arg_advance_1): Adjust.
19549         (rs6000_function_arg): Adjust.
19550         (rs6000_gimplify_va_arg): Pass false for that new parameter.
19552 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
19554         PR rtl-optimization/84169
19555         PR rtl-optimization/84780
19556         * combine.c (can_combine_p): Check for a 2-insn combination whether
19557         the destination register is used between the two insns, too.
19559 2018-03-12  Richard Biener  <rguenther@suse.de>
19561         PR tree-optimization/84803
19562         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
19563         for refs DR analysis didn't process.
19565 2018-03-12  Richard Biener  <rguenther@suse.de>
19567         PR tree-optimization/84777
19568         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
19569         force-vectorize loops ignore whether we are optimizing for size.
19571 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
19573         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
19574         (TARGET_MD_ASM_ADJUST): Define.
19576 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
19577             Kito Cheng  <kito.cheng@gmail.com>
19578             Chung-Ju Wu  <jasonwucj@gmail.com>
19580         * config/nds32/nds32.c (nds32_compute_stack_frame,
19581         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
19582         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
19583         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
19584         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
19585         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
19586         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
19587         * config/nds32/nds32.md (prologue, epilogue): Use macro
19588         NDS32_V3PUSH_AVAILABLE_P to do checking.
19590 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
19592         PR debug/58150
19593         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
19594         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
19595         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
19596         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
19597         addition of most attributes on !orig_type_die or the attribute not
19598         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
19600 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
19601             Chung-Ju Wu  <jasonwucj@gmail.com>
19603         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
19604         __NDS32_VH__ macro.
19605         * config/nds32/nds32.opt (mvh): New option.
19607 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
19608             Chung-Ju Wu  <jasonwucj@gmail.com>
19610         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
19611         function.
19612         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
19613         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
19614         definition.
19616 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
19617             Chung-Ju Wu  <jasonwucj@gmail.com>
19619         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
19620         function.
19621         * config/nds32/nds32-multiple.md (strlensi): New pattern.
19622         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
19624 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
19625             Kito Cheng  <kito.cheng@gmail.com>
19626             Chung-Ju Wu  <jasonwucj@gmail.com>
19628         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
19629         UNSPEC_FFMISM and UNSPEC_FLMISM.
19630         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
19631         for ffb, ffmism and flmism.
19632         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
19633         (unspec_ffmism): Ditto.
19634         (unspec_flmism): Ditto.
19635         (nds32_expand_builtin_impl): Check if string extension is available.
19636         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
19637         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
19639 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
19641         Reverting patch:
19642         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
19644         PR target/83712
19645         * lra-assigns.c (assign_by_spills): Return a flag of reload
19646         assignment failure.  Do not process the reload assignment
19647         failures.  Do not spill other reload pseudos if they has the same
19648         reg class.
19649         (lra_assign): Add a return arg.  Set up from the result of
19650         assign_by_spills call.
19651         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19652         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
19653         usage_insns if it is not NULL.
19654         (spill_hard_reg_in_range): New function.
19655         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19656         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19657         function prototypes.
19658         (lra_assign): Change prototype.
19659         * lra.c (lra): Add code to deal with fails by splitting hard reg
19660         live ranges.
19662 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
19664         PR target/84807
19665         * config/i386/i386.opt: Replace Enforcment with Enforcement.
19667 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
19669         PR debug/84620
19670         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
19671         (dw_val_node): Add val_symbolic_view.
19672         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
19673         (symview_upper_bound): New.
19674         (new_line_info_table): Initialize symviews_since_reset.
19675         (dwarf2out_source_line): Count symviews_since_reset and set
19676         symview_upper_bound.
19677         (dw_val_equal_p): Handle symview.
19678         (add_AT_symview): New.
19679         (print_dw_val): Handle symview.
19680         (attr_checksum, attr_checksum_ordered): Likewise.
19681         (same_dw_val_p, size_of_die): Likewise.
19682         (value_format, output_die): Likewise.
19683         (add_high_low_attributes): Use add_AT_symview for entry_view.
19684         (dwarf2out_finish): Reset symview_upper_bound, clear
19685         zero_view_p.
19687 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
19689         PR target/83969
19690         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
19691         Add strict argument and use it.
19692         (rs6000_split_multireg_move): Update for new strict argument.
19693         (mem_operand_gpr): Disallow all non-offsettable addresses.
19694         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
19696 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
19698         PR target/84772
19699         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
19700         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
19701         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
19703         PR c++/84767
19704         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
19705         decl, use remap_type if we want to use the type.
19707 2018-03-09  Martin Sebor  <msebor@redhat.com>
19709         PR tree-optimization/84526
19710         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19711         Remove dead code.
19712         (builtin_access::generic_overlap): Be prepared to handle non-array
19713         base objects.
19715 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
19717         PR rtl-optimization/84682
19718         * lra-constraints.c (process_address_1): Check is_address flag
19719         for address constraints.
19720         (process_alt_operands): Likewise.
19721         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
19722         preprocess_constraints.
19723         * recog.h (preprocess_constraints): Add oploc parameter.
19724         Adjust callers.
19725         * recog.c (preprocess_constraints): Test address_operand for
19726         CT_ADDRESS constraints.
19728 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
19730         PR target/83712
19731         * lra-assigns.c (assign_by_spills): Return a flag of reload
19732         assignment failure.  Do not process the reload assignment
19733         failures.  Do not spill other reload pseudos if they has the same
19734         reg class.
19735         (lra_assign): Add a return arg.  Set up from the result of
19736         assign_by_spills call.
19737         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19738         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
19739         usage_insns if it is not NULL.
19740         (spill_hard_reg_in_range): New function.
19741         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19742         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19743         function prototypes.
19744         (lra_assign): Change prototype.
19745         * lra.c (lra): Add code to deal with fails by splitting hard reg
19746         live ranges.
19748 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19750         PR target/83193
19751         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
19752         Accept complain bool parameter.  Only emit errors if it is true.
19753         (arm_parse_cpu_option_name): Likewise.
19754         (arm_target_thumb_only): Adjust callers of the above.
19755         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
19756         prototype to take a default true bool parameter.
19757         (arm_parse_arch_option_name): Likewise.
19759 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
19760             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
19762         PR jit/64089
19763         PR jit/84288
19764         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
19765         * configure: Regenerate.
19766         * configure.ac ("linker --version-script option"): New.
19767         ("linker soname option"): New.
19769 2018-03-09  Richard Biener  <rguenther@suse.de>
19771         PR tree-optimization/84775
19772         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
19773         immediate uses of predicate stmts and mark them modified.
19775         Revert
19776         PR tree-optimization/84178
19777         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19778         to caller.
19779         (version_loop_for_if_conversion): Delay update_ssa call.
19780         (tree_if_conversion): Delay update_ssa until after predicate
19781         insertion.
19783 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
19785         PR target/84763
19786         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
19787         when the function accesses prior frames.
19789 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
19791         PR debug/84456
19792         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
19793         gen_llsym, otherwise call maybe_gen_llsym.
19795         PR inline-asm/84742
19796         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
19797         has ',' character inside of it.
19799 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19801         PR target/84748
19802         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
19803         as clobbering CC_REGNUM.
19805 2018-03-08  Richard Biener  <rguenther@suse.de>
19807         PR middle-end/84552
19808         * tree-scalar-evolution.c: Include tree-into-ssa.h.
19809         (follow_copies_to_constant): Do not follow SSA names registered
19810         for update.
19812 2018-03-08  Richard Biener  <rguenther@suse.de>
19814         PR tree-optimization/84178
19815         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19816         to caller.
19817         (version_loop_for_if_conversion): Delay update_ssa call.
19818         (tree_if_conversion): Delay update_ssa until after predicate
19819         insertion.
19821 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
19823         PR tree-optimization/84178
19824         * tree-if-conv.c (release_bb_predicate): Remove the
19825         the assertion that the stmts have NULL use_ops.
19826         Discard the statements, asserting that they haven't
19827         yet been added to a BB.
19829 2018-03-08  Richard Biener  <rguenther@suse.de>
19831         PR tree-optimization/84746
19832         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
19833         (phi_translate): Pass in destination ANTIC_OUT set.
19834         (phi_translate_1): Likewise.  For a simplified result lookup
19835         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
19836         (phi_translate_set): Adjust.
19837         (do_pre_regular_insertion): Likewise.
19838         (do_pre_partial_partial_insertion): Likewise.
19840 2018-03-08  Martin Liska  <mliska@suse.cz>
19842         PR gcov-profile/84735
19843         * doc/gcov.texi: Document usage of profile files.
19844         * gcov-io.h: Document changes in the format.
19846 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
19848         PR debug/84404
19849         PR debug/84408
19850         * dwarf2out.c (struct dw_line_info_table): Update comments for
19851         view == -1.
19852         (FORCE_RESET_NEXT_VIEW): New.
19853         (FORCE_RESETTING_VIEW_P): New.
19854         (RESETTING_VIEW_P): Check for -1 too.
19855         (ZERO_VIEW_P): Likewise.
19856         (new_line_info_table): Force-reset next view.
19857         (dwarf2out_begin_function): Likewise.
19858         (dwarf2out_source_line): Simplify zero_view_p initialization.
19859         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
19860         view directly.  Omit view when omitting .loc at line 0.
19862 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
19864         PR tree-optimization/84740
19865         * tree-switch-conversion.c (process_switch): Call build_constructors
19866         only if info.phi_count is non-zero.
19868         PR tree-optimization/84739
19869         * tree-tailcall.c (find_tail_calls): Check call arguments against
19870         DECL_ARGUMENTS (current_function_decl) rather than
19871         DECL_ARGUMENTS (func) when checking for tail recursion.
19873 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
19875         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
19876         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
19877         Volker Reichelt's entry and add entries for people that perform
19878         GCC fuzzy testing and report numerous bugs.
19880 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
19882         PR target/82411
19883         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
19884         readonly data in sdata, if that is disabled.
19885         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
19886         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
19887         -mreadonly-in-sdata option.
19889 2018-03-07  Martin Sebor  <msebor@redhat.com>
19891         PR tree-optimization/84468
19892         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
19893         basic block when looking for nul assignment.
19895 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
19897         PR target/84277
19898         * except.h (output_function_exception_table): Adjust prototype.
19899         * except.c (output_function_exception_table): Remove FNNAME parameter
19900         and add SECTION parameter.  Ouput one part of the table at a time.
19901         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
19902         the first part of the exception table and emit unwind directives.
19903         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
19904         (i386_pe_seh_cold_init): Likewise.
19905         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
19906         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
19907         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
19908         (ix86_output_call_insn): Emit a nop in one more case for SEH.
19909         * config/i386/winnt.c: Include except.h.
19910         (struct seh_frame_state): Add reg_offset, after_prologue and
19911         in_cold_section fields.
19912         (i386_pe_seh_end_prologue): Set seh->after_prologue.
19913         (i386_pe_seh_cold_init): New function.
19914         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
19915         to seh->in_cold_section.
19916         (seh_emit_push): Record the offset of the push.
19917         (seh_emit_save): Record the offet of the save.
19918         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
19919         Test seh->after_prologue to disregard the epilogue.
19920         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
19921         (i386_pe_end_cold_function): New function.
19923 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
19925         PR fortran/84565
19926         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
19927         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
19929         PR c++/84704
19930         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
19931         on tmp_var.
19932         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
19933         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
19935         PR middle-end/84723
19936         * multiple_target.c: Include tree-inline.h and intl.h.
19937         (expand_target_clones): Diagnose and fail if node->definition and
19938         !tree_versionable_function_p (node->decl).
19940 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
19942         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
19943         sprint_ul.
19944         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
19945         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19946         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
19948 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
19950         PR target/84710
19951         * combine.c (try_combine): Use reg_or_subregno instead of handling
19952         just paradoxical SUBREGs and REGs.
19954 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
19956         * config/arc/arc.c (arc_finalize_pic): Remove function.
19957         (arc_must_save_register): We use single base PIC register, remove
19958         checks to save/restore the PIC register.
19959         (arc_expand_prologue): Likewise.
19960         * config/arc/arc-protos.h (arc_set_default_type_attributes):
19961         Remove.
19962         (arc_verify_short): Likewise.
19963         (arc_attr_type): Likewise.
19964         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
19965         (walk_stores): Likewise.
19966         (arc_address_cost): Make it static.
19967         (arc_verify_short): Likewise.
19968         (branch_dest): Likewise.
19969         (arc_attr_type): Likewise.
19970         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
19971         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
19972         (arc_final_prescan_insn): Remove inserting the nops due to
19973         hardware hazards.  It is done in reorg step.
19974         (insn_length_variant_t): Remove.
19975         (insn_length_parameters_t): Likewise.
19976         (arc_insn_length_parameters): Likewise.
19977         (arc_get_insn_variants): Likewise.
19978         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
19980 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
19982         PR inline-asm/84683
19983         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
19984         assertion failure.
19986         PR tree-optimization/84687
19987         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
19988         on new_node->decl.
19989         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
19991 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19993         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
19994         Rename to ppc_speculation_barrier.
19995         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
19996         __builtin_ppc_speculation_barrier.
19998 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
20000         PR target/84700
20001         * combine.c (combine_simplify_rtx): Don't try to simplify if
20002         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
20003         are equal to x.
20005 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
20007         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
20008         to 32 bytes when compiling for POWER9.
20010 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
20012         PR target/84564
20013         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
20014         regparm >= 3 with no arg reg available also for calls with
20015         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
20017         PR target/84524
20018         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
20019         orig,vex.
20020         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
20022 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
20024         PR target/84264
20025         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
20027 2018-03-05  Richard Biener  <rguenther@suse.de>
20029         PR tree-optimization/84486
20030         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
20031         When inserting a __builtin_assume_aligned call set the LHS
20032         SSA name alignment info accordingly.
20034 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
20036         PR tree-optimization/84114
20037         * config/aarch64/aarch64.c (aarch64_reassociation_width)
20038         Avoid reassociation of FLOAT_MODE addition.
20040 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
20042         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
20043         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
20044         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
20045         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
20046         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
20047         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
20048         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
20049         and -mwbnoinvd.
20050         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
20051         __builtin_ia32_wbinvd): New builtins.
20052         (SPECIAL_ARGS2): New.
20053         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
20054         (SPECIAL_ARGS2): New.
20055         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
20056         (ix86_valid_target_attribute_inner_p): Ditto.
20057         (ix86_init_mmx_sse_builtins): Add special_args2.
20058         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
20059         TARGET_WBNOINVD_P): New.
20060         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
20061         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
20062         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
20063         * config/i386/immintrin.h (_wbinvd): New intrinsic.
20064         * config/i386/pconfigintrin.h: New file.
20065         * config/i386/wbnoinvdintrin.h: Ditto.
20066         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
20067         wbnoinvdintrin.h.
20068         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
20070 2018-03-05  Richard Biener  <rguenther@suse.de>
20072         PR tree-optimization/84670
20073         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20074         member.
20075         (BB_VISITED_WITH_VISITED_SUCCS): New define.
20076         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20077         (compute_antic_aux): Only assert the number of values in ANTIC_IN
20078         doesn't grow if all successors (recursively) were visited at least
20079         once.
20081 2018-03-05  Richard Biener  <rguenther@suse.de>
20083         PR tree-optimization/84650
20084         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
20085         if executed in the loop pipeline.
20087 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
20089         * doc/configfiles.texi (Configuration Files): Move info about
20090         conditionalizing $target-protos.h to...
20091         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
20092         differs from $target-protos.h.
20094 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
20095             Chung-Ju Wu  <jasonwucj@gmail.com>
20097         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
20098         * config/nds32/nds32-multiple.md (setmemsi): Define.
20099         * config/nds32/nds32-memory-manipulation.c
20100         (nds32_gen_dup_4_byte_to_word_value): New.
20101         (emit_setmem_word_loop): New.
20102         (emit_setmem_byte_loop): New.
20103         (nds32_expand_setmem_loop): New.
20104         (nds32_expand_setmem_loop_v3m): New.
20105         (nds32_expand_setmem_unroll): New.
20106         (nds32_expand_setmem): New.
20108 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
20109             Chung-Ju Wu  <jasonwucj@gmail.com>
20111         * config/nds32/nds32-memory-manipulation.c
20112         (nds32_emit_load_store): New.
20113         (nds32_emit_post_inc_load_store): New.
20114         (nds32_emit_mem_move): New.
20115         (nds32_emit_mem_move_block): New.
20116         (nds32_expand_movmemsi_loop_unknown_size): New.
20117         (nds32_expand_movmemsi_loop_known_size): New.
20118         (nds32_expand_movmemsi_loop): New.
20119         (nds32_expand_movmemsi_unroll): New.
20120         (nds32_expand_movmemqi): Rename ...
20121         (nds32_expand_movmemsi): ... to this.
20122         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
20123         (movmemsi): ... to this.
20124         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
20125         (nds32_expand_movmemsi): ... to this.
20127 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
20128             Monk Chiang  <sh.chiang04@gmail.com>
20129             Chung-Ju Wu  <jasonwucj@gmail.com>
20131         * config/nds32/nds32-protos.h
20132         (nds32_expand_load_multiple): New arguments.
20133         (nds32_expand_store_multiple): Ditto.
20134         (nds32_valid_multiple_load_store): Rename ...
20135         (nds32_valid_multiple_load_store_p): ... to this.
20136         * config/nds32/nds32-memory-manipulation.c
20137         (nds32_expand_load_multiple): Refine implementation.
20138         (nds32_expand_store_multiple): Ditto.
20139         * config/nds32/nds32-multiple.md
20140         (load_multiple): Update nds32_expand_load_multiple interface.
20141         (store_multiple): Update nds32_expand_store_multiple interface.
20142         * config/nds32/nds32-predicates.c
20143         (nds32_valid_multiple_load_store): Rename ...
20144         (nds32_valid_multiple_load_store_p): ... to this and refine
20145         implementation.
20146         * config/nds32/predicates.md
20147         (nds32_load_multiple_and_update_address_operation): New predicate.
20148         (nds32_store_multiple_and_update_address_operation): New predicate.
20150 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
20151             Chung-Ju Wu  <jasonwucj@gmail.com>
20153         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
20154         (combo): New attribute.
20155         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
20157 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
20159         * config/nds32/nds32.opt: Change -mcmodel= default value.
20161 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
20162             Monk Chiang  <sh.chiang04@gmail.com>
20163             Chung-Ju Wu  <jasonwucj@gmail.com>
20165         * config/nds32/constants.md (unspec_element): New enum.
20166         * config/nds32/constraints.md (Umw): New constraint.
20167         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
20168         * config/nds32/nds32-intrinsic.md: Likewise.
20169         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
20170         (nds32_valid_smw_lwm_base_p): New.
20171         (nds32_output_smw_single_word): New.
20172         (nds32_output_lmw_single_word): New.
20173         (nds32_expand_unaligned_load): New.
20174         (nds32_expand_unaligned_store): New.
20175         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
20176         (nds32_output_smw_single_word): Declare.
20177         (nds32_output_lmw_single_word): Declare.
20178         (nds32_expand_unaligned_load): Declare.
20179         (nds32_expand_unaligned_store): Declare.
20180         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
20181         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
20182         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
20183         NDS32_BUILTIN_UASTORE_DW.
20184         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
20185         predicate.
20187 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
20188             Kito Cheng  <kito.cheng@gmail.com>
20189             Chung-Ju Wu  <jasonwucj@gmail.com>
20191         * config/nds32/nds32-intrinsic.c
20192         (nds32_expand_builtin_null_ftype_reg): Delete.
20193         (nds32_expand_builtin_reg_ftype_imm): Ditto.
20194         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
20195         (nds32_read_argument): New.
20196         (nds32_legitimize_target): Ditto.
20197         (nds32_legitimize_argument): Ditto.
20198         (nds32_check_constant_argument): Ditto.
20199         (nds32_expand_unop_builtin): Ditto.
20200         (nds32_expand_unopimm_builtin): Ditto.
20201         (nds32_expand_binop_builtin): Ditto.
20202         (nds32_builtin_decl_impl): Ditto.
20203         (builtin_description): Ditto.
20204         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
20205         (nds32_init_builtins_impl): Ditto.
20206         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
20207         (nds32_builtin_decl): New.
20208         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
20209         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
20211 2018-03-02  Jeff Law  <law@redhat.com>
20213         * reorg.c (stop_search_p): Handle DEBUG_INSN.
20214         (redundant_insn, fill_simple_delay_slots): Likewise.
20215         (fill_slots_from_thread): Likewise.
20216         * resource.c (mark_referenced_resources): Likewise.
20217         (mark_set_resources, find_dead_or_set_registers): Likewise.
20219 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20221         * substring-locations.h (format_warning_va): Formatting fix for
20222         ATTRIBUTE_GCC_DIAG.
20223         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
20224         argument.
20225         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
20226         * substring-locations.c: Include intl.h.
20227         (format_warning_va): Turned into small wrapper around
20228         format_warning_n_va, renamed to ...
20229         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
20230         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
20231         use ngettext.
20232         (format_warning_at_substring_n): New function.
20233         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
20234         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
20235         format_warning_at_substring with just a shorter name instead of
20236         const function pointer.
20237         (fmtwarn_n): New function.
20238         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
20239         appropriate, get rid of all the fmtstr temporaries, move conditionals
20240         with G_() wrapped string literals directly into fmtwarn arguments,
20241         cast dir.len to (int), formatting fixes.
20243 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
20245         * doc/invoke.texi: Remove "Cilk Plus" references.
20247 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20248             Richard Biener  <rguenther@suse.de>
20250         PR ipa/84628
20251         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
20252         for error or warning attributes if CALL_FROM_THUNK_P is set.
20253         Formatting fixes.
20255 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20257         PR target/56540
20258         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
20259         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
20261         PR target/56540
20262         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
20263         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
20265         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
20266         instead of -1U in last predictors element's probability member.
20268 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
20270         PR ipa/83983
20271         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20272         arguments if they are comparable.
20274 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
20276         PR tree-optimization/84634
20277         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
20278         masks and masked_loop_p with a single loop_masks, making sure it's
20279         null for bb vectorization.
20281 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
20283         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
20284         (vect_analyze_data_ref_access): Use loop->safe_len rather than
20285         loop->force_vectorize to check whether there is no alias.
20287 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20289         PR target/84614
20290         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
20291         prototypes.
20292         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
20293         comments.
20294         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
20295         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
20296         instead of a loop around prev_real_insn.
20297         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
20298         prev_real_insn.
20300         PR inline-asm/84625
20301         * config/i386/i386.c (ix86_print_operand): Use conditional
20302         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
20303         zero vector.
20305 2018-03-02  Richard Biener  <rguenther@suse.de>
20307         PR tree-optimization/84427
20308         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
20309         (bitmap_set_subtract_values): Rewrite to handle multiple
20310         exprs per value.
20311         (clean): Likewise.
20312         (prune_clobbered_mems): Likewise.
20313         (phi_translate): Take edge instead of pred/phiblock.
20314         (phi_translate_1): Likewise.
20315         (phi_translate_set): Likewise.  Insert all translated
20316         exprs for a value into the set, keeping possibly multiple
20317         expressions per value.
20318         (compute_antic_aux): Adjust for phi_translate changes.
20319         When intersecting union the expressions and prune those
20320         not in the final value set, keeping possibly multiple
20321         expressions per value.  Do not use value-insertion
20322         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
20323         all expressions.  Add verification that the value-sets
20324         only shrink during iteration.
20325         (compute_partial_antic_aux): Adjust for the phi_translate changes.
20326         (do_pre_regular_insertion): Likewise.
20327         (do_pre_partial_partial_insertion): Likewise.
20329 2018-03-02  Richard Biener  <rguenther@suse.de>
20331         PR target/82005
20332         * config/darwin.c (saved_debug_info_level): New static global.
20333         (darwin_asm_lto_start): Disable debug info generation for LTO out.
20334         (darwin_asm_lto_end): Restore debug info generation settings.
20336 2018-03-01  Martin Liska  <mliska@suse.cz>
20338         PR sanitizer/82484
20339         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
20340         volatile arguments.
20342 2018-03-01  Richard Biener  <rguenther@suse.de>
20344         PR debug/84645
20345         * dwarf2out.c (gen_variable_die): Properly handle late VLA
20346         type annotation with LTO when debug was disabled at compile-time.
20348 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
20350         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
20351         XINT with INTVAL.
20352         (mips_final_postscan_insn): Likewise.
20354 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
20356         PR rtl-optimization/84528
20357         * alias.c (init_alias_target): Add commentary.
20358         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
20359         a unique base value if the frame pointer is not eliminated
20360         to the stack pointer.
20362 2018-03-01  Tom de Vries  <tom@codesourcery.com>
20364         PR rtl-optimization/83327
20365         * lra-int.h (hard_regs_spilled_into): Declare.
20366         * lra.c (hard_regs_spilled_into): Define.
20367         (init_reg_info): Init hard_regs_spilled_into.
20368         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
20369         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
20370         (process_bb_lives): Handle hard_regs_spilled_into.
20371         (lra_create_live_ranges_1): Before doing liveness propagation, clear
20372         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
20374 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
20376         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
20377         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
20378         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
20379         * config/rs6000/aix72.h: New file.
20381 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
20383         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
20384         instead of warning_at with conditional singular and plural messages
20385         where possible.
20387         PR target/52991
20388         * stor-layout.c (update_alignment_for_field): For
20389         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
20390         && !DECL_PACKED (field), do the alignment update, just use
20391         only desired_align instead of MAX (type_align, desired_align)
20392         as the alignment.
20393         (place_field): Don't do known_align < desired_align handling
20394         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
20395         is non-NULL, instead do it after rli->prev_field handling and
20396         only if not within a bitfield word.  For DECL_PACKED (field)
20397         use type_align of BITS_PER_UNIT.
20399 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
20401         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
20402         superfluous parentheses and trailing spaces.
20404 2018-02-28  Richard Biener  <rguenther@suse.de>
20406         PR tree-optimization/84584
20407         * graphite-scop-detection.c (scop_detection::add_scop): Discard
20408         SCoPs with fake exit edge.
20410 2018-02-28  Martin Liska  <mliska@suse.cz>
20412         PR testsuite/84597
20413         * timevar.c (timer::print): Fix format to properly print 100%
20414         values.
20416 2018-02-28  Richard Biener  <rguenther@suse.de>
20418         PR middle-end/84607
20419         * genmatch.c (capture_info::walk_match): Do not mark
20420         captured expressions without operands as expr_p given
20421         they act more like predicates and should be subject to
20422         "lost tail" side-effect preserving.
20424 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
20426         PR rtl-optimization/81611
20427         * auto-inc-dec.c (attempt_change): Move dead note from
20428         mem_insn if it's the next use of regno
20429         (find_address): Take address use of reg holding
20430         non-incremented value.  Add parm to limit search to the named
20431         reg only.
20432         (merge_in_block): Attempt to use a mem insn that is the next
20433         use of the original regno.
20435 2018-02-27  Martin Sebor  <msebor@redhat.com>
20437         PR c++/83871
20438         * doc/invoke.texi (-Wmissing-attributes): New option.
20439         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
20441 2018-02-27  Martin Sebor  <msebor@redhat.com>
20443         PR translation/84207
20444         * diagnostic-core.h (warning_n, error_n, inform_n): Change
20445         n argument to unsigned HOST_WIDE_INT.
20446         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
20447         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
20448         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
20449         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
20451 2018-02-27  Richard Biener  <rguenther@suse.de>
20453         PR tree-optimization/84512
20454         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
20455         Do not use the estimate returned from record_stmt_cost for
20456         the scalar iteration cost but sum properly using add_stmt_cost.
20458 2018-02-27  Richard Biener  <rguenther@suse.de>
20460         PR tree-optimization/84466
20461         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20462         Adjust last change to less strictly validate use operands.
20464 2018-02-27  Martin Liska  <mliska@suse.cz>
20466         PR gcov-profile/84548
20467         * gcov.c (process_file): Allow partial overlap and consider it
20468         also as group functions.
20469         (output_lines): Properly calculate range of lines for a group.
20471 2018-02-27  Martin Liska  <mliska@suse.cz>
20473         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
20474         'ggc' suffixes.  Change first column width.
20475         (timer::print): Fix formatting of the column.
20477 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
20479         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
20480         preserve inline entry blocks for the sake of debug inline
20481         entry point markers alone.
20482         (remove_unused_locals): Suggest in comments a better place to
20483         force the preservation of inline entry blocks that are
20484         otherwise unused, but do not preserve them.
20486 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
20488         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
20490 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
20492         PR target/84039
20493         * config/i386/constraints.md (Bs): Replace
20494         ix86_indirect_branch_register with
20495         TARGET_INDIRECT_BRANCH_REGISTER.
20496         (Bw): Likewise.
20497         * config/i386/i386.md (indirect_jump): Likewise.
20498         (tablejump): Likewise.
20499         (*sibcall_memory): Likewise.
20500         (*sibcall_value_memory): Likewise.
20501         Peepholes of indirect call and jump via memory: Likewise.
20502         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
20503         (*sibcall_value_GOT_32): Likewise.
20504         * config/i386/predicates.md (indirect_branch_operand): Likewise.
20505         (GOT_memory_operand): Likewise.
20506         (call_insn_operand): Likewise.
20507         (sibcall_insn_operand): Likewise.
20508         (GOT32_symbol_operand): Likewise.
20509         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
20511 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
20513         PR rtl-optimization/83496
20514         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
20515         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
20516         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
20517         redundant insn, if any.
20518         (relax_delay_slots): Likewise.
20519         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
20521 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
20523         PR tree-optimization/83965
20524         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
20525         that grouped statements are part of a reduction chain.  Return
20526         true if the statement is not marked as a reduction itself but
20527         is part of a group.
20528         (vect_recog_dot_prod_pattern): Don't check whether the statement
20529         is part of a group here.
20530         (vect_recog_sad_pattern): Likewise.
20531         (vect_recog_widen_sum_pattern): Likewise.
20533 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
20535         PR debug/84545
20536         * final.c (rest_of_clean_state): Also look for calls inside sequences.
20538 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
20540         PR target/84530
20541         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
20542         the bool argument.
20543         (ix86_output_indirect_function_return): New prototype.
20544         (ix86_split_simple_return_pop_internal): Likewise.
20545         * config/i386/i386.c (indirect_return_via_cx): New.
20546         (indirect_return_via_cx_bnd): Likewise.
20547         (indirect_thunk_name): Handle return va CX_REG.
20548         (output_indirect_thunk_function): Create alias for
20549         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
20550         (ix86_output_indirect_jmp): Remove the bool argument.
20551         (ix86_output_indirect_function_return): New function.
20552         (ix86_split_simple_return_pop_internal): Likewise.
20553         * config/i386/i386.md (*indirect_jump): Don't pass false
20554         to ix86_output_indirect_jmp.
20555         (*tablejump_1): Likewise.
20556         (simple_return_pop_internal): Change it to define_insn_and_split.
20557         Call ix86_split_simple_return_pop_internal to split it for
20558         -mfunction-return=.
20559         (simple_return_indirect_internal): Call
20560         ix86_output_indirect_function_return instead of
20561         ix86_output_indirect_jmp.
20563 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
20565         PR bootstrap/84405
20566         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
20567         memset and value initialization afterwards.
20569 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
20571         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
20573 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
20575         PR target/84521
20576         * common/config/aarch64/aarch64-common.c
20577         (aarch_option_optimization_table[]): Switch
20578         off fomit-frame-pointer
20580 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
20581             Chung-Ju Wu  <jasonwucj@gmail.com>
20583         * config/nds32/nds32-multiple.md (load_multiple): Disallow
20584         volatile memory.
20585         (store_multiple): Ditto.
20587 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
20589         * config.gcc: Add --with-cpu support for nds32 target.
20590         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
20591         * config/nds32/nds32.opt: Add -mcpu= option.
20593 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
20595         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
20596         isel=yes): Warn for these deprecated options.
20598 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
20600         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
20601         ISA_2_5_MASKS_EMBEDDED.
20603 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
20605         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
20606         p->max as pointers rather than using iterative_hash_expr.
20608 2018-02-23  Carl Love  <cel@us.ibm.com>
20610         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
20611         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
20612         BU_P8V_OVERLOAD_2.
20613         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
20614         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
20615         P8V_BUILTIN_VEC_VUNSIGNED2.
20617 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
20619         PR target/81572
20620         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
20621         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
20622         LRA_UNKNOWN_ALT.
20623         * lra-constraints.c (curr_insn_transform): Set up
20624         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
20625         LRA_UNKNOWN_ALT.
20626         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
20627         * lra-eliminations.c (spill_pseudos): Ditto.
20628         (process_insn_for_elimination): Ditto.
20629         * lra-lives.c (reg_early_clobber_p): Use the new macros.
20630         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
20631         LRA_NON_CLOBBERED_ALT.
20633 2018-02-22  Martin Sebor  <msebor@redhat.com>
20635         PR tree-optimization/84480
20636         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
20637         to maybe_diag_stxncpy_trunc.  Call it.
20638         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
20639         from gimple_fold_builtin_strcpy.  Print inlining stack.
20640         (handle_builtin_stxncpy): Print inlining stack.
20641         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
20643 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
20645         PR target/84176
20646         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
20647         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
20648         and -fcheck-pointer-bounds are used together.
20649         (indirect_thunk_prefix): New enum.
20650         (indirect_thunk_need_prefix): New function.
20651         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
20652         "_nt" instead of "_bnd" for NOTRACK prefix.
20653         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
20654         (output_indirect_thunk_function): Likewise.
20655         (): Likewise.
20656         (ix86_code_end): Update output_indirect_thunk_function calls.
20657         (ix86_output_indirect_branch_via_reg): Replace
20658         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
20659         (ix86_output_indirect_branch_via_push): Likewise.
20660         (ix86_output_function_return): Likewise.
20661         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
20662         incompatible with -fcf-protection=branch and
20663         -fcheck-pointer-bounds.
20665 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
20667         PR target/83335
20668         * config/aarch64/aarch64.c (aarch64_print_address_internal):
20669         Change gcc_assert call to output_operand_lossage.
20671 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
20673         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
20675 2018-02-22  DJ Delorie  <dj@redhat.com>
20676             Sebastian Perta  <sebastian.perta@renesas.com>
20677             Oleg Endo  <olegendo@gcc.gnu.org>
20679         * config/rx/rx.c (rx_rtx_costs): New function.
20680         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
20682 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
20684         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
20686 2018-02-22  Martin Liska  <mliska@suse.cz>
20688         PR driver/83193
20689         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
20690         Add "native" as a possible value.
20692 2018-02-22  Martin Liska  <mliska@suse.cz>
20694         PR driver/83193
20695         * config/i386/i386.c (ix86_option_override_internal):
20696         Add "native" as a possible value for -march and -mtune.
20698 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
20700         PR target/84502
20701         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
20702         to all type variants.
20704         PR tree-optimization/84503
20705         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
20706         width as info->bitpos + info->bitsize - start.
20707         (merged_store_group::merge_overlapping): Simplify width computation.
20708         (check_no_overlap): New function.
20709         (imm_store_chain_info::try_coalesce_bswap): Compute expected
20710         start + width and last_order of the group, fail if check_no_overlap
20711         fails.
20712         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
20713         to group if check_no_overlap fails.
20715 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
20717         * config/rs6000/altivec.md: Delete contraint arguments to
20718         define_expand, define_split, and define_peephole2, and in
20719         define_insn_and_split if always unused.
20720         * config/rs6000/darwin.md: Ditto.
20721         * config/rs6000/dfp.md: Ditto.
20722         * config/rs6000/rs6000.md: Ditto.
20723         * config/rs6000/sync.md: Ditto.
20724         * config/rs6000/vector.md: Ditto.
20725         * config/rs6000/vsx.md: Ditto.
20727 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
20729         * config/rs6000/altivec.md: Write output control strings as braced
20730         blocks instead of double-quoted strings.
20731         * config/rs6000/darwin.md: Ditto.
20732         * config/rs6000/rs6000.md: Ditto.
20733         * config/rs6000/vector.md: Ditto.
20734         * config/rs6000/vsx.md: Ditto.
20736 2018-02-21  Jason Merrill  <jason@redhat.com>
20738         PR c++/84314 - ICE with templates and fastcall attribute.
20739         * attribs.c (build_type_attribute_qual_variant): Remove assert.
20741 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
20743         * ipa-cp.c (determine_versionability): Fix comment typos.
20745 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
20747         PR c/84229
20748         * ipa-cp.c (determine_versionability): Do not version functions caling
20749         va_arg_pack.
20751 2018-02-21  Martin Liska  <mliska@suse.cz>
20753         PR driver/83193
20754         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
20755         Add "native" as a possible value.
20756         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
20757         the macro when native cpu detection is available.
20759 2018-02-21  Martin Liska  <mliska@suse.cz>
20761         PR driver/83193
20762         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
20763         Add "native" as a possible value.
20764         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
20765         when native cpu detection is available.
20767 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
20768             Martin Sebor  <msebor@redhat.com>
20770         PR tree-optimization/84478
20771         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
20772         false.
20773         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
20774         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
20775         support which is conservatively correct, for 2 only stay conservative
20776         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
20777         argument to the 2 argument get_range_strlen, adjust 6 arg
20778         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
20779         false.
20780         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
20781         (gimple_fold_builtin_strlen): Pass true as last argument to
20782         get_range_strlen.
20784 2018-02-20  Martin Sebor  <msebor@redhat.com>
20786         PR middle-end/84095
20787         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
20788         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
20789         (builtin_memref::builtin_memref): Factor out parts into
20790         set_base_and_offset and call it.
20792 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
20794         PR middle-end/84406
20795         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
20796         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
20797         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
20798         search at the associated MODE_INT.
20800 2018-02-20  Jeff Law  <law@redhat.com>
20802         PR middle-end/82123
20803         PR tree-optimization/81592
20804         PR middle-end/79257
20805         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
20806         for range data rather than using global data.
20807         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
20808         range data rather than using global data.
20809         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
20810         pass it to children as needed.
20811         (struct directive::fmtresult): Similarly.
20812         (struct directive::set_width): Similarly.
20813         (struct directive::set_precision): Similarly.
20814         (format_integer, format_directive, parse_directive): Similarly.
20815         (format_none): Accept unnamed vr_values parameter.
20816         (format_percent, format_floating, format_character): Similarly.
20817         (format_string, format_plain): Similarly.
20818         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
20819         the EVRP range analyzer for range data rather than using global data.
20820         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
20821         gimple-ssa-evrp-analyze.h
20822         (class sprintf_dom_walker): Add after_dom_children member function.
20823         Add evrp_range_analyzer member.
20824         (sprintf_dom_walker::before_dom_children): Call into the EVRP
20825         range analyzer as needed.
20826         (sprintf_dom_walker::after_dom_children): New member function.
20827         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
20828         if not optimizing.
20829         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
20830         (evrp_range_analyzer::pop_to_marker): Likewise.
20832 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
20834         PR tree-optimization/84419
20835         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
20836         with the required type if its current type is compatible but
20837         different.
20839 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
20841         PR middle-end/82004
20842         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
20843         after vectorization.
20845 2018-02-20  Martin Liska  <mliska@suse.cz>
20847         PR driver/83193
20848         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
20849         possible values if we don't have a hint.
20851 2018-02-20  Martin Liska  <mliska@suse.cz>
20853         PR c/84310
20854         PR target/79747
20855         * final.c (shorten_branches): Build align_tab array with one
20856         more element.
20857         * opts.c (finish_options): Add alignment option limit check.
20858         (MAX_CODE_ALIGN): Likewise.
20859         (MAX_CODE_ALIGN_VALUE): Likewise.
20860         * doc/invoke.texi: Document maximum allowed option value for
20861         all -falign-* options.
20863 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
20865         PR target/84146
20866         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
20867         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
20868         * var-tracking.c (emit_note_insn_var_location): Remove all references
20869         to NOTE_INSN_CALL_ARG_LOCATION.
20870         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
20871         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
20872         Use copy_rtx_if_shared.
20873         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
20874         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
20875         (dwarf2out_var_location): Remove handling of
20876         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
20877         on call_insn.
20878         * final.c (final_scan_insn): Remove all references to
20879         NOTE_INSN_CALL_ARG_LOCATION.
20880         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
20881         before dumping final insns.
20882         * except.c (emit_note_eh_region_end): Remove all references to
20883         NOTE_INSN_CALL_ARG_LOCATION.
20884         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
20885         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
20886         * config/arc/arc.c (hwloop_optimize): Likewise.
20887         * config/arm/arm.c (create_fix_barrier): Likewise.
20888         * config/s390/s390.c (s390_chunkify_start): Likewise.
20889         * config/sh/sh.c (find_barrier): Likewise.
20890         * config/i386/i386.c (rest_of_insert_endbranch,
20891         ix86_seh_fixup_eh_fallthru): Likewise.
20892         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
20893         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
20894         * config/frv/frv.c (frv_function_prologue): Likewise.
20895         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
20896         reg note.
20897         (note_outside_basic_block_p): Remove all references to
20898         NOTE_INSN_CALL_ARG_LOCATION.
20899         * gengtype.c (adjust_field_rtx_def): Likewise.
20900         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
20901         Likewise.
20902         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
20903         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
20905         PR c++/84444
20906         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
20907         is ADDR_EXPR.
20909         PR tree-optimization/84452
20910         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
20911         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
20912         is NULL.
20914 2018-02-19  Martin Liska  <mliska@suse.cz>
20916         PR sanitizer/82183
20917         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
20919 2018-02-19  Martin Liska  <mliska@suse.cz>
20920             Richard Sandiford  <richard.sandiford@linaro.org>
20922         PR tree-optimization/82491
20923         * gimple-fold.c (get_base_constructor): Make earlier bail out
20924         to prevent ubsan.
20926 2018-02-19  Carl Love  <cel@us.ibm.com>
20928         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
20929         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
20930         BU_P8V_OVERLOAD_1.
20931         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
20932         P8V_BUILTIN_VEC_NEG.
20934 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
20936         * config/rl78/rl78.md (movdf): New define expand.
20938 2018-02-19  Martin Liska  <mliska@suse.cz>
20940         PR other/80589
20941         * doc/invoke.texi: Fix typo.
20942         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
20944 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
20946         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
20947         handle rs6000_single_float and rs6000_double_float specially for
20948         e500 family CPUs.
20950 2018-02-16  Jeff Law  <law@redhat.com>
20952         * config/rx/rx.c (add_pop_cfi_notes): New function.;
20953         (pop_regs): Use it.
20955 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
20957         PR ipa/84425
20958         * ipa-inline.c (inline_small_functions): Fix a typo.
20960 2018-02-16  Nathan Sidwell  <nathan@acm.org>
20962         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
20964 2018-02-16  Carl Love  <cel@us.ibm.com>
20966         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
20967         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
20968         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
20969         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
20970         expansion to P8V_BUILTIN_VEC_FLOAT2.
20972 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
20974         PR rtl-optimization/70023
20975         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
20976         src_regno into account.
20978 2018-02-16  Carl Love  <cel@us.ibm.com>
20980         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
20981         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
20982         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
20983         * config/rs6000/rs6000.c: Remove case statements for
20984         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
20985         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
20986         and P9V_BUILTIN_VEC_VINSERT4B.
20987         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
20988         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
20989         * config/rs6000/vsx.md:
20990         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
20991         vec_insert4b.
20993 2018-02-16  Carl Love  <cel@us.ibm.com>
20995         * config/rs6000/altivec.h: Add builtin names vec_extract4b
20996         vec_insert4b.
20997         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
20998         definitions.
20999         * config/rs6000/rs6000-c.c: Add the definitions for
21000         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
21001         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
21002         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
21003         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
21004         definition for insert4b and define insn *insert3b_internal.
21005         * doc/extend.texi: Add documentation for vec_extract4b.
21007 2018-02-16  Nathan Sidwell  <nathan@acm.org>
21009         * doc/extend.texi (Backwards Compatibility): Mention friend
21010         injection.  Note for-scope is deprecated.
21011         * doc/invoke.texi (-ffriend-injection): Deprecate.
21013 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
21015         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
21016         that moved to I2, also allow destinations that are a paradoxical
21017         subreg (instead of a normal reg).
21019 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
21021         PR target/83831
21022         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
21023         to QImode.
21025 2018-02-16  Richard Biener  <rguenther@suse.de>
21027         PR tree-optimization/84037
21028         PR tree-optimization/84016
21029         PR target/82862
21030         * config/i386/i386.c (ix86_builtin_vectorization_cost):
21031         Adjust vec_construct for the fact we need additional higher latency
21032         128bit inserts for AVX256 and AVX512 vector builds.
21033         (ix86_add_stmt_cost): Scale vector construction cost for
21034         elementwise loads.
21036 2018-02-16  Richard Biener  <rguenther@suse.de>
21038         PR tree-optimization/84417
21039         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
21040         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
21041         (non_rewritable_lvalue_p): Likewise, use poly-ints.
21043 2018-02-16  Martin Liska  <mliska@suse.cz>
21045         PR sanitizer/84307
21046         * internal-fn.def (ASAN_CHECK): Set proper flags.
21047         (ASAN_MARK): Likewise.
21049 2018-02-16  Julia Koval  <julia.koval@intel.com>
21051         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
21052         from PTA_CANNONLAKE.
21054 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
21056         PR target/84272
21057         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
21058         Use ++iter rather than iter++ for std::list iterators.
21059         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
21060         defer deleting them until all nodes in the forest are processed.  Do
21061         free even leaf nodes.  Change to_process into auto_vec.
21063         PR bootstrap/84405
21064         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
21065         * vec.h (vec_default_construct): Use memset instead of placement new
21066         if BROKEN_VALUE_INITIALIZATION is defined.
21067         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
21068         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
21069         is defined.
21071         PR rtl-optimization/83723
21072         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
21073         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
21074         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
21075         recursive calls.
21076         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
21077         callers.
21078         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
21080 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
21082         PR rtl-optimization/81443
21083         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
21084         from inner REGs to paradoxical SUBREGs.
21086 2018-02-16  Richard Biener  <rguenther@suse.de>
21088         PR tree-optimization/84399
21089         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21090         For operands we can analyze at their definition make sure we can
21091         analyze them at each use as well.
21093 2018-02-16  Richard Biener  <rguenther@suse.de>
21095         PR tree-optimization/84190
21096         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
21097         volatile accesses if the decl isn't volatile.
21099 2018-02-15  Jason Merrill  <jason@redhat.com>
21101         PR c++/84314 - ICE with templates and fastcall attribute.
21102         * attribs.c (build_type_attribute_qual_variant): Don't clobber
21103         TYPE_CANONICAL on an existing type.
21105 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
21107         PR tree-optimization/84383
21108         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
21109         dstoff nor call operand_equal_p if dstbase is NULL.
21111         PR tree-optimization/84334
21112         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
21113         also a CONSTANT_CLASS_P, punt.
21115 2018-02-14  Jim Wilson  <jimw@sifive.com>
21117         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
21118         first SMALL_OPERAND check.  New local min_second_step.  Move assert
21119         to where locals are set.  Add TARGET_RVC support.
21120         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
21122 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
21124         * doc/invoke.texi: Correct -Wformat-overflow code sample.
21126 2018-02-14  Martin Sebor  <msebor@redhat.com>
21128         PR tree-optimization/83698
21129         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
21130         arrays constrain the offset range to their bounds.
21131         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
21132         (builtin_access::overlap): Avoid setting the size of overlap if it's
21133         already been set.
21134         (maybe_diag_overlap): Also consider arrays when deciding what values
21135         of offsets to include in diagnostics.
21137 2018-02-14  Martin Sebor  <msebor@redhat.com>
21139         PR c/84108
21140         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
21141         that correspond to the kind of a declaration.
21143 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
21145         PR target/83984
21146         * config/pa/pa.md: Load address of PIC label using the linkage table
21147         if the label is nonlocal.
21149 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21151         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
21152         warning message if user requests -maltivec=be.
21153         * doc/invoke.texi: Document deprecation of -maltivec=be.
21155 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
21157         PR target/84220
21158         * config/rs6000/rs6000-c.c: Update definitions for
21159         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
21160         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
21162 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
21164         PR target/84239
21165         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
21166         add _get_ssp intrinsics. Remove argument from
21167         __builtin_ia32_rdssp[d|q].
21168         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
21169         * config/i386/i386-builtin.def: Remove argument from
21170         __builtin_ia32_rdssp[d|q].
21171         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
21172         ix86_expand_special_args_builtin for _rdssp[d|q].
21173         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
21174         Clear register before usage.
21175         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
21176         Add documentation for new _get_ssp and _inc_ssp intrinsics.
21178 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
21180         PR tree-optimization/84357
21181         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
21182         operand 1 of an ARRAY_REF too.
21184 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
21186         PR target/83831
21187         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
21188         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21189         declarations.
21190         (set_of_reg): New struct.
21191         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
21192         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
21193         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21194         functions.
21195         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
21196         Split into bitclr, bitset, bitinvert patterns if appropriate.
21197         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
21198         use rx_fuse_in_memory_bitop.
21199         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
21200         to named insn, correct maximum insn length.
21202 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
21204         PR target/79242
21205         * machmode.def: Define a complex mode for PARTIAL_INT.
21206         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
21207         MODE_PARTIAL_INT.
21208         * doc/rtl.texi: Document CSPImode.
21209         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
21210         handling.
21211         (msp430_hard_regno_nregs_with_padding): Likewise.
21213 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
21215         PR target/84279
21216         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
21218 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
21220         PR rtl-optimization/84169
21221         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
21222         we generated a parallel as new i3 and we split that to new i2 and i3
21223         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
21224         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
21225         those to i2, not i1.  Partially rewrite this scan code.
21227 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
21229         PR c/82210
21230         * stor-layout.c (place_field): For variable length fields, adjust
21231         offset_align afterwards not just based on the field's alignment,
21232         but also on the size.
21234         PR middle-end/84309
21235         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
21236         of exps and logs in the use_exp2 case.
21238 2018-02-13  Jeff Law  <law@redhat.com>
21240         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
21241         entry for "vector".
21243         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
21244         ARGS as unused.
21246 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
21248         PR debug/84342
21249         PR debug/84319
21250         * common.opt (gas-loc-support, gas-locview-support): New.
21251         (ginline-points, ginternal-reset-location-views): New.
21252         * doc/invoke.texi: Document them.  Use @itemx where intended.
21253         (gvariable-location-views): Adjust.
21254         * target.def (reset_location_view): New.
21255         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
21256         (TARGET_RESET_LOCATION_VIEW): New.
21257         * doc/tm.texi: Rebuilt.
21258         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
21259         (dwarf2out_default_as_locview_support): New.
21260         (output_asm_line_debug_info): Use option variables.
21261         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
21262         (output_loc_list): Likewise.
21263         (add_high_low_attributes): Check option variables.
21264         Don't output entry view attribute in strict mode.
21265         (gen_inlined_subroutine_die): Check option variables.
21266         (dwarf2out_inline_entry): Likewise.
21267         (init_sections_and_labels): Likewise.
21268         (dwarf2out_early_finish): Likewise.
21269         (maybe_reset_location_view): New, from...
21270         (dwarf2out_var_location): ... here.  Call it.
21271         * debug.h (dwarf2out_default_as_loc_support): Declare.
21272         (dwarf2out_default_as_locview_support): Declare.
21273         * hooks.c (hook_int_rtx_insn_0): New.
21274         * hooks.h (hook_int_rtx_insn_0): Declare.
21275         * toplev.c (process_options): Take -gas-loc-support and
21276         -gas-locview-support from dwarf2out.  Enable
21277         -gvariable-location-views by default only with locview
21278         assembler support.  Enable -ginternal-reset-location-views by
21279         default only if the target defines the corresponding hook.
21280         Enable -ginline-points by default if location views are
21281         enabled; force it disabled if statement frontiers are
21282         disabled.
21283         * tree-inline.c (expand_call_inline): Check option variables.
21284         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
21286 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
21288         PR tree-optimization/84321
21289         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
21290         handling.  Also check whether the anti-range contains any values
21291         that satisfy the mask; switch to a VR_RANGE if not.
21293 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
21295         PR sanitizer/84340
21296         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
21298 2018-02-13  Martin Jambor  <mjambor@suse.cz>
21300         PR c++/83990
21301         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
21302         of call statements, also set location of a load to a temporary.
21304 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
21306         * config/rl78/rl78.c (add_vector_labels): New function.
21307         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
21308         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
21309         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
21310         which checks that no arguments are passed.
21311         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
21312         * doc/extend.texi: Documentation for the new attribute.
21314 2018-02-13  Andreas Schwab  <schwab@suse.de>
21316         * config/riscv/linux.h (CPP_SPEC): Define.
21318 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
21320         PR target/84335
21321         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
21322         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
21323         OPTION_MASK_ISA_AES as first argument to def_builtin_const
21324         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
21325         instead of OPTION_MASK_ISA_PCLMUL as first argument to
21326         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
21327         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
21328         temporarily for AES and PCLMUL builtins.
21330         PR tree-optimization/84339
21331         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
21332         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
21333         Formatting fixes.
21335         PR middle-end/84309
21336         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
21337         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
21338         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
21339         inline function.
21340         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
21341         inline function.
21342         * omp-simd-clone.h: New file.
21343         * omp-simd-clone.c: Include omp-simd-clone.h.
21344         (expand_simd_clones): No longer static.
21345         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
21346         cgraph.h and omp-simd-clone.h.
21347         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
21348         (vect_recog_widen_shift_pattern): Formatting fix.
21349         (vect_pattern_recog_1): Don't check optab for calls.
21351         PR target/84336
21352         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
21353         operands[2] into a REG before using gen_lowpart on it.
21355 2018-02-12  Jeff Law  <law@redhat.com>
21357         PR target/83760
21358         * config/sh/sh.c (find_barrier): Consider a sibling call
21359         a barrier as well.
21361         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
21362         successfully back substituting a reg.
21364 2018-02-12  Richard Biener  <rguenther@suse.de>
21366         PR tree-optimization/84037
21367         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
21368         parameter, move visited init to caller.
21369         (vect_slp_analyze_operations): Separate cost from validity
21370         check, initialize visited once for all instances.
21371         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
21372         for all instances.
21373         * tree-vect-stmts.c (vect_model_simple_cost): Make early
21374         out an assert.
21375         (vect_model_promotion_demotion_cost): Likewise.
21376         (vectorizable_bswap): Guard cost modeling with !slp_node
21377         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
21378         SLP stmts.
21379         (vectorizable_call): Likewise.
21380         (vectorizable_conversion): Likewise.
21381         (vectorizable_assignment): Likewise.
21382         (vectorizable_shift): Likewise.
21383         (vectorizable_operation): Likewise.
21384         (vectorizable_store): Likewise.
21385         (vectorizable_load): Likewise.
21386         (vectorizable_condition): Likewise.
21387         (vectorizable_comparison): Likewise.
21389 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
21391         PR sanitizer/84307
21392         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
21393         (ASAN_MARK): Fix fnspec to account for return value, change pointer
21394         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
21396 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
21398         PR middle-end/83665
21399         * params.def (inline-min-speedup): Increase from 8 to 15.
21400         (max-inline-insns-auto): Decrease from 40 to 30.
21401         * ipa-split.c (consider_split): Add some buffer for function to
21402         be considered inlining candidate.
21403         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
21404         default values.
21406 2018-02-12  Richard Biener  <rguenther@suse.de>
21408         PR tree-optimization/84037
21409         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
21410         matched stmts if we cannot swap the non-matched ones.
21412 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
21414         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
21415         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
21416         _mm_maskz_scalef_round_ss): New intrinsics.
21417         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
21418         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
21419         __builtin_ia32_scalefss_round): Remove.
21420         (__builtin_ia32_scalefsd_mask_round,
21421         __builtin_ia32_scalefss_mask_round): New intrinsics.
21422         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
21423         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
21424         ((match_operand:VF_128 2 "<round_nimm_predicate>"
21425         "<round_constraint>")): Changed to ...
21426         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
21427         "<round_scalar_constraint>")): ... this.
21428         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
21429         %0, %1, %2<round_op3>}"): Changed to ...
21430         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
21431         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
21432         %2<round_scalar_mask_op3>}"): ... this.
21433         * config/i386/subst.md (round_scalar_nimm_predicate): New.
21435 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
21437         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
21438         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
21439         (_mm_maskz_sqrt_round_ss): New intrinsics.
21440         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
21441         (__builtin_ia32_sqrtsd_mask_round)
21442         (__builtin_ia32_sqrtss_mask_round): New builtins.
21443         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
21444         (__builtin_ia32_sqrtss_round): Remove.
21445         (__builtin_ia32_sqrtsd_mask_round)
21446         (__builtin_ia32_sqrtss_mask_round): New builtins.
21447         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
21448         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
21449         ((match_operand:VF_128 1 "vector_operand"
21450         "xBm,<round_constraint>")): Changed to ...
21451         ((match_operand:VF_128 1 "vector_operand"
21452         "xBm,<round_scalar_constraint>")): ... this.
21453         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
21454         %0, %2, %<iptr>1<round_op3>}): Changed to ...
21455         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
21456         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
21457         %<iptr>1<round_scalar_mask_op3>}): ... this.
21458         ((set_attr "prefix" "<round_prefix>")): Changed to ...
21459         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
21461 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
21463         PR target/84266
21464         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
21465         Cast vec_cmpeq result to correct type.
21466         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
21467         Cast vec_cmpgt result to correct type.
21469 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
21471         * final.c (final_scan_insn_1): Renamed from...
21472         (final_scan_insn): ... this.  New wrapper, to recover
21473         seen from the outermost call in recursive ones.
21474         * config/sparc/sparc.c (output_return): Drop seen from call.
21475         (output_sibcall): Likewise.
21476         * config/visium/visium.c (output_branch): Likewise.
21478 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
21480         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
21481         function label.
21483 2018-02-10  Alan Modra  <amodra@gmail.com>
21485         PR target/84300
21486         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
21487         Specify LR as an input.
21489 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
21491         PR sanitizer/83987
21492         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
21493         remove_member_access_dummy_vars): New functions.
21494         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
21495         lower_omp_1, execute_lower_omp): Use them.
21497         PR rtl-optimization/84308
21498         * shrink-wrap.c (spread_components): Release todo vector.
21500 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
21502         PR rtl-optimization/57193
21503         * ira-color.c (struct allocno_color_data): Add member
21504         conflict_allocno_hard_prefs.
21505         (update_conflict_allocno_hard_prefs): New.
21506         (bucket_allocno_compare_func): Add a preference based on
21507         conflict_allocno_hard_prefs.
21508         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
21509         (color_allocnos): Remove a dead code.  Initiate
21510         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
21512 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
21514         PR target/84226
21515         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
21516         constraint from =wa to wa.  Avoid a subreg on the output operand,
21517         instead use a pseudo and subreg it in a move.
21518         (p9_xxbrd_<mode>): Changed to ...
21519         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
21520         (p9_xxbrd_v2df): New expander.
21521         (p9_xxbrw_<mode>): Changed to ...
21522         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
21523         (p9_xxbrw_v4sf): New expander.
21525 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
21527         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
21529 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
21531         PR target/83926
21532         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
21533         multiply in 32-bit mode.
21534         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
21535         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
21536         mode.
21538 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
21540         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
21541         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
21542         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
21543         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
21545 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
21547         PR lto/84213
21548         * dwarf2out.c (is_trivial_indirect_ref): New function.
21549         (dwarf2out_late_global_decl): Do not generate a location
21550         attribute for variables that have a non-trivial DECL_VALUE_EXPR
21551         and that are not defined in the current unit.
21553 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
21555         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
21556         instead of a libcall for UNORDERED.
21558 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
21560         PR target/82641
21561         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
21562         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
21564 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21566         PR target/PR84295
21567         * config/s390/s390.c (s390_set_current_function): Invoke
21568         s390_indirect_branch_settings also if fndecl didn't change.
21570 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
21572         * config/rs6000/rs6000.md (blockage): Set length to zero.
21574 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
21576         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
21578 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
21580         PR sanitizer/84285
21581         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
21582         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
21583         -static-lib*san.
21585         PR debug/84252
21586         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
21587         PARALLEL incoming that failed vt_get_decl_and_offset check.
21589         PR middle-end/84237
21590         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
21591         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
21592         TREE_READONLY bit.
21593         (get_variable_section): For decls in named .bss* sections pass true as
21594         second argument to bss_initializer_p.
21596 2018-02-09  Marek Polacek  <polacek@redhat.com>
21597             Jakub Jelinek  <jakub@redhat.com>
21599         PR c++/83659
21600         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
21601         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
21602         Sync some changes from cxx_fold_indirect_ref.
21604 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
21606         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
21607         markers.
21608         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
21609         (BLOCK_INLINE_ENTRY_LABEL): New.
21610         (dwarf2out_var_location): Disregard inline entry markers.
21611         (inline_entry_data): New struct.
21612         (inline_entry_data_hasher): New hashtable type.
21613         (inline_entry_data_hasher::hash): New.
21614         (inline_entry_data_hasher::equal): New.
21615         (inline_entry_data_table): New variable.
21616         (add_high_low_attributes): Add DW_AT_entry_pc and
21617         DW_AT_GNU_entry_view attributes if a pending entry is found
21618         in inline_entry_data_table.  Add old entry_pc attribute only
21619         if debug nonbinding markers are disabled.
21620         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
21621         markers are enabled.
21622         (block_within_block_p, dwarf2out_inline_entry): New.
21623         (dwarf2out_finish): Check that no entries remained in
21624         inline_entry_data_table.
21625         * final.c (reemit_insn_block_notes): Handle inline entry notes.
21626         (final_scan_insn, notice_source_line): Likewise.
21627         (rest_of_clean_state): Skip inline entry markers.
21628         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
21629         markers.
21630         * gimple.c (gimple_build_debug_inline_entry): New.
21631         * gimple.h (enum gimple_debug_subcode): Add
21632         GIMPLE_DEBUG_INLINE_ENTRY.
21633         (gimple_build_debug_inline_entry): Declare.
21634         (gimple_debug_inline_entry_p): New.
21635         (gimple_debug_nonbind_marker_p): Adjust.
21636         * insn-notes.def (INLINE_ENTRY): New.
21637         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
21638         inline entry marker notes.
21639         (print_insn): Likewise.
21640         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
21641         (INSN_DEBUG_MARKER_KIND): Likewise.
21642         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
21643         * tree-inline.c (expand_call_inline): Build and insert
21644         debug_inline_entry stmt.
21645         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
21646         inline entry blocks early, if nonbind markers are enabled.
21647         (dump_scope_block): Dump fragment info.
21648         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
21649         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
21650         (gimple_build_debug_inline_entry): New.
21651         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
21652         Enable/disable inline entry points too.
21653         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
21654         (DEBUG_INSN): Describe inline entry markers.
21656         * common.opt (gvariable-location-views): New.
21657         (gvariable-location-views=incompat5): New.
21658         * config.in: Rebuilt.
21659         * configure: Rebuilt.
21660         * configure.ac: Test assembler for view support.
21661         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
21662         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
21663         * dwarf2out.c (var_loc_view): New typedef.
21664         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
21665         (dwarf2out_locviews_in_attribute): New.
21666         (dwarf2out_locviews_in_loclist): New.
21667         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
21668         (enum dw_line_info_opcode): Add LI_adv_address.
21669         (struct dw_line_info_table): Add view.
21670         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
21671         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
21672         (zero_view_p): New variable.
21673         (ZERO_VIEW_P): New macro.
21674         (output_asm_line_debug_info): New.
21675         (struct var_loc_node): Add view.
21676         (add_AT_view_list, AT_loc_list): New.
21677         (add_var_loc_to_decl): Add view param.  Test it against last.
21678         (new_loc_list): Add view params.  Record them.
21679         (AT_loc_list_ptr): Handle loc and view lists.
21680         (view_list_to_loc_list_val_node): New.
21681         (print_dw_val): Handle dw_val_class_view_list.
21682         (size_of_die): Likewise.
21683         (value_format): Likewise.
21684         (loc_list_has_views): New.
21685         (gen_llsym): Set vl_symbol too.
21686         (maybe_gen_llsym, skip_loc_list_entry): New.
21687         (dwarf2out_maybe_output_loclist_view_pair): New.
21688         (output_loc_list): Output view list or entries too.
21689         (output_view_list_offset): New.
21690         (output_die): Handle dw_val_class_view_list.
21691         (output_dwarf_version): New.
21692         (output_compilation_unit_header): Use it.
21693         (output_skeleton_debug_sections): Likewise.
21694         (output_rnglists, output_line_info): Likewise.
21695         (output_pubnames, output_aranges): Update version comments.
21696         (output_one_line_info_table): Output view numbers in asm comments.
21697         (dw_loc_list): Determine current endview, pass it to new_loc_list.
21698         Call maybe_gen_llsym.
21699         (loc_list_from_tree_1): Adjust.
21700         (add_AT_location_description): Create view list attribute if
21701         needed, check it's absent otherwise.
21702         (convert_cfa_to_fb_loc_list): Adjust.
21703         (maybe_emit_file): Call output_asm_line_debug_info for test.
21704         (dwarf2out_var_location): Reset views as needed.  Precompute
21705         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
21706         attribute.  Set view.
21707         (new_line_info_table): Reset next view.
21708         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
21709         (dwarf2out_source_line): Likewise.  Output view resets and labels to
21710         the assembler, or select appropriate line info opcodes.
21711         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
21712         (optimize_string_length): Catch it.  Adjust.
21713         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
21714         dw_val_class_view_list, and remove it if no longer needed.
21715         (hash_loc_list): Hash view numbers.
21716         (loc_list_hasher::equal): Compare them.
21717         (optimize_location_lists): Check whether a view list symbol is
21718         needed, and whether the locview attribute is present, and
21719         whether they match.  Remove the locview attribute if no longer
21720         needed.
21721         (index_location_lists): Call skip_loc_list_entry for test.
21722         (dwarf2out_finish): Call output_asm_line_debug_info for test.
21723         Use output_dwarf_version.
21724         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
21725         (struct dw_val_node): Add val_view_list.
21726         * final.c (SEEN_NEXT_VIEW): New.
21727         (set_next_view_needed): New.
21728         (clear_next_view_needed): New.
21729         (maybe_output_next_view): New.
21730         (final_start_function): Rename to...
21731         (final_start_function_1): ... this.  Take pointer to FIRST,
21732         add SEEN parameter.  Emit param bindings in the initial view.
21733         (final_start_function): Reintroduce SEEN-less interface.
21734         (final): Rename to...
21735         (final_1): ... this.  Take SEEN parameter.  Output final pending
21736         next view at the end.
21737         (final): Reintroduce seen-less interface.
21738         (final_scan_insn): Output pending next view before switching
21739         sections or ending a block.  Mark the next view as needed when
21740         outputting variable locations.  Notify debug backend of section
21741         changes, and of location view changes.
21742         (rest_of_handle_final): Adjust.
21743         * toplev.c (process_options): Autodetect value for debug variable
21744         location views option.  Warn on incompat5 without -gdwarf-5.
21745         * doc/invoke.texi (gvariable-location-views): New.
21746         (gvariable-location-views=incompat5): New.
21747         (gno-variable-location-views): New.
21749 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
21751         PR tree-optimization/84136
21752         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
21753         that the result of find_edge is non-NULL.
21755 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
21757         PR target/83008
21758         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
21759         storing integer register in SImode.  Fix cost of 256 and 512
21760         byte aligned SSE register store.
21762 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
21764         * config/i386/i386.c (ix86_multiplication_cost): Fix
21765         multiplication cost for TARGET_AVX512DQ.
21767 2018-02-08  Marek Polacek  <polacek@redhat.com>
21769         PR tree-optimization/84238
21770         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
21771         get_range_strlen.
21773 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
21775         PR tree-optimization/84265
21776         * tree-vect-stmts.c (vectorizable_store): Don't treat
21777         VMAT_CONTIGUOUS accesses as grouped.
21778         (vectorizable_load): Likewise.
21780 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
21782         PR tree-optimization/81635
21783         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
21784         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
21785         (test_round_for_mask): New functions.
21786         (wide_int_cc_tests): Call test_round_for_mask.
21787         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
21788         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
21789         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
21790         range returned by get_range_info.
21792 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
21794         PR ipa/81360
21795         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
21796         * symtab.c: Include builtins.h
21797         (symtab_node::output_to_lto_symbol_table_p): Move here
21798         from lto-streamer-out.c:output_symbol_p.
21799         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
21800         (output_symbol_p): Move all logic to symtab.c
21801         (produce_symtab): Update.
21803 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21805         * config/s390/s390-opts.h (enum indirect_branch): Define.
21806         * config/s390/s390-protos.h (s390_return_addr_from_memory)
21807         (s390_indirect_branch_via_thunk)
21808         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
21809         (enum s390_indirect_branch_type): Define.
21810         * config/s390/s390.c (struct s390_frame_layout, struct
21811         machine_function): Remove.
21812         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
21813         (indirect_branch_table_label_no, indirect_branch_table_name):
21814         Define variables.
21815         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
21816         (enum s390_indirect_branch_option): Define.
21817         (s390_return_addr_from_memory): New function.
21818         (s390_handle_string_attribute): New function.
21819         (s390_attribute_table): Add new attribute handler.
21820         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
21821         (s390_indirect_branch_via_thunk): New function.
21822         (s390_indirect_branch_via_inline_thunk): New function.
21823         (s390_function_ok_for_sibcall): When jumping via thunk disallow
21824         sibling call optimization for non z10 compiles.
21825         (s390_emit_call): Force indirect branch target to be a single
21826         register.  Add r1 clobber for non-z10 compiles.
21827         (s390_emit_epilogue): Emit return jump via return_use expander.
21828         (s390_reorg): Handle JUMP_INSNs as execute targets.
21829         (s390_option_override_internal): Perform validity checks for the
21830         new command line options.
21831         (s390_indirect_branch_attrvalue): New function.
21832         (s390_indirect_branch_settings): New function.
21833         (s390_set_current_function): Invoke s390_indirect_branch_settings.
21834         (s390_output_indirect_thunk_function):  New function.
21835         (s390_code_end): Implement target hook.
21836         (s390_case_values_threshold): Implement target hook.
21837         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
21838         macros.
21839         * config/s390/s390.h (struct s390_frame_layout)
21840         (struct machine_function): Move here from s390.c.
21841         (TARGET_INDIRECT_BRANCH_NOBP_RET)
21842         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
21843         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
21844         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
21845         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
21846         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
21847         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
21848         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
21849         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
21850         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
21851         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
21852         (mnemonic attribute): Add values which aren't recognized
21853         automatically.
21854         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
21855         pattern for branch conversion.  Fix mnemonic attribute.
21856         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
21857         indirect branch via thunk if requested.
21858         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
21859         ("*indirect_jump"): Disable for branch conversion using out of
21860         line thunks.
21861         ("indirect_jump_via_thunk<mode>_z10")
21862         ("indirect_jump_via_thunk<mode>")
21863         ("indirect_jump_via_inlinethunk<mode>_z10")
21864         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
21865         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
21866         ("casesi_jump_via_inlinethunk<mode>_z10")
21867         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
21868         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
21869         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
21870         ("*indirect2_jump"): Disable for branch conversion.
21871         ("casesi_jump"): Turn into expander and expand patterns for branch
21872         conversion.
21873         ("return_use"): New expander.
21874         ("*return"): Emit return via thunk and rename it to ...
21875         ("*return<mode>"): ... this one.
21876         * config/s390/s390.opt: Add new options and and enum for the
21877         option values.
21879 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
21881         * lra-constraints.c (match_reload): Unconditionally use
21882         gen_lowpart_SUBREG, rather than selecting between that
21883         and equivalent gen_rtx_SUBREG code.
21885 2018-02-08  Richard Biener  <rguenther@suse.de>
21887         PR tree-optimization/84233
21888         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
21889         changed flag instead of boguously re-using phi_inserted.
21891 2018-02-08  Martin Jambor  <mjambor@suse.cz>
21893         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
21894         static local variables.
21896 2018-02-08  Richard Biener  <rguenther@suse.de>
21898         PR tree-optimization/84278
21899         * tree-vect-stmts.c (vectorizable_store): When looking for
21900         smaller vector types to perform grouped strided loads/stores
21901         make sure the mode is supported by the target.
21902         (vectorizable_load): Likewise.
21904 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
21906         * config/aarch64/aarch64.c (aarch64_components_for_bb):
21907         Increase LDP/STP opportunities by adding adjacent callee-saves.
21909 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
21911         PR rtl-optimization/84068
21912         PR rtl-optimization/83459
21913         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
21915 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
21917         PR tree-optimization/84224
21918         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
21919         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
21920         non-zero arguments.
21922 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
21924         PR target/84113
21925         * config/rs6000/altivec.md (*restore_world): Remove LR use.
21926         * config/rs6000/predicates.md (restore_world_operation): Adjust op
21927         count, remove one USE.
21929 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
21931         * doc/install.texi (Configuration): Document the
21932         --with-long-double-format={ibm,ieee} PowerPC configuration
21933         options.
21935         PR target/84154
21936         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
21937         Convert from define_expand to be define_insn_and_split.  Rework
21938         float/double/_Float128 conversions to QI/HI/SImode to work with
21939         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
21940         conversions to QI/HImode types did a store and then a load to
21941         truncate the value.  For conversions to VSX registers, don't split
21942         the insn, instead emit the code directly.  Use the code iterator
21943         any_fix to combine signed and unsigned conversions.
21944         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
21945         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
21946         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21947         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
21948         (fix_<mode>di2_hw): Likewise.
21949         (fixuns_<mode>di2_hw): Likewise.
21950         (fix_<mode>si2_hw): Likewise.
21951         (fixuns_<mode>si2_hw): Likewise.
21952         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
21953         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21954         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
21955         fix<uns>_trunc<SFDF:mode>si2_p8.
21956         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
21957         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
21958         (fix<uns>_<mode>_mem): Likewise.
21959         (fctiw<u>z_<mode>_mem): Likewise.
21960         (fix<uns>_<mode>_mem): Likewise.
21961         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
21962         the register allocator from doing a direct move to the GPRs to do
21963         a store, and instead use the ISA 3.0 store byte/half-word from
21964         vector register instruction.  For IEEE 128-bit floating point,
21965         also optimize stores of 32-bit ints.
21966         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
21968 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
21970         * genextract.c (push_pathstr_operand): New function to support
21971         [a-zA-Z].
21972         (walk_rtx): Call push_pathstr_operand.
21973         (print_path): Support [a-zA-Z].
21975 2018-02-07  Richard Biener  <rguenther@suse.de>
21977         PR tree-optimization/84037
21978         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
21979         (cse_and_gimplify_to_preheader): Declare.
21980         (vect_get_place_in_interleaving_chain): Likewise.
21981         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21982         ivexpr_map.
21983         (_loop_vec_info::~_loop_vec_info): Delete it.
21984         (cse_and_gimplify_to_preheader): New function.
21985         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
21986         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
21987         (vectorizable_load): Likewise.  For grouped stores always base
21988         the IV on the first element.
21989         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
21990         condition before gimplifying.
21992 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
21994         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
21995         *DIV_EXPR and *MOD_EXPR.
21997 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
21999         PR target/84248
22000         * config/i386/i386.c (ix86_option_override_internal): Mask out
22001         the CF_SET bit when checking -fcf-protection.
22003 2018-02-07  Tom de Vries  <tom@codesourcery.com>
22005         PR libgomp/84217
22006         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
22007         enough.
22009 2018-02-07  Richard Biener  <rguenther@suse.de>
22011         PR tree-optimization/84204
22012         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
22013         this place.
22015         PR tree-optimization/84205
22016         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
22017         special-case isl_ast_op_zdiv_r.
22019         PR tree-optimization/84223
22020         * graphite-scop-detection.c (gather_bbs::before_dom_children):
22021         Only add conditions from within the region.
22022         (gather_bbs::after_dom_children): Adjust.
22024 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
22026         PR target/84209
22027         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
22028         * config/avr/avr.md: Only post-reload split REG-REG moves if
22029         either register is GENERAL_REG_P.
22031 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
22033         PR tree-optimization/84235
22034         * tree-ssa-scopedtables.c
22035         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
22036         if the subtraction is performed in floating point type where NaNs are
22037         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
22038         build 1.  Formatting fix.
22040 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
22042         PR target/84146
22043         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
22044         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
22045         and skip it regardless of bb boundaries.  Use CALL_P macro,
22046         don't test INSN_P (insn) together with CALL_P or JUMP_P check
22047         unnecessarily, formatting fix.
22049 2018-02-06  Michael Collison  <michael.collison@arm.com>
22051         * config/arm/thumb2.md:
22052         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
22053         (*thumb_mov_notscc): Ditto.
22055 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
22057         PR target/84154
22058         * config/rs6000/rs6000.md (su code attribute): Use "u" for
22059         unsigned_fix, not "s".
22061 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22063         * configure.ac (gcc_fn_eh_frame_ro): New function.
22064         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
22065         correct .eh_frame permissions.
22066         * configure: Regenerate.
22068 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
22070         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
22071         irrelevant options.
22073 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22075         * config/rs6000/rs6000.c (rs6000_option_override_internal):
22076         Display warning message for -mno-speculate-indirect-jumps.
22078 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
22080         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
22081         Undocumented.
22082         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
22084 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
22086         PR tree-optimization/84225
22087         * tree-eh.c (find_trapping_overflow): Only call
22088         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
22090 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
22092         PR target/84145
22093         * config/i386/i386.c: Reimplement the check of possible options
22094         -mibt/-mshstk conbination. Change error messages.
22095         * doc/invoke.texi: Fix a typo: remove extra '='.
22097 2018-02-06  Marek Polacek  <polacek@redhat.com>
22099         PR tree-optimization/84228
22100         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
22102 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
22104         PR target/82641
22105         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
22106         emitted arch directives.
22107         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
22108         __ARM_FEATURE_COPROC before changing architectures.
22110 2018-02-06  Richard Biener  <rguenther@suse.de>
22112         * config/i386/i386.c (print_reg): Fix typo.
22113         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
22115 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
22117         * configure: Regenerate.
22119 2018-02-05  Martin Sebor  <msebor@redhat.com>
22121         PR tree-optimization/83369
22122         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
22123         inlining context.
22125 2018-02-05  Martin Liska  <mliska@suse.cz>
22127         * doc/invoke.texi: Cherry-pick upstream r323995.
22129 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
22131         * ira.c (ira_init_register_move_cost): Adjust comment.
22133 2018-02-05  Martin Liska  <mliska@suse.cz>
22135         PR gcov-profile/84137
22136         * doc/gcov.texi: Fix typo in documentation.
22138 2018-02-05  Martin Liska  <mliska@suse.cz>
22140         PR gcov-profile/83879
22141         * doc/gcov.texi: Document necessity of --dynamic-list-data when
22142         using dlopen functionality.
22144 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
22146         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
22147         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
22148         _mm_maskz_range_ss, _mm_mask_range_round_ss,
22149         _mm_maskz_range_round_ss): New intrinsics.
22150         (__builtin_ia32_rangesd128_round)
22151         (__builtin_ia32_rangess128_round): Remove.
22152         (__builtin_ia32_rangesd128_mask_round,
22153         __builtin_ia32_rangess128_mask_round): New builtins.
22154         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
22155         __builtin_ia32_rangess128_round): Remove.
22156         (__builtin_ia32_rangesd128_mask_round,
22157         __builtin_ia32_rangess128_mask_round): New builtins.
22158         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
22159         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
22160         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
22161         "<round_saeonly_constraint>")): Changed to ...
22162         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
22163         "<round_saeonly_scalar_constraint>")): ... this.
22164         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
22165         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
22166         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
22167         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
22168         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
22170 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
22172         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
22173         options.
22174         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
22175         Remove all values except native, 8540 and 8548.
22177 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
22179         * config/i386/i386.c (ix86_output_function_return): Pass
22180         INVALID_REGNUM, instead of -1, as invalid register number to
22181         indirect_thunk_name and output_indirect_thunk.
22183 2018-02-02  Julia Koval  <julia.koval@intel.com>
22185         * config.gcc: Add -march=icelake.
22186         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
22187         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
22188         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
22189         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
22190         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
22191         (processor_target_table): Add icelake.
22192         (ix86_option_override_internal): Handle new PTAs.
22193         (get_builtin_code_for_version): Handle icelake.
22194         (M_INTEL_COREI7_ICELAKE): New.
22195         (fold_builtin_cpu): Handle icelake.
22196         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
22197         * doc/invoke.texi: Add -march=icelake.
22199 2018-02-02  Julia Koval  <julia.koval@intel.com>
22201         * config/i386/i386.c (ix86_option_override_internal): Change flags type
22202         to wide_int_bitmask.
22203         * wide-int-bitmask.h: New.
22205 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
22207         PR target/84066
22208         * config/i386/i386.md: Replace Pmode with word_mode in
22209         builtin_setjmp_setup and builtin_longjmp to support x32.
22211 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
22213         PR target/56010
22214         PR target/83743
22215         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
22216         #include "opts.h".
22217         (rs6000_supported_cpu_names): New static variable.
22218         (linux_cpu_translation_table): Likewise.
22219         (elf_platform) <cpu>: Define new static variable and use it.
22220         Translate kernel AT_PLATFORM name to canonical name if needed.
22221         Error if platform name is unknown.
22223 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
22225         PR target/84089
22226         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
22228 2018-02-01  Jeff Law  <law@redhat.com>
22230         PR target/84128
22231         * config/i386/i386.c (release_scratch_register_on_entry): Add new
22232         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
22233         the scratch if RELEASE_VIA_POP is false.
22234         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
22235         If we have to save a temporary register, decrement SIZE appropriately.
22236         Pass new arguments to release_scratch_register_on_entry.
22237         (ix86_adjust_stack_and_probe): Likewise.
22238         (ix86_emit_probe_stack_range): Pass new arguments to
22239         release_scratch_register_on_entry.
22241 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
22243         PR rtl-optimization/84157
22244         * combine.c (change_zero_ext): Use REG_P predicate in
22245         front of HARD_REGISTER_P predicate.
22247 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
22249         * config/avr/avr.c (avr_option_override): Move disabling of
22250         -fdelete-null-pointer-checks to...
22251         * common/config/avr/avr-common.c (avr_option_optimization_table):
22252         ...here.
22254 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22256         PR tree-optimization/81635
22257         * tree-data-ref.c (split_constant_offset_1): For types that
22258         wrap on overflow, try to use range info to prove that wrapping
22259         cannot occur.
22261 2018-02-01  Renlin Li  <renlin.li@arm.com>
22263         PR target/83370
22264         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
22265         TAILCALL_ADDR_REGS.
22266         (aarch64_register_move_cost): Likewise.
22267         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
22268         TAILCALL_ADDR_REGS.
22269         (REG_CLASS_NAMES): Likewise.
22270         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
22271         TAILCALL_ADDR_REGS. Remove IP registers.
22272         * config/aarch64/aarch64.md (Ucs): Update register constraint.
22274 2018-02-01  Richard Biener  <rguenther@suse.de>
22276         * domwalk.h (dom_walker::dom_walker): Add additional constructor
22277         for specifying RPO order and allow NULL for that.
22278         * domwalk.c (dom_walker::dom_walker): Likewise.
22279         (dom_walker::walk): Handle NULL RPO order.
22280         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
22281         in RPO order.
22282         (rewrite_update_dom_walker): Likewise.
22283         (mark_def_dom_walker): Likewise.
22285 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22287         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
22288         (aarch64_maybe_expand_sve_subreg_move): Declare.
22289         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
22290         * config/aarch64/predicates.md (aarch64_any_register_operand): New
22291         predicate.
22292         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
22293         that are semantically a reverse operation.
22294         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
22295         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
22296         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
22297         functions.
22298         (aarch64_can_change_mode_class): For big-endian, forbid changes
22299         between two SVE modes if they have different element sizes.
22301 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22303         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
22304         the TImode handling for big-endian targets.
22306 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22308         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
22309         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
22310         not just bytes.
22311         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
22312         Remove BSWAP handing for big-endian targets and use the form of
22313         LD1RQ appropariate for the mode.
22315 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22317         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
22318         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
22319         duplicated element.
22321 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22323         PR tearget/83845
22324         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
22325         check for operands that need to go through aarch64_sve_reload_be.
22327 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
22329         PR tree-optimization/81661
22330         PR tree-optimization/84117
22331         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
22332         * tree-eh.c: Include gimplify.h.
22333         (find_trapping_overflow, replace_trapping_overflow,
22334         rewrite_to_non_trapping_overflow): New functions.
22335         * tree-vect-loop.c: Include tree-eh.h.
22336         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
22337         * tree-data-ref.c: Include tree-eh.h.
22338         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
22340 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
22342         PR rtl-optimization/84123
22343         * combine.c (change_zero_ext): Check if hard register satisfies
22344         can_change_dest_mode before calling gen_lowpart_SUBREG.
22346 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
22348         PR target/82444
22349         * ira.c (ira_init_register_move_cost): Remove assert.
22351 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
22353         PR rtl-optimization/84071
22354         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
22355         * doc/tm.texi: Regenerate.
22357 2018-01-31  Richard Biener  <rguenther@suse.de>
22359         PR tree-optimization/84132
22360         * tree-data-ref.c (analyze_miv_subscript): Properly
22361         check whether evolution_function_is_affine_multivariate_p
22362         before calling gcd_of_steps_may_divide_p.
22364 2018-01-31  Julia Koval  <julia.koval@intel.com>
22366         PR target/83618
22367         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
22368         * config/i386/i386.md (rdpid_rex64) New.
22369         (rdpid): Make 32bit only.
22371 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
22373         PR lto/84105
22374         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
22375         an IDENTIFIER_NODE for FUNCTION_TYPE's.
22377 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
22379         Revert
22380         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22382         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22384 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
22386         PR rtl-optimization/84071
22387         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
22388         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
22390 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
22392         * config/arc/arc.c (arc_handle_aux_attribute): New function.
22393         (arc_attribute_table): Add 'aux' attribute.
22394         (arc_in_small_data_p): Consider aux like variables.
22395         (arc_is_aux_reg_p): New function.
22396         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
22397         (arc_get_aux_arg): New function.
22398         (prepare_move_operands): Handle aux-register access.
22399         (arc_handle_aux_attribute): New function.
22400         * doc/extend.texi (ARC Variable attributes): Add subsection.
22402 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
22404         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
22405         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
22406         (arc_attribute_table): Add 'uncached' attribute.
22407         (arc_print_operand): Print '.di' flag for uncached memory
22408         accesses.
22409         (arc_in_small_data_p): Do not consider for small data the uncached
22410         types.
22411         (arc_is_uncached_mem_p): New function.
22412         * config/arc/predicates.md (compact_store_memory_operand): Check
22413         for uncached memory accesses.
22414         (nonvol_nonimm_operand): Likewise.
22415         * doc/extend.texi (ARC Type Attribute): New subsection.
22417 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
22419         PR c/84100
22420         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
22421         falign-loops=): Add Optimization flag.
22423 2018-01-30  Jeff Law  <law@redhat.com>
22425         PR target/84064
22426         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
22427         INT_REGISTERS_SAVED.  Check it prior to calling
22428         get_scratch_register_on_entry.
22429         (ix86_adjust_stack_and_probe): Similarly.
22430         (ix86_emit_probe_stack_range): Similarly.
22431         (ix86_expand_prologue): Corresponding changes.
22433 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22435         PR target/40411
22436         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
22437         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
22439 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
22441         PR target/84112
22442         * lra-constraints.c (curr_insn_transform): Process AND in the
22443         address.
22445 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
22447         PR rtl-optimization/83986
22448         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
22449         dependence against last_pending_memory_flush in addition to
22450         pending_jump_insns.
22452 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
22454         PR tree-optimization/81611
22455         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
22456         copies.
22458 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22460         PR target/83758
22461         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
22462         a reg rtx.
22464 2018-01-30  Richard Biener  <rguenther@suse.de>
22465             Jakub Jelinek  <jakub@redhat.com>
22467         PR tree-optimization/84111
22468         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
22469         inner loops added during recursion, as they don't have up-to-date
22470         SSA form.
22472 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
22474         PR ipa/81360
22475         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
22476         (can_inline_edge_by_limits_p): ... here.
22477         (can_early_inline_edge_p, check_callers,
22478         update_caller_keys, update_callee_keys, recursive_inlining,
22479         add_new_edges_to_heap, speculation_useful_p,
22480         inline_small_functions,
22481         inline_small_functions, flatten_function,
22482         inline_to_all_callers_1): Update.
22484 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
22486         * profile-count.c (profile_count::combine_with_ipa_count): Handle
22487         zeros correctly.
22489 2018-01-30  Richard Biener  <rguenther@suse.de>
22491         PR tree-optimization/83008
22492         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
22493         invariant and constant vector uses in stmts when they need
22494         more than one stmt.
22496 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22498         PR bootstrap/84017
22499         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
22500         * configure: Regenerate.
22502 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
22504         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
22505         pattern.
22506         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
22507         Use gen_rtx_REG rather than gen_lowpart.
22509 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
22511         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
22512         rather than 0 when creating partial subregs.
22514 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
22516         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
22517         of usage.
22519 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
22521         PR target/81550
22522         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
22523         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
22524         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
22525         flags.  This restores the settings used before the 2017-07-24.
22526         Turning off pre increment/decrement/modify allows IVOPTS to
22527         optimize DF/SF loops where the index is an int.
22529 2018-01-29  Richard Biener  <rguenther@suse.de>
22530             Kelvin Nilsen  <kelvin@gcc.gnu.org>
22532         PR bootstrap/80867
22533         * tree-vect-stmts.c (vectorizable_call): Don't call
22534         targetm.vectorize_builtin_md_vectorized_function if callee is
22535         NULL.
22537 2018-01-22  Carl Love  <cel@us.ibm.com>
22539         * doc/extend.tex: Fix typo in second arg in
22540         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
22542 2018-01-29  Richard Biener  <rguenther@suse.de>
22544         PR tree-optimization/84086
22545         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
22546         (flush_ssaname_freelist): When SSA names were released reset
22547         the SCEV hash table.
22549 2018-01-29  Richard Biener  <rguenther@suse.de>
22551         PR tree-optimization/84057
22552         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
22553         removed paths when removing edges.
22555 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
22557         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
22558         -mfunction-return=@var{choice}.
22560 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
22562         PR diagnostic/84034
22563         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
22564         Handle CR like TAB.
22565         (layout::print_source_line): Likewise.
22566         (test_get_line_width_without_trailing_whitespace): Add test cases.
22568 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
22570         PR middle-end/84040
22571         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
22572         debug insns.
22574 2018-01-26  Jim Wilson  <jimw@sifive.com>
22576         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
22578         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
22579         specified.
22581 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22583         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
22584         and CMP + SUB-immediate -> SUBS.
22586 2018-01-26  Martin Sebor  <msebor@redhat.com>
22588         PR tree-optimization/83896
22589         * tree-ssa-strlen.c (get_string_len): Rename...
22590         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
22591         Avoid assuming length is constant.
22592         (handle_char_store): Use HOST_WIDE_INT for string length.
22594 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
22596         PR target/81763
22597         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
22598         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
22600 2018-01-26  Richard Biener  <rguenther@suse.de>
22602         PR rtl-optimization/84003
22603         * dse.c (record_store): Only record redundant stores when
22604         the earlier store aliases at least all accesses the later one does.
22606 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
22608         PR rtl-optimization/83985
22609         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
22610         REG_CFA_RESTORE insns.
22611         (delete_unmarked_insns): Don't ignore separate shrink wrapping
22612         REG_CFA_RESTORE insns here.
22614         PR c/83989
22615         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
22616         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
22618 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22620         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
22621         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
22622         (arc_init): Likewise.
22623         (arc_override_options): Likewise.
22624         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
22625         value.
22626         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
22627         support.
22628         * config/arc/arc.h (TARGET_DBNZ): Define.
22629         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
22630         properly set the tune attribute.
22631         (dbnz): Use TARGET_DBNZ guard.
22632         * config/arc/arc.opt (mtune): Add core3 option.
22634 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22636         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
22637         recognize new pic like addresses.
22638         (arc_delegitimize_address): Clean up.
22640 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22642         * config/arc/arc-arches.def: Option mrf16 valid for all
22643         architectures.
22644         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
22645         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
22646         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
22647         * config/arc/arc-tables.opt: Regenerate.
22648         * config/arc/arc.c (arc_conditional_register_usage): Handle
22649         reduced register file case.
22650         (arc_file_start): Set must have build attributes.
22651         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
22652         mrf16 option value.
22653         * config/arc/arc.opt (mrf16): Add new option.
22654         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
22655         * config/arc/genmultilib.awk: Handle new mrf16 option.
22656         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
22657         * config/arc/t-multilib: Regenerate.
22658         * doc/invoke.texi (ARC Options): Document mrf16 option.
22660 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22662         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
22663         * config/arc/arc.c (arc_handle_secure_attribute): New function.
22664         (arc_attribute_table): Add 'secure_call' attribute.
22665         (arc_print_operand): Print secure call operand.
22666         (arc_function_ok_for_sibcall): Don't optimize tail calls when
22667         secure.
22668         (arc_is_secure_call_p): New function.  * config/arc/arc.md
22669         (call_i): Add support for sjli instruction.
22670         (call_value_i): Likewise.
22671         * config/arc/constraints.md (Csc): New constraint.
22673 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22674             John Eric Martin  <John.Martin@emmicro-us.com>
22676         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
22677         * config/arc/arc.c (_arc_jli_section): New struct.
22678         (arc_jli_section): New type.
22679         (rc_jli_sections): New static variable.
22680         (arc_handle_jli_attribute): New function.
22681         (arc_attribute_table): Add jli_always and jli_fixed attribute.
22682         (arc_file_end): New function.
22683         (TARGET_ASM_FILE_END): Define.
22684         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
22685         (arc_add_jli_section): New function.
22686         (jli_call_scan): Likewise.
22687         (arc_reorg): Call jli_call_scan.
22688         (arc_output_addsi): Remove 'S' from printing asm operand.
22689         (arc_is_jli_call_p): New function.
22690         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
22691         operand.
22692         (movhi_insn): Likewise.
22693         (movsi_insn): Likewise.
22694         (movsi_set_cc_insn): Likewise.
22695         (loadqi_update): Likewise.
22696         (load_zeroextendqisi_update): Likewise.
22697         (load_signextendqisi_update): Likewise.
22698         (loadhi_update): Likewise.
22699         (load_zeroextendhisi_update): Likewise.
22700         (load_signextendhisi_update): Likewise.
22701         (loadsi_update): Likewise.
22702         (loadsf_update): Likewise.
22703         (movsicc_insn): Likewise.
22704         (bset_insn): Likewise.
22705         (bxor_insn): Likewise.
22706         (bclr_insn): Likewise.
22707         (bmsk_insn): Likewise.
22708         (bicsi3_insn): Likewise.
22709         (cmpsi_cc_c_insn): Likewise.
22710         (movsi_ne): Likewise.
22711         (movsi_cond_exec): Likewise.
22712         (clrsbsi2): Likewise.
22713         (norm_f): Likewise.
22714         (normw): Likewise.
22715         (swap): Likewise.
22716         (divaw): Likewise.
22717         (flag): Likewise.
22718         (sr): Likewise.
22719         (kflag): Likewise.
22720         (ffs): Likewise.
22721         (ffs_f): Likewise.
22722         (fls): Likewise.
22723         (call_i): Remove 'S' asm letter, add jli instruction.
22724         (call_value_i): Likewise.
22725         * config/arc/arc.op (mjli-always): New option.
22726         * config/arc/constraints.md (Cji): New constraint.
22727         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
22728         operand.
22729         (subsf3_fpx): Likewise.
22730         (mulsf3_fpx): Likewise.
22731         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
22732         asm operand.
22733         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
22734         function attrbutes.
22735         * doc/invoke.texi (ARC): Document mjli-always option.
22737 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
22739         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
22740         avoid addition with 0 and use incw and decw where possible.
22742 2018-01-26  Richard Biener  <rguenther@suse.de>
22744         PR tree-optimization/81082
22745         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
22746         association if it requires casting to unsigned.
22747         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
22748         from fold_plusminus_mult_expr to catch important cases late when
22749         range info is available.
22751 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22753         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
22754         * configure.ac (hidden_linkonce): New test.
22755         * configure: Regenerate.
22756         * config.in: Regenerate.
22758 2018-01-26  Julia Koval  <julia.koval@intel.com>
22760         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
22761         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
22762         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
22763         _mm_mask_bitshuffle_epi64_mask): Fix type.
22764         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
22765         USI_FTYPE_V4DI_V4DI_USI): Remove.
22766         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
22767         __builtin_ia32_vpshufbitqmb256_mask,
22768         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
22769         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
22770         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
22772 2018-01-26  Alan Modra  <amodra@gmail.com>
22774         PR target/84033
22775         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
22776         UNSPEC_VBPERMQ.  Sort other unspecs.
22778 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
22780         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
22782 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
22784         PR middle-end/83055
22785         * predict.c (drop_profile): Do not push/pop cfun; update also
22786         node->count.
22787         (handle_missing_profiles): Fix logic looking for zero profiles.
22789 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
22791         PR middle-end/83977
22792         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
22793         on functions with #pragma omp declare simd or functions with simd
22794         attribute.
22795         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
22796         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
22797         Remove trailing \n from warning_at calls.
22799 2018-01-25  Tom de Vries  <tom@codesourcery.com>
22801         PR target/84028
22802         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22803         for neutered workers.
22805 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
22807         PR target/68467
22808         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
22809         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
22811 2018-01-24  Jeff Law  <law@redhat.com>
22813         PR target/83994
22814         * i386.c (get_probe_interval): Move to earlier point.
22815         (ix86_compute_frame_layout): If -fstack-clash-protection and
22816         the frame is larger than the probe interval, then use pushes
22817         to save registers rather than reg->mem moves.
22818         (ix86_expand_prologue): Remove conditional for int_registers_saved
22819         assertion.
22821 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
22823         PR target/84014
22824         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
22825         min/max for never referenced object.
22827 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
22829         PR middle-end/83977
22830         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
22831         here.
22832         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
22833         attributes from DECL_ATTRIBUTES (decl) without affecting
22834         DECL_ATTRIBUTES (current_function_decl).
22835         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
22836         functions with non-NULL DECL_ABSTRACT_ORIGIN.
22838 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
22840         PR tree-optimization/83979
22841         * fold-const.c (fold_comparison): Use constant_boolean_node
22842         instead of boolean_{true,false}_node.
22844 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
22846         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
22847         with zero counts.
22849 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22851         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22852         Simplify the clause that sets the length attribute.
22853         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22854         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
22855         clause that sets the length attribute.
22856         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22858 2018-01-24  Tom de Vries  <tom@codesourcery.com>
22860         PR target/83589
22861         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
22862         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
22863         Add strict parameter.
22864         (prevent_branch_around_nothing): Insert dummy insn between branch to
22865         label and label with no ptx insn inbetween.
22866         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
22868 2018-01-24  Tom de Vries  <tom@codesourcery.com>
22870         PR target/81352
22871         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22872         for neutered threads in warp.
22873         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
22875 2018-01-24  Richard Biener  <rguenther@suse.de>
22877         PR tree-optimization/83176
22878         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
22879         operands.
22881 2018-01-24  Richard Biener  <rguenther@suse.de>
22883         PR tree-optimization/82819
22884         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
22885         code generating pluses that are no-ops in the target precision.
22887 2018-01-24  Richard Biener  <rguenther@suse.de>
22889         PR middle-end/84000
22890         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
22892 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
22894         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
22895         to merge probabilities.
22896         * predict.c (probably_never_executed): Also mark as cold functions
22897         with global 0 profile and guessed local profile.
22898         * profile-count.c (profile_probability::combine_with_count): New
22899         member function.
22900         * profile-count.h (profile_probability::operator*,
22901         profile_probability::operator*=, profile_probability::operator/,
22902         profile_probability::operator/=): Reduce precision to adjusted
22903         and set value to guessed on contradictory divisions.
22904         (profile_probability::combine_with_freq): Remove.
22905         (profile_probability::combine_wiht_count): Declare.
22906         (profile_count::force_nonzero):: Set to adjusted.
22907         (profile_count::probability_in):: Set quality to adjusted.
22908         * tree-ssa-tail-merge.c (replace_block_by): Use
22909         combine_with_count.
22911 2018-01-23  Andrew Waterman  <andrew@sifive.com>
22912             Jim Wilson  <jimw@sifive.com>
22914         * config/riscv/riscv.c (riscv_stack_boundary): New.
22915         (riscv_option_override): Set riscv_stack_boundary.  Handle
22916         riscv_preferred_stack_boundary_arg.
22917         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
22918         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
22919         (STACK_BOUNDARY): Set to riscv_stack_boundary.
22920         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
22921         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
22922         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
22924 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
22926         PR target/83905
22927         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
22928         of struct ix86_frame.
22929         (ix86_expand_epilogue): Likewise.  Add a local variable for
22930         the reg_save_offset field in struct ix86_frame.
22932 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
22934         PR tree-optimization/82604
22935         * tree-loop-distribution.c (enum partition_kind): New enum item
22936         PKIND_PARTIAL_MEMSET.
22937         (partition_builtin_p): Support above new enum item.
22938         (generate_code_for_partition): Ditto.
22939         (compute_access_range): Differentiate cases that equality can be
22940         proven at all loops, the innermost loops or no loops.
22941         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
22942         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
22943         (finalize_partitions, distribute_loop): Don't fuse partition of
22944         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
22945         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
22946         parloop is enabled.
22948 2018-01-23  Martin Liska  <mliska@suse.cz>
22950         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
22951         order to ignore the predictor.
22952         (PRED_POLYMORPHIC_CALL): Likewise.
22953         (PRED_RECURSIVE_CALL): Likewise.
22955 2018-01-23  Martin Liska  <mliska@suse.cz>
22957         * tree-profile.c (tree_profiling): Print function header to
22958         aware reader which function we are working on.
22959         * value-prof.c (gimple_find_values_to_profile): Do not print
22960         not interesting value histograms.
22962 2018-01-23  Martin Liska  <mliska@suse.cz>
22964         * profile-count.h (enum profile_quality): Add
22965         profile_uninitialized as the first value. Do not number values
22966         as they are zero based.
22967         (profile_count::verify): Update sanity check.
22968         (profile_probability::verify): Likewise.
22970 2018-01-23  Nathan Sidwell  <nathan@acm.org>
22972         * doc/invoke.texi (ffor-scope): Deprecate.
22974 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
22976         PR tree-optimization/83510
22977         * domwalk.c (set_all_edges_as_executable): New function.
22978         (dom_walker::dom_walker): Convert bool param
22979         "skip_unreachable_blocks" to enum reachability.  Move setup of
22980         edge flags to set_all_edges_as_executable and only do it when
22981         reachability is REACHABLE_BLOCKS.
22982         * domwalk.h (enum dom_walker::reachability): New enum.
22983         (dom_walker::dom_walker): Convert bool param
22984         "skip_unreachable_blocks" to enum reachability.
22985         (set_all_edges_as_executable): New decl.
22986         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
22987         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
22988         "reachability".
22989         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
22990         but converting true to REACHABLE_BLOCKS.
22991         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
22992         * tree-vrp.c
22993         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
22994         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
22995         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
22996         REACHABLE_BLOCKS.
22997         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
22998         if check_all_array_refs will be called.
23000 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
23002         * tree.c (selftest::test_location_wrappers): Add more test
23003         coverage.
23005 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
23007         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
23008         (selftest::test_bit_in_range): Likewise.
23010 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
23012         PR testsuite/83888
23013         * doc/sourcebuild.texi (vect_float): Say that the selector
23014         only describes the situation when -funsafe-math-optimizations is on.
23015         (vect_float_strict): Document.
23017 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
23019         PR tree-optimization/83965
23020         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
23021         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
23022         instead of checking only for a reduction.
23023         (vect_recog_widen_sum_pattern): Likewise.
23025 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
23027         * predict.c (probably_never_executed): Only use precise profile info.
23028         (compute_function_frequency): Skip after inlining hack since we now
23029         have quality checking.
23031 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
23033         * profile-count.h (profile_probability::very_unlikely,
23034         profile_probability::unlikely, profile_probability::even): Set
23035         precision to guessed.
23037 2018-01-23  Richard Biener  <rguenther@suse.de>
23039         PR tree-optimization/83963
23040         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
23041         Properly terminate dominator walk when crossing the exit edge not
23042         when visiting its source block.
23044 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
23046         PR c++/83918
23047         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
23048         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
23050 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
23052         PR tree-optimization/83957
23053         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
23054         semicolon after for body surrounded by braces.
23056         PR tree-optimization/83081
23057         * profile-count.h (profile_probability::split): New method.
23058         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
23059         Use profile_probability::split.
23060         (do_compare_rtx_and_jump): Fix adjustment of probabilities
23061         when splitting a single conditional jump into 2.
23063 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
23065         PR tree-optimization/69452
23066         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
23067         decl.
23069 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23071         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
23072         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
23073         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
23075 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23077         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
23078         declaration.
23079         * config/rl78/rl78.md (movdi): New define_expand.
23080         * config/rl78/rl78.c (rl78_split_movdi): New function.
23082 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
23084         PR target/83862
23085         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
23086         no longer used.
23087         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
23088         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
23089         128-bit to produce an UNSPEC move to get the double word with the
23090         signbit and then a shift directly to do signbit.
23091         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
23092         implementation with a new version that just does either a direct
23093         move or a regular move.  Move memory interface to separate insns.
23094         Move insns so they are next to the expander.
23095         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
23096         with signbit move.  Split big and little endian case.
23097         (signbit<mode>2_dm_mem_le): Likewise.
23098         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
23099         (signbit<mode>2_dm2): Likewise.
23101 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23103         * config/rl78/rl78.md (anddi3): New define_expand.
23105 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23107         * config/rl78/rl78.md (umindi3): New define_expand.
23109 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23111         * config/rl78/rl78.md (smindi3): New define_expand.
23113 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23115         * config/rl78/rl78.md (smaxdi3): New define_expand.
23117 2018-01-22  Carl Love  <cel@us.ibm.com>
23119         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
23120         LVX_V1TI): Add macro expansion.
23121         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
23122         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
23123         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
23124         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
23125         Change check to determine if the instruction is a byte reversing
23126         entry.  Fix typo in comment.
23127         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
23128         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
23129         Add def_builtin calls for new builtins.
23130         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
23131         Add define_insn expansion.
23133 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23135         * config/rl78/rl78.md (umaxdi3): New define_expand.
23137 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23139         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
23140         for non-QImode registers.
23142 2018-01-22  Richard Biener  <rguenther@suse.de>
23144         PR tree-optimization/83963
23145         * graphite-scop-detection.c (scop_detection::get_sese): Delay
23146         including the loop exit block.
23147         (scop_detection::merge_sese): Likewise.
23148         (scop_detection::add_scop): Do it here instead.
23150 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23152         * doc/sourcebuild.texi (arm_softfloat): Document.
23154 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
23156         PR gcc/77734
23157         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
23158         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
23159         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
23161 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23162             David Edelsohn  <dje.gcc@gmail.com>
23164         PR target/83946
23165         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23166         Change "crset eq" to "crset 2".
23167         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23168         (*call_indirect_aix<mode>_nospec): Likewise.
23169         (*call_value_indirect_aix<mode>_nospec): Likewise.
23170         (*call_indirect_elfv2<mode>_nospec): Likewise.
23171         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
23172         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
23173         change assembly output from . to $.
23174         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23175         (indirect_jump<mode>_nospec): Change assembly output from . to $.
23176         (*tablejump<mode>_internal1_nospec): Likewise.
23178 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
23180         PR target/80870
23181         * config/sh/sh_optimize_sett_clrt.cc:
23182         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
23184 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
23186         PR tree-optimization/83940
23187         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
23188         offset_dt to vect_constant_def rather than vect_unknown_def_type.
23189         (vect_check_load_store_mask): Add a mask_dt_out parameter and
23190         use it to pass back the definition type.
23191         (vect_check_store_rhs): Likewise rhs_dt_out.
23192         (vect_build_gather_load_calls): Add a mask_dt argument and use
23193         it instead of a call to vect_is_simple_use.
23194         (vectorizable_store): Update calls to vect_check_load_store_mask
23195         and vect_check_store_rhs.  Use the dt returned by the latter instead
23196         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
23197         instead of calls to vect_is_simple_use.  Pass the scalar rather
23198         than the vector operand to vect_is_simple_use when handling
23199         second and subsequent copies of an rhs value.
23200         (vectorizable_load): Update calls to vect_check_load_store_mask
23201         and vect_build_gather_load_calls.  Use the cached mask_dt and
23202         gs_info.offset_dt instead of calls to vect_is_simple_use.
23204 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
23206         PR middle-end/83945
23207         * tree-emutls.c: Include gimplify.h.
23208         (lower_emutls_2): New function.
23209         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
23210         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
23211         it before further processing.
23213         PR target/83930
23214         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
23215         UINTVAL (trueop1) instead of INTVAL (op1).
23217 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
23219         PR debug/81570
23220         PR debug/83728
23221         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
23222         INCOMING_FRAME_SP_OFFSET if not defined.
23223         (scan_trace): Add ENTRY argument.  If true and
23224         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
23225         emit a note to adjust the CFA offset.
23226         (create_cfi_notes): Adjust scan_trace callers.
23227         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
23228         INCOMING_FRAME_SP_OFFSET in the CIE.
23229         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
23230         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
23231         Likewise.
23232         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
23233         * doc/tm.texi: Regenerated.
23235 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23237         PR rtl-optimization/83147
23238         * lra-constraints.c (remove_inheritance_pseudos): Use
23239         lra_substitute_pseudo_within_insn.
23241 2018-01-19  Tom de Vries  <tom@codesourcery.com>
23242             Cesar Philippidis  <cesar@codesourcery.com>
23244         PR target/83920
23245         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
23247 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
23249         PR target/83790
23250         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
23251         spaces for function labels.
23253 2018-01-19  Martin Liska  <mliska@suse.cz>
23255         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
23256         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
23257         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
23258         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
23259         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
23260         (PRED_CONST_RETURN): Change from 69 to 65.
23261         (PRED_NULL_RETURN): Change from 91 to 71.
23262         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
23263         (PRED_LOOP_GUARD): Change from 66 to 73.
23265 2018-01-19  Martin Liska  <mliska@suse.cz>
23267         * predict.c (predict_insn_def): Add new assert.
23268         (struct branch_predictor): Change type to signed integer.
23269         (test_prediction_value_range): Amend test to cover
23270         PROB_UNINITIALIZED.
23271         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
23272         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
23273         (PRED_LOOP_ITERATIONS_MAX): Likewise.
23274         (PRED_LOOP_IV_COMPARE): Likewise.
23275         * predict.h (PROB_UNINITIALIZED): Define new constant.
23277 2018-01-19  Martin Liska  <mliska@suse.cz>
23279         * predict.c (dump_prediction): Add new format for
23280         analyze_brprob.py script which is enabled with -details
23281         suboption.
23282         * profile-count.h (precise_p): New function.
23284 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
23286         PR tree-optimization/83922
23287         * tree-vect-loop.c (vect_verify_full_masking): Return false if
23288         there are no statements that need masking.
23289         (vect_active_double_reduction_p): New function.
23290         (vect_analyze_loop_operations): Use it when handling phis that
23291         are not in the loop header.
23293 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
23295         PR tree-optimization/83914
23296         * tree-vect-loop.c (vectorizable_induction): Don't convert
23297         init_expr or apply the peeling adjustment for inductions
23298         that are nested within the vectorized loop.
23300 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23302         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
23303         instead of NEG.
23305 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
23307         PR sanitizer/81715
23308         PR testsuite/83882
23309         * function.h (gimplify_parameters): Add gimple_seq * argument.
23310         * function.c: Include gimple.h and options.h.
23311         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
23312         for the added local temporaries if needed.
23313         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
23314         if there are any parameter cleanups, wrap whole body into a
23315         try/finally with the cleanups.
23317 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
23319         PR target/82964
23320         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
23321         Use GET_MODE_CLASS for scalar floating point.
23323 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
23325         PR ipa/82256
23326         patch by PaX Team
23327         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
23328         Fix call of call_cgraph_insertion_hooks.
23330 2018-01-18  Martin Sebor  <msebor@redhat.com>
23332         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
23334 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
23336         PR ipa/83619
23337         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
23338         frequencies.
23340 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
23342         PR other/70268
23343         * common.opt: (-ffile-prefix-map): New option.
23344         * opts.c (common_handle_option): Defer it.
23345         * opts-global.c (handle_common_deferred_options): Handle it.
23346         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
23347         * file-prefix-map.h: New file.
23348         (remap_debug_filename, add_debug_prefix_map): ...here.
23349         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
23350         * final.c (debug_prefix_map, add_debug_prefix_map
23351         remap_debug_filename): Move to...
23352         * file-prefix-map.c: New file.
23353         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
23354         generalize, get rid of alloca(), use strrchr() instead of strchr().
23355         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
23356         Implement in terms of add_prefix_map().
23357         (remap_macro_filename, remap_debug_filename): Implement in term of
23358         remap_filename().
23359         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
23360         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
23361         * dbxout.c: Include file-prefix-map.h.
23362         * varasm.c: Likewise.
23363         * vmsdbgout.c: Likewise.
23364         * xcoffout.c: Likewise.
23365         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
23366         * doc/cppopts.texi (-fmacro-prefix-map): Document.
23367         * doc/invoke.texi (-ffile-prefix-map): Document.
23368         (-fdebug-prefix-map): Update description.
23370 2018-01-18  Martin Liska  <mliska@suse.cz>
23372         * config/i386/i386.c (indirect_thunk_name): Document that also
23373         lfence is emitted.
23374         (output_indirect_thunk): Document why both instructions
23375         (pause and lfence) are generated.
23377 2018-01-18  Richard Biener  <rguenther@suse.de>
23379         PR tree-optimization/83887
23380         * graphite-scop-detection.c
23381         (scop_detection::get_nearest_dom_with_single_entry): Remove.
23382         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
23383         (scop_detection::merge_sese): Re-implement with a flood-fill
23384         algorithm that properly finds a SESE region if it exists.
23386 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
23388         PR c/61240
23389         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
23390         pointer_diff optimizations use view_convert instead of convert.
23392 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23394         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23395         Generate different code for -mno-speculate-indirect-jumps.
23396         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23397         (*call_indirect_aix<mode>): Disable for
23398         -mno-speculate-indirect-jumps.
23399         (*call_indirect_aix<mode>_nospec): New define_insn.
23400         (*call_value_indirect_aix<mode>): Disable for
23401         -mno-speculate-indirect-jumps.
23402         (*call_value_indirect_aix<mode>_nospec): New define_insn.
23403         (*sibcall_nonlocal_sysv<mode>): Generate different code for
23404         -mno-speculate-indirect-jumps.
23405         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23407 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
23409         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
23410         long double type, set the flags for noting the default long double
23411         type, even if we don't pass or return a long double type.
23413 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
23415         PR ipa/83051
23416         * ipa-inline.c (flatten_function): Do not overwrite final inlining
23417         failure.
23419 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
23421         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
23422         support for merge[hl].
23423         (fold_mergehl_helper): New helper function.
23424         (tree-vector-builder.h): New #include for tree_vector_builder usage.
23425         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
23426         (altivec_vmrglw_direct): Add xxmrglw insn.
23428 2018-01-17  Andrew Waterman  <andrew@sifive.com>
23430         * config/riscv/riscv.c (riscv_conditional_register_usage): If
23431         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
23433 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
23435         PR lto/83121
23436         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
23437         call the lto_location_cache before reading the
23438         DECL_SOURCE_LOCATION of the types.
23440 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
23441             Richard Sandiford  <richard.sandiford@linaro.org>
23443         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
23444         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
23445         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
23446         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
23447         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
23448         Add declaration.
23449         * config/aarch64/constraints.md (aarch64_movti_operand):
23450         Limit immediates.
23451         * config/aarch64/predicates.md (Uti): Add new constraint.
23453 2018-01-17  Carl Love  <cel@us.ibm.com>
23455         * config/rs6000/vsx.md (define_expand xl_len_r,
23456         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
23457         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
23458         lxvll.
23459         (define_expand, define_insn): Move the shift left from  the
23460         define_insn to the define_expand for lxvl and stxvl instructions.
23461         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
23462         and XL_LEN_R definitions to PURE.
23464 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
23466         * config/i386/i386.c (indirect_thunk_name): Declare regno
23467         as unsigned int.  Compare regno with INVALID_REGNUM.
23468         (output_indirect_thunk): Ditto.
23469         (output_indirect_thunk_function): Ditto.
23470         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
23471         in the call to output_indirect_thunk_function.
23473 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
23475         PR middle-end/83884
23476         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
23477         rather than the size of inner_type to determine the stack slot size
23478         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
23480 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
23482         PR target/83546
23483         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
23484         to PTA_SILVERMONT.
23486 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
23488         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
23489         endian Linux systems to optionally enable multilibs for selecting
23490         the long double type if the user configured an explicit type.
23491         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
23492         have no long double multilibs if not defined.
23493         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
23494         warn if the user used -mabi={ieee,ibm}longdouble and we built
23495         multilibs for long double.
23496         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
23497         appropriate multilib option.
23498         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
23499         multilib options.
23500         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
23501         for building long double multilibs.
23502         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
23504 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
23506         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
23507         copies.
23509         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
23510         64 bits.
23511         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
23512         128 bits.
23514         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
23515         variables.
23517         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
23518         return value.
23520 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
23522         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
23523         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
23525 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23527         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
23528         different rtl trees depending on TARGET_64BIT.
23529         (rs6000_gen_lvx): Likewise.
23531 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
23533         * config/visium/visium.md (nop): Tweak comment.
23534         (hazard_nop): Likewise.
23536 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23538         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
23539         -mspeculate-indirect-jumps.
23540         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
23541         for -mno-speculate-indirect-jumps.
23542         (*call_indirect_elfv2<mode>_nospec): New define_insn.
23543         (*call_value_indirect_elfv2<mode>): Disable for
23544         -mno-speculate-indirect-jumps.
23545         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
23546         (indirect_jump): Emit different RTL for
23547         -mno-speculate-indirect-jumps.
23548         (*indirect_jump<mode>): Disable for
23549         -mno-speculate-indirect-jumps.
23550         (*indirect_jump<mode>_nospec): New define_insn.
23551         (tablejump): Emit different RTL for
23552         -mno-speculate-indirect-jumps.
23553         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
23554         (tablejumpsi_nospec): New define_expand.
23555         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
23556         (tablejumpdi_nospec): New define_expand.
23557         (*tablejump<mode>_internal1): Disable for
23558         -mno-speculate-indirect-jumps.
23559         (*tablejump<mode>_internal1_nospec): New define_insn.
23560         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
23561         option.
23563 2018-01-16  Artyom Skrobov tyomitch@gmail.com
23565         * caller-save.c (insert_save): Drop unnecessary parameter.  All
23566         callers updated.
23568 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
23569             Richard Biener  <rguenth@suse.de>
23571         PR libgomp/83590
23572         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
23573         return early, inline manually is_gimple_sizepos.  Make sure if we
23574         call gimplify_expr we don't end up with a gimple constant.
23575         * tree.c (variably_modified_type_p): Don't return true for
23576         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
23577         * gimplify.h (is_gimple_sizepos): Remove.
23579 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23581         PR tree-optimization/83857
23582         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
23583         vectorizable_live_operation for pure SLP statements.
23584         (vectorizable_live_operation): Handle PHIs.
23586 2018-01-16  Richard Biener  <rguenther@suse.de>
23588         PR tree-optimization/83867
23589         * tree-vect-stmts.c (vect_transform_stmt): Precompute
23590         nested_in_vect_loop_p since the scalar stmt may get invalidated.
23592 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
23594         PR c/83844
23595         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
23596         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
23597         If off is not INTEGER_CST, issue a may not be aligned warning
23598         rather than isn't aligned.  Use isn%'t rather than isn't.
23599         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
23600         into MULT_EXPR.
23601         <case MULT_EXPR>: Improve the case when bottom and one of the
23602         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
23603         operand, in that case check if the other operand is multiple of
23604         bottom divided by the INTEGER_CST operand.
23606 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23608         PR target/83858
23609         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
23610         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
23611         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
23612         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
23613         * config/pa/pa.c (pa_function_arg_advance): Likewise.
23614         (pa_function_arg, pa_arg_partial_bytes): Likewise.
23615         (pa_function_arg_size): New function.
23617 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23619         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
23620         in a separate statement.
23622 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23624         PR tree-optimization/83847
23625         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
23626         group gathers and scatters.
23628 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
23630         PR rtl-optimization/86620
23631         * params.def (max-sched-ready-insns): Bump minimum value to 1.
23633         PR rtl-optimization/83213
23634         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
23635         to last if both are JUMP_INSNs.
23637         PR tree-optimization/83843
23638         * gimple-ssa-store-merging.c
23639         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
23640         store_immediate_info for bswap/nop orig_stores.
23642 2018-01-15  Andrew Waterman  <andrew@sifive.com>
23644         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
23645         !TARGET_MUL.
23646         <UDIV>: Increase cost if !TARGET_DIV.
23648 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
23650         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
23651         (define_attr "cr_logical_3op"): New.
23652         (cceq_ior_compare): Adjust.
23653         (cceq_ior_compare_complement): Adjust.
23654         (*cceq_rev_compare): Adjust.
23655         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
23656         (is_cracked_insn): Adjust.
23657         (insn_must_be_first_in_group): Adjust.
23658         * config/rs6000/40x.md: Adjust.
23659         * config/rs6000/440.md: Adjust.
23660         * config/rs6000/476.md: Adjust.
23661         * config/rs6000/601.md: Adjust.
23662         * config/rs6000/603.md: Adjust.
23663         * config/rs6000/6xx.md: Adjust.
23664         * config/rs6000/7450.md: Adjust.
23665         * config/rs6000/7xx.md: Adjust.
23666         * config/rs6000/8540.md: Adjust.
23667         * config/rs6000/cell.md: Adjust.
23668         * config/rs6000/e300c2c3.md: Adjust.
23669         * config/rs6000/e500mc.md: Adjust.
23670         * config/rs6000/e500mc64.md: Adjust.
23671         * config/rs6000/e5500.md: Adjust.
23672         * config/rs6000/e6500.md: Adjust.
23673         * config/rs6000/mpc.md: Adjust.
23674         * config/rs6000/power4.md: Adjust.
23675         * config/rs6000/power5.md: Adjust.
23676         * config/rs6000/power6.md: Adjust.
23677         * config/rs6000/power7.md: Adjust.
23678         * config/rs6000/power8.md: Adjust.
23679         * config/rs6000/power9.md: Adjust.
23680         * config/rs6000/rs64.md: Adjust.
23681         * config/rs6000/titan.md: Adjust.
23683 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23685         * config/i386/predicates.md (indirect_branch_operand): Rewrite
23686         ix86_indirect_branch_register logic.
23688 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23690         * config/i386/constraints.md (Bs): Update
23691         ix86_indirect_branch_register check.  Don't check
23692         ix86_indirect_branch_register with GOT_memory_operand.
23693         (Bw): Likewise.
23694         * config/i386/predicates.md (GOT_memory_operand): Don't check
23695         ix86_indirect_branch_register here.
23696         (GOT32_symbol_operand): Likewise.
23698 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23700         * config/i386/predicates.md (constant_call_address_operand):
23701         Rewrite ix86_indirect_branch_register logic.
23702         (sibcall_insn_operand): Likewise.
23704 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23706         * config/i386/constraints.md (Bs): Replace
23707         ix86_indirect_branch_thunk_register with
23708         ix86_indirect_branch_register.
23709         (Bw): Likewise.
23710         * config/i386/i386.md (indirect_jump): Likewise.
23711         (tablejump): Likewise.
23712         (*sibcall_memory): Likewise.
23713         (*sibcall_value_memory): Likewise.
23714         Peepholes of indirect call and jump via memory: Likewise.
23715         * config/i386/i386.opt: Likewise.
23716         * config/i386/predicates.md (indirect_branch_operand): Likewise.
23717         (GOT_memory_operand): Likewise.
23718         (call_insn_operand): Likewise.
23719         (sibcall_insn_operand): Likewise.
23720         (GOT32_symbol_operand): Likewise.
23722 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
23724         PR middle-end/83837
23725         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
23726         type rather than type addr's type points to.
23727         (expand_omp_atomic_mutex): Likewise.
23728         (expand_omp_atomic): Likewise.
23730 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23732         PR target/83839
23733         * config/i386/i386.c (output_indirect_thunk_function): Use
23734         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
23735         for  __x86_return_thunk.
23737 2018-01-15  Richard Biener  <rguenther@suse.de>
23739         PR middle-end/83850
23740         * expmed.c (extract_bit_field_1): Fix typo.
23742 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23744         PR target/83687
23745         * config/arm/iterators.md (VF): New mode iterator.
23746         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
23747         Remove integer-related logic from pattern.
23748         (neon_vabd<mode>_3): Likewise.
23750 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
23752         PR middle-end/82694
23753         * common.opt (fstrict-overflow): No longer an alias.
23754         (fwrapv-pointer): New option.
23755         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
23756         also for pointer types based on flag_wrapv_pointer.
23757         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
23758         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
23759         opts->x_flag_wrapv got set.
23760         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
23761         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
23762         POINTER_TYPE_OVERFLOW_UNDEFINED.
23763         * match.pd: Likewise in address comparison pattern.
23764         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
23766 2018-01-15  Richard Biener  <rguenther@suse.de>
23768         PR lto/83804
23769         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
23770         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
23771         Reset type names to their identifier if their TYPE_DECL doesn't
23772         have linkage (and thus is used for ODR and devirt).
23773         (save_debug_info_for_decl): Remove.
23774         (save_debug_info_for_type): Likewise.
23775         (add_tree_to_fld_list): Adjust.
23776         * tree-pretty-print.c (dump_generic_node): Make dumping of
23777         type names more robust.
23779 2018-01-15  Richard Biener  <rguenther@suse.de>
23781         * BASE-VER: Bump to 8.0.1.
23783 2018-01-14  Martin Sebor  <msebor@redhat.com>
23785         PR other/83508
23786         * builtins.c (check_access): Avoid warning when the no-warning bit
23787         is set.
23789 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
23791         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
23792         * ira-color (allocno_hard_regs_compare): Likewise.
23794 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
23796         PR target/83013
23797         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
23798         Use .pushsection/.popsection.
23800 2018-01-14  Martin Sebor  <msebor@redhat.com>
23802         PR c++/81327
23803         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
23805 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
23807         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
23808         entry from extra_headers.
23809         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
23810         extra_headers, make the list bitwise identical to the i?86-*-* one.
23812 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23814         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
23815         -mcmodel=large with -mindirect-branch=thunk,
23816         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
23817         -mfunction-return=thunk-extern.
23818         * doc/invoke.texi: Document -mcmodel=large is incompatible with
23819         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
23820         -mfunction-return=thunk and -mfunction-return=thunk-extern.
23822 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23824         * config/i386/i386.c (print_reg): Print the name of the full
23825         integer register without '%'.
23826         (ix86_print_operand): Handle 'V'.
23827         * doc/extend.texi: Document 'V' modifier.
23829 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23831         * config/i386/constraints.md (Bs): Disallow memory operand for
23832         -mindirect-branch-register.
23833         (Bw): Likewise.
23834         * config/i386/predicates.md (indirect_branch_operand): Likewise.
23835         (GOT_memory_operand): Likewise.
23836         (call_insn_operand): Likewise.
23837         (sibcall_insn_operand): Likewise.
23838         (GOT32_symbol_operand): Likewise.
23839         * config/i386/i386.md (indirect_jump): Call convert_memory_address
23840         for -mindirect-branch-register.
23841         (tablejump): Likewise.
23842         (*sibcall_memory): Likewise.
23843         (*sibcall_value_memory): Likewise.
23844         Disallow peepholes of indirect call and jump via memory for
23845         -mindirect-branch-register.
23846         (*call_pop): Replace m with Bw.
23847         (*call_value_pop): Likewise.
23848         (*sibcall_pop_memory): Replace m with Bs.
23849         * config/i386/i386.opt (mindirect-branch-register): New option.
23850         * doc/invoke.texi: Document -mindirect-branch-register option.
23852 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23854         * config/i386/i386-protos.h (ix86_output_function_return): New.
23855         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
23856         set function_return_type.
23857         (indirect_thunk_name): Add ret_p to indicate thunk for function
23858         return.
23859         (output_indirect_thunk_function): Pass false to
23860         indirect_thunk_name.
23861         (ix86_output_indirect_branch_via_reg): Likewise.
23862         (ix86_output_indirect_branch_via_push): Likewise.
23863         (output_indirect_thunk_function): Create alias for function
23864         return thunk if regno < 0.
23865         (ix86_output_function_return): New function.
23866         (ix86_handle_fndecl_attribute): Handle function_return.
23867         (ix86_attribute_table): Add function_return.
23868         * config/i386/i386.h (machine_function): Add
23869         function_return_type.
23870         * config/i386/i386.md (simple_return_internal): Use
23871         ix86_output_function_return.
23872         (simple_return_internal_long): Likewise.
23873         * config/i386/i386.opt (mfunction-return=): New option.
23874         (indirect_branch): Mention -mfunction-return=.
23875         * doc/extend.texi: Document function_return function attribute.
23876         * doc/invoke.texi: Document -mfunction-return= option.
23878 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23880         * config/i386/i386-opts.h (indirect_branch): New.
23881         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
23882         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
23883         with local indirect jump when converting indirect call and jump.
23884         (ix86_set_indirect_branch_type): New.
23885         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
23886         (indirectlabelno): New.
23887         (indirect_thunk_needed): Likewise.
23888         (indirect_thunk_bnd_needed): Likewise.
23889         (indirect_thunks_used): Likewise.
23890         (indirect_thunks_bnd_used): Likewise.
23891         (INDIRECT_LABEL): Likewise.
23892         (indirect_thunk_name): Likewise.
23893         (output_indirect_thunk): Likewise.
23894         (output_indirect_thunk_function): Likewise.
23895         (ix86_output_indirect_branch_via_reg): Likewise.
23896         (ix86_output_indirect_branch_via_push): Likewise.
23897         (ix86_output_indirect_branch): Likewise.
23898         (ix86_output_indirect_jmp): Likewise.
23899         (ix86_code_end): Call output_indirect_thunk_function if needed.
23900         (ix86_output_call_insn): Call ix86_output_indirect_branch if
23901         needed.
23902         (ix86_handle_fndecl_attribute): Handle indirect_branch.
23903         (ix86_attribute_table): Add indirect_branch.
23904         * config/i386/i386.h (machine_function): Add indirect_branch_type
23905         and has_local_indirect_jump.
23906         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
23907         to true.
23908         (tablejump): Likewise.
23909         (*indirect_jump): Use ix86_output_indirect_jmp.
23910         (*tablejump_1): Likewise.
23911         (simple_return_indirect_internal): Likewise.
23912         * config/i386/i386.opt (mindirect-branch=): New option.
23913         (indirect_branch): New.
23914         (keep): Likewise.
23915         (thunk): Likewise.
23916         (thunk-inline): Likewise.
23917         (thunk-extern): Likewise.
23918         * doc/extend.texi: Document indirect_branch function attribute.
23919         * doc/invoke.texi: Document -mindirect-branch= option.
23921 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
23923         PR ipa/83051
23924         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
23926 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
23928         * ipa-inline.c (want_inline_small_function_p): Return false if
23929         inlining has already failed with CIF_FINAL_ERROR.
23930         (update_caller_keys): Call want_inline_small_function_p before
23931         can_inline_edge_p.
23932         (update_callee_keys): Likewise.
23934 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23936         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
23937         New function.
23938         (rs6000_quadword_masked_address_p): Likewise.
23939         (quad_aligned_load_p): Likewise.
23940         (quad_aligned_store_p): Likewise.
23941         (const_load_sequence_p): Add comment to describe the outer-most loop.
23942         (mimic_memory_attributes_and_flags): New function.
23943         (rs6000_gen_stvx): Likewise.
23944         (replace_swapped_aligned_store): Likewise.
23945         (rs6000_gen_lvx): Likewise.
23946         (replace_swapped_aligned_load): Likewise.
23947         (replace_swapped_load_constant): Capitalize argument name in
23948         comment describing this function.
23949         (rs6000_analyze_swaps): Add a third pass to search for vector loads
23950         and stores that access quad-word aligned addresses and replace
23951         with stvx or lvx instructions when appropriate.
23952         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
23953         New function prototype.
23954         (rs6000_quadword_masked_address_p): Likewise.
23955         (rs6000_gen_lvx): Likewise.
23956         (rs6000_gen_stvx): Likewise.
23957         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
23958         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
23959         when memory address is aligned.
23960         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
23961         this split to select lvx instruction when memory address is aligned.
23962         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
23963         instruction when memory address is aligned.
23964         (*vsx_le_perm_load_v16qi): Likewise.
23965         (four unnamed splitters): Modify to select the stvx instruction
23966         when memory is aligned.
23968 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
23970         * predict.c (determine_unlikely_bbs): Handle correctly BBs
23971         which appears in the queue multiple times.
23973 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23974             Alan Hayward  <alan.hayward@arm.com>
23975             David Sherwood  <david.sherwood@arm.com>
23977         * tree-vectorizer.h (vec_lower_bound): New structure.
23978         (_loop_vec_info): Add check_nonzero and lower_bounds.
23979         (LOOP_VINFO_CHECK_NONZERO): New macro.
23980         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
23981         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
23982         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
23983         fields.  Make seg_len the distance travelled, not including the
23984         access size.
23985         (dr_direction_indicator): Declare.
23986         (dr_zero_step_indicator): Likewise.
23987         (dr_known_forward_stride_p): Likewise.
23988         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
23989         tree-ssanames.h.
23990         (runtime_alias_check_p): Allow runtime alias checks with
23991         variable strides.
23992         (operator ==): Compare access_size and align.
23993         (prune_runtime_alias_test_list): Rework for new distinction between
23994         the access_size and seg_len.
23995         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
23996         segment lengths.
23997         (get_segment_min_max): New function.
23998         (create_intersect_range_checks): Use it.
23999         (dr_step_indicator): New function.
24000         (dr_direction_indicator): Likewise.
24001         (dr_zero_step_indicator): Likewise.
24002         (dr_known_forward_stride_p): Likewise.
24003         * tree-loop-distribution.c (data_ref_segment_size): Return
24004         DR_STEP * (niters - 1).
24005         (compute_alias_check_pairs): Update call to the dr_with_seg_len
24006         constructor.
24007         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
24008         (vect_preserves_scalar_order_p): New function, split out from...
24009         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
24010         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
24011         (vect_vfa_access_size): New function.
24012         (vect_vfa_align): Likewise.
24013         (vect_compile_time_alias): Take access_size_a and access_b arguments.
24014         (dump_lower_bound): New function.
24015         (vect_check_lower_bound): Likewise.
24016         (vect_small_gap_p): Likewise.
24017         (vectorizable_with_step_bound_p): Likewise.
24018         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
24019         depencies if the vectorization factor is 1.  Convert the checks
24020         for nonzero steps into checks on the bounds of DR_STEP.  Try using
24021         a bunds check for variable steps if the minimum required step is
24022         relatively small. Update calls to the dr_with_seg_len
24023         constructor and to vect_compile_time_alias.
24024         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
24025         function.
24026         (vect_loop_versioning): Call it.
24027         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
24028         when retrying.
24029         (vect_estimate_min_profitable_iters): Account for any bounds checks.
24031 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24032             Alan Hayward  <alan.hayward@arm.com>
24033             David Sherwood  <david.sherwood@arm.com>
24035         * doc/sourcebuild.texi (vect_scatter_store): Document.
24036         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
24037         optabs.
24038         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
24039         Document.
24040         * genopinit.c (main): Add supports_vec_scatter_store and
24041         supports_vec_scatter_store_cached to target_optabs.
24042         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
24043         IFN_MASK_SCATTER_STORE.
24044         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
24045         functions.
24046         * internal-fn.h (internal_store_fn_p): Declare.
24047         (internal_fn_stored_value_index): Likewise.
24048         * internal-fn.c (scatter_store_direct): New macro.
24049         (expand_scatter_store_optab_fn): New function.
24050         (direct_scatter_store_optab_supported_p): New macro.
24051         (internal_store_fn_p): New function.
24052         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
24053         IFN_MASK_SCATTER_STORE.
24054         (internal_fn_mask_index): Likewise.
24055         (internal_fn_stored_value_index): New function.
24056         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
24057         for scatter stores.
24058         * optabs-query.h (supports_vec_scatter_store_p): Declare.
24059         * optabs-query.c (supports_vec_scatter_store_p): New function.
24060         * tree-vectorizer.h (vect_get_store_rhs): Declare.
24061         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
24062         true for scatter stores.
24063         (vect_gather_scatter_fn_p): Handle scatter stores too.
24064         (vect_check_gather_scatter): Consider using scatter stores if
24065         supports_vec_scatter_store_p.
24066         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
24067         scatter stores too.
24068         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24069         internal_fn_stored_value_index.
24070         (check_load_store_masking): Handle scatter stores too.
24071         (vect_get_store_rhs): Make public.
24072         (vectorizable_call): Use internal_store_fn_p.
24073         (vectorizable_store): Handle scatter store internal functions.
24074         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
24075         when deciding whether the end of the group has been reached.
24076         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
24077         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
24078         (mask_scatter_store<mode>): New insns.
24080 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24081             Alan Hayward  <alan.hayward@arm.com>
24082             David Sherwood  <david.sherwood@arm.com>
24084         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
24085         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
24086         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
24087         function.
24088         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
24089         Use vect_truncate_gather_scatter_offset if we can't treat the
24090         operation as a normal gather load or scatter store.
24091         (get_group_load_store_type): Take the gather_scatter_info
24092         as argument.  Try using a gather load or scatter store for
24093         single-element groups.
24094         (get_load_store_type): Update calls to get_group_load_store_type
24095         and vect_use_strided_gather_scatters_p.
24097 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24098             Alan Hayward  <alan.hayward@arm.com>
24099             David Sherwood  <david.sherwood@arm.com>
24101         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
24102         optional tree argument.
24103         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
24104         null target hooks.
24105         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
24106         but continue to use the current value as a fallback.
24107         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
24108         to compare the updates.
24109         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
24110         (get_load_store_type): Use it when handling a strided access.
24111         (vect_get_strided_load_store_ops): New function.
24112         (vect_get_data_ptr_increment): Likewise.
24113         (vectorizable_load): Handle strided gather loads.  Always pass
24114         a step to vect_create_data_ref_ptr and bump_vector_ptr.
24116 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24117             Alan Hayward  <alan.hayward@arm.com>
24118             David Sherwood  <david.sherwood@arm.com>
24120         * doc/md.texi (gather_load@var{m}): Document.
24121         (mask_gather_load@var{m}): Likewise.
24122         * genopinit.c (main): Add supports_vec_gather_load and
24123         supports_vec_gather_load_cached to target_optabs.
24124         * optabs-tree.c (init_tree_optimization_optabs): Use
24125         ggc_cleared_alloc to allocate target_optabs.
24126         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
24127         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
24128         functions.
24129         * internal-fn.h (internal_load_fn_p): Declare.
24130         (internal_gather_scatter_fn_p): Likewise.
24131         (internal_fn_mask_index): Likewise.
24132         (internal_gather_scatter_fn_supported_p): Likewise.
24133         * internal-fn.c (gather_load_direct): New macro.
24134         (expand_gather_load_optab_fn): New function.
24135         (direct_gather_load_optab_supported_p): New macro.
24136         (direct_internal_fn_optab): New function.
24137         (internal_load_fn_p): Likewise.
24138         (internal_gather_scatter_fn_p): Likewise.
24139         (internal_fn_mask_index): Likewise.
24140         (internal_gather_scatter_fn_supported_p): Likewise.
24141         * optabs-query.c (supports_at_least_one_mode_p): New function.
24142         (supports_vec_gather_load_p): Likewise.
24143         * optabs-query.h (supports_vec_gather_load_p): Declare.
24144         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
24145         and memory_type field.
24146         (NUM_PATTERNS): Bump to 15.
24147         * tree-vect-data-refs.c: Include internal-fn.h.
24148         (vect_gather_scatter_fn_p): New function.
24149         (vect_describe_gather_scatter_call): Likewise.
24150         (vect_check_gather_scatter): Try using internal functions for
24151         gather loads.  Recognize existing calls to a gather load function.
24152         (vect_analyze_data_refs): Consider using gather loads if
24153         supports_vec_gather_load_p.
24154         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
24155         (vect_get_gather_scatter_offset_type): Likewise.
24156         (vect_convert_mask_for_vectype): Likewise.
24157         (vect_add_conversion_to_patterm): Likewise.
24158         (vect_try_gather_scatter_pattern): Likewise.
24159         (vect_recog_gather_scatter_pattern): New pattern recognizer.
24160         (vect_vect_recog_func_ptrs): Add it.
24161         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24162         internal_fn_mask_index and internal_gather_scatter_fn_p.
24163         (check_load_store_masking): Take the gather_scatter_info as an
24164         argument and handle gather loads.
24165         (vect_get_gather_scatter_ops): New function.
24166         (vectorizable_call): Check internal_load_fn_p.
24167         (vectorizable_load): Likewise.  Handle gather load internal
24168         functions.
24169         (vectorizable_store): Update call to check_load_store_masking.
24170         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
24171         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
24172         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
24173         (aarch64_gather_scale_operand_d): New predicates.
24174         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
24175         (mask_gather_load<mode>): New insns.
24177 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24178             Alan Hayward  <alan.hayward@arm.com>
24179             David Sherwood  <david.sherwood@arm.com>
24181         * optabs.def (fold_left_plus_optab): New optab.
24182         * doc/md.texi (fold_left_plus_@var{m}): Document.
24183         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
24184         * internal-fn.c (fold_left_direct): Define.
24185         (expand_fold_left_optab_fn): Likewise.
24186         (direct_fold_left_optab_supported_p): Likewise.
24187         * fold-const-call.c (fold_const_fold_left): New function.
24188         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
24189         * tree-parloops.c (valid_reduction_p): New function.
24190         (gather_scalar_reductions): Use it.
24191         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
24192         (vect_finish_replace_stmt): Declare.
24193         * tree-vect-loop.c (fold_left_reduction_fn): New function.
24194         (needs_fold_left_reduction_p): New function, split out from...
24195         (vect_is_simple_reduction): ...here.  Accept reductions that
24196         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
24197         (vect_force_simple_reduction): Also store the reduction type in
24198         the assignment's STMT_VINFO_REDUC_TYPE.
24199         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
24200         (merge_with_identity): New function.
24201         (vect_expand_fold_left): Likewise.
24202         (vectorize_fold_left_reduction): Likewise.
24203         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
24204         scalar phi in place for it.  Check for target support and reject
24205         cases that would reassociate the operation.  Defer the transform
24206         phase to vectorize_fold_left_reduction.
24207         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
24208         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
24209         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
24211 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24213         * tree-if-conv.c (predicate_mem_writes): Remove redundant
24214         call to ifc_temp_var.
24216 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24217             Alan Hayward  <alan.hayward@arm.com>
24218             David Sherwood  <david.sherwood@arm.com>
24220         * target.def (legitimize_address_displacement): Take the original
24221         offset as a poly_int.
24222         * targhooks.h (default_legitimize_address_displacement): Update
24223         accordingly.
24224         * targhooks.c (default_legitimize_address_displacement): Likewise.
24225         * doc/tm.texi: Regenerate.
24226         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
24227         as an argument, moving assert of ad->disp == ad->disp_term to...
24228         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
24229         Try calling targetm.legitimize_address_displacement before expanding
24230         the address rather than afterwards, and adjust for the new interface.
24231         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
24232         Match the new hook interface.  Handle SVE addresses.
24233         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
24234         new hook interface.
24236 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24238         * Makefile.in (OBJS): Add early-remat.o.
24239         * target.def (select_early_remat_modes): New hook.
24240         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
24241         * doc/tm.texi: Regenerate.
24242         * targhooks.h (default_select_early_remat_modes): Declare.
24243         * targhooks.c (default_select_early_remat_modes): New function.
24244         * timevar.def (TV_EARLY_REMAT): New timevar.
24245         * passes.def (pass_early_remat): New pass.
24246         * tree-pass.h (make_pass_early_remat): Declare.
24247         * early-remat.c: New file.
24248         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
24249         function.
24250         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
24252 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24253             Alan Hayward  <alan.hayward@arm.com>
24254             David Sherwood  <david.sherwood@arm.com>
24256         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
24257         vfm1 with a bound_epilog parameter.
24258         (vect_do_peeling): Update calls accordingly, and move the prologue
24259         call earlier in the function.  Treat the base bound_epilog as 0 for
24260         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
24261         this base when peeling for gaps.
24262         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
24263         with fully-masked loops.
24264         (vect_estimate_min_profitable_iters): Handle the single peeled
24265         iteration in that case.
24267 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24268             Alan Hayward  <alan.hayward@arm.com>
24269             David Sherwood  <david.sherwood@arm.com>
24271         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
24272         single-element interleaving even if the size is not a power of 2.
24273         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
24274         accesses for single-element interleaving if the group size is
24275         not a power of 2.
24277 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24278             Alan Hayward  <alan.hayward@arm.com>
24279             David Sherwood  <david.sherwood@arm.com>
24281         * doc/md.texi (fold_extract_last_@var{m}): Document.
24282         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
24283         * optabs.def (fold_extract_last_optab): New optab.
24284         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
24285         * internal-fn.c (fold_extract_direct): New macro.
24286         (expand_fold_extract_optab_fn): Likewise.
24287         (direct_fold_extract_optab_supported_p): Likewise.
24288         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
24289         * tree-vect-loop.c (vect_model_reduction_cost): Handle
24290         EXTRACT_LAST_REDUCTION.
24291         (get_initial_def_for_reduction): Do not create an initial vector
24292         for EXTRACT_LAST_REDUCTION reductions.
24293         (vectorizable_reduction): Leave the scalar phi in place for
24294         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
24295         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
24296         epilogue code for EXTRACT_LAST_REDUCTION and defer the
24297         transform phase to vectorizable_condition.
24298         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
24299         split out from...
24300         (vect_finish_stmt_generation): ...here.
24301         (vect_finish_replace_stmt): New function.
24302         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
24303         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
24304         pattern.
24305         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
24307 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24308             Alan Hayward  <alan.hayward@arm.com>
24309             David Sherwood  <david.sherwood@arm.com>
24311         * doc/md.texi (extract_last_@var{m}): Document.
24312         * optabs.def (extract_last_optab): New optab.
24313         * internal-fn.def (EXTRACT_LAST): New internal function.
24314         * internal-fn.c (cond_unary_direct): New macro.
24315         (expand_cond_unary_optab_fn): Likewise.
24316         (direct_cond_unary_optab_supported_p): Likewise.
24317         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
24318         loops using EXTRACT_LAST.
24319         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
24320         (extract_last_<mode>): ...this optab.
24321         (vec_extract<mode><Vel>): Update accordingly.
24323 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24324             Alan Hayward  <alan.hayward@arm.com>
24325             David Sherwood  <david.sherwood@arm.com>
24327         * target.def (empty_mask_is_expensive): New hook.
24328         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
24329         * doc/tm.texi: Regenerate.
24330         * targhooks.h (default_empty_mask_is_expensive): Declare.
24331         * targhooks.c (default_empty_mask_is_expensive): New function.
24332         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
24333         if the target says that empty masks are expensive.
24334         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
24335         New function.
24336         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
24338 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24339             Alan Hayward  <alan.hayward@arm.com>
24340             David Sherwood  <david.sherwood@arm.com>
24342         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
24343         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
24344         (vect_use_loop_mask_for_alignment_p): New function.
24345         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
24346         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
24347         niters_skip argument.  Make sure that the first niters_skip elements
24348         of the first iteration are inactive.
24349         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
24350         Update call to vect_set_loop_masks_directly.
24351         (get_misalign_in_elems): New function, split out from...
24352         (vect_gen_prolog_loop_niters): ...here.
24353         (vect_update_init_of_dr): Take a code argument that specifies whether
24354         the adjustment should be added or subtracted.
24355         (vect_update_init_of_drs): Likewise.
24356         (vect_prepare_for_masked_peels): New function.
24357         (vect_do_peeling): Skip prologue peeling if we're using a mask
24358         instead.  Update call to vect_update_inits_of_drs.
24359         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24360         mask_skip_niters.
24361         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
24362         alignment.  Do not include the number of peeled iterations in
24363         the minimum threshold in that case.
24364         (vectorizable_induction): Adjust the start value down by
24365         LOOP_VINFO_MASK_SKIP_NITERS iterations.
24366         (vect_transform_loop): Call vect_prepare_for_masked_peels.
24367         Take the number of skipped iterations into account when calculating
24368         the loop bounds.
24369         * tree-vect-stmts.c (vect_gen_while_not): New function.
24371 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24372             Alan Hayward  <alan.hayward@arm.com>
24373             David Sherwood  <david.sherwood@arm.com>
24375         * doc/sourcebuild.texi (vect_fully_masked): Document.
24376         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
24377         default value to 0.
24378         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
24379         split out from...
24380         (vect_analyze_loop_2): ...here. Don't check the vectorization
24381         factor against the number of loop iterations if the loop is
24382         fully-masked.
24384 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24385             Alan Hayward  <alan.hayward@arm.com>
24386             David Sherwood  <david.sherwood@arm.com>
24388         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
24389         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
24390         (dump_groups): Update accordingly.
24391         (iv_use::mem_type): New member variable.
24392         (address_p): New function.
24393         (record_use): Add a mem_type argument and initialize the new
24394         mem_type field.
24395         (record_group_use): Add a mem_type argument.  Use address_p.
24396         Remove obsolete null checks of base_object.  Update call to record_use.
24397         (find_interesting_uses_op): Update call to record_group_use.
24398         (find_interesting_uses_cond): Likewise.
24399         (find_interesting_uses_address): Likewise.
24400         (get_mem_type_for_internal_fn): New function.
24401         (find_address_like_use): Likewise.
24402         (find_interesting_uses_stmt): Try find_address_like_use before
24403         calling find_interesting_uses_op.
24404         (addr_offset_valid_p): Use the iv mem_type field as the type
24405         of the addressed memory.
24406         (add_autoinc_candidates): Likewise.
24407         (get_address_cost): Likewise.
24408         (split_small_address_groups_p): Use address_p.
24409         (split_address_groups): Likewise.
24410         (add_iv_candidate_for_use): Likewise.
24411         (autoinc_possible_for_pair): Likewise.
24412         (rewrite_groups): Likewise.
24413         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
24414         (determine_group_iv_cost): Update after split of USE_ADDRESS.
24415         (get_alias_ptr_type_for_ptr_address): New function.
24416         (rewrite_use_address): Rewrite address uses in calls that were
24417         identified by find_address_like_use.
24419 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24420             Alan Hayward  <alan.hayward@arm.com>
24421             David Sherwood  <david.sherwood@arm.com>
24423         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
24424         TARGET_MEM_REFs.
24425         * gimple-expr.h (is_gimple_addressable: Likewise.
24426         * gimple-expr.c (is_gimple_address): Likewise.
24427         * internal-fn.c (expand_call_mem_ref): New function.
24428         (expand_mask_load_optab_fn): Use it.
24429         (expand_mask_store_optab_fn): Likewise.
24431 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24432             Alan Hayward  <alan.hayward@arm.com>
24433             David Sherwood  <david.sherwood@arm.com>
24435         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
24436         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
24437         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
24438         (cond_umax@var{mode}): Document.
24439         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
24440         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
24441         (cond_umin_optab, cond_umax_optab): New optabs.
24442         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
24443         (COND_IOR, COND_XOR): New internal functions.
24444         * internal-fn.h (get_conditional_internal_fn): Declare.
24445         * internal-fn.c (cond_binary_direct): New macro.
24446         (expand_cond_binary_optab_fn): Likewise.
24447         (direct_cond_binary_optab_supported_p): Likewise.
24448         (get_conditional_internal_fn): New function.
24449         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
24450         Cope with reduction statements that are vectorized as calls rather
24451         than assignments.
24452         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
24453         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
24454         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
24455         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
24456         (UNSPEC_COND_EOR): New unspecs.
24457         (optab): Add mappings for them.
24458         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
24459         (sve_int_op, sve_fp_op): New int attributes.
24461 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24462             Alan Hayward  <alan.hayward@arm.com>
24463             David Sherwood  <david.sherwood@arm.com>
24465         * optabs.def (while_ult_optab): New optab.
24466         * doc/md.texi (while_ult@var{m}@var{n}): Document.
24467         * internal-fn.def (WHILE_ULT): New internal function.
24468         * internal-fn.h (direct_internal_fn_supported_p): New override
24469         that takes two types as argument.
24470         * internal-fn.c (while_direct): New macro.
24471         (expand_while_optab_fn): New function.
24472         (convert_optab_supported_p): Likewise.
24473         (direct_while_optab_supported_p): New macro.
24474         * wide-int.h (wi::udiv_ceil): New function.
24475         * tree-vectorizer.h (rgroup_masks): New structure.
24476         (vec_loop_masks): New typedef.
24477         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
24478         and fully_masked_p.
24479         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
24480         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
24481         (vect_max_vf): New function.
24482         (slpeel_make_loop_iterate_ntimes): Delete.
24483         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
24484         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
24485         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
24486         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
24487         internal-fn.h, stor-layout.h and optabs-query.h.
24488         (vect_set_loop_mask): New function.
24489         (add_preheader_seq): Likewise.
24490         (add_header_seq): Likewise.
24491         (interleave_supported_p): Likewise.
24492         (vect_maybe_permute_loop_masks): Likewise.
24493         (vect_set_loop_masks_directly): Likewise.
24494         (vect_set_loop_condition_masked): Likewise.
24495         (vect_set_loop_condition_unmasked): New function, split out from
24496         slpeel_make_loop_iterate_ntimes.
24497         (slpeel_make_loop_iterate_ntimes): Rename to..
24498         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
24499         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
24500         (vect_do_peeling): Update call accordingly.
24501         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
24502         loops.
24503         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24504         mask_compare_type, can_fully_mask_p and fully_masked_p.
24505         (release_vec_loop_masks): New function.
24506         (_loop_vec_info): Use it to free the loop masks.
24507         (can_produce_all_loop_masks_p): New function.
24508         (vect_get_max_nscalars_per_iter): Likewise.
24509         (vect_verify_full_masking): Likewise.
24510         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
24511         retries, and free the mask rgroups before retrying.  Check loop-wide
24512         reasons for disallowing fully-masked loops.  Make the final decision
24513         about whether use a fully-masked loop or not.
24514         (vect_estimate_min_profitable_iters): Do not assume that peeling
24515         for the number of iterations will be needed for fully-masked loops.
24516         (vectorizable_reduction): Disable fully-masked loops.
24517         (vectorizable_live_operation): Likewise.
24518         (vect_halve_mask_nunits): New function.
24519         (vect_double_mask_nunits): Likewise.
24520         (vect_record_loop_mask): Likewise.
24521         (vect_get_loop_mask): Likewise.
24522         (vect_transform_loop): Handle the case in which the final loop
24523         iteration might handle a partial vector.  Call vect_set_loop_condition
24524         instead of slpeel_make_loop_iterate_ntimes.
24525         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
24526         (check_load_store_masking): New function.
24527         (prepare_load_store_mask): Likewise.
24528         (vectorizable_store): Handle fully-masked loops.
24529         (vectorizable_load): Likewise.
24530         (supportable_widening_operation): Use vect_halve_mask_nunits for
24531         booleans.
24532         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
24533         (vect_gen_while): New function.
24534         * config/aarch64/aarch64.md (umax<mode>3): New expander.
24535         (aarch64_uqdec<mode>): New insn.
24537 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24538             Alan Hayward  <alan.hayward@arm.com>
24539             David Sherwood  <david.sherwood@arm.com>
24541         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
24542         (reduc_xor_scal_optab): New optabs.
24543         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
24544         (reduc_xor_scal_@var{m}): Document.
24545         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
24546         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
24547         internal functions.
24548         * fold-const-call.c (fold_const_call): Handle them.
24549         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
24550         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
24551         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
24552         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
24553         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
24554         (UNSPEC_XORV): New unspecs.
24555         (optab): Add entries for them.
24556         (BITWISEV): New int iterator.
24557         (bit_reduc_op): New int attributes.
24559 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24560             Alan Hayward  <alan.hayward@arm.com>
24561             David Sherwood  <david.sherwood@arm.com>
24563         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
24564         * internal-fn.def (VEC_SHL_INSERT): New internal function.
24565         * optabs.def (vec_shl_insert_optab): New optab.
24566         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
24567         (duplicate_and_interleave): Likewise.
24568         * tree-vect-loop.c: Include internal-fn.h.
24569         (neutral_op_for_slp_reduction): New function, split out from
24570         get_initial_defs_for_reduction.
24571         (get_initial_def_for_reduction): Handle option 2 for variable-length
24572         vectors by loading the neutral value into a vector and then shifting
24573         the initial value into element 0.
24574         (get_initial_defs_for_reduction): Replace the code argument with
24575         the neutral value calculated by neutral_op_for_slp_reduction.
24576         Use gimple_build_vector for constant-length vectors.
24577         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
24578         but the first group_size elements have a neutral value.
24579         Use duplicate_and_interleave otherwise.
24580         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
24581         Update call to get_initial_defs_for_reduction.  Handle SLP
24582         reductions for variable-length vectors by creating one vector
24583         result for each scalar result, with the elements associated
24584         with other scalar results stubbed out with the neutral value.
24585         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
24586         Require IFN_VEC_SHL_INSERT for double reductions on
24587         variable-length vectors, or SLP reductions that have
24588         a neutral value.  Require can_duplicate_and_interleave_p
24589         support for variable-length unchained SLP reductions if there
24590         is no neutral value, such as for MIN/MAX reductions.  Also require
24591         the number of vector elements to be a multiple of the number of
24592         SLP statements when doing variable-length unchained SLP reductions.
24593         Update call to vect_create_epilog_for_reduction.
24594         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
24595         and remove initial values.
24596         (duplicate_and_interleave): Make public.
24597         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
24598         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
24600 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24601             Alan Hayward  <alan.hayward@arm.com>
24602             David Sherwood  <david.sherwood@arm.com>
24604         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
24605         (can_duplicate_and_interleave_p): New function.
24606         (vect_get_and_check_slp_defs): Take the vector of statements
24607         rather than just the current one.  Remove excess parentheses.
24608         Restriction rejectinon of vect_constant_def and vect_external_def
24609         for variable-length vectors to boolean types, or types for which
24610         can_duplicate_and_interleave_p is false.
24611         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
24612         (duplicate_and_interleave): New function.
24613         (vect_get_constant_vectors): Use gimple_build_vector for
24614         constant-length vectors and suitable variable-length constant
24615         vectors.  Use duplicate_and_interleave for other variable-length
24616         vectors.  Don't defer the update when inserting new statements.
24618 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24619             Alan Hayward  <alan.hayward@arm.com>
24620             David Sherwood  <david.sherwood@arm.com>
24622         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
24623         min_profitable_iters doesn't go negative.
24625 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24626             Alan Hayward  <alan.hayward@arm.com>
24627             David Sherwood  <david.sherwood@arm.com>
24629         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
24630         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
24631         * optabs.def (vec_mask_load_lanes_optab): New optab.
24632         (vec_mask_store_lanes_optab): Likewise.
24633         * internal-fn.def (MASK_LOAD_LANES): New internal function.
24634         (MASK_STORE_LANES): Likewise.
24635         * internal-fn.c (mask_load_lanes_direct): New macro.
24636         (mask_store_lanes_direct): Likewise.
24637         (expand_mask_load_optab_fn): Handle masked operations.
24638         (expand_mask_load_lanes_optab_fn): New macro.
24639         (expand_mask_store_optab_fn): Handle masked operations.
24640         (expand_mask_store_lanes_optab_fn): New macro.
24641         (direct_mask_load_lanes_optab_supported_p): Likewise.
24642         (direct_mask_store_lanes_optab_supported_p): Likewise.
24643         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
24644         parameter.
24645         (vect_load_lanes_supported): Likewise.
24646         * tree-vect-data-refs.c (strip_conversion): New function.
24647         (can_group_stmts_p): Likewise.
24648         (vect_analyze_data_ref_accesses): Use it instead of checking
24649         for a pair of assignments.
24650         (vect_store_lanes_supported): Take a masked_p parameter.
24651         (vect_load_lanes_supported): Likewise.
24652         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
24653         vect_store_lanes_supported and vect_load_lanes_supported.
24654         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
24655         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
24656         parameter.  Don't allow gaps for masked accesses.
24657         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
24658         and vect_load_lanes_supported.
24659         (get_load_store_type): Take a masked_p parameter and update
24660         call to get_group_load_store_type.
24661         (vectorizable_store): Update call to get_load_store_type.
24662         Handle IFN_MASK_STORE_LANES.
24663         (vectorizable_load): Update call to get_load_store_type.
24664         Handle IFN_MASK_LOAD_LANES.
24666 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24667             Alan Hayward  <alan.hayward@arm.com>
24668             David Sherwood  <david.sherwood@arm.com>
24670         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
24671         modes for SVE.
24672         * config/aarch64/aarch64-protos.h
24673         (aarch64_sve_struct_memory_operand_p): Declare.
24674         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
24675         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
24676         (VPRED, vpred): Handle SVE structure modes.
24677         * config/aarch64/constraints.md (Utx): New constraint.
24678         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
24679         (aarch64_sve_struct_nonimmediate_operand): New predicates.
24680         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
24681         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
24682         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
24683         structure modes.  Split into pieces after RA.
24684         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
24685         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
24686         New patterns.
24687         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
24688         SVE structure modes.
24689         (aarch64_classify_address): Likewise.
24690         (sizetochar): Move earlier in file.
24691         (aarch64_print_operand): Handle SVE register lists.
24692         (aarch64_array_mode): New function.
24693         (aarch64_sve_struct_memory_operand_p): Likewise.
24694         (TARGET_ARRAY_MODE): Redefine.
24696 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24697             Alan Hayward  <alan.hayward@arm.com>
24698             David Sherwood  <david.sherwood@arm.com>
24700         * target.def (array_mode): New target hook.
24701         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
24702         * doc/tm.texi: Regenerate.
24703         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
24704         * hooks.c (hook_optmode_mode_uhwi_none): New function.
24705         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
24706         targetm.array_mode.
24707         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
24708         type sizes.
24710 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24711             Alan Hayward  <alan.hayward@arm.com>
24712             David Sherwood  <david.sherwood@arm.com>
24714         * fold-const.c (fold_binary_loc): Check the argument types
24715         rather than the result type when testing for a vector operation.
24717 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24719         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
24720         * doc/tm.texi: Regenerate.
24722 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24723             Alan Hayward  <alan.hayward@arm.com>
24724             David Sherwood  <david.sherwood@arm.com>
24726         * doc/invoke.texi (-msve-vector-bits=): Document new option.
24727         (sve): Document new AArch64 extension.
24728         * doc/md.texi (w): Extend the description of the AArch64
24729         constraint to include SVE vectors.
24730         (Upl, Upa): Document new AArch64 predicate constraints.
24731         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
24732         enum.
24733         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
24734         (msve-vector-bits=): New option.
24735         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
24736         SVE when these are disabled.
24737         (sve): New extension.
24738         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
24739         modes.  Adjust their number of units based on aarch64_sve_vg.
24740         (MAX_BITSIZE_MODE_ANY_MODE): Define.
24741         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
24742         aarch64_addr_query_type.
24743         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
24744         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
24745         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
24746         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
24747         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
24748         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
24749         (aarch64_simd_imm_zero_p): Delete.
24750         (aarch64_check_zero_based_sve_index_immediate): Declare.
24751         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24752         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24753         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24754         (aarch64_sve_float_mul_immediate_p): Likewise.
24755         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24756         rather than an rtx.
24757         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
24758         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
24759         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
24760         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
24761         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
24762         (aarch64_regmode_natural_size): Likewise.
24763         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
24764         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
24765         left one place.
24766         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
24767         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
24768         for VG and the SVE predicate registers.
24769         (V_ALIASES): Add a "z"-prefixed alias.
24770         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
24771         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
24772         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
24773         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
24774         (REG_CLASS_NAMES): Add entries for them.
24775         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
24776         and the predicate registers.
24777         (aarch64_sve_vg): Declare.
24778         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
24779         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
24780         (REGMODE_NATURAL_SIZE): Define.
24781         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
24782         SVE macros.
24783         * config/aarch64/aarch64.c: Include cfgrtl.h.
24784         (simd_immediate_info): Add a constructor for series vectors,
24785         and an associated step field.
24786         (aarch64_sve_vg): New variable.
24787         (aarch64_dbx_register_number): Handle VG and the predicate registers.
24788         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
24789         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
24790         (VEC_ANY_DATA, VEC_STRUCT): New constants.
24791         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
24792         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
24793         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
24794         (aarch64_get_mask_mode): New functions.
24795         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
24796         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
24797         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
24798         predicate modes and predicate registers.  Explicitly restrict
24799         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
24800         to store a vector mode if it is recognized by
24801         aarch64_classify_vector_mode.
24802         (aarch64_regmode_natural_size): New function.
24803         (aarch64_hard_regno_caller_save_mode): Return the original mode
24804         for predicates.
24805         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
24806         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
24807         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
24808         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
24809         functions.
24810         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
24811         does not overlap dest if the function is frame-related.  Handle
24812         SVE constants.
24813         (aarch64_split_add_offset): New function.
24814         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
24815         them aarch64_add_offset.
24816         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
24817         and update call to aarch64_sub_sp.
24818         (aarch64_add_cfa_expression): New function.
24819         (aarch64_expand_prologue): Pass extra temporary registers to the
24820         functions above.  Handle the case in which we need to emit new
24821         DW_CFA_expressions for registers that were originally saved
24822         relative to the stack pointer, but now have to be expressed
24823         relative to the frame pointer.
24824         (aarch64_output_mi_thunk): Pass extra temporary registers to the
24825         functions above.
24826         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
24827         IP0 and IP1 values for SVE frames.
24828         (aarch64_expand_vec_series): New function.
24829         (aarch64_expand_sve_widened_duplicate): Likewise.
24830         (aarch64_expand_sve_const_vector): Likewise.
24831         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
24832         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
24833         into the register, rather than emitting a SET directly.
24834         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
24835         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
24836         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
24837         (offset_9bit_signed_scaled_p): New functions.
24838         (aarch64_replicate_bitmask_imm): New function.
24839         (aarch64_bitmask_imm): Use it.
24840         (aarch64_cannot_force_const_mem): Reject expressions involving
24841         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
24842         (aarch64_classify_index): Handle SVE indices, by requiring
24843         a plain register index with a scale that matches the element size.
24844         (aarch64_classify_address): Handle SVE addresses.  Assert that
24845         the mode of the address is VOIDmode or an integer mode.
24846         Update call to aarch64_classify_symbol.
24847         (aarch64_classify_symbolic_expression): Update call to
24848         aarch64_classify_symbol.
24849         (aarch64_const_vec_all_in_range_p): New function.
24850         (aarch64_print_vector_float_operand): Likewise.
24851         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
24852         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
24853         and the FP immediates 1.0 and 0.5.
24854         (aarch64_print_address_internal): Handle SVE addresses.
24855         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
24856         (aarch64_regno_regclass): Handle predicate registers.
24857         (aarch64_secondary_reload): Handle big-endian reloads of SVE
24858         data modes.
24859         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
24860         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
24861         (aarch64_convert_sve_vector_bits): New function.
24862         (aarch64_override_options): Use it to handle -msve-vector-bits=.
24863         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24864         rather than an rtx.
24865         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
24866         Handle SVE vector and predicate modes.  Accept VL-based constants
24867         that need only one temporary register, and VL offsets that require
24868         no temporary registers.
24869         (aarch64_conditional_register_usage): Mark the predicate registers
24870         as fixed if SVE isn't available.
24871         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
24872         Return true for SVE vector and predicate modes.
24873         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
24874         rather than an unsigned int.  Handle SVE modes.
24875         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
24876         SVE modes.
24877         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
24878         if SVE is enabled.
24879         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24880         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24881         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24882         (aarch64_sve_float_mul_immediate_p): New functions.
24883         (aarch64_sve_valid_immediate): New function.
24884         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
24885         Explicitly reject structure modes.  Check for INDEX constants.
24886         Handle PTRUE and PFALSE constants.
24887         (aarch64_check_zero_based_sve_index_immediate): New function.
24888         (aarch64_simd_imm_zero_p): Delete.
24889         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
24890         vector modes.  Accept constants in the range of CNT[BHWD].
24891         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
24892         ask for an Advanced SIMD mode.
24893         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
24894         (aarch64_simd_vector_alignment): Handle SVE predicates.
24895         (aarch64_vectorize_preferred_vector_alignment): New function.
24896         (aarch64_simd_vector_alignment_reachable): Use it instead of
24897         the vector size.
24898         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
24899         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
24900         functions.
24901         (MAX_VECT_LEN): Delete.
24902         (expand_vec_perm_d): Add a vec_flags field.
24903         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
24904         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
24905         (aarch64_evpc_ext): Don't apply a big-endian lane correction
24906         for SVE modes.
24907         (aarch64_evpc_rev): Rename to...
24908         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
24909         (aarch64_evpc_rev_global): New function.
24910         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
24911         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
24912         MAX_VECT_LEN.
24913         (aarch64_evpc_sve_tbl): New function.
24914         (aarch64_expand_vec_perm_const_1): Update after rename of
24915         aarch64_evpc_rev.  Handle SVE permutes too, trying
24916         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
24917         than aarch64_evpc_tbl.
24918         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
24919         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
24920         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
24921         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
24922         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
24923         (aarch64_expand_sve_vcond): New functions.
24924         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
24925         of aarch64_vector_mode_p.
24926         (aarch64_dwarf_poly_indeterminate_value): New function.
24927         (aarch64_compute_pressure_classes): Likewise.
24928         (aarch64_can_change_mode_class): Likewise.
24929         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
24930         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
24931         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
24932         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
24933         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
24934         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
24935         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
24936         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
24937         constraints.
24938         (Dn, Dl, Dr): Accept const as well as const_vector.
24939         (Dz): Likewise.  Compare against CONST0_RTX.
24940         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
24941         of "vector" where appropriate.
24942         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
24943         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
24944         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
24945         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
24946         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
24947         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
24948         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
24949         (v_int_equiv): Extend to SVE modes.
24950         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
24951         mode attributes.
24952         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
24953         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
24954         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
24955         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
24956         (SVE_COND_FP_CMP): New int iterators.
24957         (perm_hilo): Handle the new unpack unspecs.
24958         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
24959         attributes.
24960         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
24961         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
24962         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
24963         (aarch64_equality_operator, aarch64_constant_vector_operand)
24964         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
24965         (aarch64_sve_nonimmediate_operand): Likewise.
24966         (aarch64_sve_general_operand): Likewise.
24967         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
24968         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
24969         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
24970         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
24971         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
24972         (aarch64_sve_float_arith_immediate): Likewise.
24973         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
24974         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
24975         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
24976         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
24977         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
24978         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
24979         (aarch64_sve_float_arith_operand): Likewise.
24980         (aarch64_sve_float_arith_with_sub_operand): Likewise.
24981         (aarch64_sve_float_mul_operand): Likewise.
24982         (aarch64_sve_vec_perm_operand): Likewise.
24983         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
24984         (aarch64_mov_operand): Accept const_poly_int and const_vector.
24985         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
24986         as well as const_vector.
24987         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
24988         in file.  Use CONST0_RTX and CONSTM1_RTX.
24989         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
24990         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
24991         Use aarch64_simd_imm_zero.
24992         * config/aarch64/aarch64-sve.md: New file.
24993         * config/aarch64/aarch64.md: Include it.
24994         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
24995         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
24996         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
24997         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
24998         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
24999         (sve): New attribute.
25000         (enabled): Disable instructions with the sve attribute unless
25001         TARGET_SVE.
25002         (movqi, movhi): Pass CONST_POLY_INT operaneds through
25003         aarch64_expand_mov_immediate.
25004         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
25005         CNT[BHSD] immediates.
25006         (movti): Split CONST_POLY_INT moves into two halves.
25007         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
25008         Split additions that need a temporary here if the destination
25009         is the stack pointer.
25010         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
25011         (*add<mode>3_poly_1): New instruction.
25012         (set_clobber_cc): New expander.
25014 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25016         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
25017         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
25018         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
25019         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
25020         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
25021         Change innermode from fixed_mode_size to machine_mode.
25022         (simplify_subreg): Update call accordingly.  Handle a constant-sized
25023         subreg of a variable-length CONST_VECTOR.
25025 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25026             Alan Hayward  <alan.hayward@arm.com>
25027             David Sherwood  <david.sherwood@arm.com>
25029         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
25030         (add_offset_to_base): New function, split out from...
25031         (create_mem_ref): ...here.  When handling a scale other than 1,
25032         check first whether the address is valid without the offset.
25033         Add it into the base if so, leaving the index and scale as-is.
25035 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
25037         PR c++/83778
25038         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
25039         fold_for_warn before checking if arg2 is INTEGER_CST.
25041 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
25043         * config/rs6000/predicates.md (load_multiple_operation): Delete.
25044         (store_multiple_operation): Delete.
25045         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
25046         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
25047         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
25048         guarded by TARGET_STRING.
25049         (rs6000_output_load_multiple): Delete.
25050         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
25051         OPTION_MASK_STRING / TARGET_STRING handling.
25052         (print_operand) <'N', 'O'>: Add comment that these are unused now.
25053         (const rs6000_opt_masks) <"string">: Change mask to 0.
25054         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
25055         (MASK_STRING): Delete.
25056         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
25057         parts.  Simplify.
25058         (load_multiple): Delete.
25059         (*ldmsi8): Delete.
25060         (*ldmsi7): Delete.
25061         (*ldmsi6): Delete.
25062         (*ldmsi5): Delete.
25063         (*ldmsi4): Delete.
25064         (*ldmsi3): Delete.
25065         (store_multiple): Delete.
25066         (*stmsi8): Delete.
25067         (*stmsi7): Delete.
25068         (*stmsi6): Delete.
25069         (*stmsi5): Delete.
25070         (*stmsi4): Delete.
25071         (*stmsi3): Delete.
25072         (movmemsi_8reg): Delete.
25073         (corresponding unnamed define_insn): Delete.
25074         (movmemsi_6reg): Delete.
25075         (corresponding unnamed define_insn): Delete.
25076         (movmemsi_4reg): Delete.
25077         (corresponding unnamed define_insn): Delete.
25078         (movmemsi_2reg): Delete.
25079         (corresponding unnamed define_insn): Delete.
25080         (movmemsi_1reg): Delete.
25081         (corresponding unnamed define_insn): Delete.
25082         * config/rs6000/rs6000.opt (mno-string): New.
25083         (mstring): Replace by deprecation warning stub.
25084         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
25086 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
25088         * regrename.c (regrename_do_replace): If replacing the same
25089         reg multiple times, try to reuse last created gen_raw_REG.
25091         PR debug/81155
25092         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
25093         main to workaround a bug in GDB.
25095 2018-01-12  Tom de Vries  <tom@codesourcery.com>
25097         PR target/83737
25098         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
25100 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
25102         PR rtl-optimization/80481
25103         * ira-color.c (get_cap_member): New function.
25104         (allocnos_conflict_by_live_ranges_p): Use it.
25105         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
25106         (setup_slot_coalesced_allocno_live_ranges): Ditto.
25108 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
25110         PR target/83628
25111         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
25112         (*saddl_se_1): Ditto.
25113         (*ssubsi_1): Ditto.
25114         (*ssubl_se_1): Ditto.
25116 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
25118         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
25119         rather than wi::to_widest for DR_INITs.
25120         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
25121         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
25122         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
25123         INTEGER_CSTs.
25124         (vect_analyze_group_access_1): Note that here.
25126 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
25128         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
25129         polynomial type sizes.
25131 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
25133         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
25134         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
25135         (gimple_add_tmp_var): Likewise.
25137 2018-01-12  Martin Liska  <mliska@suse.cz>
25139         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
25140         (gimple_alloc_sizes): Likewise.
25141         (dump_gimple_statistics): Use PRIu64 in printf format.
25142         * gimple.h: Change uint64_t to int.
25144 2018-01-12  Martin Liska  <mliska@suse.cz>
25146         * tree-core.h: Use uint64_t instead of int.
25147         * tree.c (tree_node_counts): Likewise.
25148         (tree_node_sizes): Likewise.
25149         (dump_tree_statistics): Use PRIu64 in printf format.
25151 2018-01-12  Martin Liska  <mliska@suse.cz>
25153         * Makefile.in: As qsort_chk is implemented in vec.c, add
25154         vec.o to linkage of gencfn-macros.
25155         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
25156         passing the info to record_node_allocation_statistics.
25157         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
25158         and pass the info.
25159         * ggc-common.c (struct ggc_usage): Add operator== and use
25160         it in operator< and compare function.
25161         * mem-stats.h (struct mem_usage): Likewise.
25162         * vec.c (struct vec_usage): Remove operator< and compare
25163         function. Can be simply inherited.
25165 2018-01-12  Martin Jambor  <mjambor@suse.cz>
25167         PR target/81616
25168         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
25169         * tree-ssa-math-opts.c: Include domwalk.h.
25170         (convert_mult_to_fma_1): New function.
25171         (fma_transformation_info): New type.
25172         (fma_deferring_state): Likewise.
25173         (cancel_fma_deferring): New function.
25174         (result_of_phi): Likewise.
25175         (last_fma_candidate_feeds_initial_phi): Likewise.
25176         (convert_mult_to_fma): Added deferring logic, split actual
25177         transformation to convert_mult_to_fma_1.
25178         (math_opts_dom_walker): New type.
25179         (math_opts_dom_walker::after_dom_children): New method, body moved
25180         here from pass_optimize_widening_mul::execute, added deferring logic
25181         bits.
25182         (pass_optimize_widening_mul::execute): Moved most of code to
25183         math_opts_dom_walker::after_dom_children.
25184         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
25185         * config/i386/i386.c (ix86_option_override_internal): Added
25186         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
25188 2018-01-12  Richard Biener  <rguenther@suse.de>
25190         PR debug/83157
25191         * dwarf2out.c (gen_variable_die): Do not reset old_die for
25192         inline instance vars.
25194 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
25196         PR target/81819
25197         * config/rx/rx.c (rx_is_restricted_memory_address):
25198         Handle SUBREG case.
25200 2018-01-12  Richard Biener  <rguenther@suse.de>
25202         PR tree-optimization/80846
25203         * target.def (split_reduction): New target hook.
25204         * targhooks.c (default_split_reduction): New function.
25205         * targhooks.h (default_split_reduction): Declare.
25206         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
25207         target requests first reduce vectors by combining low and high
25208         parts.
25209         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
25210         (get_vectype_for_scalar_type_and_size): Export.
25211         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
25212         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
25213         * doc/tm.texi: Regenerate.
25214         * config/i386/i386.c (ix86_split_reduction): Implement
25215         TARGET_VECTORIZE_SPLIT_REDUCTION.
25217 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
25219         PR target/83368
25220         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
25221         in PIC mode except for TARGET_VXWORKS_RTP.
25222         * config/sparc/sparc.c: Include cfgrtl.h.
25223         (TARGET_INIT_PIC_REG): Define.
25224         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
25225         (sparc_pic_register_p): New predicate.
25226         (sparc_legitimate_address_p): Use it.
25227         (sparc_legitimize_pic_address): Likewise.
25228         (sparc_delegitimize_address): Likewise.
25229         (sparc_mode_dependent_address_p): Likewise.
25230         (gen_load_pcrel_sym): Remove 4th parameter.
25231         (load_got_register): Adjust call to above.  Remove obsolete stuff.
25232         (sparc_expand_prologue): Do not call load_got_register here.
25233         (sparc_flat_expand_prologue): Likewise.
25234         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
25235         (sparc_use_pseudo_pic_reg): New function.
25236         (sparc_init_pic_reg): Likewise.
25237         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25238         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
25240 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
25242         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25243         Add item for branch_cost.
25245 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
25247         PR rtl-optimization/83565
25248         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
25249         not extend the result to a larger mode for rotate operations.
25250         (num_sign_bit_copies1): Likewise.
25252 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25254         PR target/40411
25255         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
25256         -symbolic.
25257         Use values-Xc.o for -pedantic.
25258         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
25260 2018-01-12  Martin Liska  <mliska@suse.cz>
25262         PR ipa/83054
25263         * ipa-devirt.c (final_warning_record::grow_type_warnings):
25264         New function.
25265         (possible_polymorphic_call_targets): Use it.
25266         (ipa_devirt): Likewise.
25268 2018-01-12  Martin Liska  <mliska@suse.cz>
25270         * profile-count.h (enum profile_quality): Use 0 as invalid
25271         enum value of profile_quality.
25273 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
25275         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
25276         -mext-string options.
25278 2018-01-12  Richard Biener  <rguenther@suse.de>
25280         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
25281         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
25282         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
25283         Likewise.
25284         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
25286 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
25288         * configure.ac (--with-long-double-format): Add support for the
25289         configuration option to change the default long double format on
25290         PowerPC systems.
25291         * config.gcc (powerpc*-linux*-*): Likewise.
25292         * configure: Regenerate.
25293         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
25294         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
25295         used without modification.
25297 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25299         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
25300         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
25301         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
25302         MISC_BUILTIN_SPEC_BARRIER.
25303         (rs6000_init_builtins): Likewise.
25304         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
25305         enum value.
25306         (speculation_barrier): New define_insn.
25307         * doc/extend.texi: Document __builtin_speculation_barrier.
25309 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
25311         PR target/83203
25312         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
25313         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
25314         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
25315         iterators.
25316         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
25317         integral modes instead of "ss" and "sd".
25318         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
25319         vectors with 32-bit and 64-bit elements.
25320         (vecdupssescalarmodesuffix): New mode attribute.
25321         (vec_dup<mode>): Use it.
25323 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
25325         PR target/83330
25326         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
25327         frame if argument is passed on stack.
25329 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
25331         PR target/82682
25332         * ree.c (combine_reaching_defs): Optimize also
25333         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
25334         reg2=any_extend(exp); reg1=reg2;, formatting fix.
25336 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
25338         PR middle-end/83189
25339         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
25341 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
25343         PR middle-end/83718
25344         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
25345         after they are computed.
25347 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
25349         PR tree-optimization/83695
25350         * gimple-loop-linterchange.cc
25351         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
25352         reset cached scev information after interchange.
25353         (pass_linterchange::execute): Remove call to scev_reset_htab.
25355 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25357         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
25358         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
25359         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
25360         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
25361         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
25362         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
25363         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
25364         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
25365         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
25366         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
25367         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
25368         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
25369         (V_lane_reg): Likewise.
25370         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
25371         New define_expand.
25372         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
25373         (vfmal_lane_low<mode>_intrinsic,
25374         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
25375         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
25376         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
25377         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
25378         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
25379         vfmsl_lane_high<mode>_intrinsic): New define_insns.
25381 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25383         * config/arm/arm-cpus.in (fp16fml): New feature.
25384         (ALL_SIMD): Add fp16fml.
25385         (armv8.2-a): Add fp16fml as an option.
25386         (armv8.3-a): Likewise.
25387         (armv8.4-a): Add fp16fml as part of fp16.
25388         * config/arm/arm.h (TARGET_FP16FML): Define.
25389         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
25390         when appropriate.
25391         * config/arm/arm-modes.def (V2HF): Define.
25392         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
25393         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
25394         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
25395         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
25396         vfmsl_low, vfmsl_high): New set of builtins.
25397         * config/arm/iterators.md (PLUSMINUS): New code iterator.
25398         (vfml_op): New code attribute.
25399         (VFMLHALVES): New int iterator.
25400         (VFML, VFMLSEL): New mode attributes.
25401         (V_reg): Define mapping for V2HF.
25402         (V_hi, V_lo): New mode attributes.
25403         (VF_constraint): Likewise.
25404         (vfml_half, vfml_half_selector): New int attributes.
25405         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
25406         define_expand.
25407         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
25408         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
25409         New define_insn.
25410         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
25411         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
25412         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
25413         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
25414         documentation.
25415         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
25416         Document new effective target and option set.
25418 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25420         * config/arm/arm-cpus.in (armv8_4): New feature.
25421         (ARMv8_4a): New fgroup.
25422         (armv8.4-a): New arch.
25423         * config/arm/arm-tables.opt: Regenerate.
25424         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
25425         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
25426         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
25427         Add matching rules for -march=armv8.4-a and extensions.
25428         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
25430 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
25432         PR target/81821
25433         * config/rx/rx.md (BW): New mode attribute.
25434         (sync_lock_test_and_setsi): Add mode suffix to insn output.
25436 2018-01-11  Richard Biener  <rguenther@suse.de>
25438         PR tree-optimization/83435
25439         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
25440         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
25441         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
25443 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25444             Alan Hayward  <alan.hayward@arm.com>
25445             David Sherwood  <david.sherwood@arm.com>
25447         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
25448         field.
25449         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
25450         (aarch64_print_address_internal): Use it to check for a zero offset.
25452 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25453             Alan Hayward  <alan.hayward@arm.com>
25454             David Sherwood  <david.sherwood@arm.com>
25456         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
25457         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
25458         Return a poly_int64 rather than a HOST_WIDE_INT.
25459         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
25460         rather than a HOST_WIDE_INT.
25461         * config/aarch64/aarch64.h (aarch64_frame): Protect with
25462         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
25463         hard_fp_offset, frame_size, initial_adjust, callee_offset and
25464         final_offset from HOST_WIDE_INT to poly_int64.
25465         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
25466         to_constant when getting the number of units in an Advanced SIMD
25467         mode.
25468         (aarch64_builtin_vectorized_function): Check for a constant number
25469         of units.
25470         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
25471         GET_MODE_SIZE.
25472         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
25473         attribute instead of GET_MODE_NUNITS.
25474         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
25475         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
25476         GET_MODE_SIZE for fixed-size registers.
25477         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
25478         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
25479         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
25480         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
25481         (aarch64_print_operand, aarch64_print_address_internal)
25482         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
25483         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
25484         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
25485         Handle polynomial GET_MODE_SIZE.
25486         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
25487         wider than SImode without modification.
25488         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
25489         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
25490         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
25491         passing and returning SVE modes.
25492         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
25493         rather than GEN_INT.
25494         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
25495         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
25496         (aarch64_allocate_and_probe_stack_space): Likewise.
25497         (aarch64_layout_frame): Cope with polynomial offsets.
25498         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
25499         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
25500         polynomial offsets.
25501         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
25502         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
25503         poly_int64 rather than a HOST_WIDE_INT.
25504         (aarch64_get_separate_components, aarch64_process_components)
25505         (aarch64_expand_prologue, aarch64_expand_epilogue)
25506         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
25507         (aarch64_anchor_offset): New function, split out from...
25508         (aarch64_legitimize_address): ...here.
25509         (aarch64_builtin_vectorization_cost): Handle polynomial
25510         TYPE_VECTOR_SUBPARTS.
25511         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
25512         GET_MODE_NUNITS.
25513         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
25514         number of elements from the PARALLEL rather than the mode.
25515         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
25516         rather than GET_MODE_BITSIZE.
25517         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
25518         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
25519         (aarch64_expand_vec_perm_const_1): Handle polynomial
25520         d->perm.length () and d->perm elements.
25521         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
25522         Apply to_constant to d->perm elements.
25523         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
25524         polynomial CONST_VECTOR_NUNITS.
25525         (aarch64_move_pointer): Take amount as a poly_int64 rather
25526         than an int.
25527         (aarch64_progress_pointer): Avoid temporary variable.
25528         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
25529         the mode attribute instead of GET_MODE.
25531 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25532             Alan Hayward  <alan.hayward@arm.com>
25533             David Sherwood  <david.sherwood@arm.com>
25535         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
25536         x exists before using it.
25537         (aarch64_add_constant_internal): Rename to...
25538         (aarch64_add_offset_1): ...this.  Replace regnum with separate
25539         src and dest rtxes.  Handle the case in which they're different,
25540         including when the offset is zero.  Replace scratchreg with an rtx.
25541         Use 2 additions if there is no spare register into which we can
25542         move a 16-bit constant.
25543         (aarch64_add_constant): Delete.
25544         (aarch64_add_offset): Replace reg with separate src and dest
25545         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
25546         Use aarch64_add_offset_1.
25547         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
25548         an rtx rather than an int.  Take the delta as a poly_int64
25549         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
25550         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
25551         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
25552         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
25553         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
25554         and aarch64_add_sp.
25555         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
25556         aarch64_add_constant.
25558 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25560         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
25561         Use scalar_float_mode.
25563 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25565         * config/aarch64/aarch64-simd.md
25566         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
25567         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
25568         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
25569         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
25570         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
25571         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
25572         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
25573         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
25574         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
25575         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
25577 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
25579         PR target/83514
25580         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
25581         targ_options->x_arm_arch_string is non NULL.
25583 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
25585         * config/aarch64/aarch64.h
25586         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
25588 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
25590         PR target/82096
25591         * expmed.c (emit_store_flag_force): Swap if const op0
25592         and change VOIDmode to mode of op0.
25594 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25596         PR rtl-optimization/83761
25597         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
25598         than bytes to mode_for_size.
25600 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
25602         PR middle-end/83189
25603         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
25604         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
25605         profile.
25607 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
25609         PR middle-end/83575
25610         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
25611         when in layout mode.
25612         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
25613         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
25614         partition fixup.
25616 2018-01-10  Michael Collison  <michael.collison@arm.com>
25618         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
25619         * config/aarch64/aarch64-option-extension.def: Add
25620         AARCH64_OPT_EXTENSION of 'fp16fml'.
25621         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25622         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
25623         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
25624         * config/aarch64/constraints.md (Ui7): New constraint.
25625         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
25626         (VFMLA_SEL_W): Ditto.
25627         (f16quad): Ditto.
25628         (f16mac1): Ditto.
25629         (VFMLA16_LOW): New int iterator.
25630         (VFMLA16_HIGH): Ditto.
25631         (UNSPEC_FMLAL): New unspec.
25632         (UNSPEC_FMLSL): Ditto.
25633         (UNSPEC_FMLAL2): Ditto.
25634         (UNSPEC_FMLSL2): Ditto.
25635         (f16mac): New code attribute.
25636         * config/aarch64/aarch64-simd-builtins.def
25637         (aarch64_fmlal_lowv2sf): Ditto.
25638         (aarch64_fmlsl_lowv2sf): Ditto.
25639         (aarch64_fmlalq_lowv4sf): Ditto.
25640         (aarch64_fmlslq_lowv4sf): Ditto.
25641         (aarch64_fmlal_highv2sf): Ditto.
25642         (aarch64_fmlsl_highv2sf): Ditto.
25643         (aarch64_fmlalq_highv4sf): Ditto.
25644         (aarch64_fmlslq_highv4sf): Ditto.
25645         (aarch64_fmlal_lane_lowv2sf): Ditto.
25646         (aarch64_fmlsl_lane_lowv2sf): Ditto.
25647         (aarch64_fmlal_laneq_lowv2sf): Ditto.
25648         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
25649         (aarch64_fmlalq_lane_lowv4sf): Ditto.
25650         (aarch64_fmlsl_lane_lowv4sf): Ditto.
25651         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
25652         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
25653         (aarch64_fmlal_lane_highv2sf): Ditto.
25654         (aarch64_fmlsl_lane_highv2sf): Ditto.
25655         (aarch64_fmlal_laneq_highv2sf): Ditto.
25656         (aarch64_fmlsl_laneq_highv2sf): Ditto.
25657         (aarch64_fmlalq_lane_highv4sf): Ditto.
25658         (aarch64_fmlsl_lane_highv4sf): Ditto.
25659         (aarch64_fmlalq_laneq_highv4sf): Ditto.
25660         (aarch64_fmlsl_laneq_highv4sf): Ditto.
25661         * config/aarch64/aarch64-simd.md:
25662         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
25663         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25664         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
25665         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25666         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
25667         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
25668         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
25669         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
25670         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
25671         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
25672         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
25673         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
25674         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
25675         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
25676         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
25677         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
25678         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
25679         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
25680         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
25681         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
25682         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
25683         (vfmlsl_low_u32): Ditto.
25684         (vfmlalq_low_u32): Ditto.
25685         (vfmlslq_low_u32): Ditto.
25686         (vfmlal_high_u32): Ditto.
25687         (vfmlsl_high_u32): Ditto.
25688         (vfmlalq_high_u32): Ditto.
25689         (vfmlslq_high_u32): Ditto.
25690         (vfmlal_lane_low_u32): Ditto.
25691         (vfmlsl_lane_low_u32): Ditto.
25692         (vfmlal_laneq_low_u32): Ditto.
25693         (vfmlsl_laneq_low_u32): Ditto.
25694         (vfmlalq_lane_low_u32): Ditto.
25695         (vfmlslq_lane_low_u32): Ditto.
25696         (vfmlalq_laneq_low_u32): Ditto.
25697         (vfmlslq_laneq_low_u32): Ditto.
25698         (vfmlal_lane_high_u32): Ditto.
25699         (vfmlsl_lane_high_u32): Ditto.
25700         (vfmlal_laneq_high_u32): Ditto.
25701         (vfmlsl_laneq_high_u32): Ditto.
25702         (vfmlalq_lane_high_u32): Ditto.
25703         (vfmlslq_lane_high_u32): Ditto.
25704         (vfmlalq_laneq_high_u32): Ditto.
25705         (vfmlslq_laneq_high_u32): Ditto.
25706         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
25707         (AARCH64_FL_FOR_ARCH8_4): New.
25708         (AARCH64_ISA_F16FML): New ISA flag.
25709         (TARGET_F16FML): New feature flag for fp16fml.
25710         (doc/invoke.texi): Document new fp16fml option.
25712 2018-01-10  Michael Collison  <michael.collison@arm.com>
25714         * config/aarch64/aarch64-builtins.c:
25715         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
25716         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25717         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
25718         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
25719         (AARCH64_ISA_SHA3): New ISA flag.
25720         (TARGET_SHA3): New feature flag for sha3.
25721         * config/aarch64/iterators.md (sha512_op): New int attribute.
25722         (CRYPTO_SHA512): New int iterator.
25723         (UNSPEC_SHA512H): New unspec.
25724         (UNSPEC_SHA512H2): Ditto.
25725         (UNSPEC_SHA512SU0): Ditto.
25726         (UNSPEC_SHA512SU1): Ditto.
25727         * config/aarch64/aarch64-simd-builtins.def
25728         (aarch64_crypto_sha512hqv2di): New builtin.
25729         (aarch64_crypto_sha512h2qv2di): Ditto.
25730         (aarch64_crypto_sha512su0qv2di): Ditto.
25731         (aarch64_crypto_sha512su1qv2di): Ditto.
25732         (aarch64_eor3qv8hi): Ditto.
25733         (aarch64_rax1qv2di): Ditto.
25734         (aarch64_xarqv2di): Ditto.
25735         (aarch64_bcaxqv8hi): Ditto.
25736         * config/aarch64/aarch64-simd.md:
25737         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
25738         (aarch64_crypto_sha512su0qv2di): Ditto.
25739         (aarch64_crypto_sha512su1qv2di): Ditto.
25740         (aarch64_eor3qv8hi): Ditto.
25741         (aarch64_rax1qv2di): Ditto.
25742         (aarch64_xarqv2di): Ditto.
25743         (aarch64_bcaxqv8hi): Ditto.
25744         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
25745         (vsha512h2q_u64): Ditto.
25746         (vsha512su0q_u64): Ditto.
25747         (vsha512su1q_u64): Ditto.
25748         (veor3q_u16): Ditto.
25749         (vrax1q_u64): Ditto.
25750         (vxarq_u64): Ditto.
25751         (vbcaxq_u16): Ditto.
25752         * config/arm/types.md (crypto_sha512): New type attribute.
25753         (crypto_sha3): Ditto.
25754         (doc/invoke.texi): Document new sha3 option.
25756 2018-01-10  Michael Collison  <michael.collison@arm.com>
25758         * config/aarch64/aarch64-builtins.c:
25759         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
25760         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25761         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
25762         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
25763         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
25764         (AARCH64_ISA_SM4): New ISA flag.
25765         (TARGET_SM4): New feature flag for sm4.
25766         * config/aarch64/aarch64-simd-builtins.def
25767         (aarch64_sm3ss1qv4si): Ditto.
25768         (aarch64_sm3tt1aq4si): Ditto.
25769         (aarch64_sm3tt1bq4si): Ditto.
25770         (aarch64_sm3tt2aq4si): Ditto.
25771         (aarch64_sm3tt2bq4si): Ditto.
25772         (aarch64_sm3partw1qv4si): Ditto.
25773         (aarch64_sm3partw2qv4si): Ditto.
25774         (aarch64_sm4eqv4si): Ditto.
25775         (aarch64_sm4ekeyqv4si): Ditto.
25776         * config/aarch64/aarch64-simd.md:
25777         (aarch64_sm3ss1qv4si): Ditto.
25778         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
25779         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
25780         (aarch64_sm4eqv4si): Ditto.
25781         (aarch64_sm4ekeyqv4si): Ditto.
25782         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
25783         (sm3part_op): Ditto.
25784         (CRYPTO_SM3TT): Ditto.
25785         (CRYPTO_SM3PART): Ditto.
25786         (UNSPEC_SM3SS1): New unspec.
25787         (UNSPEC_SM3TT1A): Ditto.
25788         (UNSPEC_SM3TT1B): Ditto.
25789         (UNSPEC_SM3TT2A): Ditto.
25790         (UNSPEC_SM3TT2B): Ditto.
25791         (UNSPEC_SM3PARTW1): Ditto.
25792         (UNSPEC_SM3PARTW2): Ditto.
25793         (UNSPEC_SM4E): Ditto.
25794         (UNSPEC_SM4EKEY): Ditto.
25795         * config/aarch64/constraints.md (Ui2): New constraint.
25796         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
25797         * config/arm/types.md (crypto_sm3): New type attribute.
25798         (crypto_sm4): Ditto.
25799         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
25800         (vsm3tt1aq_u32): Ditto.
25801         (vsm3tt1bq_u32): Ditto.
25802         (vsm3tt2aq_u32): Ditto.
25803         (vsm3tt2bq_u32): Ditto.
25804         (vsm3partw1q_u32): Ditto.
25805         (vsm3partw2q_u32): Ditto.
25806         (vsm4eq_u32): Ditto.
25807         (vsm4ekeyq_u32): Ditto.
25808         (doc/invoke.texi): Document new sm4 option.
25810 2018-01-10  Michael Collison  <michael.collison@arm.com>
25812         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
25813         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
25814         (AARCH64_FL_FOR_ARCH8_4): New.
25815         (AARCH64_FL_V8_4): New flag.
25816         (doc/invoke.texi): Document new armv8.4-a option.
25818 2018-01-10  Michael Collison  <michael.collison@arm.com>
25820         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25821         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
25822         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
25823         * config/aarch64/aarch64-option-extension.def: Add
25824         AARCH64_OPT_EXTENSION of 'sha2'.
25825         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
25826         (crypto): Disable sha2 and aes if crypto disabled.
25827         (crypto): Enable aes and sha2 if enabled.
25828         (simd): Disable sha2 and aes if simd disabled.
25829         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
25830         New flags.
25831         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
25832         (TARGET_SHA2): New feature flag for sha2.
25833         (TARGET_AES): New feature flag for aes.
25834         * config/aarch64/aarch64-simd.md:
25835         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
25836         conditional on TARGET_AES.
25837         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
25838         (aarch64_crypto_sha1hsi): Make pattern conditional
25839         on TARGET_SHA2.
25840         (aarch64_crypto_sha1hv4si): Ditto.
25841         (aarch64_be_crypto_sha1hv4si): Ditto.
25842         (aarch64_crypto_sha1su1v4si): Ditto.
25843         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
25844         (aarch64_crypto_sha1su0v4si): Ditto.
25845         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
25846         (aarch64_crypto_sha256su0v4si): Ditto.
25847         (aarch64_crypto_sha256su1v4si): Ditto.
25848         (doc/invoke.texi): Document new aes and sha2 options.
25850 2018-01-10  Martin Sebor  <msebor@redhat.com>
25852         PR tree-optimization/83781
25853         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
25854         as string arrays.
25856 2018-01-11  Martin Sebor  <msebor@gmail.com>
25857             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
25859         PR tree-optimization/83501
25860         PR tree-optimization/81703
25862         * tree-ssa-strlen.c (get_string_cst): Rename...
25863         (get_string_len): ...to this.  Handle global constants.
25864         (handle_char_store): Adjust.
25866 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
25867             Jim Wilson  <jimw@sifive.com>
25869         * config/riscv/riscv-protos.h (riscv_output_return): New.
25870         * config/riscv/riscv.c (struct machine_function): New naked_p field.
25871         (riscv_attribute_table, riscv_output_return),
25872         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
25873         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
25874         (riscv_compute_frame_info): Only compute frame->mask if not a naked
25875         function.
25876         (riscv_expand_prologue): Add early return for naked function.
25877         (riscv_expand_epilogue): Likewise.
25878         (riscv_function_ok_for_sibcall): Return false for naked function.
25879         (riscv_set_current_function): New.
25880         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
25881         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
25882         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
25883         * doc/extend.texi (RISC-V Function Attributes): New.
25885 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
25887         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
25888         check for 128-bit long double before checking TCmode.
25889         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
25890         128-bit long doubles before checking TFmode or TCmode.
25891         (FLOAT128_IBM_P): Likewise.
25893 2018-01-10  Martin Sebor  <msebor@redhat.com>
25895         PR tree-optimization/83671
25896         * builtins.c (c_strlen): Unconditionally return zero for the empty
25897         string.
25898         Use -Warray-bounds for warnings.
25899         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
25900         for non-constant array indices with COMPONENT_REF, arrays of
25901         arrays, and pointers to arrays.
25902         (gimple_fold_builtin_strlen): Determine and set length range for
25903         non-constant character arrays.
25905 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
25907         PR middle-end/81897
25908         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
25909         empty blocks.
25911 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
25913         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
25915 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
25917         PR target/83399
25918         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
25919         VECTOR_MEM_ALTIVEC_OR_VSX_P.
25920         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
25921         indexed_or_indirect_operand predicate.
25922         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
25923         (*vsx_le_perm_load_v8hi): Likewise.
25924         (*vsx_le_perm_load_v16qi): Likewise.
25925         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
25926         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
25927         (*vsx_le_perm_store_v8hi): Likewise.
25928         (*vsx_le_perm_store_v16qi): Likewise.
25929         (eight unnamed splitters): Likewise.
25931 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
25933         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
25934         * config/rs6000/emmintrin.h: Likewise.
25935         * config/rs6000/mmintrin.h: Likewise.
25936         * config/rs6000/xmmintrin.h: Likewise.
25938 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
25940         PR c++/43486
25941         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
25942         "public_flag".
25943         * tree.c (tree_nop_conversion): Return true for location wrapper
25944         nodes.
25945         (maybe_wrap_with_location): New function.
25946         (selftest::check_strip_nops): New function.
25947         (selftest::test_location_wrappers): New function.
25948         (selftest::tree_c_tests): Call it.
25949         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
25950         (maybe_wrap_with_location): New decl.
25951         (EXPR_LOCATION_WRAPPER_P): New macro.
25952         (location_wrapper_p): New inline function.
25953         (tree_strip_any_location_wrapper): New inline function.
25955 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
25957         PR target/83735
25958         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
25959         stack_realign_offset for the largest alignment of stack slot
25960         actually used.
25961         (ix86_find_max_used_stack_alignment): New function.
25962         (ix86_finalize_stack_frame_flags): Use it.  Set
25963         max_used_stack_alignment if we don't realign stack.
25964         * config/i386/i386.h (machine_function): Add
25965         max_used_stack_alignment.
25967 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
25969         * config/arm/arm.opt (-mbranch-cost): New option.
25970         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
25971         account.
25973 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
25975         PR target/83629
25976         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
25977         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
25979 2018-01-10  Richard Biener  <rguenther@suse.de>
25981         PR debug/83765
25982         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
25983         early out so it also covers the case where we have a non-NULL
25984         origin.
25986 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
25988         PR tree-optimization/83753
25989         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
25990         for non-strided grouped accesses if the number of elements is 1.
25992 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
25994         PR target/81616
25995         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
25996         * i386.h (TARGET_USE_GATHER): Define.
25997         * x86-tune.def (X86_TUNE_USE_GATHER): New.
25999 2018-01-10  Martin Liska  <mliska@suse.cz>
26001         PR bootstrap/82831
26002         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
26003         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
26004         partitioning.
26005         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
26006         CLEANUP_NO_PARTITIONING is not set.
26008 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
26010         * doc/rtl.texi: Remove documentation of (const ...) wrappers
26011         for vectors, as a partial revert of r254296.
26012         * rtl.h (const_vec_p): Delete.
26013         (const_vec_duplicate_p): Don't test for vector CONSTs.
26014         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
26015         * expmed.c (make_tree): Likewise.
26017         Revert:
26018         * common.md (E, F): Use CONSTANT_P instead of checking for
26019         CONST_VECTOR.
26020         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
26021         checking for CONST_VECTOR.
26023 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
26025         PR middle-end/83575
26026         * predict.c (force_edge_cold): Handle in more sane way edges
26027         with no prediction.
26029 2018-01-09  Carl Love  <cel@us.ibm.com>
26031         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
26032         V4SI, V4SF types.
26033         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
26034         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
26035         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
26036         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
26037         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
26038         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
26039         * config/rs6000/rs6000-protos.h: Add extern defition for
26040         rs6000_generate_float2_double_code.
26041         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
26042         function.
26043         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
26044         (float2_v2df): Add define_expand.
26046 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
26048         PR target/83628
26049         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
26050         op_mode in the force_to_mode call.
26052 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
26054         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
26055         instead of checking each element individually.
26056         (aarch64_evpc_uzp): Likewise.
26057         (aarch64_evpc_zip): Likewise.
26058         (aarch64_evpc_ext): Likewise.
26059         (aarch64_evpc_rev): Likewise.
26060         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
26061         instead of checking each element individually.  Return true without
26062         generating rtl if
26063         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
26064         whether all selected elements come from the same input, instead of
26065         checking each element individually.  Remove calls to gen_rtx_REG,
26066         start_sequence and end_sequence and instead assert that no rtl is
26067         generated.
26069 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
26071         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
26072         order of HIGH and CONST checks.
26074 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
26076         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
26077         if the destination isn't an SSA_NAME.
26079 2018-01-09  Richard Biener  <rguenther@suse.de>
26081         PR tree-optimization/83668
26082         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
26083         move prologue...
26084         (canonicalize_loop_form): ... here, renamed from ...
26085         (canonicalize_loop_closed_ssa_form): ... this and amended to
26086         swap successor edges for loop exit blocks to make us use
26087         the RPO order we need for initial schedule generation.
26089 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
26091         PR tree-optimization/64811
26092         * match.pd: When optimizing comparisons with Inf, avoid
26093         introducing or losing exceptions from comparisons with NaN.
26095 2018-01-09  Martin Liska  <mliska@suse.cz>
26097         PR sanitizer/82517
26098         * asan.c (shadow_mem_size): Add gcc_assert.
26100 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
26102         Don't save registers in main().
26104         PR target/83738
26105         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
26106         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
26107         * config/avr/avr.c (avr_set_current_function): Don't error if
26108         naked, OS_task or OS_main are specified at the same time.
26109         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
26110         OS_main.
26111         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
26112         attribute.
26113         * common/config/avr/avr-common.c (avr_option_optimization_table):
26114         Switch on -mmain-is-OS_task for optimizing compilations.
26116 2018-01-09  Richard Biener  <rguenther@suse.de>
26118         PR tree-optimization/83572
26119         * graphite.c: Include cfganal.h.
26120         (graphite_transform_loops): Connect infinite loops to exit
26121         and remove fake edges at the end.
26123 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
26125         * ipa-inline.c (edge_badness): Revert accidental checkin.
26127 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
26129         PR ipa/80763
26130         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
26131         symbols; not inline clones.
26133 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
26135         PR target/83507
26136         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
26137         hard registers.  Formatting fixes.
26139         PR preprocessor/83722
26140         * gcc.c (try_generate_repro): Pass
26141         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
26142         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
26143         do_report_bug.
26145 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
26146             Kito Cheng  <kito.cheng@gmail.com>
26148         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
26149         (riscv_leaf_function_p): Delete.
26150         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
26152 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26154         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
26155         function.
26156         (do_ifelse): New function.
26157         (do_isel): New function.
26158         (do_sub3): New function.
26159         (do_add3): New function.
26160         (do_load_mask_compare): New function.
26161         (do_overlap_load_compare): New function.
26162         (expand_compare_loop): New function.
26163         (expand_block_compare): Call expand_compare_loop() when appropriate.
26164         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
26165         option description.
26166         (-mblock-compare-inline-loop-limit): New option.
26168 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26170         PR target/83677
26171         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
26172         Reverse order of second and third operands in first alternative.
26173         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
26174         of first and second elements in UNSPEC_VPERMR vector.
26175         (altivec_expand_vec_perm_le): Likewise.
26177 2018-01-08  Jeff Law  <law@redhat.com>
26179         PR rtl-optimizatin/81308
26180         * tree-switch-conversion.c (cfg_altered): New file scoped static.
26181         (process_switch): If group_case_labels makes a change, then set
26182         cfg_altered.
26183         (pass_convert_switch::execute): If a switch is converted, then
26184         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
26186         PR rtl-optimization/81308
26187         * recog.c (split_all_insns): Conditionally cleanup the CFG after
26188         splitting insns.
26190 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
26192         PR target/83663 - Revert r255946
26193         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
26194         generation for cases where splatting a value is not useful.
26195         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
26196         across a vec_duplicate and a paradoxical subreg forming a vector
26197         mode to a vec_concat.
26199 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26201         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
26202         -march=armv8.3-a variants.
26203         * config/arm/t-multilib: Likewise.
26204         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
26206 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26208         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
26209         to generate rtl.
26210         (cceq_ior_compare_complement): Give it a name so I can use it, and
26211         change boolean_or_operator predicate to boolean_operator so it can
26212         be used to generate a crand.
26213         (eqne): New code iterator.
26214         (bd/bd_neg): New code_attrs.
26215         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
26216         a single define_insn.
26217         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
26218         decrement (bdnzt/bdnzf/bdzt/bdzf).
26219         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
26220         with the new names of the branch decrement patterns, and added the
26221         names of the branch decrement conditional patterns.
26223 2018-01-08  Richard Biener  <rguenther@suse.de>
26225         PR tree-optimization/83563
26226         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
26227         cache.
26229 2018-01-08  Richard Biener  <rguenther@suse.de>
26231         PR middle-end/83713
26232         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
26234 2018-01-08  Richard Biener  <rguenther@suse.de>
26236         PR tree-optimization/83685
26237         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
26238         references to abnormals.
26240 2018-01-08  Richard Biener  <rguenther@suse.de>
26242         PR lto/83719
26243         * dwarf2out.c (output_indirect_strings): Handle empty
26244         skeleton_debug_str_hash.
26245         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
26247 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
26249         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
26250         (emit_store_direct): Likewise.
26251         (arc_trampoline_adjust_address): Likewise.
26252         (arc_asm_trampoline_template): New function.
26253         (arc_initialize_trampoline): Use asm_trampoline_template.
26254         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
26255         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
26256         * config/arc/arc.md (flush_icache): Delete pattern.
26258 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
26260         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
26261         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
26262         munaligned-access.
26264 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26266         PR target/83681
26267         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
26268         by not USED_FOR_TARGET.
26269         (make_pass_resolve_sw_modes): Likewise.
26271 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26273         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
26274         USED_FOR_TARGET.
26276 2018-01-08  Richard Biener  <rguenther@suse.de>
26278         PR middle-end/83580
26279         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
26281 2018-01-08  Richard Biener  <rguenther@suse.de>
26283         PR middle-end/83517
26284         * match.pd ((t * 2) / 2) -> t): Add missing :c.
26286 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
26288         PR middle-end/81897
26289         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
26290         basic blocks with a small number of successors.
26291         (convert_control_dep_chain_into_preds): Improve handling of
26292         forwarder blocks.
26293         (dump_predicates): Split apart into...
26294         (dump_pred_chain): ...here...
26295         (dump_pred_info): ...and here.
26296         (can_one_predicate_be_invalidated_p): Add debugging printfs.
26297         (can_chain_union_be_invalidated_p): Improve check for invalidation
26298         of paths.
26299         (uninit_uses_cannot_happen): Avoid unnecessary if
26300         convert_control_dep_chain_into_preds yielded nothing.
26302 2018-01-06  Martin Sebor  <msebor@redhat.com>
26304         PR tree-optimization/83640
26305         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
26306         subtracting negative offset from size.
26307         (builtin_access::overlap): Adjust offset bounds of the access to fall
26308         within the size of the object if possible.
26310 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
26312         PR rtl-optimization/83699
26313         * expmed.c (extract_bit_field_1): Restrict the vector usage of
26314         extract_bit_field_as_subreg to cases in which the extracted
26315         value is also a vector.
26317         * lra-constraints.c (process_alt_operands): Test for the equivalence
26318         substitutions when detecting a possible reload cycle.
26320 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
26322         PR debug/83480
26323         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
26324         by default if flag_selective_schedling{,2}.  Formatting fixes.
26326         PR rtl-optimization/83682
26327         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
26328         if it has non-VECTOR_MODE element mode.
26329         (vec_duplicate_p): Likewise.
26331         PR middle-end/83694
26332         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
26333         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
26335 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
26337         PR target/83604
26338         * config/i386/i386-builtin.def
26339         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
26340         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
26341         Require also OPTION_MASK_ISA_AVX512F in addition to
26342         OPTION_MASK_ISA_GFNI.
26343         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
26344         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
26345         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
26346         to OPTION_MASK_ISA_GFNI.
26347         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
26348         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
26349         OPTION_MASK_ISA_AVX512BW.
26350         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
26351         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
26352         addition to OPTION_MASK_ISA_GFNI.
26353         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
26354         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
26355         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
26356         to OPTION_MASK_ISA_GFNI.
26357         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
26358         a requirement for all ISAs rather than any of them with a few
26359         exceptions.
26360         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
26361         processing.
26362         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
26363         bitmasks to be enabled with 3 exceptions, instead of requiring any
26364         enabled ISA with lots of exceptions.
26365         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
26366         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
26367         Change avx512bw in isa attribute to avx512f.
26368         * config/i386/sgxintrin.h: Add license boilerplate.
26369         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
26370         to __AVX512F__ and __AVX512VL to __AVX512VL__.
26371         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
26372         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
26373         defined.
26374         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
26375         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
26376         temporarily sse2 rather than sse if not enabled already.
26378         PR target/83604
26379         * config/i386/sse.md (VI248_VLBW): Rename to ...
26380         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
26381         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
26382         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
26383         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
26384         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
26385         mode iterator instead of VI248_VLBW.
26387 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
26389         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
26390         (record_modified): Skip clobbers; add debug output.
26391         (param_change_prob): Use sreal frequencies.
26393 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
26395         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
26396         punt for user-aligned variables.
26398 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
26400         * tree-chrec.c (chrec_contains_symbols): Return true for
26401         POLY_INT_CST.
26403 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
26405         PR target/82439
26406         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
26407         of (x|y) == x for BICS pattern.
26409 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
26411         PR tree-optimization/83605
26412         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
26413         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
26414         can throw.
26416 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26418         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
26419         * config/epiphany/rtems.h: New file.
26421 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26422             Uros Bizjak  <ubizjak@gmail.com>
26424         PR target/83554
26425         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
26426         QIreg_operand instead of register_operand predicate.
26427         * config/i386/i386.c (ix86_rop_should_change_byte_p,
26428         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
26429         comments instead of -fmitigate[-_]rop.
26431 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26433         PR bootstrap/81926
26434         * cgraphunit.c (symbol_table::compile): Switch to text_section
26435         before calling assembly_start debug hook.
26436         * run-rtl-passes.c (run_rtl_passes): Likewise.
26437         Include output.h.
26439 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26441         * tree-vrp.c (extract_range_from_binary_expr_1): Check
26442         range_int_cst_p rather than !symbolic_range_p before calling
26443         extract_range_from_multiplicative_op_1.
26445 2018-01-04  Jeff Law  <law@redhat.com>
26447         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
26448         redundant test in assertion.
26450 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26452         * doc/rtl.texi: Document machine_mode wrapper classes.
26454 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26456         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
26457         using tree_to_uhwi.
26459 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26461         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
26462         the VEC_PERM_EXPR fold to fail.
26464 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26466         PR debug/83585
26467         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
26468         to switched_sections.
26470 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26472         PR target/83680
26473         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
26474         test for d.testing.
26476 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
26478         PR target/83387
26479         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
26480         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
26482 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26484         PR debug/83666
26485         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
26486         is BLKmode and bitpos not zero or mode change is needed.
26488 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26490         PR target/83675
26491         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
26492         TARGET_VIS2.
26494 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
26496         PR target/83628
26497         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
26498         instead of MULT rtx.  Update all corresponding splitters.
26499         (*saddl_se): Ditto.
26500         (*ssub<modesuffix>): Ditto.
26501         (*ssubl_se): Ditto.
26502         (*cmp_sadd_di): Update split patterns.
26503         (*cmp_sadd_si): Ditto.
26504         (*cmp_sadd_sidi): Ditto.
26505         (*cmp_ssub_di): Ditto.
26506         (*cmp_ssub_si): Ditto.
26507         (*cmp_ssub_sidi): Ditto.
26508         * config/alpha/predicates.md (const23_operand): New predicate.
26509         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
26510         Look for ASHIFT, not MULT inner operand.
26511         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
26513 2018-01-04  Martin Liska  <mliska@suse.cz>
26515         PR gcov-profile/83669
26516         * gcov.c (output_intermediate_file): Add version to intermediate
26517         gcov file.
26518         * doc/gcov.texi: Document new field 'version' in intermediate
26519         file format. Fix location of '-k' option of gcov command.
26521 2018-01-04  Martin Liska  <mliska@suse.cz>
26523         PR ipa/82352
26524         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
26526 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26528         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
26530 2018-01-03  Martin Sebor  <msebor@redhat.com>
26532         PR tree-optimization/83655
26533         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
26534         checking calls with invalid arguments.
26536 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26538         * tree-vect-stmts.c (vect_get_store_rhs): New function.
26539         (vectorizable_mask_load_store): Delete.
26540         (vectorizable_call): Return false for masked loads and stores.
26541         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
26542         instead of gimple_assign_rhs1.
26543         (vectorizable_load): Handle IFN_MASK_LOAD.
26544         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
26546 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26548         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
26549         split out from..,
26550         (vectorizable_mask_load_store): ...here.
26551         (vectorizable_load): ...and here.
26553 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26555         * tree-vect-stmts.c (vect_build_all_ones_mask)
26556         (vect_build_zero_merge_argument): New functions, split out from...
26557         (vectorizable_load): ...here.
26559 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26561         * tree-vect-stmts.c (vect_check_store_rhs): New function,
26562         split out from...
26563         (vectorizable_mask_load_store): ...here.
26564         (vectorizable_store): ...and here.
26566 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26568         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
26569         split out from...
26570         (vectorizable_mask_load_store): ...here.
26572 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26574         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
26575         (vect_model_store_cost): Take a vec_load_store_type instead of a
26576         vect_def_type.
26577         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
26578         (vect_model_store_cost): Take a vec_load_store_type instead of a
26579         vect_def_type.
26580         (vectorizable_mask_load_store): Update accordingly.
26581         (vectorizable_store): Likewise.
26582         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
26584 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26586         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
26587         IFN_MASK_LOAD calls here rather than...
26588         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
26590 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26591             Alan Hayward  <alan.hayward@arm.com>
26592             David Sherwood  <david.sherwood@arm.com>
26594         * expmed.c (extract_bit_field_1): For vector extracts,
26595         fall back to extract_bit_field_as_subreg if vec_extract
26596         isn't available.
26598 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26599             Alan Hayward  <alan.hayward@arm.com>
26600             David Sherwood  <david.sherwood@arm.com>
26602         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
26603         they are variable or constant sized.
26604         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
26605         slots for constant-sized data.
26607 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26608             Alan Hayward  <alan.hayward@arm.com>
26609             David Sherwood  <david.sherwood@arm.com>
26611         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
26612         handling COND_EXPRs with boolean comparisons, try to find a better
26613         basis for the mask type than the boolean itself.
26615 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26617         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
26618         is calculated and how it can be overridden.
26619         * genmodes.c (max_bitsize_mode_any_mode): New variable.
26620         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
26621         if defined.
26622         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
26623         if nonzero.
26625 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26626             Alan Hayward  <alan.hayward@arm.com>
26627             David Sherwood  <david.sherwood@arm.com>
26629         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
26630         Remove the mode argument.
26631         (aarch64_simd_valid_immediate): Remove the mode and inverse
26632         arguments.
26633         * config/aarch64/iterators.md (bitsize): New iterator.
26634         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
26635         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
26636         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
26637         aarch64_simd_valid_immediate.
26638         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
26639         (aarch64_reg_or_bic_imm): Likewise.
26640         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
26641         with an insn_type enum and msl with a modifier_type enum.
26642         Replace element_width with a scalar_mode.  Change the shift
26643         to unsigned int.  Add constructors for scalar_float_mode and
26644         scalar_int_mode elements.
26645         (aarch64_vect_float_const_representable_p): Delete.
26646         (aarch64_can_const_movi_rtx_p)
26647         (aarch64_simd_scalar_immediate_valid_for_move)
26648         (aarch64_simd_make_constant): Update call to
26649         aarch64_simd_valid_immediate.
26650         (aarch64_advsimd_valid_immediate_hs): New function.
26651         (aarch64_advsimd_valid_immediate): Likewise.
26652         (aarch64_simd_valid_immediate): Remove mode and inverse
26653         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
26654         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
26655         and aarch64_float_const_representable_p on the result.
26656         (aarch64_output_simd_mov_immediate): Remove mode argument.
26657         Update call to aarch64_simd_valid_immediate and use of
26658         simd_immediate_info.
26659         (aarch64_output_scalar_simd_mov_immediate): Update call
26660         accordingly.
26662 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26663             Alan Hayward  <alan.hayward@arm.com>
26664             David Sherwood  <david.sherwood@arm.com>
26666         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
26667         (mode_nunits): Likewise CONST_MODE_NUNITS.
26668         * machmode.def (ADJUST_NUNITS): Document.
26669         * genmodes.c (mode_data::need_nunits_adj): New field.
26670         (blank_mode): Update accordingly.
26671         (adj_nunits): New variable.
26672         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
26673         parameter.
26674         (emit_mode_size_inline): Set need_bytesize_adj for all modes
26675         listed in adj_nunits.
26676         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
26677         listed in adj_nunits.  Don't emit case statements for such modes.
26678         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
26679         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
26680         nothing if adj_nunits is nonnull.
26681         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
26682         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
26683         (emit_mode_fbit): Update use of print_maybe_const_decl.
26684         (emit_move_size): Likewise.  Treat the array as non-const
26685         if adj_nunits.
26686         (emit_mode_adjustments): Handle adj_nunits.
26688 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26690         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
26691         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
26692         (VECTOR_MODES): Use it.
26693         (make_vector_modes): Take the prefix as an argument.
26695 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26696             Alan Hayward  <alan.hayward@arm.com>
26697             David Sherwood  <david.sherwood@arm.com>
26699         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
26700         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
26701         for MODE_VECTOR_BOOL.
26702         * machmode.def (VECTOR_BOOL_MODE): Document.
26703         * genmodes.c (VECTOR_BOOL_MODE): New macro.
26704         (make_vector_bool_mode): New function.
26705         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
26706         MODE_VECTOR_BOOL.
26707         * lto-streamer-in.c (lto_input_mode_table): Likewise.
26708         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
26709         Likewise.
26710         * stor-layout.c (int_mode_for_mode): Likewise.
26711         * tree.c (build_vector_type_for_mode): Likewise.
26712         * varasm.c (output_constant_pool_2): Likewise.
26713         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
26714         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
26715         for MODE_VECTOR_BOOL.
26716         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
26717         of mode class checks.
26718         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
26719         instead of a list of mode class checks.
26720         (expand_vector_scalar_condition): Likewise.
26721         (type_for_widest_vector_mode): Handle BImode as an inner mode.
26723 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26724             Alan Hayward  <alan.hayward@arm.com>
26725             David Sherwood  <david.sherwood@arm.com>
26727         * machmode.h (mode_size): Change from unsigned short to
26728         poly_uint16_pod.
26729         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
26730         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26731         or if measurement_type is not polynomial.
26732         (fixed_size_mode::includes_p): Check for constant-sized modes.
26733         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
26734         return a poly_uint16 rather than an unsigned short.
26735         (emit_mode_size): Change the type of mode_size from unsigned short
26736         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
26737         (emit_mode_adjustments): Cope with polynomial vector sizes.
26738         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26739         for GET_MODE_SIZE.
26740         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26741         for GET_MODE_SIZE.
26742         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
26743         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
26744         * caller-save.c (setup_save_areas): Likewise.
26745         (replace_reg_with_saved_mem): Likewise.
26746         * calls.c (emit_library_call_value_1): Likewise.
26747         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
26748         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
26749         (gen_lowpart_for_combine): Likewise.
26750         * convert.c (convert_to_integer_1): Likewise.
26751         * cse.c (equiv_constant, cse_insn): Likewise.
26752         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
26753         (cselib_subst_to_values): Likewise.
26754         * dce.c (word_dce_process_block): Likewise.
26755         * df-problems.c (df_word_lr_mark_ref): Likewise.
26756         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
26757         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
26758         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
26759         (rtl_for_decl_location): Likewise.
26760         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
26761         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
26762         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
26763         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
26764         (expand_expr_real_1): Likewise.
26765         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
26766         (pad_below): Likewise.
26767         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26768         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
26769         * ira.c (get_subreg_tracking_sizes): Likewise.
26770         * ira-build.c (ira_create_allocno_objects): Likewise.
26771         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
26772         (ira_sort_regnos_for_alter_reg): Likewise.
26773         * ira-costs.c (record_operand_costs): Likewise.
26774         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
26775         (resolve_simple_move): Likewise.
26776         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
26777         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
26778         (lra_constraints): Likewise.
26779         (CONST_POOL_OK_P): Reject variable-sized modes.
26780         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
26781         (add_pseudo_to_slot, lra_spill): Likewise.
26782         * omp-low.c (omp_clause_aligned_alignment): Likewise.
26783         * optabs-query.c (get_best_extraction_insn): Likewise.
26784         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26785         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
26786         (expand_mult_highpart, valid_multiword_target_p): Likewise.
26787         * recog.c (offsettable_address_addr_space_p): Likewise.
26788         * regcprop.c (maybe_mode_change): Likewise.
26789         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
26790         * regrename.c (build_def_use): Likewise.
26791         * regstat.c (dump_reg_info): Likewise.
26792         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
26793         (find_reloads, find_reloads_subreg_address): Likewise.
26794         * reload1.c (eliminate_regs_1): Likewise.
26795         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
26796         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
26797         (simplify_binary_operation_1, simplify_subreg): Likewise.
26798         * targhooks.c (default_function_arg_padding): Likewise.
26799         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
26800         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
26801         (verify_gimple_assign_ternary): Likewise.
26802         * tree-inline.c (estimate_move_cost): Likewise.
26803         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26804         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
26805         (get_address_cost_ainc): Likewise.
26806         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
26807         (vect_supportable_dr_alignment): Likewise.
26808         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26809         (vectorizable_reduction): Likewise.
26810         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
26811         (vectorizable_operation, vectorizable_load): Likewise.
26812         * tree.c (build_same_sized_truth_vector_type): Likewise.
26813         * valtrack.c (cleanup_auto_inc_dec): Likewise.
26814         * var-tracking.c (emit_note_insn_var_location): Likewise.
26815         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
26816         (ADDR_VEC_ALIGN): Likewise.
26818 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26819             Alan Hayward  <alan.hayward@arm.com>
26820             David Sherwood  <david.sherwood@arm.com>
26822         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
26823         unsigned short.
26824         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26825         or if measurement_type is polynomial.
26826         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
26827         * combine.c (make_extraction): Likewise.
26828         * dse.c (find_shift_sequence): Likewise.
26829         * dwarf2out.c (mem_loc_descriptor): Likewise.
26830         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
26831         (extract_bit_field, extract_low_bits): Likewise.
26832         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
26833         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
26834         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
26835         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
26836         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26837         * reload.c (find_reloads): Likewise.
26838         * reload1.c (alter_reg): Likewise.
26839         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
26840         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
26841         * tree-if-conv.c (predicate_mem_writes): Likewise.
26842         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
26843         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
26844         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
26845         * valtrack.c (dead_debug_insert_temp): Likewise.
26846         * varasm.c (mergeable_constant_section): Likewise.
26847         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
26849 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26850             Alan Hayward  <alan.hayward@arm.com>
26851             David Sherwood  <david.sherwood@arm.com>
26853         * expr.c (expand_assignment): Cope with polynomial mode sizes
26854         when assigning to a CONCAT.
26856 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26857             Alan Hayward  <alan.hayward@arm.com>
26858             David Sherwood  <david.sherwood@arm.com>
26860         * machmode.h (mode_precision): Change from unsigned short to
26861         poly_uint16_pod.
26862         (mode_to_precision): Return a poly_uint16 rather than an unsigned
26863         short.
26864         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
26865         or if measurement_type is not polynomial.
26866         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
26867         in which the mode is already known to be a scalar_int_mode.
26868         * genmodes.c (emit_mode_precision): Change the type of mode_precision
26869         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
26870         initializer.
26871         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26872         for GET_MODE_PRECISION.
26873         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26874         for GET_MODE_PRECISION.
26875         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
26876         as polynomial.
26877         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
26878         (expand_field_assignment, make_extraction): Likewise.
26879         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
26880         (get_last_value): Likewise.
26881         * convert.c (convert_to_integer_1): Likewise.
26882         * cse.c (cse_insn): Likewise.
26883         * expr.c (expand_expr_real_1): Likewise.
26884         * lra-constraints.c (simplify_operand_subreg): Likewise.
26885         * optabs-query.c (can_atomic_load_p): Likewise.
26886         * optabs.c (expand_atomic_load): Likewise.
26887         (expand_atomic_store): Likewise.
26888         * ree.c (combine_reaching_defs): Likewise.
26889         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
26890         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
26891         * tree.h (type_has_mode_precision_p): Likewise.
26892         * ubsan.c (instrument_si_overflow): Likewise.
26894 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26895             Alan Hayward  <alan.hayward@arm.com>
26896             David Sherwood  <david.sherwood@arm.com>
26898         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
26899         polynomial numbers of units.
26900         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
26901         (valid_vector_subparts_p): New function.
26902         (build_vector_type): Remove temporary shim and take the number
26903         of units as a poly_uint64 rather than an int.
26904         (build_opaque_vector_type): Take the number of units as a
26905         poly_uint64 rather than an int.
26906         * tree.c (build_vector_from_ctor): Handle polynomial
26907         TYPE_VECTOR_SUBPARTS.
26908         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
26909         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
26910         (build_vector_from_val): If the number of units is variable,
26911         use build_vec_duplicate_cst for constant operands and
26912         VEC_DUPLICATE_EXPR otherwise.
26913         (make_vector_type): Remove temporary is_constant ().
26914         (build_vector_type, build_opaque_vector_type): Take the number of
26915         units as a poly_uint64 rather than an int.
26916         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
26917         VECTOR_CST_NELTS.
26918         * cfgexpand.c (expand_debug_expr): Likewise.
26919         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
26920         (store_constructor, expand_expr_real_1): Likewise.
26921         (const_scalar_mask_from_tree): Likewise.
26922         * fold-const-call.c (fold_const_reduction): Likewise.
26923         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
26924         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
26925         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
26926         (fold_relational_const): Likewise.
26927         (native_interpret_vector): Likewise.  Change the size from an
26928         int to an unsigned int.
26929         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
26930         TYPE_VECTOR_SUBPARTS.
26931         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
26932         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
26933         duplicating a non-constant operand into a variable-length vector.
26934         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
26935         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
26936         * ipa-icf.c (sem_variable::equals): Likewise.
26937         * match.pd: Likewise.
26938         * omp-simd-clone.c (simd_clone_subparts): Likewise.
26939         * print-tree.c (print_node): Likewise.
26940         * stor-layout.c (layout_type): Likewise.
26941         * targhooks.c (default_builtin_vectorization_cost): Likewise.
26942         * tree-cfg.c (verify_gimple_comparison): Likewise.
26943         (verify_gimple_assign_binary): Likewise.
26944         (verify_gimple_assign_ternary): Likewise.
26945         (verify_gimple_assign_single): Likewise.
26946         * tree-pretty-print.c (dump_generic_node): Likewise.
26947         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26948         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
26949         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
26950         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
26951         (vect_shift_permute_load_chain): Likewise.
26952         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
26953         (expand_vector_condition, optimize_vector_constructor): Likewise.
26954         (lower_vec_perm, get_compute_type): Likewise.
26955         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26956         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
26957         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
26958         (vect_recog_mask_conversion_pattern): Likewise.
26959         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
26960         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
26961         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26962         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
26963         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
26964         (vectorizable_shift, vectorizable_operation, vectorizable_store)
26965         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
26966         (supportable_widening_operation): Likewise.
26967         (supportable_narrowing_operation): Likewise.
26968         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
26969         Likewise.
26970         * varasm.c (output_constant): Likewise.
26972 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26973             Alan Hayward  <alan.hayward@arm.com>
26974             David Sherwood  <david.sherwood@arm.com>
26976         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
26977         so that both the length == 3 and length != 3 cases set up their
26978         own permute vectors.  Add comments explaining why we know the
26979         number of elements is constant.
26980         (vect_permute_load_chain): Likewise.
26982 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26983             Alan Hayward  <alan.hayward@arm.com>
26984             David Sherwood  <david.sherwood@arm.com>
26986         * machmode.h (mode_nunits): Change from unsigned char to
26987         poly_uint16_pod.
26988         (ONLY_FIXED_SIZE_MODES): New macro.
26989         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
26990         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
26991         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
26992         New typedefs.
26993         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
26994         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
26995         or if measurement_type is not polynomial.
26996         * genmodes.c (ZERO_COEFFS): New macro.
26997         (emit_mode_nunits_inline): Make mode_nunits_inline return a
26998         poly_uint16.
26999         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
27000         Use ZERO_COEFFS when emitting initializers.
27001         * data-streamer.h (bp_pack_poly_value): New function.
27002         (bp_unpack_poly_value): Likewise.
27003         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27004         for GET_MODE_NUNITS.
27005         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27006         for GET_MODE_NUNITS.
27007         * tree.c (make_vector_type): Remove temporary shim and make
27008         the real function take the number of units as a poly_uint64
27009         rather than an int.
27010         (build_vector_type_for_mode): Handle polynomial nunits.
27011         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
27012         * emit-rtl.c (const_vec_series_p_1): Likewise.
27013         (gen_rtx_CONST_VECTOR): Likewise.
27014         * fold-const.c (test_vec_duplicate_folding): Likewise.
27015         * genrecog.c (validate_pattern): Likewise.
27016         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
27017         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
27018         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
27019         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
27020         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
27021         * rtlanal.c (subreg_get_info): Likewise.
27022         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27023         (vect_grouped_load_supported): Likewise.
27024         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
27025         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
27026         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
27027         (simplify_const_unary_operation, simplify_binary_operation_1)
27028         (simplify_const_binary_operation, simplify_ternary_operation)
27029         (test_vector_ops_duplicate, test_vector_ops): Likewise.
27030         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
27031         instead of CONST_VECTOR_NUNITS.
27032         * varasm.c (output_constant_pool_2): Likewise.
27033         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
27034         explicit-encoded elements in the XVEC for variable-length vectors.
27036 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27038         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
27040 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27041             Alan Hayward  <alan.hayward@arm.com>
27042             David Sherwood  <david.sherwood@arm.com>
27044         * coretypes.h (fixed_size_mode): Declare.
27045         (fixed_size_mode_pod): New typedef.
27046         * builtins.h (target_builtins::x_apply_args_mode)
27047         (target_builtins::x_apply_result_mode): Change type to
27048         fixed_size_mode_pod.
27049         * builtins.c (apply_args_size, apply_result_size, result_vector)
27050         (expand_builtin_apply_args_1, expand_builtin_apply)
27051         (expand_builtin_return): Update accordingly.
27053 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27055         * cse.c (hash_rtx_cb): Hash only the encoded elements.
27056         * cselib.c (cselib_hash_rtx): Likewise.
27057         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
27058         CONST_VECTOR encoding.
27060 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27061             Jeff Law  <law@redhat.com>
27063         PR target/83641
27064         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
27065         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
27066         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
27067         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
27069         PR target/83641
27070         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
27071         explicitly probe *sp in a noreturn function if there were any callee
27072         register saves or frame pointer is needed.
27074 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27076         PR debug/83621
27077         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
27078         BLKmode for ternary, binary or unary expressions.
27080         PR debug/83645
27081         * var-tracking.c (delete_vta_debug_insn): New inline function.
27082         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
27083         insns from get_insns () to NULL instead of each bb separately.
27084         Use delete_vta_debug_insn.  No longer static.
27085         (vt_debug_insns_local, variable_tracking_main_1): Adjust
27086         delete_vta_debug_insns callers.
27087         * rtl.h (delete_vta_debug_insns): Declare.
27088         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
27089         instead of variable_tracking_main.
27091 2018-01-03  Martin Sebor  <msebor@redhat.com>
27093         PR tree-optimization/83603
27094         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
27095         arguments past the endof the argument list in functions declared
27096         without a prototype.
27097         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
27098         Avoid checking when arguments are null.
27100 2018-01-03  Martin Sebor  <msebor@redhat.com>
27102         PR c/83559
27103         * doc/extend.texi (attribute const): Fix a typo.
27104         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
27105         issuing -Wsuggest-attribute for void functions.
27107 2018-01-03  Martin Sebor  <msebor@redhat.com>
27109         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
27110         offset_int::from instead of wide_int::to_shwi.
27111         (maybe_diag_overlap): Remove assertion.
27112         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
27113         * gimple-ssa-sprintf.c (format_directive): Same.
27114         (parse_directive): Same.
27115         (sprintf_dom_walker::compute_format_length): Same.
27116         (try_substitute_return_value): Same.
27118 2018-01-03  Jeff Law  <law@redhat.com>
27120         PR middle-end/83654
27121         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
27122         non-constant residual for zero at runtime and avoid probing in
27123         that case.  Reorganize code for trailing problem to mirror handling
27124         of the residual.
27126 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
27128         PR tree-optimization/83501
27129         * tree-ssa-strlen.c (get_string_cst): New.
27130         (handle_char_store): Call get_string_cst.
27132 2018-01-03  Martin Liska  <mliska@suse.cz>
27134         PR tree-optimization/83593
27135         * tree-ssa-strlen.c: Include tree-cfg.h.
27136         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
27137         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
27138         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
27139         to false.
27140         (strlen_dom_walker::before_dom_children): Call
27141         gimple_purge_dead_eh_edges. Dump tranformation with details
27142         dump flags.
27143         (strlen_dom_walker::before_dom_children): Update call by adding
27144         new argument cleanup_eh.
27145         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
27147 2018-01-03  Martin Liska  <mliska@suse.cz>
27149         PR ipa/83549
27150         * cif-code.def (VARIADIC_THUNK): New enum value.
27151         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
27152         thunks.
27154 2018-01-03  Jan Beulich  <jbeulich@suse.com>
27156         * sse.md (mov<mode>_internal): Tighten condition for when to use
27157         vmovdqu<ssescalarsize> for TI and OI modes.
27159 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27161         Update copyright years.
27163 2018-01-03  Martin Liska  <mliska@suse.cz>
27165         PR ipa/83594
27166         * ipa-visibility.c (function_and_variable_visibility): Skip
27167         functions with noipa attribure.
27169 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27171         * gcc.c (process_command): Update copyright notice dates.
27172         * gcov-dump.c (print_version): Ditto.
27173         * gcov.c (print_version): Ditto.
27174         * gcov-tool.c (print_version): Ditto.
27175         * gengtype.c (create_file): Ditto.
27176         * doc/cpp.texi: Bump @copying's copyright year.
27177         * doc/cppinternals.texi: Ditto.
27178         * doc/gcc.texi: Ditto.
27179         * doc/gccint.texi: Ditto.
27180         * doc/gcov.texi: Ditto.
27181         * doc/install.texi: Ditto.
27182         * doc/invoke.texi: Ditto.
27184 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27186         * vector-builder.h (vector_builder::m_full_nelts): Change from
27187         unsigned int to poly_uint64.
27188         (vector_builder::full_nelts): Update prototype accordingly.
27189         (vector_builder::new_vector): Likewise.
27190         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
27191         (vector_builder::operator ==): Likewise.
27192         (vector_builder::finalize): Likewise.
27193         * int-vector-builder.h (int_vector_builder::int_vector_builder):
27194         Take the number of elements as a poly_uint64 rather than an
27195         unsigned int.
27196         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
27197         from unsigned int to poly_uint64.
27198         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
27199         (vec_perm_indices::new_vector): Likewise.
27200         (vec_perm_indices::length): Likewise.
27201         (vec_perm_indices::nelts_per_input): Likewise.
27202         (vec_perm_indices::input_nelts): Likewise.
27203         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
27204         number of elements per input as a poly_uint64 rather than an
27205         unsigned int.  Use the original encoding for variable-length
27206         vectors, rather than clamping each individual element.
27207         For the second and subsequent elements in each pattern,
27208         clamp the step and base before clamping their sum.
27209         (vec_perm_indices::series_p): Handle polynomial element counts.
27210         (vec_perm_indices::all_in_range_p): Likewise.
27211         (vec_perm_indices_to_tree): Likewise.
27212         (vec_perm_indices_to_rtx): Likewise.
27213         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
27214         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
27215         (tree_vector_builder::new_binary_operation): Handle polynomial
27216         element counts.  Return false if we need to know the number
27217         of elements at compile time.
27218         * fold-const.c (fold_vec_perm): Punt if the number of elements
27219         isn't known at compile time.
27221 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27223         * vec-perm-indices.h (vec_perm_builder): Change element type
27224         from HOST_WIDE_INT to poly_int64.
27225         (vec_perm_indices::element_type): Update accordingly.
27226         (vec_perm_indices::clamp): Handle polynomial element_types.
27227         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27228         (vec_perm_indices::all_in_range_p): Likewise.
27229         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
27230         than shwi trees.
27231         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
27232         polynomial vec_perm_indices element types.
27233         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
27234         * fold-const.c (fold_vec_perm): Likewise.
27235         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
27236         * tree-vect-generic.c (lower_vec_perm): Likewise.
27237         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27238         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
27239         element type to HOST_WIDE_INT.
27241 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27242             Alan Hayward  <alan.hayward@arm.com>
27243             David Sherwood  <david.sherwood@arm.com>
27245         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
27246         rather than an int.  Use plus_constant.
27247         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
27248         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
27250 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27251             Alan Hayward  <alan.hayward@arm.com>
27252             David Sherwood  <david.sherwood@arm.com>
27254         * calls.c (emit_call_1, expand_call): Change struct_value_size from
27255         a HOST_WIDE_INT to a poly_int64.
27257 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27258             Alan Hayward  <alan.hayward@arm.com>
27259             David Sherwood  <david.sherwood@arm.com>
27261         * calls.c (load_register_parameters): Cope with polynomial
27262         mode sizes.  Require a constant size for BLKmode parameters
27263         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
27264         forces a parameter to be padded at the lsb end in order to
27265         fill a complete number of words, require the parameter size
27266         to be ordered wrt UNITS_PER_WORD.
27268 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27269             Alan Hayward  <alan.hayward@arm.com>
27270             David Sherwood  <david.sherwood@arm.com>
27272         * reload1.c (spill_stack_slot_width): Change element type
27273         from unsigned int to poly_uint64_pod.
27274         (alter_reg): Treat mode sizes as polynomial.
27276 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27277             Alan Hayward  <alan.hayward@arm.com>
27278             David Sherwood  <david.sherwood@arm.com>
27280         * reload.c (complex_word_subreg_p): New function.
27281         (reload_inner_reg_of_subreg, push_reload): Use it.
27283 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27284             Alan Hayward  <alan.hayward@arm.com>
27285             David Sherwood  <david.sherwood@arm.com>
27287         * lra-constraints.c (process_alt_operands): Reject matched
27288         operands whose sizes aren't ordered.
27289         (match_reload): Refer to this check here.
27291 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27292             Alan Hayward  <alan.hayward@arm.com>
27293             David Sherwood  <david.sherwood@arm.com>
27295         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
27296         that the mode size is in the set {1, 2, 4, 8, 16}.
27298 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27299             Alan Hayward  <alan.hayward@arm.com>
27300             David Sherwood  <david.sherwood@arm.com>
27302         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
27303         Use plus_constant instead of gen_rtx_PLUS.
27305 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27306             Alan Hayward  <alan.hayward@arm.com>
27307             David Sherwood  <david.sherwood@arm.com>
27309         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
27310         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
27311         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
27312         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
27313         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
27314         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
27315         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
27316         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
27317         * config/i386/i386.c (ix86_push_rounding): ...this new function.
27318         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
27319         a poly_int64.
27320         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
27321         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
27322         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
27323         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
27324         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
27325         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
27326         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
27327         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
27328         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
27329         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
27330         function.
27331         * expr.c (emit_move_resolve_push): Treat the input and result
27332         of PUSH_ROUNDING as a poly_int64.
27333         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
27334         (emit_push_insn): Likewise.
27335         * lra-eliminations.c (mark_not_eliminable): Likewise.
27336         * recog.c (push_operand): Likewise.
27337         * reload1.c (elimination_effects): Likewise.
27338         * rtlanal.c (nonzero_bits1): Likewise.
27339         * calls.c (store_one_arg): Likewise.  Require the padding to be
27340         known at compile time.
27342 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27343             Alan Hayward  <alan.hayward@arm.com>
27344             David Sherwood  <david.sherwood@arm.com>
27346         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
27347         Use plus_constant instead of gen_rtx_PLUS.
27349 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27350             Alan Hayward  <alan.hayward@arm.com>
27351             David Sherwood  <david.sherwood@arm.com>
27353         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
27354         rather than an int.
27356 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27357             Alan Hayward  <alan.hayward@arm.com>
27358             David Sherwood  <david.sherwood@arm.com>
27360         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
27361         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
27362         via stack temporaries.  Treat the mode size as polynomial too.
27364 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27365             Alan Hayward  <alan.hayward@arm.com>
27366             David Sherwood  <david.sherwood@arm.com>
27368         * expr.c (expand_expr_real_2): When handling conversions involving
27369         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
27370         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
27371         as a poly_uint64 too.
27373 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27374             Alan Hayward  <alan.hayward@arm.com>
27375             David Sherwood  <david.sherwood@arm.com>
27377         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
27379 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27380             Alan Hayward  <alan.hayward@arm.com>
27381             David Sherwood  <david.sherwood@arm.com>
27383         * combine.c (can_change_dest_mode): Handle polynomial
27384         REGMODE_NATURAL_SIZE.
27385         * expmed.c (store_bit_field_1): Likewise.
27386         * expr.c (store_constructor): Likewise.
27387         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
27388         and polynomial REGMODE_NATURAL_SIZE.
27389         (gen_lowpart_common): Likewise.
27390         * reginfo.c (record_subregs_of_mode): Likewise.
27391         * rtlanal.c (read_modify_subreg_p): Likewise.
27393 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27394             Alan Hayward  <alan.hayward@arm.com>
27395             David Sherwood  <david.sherwood@arm.com>
27397         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
27398         numbers of elements.
27400 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27401             Alan Hayward  <alan.hayward@arm.com>
27402             David Sherwood  <david.sherwood@arm.com>
27404         * match.pd: Cope with polynomial numbers of vector elements.
27406 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27407             Alan Hayward  <alan.hayward@arm.com>
27408             David Sherwood  <david.sherwood@arm.com>
27410         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
27411         in a POINTER_PLUS_EXPR.
27413 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27414             Alan Hayward  <alan.hayward@arm.com>
27415             David Sherwood  <david.sherwood@arm.com>
27417         * omp-simd-clone.c (simd_clone_subparts): New function.
27418         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
27419         (ipa_simd_modify_function_body): Likewise.
27421 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27422             Alan Hayward  <alan.hayward@arm.com>
27423             David Sherwood  <david.sherwood@arm.com>
27425         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
27426         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
27427         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
27428         (expand_vector_condition, vector_element): Likewise.
27429         (subparts_gt): New function.
27430         (get_compute_type): Use subparts_gt.
27431         (count_type_subparts): Delete.
27432         (expand_vector_operations_1): Use subparts_gt instead of
27433         count_type_subparts.
27435 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27436             Alan Hayward  <alan.hayward@arm.com>
27437             David Sherwood  <david.sherwood@arm.com>
27439         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
27440         (vect_compile_time_alias): ...this new function.  Do the calculation
27441         on poly_ints rather than trees.
27442         (vect_prune_runtime_alias_test_list): Update call accordingly.
27444 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27445             Alan Hayward  <alan.hayward@arm.com>
27446             David Sherwood  <david.sherwood@arm.com>
27448         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
27449         numbers of units.
27450         (vect_schedule_slp_instance): Likewise.
27452 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27453             Alan Hayward  <alan.hayward@arm.com>
27454             David Sherwood  <david.sherwood@arm.com>
27456         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
27457         constant and extern definitions for variable-length vectors.
27458         (vect_get_constant_vectors): Note that the number of units
27459         is known to be constant.
27461 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27462             Alan Hayward  <alan.hayward@arm.com>
27463             David Sherwood  <david.sherwood@arm.com>
27465         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
27466         of units as polynomial.  Choose between WIDE and NARROW based
27467         on multiple_p.
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         * tree-vect-stmts.c (simd_clone_subparts): New function.
27474         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
27476 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27477             Alan Hayward  <alan.hayward@arm.com>
27478             David Sherwood  <david.sherwood@arm.com>
27480         * tree-vect-stmts.c (vectorizable_call): Treat the number of
27481         vectors as polynomial.  Use build_index_vector for
27482         IFN_GOMP_SIMD_LANE.
27484 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27485             Alan Hayward  <alan.hayward@arm.com>
27486             David Sherwood  <david.sherwood@arm.com>
27488         * tree-vect-stmts.c (get_load_store_type): Treat the number of
27489         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
27490         for variable-length vectors.
27491         (vectorizable_mask_load_store): Treat the number of units as
27492         polynomial, asserting that it is constant if the condition has
27493         already been enforced.
27494         (vectorizable_store, vectorizable_load): Likewise.
27496 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27497             Alan Hayward  <alan.hayward@arm.com>
27498             David Sherwood  <david.sherwood@arm.com>
27500         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
27501         of units as polynomial.  Punt if we can't tell at compile time
27502         which vector contains the final result.
27504 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27505             Alan Hayward  <alan.hayward@arm.com>
27506             David Sherwood  <david.sherwood@arm.com>
27508         * tree-vect-loop.c (vectorizable_induction): Treat the number
27509         of units as polynomial.  Punt on SLP inductions.  Use an integer
27510         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
27511         cast of such a series for variable-length floating-point
27512         reductions.
27514 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27515             Alan Hayward  <alan.hayward@arm.com>
27516             David Sherwood  <david.sherwood@arm.com>
27518         * tree.h (build_index_vector): Declare.
27519         * tree.c (build_index_vector): New function.
27520         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
27521         of units as polynomial, forcibly converting it to a constant if
27522         vectorizable_reduction has already enforced the condition.
27523         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
27524         to create a {1,2,3,...} vector.
27525         (vectorizable_reduction): Treat the number of units as polynomial.
27526         Choose vectype_in based on the largest scalar element size rather
27527         than the smallest number of units.  Enforce the restrictions
27528         relied on above.
27530 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27531             Alan Hayward  <alan.hayward@arm.com>
27532             David Sherwood  <david.sherwood@arm.com>
27534         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
27535         number of units as polynomial.
27537 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27538             Alan Hayward  <alan.hayward@arm.com>
27539             David Sherwood  <david.sherwood@arm.com>
27541         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
27542         * target.def (autovectorize_vector_sizes): Return the vector sizes
27543         by pointer, using vector_sizes rather than a bitmask.
27544         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
27545         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
27546         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
27547         Likewise.
27548         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
27549         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
27550         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
27551         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
27552         * omp-general.c (omp_max_vf): Likewise.
27553         * omp-low.c (omp_clause_aligned_alignment): Likewise.
27554         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
27555         * tree-vect-loop.c (vect_analyze_loop): Likewise.
27556         * tree-vect-slp.c (vect_slp_bb): Likewise.
27557         * doc/tm.texi: Regenerate.
27558         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
27559         to a poly_uint64.
27560         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
27561         the vector size as a poly_uint64 rather than an unsigned int.
27562         (current_vector_size): Change from an unsigned int to a poly_uint64.
27563         (get_vectype_for_scalar_type): Update accordingly.
27564         * tree.h (build_truth_vector_type): Take the size and number of
27565         units as a poly_uint64 rather than an unsigned int.
27566         (build_vector_type): Add a temporary overload that takes
27567         the number of units as a poly_uint64 rather than an unsigned int.
27568         * tree.c (make_vector_type): Likewise.
27569         (build_truth_vector_type): Take the number of units as a poly_uint64
27570         rather than an unsigned int.
27572 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27573             Alan Hayward  <alan.hayward@arm.com>
27574             David Sherwood  <david.sherwood@arm.com>
27576         * target.def (get_mask_mode): Take the number of units and length
27577         as poly_uint64s rather than unsigned ints.
27578         * targhooks.h (default_get_mask_mode): Update accordingly.
27579         * targhooks.c (default_get_mask_mode): Likewise.
27580         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
27581         * doc/tm.texi: Regenerate.
27583 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27584             Alan Hayward  <alan.hayward@arm.com>
27585             David Sherwood  <david.sherwood@arm.com>
27587         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
27588         * omp-general.c (omp_max_vf): Likewise.
27589         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
27590         (expand_omp_simd): Handle polynomial safelen.
27591         * omp-low.c (omplow_simd_context): Add a default constructor.
27592         (omplow_simd_context::max_vf): Change from int to poly_uint64.
27593         (lower_rec_simd_input_clauses): Update accordingly.
27594         (lower_rec_input_clauses): Likewise.
27596 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27597             Alan Hayward  <alan.hayward@arm.com>
27598             David Sherwood  <david.sherwood@arm.com>
27600         * tree-vectorizer.h (vect_nunits_for_cost): New function.
27601         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
27602         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
27603         (vect_analyze_slp_cost): Likewise.
27604         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
27605         (vect_model_load_cost): Likewise.
27607 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27608             Alan Hayward  <alan.hayward@arm.com>
27609             David Sherwood  <david.sherwood@arm.com>
27611         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
27612         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
27613         from an unsigned int * to a poly_uint64_pod *.
27614         (calculate_unrolling_factor): New function.
27615         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
27617 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27618             Alan Hayward  <alan.hayward@arm.com>
27619             David Sherwood  <david.sherwood@arm.com>
27621         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
27622         from an unsigned int to a poly_uint64.
27623         (_loop_vec_info::slp_unrolling_factor): Likewise.
27624         (_loop_vec_info::vectorization_factor): Change from an int
27625         to a poly_uint64.
27626         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
27627         (vect_get_num_vectors): New function.
27628         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
27629         (vect_get_num_copies): Use vect_get_num_vectors.
27630         (vect_analyze_data_ref_dependences): Change max_vf from an int *
27631         to an unsigned int *.
27632         (vect_analyze_data_refs): Change min_vf from an int * to a
27633         poly_uint64 *.
27634         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27635         than an unsigned HOST_WIDE_INT.
27636         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
27637         (vect_analyze_data_ref_dependence): Change max_vf from an int *
27638         to an unsigned int *.
27639         (vect_analyze_data_ref_dependences): Likewise.
27640         (vect_compute_data_ref_alignment): Handle polynomial vf.
27641         (vect_enhance_data_refs_alignment): Likewise.
27642         (vect_prune_runtime_alias_test_list): Likewise.
27643         (vect_shift_permute_load_chain): Likewise.
27644         (vect_supportable_dr_alignment): Likewise.
27645         (dependence_distance_ge_vf): Take the vectorization factor as a
27646         poly_uint64 rather than an unsigned HOST_WIDE_INT.
27647         (vect_analyze_data_refs): Change min_vf from an int * to a
27648         poly_uint64 *.
27649         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
27650         vfm1 as a poly_uint64 rather than an int.  Make the same change
27651         for the returned bound_scalar.
27652         (vect_gen_vector_loop_niters): Handle polynomial vf.
27653         (vect_do_peeling): Likewise.  Update call to
27654         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
27655         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
27656         be constant.
27657         * tree-vect-loop.c (vect_determine_vectorization_factor)
27658         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
27659         (vect_get_known_peeling_cost): Likewise.
27660         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
27661         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
27662         (vect_transform_loop): Likewise.  Use the lowest possible VF when
27663         updating the upper bounds of the loop.
27664         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
27665         rather than an int.
27666         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
27667         polynomial unroll factors.
27668         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
27669         (vect_make_slp_decision): Likewise.
27670         (vect_supported_load_permutation_p): Likewise, and polynomial
27671         vf too.
27672         (vect_analyze_slp_cost): Handle polynomial vf.
27673         (vect_slp_analyze_node_operations): Likewise.
27674         (vect_slp_analyze_bb_1): Likewise.
27675         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27676         than an unsigned HOST_WIDE_INT.
27677         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
27678         (vectorizable_load): Handle polynomial vf.
27679         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
27680         a poly_uint64.
27681         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
27683 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27684             Alan Hayward  <alan.hayward@arm.com>
27685             David Sherwood  <david.sherwood@arm.com>
27687         * match.pd: Handle bit operations involving three constants
27688         and try to fold one pair.
27690 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27692         * tree-vect-loop-manip.c: Include gimple-fold.h.
27693         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
27694         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
27695         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
27696         Add a path that uses a step of VF instead of 1, but disable it
27697         for now.
27698         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
27699         and niters_no_overflow parameters.  Update calls to
27700         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
27701         Create a new SSA name if the latter choses to use a ste other
27702         than zero, and return it via niters_vector_mult_vf_var.
27703         * tree-vect-loop.c (vect_transform_loop): Update calls to
27704         vect_do_peeling, vect_gen_vector_loop_niters and
27705         slpeel_make_loop_iterate_ntimes.
27706         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
27707         (vect_gen_vector_loop_niters): Update declarations after above changes.
27709 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
27711         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
27712         128-bit round to integer instructions.
27713         (ceil<mode>2): Likewise.
27714         (btrunc<mode>2): Likewise.
27715         (round<mode>2): Likewise.
27717 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27719         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
27720         unaligned VSX load/store on P8/P9.
27721         (expand_block_clear): Allow the use of unaligned VSX
27722         load/store on P8/P9.
27724 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27726         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
27727         New function.
27728         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
27729         swap associated with both a load and a store.
27731 2018-01-02  Andrew Waterman  <andrew@sifive.com>
27733         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
27734         * config/riscv/riscv.md (clear_cache): Use it.
27736 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
27738         * web.c: Remove out-of-date comment.
27740 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27742         * expr.c (fixup_args_size_notes): Check that any existing
27743         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
27744         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
27745         (emit_single_push_insn): ...here.
27747 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27749         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
27750         (const_vector_encoded_nelts): New function.
27751         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
27752         (const_vector_int_elt, const_vector_elt): Declare.
27753         * emit-rtl.c (const_vector_int_elt_1): New function.
27754         (const_vector_elt): Likewise.
27755         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
27756         of CONST_VECTOR_ELT.
27758 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27760         * expr.c: Include rtx-vector-builder.h.
27761         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
27762         directly on the tree encoding.
27763         (const_vector_from_tree): Likewise.
27764         * optabs.c: Include rtx-vector-builder.h.
27765         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
27766         sequence of "u" values.
27767         * vec-perm-indices.c: Include rtx-vector-builder.h.
27768         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
27769         directly on the vec_perm_indices encoding.
27771 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27773         * doc/rtl.texi (const_vector): Describe new encoding scheme.
27774         * Makefile.in (OBJS): Add rtx-vector-builder.o.
27775         * rtx-vector-builder.h: New file.
27776         * rtx-vector-builder.c: Likewise.
27777         * rtl.h (rtx_def::u2): Add a const_vector field.
27778         (CONST_VECTOR_NPATTERNS): New macro.
27779         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
27780         (CONST_VECTOR_DUPLICATE_P): Likewise.
27781         (CONST_VECTOR_STEPPED_P): Likewise.
27782         (CONST_VECTOR_ENCODED_ELT): Likewise.
27783         (const_vec_duplicate_p): Check for a duplicated vector encoding.
27784         (unwrap_const_vec_duplicate): Likewise.
27785         (const_vec_series_p): Check for a non-duplicated vector encoding.
27786         Say that the function only returns true for integer vectors.
27787         * emit-rtl.c: Include rtx-vector-builder.h.
27788         (gen_const_vec_duplicate_1): Delete.
27789         (gen_const_vector): Call gen_const_vec_duplicate instead of
27790         gen_const_vec_duplicate_1.
27791         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
27792         (gen_const_vec_duplicate): Use rtx_vector_builder.
27793         (gen_const_vec_series): Likewise.
27794         (gen_rtx_CONST_VECTOR): Likewise.
27795         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
27796         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27797         Build a new vector rather than modifying a CONST_VECTOR in-place.
27798         (handle_special_swappables): Update call accordingly.
27799         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
27800         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27801         Build a new vector rather than modifying a CONST_VECTOR in-place.
27802         (handle_special_swappables): Update call accordingly.
27804 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27806         * simplify-rtx.c (simplify_const_binary_operation): Use
27807         CONST_VECTOR_ELT instead of XVECEXP.
27809 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27811         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
27812         the selector elements to be different from the data elements
27813         if the selector is a VECTOR_CST.
27814         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
27815         ssizetype for the selector.
27817 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27819         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
27820         before testing each element individually.
27821         * tree-vect-generic.c (lower_vec_perm): Likewise.
27823 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27825         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
27826         * selftest-run-tests.c (selftest::run_tests): Call it.
27827         * vector-builder.h (vector_builder::operator ==): New function.
27828         (vector_builder::operator !=): Likewise.
27829         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
27830         (vec_perm_indices::all_from_input_p): New function.
27831         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27832         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
27833         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
27834         instead of reading the VECTOR_CST directly.  Detect whether both
27835         vector inputs are the same before constructing the vec_perm_indices,
27836         and update the number of inputs argument accordingly.  Use the
27837         utility functions added above.  Only construct sel2 if we need to.
27839 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27841         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
27842         the broadcast of the low byte.
27843         (expand_mult_highpart): Use an explicit encoding for the permutes.
27844         * optabs-query.c (can_mult_highpart_p): Likewise.
27845         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
27846         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27847         (vectorizable_bswap): Likewise.
27848         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
27849         explicit encoding for the power-of-2 permutes.
27850         (vect_permute_store_chain): Likewise.
27851         (vect_grouped_load_supported): Likewise.
27852         (vect_permute_load_chain): Likewise.
27854 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27856         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
27857         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
27858         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
27859         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27860         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
27861         (vect_gen_perm_mask_any): Likewise.
27863 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27865         * int-vector-builder.h: New file.
27866         * vec-perm-indices.h: Include int-vector-builder.h.
27867         (vec_perm_indices): Redefine as an int_vector_builder.
27868         (auto_vec_perm_indices): Delete.
27869         (vec_perm_builder): Redefine as a stand-alone class.
27870         (vec_perm_indices::vec_perm_indices): New function.
27871         (vec_perm_indices::clamp): Likewise.
27872         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
27873         (vec_perm_indices::new_vector): New function.
27874         (vec_perm_indices::new_expanded_vector): Update for new
27875         vec_perm_indices class.
27876         (vec_perm_indices::rotate_inputs): New function.
27877         (vec_perm_indices::all_in_range_p): Operate directly on the
27878         encoded form, without computing elided elements.
27879         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
27880         encoding.  Update for new vec_perm_indices class.
27881         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
27882         the given vec_perm_builder.
27883         (expand_vec_perm_var): Update vec_perm_builder constructor.
27884         (expand_mult_highpart): Use vec_perm_builder instead of
27885         auto_vec_perm_indices.
27886         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
27887         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
27888         or double series encoding as appropriate.
27889         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
27890         vec_perm_indices instead of auto_vec_perm_indices.
27891         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27892         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27893         (vect_permute_store_chain): Likewise.
27894         (vect_grouped_load_supported): Likewise.
27895         (vect_permute_load_chain): Likewise.
27896         (vect_shift_permute_load_chain): Likewise.
27897         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27898         (vect_transform_slp_perm_load): Likewise.
27899         (vect_schedule_slp_instance): Likewise.
27900         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27901         (vectorizable_mask_load_store): Likewise.
27902         (vectorizable_bswap): Likewise.
27903         (vectorizable_store): Likewise.
27904         (vectorizable_load): Likewise.
27905         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
27906         vec_perm_indices instead of auto_vec_perm_indices.  Use
27907         tree_to_vec_perm_builder to read the vector from a tree.
27908         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
27909         vec_perm_builder instead of a vec_perm_indices.
27910         (have_whole_vector_shift): Use vec_perm_builder and
27911         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
27912         truncation to calc_vec_perm_mask_for_shift.
27913         (vect_create_epilog_for_reduction): Likewise.
27914         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
27915         from auto_vec_perm_indices to vec_perm_indices.
27916         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27917         instead of changing individual elements.
27918         (aarch64_vectorize_vec_perm_const): Use new_vector to install
27919         the vector in d.perm.
27920         * config/arm/arm.c (expand_vec_perm_d::perm): Change
27921         from auto_vec_perm_indices to vec_perm_indices.
27922         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27923         instead of changing individual elements.
27924         (arm_vectorize_vec_perm_const): Use new_vector to install
27925         the vector in d.perm.
27926         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
27927         Update vec_perm_builder constructor.
27928         (rs6000_expand_interleave): Likewise.
27929         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
27930         (rs6000_expand_interleave): Likewise.
27932 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27934         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
27935         to qimode could truncate the indices.
27936         * optabs.c (expand_vec_perm_var): Likewise.
27938 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27940         * Makefile.in (OBJS): Add vec-perm-indices.o.
27941         * vec-perm-indices.h: New file.
27942         * vec-perm-indices.c: Likewise.
27943         * target.h (vec_perm_indices): Replace with a forward class
27944         declaration.
27945         (auto_vec_perm_indices): Move to vec-perm-indices.h.
27946         * optabs.h: Include vec-perm-indices.h.
27947         (expand_vec_perm): Delete.
27948         (selector_fits_mode_p, expand_vec_perm_var): Declare.
27949         (expand_vec_perm_const): Declare.
27950         * target.def (vec_perm_const_ok): Replace with...
27951         (vec_perm_const): ...this new hook.
27952         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
27953         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
27954         * doc/tm.texi: Regenerate.
27955         * optabs.def (vec_perm_const): Delete.
27956         * doc/md.texi (vec_perm_const): Likewise.
27957         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
27958         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
27959         expand_vec_perm for constant permutation vectors.  Assert that
27960         the mode of variable permutation vectors is the integer equivalent
27961         of the mode that is being permuted.
27962         * optabs-query.h (selector_fits_mode_p): Declare.
27963         * optabs-query.c: Include vec-perm-indices.h.
27964         (selector_fits_mode_p): New function.
27965         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
27966         is defined, instead of checking whether the vec_perm_const_optab
27967         exists.  Use targetm.vectorize.vec_perm_const instead of
27968         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
27969         fit in the vector mode before using a variable permute.
27970         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
27971         vec_perm_indices instead of an rtx.
27972         (expand_vec_perm): Replace with...
27973         (expand_vec_perm_const): ...this new function.  Take the selector
27974         as a vec_perm_indices rather than an rtx.  Also take the mode of
27975         the selector.  Update call to shift_amt_for_vec_perm_mask.
27976         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
27977         Use vec_perm_indices::new_expanded_vector to expand the original
27978         selector into bytes.  Check whether the indices fit in the vector
27979         mode before using a variable permute.
27980         (expand_vec_perm_var): Make global.
27981         (expand_mult_highpart): Use expand_vec_perm_const.
27982         * fold-const.c: Includes vec-perm-indices.h.
27983         * tree-ssa-forwprop.c: Likewise.
27984         * tree-vect-data-refs.c: Likewise.
27985         * tree-vect-generic.c: Likewise.
27986         * tree-vect-loop.c: Likewise.
27987         * tree-vect-slp.c: Likewise.
27988         * tree-vect-stmts.c: Likewise.
27989         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
27990         Delete.
27991         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
27992         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
27993         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
27994         (aarch64_vectorize_vec_perm_const): ...this new function.
27995         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27996         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27997         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
27998         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
27999         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28000         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28001         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
28002         into...
28003         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
28004         check for NEON modes.
28005         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
28006         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
28007         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
28008         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
28009         into...
28010         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
28011         the old VEC_PERM_CONST conditions.
28012         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
28013         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
28014         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
28015         (ia64_vectorize_vec_perm_const_ok): Merge into...
28016         (ia64_vectorize_vec_perm_const): ...this new function.
28017         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
28018         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
28019         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
28020         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
28021         * config/mips/mips.c (mips_expand_vec_perm_const)
28022         (mips_vectorize_vec_perm_const_ok): Merge into...
28023         (mips_vectorize_vec_perm_const): ...this new function.
28024         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
28025         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
28026         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
28027         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
28028         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
28029         (rs6000_expand_vec_perm_const): Delete.
28030         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
28031         Delete.
28032         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28033         (altivec_expand_vec_perm_const_le): Take each operand individually.
28034         Operate on constant selectors rather than rtxes.
28035         (altivec_expand_vec_perm_const): Likewise.  Update call to
28036         altivec_expand_vec_perm_const_le.
28037         (rs6000_expand_vec_perm_const): Delete.
28038         (rs6000_vectorize_vec_perm_const_ok): Delete.
28039         (rs6000_vectorize_vec_perm_const): New function.
28040         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28041         an element count and rtx array.
28042         (rs6000_expand_extract_even): Update call accordingly.
28043         (rs6000_expand_interleave): Likewise.
28044         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
28045         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
28046         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
28047         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
28048         (rs6000_expand_vec_perm_const): Delete.
28049         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28050         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28051         (altivec_expand_vec_perm_const_le): Take each operand individually.
28052         Operate on constant selectors rather than rtxes.
28053         (altivec_expand_vec_perm_const): Likewise.  Update call to
28054         altivec_expand_vec_perm_const_le.
28055         (rs6000_expand_vec_perm_const): Delete.
28056         (rs6000_vectorize_vec_perm_const_ok): Delete.
28057         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
28058         reference to the SPE evmerge intructions.
28059         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28060         an element count and rtx array.
28061         (rs6000_expand_extract_even): Update call accordingly.
28062         (rs6000_expand_interleave): Likewise.
28063         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
28064         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
28065         new function.
28066         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28068 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28070         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
28071         vector mode and that that mode matches the mode of the data
28072         being permuted.
28073         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
28074         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
28075         directly using expand_vec_perm_1 when forcing selectors into
28076         registers.
28077         (expand_vec_perm_var): New function, split out from expand_vec_perm.
28079 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28081         * optabs-query.h (can_vec_perm_p): Delete.
28082         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
28083         * optabs-query.c (can_vec_perm_p): Split into...
28084         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
28085         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
28086         particular selector is valid.
28087         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28088         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28089         (vect_grouped_load_supported): Likewise.
28090         (vect_shift_permute_load_chain): Likewise.
28091         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
28092         (vect_transform_slp_perm_load): Likewise.
28093         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28094         (vectorizable_bswap): Likewise.
28095         (vect_gen_perm_mask_checked): Likewise.
28096         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
28097         implementations of variable permutation vectors into account
28098         when deciding which selector to use.
28099         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
28100         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
28101         with a false third argument.
28102         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
28103         to test whether the constant selector is valid and can_vec_perm_var_p
28104         to test whether a variable selector is valid.
28106 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28108         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
28109         * optabs-query.c (can_vec_perm_p): Likewise.
28110         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
28111         instead of vec_perm_indices.
28112         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
28113         (vect_gen_perm_mask_checked): Likewise,
28114         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
28115         (vect_gen_perm_mask_checked): Likewise,
28117 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28119         * optabs-query.h (qimode_for_vec_perm): Declare.
28120         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
28121         (qimode_for_vec_perm): ...this new function.
28122         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
28124 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28126         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
28127         does not have a conditional at the top.
28129 2018-01-02  Richard Biener  <rguenther@suse.de>
28131         * ipa-inline.c (big_speedup_p): Fix expression.
28133 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
28135         PR target/81616
28136         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
28137         for generic 4->6.
28139 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
28141         PR target/81616
28142         Generic tuning.
28143         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
28144         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
28145         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
28146         cond_taken_branch_cost 3->4.
28148 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
28150         PR tree-optimization/83581
28151         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
28152         TODO_cleanup_cfg if any changes have been made.
28154         PR middle-end/83608
28155         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
28156         convert_modes if target mode has the right side, but different mode
28157         class.
28159         PR middle-end/83609
28160         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
28161         last argument when extracting from CONCAT.  If either from_real or
28162         from_imag is NULL, use expansion through memory.  If result is not
28163         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
28164         the parts directly to inner mode, if even that fails, use expansion
28165         through memory.
28167         PR middle-end/83623
28168         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
28169         check for bswap in mode rather than HImode and use that in expand_unop
28170         too.
28172 Copyright (C) 2018 Free Software Foundation, Inc.
28174 Copying and distribution of this file, with or without modification,
28175 are permitted in any medium without royalty provided the copyright
28176 notice and this notice are preserved.