C++: suggestions for misspelled private members (PR c++/84993)
[official-gcc.git] / gcc / ChangeLog
blob8172fcd927646f4db3f5503c6712cd0ce907d03a
1 2018-10-11  Doug Rupp  <rupp@adacore.com>
2             Olivier Hainque  <hainque@adacore.com>
4         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
5         Pass --relax to the linker for RTPs.
6         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
8 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
9             Jan Hubicka  <jh@suse.cz>
10             Martin Jambor  <mjambor@suse.cz>
12         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
13         the same elements are repeated rather than printing all of them.
14         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
15         "repeated" elements.
16         * read-rtl-function.c (test_loading_repeat): New function.
17         (read_rtl_function_c_tests): Call test_loading_repeat.
18         * rtl-tests.c (test_dumping_repeat): New function.
19         (rtl_tests_c_tests): Call test_dumping_repeat.
21 2018-10-11  Richard Biener  <rguenther@suse.de>
23         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
24         bdver?_cost): Unify to ...
25         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
26         * config/i386/i386.c (processor_cost_table): Adjust.
28 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
30         PR middle-end/87574
31         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
32         the thunk when expanding to GIMPLE.
34 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
36         * varasm.c (mergeable_string_section): Don't try to move zero-length
37         strings to the merge section.
39 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
41         PR target/87573
42         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
44 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
46         PR target/87550
47         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
48         to special_args set.
50 2018-10-10  Richard Biener  <rguenther@suse.de>
52         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
53         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
54         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
55         and recursing and pattern terminating the recursion on SSE
56         vector width using ix86_expand_reduc.
57         (reduc_sminmax_scal_<mode>): Split into part reducing to half
58         width and recursing and SSE2 vector variant doing the final
59         reduction with ix86_expand_reduc.
60         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
61         with terminating the recursion at AVX level, splitting that
62         to SSE there.
64 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
66         * genmatch.c (error_cb): Rename to...
67         (diagnostic_cb): ...this, converting int params to enums.
68         (fatal_at): Update for renaming.
69         (warning_at): Likewise.
70         (main): Likewise.
71         * input.c (selftest::ebcdic_execution_charset::apply):
72         Update for renaming of...
73         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
74         to...
75         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
76         converting level and reason to enums.
77         (class selftest::lexer_error_sink): Rename to...
78         (class selftest::lexer_test_options): ...this, renaming field
79         "m_errors" to "m_diagnostics".
80         (selftest::lexer_test_options::apply): Update for renaming of...
81         (selftest::lexer_test_options::on_error): ...this, renaming to...
82         (selftest::lexer_test_options::on_diagnostic): ...this
83         converting level and reason to enums.
84         (selftest::test_lexer_string_locations_raw_string_unterminated):
85         Update for renamings.
86         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
87         "reason".
89 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
91         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
92         * config/rs6000/pmmintrin.h: New file.
94 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
96         PR tree-optimization/86659
97         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
99 2018-10-09  Richard Biener  <rguenther@suse.de>
101         PR tree-optimization/63155
102         * tree-ssa-structalias.c: Include tree-ssa.h.
103         (get_constraint_for_ssa_var): For undefs return nothing_id.
104         (find_func_aliases): Cleanup PHI handling.
106 2018-10-09  Richard Biener  <rguenther@suse.de>
108         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
109         replacements.
111 2018-10-09  Martin Liska  <mliska@suse.cz>
113         * asan.c (asan_emit_stack_protection): If a stack variable
114         is located in a same file as current function, then emit
115         line info into variable definition string.
117 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
119         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
120         information.
122 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
124         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
125         on the thunk.
127 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
129         PR tree-optimization/86659
130         * gimple-match.h (struct gimple_match_op): Add reverse field.
131         (gimple_match_op::set_op): New overloaded method.
132         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
133         the REF_REVERSE_STORAGE_ORDER flag on the value.
134         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
135         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
136         
137 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
139         PR middle-end/63155
140         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
141         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
143 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
145         PR target/87517
146         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
147         Defined with __builtin_ia32_vfmaddsubpd512_mask.
149 2018-10-08  Richard Biener  <rguenther@suse.de>
151         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
152         cost the same as AVX128 ones.
154 2018-10-08  Paul Koning  <ni1d@arrl.net>
156         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
157         (expand_block_move): New function.
158         * config/pdp11/pdp11.c (output_block_move): Remove.
159         (expand_block_move): New function.
160         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
161         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
162         (*movmemhi1): Remove.
164 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
166         * config/s390/2827.md: Increase latencies for some FP instructions.
168 2018-10-08  Richard Biener  <rguenther@suse.de>
170         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
171         Open a dump scope.
172         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
173         * tree-vectorizer.h (dump_stmt_cost): Adjust.
174         (add_stmt_cost): Dump return value of the hook.
176 2018-10-08  Richard Biener  <rguenther@suse.de>
178         PR tree-optimization/63155
179         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
180         (ssa_propagation_engine::ssa_propagate): Remove redundant
181         bitmap bit clearing.
183 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
185         PR rtl-optimization/86939
186         PR rtl-optimization/87479
187         * ira.h (non_conflicting_reg_copy_p): New prototype.
188         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
189         (make_hard_regno_dead): Don't add conflicts for register
190         ignore_reg_for_conflicts.
191         (make_object_dead): Likewise.
192         (non_conflicting_reg_copy_p): New function.
193         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
194         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
195         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
196         (make_hard_regno_dead): Don't add conflicts for register
197         ignore_reg_for_conflicts.  Remove special conflict handling of
198         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
199         check_pic_pseudo_p and update callers.
200         (mark_pseudo_dead): Don't add conflicts for register
201         ignore_reg_for_conflicts.
202         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
204 2018-10-05  Andrew Waterman  <andrew@sifive.com>
205             Jim Wilson  <jimw@sifive.com>
207         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
208         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
209         new pattern using HONOR_SNANS that emits one extra instruction.
211 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
213         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
214         patterns): Merge SI and DI patterns to a GPR pattern.
215         (unnamed define_insn and define_split for record form of that): Merge
216         to a single define_insn_and_split pattern.
218 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
220         PR c++/56856
221         * input.c (expand_location_to_spelling_point): Add param "aspect"
222         and use rather than hardcoding LOCATION_ASPECT_CARET.
223         (get_substring_ranges_for_loc): Handle the case of a single token
224         within a macro expansion.
225         * input.h (expand_location_to_spelling_point): Add "aspect" param,
226         defaulting to LOCATION_ASPECT_CARET.
228 2018-10-05  Paul Koning  <ni1d@arrl.net>
230         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
231         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
232         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
233         (pdp11_guard_type): New function.
235 2018-10-05  Paul Koning  <ni1d@arrl.net>
237         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
238         * config/pdp11/pdp11.opt (mfloat32): Remove.
239         (mfloat64): Remove.
240         * doc/invoke.texi (pdp11 -mfloat32): Remove:
241         (pdp11 -mfloat64): Remove.
243 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
245         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
246         (*cmp<mode>_cc_i387): Ditto.
247         (*cmpu<mode>_cc_i387): Ditto.
248         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
249         * config/i386/i386.c (ix86_expand_fp_compare): Remove
250         "scratch" argument.
251         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
252         Emit x86_sahf_1 pattern.
253         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
254         (ix86_expand_carry_flag_compare): Ditto.
256 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
258         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
259         to reg_or_0_operand.  Add "C" constraint.
260         (*cmpxf_cc_i387): Ditto.
261         (*cmp<mode>_i387): Change operand 2 predicate
262         to nonimm_or_0_operand.  Add "C" constraint.
263         (*cmp<mode>_cc_i387): Ditto.
264         (*cmp<mode>_0_i387): Remove insn pattern.
265         (*cmp<mode>_0_cc_i387): Ditto.
267 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
269         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
270         * config/i386/predicates.md (nonimm_or_0_operand): Rename
271         from vector_move_operand.  Update all uses.
273 2018-10-05  Martin Sebor  <msebor@redhat.com>
275         PR tree-optimization/87490
276         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
277         consistently.
279 2018-10-05  Richard Biener  <rguenther@suse.de>
281         PR tree-optimization/63155
282         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
283         vertical space in dumpfiles.
284         * tree-ssa-propagate.h
285         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
286         * tree-ssa-propagate.c (cfg_blocks_back): New global.
287         (ssa_edge_worklist_back): Likewise.
288         (curr_order): Likewise.
289         (cfg_blocks_get): Remove abstraction.
290         (cfg_blocks_add): Likewise.
291         (cfg_blocks_empty_p): Likewise.
292         (add_ssa_edge): Add to current or next worklist based on
293         RPO index.
294         (add_control_edge): Likewise.
295         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
296         into ...
297         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
298         iteration from CFG and SSA edge worklist so we process
299         everything in RPO order, prioritizing forward progress
300         over iteration.
301         (ssa_prop_init): Allocate new worklists, do not dump
302         immediate uses.
303         (ssa_prop_fini): Free new worklists.
305 2018-10-05  Richard Biener  <rguenther@suse.de>
307         * tree-core.h (tree_block::abstract_flag): Remove.
308         (tree_block::block_num): Make full 32bits.
309         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
310         * tree.h (BLOCK_ABSTRACT): Remove.
311         * dwarf2out.c (gen_lexical_block_die): Remove dead code
312         resulting from BLOCK_ABSTRACT being always false.
313         (gen_inlined_subroutine_die): Likewise.
314         (gen_block_die): Likewise.
315         * tree.c (block_ultimate_origin): Likewise.
316         * tree-pretty-print.c (dump_block_node): Remove code dealing
317         with BLOCK_ABSTRACT.
318         * tree-ssa-live.c (dump_scope_block): Likewise.
319         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
320         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
322 2018-10-05   Richard Biener  <rguenther@suse.de>
324         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
325         is asked for initialize mode to the component mode of the
326         vector type.
328 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
330         PR target/87522
331         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
332         assembler for -mavx.
333         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
335 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
337         PR target/87509
338         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
339         RS6000_BTM_DFP.
340         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
341         to be DImode.  When using mffscrn, force the operand to a register.
343 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
345         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
346         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
347         X87MODEF mode iterator.
348         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
349         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
350         X87MODEF mode iterator.
352 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
354         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
355         -Wno-prio-ctor-dtor.
357 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
359         * Makefile.in (OBJS): Add opt-problem.o.
360         * dump-context.h: Include "selftest.h.
361         (selftest::temp_dump_context): New forward decl.
362         (class dump_context): Make friend of class
363         selftest::temp_dump_context.
364         (dump_context::dump_loc_immediate): New decl.
365         (class dump_pretty_printer): Move here from dumpfile.c.
366         (class temp_dump_context): Move to namespace selftest.
367         (temp_dump_context::temp_dump_context): Add param
368         "forcibly_enable_dumping".
369         (selftest::verify_dumped_text):
370         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
371         (selftest::verify_item):
372         (ASSERT_IS_TEXT): Move here from dumpfile.c.
373         (ASSERT_IS_TREE): Likewise.
374         (ASSERT_IS_GIMPLE): Likewise.
375         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
376         to...
377         (dump_context::dump_loc_immediate): ...this new function.
378         (class dump_pretty_printer): Move to dump-context.h.
379         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
380         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
381         (temp_dump_context::temp_dump_context): Move to "selftest"
382         namespace.  Add param "forcibly_enable_dumping", and use it to
383         conditionalize the use of m_pp;
384         (selftest::verify_dumped_text): Make non-static.
385         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
386         (selftest::verify_item): Make non-static.
387         (ASSERT_IS_TEXT): Move to dump-context.h.
388         (ASSERT_IS_TREE): Likewise.
389         (ASSERT_IS_GIMPLE): Likewise.
390         (selftest::test_capture_of_dump_calls): Pass "true" for new
391         param of temp_dump_context.
392         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
393         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
394         TDF_COMPARE_DEBUG.
395         * opt-problem.cc: New file.
396         * opt-problem.h: New file.
397         * optinfo-emit-json.cc
398         (selftest::test_building_json_from_dump_calls): Pass "true" for
399         new param of temp_dump_context.
400         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
401         (optinfo::emit_for_opt_problem): New function.
402         (optinfo::emit): Clarity which emit_item is used.
403         * optinfo.h (optinfo::get_dump_location): New accessor.
404         (optinfo::emit_for_opt_problem): New decl.
405         (optinfo::emit): Make const.
406         * selftest-run-tests.c (selftest::run_tests): Call
407         selftest::opt_problem_cc_tests.
408         * selftest.h (selftest::opt_problem_cc_tests): New decl.
409         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
410         bool to opt_result, converting fprintf messages to
411         opt_result::failure_at calls.  Add "stmt" param for use by the
412         failure_at calls.
413         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
414         (runtime_alias_check_p): Convert return type from bool to
415         opt_result, converting dump_printf calls to
416         opt_result::failure_at, using the statement DDR_A for their
417         location.
418         (find_data_references_in_stmt): Convert return type from bool to
419         opt_result, converting "return false" to opt_result::failure_at
420         with a new message.
421         * tree-data-ref.h: Include "opt-problem.h".
422         (dr_analyze_innermost): Convert return type from bool to opt_result,
423         and add a const gimple * param.
424         (find_data_references_in_stmt): Convert return type from bool to
425         opt_result.
426         (runtime_alias_check_p): Likewise.
427         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
428         dr_analyze_innermost.
429         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
430         Convert return type from bool to opt_result, adding a message for
431         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
432         (vect_analyze_data_ref_dependence): Convert return type from bool
433         to opt_result.  Change sense of return type from "false"
434         effectively meaning "no problems" to "false" meaning a problem,
435         so that "return false" becomes "return opt_result::success".
436         Convert "return true" calls to opt_result::failure_at, using
437         the location of statement A rather than vect_location.
438         (vect_analyze_data_ref_dependences): Convert return type from bool
439         to opt_result.
440         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
441         calls to opt_result::failure_at, using the stmt location rather
442         than vect_location.
443         (vect_verify_datarefs_alignment): Convert return type from bool
444         to opt_result.
445         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
446         into multiple more-tightly-scoped copies.
447         (vect_analyze_data_refs_alignment): Convert return type from bool
448         to opt_result.
449         (vect_analyze_data_ref_accesses): Likewise, converting a
450         "return false" to a "return opt_result::failure_at", adding a
451         new message.
452         (vect_prune_runtime_alias_test_list): Convert return type from
453         bool to opt_result, converting dump_printf_loc to
454         opt_result::failure_at.  Add a %G to show the pertinent statement,
455         and use the stmt's location rather than vect_location.
456         (vect_find_stmt_data_reference): Convert return type from
457         bool to opt_result, converting dump_printf_loc to
458         opt_result::failure_at, using stmt's location.
459         (vect_analyze_data_refs):  Convert return type from bool to
460         opt_result.  Convert "return false" to "return
461         opt_result::failure_at", adding messages as needed.
462         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
463         type from bool to opt_result.
464         (vect_determine_vf_for_stmt): Likewise.
465         (vect_determine_vectorization_factor): Likewise, converting
466         dump_printf_loc to opt_result::failure_at, using location of phi
467         rather than vect_location.
468         (vect_analyze_loop_form_1): Convert return type from bool to
469         opt_result, converting dump_printf_loc calls, retaining the use of
470         vect_location.
471         (vect_analyze_loop_form): Convert return type from loop_vec_info
472         to opt_loop_vec_info.
473         (vect_analyze_loop_operations): Convert return type from bool to
474         opt_result, converting dump_printf_loc calls, using the location
475         of phi/stmt rather than vect_location where available.  Convert
476         various "return false" to "return opt_result::failure_at" with
477         "unsupported phi" messages.
478         (vect_get_datarefs_in_loop): Convert return type from bool to
479         opt_result.  Add a message for the
480         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
481         (vect_analyze_loop_2): Convert return type from bool to
482         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
483         each "goto again;", adding new messages where needed.
484         Add "unsupported grouped {store|load}" messages.
485         (vect_analyze_loop): Convert return type from loop_vec_info to
486         opt_loop_vec_info.
487         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
488         bool to opt_result.
489         * tree-vect-stmts.c (process_use): Likewise, converting
490         dump_printf_loc call and using stmt location, rather than
491         vect_location.
492         (vect_mark_stmts_to_be_vectorized): Likeise.
493         (vect_analyze_stmt): Likewise, adding a %G.
494         (vect_get_vector_types_for_stmt): Convert return type from bool to
495         opt_result, converting dump_printf_loc calls and using stmt
496         location, rather than vect_location.
497         (vect_get_mask_type_for_stmt): Convert return type from tree to
498         opt_tree, converting dump_printf_loc calls and using stmt location.
499         * tree-vectorizer.c: Include "opt-problem.h.
500         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
501         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
502         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
503         enabled, use it to report at the top level "couldn't vectorize
504         loop" followed by the problem.
505         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
506         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
507         to opt_result.
508         (vect_analyze_stmt): Likewise.
509         (vect_get_vector_types_for_stmt): Likewise.
510         (tree vect_get_mask_type_for_stmt): Likewise.
511         (vect_analyze_data_ref_dependences): Likewise.
512         (vect_enhance_data_refs_alignment): Likewise.
513         (vect_analyze_data_refs_alignment): Likewise.
514         (vect_verify_datarefs_alignment): Likewise.
515         (vect_analyze_data_ref_accesses): Likewise.
516         (vect_prune_runtime_alias_test_list): Likewise.
517         (vect_find_stmt_data_reference): Likewise.
518         (vect_analyze_data_refs): Likewise.
519         (vect_analyze_loop): Convert return type from loop_vec_info to
520         opt_loop_vec_info.
521         (vect_analyze_loop_form): Likewise.
522         (vect_analyze_slp): Convert return type from bool to opt_result.
524 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
526         * doc/invoke.texi (-fopt-info): Document new "internals"
527         sub-option.
528         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
529         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
530         MSG_ALL_KINDS.
531         (optinfo_verbosity_options): Add "internals".
532         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
533         (dump_context::apply_dump_filter_p): New member function.
534         (dump_context::dump_loc): Use apply_dump_filter_p rather than
535         explicitly masking the dump_kind.
536         (dump_context::begin_scope): Increment the scope depth first.  Use
537         apply_dump_filter_p rather than explicitly masking the dump_kind.
538         (dump_context::emit_item): Use apply_dump_filter_p rather than
539         explicitly masking the dump_kind.
540         (dump_dec): Likewise.
541         (dump_hex): Likewise.
542         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
543         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
544         (opt_info_switch_p): Update handling of default
545         MSG_OPTIMIZED_LOCATIONS to cope with default of
546         MSG_PRIORITY_USER_FACING.
547         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
548         masking the dump_kind.
549         (selftest::test_capture_of_dump_calls): Update test_dump_context
550         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
551         than MSG_ALL.  Generalize scope test to be run at all four
552         combinations of with/without MSG_PRIORITY_USER_FACING and
553         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
554         for each of the two values.
555         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
556         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
557         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
558         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
559         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
560         with MSG_PRIORITY_*.
561         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
562         dump messages as MSG_PRIORITY_USER_FACING.
563         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
564         about the interaction with MSG_PRIORITY_*.
566 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
568         * varasm.c (output_constant): Add new parameter merge_strings.
569         Make strings properly zero terminated in merge string sections.
570         (mergeable_string_section): Don't fail if the last char is non-zero.
571         (assemble_variable_contents): Handle merge string sections.
572         (assemble_variable): Likewise.
573         (assemble_constant_contents): Likewise.
574         (output_constant_def_contents): Likewise.
575         (output_constructor_array_range,
576         output_constructor_regular_field): Adjust call to output_constant.
577         (output_object_block): Adjust call to assemble_constant_contents
578         and assemble_variable_contents.
580 2018-10-04  Martin Liska  <mliska@suse.cz>
582         PR c/87483
583         * cgraphunit.c (process_function_and_variable_attributes):
584         Warn about a function with alias attribute and a body.
586 2018-10-04  Martin Liska  <mliska@suse.cz>
588         PR ipa/82625
589         * multiple_target.c (redirect_to_specific_clone): New function.
590         (ipa_target_clone): Use it.
591         * tree-inline.c: Fix comment.
593 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
595         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
596         fields.
597         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
598         (gcc::dump_manager::register_pass): New member function, adapted
599         from loop body in gcc::pass_manager::register_pass, adding a
600         call to update_dfi_for_opt_info.
601         (gcc::dump_manager::opt_info_enable_passes): Store the
602         -fopt-info options into the new fields.  Move the loop
603         bodies into...
604         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
605         function.
606         * dumpfile.h (struct opt_pass): New forward decl.
607         (gcc::dump_manager::register_pass): New decl.
608         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
609         (class gcc::dump_manager): Add fields "m_optgroup_flags",
610         "m_optinfo_flags", and "m_optinfo_filename".
611         * passes.c (gcc::pass_manager::register_pass): Move all of the
612         dump-handling code to gcc::dump_manager::register_pass.
614 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
616         PR rtl-optimization/87466
617         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
618         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
619         * doc/tm.texi: Regenerate.
620         * ira-lives.c (process_bb_node_lives): Use the new target hook.
621         * lra-lives.c (process_bb_lives): Likewise.
622         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
623         Define.
625 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
627         * params.c (add_params): Fix initialization.
629 2018-10-04  Martin Liska  <mliska@suse.cz>
631         PR gcov-profile/84107
632         * tree-profile.c (init_ic_make_global_vars):
633         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
634         Come up with new ic_tuple* variables.  Emit
635         __gcov_indirect_call{,_topn} variables.
636         (gimple_gen_ic_profiler): Access the variable
637         and emit gimple.
638         (gimple_gen_ic_func_profiler): Access
639         __gcov_indirect_call.callee field.
640         (gimple_init_gcov_profiler): Use ptr_type_node.
641         * value-prof.c (gimple_ic): Use ptr_type_node.
643 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
645         PR tree-optimization/85787
646         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
647         into this function and add support for detecting multiple phis.
648         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
650 2018-10-04  Martin Liska  <mliska@suse.cz>
652         PR ipa/87491
653         * ipa-inline.c (inline_to_all_callers_1):
654         Call ultimate_alias_target for node being inlined.
656 2018-10-03  Jeff Law  <law@redhat.com>
658         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
659         target's wchar_t.
660         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
661         * tree.h (get_typenode_from_name): Prototype.
663 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
665         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
666         Change operand 2 predicate to nonimmediate_operand.
667         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
669 2018-10-03  Martin Sebor  <msebor@redhat.com>
670             Jeff Law  <law@redhat.com>
672         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
673         initialize it.
674         (get_string_length): Detect unterminated arrays.
675         (format_string): Same.
676         (format_directive): Warn about unterminated arrays.
677         (handle_gimple_call): Mark statements with no_warning as needed.
679 2018-10-03  Jim Wilson  <jimw@sifive.com>
681         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
682         also define __riscv_abi_rve.  Delete trailing white space.
684 2018-10-03  Paul Koning  <ni1d@arrl.net>
686         Enable LRA register allocator for PDP11.
687         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
688         (R): Likewise.
689         (D): Likewise.
690         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
691         * config/pdp11/pdp11.opt (-mlra): New option.
692         * doc/invoke.texi (PDP-11 Options): Document -mlra.
694 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
696         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
697         (*<absneg:code>extend<mode>xf2): Ditto.
699 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
701         PR tree-optimization/87415
702         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
703         precision fields.
705 2018-10-02  Jeff Law  <law@redhat.com>
707         * gimple-fold.c (get_range_strlen): Only set *nonstr when
708         an unterminated string is discovered.  Bubble up range
709         even for unterminated strings.
710         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
711         indicates the string was not terminated via NONSTR.
713 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
715         * tree-vrp.c (extract_range_from_unary_expr): Special case all
716         pointer conversions.
717         Do not do anything special for anti-ranges.
719 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
721         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
722         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
724 2018-10-03  Martin Liska  <mliska@suse.cz>
726         PR gcov-profile/86109
727         * coverage.c (coverage_begin_function): Do not
728         mark lambdas as artificial.
729         * tree-core.h (struct GTY): Remove tm_clone_flag
730         and introduce new lambda_function.
731         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
733 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
735         PR target/87474
736         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
737         P8_VECTOR and VSX are enabled.
739 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
741         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
742         0x3907 as CPU model number.
744 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
746         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
747         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
748         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
749         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
750         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
751         * config/s390/s390.md: Likewise. Rename also the cpu attribute
752         value from arch12 to z14.
754 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
756         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
757         (isinfxf2): Ditto.
758         (isinf<mode>2): Ditto.
760 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
762         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
763         before emitting fxam.  Perform calculations in XFmode.
765 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
767         * match.pd (((X /[ex] A) +- B) * A): New transformation.
769 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
771         PR middle-end/87319
772         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
773         * tree.c (signed_or_unsigned_type_for): Handle complex.
775 2018-10-02  Jeff Law  <law@redhat.com>
777         * gimple-fold.c (get_range_strlen): Remove dead code.
779 2018-10-02  Martin Sebor  <msebor@redhat.com>
780             Jeff Law  <law@redhat.com>
782         * builtins.c (unterminated_array): Add new arguments.
783         If argument is not terminated, bubble up size and exact
784         state to callers.
785         (expand_builtin_strnlen): Detect, avoid expanding
786         and diagnose unterminated arrays.
787         (c_strlen): Fill in offset of start of unterminated strings.
788         * builtins.h (unterminated_array): Update prototype.
790 2018-10-02  Richard Biener  <rguenther@suse.de>
792         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
793         of haddv4df, first reduce to SSE width and exploit the fact
794         that we only need element zero with the reduction result.
795         (reduc_plus_scal_v2df): Likewise.
797 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
799         * dojump.h (do_jump): Delete.
800         (do_jump_1): Likewise.
801         (split_comparison): Move around.
802         * dojump.c (do_jump): Make static.
803         (do_jump_1): Likewise.
804         (jumpifnot): Move around.
805         (jumpifnot_1): Likewise.
806         (jumpif): Likewise.
807         (jumpif_1): Likewise.
808         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
810 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
812         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
813         insns in the delay slot and add_insn_after for the jump insn.
815 2018-10-02  Richard Biener  <rguenther@suse.de>
817         * tree-inline.c (expand_call_inline): Use the location of
818         the callee declaration for the inline-entry marker.
819         * final.c (notice_source_line): Remove special-casing of
820         NOTE_INSN_INLINE_ENTRY.
822 2018-10-01  Carl Love  <cel@us.ibm.com>
824         PR 69431
825         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
826         (__builtin_mtfsb0): New.
827         (__builtin_mtfsb1): New.
828         ( __builtin_set_fpscr_rn): New.
829         (__builtin_set_fpscr_drn): New.
830         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
831         (rs6000_expand_set_fpscr_rn_builtin): Add.
832         (rs6000_expand_set_fpscr_drn_builtin): Add.
833         (rs6000_expand_builtin): Add case statement entries for
834         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
835         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
836         RS6000_BUILTIN_MFFSL.
837         (rs6000_init_builtins): Add ftype initialization and def_builtin
838         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
839         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
840         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
841         rs6000_mffscdrn): Add define_insn.
842         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
843         * doc/extend.texi: Add documentation for the builtins.
845 2018-10-01  Richard Biener  <rguenther@suse.de>
847         PR tree-optimization/87465
848         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
849         causing branch miscounts.
851 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
853         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
854         aarch64_option_default_param):  New.
855         (params.h): Include.
856         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
857         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
858         stack-clash protection validation code.
860 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
862         * params.c (validate_param): New.
863         (add_params): Use it.
864         (set_param_value): Refactor param validation into validate_param.
865         (diagnostic.h): Include.
866         * diagnostic.h (diagnostic_ready_p): New.
868 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
870         * params.c (set_param_value):
871         Add index of parameter being validated.
872         * common/common-target.def (option_validate_param): New.
873         * common/common-targhooks.h (default_option_validate_param): New.
874         * common/common-targhooks.c (default_option_validate_param): New.
875         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
876         * doc/tm.texi: Regenerate.
878 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
880         PR target/86486
881         * config/aarch64/aarch64.c (aarch64_override_options_internal):
882         Add validation for stack-clash parameters and set defaults.
884 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
886         PR target/86486
887         * configure.ac: Add stack-clash-protection-guard-size.
888         * doc/install.texi: Document it.
889         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
890         * params.def: Update comment for guard-size.
891         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
892         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
893         * configure: Regenerate.
895 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
897         PR target/86486
898         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
899         STACK_DYNAMIC_OFFSET): New.
900         * config/aarch64/aarch64.c (aarch64_layout_frame):
901         Update outgoing args size.
902         (aarch64_stack_clash_protection_alloca_probe_range,
903         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
905 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
907         PR target/86486
908         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
909         probe ranges.
910         * target.def (stack_clash_protection_alloca_probe_range): New.
911         (stack_clash_protection_final_dynamic_probe): Remove.
912         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
913         (default_stack_clash_protection_final_dynamic_probe): Remove.
914         * targhooks.c: Likewise.
915         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
916         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
917         * doc/tm.texi: Regenerate.
919 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
921         PR target/86486
922         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
923         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
924         aarch64_clamp_to_uimm12_shift): New.
925         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
926         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
928 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
930         PR target/86486
931         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
933 2018-10-01  Jeff Law  <law@redhat.com>
934             Richard Sandiford <richard.sandiford@linaro.org>
935             Tamar Christina  <tamar.christina@arm.com>
937         PR target/86486
938         * config/aarch64/aarch64.md
939         (probe_stack_range): Add k (SP) constraint.
940         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
941         STACK_CLASH_MAX_UNROLL_PAGES): New.
942         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
943         stack probes for stack clash.
944         (aarch64_allocate_and_probe_stack_space): New.
945         (aarch64_expand_prologue): Use it.
946         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
947         (aarch64_sub_sp): Add emit_move_imm optional param.
949 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
951         PR tree-optimization/87261
952         * match.pd: Remove trailing whitespace.
953         Add (x & y) | ~(x | y) -> ~(x ^ y),
954         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
956 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
958         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
959         constraints.
960         (ashlsi3_insn): Update instruction constraints.
961         (ashrsi3_insn): Likewise.
962         (rotrsi3): Likewise.
963         (add_shift): Likewise.
964         * config/arc/constraints.md (Csz): New 32 bit constraint. It
965         avoids placing in the limm field small constants which, otherwise,
966         could end into a small instruction.
968 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
970         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
971         destination register is not odd-even.
972         (umaddsidi4_split): Likewise.
974 2018-10-01  Richard Biener  <rguenther@suse.de>
976         * tree-inline.c (expand_call_inline): Store origin of fn
977         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
978         * tree.c (block_ultimate_origin): Simplify and do some
979         checking.
981 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
983         * config/i386/mmx.md (EMMS): New int iterator.
984         (emms): New int attribute.
985         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
986         EMMS int iterator.  Explicitly declare clobbers.
987         (mmx_emms): Remove expander.
988         (mmx_femms): Ditto.
989         * config/i386/predicates.md (emms_operation): Remove predicate.
990         (vzeroall_pattern): New predicate.
991         (vzeroupper_pattern): Rename from vzeroupper_operation.
992         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
993         vzeroupper_pattern and vzeroall_pattern predicates.
995 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
997         PR rtl-optimization/86939
998         * ira-lives.c (make_hard_regno_born): Rename from this...
999         (make_hard_regno_live): ... to this.  Remove update to conflict
1000         information.  Update function comment.
1001         (make_hard_regno_dead): Add conflict information update.  Update
1002         function comment.
1003         (make_object_born): Rename from this...
1004         (make_object_live): ... to this.  Remove update to conflict information.
1005         Update function comment.
1006         (make_object_dead):  Add conflict information update.  Update function
1007         comment.
1008         (mark_pseudo_regno_live): Call make_object_live.
1009         (mark_pseudo_regno_subword_live): Likewise.
1010         (mark_hard_reg_dead): Update function comment.
1011         (mark_hard_reg_live): Call make_hard_regno_live.
1012         (process_bb_node_lives): Likewise.
1013         * lra-lives.c (make_hard_regno_born): Rename from this...
1014         (make_hard_regno_live): ... to this.  Remove update to conflict
1015         information.  Remove now uneeded check_pic_pseudo_p argument.
1016         Update function comment.
1017         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
1018         to conflict information.  Update function comment.
1019         (mark_pseudo_live): Remove update to conflict information.  Update
1020         function comment.
1021         (mark_pseudo_dead): Add conflict information update.
1022         (mark_regno_live): Call make_hard_regno_live.
1023         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
1024         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
1026 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
1028         PR target/87370
1029         * config/i386/i386.c (construct_container): Use TImode for
1030         BLKmode values in 2 integer registers.
1032 2018-09-29  Jeff Law  <law@redhat.com>
1034         * builtins.c (unterminated_array): Pass in c_strlen_data * to
1035         c_strlen rather than just a tree *.
1036         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
1037         Update recursive calls appropriately.  If caller did not provide a
1038         suitable data pointer, create a local one.  When a non-terminated
1039         string is discovered, bubble up information about the string via the
1040         c_strlen_data object.
1041         * builtins.h (c_strlen): Update prototype.
1042         (c_strlen_data): New structure.
1043         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
1044         For a type 2 call, if c_strlen indicates a non-terminated string
1045         use the length of the non-terminated string.
1046         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
1048 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
1050         PR target/87467
1051         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
1052         __m512d type for __A argument rather than __m512.
1054 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
1056         * match.pd (simple_comparison): Don't optimize if either operand is
1057         a function pointer when target needs function pointer canonicalization.
1059 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1061         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
1062         power5 .. power9 to remove indirection.
1063         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
1064         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
1065         ASM_CPU_476_SPEC): Delete.
1066         (ASM_CPU_SPEC): Adjust.
1067         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
1068         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
1070 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1072         * config.in: Delete HAVE_AS_DCI.
1073         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
1074         * config/rs6000/rs6000.h: Ditto.
1075         * configure.ac: Delete HAVE_AS_DCI.
1076         * configure: Regenerate.
1078 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1080         * config.in (HAVE_AS_LWSYNC): Delete.
1081         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1082         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
1083         do it as a .long .
1084         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1085         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
1086         as a .long .
1087         * configure.ac: Delete HAVE_AS_LWSYNC.
1088         * configure: Regenerate.
1090 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
1091             Pierre-Marie de Rodat  <derodat@adacore.com>
1093         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
1094         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
1095         (cgraph_node::create_thunk): Add indirect_offset parameter.
1096         (thunk_adjust): Likewise.
1097         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
1098         and initialize the corresponding field with it.
1099         (cgraph_node::dump): Dump indirect_offset field.
1100         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
1101         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
1102         (thunk_adjust): Add indirect_offset parameter and deal with it.
1103         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
1104         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
1105         or if the thunk is external or local.  Fix formatting.  Do not chain
1106         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
1107         if any, in the GIMPLE representation.
1108         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
1109         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
1110         (input_node): Read indirect_offset field.
1111         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
1112         call to thunk_adjust.
1113         * tree-nested.c (struct nesting_info): Add thunk_p field.
1114         (create_nesting_tree): Set it.
1115         (convert_all_function_calls): Copy static chain from targets to thunks.
1116         (finalize_nesting_tree_1): Return early for thunks.
1117         (unnest_nesting_tree_1): Do not finalize thunks.
1118         (gimplify_all_functions): Do not gimplify thunks.
1120 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
1122         * opt-suggestions.c (option_proposer::build_option_suggestions):
1123         Release "option_values".
1125 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
1127         * coverage.c (get_coverage_counts): Convert problem-reporting dump
1128         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
1129         * dumpfile.c (kind_as_string): New function.
1130         (dump_loc): Rather than a hardcoded prefix of "note: ", use
1131         kind_as_string to vary the prefix based on dump_kind.
1132         (selftest::test_capture_of_dump_calls): Update for above.
1134 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
1136         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
1137         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
1139 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
1141         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
1142         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
1143         INVALID_REGNUM instead of FPSR_REG.
1144         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
1145         * config/i386/i386.md: Update comment of FP compares.
1146         (fldenv): Do not clobber FPSR_REG.
1148 2018-09-28  Richard Biener  <rguenther@suse.de>
1150         * tree.h (BLOCK_ORIGIN): New.
1151         * omp-expand.c (grid_expand_target_grid_body): Assign
1152         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
1153         * tree-inline.c (remap_block): Likewise.
1154         * auto-profile.c (get_function_decl_from_block): Simplify
1155         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
1156         * langhooks.c (lhd_print_error_function): Likewise.
1157         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
1158         Likewise.
1159         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
1160         * tree.c (block_nonartificial_location): Likewise.
1161         (block_ultimate_origin): Likewise.
1162         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
1163         no longer needed LTO case.
1165 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
1166             Jan Hubicka  <jh@suse.cz>
1167             Martin Jambor  <mjambor@suse.cz>
1169         * simplify-rtx.c (simplify_merge_mask): New function.
1170         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
1171         same masks are used in op1 or op2.
1172         (test_vec_merge): New function.
1173         (test_vector_ops): Call test_vec_merge.
1175 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
1177         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
1178         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
1179         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
1180         (cypress_costs): Set it.
1181         (supersparc_costs): Likewise.
1182         (hypersparc_costs): Likewise.
1183         (leon_cost): Likewise.
1184         (leon3_costs): Likewise.
1185         (sparclet_costs): Likewise.
1186         (ultrasparc_costs): Likewise.
1187         (ultrasparc_costs): Likewise.
1188         (niagara_costs): Likewise.
1189         (niagara2_costs): Likewise.
1190         (niagara3_costs): Likewise.
1191         (niagara4_costs): Likewise.
1192         (niagara7_costs): Likewise.
1193         (m8_costs): Likewise.
1194         (TARGET_CAN_FOLLOW_JUMP): Define.
1195         (pass_work_around_errata::gate): Minor tweak.
1196         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
1197         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
1198         Automaitcally clear MASK_FSMULD mask for V7 processors.
1199         (sparc_can_follow_jump): New static function.
1200         (output_ubranch): Deal with CROSSING_JUMP_P.
1201         (sparc_use_sched_lookahead): Rewrite using switch statement.
1202         (sparc_issue_rate): Reorder.
1203         (sparc_branch_cost): New function.
1205 2018-09-27  Martin Sebor  <msebor@redhat.com>
1207         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
1208         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
1209         (int_fits_type_p): Same.
1211 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
1213         * config/i386/i386.md (FPCR_REG): Remove.
1214         (UNSPEC_FLDCW): Remove.
1215         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
1216         (x86_fldcw_1): Remove insn pattern.
1217         (fnstenv): Do not clobber FPCR_REG.
1218         (fldenv): Ditto.
1219         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
1220         (CALL_USED_REGISTERS): Ditto.
1221         (REG_ALLOC_ORDER): Ditto.
1222         (REG_CLASS_CONTENTS): Ditto.
1223         (HI_REGISTER_NAMES): Ditto.
1224         (ADDITIONAL_REGISTER_NAMES): Use defines instead
1225         of numerical constants.
1226         * config/i386/i386.c (regclass_map): Remove fpsr register.
1227         (dbx_register_map): Ditto.
1228         (dbx64_register_map): Ditto.
1229         (svr4_dbx_register_map): Ditto.
1230         (print_reg): Do not handle FPCR_REG.
1232 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
1234         PR target/87149
1235         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
1236         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
1237         Delete, always treat as true.
1238         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1239         Ditto.  Simplify remaining code.
1240         * config/powerpcspe/powerpcspe.h: Ditto.
1241         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
1242         Simplify remaining code.
1243         (rs6000_expand_builtin): Ditto.
1244         * config/rs6000/rs6000.h: Ditto.
1245         * configure.ac: Ditto.
1246         * configure: Regenerate.
1248 2018-09-27  Martin Liska  <mliska@suse.cz>
1250         * coverage.c (get_coverage_counts): Revert the formatting
1251         of missing profile opt info.
1253 2018-09-27  Richard Biener  <rguenther@suse.de>
1255         PR debug/37801
1256         PR debug/87440
1257         * dwarf2out.c (set_block_origin_self): Do not mark outermost
1258         block as we do not output that.
1259         (gen_inlined_subroutine_die): Elide the originally outermost
1260         block, matching what we do for concrete instances.
1261         (decls_for_scope): Add parameter specifying whether to recurse
1262         to subblocks.
1264 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
1265             Tom de Vries  <tom@codesourcery.com>
1267         PR 82089
1269         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
1270         STORE_FLAG_VALUE == 1.
1272 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
1274         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
1275         constant definitions.
1276         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
1277         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
1278         ("speculation_barrier"): New expander definition.
1280 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
1282         PR gcov-profile/86957
1283         * common.opt: New warning option -Wmissing-profile.
1284         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
1285         * doc/invoke.texi: Document -Wmissing-profile.
1287 2018-09-26  Jim Wilson  <jimw@sifive.com>
1289         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
1290         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
1292 2018-09-26  Martin Sebor  <msebor@redhat.com>
1294         * tree.c (zerop): Change return type to bool.
1295         (integer_zerop, integer_onep, integer_each_onep): Same.
1296         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1297         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1298         (real_onep, real_minus_onep, chain_index): Same.
1299         (print_type_hash_statistics, type_list_equal): Same.
1300         * tree.h (zerop): Same.
1301         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
1302         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1303         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1304         (real_onep, real_minus_onep, chain_index): Same.
1305         (print_type_hash_statistics, type_list_equal): Same.
1307 2018-09-26  Jim Wilson  <jimw@sifive.com>
1309         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
1311 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
1313         PR target/87414
1314         * config/i386/i386.c: Include debug.h and dwarf2out.h.
1315         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
1316         call.
1318 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
1320         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
1322 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
1324         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
1325         and FP_SECOND_SSE_REGS.
1326         (REG_CLASS_NAMES): Ditto.
1327         (REG_CLASS_CONTENTS): Ditto.
1328         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
1329         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
1330         (ix86_preferred_output_reload_class): Ditto.
1331         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
1332         clobber constraint to "=&f".
1333         (fix_truncdi_i387): Ditto.
1334         (lrintxfdi2): Ditto.
1335         (fistdi2_<rounding>): Ditto.
1336         (fpremxf4_i387): Change "=u" constraint to "=f".
1337         (fprem1xf4_i387): Ditto.
1338         (sincosxf3): Ditto.
1339         (fptanxf4_i387): Ditto.
1340         (fxtractxf3_i387): Ditto.
1341         (fscalexf4_i387): Ditto.
1342         (atan2xf3): Change "u" constraint to "f".
1343         (fyl2xxf3_i387): Ditto.
1344         (fyl2xp1xf3_i387): Ditto.
1346 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
1348         PR target/87439
1349         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
1350         for removed I387_MASK_PM entity.
1353 2018-09-26  Jeff Law  <law@redhat.com>
1354         Revert
1355         2018-09-26  Alexey Neyman  <stilor@att.net>
1357         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1358         headers are no longer pulled in by <isl/val.h>.
1360 2018-09-26  Richard Biener  <rguenther@suse.de>
1362         PR debug/87443
1363         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
1364         or concrete instance DIE to the tree.  Create abstract origin
1365         attributes also for concrete instances.
1367 2018-09-26  Alexey Neyman  <stilor@att.net>
1369         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1370         headers are no longer pulled in by <isl/val.h>.
1372 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
1374         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
1375         Use new helper functions.
1376         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
1377         Use new helper functions.
1378         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
1379         aarch_mm_needs_release): New declarations.
1380         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
1381         aarch_mm_needs_release): New.
1383 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1385         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
1386         (arm32_output_mi_thunk): Deal with long calls.
1388 2018-09-26  Richard Biener  <rguenther@suse.de>
1390         PR debug/87428
1391         PR debug/87362
1392         * tree-inline.c (expand_call_inline): When the location
1393         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
1394         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
1395         the inserted BLOCK to make inlined_function_outer_scope_p
1396         recognize it.
1397         * dwarf2out.c (add_call_src_coords_attributes): Do not add
1398         coords for reserved locations.
1400 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
1402         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
1403         (*call_indirect_nonlocal_sysv<mode>): Ditto.
1404         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
1405         (*sibcall_nonlocal_sysv<mode>): Ditto.
1406         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
1407         (<bd>_<mode>): Ditto.
1408         (<bd>tf_<mode>): Ditto.
1410 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
1412         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
1413         control string as a list of templates instead of as C code.
1414         (*altivec_movti): Ditto.
1415         * config/rs6000/darwin.md (movdf_low_di): Ditto.
1417 2018-09-25  Jim Wilson  <jimw@sifive.com>
1419         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
1420         when target symbol is weak.
1422 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1424         PR c/87387
1425         * builtins.c (unterminated_array): Simplify.
1426         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
1427         where pointer arithmetic is safe.
1429 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
1431         PR target/86987
1432         * config/rs6000/altivec.md (altivec_vspltb): Use
1433         const_0_to_15_operand instead of u5bit_cint_operand.
1434         (*altivec_vspltb_internal): Ditto.
1435         (altivec_vspltb_direct): Ditto.
1436         (altivec_vsplth): Use const_0_to_7_operand instead of
1437         u5bit_cint_operand.
1438         (*altivec_vsplth_internal): Ditto.
1439         (altivec_vsplth_direct): Ditto.
1440         (altivec_vspltw): Use const_0_to_3_operand instead of
1441         u5bit_cint_operand.
1442         (*altivec_vspltw_internal): Ditto.
1443         (altivec_vspltw_direct): Ditto.
1444         (altivec_vspltsf): Ditto.
1445         (*altivec_vspltsf_internal): Ditto.
1446         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
1447         various splats with the proper size immediate.  Reorder the various
1448         cases by ascending size of immediate, and put all such together.
1450 2018-09-25  Richard Biener  <rguenther@suse.de>
1452         PR debug/83941
1453         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
1454         GC-ification.
1455         (maybe_create_die_with_external_ref): Do not create
1456         DW_TAG_imported_unit here.
1457         (add_abstract_origin_attribute): Handle external BLOCK refs.
1458         (dwarf2out_abstract_function): Simplify LTO case.
1459         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
1460         rather than using maybe_create_die_with_external_ref.
1462 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
1464         PR target/71278
1465         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
1466         (frndintxf2_mask_pm_i387): Ditto.
1467         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
1468         Enable for !flag_trapping_math.
1469         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
1470         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
1471         Change operand 1 predicate to nonimmediate_operand.
1472         (attr "i387_cw"): Remove mask_pm.
1473         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
1474         (enum ix86_entity): Remove I387_MASK_PM.
1475         * config/i386/i386.c (ix86_i387_mode_needed): Do not
1476         handle I387_MASK_PM.
1477         (ix86_mode_needed): Ditto.
1478         (ix86_mode_after): Ditto.
1479         (ix86_mode_entry): Ditto.
1480         (ix86_mode_exit): Ditto.
1481         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
1483 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
1485         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
1486         to_update_switch_stmts to vNULL instead of calling create on them
1487         immediately.
1489 2018-09-25  Richard Biener  <rguenther@suse.de>
1491         PR tree-optimization/87402
1492         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
1493         (visit_phi): Re-instantiate handling of supposed to be VARYING
1494         but non-VARYING backedge value.
1496 2018-09-25  Richard Biener  <rguenther@suse.de>
1498         PR debug/83941
1499         * dwarf2out.c (struct sym_off_pair): New.
1500         (external_die_map): New global.
1501         (lookup_decl_die): When in LTO create DIEs lazily from the
1502         external_die_map.
1503         (lookup_block_die): New function, create DIEs lazily in LTO.
1504         (equate_block_to_die): New function.
1505         (dwarf2out_die_ref_for_decl): During WPA get the association
1506         from the external DIE map.
1507         (dwarf2out_register_external_die): Record mapping into the
1508         external DIE map.
1509         (maybe_create_die_with_external_ref): New function split out from
1510         DIE generation part of old dwarf2out_register_external_die.
1511         (add_abstract_origin_attribute): Do not return the DIE.  When
1512         in LTO reference externals directly.
1513         (dwarf2out_abstract_function): When in LTO ignore calls for
1514         decls with external DIEs (already present abstract instances).
1515         (gen_call_site_die): Adjust.
1516         (add_high_low_attributes): Likewise.
1517         (gen_lexical_block_die): Likewise.
1518         (gen_inlined_subroutine_die): Likewie.
1519         (gen_block_die): Likewise.
1520         (dwarf2out_inline_entry): Likewise.
1521         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
1522         DIEs.
1524 2018-09-25  Martin Liska  <mliska@suse.cz>
1526         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
1527         integers and not by a float value.
1529 2018-09-25  Martin Liska  <mliska@suse.cz>
1531         PR fortran/87394
1532         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
1533         instead of NULL.
1534         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
1535         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
1536         * godump.c (go_format_type): Remove extra parenthesis.
1538 2018-09-25  Martin Liska  <mliska@suse.cz>
1540         * alias.c (set_dest_equal_p): Remove unused function.
1541         * config/i386/i386.c (def_builtin_pure2): Likewise.
1542         * diagnostic-show-locus.c (class layout): Remove
1543         unused field.
1544         (layout::layout): Likewise here.
1545         * dump-context.h (class temp_dump_context): Likewise.
1546         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
1547         (add_AT_loclistsptr): Likewise.
1548         (add_AT_offset): Likewise.
1549         (get_AT_hi_pc): Likewise.
1550         (is_comdat_die): Likewise.
1551         (type_is_enum): Likewise.
1552         (ceiling): Likewise.
1553         (add_AT_vms_delta): Likewise.
1554         (is_class_die): Likewise.
1555         * edit-context.c (class line_event): Remove unused field.
1556         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
1557         unused function.
1558         * ipa-cp.c (ipa_get_vr_lat): Likewise.
1559         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
1560         (ok_for_base_p_nonstrict): Likewise.
1561         * tree-chrec.c (is_not_constant_evolution): Likewise.
1562         (chrec_fold_poly_cst): Likewise.
1563         * tree-if-conv.c (has_pred_critical_p): Likewise.
1564         * tree-ssa-coalesce.c (print_exprs): Likewise.
1565         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
1566         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
1567         * tree-vrp.c (value_ranges_intersect_p): Likewise.
1568         (value_range_nonnegative_p): Likewise.
1570 2018-09-25  Martin Liska  <mliska@suse.cz>
1572         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
1573         Do not handle "GNU Pascal".
1574         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1575         Likewise.
1576         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
1577         from documentation. Likewise.
1578         * dbxout.c (dbxout_range_type): Likewise.
1579         * doc/cpp.texi: Likewise.
1580         * doc/extend.texi: Likewise.
1581         * doc/frontends.texi: Likewise.
1582         * doc/invoke.texi: Remove Pascal entry.
1583         * tree.def (CLEANUP_POINT_EXPR): Likewise.
1584         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
1586 2018-09-25  Martin Liska  <mliska@suse.cz>
1588         PR middle-end/86078
1589         * doc/invoke.texi: Document all parameters and remove default
1590         of the parameters.
1592 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
1594         PR bootstrap/87417
1595         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
1596         contains HOST_WIDE_INTs when computing its size.
1598 2018-09-24  Jim Wilson  <jimw@sifive.com>
1600         PR target/87391
1601         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
1602         not TARGET_RVE.
1603         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
1605 2018-09-24  Andrew Pinski  <apinski@marvell.com>
1607         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
1608         access prev before checking it for NULLness in the
1609         AARCH64_FUSE_CMP_BRANCH case.
1611 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
1613         PR target/82699
1614         * config/i386/i386.c (rest_of_insert_endbranch): Set
1615         endbr_queued_at_entrance to true and don't insert ENDBR if
1616         x86_function_profiler will be called.
1617         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
1618         is true.
1619         * config/i386/i386.h (machine_function): Add
1620         endbr_queued_at_entrance.
1622 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
1624         * genattrtab.c (mk_attr_alt): Use alternative_mask.
1625         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
1626         types.
1627         (check_attr_test): Use alternative_mask.
1628         (get_attr_value): Likewise.
1629         (compute_alternative_mask): Use alternative_mask and XWINT.
1630         (make_alternative_compare): Use alternative_mask.
1631         (attr_alt_subset_p): Use XWINT.
1632         (attr_alt_subset_of_compl_p): Likewise.
1633         (attr_alt_intersection): Use alternative_mask and XWINT.
1634         (attr_alt_union): Likewise.
1635         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
1636         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
1637         (simplify_test_exp): Use alternative_mask and XWINT.
1638         (write_test_expr): Use alternative_mask and XWINT, adjust bit
1639         number calculation to support 64 bits.  Generate code that
1640         checks 64-bit masks.
1641         (main): Use alternative_mask.
1642         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
1644 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
1646         PR target/80080
1647         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
1648         RETURN+USE when returning via %r14.
1650 2018-09-24  Martin Liska  <mliska@suse.cz>
1652         * gcov.c (output_lines): Print colorization legend
1653         for both flag_use_colors and flag_use_hotness_colors.
1654         Reword the help.
1656 2018-09-24  Martin Liska  <mliska@suse.cz>
1658         * coverage.c (get_coverage_counts): Use warning_at
1659         with current_function_decl location. Use %qD in warning
1660         message.
1662 2018-09-24  Martin Liska  <mliska@suse.cz>
1664         * memory-block.h (memory_block_pool::release): Annotate with
1665         valgrind that the memory is not accessible.
1667 2018-09-24  Martin Liska  <mliska@suse.cz>
1669         PR sanitizer/85774
1670         * asan.c: Make asan_handled_variables extern.
1671         * asan.h: Likewise.
1672         * cfgexpand.c (expand_stack_vars): Make sure
1673         a representative is unpoison if another
1674         variable in the partition is handled by
1675         use-after-scope sanitization.
1677 2018-09-24  Richard Biener  <rguenther@suse.de>
1679         PR tree-optimization/63155
1680         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
1681         the worklist when the edge of the respective argument isn't
1682         executable.
1684 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
1686         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
1687         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
1688         (MASK_CLASS_P): Update for rename.
1689         (MAYBE_MASK_CLASS_P): Ditto.
1690         (REG_CLASS_NAMES): Update.
1691         (REG_CLASS_CONTENT): Update.
1692         * config/i386/i386.c (regclass_map): Update for MASK_REG
1693         and ALL_MASK_REGS rename.
1694         * config/i386/constraints.md (Yk): Update for rename.
1695         (k): Ditto.
1697 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
1699         * config/i386/i386.h (enum reg_class): Remove
1700         EVEX_SSE_REGS and MOD4_SSE_REGS.
1701         (REG_CLASS_NAMES): Update.
1702         (REG_CLASS_CONTENT): Update.
1703         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
1704         registers as ALL_SSE_REGS.
1705         (ix86_additional_allocno_class_p): Remove.
1706         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
1707         (ix86_register_priority): Lower priority of EVEX SSE registers.
1708         Use IN_RANGE macro where appropriate.
1709         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
1710         AVX-5124VNNIW checks.
1711         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
1712         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
1713         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
1714         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
1715         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
1716         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
1717         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
1718         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
1719         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
1720         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
1721         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
1722         * config/i386/constraints.md (Yh): Remove.
1724 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
1726         * config/i386/i386.c (regclass_map): Declare integer REX registers
1727         as GENERAL_REGS.
1729 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
1731         * doc/service.texi (Service): Switch the fsf.org link to https.
1733 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
1735         PR target/86798
1736         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1737         Define to speculation_safe_value_not_needed.
1739 2018-09-21  Florian Weimer  <fweimer@redhat.com>
1741         PR middle-end/81035
1742         * doc/extend.texi (Common Function Attributes): Mention that
1743         noreturn suppresses tail call optimization.
1745 2018-09-21  Jeff Law  <law@redhat.com>
1747         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
1748         vr_values::cleanup_edges_and_switches.
1749         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
1750         vr_values class.
1751         (identify_jump_threads): Remove EDGE_IGNORE handling.
1752         (execute_vrp): Move handling of to_remove_edges and
1753         to_update_switch_stmts into vr_values class member functions.
1754         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
1755         (to_update_switch_stmts): Likewise.
1756         * vr-values.c: Include cfghooks.h.
1757         (vr_values::vr_values): Initialize to_remove_edges and
1758         to_update_switch_stmts.
1759         (vr_values::~vr_values): Verify to_remove_edges and
1760         to_update_switch_stmts are empty.
1761         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
1762         (vr_values::cleanup_edges_and_switches): New member function.
1763         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
1764         function.  Add new data members.
1766 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
1768         PR tree-optimization/87309
1769         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
1770         calls with pflags and alt_flags.
1771         (selftest::test_capture_of_dump_calls): Add test of interaction of
1772         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
1774 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1776         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
1778 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1780         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
1782 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1784         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
1785         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
1786         (VXWORKS_LIBS_RTP): Minor reordering.
1788 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1790         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
1791         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
1793 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1795         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
1796         (PTRDIFF_TYPE): Likewise.
1798 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1800         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
1801         triplet, similar to support for VxWorks7.
1802         * config/vxworks-dummy.h: Provide a default definition
1803         of TARGET_VXWORKS64 to 0.
1805 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1807         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
1808         * config/vxworks-dummy.h: here.
1810 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1812         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
1814 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
1815             Bo Zhou  <zbo.zhou@hisilicon.com>
1817         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
1818         * config/aarch64/aarch64-tune.md: Regenerated.
1819         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
1820         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
1821         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
1823 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
1824             Julian Brown  <julian@codesourcery.com>
1826         * builtins.c (get_builtin_sync_mem): Handle address spaces.
1828 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
1830         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
1831         if the call takes a static chain.
1833 2018-09-21  Martin Liska  <mliska@suse.cz>
1835         * auto-profile.c (autofdo_source_profile::read): Do not
1836         set sum_all.
1837         (read_profile): Do not add working sets.
1838         (read_autofdo_file): Remove sum_all.
1839         (afdo_callsite_hot_enough_for_early_inline): Remove const
1840         qualifier.
1841         * coverage.c (struct counts_entry): Remove gcov_summary.
1842         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
1843         do not support GCOV_TAG_PROGRAM_SUMMARY.
1844         (get_coverage_counts): Remove summary and expected
1845         arguments.
1846         * coverage.h (get_coverage_counts): Likewise.
1847         * doc/gcov-dump.texi: Remove -w option.
1848         * gcov-dump.c (dump_working_sets): Remove.
1849         (main): Do not support '-w' option.
1850         (print_usage): Likewise.
1851         (tag_summary): Likewise.
1852         * gcov-io.c (gcov_write_summary): Do not dump
1853         histogram.
1854         (gcov_read_summary): Likewise.
1855         (gcov_histo_index): Remove.
1856         (gcov_histogram_merge): Likewise.
1857         (compute_working_sets): Likewise.
1858         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
1859         it not obsolete.
1860         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
1861         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
1862         (GCOV_HISTOGRAM_SIZE): Remove.
1863         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
1864         (struct gcov_summary): Simplify rapidly just
1865         to runs and sum_max fields.
1866         (gcov_histo_index): Remove.
1867         (NUM_GCOV_WORKING_SETS): Likewise.
1868         (compute_working_sets): Likewise.
1869         * gcov-tool.c (print_overlap_usage_message): Remove
1870         trailing empty line.
1871         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
1872         (output_lines): Remove program related line.
1873         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
1874         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
1875         histogram.
1876         (input_profile_summary): Do not read it.
1877         (merge_profile_summaries): And do not merge it.
1878         (input_symtab): Do not call removed function.
1879         * modulo-sched.c (sms_schedule): Do not print sum_max.
1880         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
1881         removed when histogram method was invented.
1882         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
1883         mode.
1884         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
1885         GCOV coding style.
1886         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
1887         and dump selected value.
1888         * profile.c (add_working_set): Remove.
1889         (get_working_sets): Likewise.
1890         (find_working_set): Likewise.
1891         (get_exec_counts): Do not work with working sets.
1892         (read_profile_edge_counts): Do not inform as sum_max is removed.
1893         (compute_branch_probabilities): Likewise.
1894         (compute_value_histograms): Remove argument for call of
1895         get_coverage_counts.
1896         * profile.h: Do not make gcov_summary const.
1898 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
1900         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
1902 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
1904         PR tree-optimization/86990
1905         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
1906         Check that the entire merged store group is made of constants only for
1907         overlapping stores.
1909 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
1911         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
1912         (VTABLE_VERIFICATION_SPEC): Likewise.
1913         (SANITIZER_EARLY_SPEC): Likewise.
1914         (SANITIZER_SPEC): Likewise.
1915         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
1916         * doc/invoke.texi (Link Options): Document -r.
1918 2018-09-20  Richard Biener <rguenther@suse.de>
1920         PR middle-end/87054
1921         * gimplify.c (gimplify_expr): Retain alignment of
1922         addressable lvalue in dereference.
1924 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
1926         PR bootstrap/87013
1927         * configure.ac: Check for .loc is_stmt support.
1928         * configure, config.in: Rebuilt.
1929         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
1930         if not supported.
1932 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
1934         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
1935         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
1936         -misel=no.
1938 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
1940         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
1941         VECTOR_OTHER.
1942         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
1943         case VECTOR_OTHER.
1945 2018-09-20  Marek Polacek  <polacek@redhat.com>
1947         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
1949 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
1951         PR tree-optimization/87288
1952         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
1953         into account when determining PEELING_FOR_NITERS.
1955 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
1957         PR tree-optimization/86877
1958         * tree-vect-loop.c (vect_analyze_loop_2): Call
1959         vect_verify_datarefs_alignment.
1961 2018-09-19  Marek Polacek  <polacek@redhat.com>
1963         * doc/invoke.texi: Document -Wclass-conversion.
1965 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
1967         * config/pa/pa.c (pa_adjust_priority): Delete.
1968         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
1970         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
1971         (atomic_storehi): Likewise.
1972         (atomic_storesi): Likewise.
1973         (atomic_loaddi): Restore compare and swap exchange loop code.
1975 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
1977         PR rtl-optimization/86902
1978         * combine.c (try_combine): When changing the CC mode used, don't change
1979         an unrelated mode in other_insn to that new CC mode.
1981 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
1983         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
1984         with %T in place of calls to dump_generic_expr.
1985         (prune_runtime_alias_test_list): Likewise.
1986         (create_runtime_alias_checks): Likewise.
1987         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
1988         (vect_analyze_data_ref_dependence): Likewise.
1989         (vect_slp_analyze_data_ref_dependence): Likewise.
1990         (vect_record_base_alignment): Likewise.  Use %G in place of call
1991         to dump_gimple_stmt.
1992         (vect_compute_data_ref_alignment): Likewise.
1993         (verify_data_ref_alignment): Likewise.
1994         (vect_find_same_alignment_drs): Likewise.
1995         (vect_analyze_group_access_1): Likewise.
1996         (vect_analyze_data_ref_accesses): Likewise.
1997         (dependence_distance_ge_vf): Likewise.
1998         (dump_lower_bound): Likewise.
1999         (vect_prune_runtime_alias_test_list): Likewise.
2000         (vect_find_stmt_data_reference): Likewise.
2001         (vect_analyze_data_refs): Likewise.
2002         (vect_create_addr_base_for_vector_ref): Likewise.
2003         (vect_create_data_ref_ptr): Likewise.
2004         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
2005         (vect_can_advance_ivs_p): Likewise.
2006         (vect_update_ivs_after_vectorizer): Likewise.
2007         (vect_gen_prolog_loop_niters): Likewise.
2008         (vect_prepare_for_masked_peels): Likewise.
2009         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2010         (vect_determine_vectorization_factor): Likewise.
2011         (vect_is_simple_iv_evolution): Likewise.
2012         (vect_analyze_scalar_cycles_1): Likewise.
2013         (vect_analyze_loop_operations): Likewise.
2014         (report_vect_op): Likewise.
2015         (vect_is_slp_reduction): Likewise.
2016         (check_reduction_path): Likewise.
2017         (vect_is_simple_reduction): Likewise.
2018         (vect_create_epilog_for_reduction): Likewise.
2019         (vect_finalize_reduction:): Likewise.
2020         (vectorizable_induction): Likewise.
2021         (vect_transform_loop_stmt): Likewise.
2022         (vect_transform_loop): Likewise.
2023         (optimize_mask_stores): Likewise.
2024         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
2025         (vect_split_statement): Likewise.
2026         (vect_recog_over_widening_pattern): Likewise.
2027         (vect_recog_average_pattern): Likewise.
2028         (vect_determine_min_output_precision_1): Likewise.
2029         (vect_determine_precisions_from_range): Likewise.
2030         (vect_determine_precisions_from_users): Likewise.
2031         (vect_mark_pattern_stmts): Likewise.
2032         (vect_pattern_recog_1): Likewise.
2033         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2034         (vect_record_max_nunits): Likewise.
2035         (vect_build_slp_tree_1): Likewise.
2036         (vect_build_slp_tree_2): Likewise.
2037         (vect_print_slp_tree): Likewise.
2038         (vect_analyze_slp_instance): Likewise.
2039         (vect_detect_hybrid_slp_stmts): Likewise.
2040         (vect_detect_hybrid_slp_1): Likewise.
2041         (vect_slp_analyze_operations): Likewise.
2042         (vect_slp_analyze_bb_1): Likewise.
2043         (vect_transform_slp_perm_load): Likewise.
2044         (vect_schedule_slp_instance): Likewise.
2045         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2046         (vect_mark_stmts_to_be_vectorized): Likewise.
2047         (vect_init_vector_1): Likewise.
2048         (vect_get_vec_def_for_operand): Likewise.
2049         (vect_finish_stmt_generation_1): Likewise.
2050         (vect_check_load_store_mask): Likewise.
2051         (vectorizable_call): Likewise.
2052         (vectorizable_conversion): Likewise.
2053         (vectorizable_operation): Likewise.
2054         (vectorizable_load): Likewise.
2055         (vect_analyze_stmt): Likewise.
2056         (vect_is_simple_use): Likewise.
2057         (vect_get_vector_types_for_stmt): Likewise.
2058         (vect_get_mask_type_for_stmt): Likewise.
2059         * tree-vectorizer.c (increase_alignment): Likewise.
2061 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
2063         * doc/rtl.texi: Adjust vec_select description.
2064         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
2065         non-constant selectors.
2067 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
2069         * config/aarch64/aarch64-protos.h
2070         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
2071         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
2072         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
2073         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
2074         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
2075         (AARCH64_FL_PROFILE): Move index so flags are ordered.
2076         (AARCH64_ISA_RCPC8_4): New flag.
2077         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
2078         to aarch64_offset_9bit_signed_unscaled_p.
2079         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
2080         and use stlur.
2081         * config/aarch64/constraints.md (Ust): New constraint.
2082         * config/aarch64/predicates.md.
2083         (aarch64_9bit_offset_memory_operand): New predicate.
2084         (aarch64_rcpc_memory_operand): New predicate.
2086 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
2088         PR rtl-optimization/87361
2089         * rtlanal.c (nonzero_bits1): Revert accidental change.
2091 2018-09-19  Richard Biener  <rguenther@suse.de>
2093         PR tree-optimization/87349
2094         PR tree-optimization/87342
2095         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
2097 2018-09-18  Marek Polacek  <polacek@redhat.com>
2099         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
2100         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
2102 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
2104         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
2106 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
2108         PR rtl-optimization/86882
2109         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
2111 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
2113         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
2114         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
2116 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
2118         PR other/87353
2119         * doc/invoke.texi (Link Options): Fix formatting and grammar.
2121 2018-09-18  Richard Biener  <rguenther@suse.de>
2123         PR middle-end/63155
2124         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
2125         (compute_samebase_partition_bases): Likewise.
2126         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
2127         (gimple_can_coalesce_p): Simplify.
2129 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
2131         Handle a library implementation of ffs calling __builtin_ffs.
2132         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
2133         (mmix_init_libfuncs): New function: make __builtin_ffs expand
2134         to __ffsdi2.
2136 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
2138         * diagnostic-show-locus.c (class layout_range): Add field
2139         "m_original_idx".
2140         (layout_range::layout_range): Add "original_idx" param and use it
2141         to initialize new field.
2142         (make_range): Use 0 for original_idx.
2143         (layout::layout): Pass in index to calls to
2144         maybe_add_location_range.
2145         (layout::maybe_add_location_range): Add param "original_idx" and
2146         pass it on to layout_range.
2147         (layout::print_any_labels): Pass on range->m_original_idx to
2148         get_text call.
2149         (gcc_rich_location::add_location_if_nearby): Use 0 for
2150         original_idx.
2151         * gcc-rich-location.h (text_range_label::get_text): Update for new
2152         param.
2153         (range_label_for_type_mismatch::get_text): Likewise.
2155 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
2157         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
2159 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
2161         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
2162         format_string_diagnostic_t.
2163         (fmtwarn_n): Likewise.
2164         * substring-locations.c
2165         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
2166         (format_warning_n_va): Convert to...
2167         (format_string_diagnostic_t::emit_warning_n_va): ...this.
2168         (format_warning_va): Convert to...
2169         (format_string_diagnostic_t::emit_warning_va): ...this.
2170         (format_warning_at_substring): Convert to...
2171         (format_string_diagnostic_t::emit_warning): ...this.
2172         (format_warning_at_substring_n): Convert to...
2173         (format_string_diagnostic_t::emit_warning_n): ...this.
2174         * substring-locations.h (class format_string_diagnostic_t): New
2175         class.
2176         (format_warning_va): Convert to
2177         format_string_diagnostic_t::emit_warning_va.
2178         (format_warning_n_va): Convert to
2179         format_string_diagnostic_t::emit_warning_n_va.
2180         (format_warning_at_substring): Convert to
2181         format_string_diagnostic_t::emit_warning.
2182         (format_warning_at_substring_n): Convert to
2183         format_string_diagnostic_t::emit_warning_n.
2185 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
2186             Bernd Schmidt <bernds_cb1@t-online.de>
2188         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
2189         SImode args.
2191 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
2193         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
2194         operand 0 predicate to nonimmediate operand.
2195         (rint<mode>2_frndint): Remove insn pattern.
2196         (rint<mode>2): Change operand 1 predicate to general_operand.
2197         Extend operand 1 to XFmode and generate rintxf2 insn.
2198         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
2199         Do not use X87MODEF mode macro.
2200         (frndintxf2_<rounding>_i387): Rename from
2201         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
2202         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
2203         to XFmode and generate significandxf3 insn.
2205 2018-09-17  Richard Biener  <rguenther@suse.de>
2207         PR tree-optimization/87328
2208         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
2209         visiting unexecutable backedges when not iterating.
2210         (do_rpo_vn): Mark all edges not executable even when not
2211         iterating.
2213 2018-09-17  Martin Jambor  <mjambor@suse.cz>
2215         PR c/63886
2216         * doc/invoke.texi (Warning Options): Likewise.
2218 2018-09-17  Richard Biener  <rguenther@suse.de>
2220         PR tree-optimization/87301
2221         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
2222         clean EH info from leftover copy assignments.
2224 2018-09-17  Martin Liska  <mliska@suse.cz>
2226         PR gcov-profile/85871
2227         * gcov.c (output_intermediate_file): Fix out of bounds
2228         access.
2230 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
2232         * config/arc/arc.c: Object attributes for core4 not reflected
2233         correctly.
2234         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
2235         core3).
2237 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
2239         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2241 2018-09-17  Martin Liska  <mliska@suse.cz>
2243         * doc/gcov.texi: Document new option --use-hotness-colors.
2244         * gcov.c (struct source_info): Declare new field.
2245         (source_info::source_info): Set default for maximum_count.
2246         (print_usage): Add new -q option.
2247         (process_args): Process it.
2248         (accumulate_line_info): Save src->maximum_count.
2249         (output_line_beginning): Make color line number if
2250         flag_use_hotness_colors is set.
2251         (output_line_details): Pass default argument value.
2252         (output_lines): Pass src->maximum_count.
2254 2018-09-17  Martin Liska  <mliska@suse.cz>
2256         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
2257         Use processor_names table.
2258         * config/i386/i386.c (ix86_default_align): Use
2259         processor_cost_table for alignment values.
2260         (ix86_option_override_internal): Use processor_names.
2261         (ix86_function_specific_print): Likewise.
2262         * config/i386/i386.h (struct processor_costs):
2263         Add alignment values.
2264         (struct ptt): Remove and replace with const char *.
2265         * config/i386/x86-tune-costs.h (struct processor_costs):
2266         Declare default alignments for all costs.
2268 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
2270         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
2271         symbolics or VR_VARYING ranges for ABS_EXPR.
2272         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
2273         when range will wrap.
2275 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
2277         PR middle-end/86864
2278         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
2279         before and after a JUMP_TABLE_DATA.
2281 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
2283         PR middle-end/87188
2284         * dojump.c (do_compare_and_jump): Canonicalize function pointers
2285         when one operand is a function pointer.  Use POINTER_TYPE_P and
2286         FUNC_OR_METHOD_TYPE_P.
2287         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
2288         * fold-const.c (build_range_check): Likewise.
2289         * match.pd (simple_comparison): Likewise.
2291 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
2293         PR c/82967
2294         * spellcheck.c (get_edit_distance_cutoff): New function.
2295         (selftest::test_edit_distance_unit_test_oneway): Rename to...
2296         (selftest::test_get_edit_distance_one_way): ...this.
2297         (selftest::test_get_edit_distance_unit): Rename to...
2298         (selftest::test_get_edit_distance_both_ways): ...this.
2299         (selftest::test_edit_distances): Move tests to this new function,
2300         and test some more pairs of strings.  Update for above renaming.
2301         (selftest::get_old_cutoff): New function.
2302         (selftest::test_get_edit_distance_cutoff): New function.
2303         (selftest::assert_suggested_for): New function.
2304         (ASSERT_SUGGESTED_FOR): New macro.
2305         (selftest::assert_not_suggested_for): New function.
2306         (ASSERT_NOT_SUGGESTED_FOR): New macro.
2307         (selftest::test_suggestions): New function.
2308         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
2309         tests to selftest::test_edit_distances and call it.  Add calls to
2310         selftest::test_get_edit_distance_cutoff and
2311         selftest::test_suggestions.
2312         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
2313         (best_match::consider): Replace hard-coded cutoff calculation with
2314         a call to...
2315         (best_match::get_cutoff): New declaration.
2316         (best_match::get_best_meaningful_candidate): Likewise.
2318 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2320         * builtins.c (fold_builtin_strlen): Remove TODO comment.
2322 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2324         revert:
2325         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2327         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2328         terminated string literal.
2330 2018-09-14  Martin Sebor  <msebor@redhat.com>
2332         * builtins.c (unterminated_array): Handle ARRAY_REF.
2333         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
2334         * builtins.h (unterminated_array): Declare extern.
2335         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
2336         arrays.
2337         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
2338         calls.
2340 2018-09-14  Martin Sebor  <msebor@redhat.com>
2341             Jeff Law  <law@redhat.com>
2343         * builtins.c (unterminated_array): New.
2344         (expand_builtin_strcpy): Adjust.
2345         (expand_builtin_strcpy_args): Detect unterminated arrays.
2346         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
2347         unterminated arrays.
2348         * gimple-fold.h (get_maxval_strlen): Add argument.
2349         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
2351         * gimple-fold.c (get_range_strlen): Add argument.
2352         (get_maxval_strlen): Adjust.
2353         * gimple-fold.h (get_range_strlen): Add argument.
2355 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
2357         * config/i386/movdirintrin.h: Fix copyright year.
2359 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
2361         * reg-stack.c: Include regs.h.
2362         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
2363         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
2364         FIRST_STACK_REG, not DFmode.
2365         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
2366         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
2367         (change stack): Default register mode to the reg_raw_mode of
2368         FIRST_STACK_REG, not DFmode.
2369         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
2370         (*swapxf): Rename from swapxf.
2372 2018-09-14  Carl Love  <cel@us.ibm.com>
2374         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
2375         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
2377 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
2379         PR target/87224
2380         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
2381         alternatives.
2383 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
2385         PR target/85628
2386         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
2388 2018-09-14  Jason Merrill  <jason@redhat.com>
2390         Fix --enable-gather-detailed-mem-stats.
2391         * hash-table.c (hash_table_usage): Change from variable to function.
2392         * hash-table.h: Adjust.
2393         * Makefile.in: Add missing dependencies on hash-table.h.
2395 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2397         PR tree-optimization/87259
2398         PR lto/87283
2399         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
2400         execute_cse_reciprocals_1 has tried transforming.
2402 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
2404         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
2405         VR_VARYING for PLUS/MINUS_EXPR.
2407 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
2409         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
2410         formatting.
2412 2018-09-14  Richard Biener  <rguenther@suse.de>
2414         PR middle-end/63155
2415         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
2416         bits for the merged partition.
2418 2018-09-13  Martin Sebor  <msebor@redhat.com>
2419             Bernd Edlinger  <bernd.edlinger@hotmail.de>
2421         * builtins.h (c_srlen): Add argument.
2422         * builtins.c (warn_string_no_nul): New function.
2423         (c_strlen): Add argument and use it.  Update recursive calls.
2424         Pass DECL argument to string_constant to get info on non
2425         terminated strings.  Update *NONSTR as needed.
2426         (fold_builtin_strlen): Add argument to calls to c_strlen.
2427         Warn for unterminated arrays.
2428         (warn_string_no_null): Add prototype.
2429         * expr.c (string_constant): Update arguments.  Update recursive
2430         calls appropriately.  Detect missing NUL terminator and outermost
2431         declaration its missing in.
2432         Improve checks for arrays with nonzero lower bound or elements
2433         that are not a single byte.  Simplify offset computation.
2434         Simplify checks for non-NUL terminated strings.
2435         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
2436         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
2438 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2440         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
2441         correctly.
2442         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
2443         argument.  Fix range checks.
2444         * fold-const.h (c_getstr): Adjust protoype.
2445         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
2446         string is constant but contains no NUL byte.
2448         * expr.c (string_constant): Adjust function comment.
2449         Remove bogus check for zero termination.
2451         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
2453         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
2454         (get_constant_size): Don't make STRING_CSTs larger than they are.
2455         (check_string_literal): New check function for STRING_CSTs.
2456         (output_constant): Use it.
2458 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
2460         PR target/86812
2461         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
2463 2018-09-13  Richard Biener  <rguenther@suse.de>
2465         PR tree-optimization/87263
2466         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
2467         (struct unwind_state): Add max_rpo field.
2468         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
2469         Compute max_rpo, the max RPO number a block can be backwards reached
2470         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
2471         separating it from the iterating mode.
2473 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
2475         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
2476         (rfs_decision): New scheduling decision.
2478 2018-09-13  Richard Biener  <rguenther@suse.de>
2480         PR bootstrap/87134
2481         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
2482         (vn_nary_op_insert_pieces_predicated): Do not write useless
2483         valid_dominated_by_p entry outside of the allocated storage.
2485 2018-09-13  Omar Sandoval  <osandov@osandov.com>
2486             Tom de Vries  <tdevries@suse.de>
2488         PR debug/86985
2489         * dwarf2out.c (is_c): New function.
2490         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
2492 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
2494         PR target/85628
2495         * config/aarch64/aarch64.md (*aarch64_bfxil):
2496         Define.
2497         * config/aarch64/constraints.md (Ulc): Define.
2498         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
2499         Define.
2500         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
2501         New function.
2503 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
2505         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
2506         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
2507         aarch64_layout_frame call.
2508         (aarch64_expand_epilogue): Likewise.
2509         (aarch64_initial_elimination_offset): Likewise.
2510         (aarch64_get_separate_components): Likewise.
2511         (aarch64_use_return_insn_p): Likewise.
2512         (aarch64_layout_frame): Remove unneeded check.
2514 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
2516         * configure.ac: Only append
2517         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
2518         gcc_config_arguments if it was never reconfigured or last reconfigure
2519         was with different arguments.
2520         * configure: Regenerated.
2522 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
2523             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2525         PR middle-end/87290
2526         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
2527         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
2529 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
2531         PR tree-optimization/87287
2532         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
2533         X % C == 0 to X % (unsigned) C == 0 optimization to ...
2534         * match.pd (X % C == 0): ... here.  New optimization.
2536 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
2538         PR middle-end/82853
2539         * expr.h (maybe_optimize_mod_cmp): Declare.
2540         * expr.c (mod_inv): New function.
2541         (maybe_optimize_mod_cmp): New function.
2542         (do_store_flag): Use it.
2543         * cfgexpand.c (expand_gimple_cond): Likewise.
2545 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
2546             Julian Brown  <julian@codesourcery.com>
2548         PR middle-end/86336
2549         * gimplify.c (gimplify_scan_omp_clauses): Set
2550         target_firstprivatize_array_bases in OpenACC parallel and kernels
2551         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
2552         OpenACC data regions.
2554 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
2556         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
2557         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
2559 2018-09-12  Richard Biener  <rguenther@suse.de>
2561         PR tree-optimization/87280
2562         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
2563         edge but unreachable target.
2564         (do_rpo_vn): For conservatively handling a PHI only mark
2565         the backedge executable but not the block reachable.
2567 2018-09-12  Richard Biener  <rguenther@suse.de>
2569         PR tree-optimization/87266
2570         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
2571         visited blocks.
2573 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
2575         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
2576         constants.
2577         ("trunc<BFP:mode><DFP_ALL:mode>2")
2578         ("trunc<DFP_ALL:mode><BFP:mode>2")
2579         ("extend<BFP:mode><DFP_ALL:mode>2")
2580         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
2581         according to the target operand type.
2583 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
2584             Andreas Krebbel  <krebbel@linux.ibm.com>
2586         PR tree-optimization/86844
2587         * gimple-ssa-store-merging.c
2588         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
2589         there are any overlapping stores in between them, make sure they are
2590         also coalesced or we give up completely.
2592 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
2594         PR middle-end/87248
2595         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
2596         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
2598 2018-09-12  Tom de Vries  <tdevries@suse.de>
2600         * common.opt (gdescribe-dies): Add option.
2601         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
2602         attribute for artifical and nameless decls.
2603         (dwarf2out_register_external_die): Add description attribute to
2604         external reference die.
2605         (add_desc_attribute): New functions.
2606         (gen_subprogram_die): Add description attribute to
2607         DW_TAG_call_site_parameter.
2608         * tree-pretty-print.c (print_generic_expr_to_str): New function.
2609         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
2610         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
2611         -gno-describe-dies.
2612         (@item -gdescribe-dies): Add.
2614 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
2616         * tree-vrp.c (vrp_shift_undefined_p): Remove.
2617         (extract_range_from_binary_expr_1: Call
2618         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
2619         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
2620         depend on sign.
2622 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
2624         * gimple-ssa-warn-alloca.c
2625         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
2626         field for ALLOCA_BOUND_*_LARGE.
2628 2018-09-11  Nathan Sidwell  <nathan@acm.org>
2630         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
2632 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
2634         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
2635         for clobbers.  Remove obsolete comment.
2637 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
2639         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
2640         mpxchk, mpxld and mpxst types.
2641         (define_attr length_immediate): Remove all processing of mpx types.
2642         (define_attr prefix_0f): Ditto.
2643         (define_attr memory): Ditto.
2645 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
2647         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
2648         (log<mode>2): Change operand 1 predicate to general_operand.
2649         Extend operand 1 to XFmode and generate logxf3 insn.
2650         (log10<mode>2): Change operand 1 predicate to general_operand.
2651         Extend operand 1 to XFmode and generate log10xf3 insn.
2652         (log2<mode>2): Change operand 1 predicate to general_operand.
2653         Extend operand 1 to XFmode and generate log2xf3 insn.
2654         (fyl2xp1_extend<mode>xf3_i387): Remove.
2655         (log1p<mode>2): Change operand 1 predicate to general_operand.
2656         Extend operand 1 to XFmode and generate log1pxf3 insn.
2657         (fxtract_extend<mode>xf3_i387): Remove.
2658         (logb<mode>2): Change operand 1 predicate to general_operand.
2659         Extend operand 1 to XFmode and generate logbxf3 insn.
2660         (ilogb<mode>2): Change operand 1 predicate to general_operand.
2661         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
2662         (significand<mode>2): Change operand 1 predicate to general_operand.
2663         Extend operand 1 to XFmode and generate significandxf3 insn.
2665 2018-09-11  Nathan Sidwell  <nathan@acm.org>
2667         * gcc.c (perror_with_name, pfatal_with_name): Delete.
2668         (load_specs): Use fatal_error.
2669         (DELETE_IF_ORDINARY, process_command): Use error.
2670         (execute, run_attempt): Use fatal_error.
2672 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
2674         * diagnostic-core.h (sorry_at): New prototype.
2675         * diagnostic.c (sorry_at): New function.
2677 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
2679         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
2680         by zero as VR_UNDEFINED.
2682 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
2684         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
2685         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
2686         (<sincos>mode2): New expander.
2687         (sincos_extend<mode>xf3_i387): Remove insn pattern.
2688         (sincos -> sin, cos splitters): Remove splitter patterns.
2689         (sincos<mode>3): Change operand 2 predicate to general_operand.
2690         Extend operand 2 to XFmode and generate sincosxf3 insn.
2691         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
2692         Change operand 3 predicate to const1_operand.
2693         (fptan_extend<mode>xf4_i387): Remove insn pattern.
2694         (tanxf2): Update operands in the call to fptanxf4_i387.
2695         (tan<mode>2): Change operand 1 predicate to general_operand.
2696         Extend operand 1 to XFmode and generate tanxf3 insn.
2697         (atan2xf3): Rename from *fpatanxf3_i387.
2698         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
2699         (atan2xf3): Remove expander.
2700         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
2701         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
2702         (atan<mode>2): Change operand 1 predicate to general_operand.
2703         Extend operand 1 to XFmode and generate atanxf3 insn.
2705 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
2707         * config/i386/i386.md (x87/SSE constant load splitter): Use
2708         memory_operand instead of nonimmediate_operand for input operand
2709         predicate.
2711 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
2713         * config/i386/i386.md (float partial SSE register stall splitter): Move
2714         splitter near its instruction pattern.
2715         (float_extend partial SSE register stall splitter): Ditto.
2716         (float_truncate partial SSE register stall splitter): Ditto.
2718 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
2720         PR target/86794
2721         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2722         to speculation_safe_value_not_needed.
2724         PR target/85666
2725         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
2726         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
2727         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
2728         leaf_function_p, instead use has_hard_reg_initial_val.
2730 2018-09-09  Nathan Sidwell  <nathan@acm.org>
2732         * gcc.h (pfatal_with_name): Don't declare here.
2733         * gcc.c (pfatal_with_name): Make static.
2735 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
2737         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
2738         earlyclobber.
2740 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
2742         PR rtl-optimization/85458
2743         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
2744         priority hook to reduce the priority of EXPR.
2746 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
2748         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
2749         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
2750         with X87_ENABLE_FLOAT.  Remove preparation code.
2751         (*float<SWI48:mode><MODEF:mode>2): Rename from
2752         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
2753         math using "enabled" attribute.
2754         (*floatdi<MODEF:mode>2_i387): Rename from
2755         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
2756         enable for 32bit targets only.
2757         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
2758         splitter.
2759         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
2760         as operand 1 predicate.  Rewrite as define_insn_and_split.
2761         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
2763 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
2765         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
2766         to fallthru to FLOAT case.
2768 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
2770         PR target/86731
2771         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
2772         around folding of vec_sl to handle out of range shift values.
2774 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
2776         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
2777         Update callers to gen_fix_trunc<mode>_i387_fisttp
2778         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
2779         nonimmediate_operand.
2780         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
2781         and corresponding splitters.
2782         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
2783         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
2784         (fix_truncdi_i387_with_temp): Remove insn pattern
2785         and corresponding splitters.
2786         (fix_trunc<mode>_i387): Change operand 0 predicate to
2787         nonimmediate_operand.
2788         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
2789         and corresponding splitters.
2790         (*fistdi2_1): Remove.
2791         (fistdi2): Ditto.
2792         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
2793         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
2794         (*fist<mode>2_1): Remove.
2795         (fist<mode>2): Ditto.
2796         (fist<mode>2_with_temp): Remove insn pattern and corresponding
2797         splitters.
2798         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
2799         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
2800         (fistdi2_<rounding>): Change operand 0 predicate to
2801         nonimmediate_operand.
2802         (fistdi2_<rounding>_with_temp): Remove insn pattern
2803         and corresponding splitters.
2804         (fist<mode>2_<rounding>): Change operand 0 predicate to
2805         nonimmediate_operand.
2806         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
2807         and corresponding splitters.
2809         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
2811 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2813         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
2814         the init value.
2816 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
2818         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
2819         early gimple folding of vec_splat().
2820         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
2821         * gimple-fold.h: Add an extern define for tree_vec_extract().
2823 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
2825         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
2826         wrappers around TREE_TYPE comparisons.
2828 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2830         PR target/80080
2831         * config/s390/predicates.md: Add nonsym_memory_operand.
2832         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
2833         contains a SYMBOL_REF, load it into an intermediate pseudo.
2834         (s390_emit_compare_and_swap): Legitimize operand.
2835         * config/s390/s390.md: Use the new nonsym_memory_operand
2836         with UNSPECV_CAS patterns.
2838 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2840         PR target/80080
2841         * config/s390/s390-passes.def: New file.
2842         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
2843         declaration.
2844         (make_pass_s390_early_mach): Add declaration.
2845         * config/s390/s390.c (make_pass_s390_early_mach):
2846         (s390_option_override): Remove dynamic registration.
2847         * config/s390/t-s390: Add s390-passes.def.
2849 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2851         * config/s390/s390.c (s390_decompose_constant_pool_ref):
2852         Remove UNSPEC_LTREL_BASE check.
2853         (annotate_constant_pool_refs): Likewise.
2854         (find_constant_pool_ref): Likewise.
2855         (find_ltrel_base): Removed.
2856         (replace_ltrel_base): Removed.
2857         (s390_mainpool_finish): Remove replace_ltrel_base call.
2858         (s390_chunkify_start): Remove pending LTREL_BASE logic.
2859         (s390_chunkify_finish): Remove replace_ltrel_base call.
2860         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
2862 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
2864         PR target/86779
2865         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2866         to speculation_safe_value_not_needed.
2868 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
2869             Bernd Schmidt  <bernds_cb1@t-online.de>
2871         * config/nvptx/nvptx-opts.h: New file.
2872         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
2873         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
2874         (ASM_SPEC): Define.
2875         (TARGET_SM35): New macro.
2876         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
2877         correct predicate.
2878         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
2879         values.
2880         (misa=): New option.
2881         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
2883 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
2885         * config/i386/i386.md (truncdfsf2): Remove expander.
2886         (truncdfsf2_with_temp): Ditto.
2887         (truncxf<mode>2): Ditto.
2888         (*truncdfsf_fast_mixed): Remove insn pattern.
2889         (*truncdfsf_fast_i387): Ditto.
2890         (*truncdfsf_mixed): Ditto.
2891         (*truncdfsf_i387): Ditto.
2892         (*truncdfsf2_i387_1): Ditto.
2893         (*truncxfsf2_mixed): Ditto.
2894         (*truncxfdf2_mixed): Ditto.
2895         (*truncxf<mode>2_i387_noop): Ditto. Update callers
2896         to call gen_truncxf<mode>2 instead.
2897         (*truncxf<mode>2_i387): Remove.
2898         (reg->reg splitters): Remove splitter pattern.
2899         (reg->mem splitters): Ditto.
2901         (truncdfsf2): New insn pattern.
2902         (truncxf<mode>2): Ditto.
2904 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2906         * tree-ssa-math-opts.c (is_mult_by): New function.
2907         (is_square_of): Use the above.
2908         (optimize_recip_sqrt): New function.
2909         (pass_cse_reciprocals::execute): Use the above.
2911 2018-09-05  Richard Biener  <rguenther@suse.de>
2913         PR bootstrap/87134
2914         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
2915         to zero-init the emplaced vec.
2917 2018-09-05  Martin Liska  <mliska@suse.cz>
2919         PR tree-optimization/87205
2920         * tree-switch-conversion.c (pass_lower_switch::execute):
2921         Group cases for switch statements.
2923 2018-09-05  Richard Biener  <rguenther@suse.de>
2925         PR tree-optimization/87217
2926         * tree-ssa-sccvn.c (vuse_valueize): New.
2927         (vn_reference_lookup_pieces): Use it.
2928         (vn_reference_lookup): Likewise.
2930 2018-09-05  Nathan Sidwell  <nathan@acm.org>
2932         PR c++/87137
2933         * stor-layout.c (place_field): Scan forwards to check last
2934         bitfield when ms_bitfield_placement is in effect.
2936 2018-09-05  Richard Biener  <rguenther@suse.de>
2938         PR bootstrap/87225
2939         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
2940         return.
2942 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
2943             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
2945         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
2946         * config.gcc (extra_objs): Build it.
2947         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
2948         Likewise.
2949         * config/aarch64/aarch64-passes.def
2950         (pass_tag_collision_avoidance): New pass.
2951         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
2952         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
2953         (aarch64_classify_address): Remove static qualifier.
2954         (aarch64_address_info, aarch64_address_type): Move to...
2955         * config/aarch64/aarch64-protos.h: ... here.
2956         (make_pass_tag_collision_avoidance): New function.
2957         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
2958         New tuning flag.
2960 2018-09-05  Martin Liska  <mliska@suse.cz>
2962         * doc/gcov.texi: Update documentation of humar
2963         readable mode.
2964         * gcov.c (format_count): Print one decimal place, it provides
2965         more fine number of situations like '1G' vs. '1.4G'.
2967 2018-09-05  Martin Liska  <mliska@suse.cz>
2969         PR target/87164
2970         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
2971         * optc-gen.awk: Allow 'Var' for Deprecated options in order
2972         to generate a MASK value.
2974 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
2976         PR debug/86593
2977         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
2978         if frame pointer isn't used.
2979         (compute_frame_pointer_to_fb_displacement): Likewise.
2981 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
2983         PR target/87198
2984         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
2985         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
2986         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
2987         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
2988         and OPTION_MASK_ISA_XSAVEC_UNSET.
2990 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
2992         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
2993         XOR operations in NAND case.
2995 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
2997         * wide-int-range.cc (wide_int_range_convert): New.
2998         * wide-int-range.h (wide_int_range_convert): New.
2999         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
3000         code into wide_int_range_convert.
3001         (extract_range_into_wide_ints): Do not munge anti range constants
3002         into the entire domain.  Just return the range back.
3004 2018-09-04  Martin Liska  <mliska@suse.cz>
3006         * genmatch.c (output_line_directive): Add new argument
3007         fnargs.
3008         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
3010 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
3012         * doc/invoke.texi (Option Summary): Add whitespace.
3014         * doc/invoke.texi (Option Summary): Add -Waligned-new.
3016 2018-09-04  Richard Biener  <rguenther@suse.de>
3018         PR tree-optimization/87211
3019         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
3020         backedge value we're supposed to treat as VARYING also number
3021         the PHI to VARYING in case it got a different value-number already.
3023 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
3025         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
3026         (extract_range_from_binary_expr_1): Do not call
3027         vrp_can_optimize_bit_op.
3028         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
3029         static.
3030         (wide_int_range_get_mask_and_bounds): New.
3031         (wide_int_range_optimize_bit_op): New.
3032         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
3033         (wide_int_range_bit_and): Same.
3034         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
3035         (wide_int_range_optimize_bit_op): New.
3036         (wide_int_range_get_mask_and_bounds): New.
3038 2018-09-04  Richard Biener  <rguenther@suse.de>
3040         PR tree-optimization/87176
3041         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
3042         variable.  When value-numbering a virtual PHI node make sure
3043         to not value-number to the backedge value.
3045 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
3047         * doc/extend.texi (Long Long, Hex Floats): Document support for
3048         long long and hex floats in more recent versions of ISO C++.
3050 2018-09-03  Richard Biener  <rguenther@suse.de>
3052         PR tree-optimization/87177
3053         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
3054         cleanup.
3056 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3058         * bb-reorder.c (edge_order): Convert to C-qsort-style
3059         tri-state comparator.
3060         (reorder_basic_blocks_simple): Change std::stable_sort to
3061         gcc_stablesort.
3063 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3065         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
3066         tri-state comparator.
3067         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
3069 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3071         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
3072         (mergesort): ... here as maximum count for using netsort.
3073         (gcc_qsort): Set nlim to 3 if stable sort is requested.
3074         (gcc_stablesort): New.
3075         * system.h (gcc_stablesort): Declare.
3077 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3079         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
3080         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
3081         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
3083 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
3085         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
3086         lxsdx and stxsdx alternatives.
3087         (*mov<mode>_hardfloat64): Ditto.
3088         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
3090 2018-09-03  Richard Biener  <rguenther@suse.de>
3092         PR tree-optimization/87200
3093         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
3094         simplify result.
3096 2018-09-03  Martin Liska  <mliska@suse.cz>
3098         PR tree-optimization/87201
3099         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3100         Fix parenthesis in an expression.
3102 2018-09-03  Richard Biener  <rguenther@suse.de>
3104         PR tree-optimization/87197
3105         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
3106         visited.  CSE the VN_INFO hashtable lookup.
3108         PR tree-optimization/87169
3109         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
3110         iterating make sure there's no extra backedges from irreducible
3111         regions feeding the header.  Mark the destination block
3112         executable.
3114 2018-09-03  Martin Liska  <mliska@suse.cz>
3116         PR driver/83193
3117         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
3118         * common/common-targhooks.c (default_get_valid_option_values):
3119         New function.
3120         * common/common-targhooks.h (default_get_valid_option_values):
3121         Likewise.
3122         * common/config/i386/i386-common.c: Move processor_target_table
3123         from i386.c.
3124         (ix86_get_valid_option_values): New function.
3125         (TARGET_GET_VALID_OPTION_VALUES): New macro.
3126         * config/i386/i386.c (struct ptt): Move to i386-common.c.
3127         (PTA_*): Move all defined masks into i386-common.c.
3128         (ix86_function_specific_restore): Use new processor_cost_table.
3129         * config/i386/i386.h (struct ptt): Moved from i386.c.
3130         (struct pta): Likewise.
3131         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
3132         * doc/tm.texi.in: Likewise.
3133         * opt-suggestions.c (option_proposer::suggest_option):
3134         Pass prefix to build_option_suggestions.
3135         (option_proposer::get_completions): Likewise.
3136         (option_proposer::build_option_suggestions): Use the new target
3137         hook.
3138         * opts.c (struct option_help_tuple): New struct.
3139         (print_filtered_help): Use the new target hook.
3141 2018-09-03  Martin Liska  <mliska@suse.cz>
3143         PR middle-end/59521
3144         * predict.c (set_even_probabilities): Add likely_edges
3145         argument and handle cases where we have precisely one
3146         likely edge.
3147         (combine_predictions_for_bb): Catch also likely_edges.
3148         (tree_predict_by_opcode): Handle gswitch statements.
3149         * tree-cfg.h (find_case_label_for_value): New declaration.
3150         (find_taken_edge_switch_expr): Likewise.
3151         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3152         Find pivot in decision tree based on probabily, not by number of
3153         nodes.
3155 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
3157         * doc/standards.texi (Standards): Update Objective-C reference.
3159 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
3161         * doc/install.texi (Prerequisites): Update link for MPC.
3163 2018-09-01  Michael Matz  <matz@suse.de>
3165         PR tree-optimization/87074
3166         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
3167         PHIs for outer-loop uses.
3169 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
3171         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
3172         * doc/invoke.texi (C Dialect Options): Ditto.
3174 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
3176         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
3178 2018-08-31  Richard Biener  <rguenther@suse.de>
3180         PR tree-optimization/87168
3181         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
3182         (rpo_elim::eliminate_avail): When OP was not visited it must
3183         be available.
3185 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
3187         * tree-vrp.c (copy_value_range): Convert param "from" from
3188         "value_range *" to "const value_range *".
3189         (range_is_null): Likewise for param "vr".
3190         (range_int_cst_p): Likewise.
3191         (range_int_cst_singleton_p): Likewise.
3192         (symbolic_range_p): Likewise.
3193         (value_ranges_intersect_p): Likewise for both params.
3194         (value_range_nonnegative_p): Likewise for param "vr".
3195         (value_range_constant_singleton): Likewise.
3196         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
3197         (extract_range_into_wide_ints): Likewise for param "vr".
3198         (extract_range_from_multiplicative_op): Likewise for params "vr0"
3199         and "vr1".
3200         (vrp_can_optimize_bit_op): Likewise.
3201         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
3202         "vr1_".
3203         (extract_range_from_unary_expr): Likewise.
3204         (debug_value_range): Likewise for param "vr".
3205         (value_range::dump): Add "const" qualifier.
3206         (vrp_prop::check_array_ref): Convert local "vr" from
3207         "value_range *" to "const value_range *".
3208         (vrp_prop::check_mem_ref): Likewise.
3209         (vrp_prop::visit_stmt): Likewise for local "old_vr".
3210         (vrp_intersect_ranges_1): Likewise for param "vr_1".
3211         (vrp_intersect_ranges): Likewise.
3212         (simplify_stmt_for_jump_threading): Likewise for local "vr".
3213         (vrp_prop::vrp_finalize): Likewise.
3214         * tree-vrp.h (value_range::dump): Add "const" qualifier.
3215         (vrp_intersect_ranges): Add "const" qualifier to params as above.
3216         (extract_range_from_unary_expr): Likewise.
3217         (value_range_constant_singleton): Likewise.
3218         (symbolic_range_p): Likewise.
3219         (copy_value_range): Likewise.
3220         (extract_range_from_binary_expr_1): Likewise.
3221         (range_int_cst_p): Likewise.
3222         (vrp_set_zero_nonzero_bits): Likewise.
3223         (range_int_cst_singleton_p): Likewise.
3225 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
3227         * config/aarch64/arm_neon.h (vabsd_s64): New.
3228         (vnegd_s64): Likewise.
3230 2018-08-31  Martin Jambor  <mjambor@suse.cz>
3232         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
3234 2018-08-31  Martin Liska  <mliska@suse.cz>
3236         * ipa-icf.c (sem_item::add_type): Use
3237         sem_item::m_type_hash_cache.
3238         * ipa-icf.h: Move the cache from sem_item_optimizer
3239         to sem_item.
3241 2018-08-31  Nathan Sidwell  <nathan@acm.org>
3243         * doc/extend.texi (Backwards Compatibility): Remove implicit
3244         extern C leeway of () being (...).
3246 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3248         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
3250 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
3252         PR target/86684
3253         PR target/87149
3254         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
3256 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
3258         PR middle-end/87138
3259         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
3260         gen_int_mode.  Formatting fixes.
3262 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
3264         * target.def (custom_function_descriptors): Improve documentation.
3265         * doc/tm.texi.in (Trampolines): Expand discussion of function
3266         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
3267         beginning of the section.
3268         * doc/tm.texi: Regenerated.
3270 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
3272         * cfg.h (class auto_edge_flag): Spell out the template-id of the
3273         base class in the initializer list.  This is a workaround for
3274         building with older GCC.
3275         (class auto_bb_flag): Likewise.
3277 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
3279         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
3280         (altivec_vcmpequ<VI_char>_p): Remove star.
3281         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
3282         vector load modes.
3283         (expand_strncmp_vec_sequence): New function.
3284         (emit_final_str_compare_vec): New function.
3285         (expand_strn_compare): Add support for vector strncmp.
3286         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
3287         length specification to bytes.
3288         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
3289         (vcmpnezb_p): New pattern.
3290         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
3291         for option -mstring-compare-inline-limit.
3293 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
3295         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
3296         (PTA_SKYLAKE): Add PTA_AES.
3297         (PTA_GOLDMONT): Likewise.
3299 2018-08-29  Jan Hubicka  <jh@suse.cz>
3301         PR lto/86517
3302         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
3303         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
3305 2018-08-29  Jan Hubicka  <jh@suse.cz>
3307         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
3308         TYPE_STUB_DECL.
3309         (hash_tree): Do not visit TYPE_STUB_DECL.
3310         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
3311         stream TYPE_STUB_DECL.
3312         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
3313         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
3314         after free_lang_data.
3315         (type_in_anonymous_namespace_p): Likewise.
3317 2018-08-29  Jan Hubicka  <jh@suse.cz>
3319         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3320         comment that it has to be even number.
3321         (class sreal): Change m_sig type to int32_t.
3322         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3323         int64_t for temporary calculations.
3324         (sreal_verify_basics): Drop one bit from minimum and maximum.
3326 2018-08-30  Richard Biener  <rguenther@suse.de>
3328         PR tree-optimization/87147
3329         * tree-ssa-sccvn.c (SSA_VISITED): New function.
3330         (visit_phi): When the degenerate result is from the backedge and
3331         we didn't visit its definition yet drop to VARYING.
3332         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
3334 2018-08-29  Jan Hubicka  <jh@suse.cz>
3336         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
3337         DECL_VINDEX.
3338         (hash_tree): Likewise.
3340 2018-08-29  Jan Hubicka  <jh@suse.cz>
3342         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
3343         and TYPE_NEXT_REF_TO.
3345 2018-08-29  Jan Hubicka  <jh@suse.cz>
3347         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3348         comment that it has to be even number.
3349         (class sreal): Change m_sig type to int32_t.
3350         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3351         int64_t for temporary calculations.
3352         (sreal_verify_basics): Drop one bit from minimum and maximum.
3354 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
3356         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
3358 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
3360         PR middle-end/86995
3361         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
3362         if to_add is negative.
3364 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3366         PR middle-end/87053
3367         * builtins.c (c_strlen): Improve range checks.
3369 2018-08-29  Martin Sebor  <msebor@redhat.com>
3370             Jeff Law  <law@redhat.com>
3372         PR tree-optimization/86714
3373         PR tree-optimization/86711
3374         * builtins.c (c_strlen): Add arguments to call to string_constant.
3375         * expr.c (string_constant): Add argument.  Detect missing nul
3376         terminator and outermost declaration it's missing in.
3377         * expr.h (string_constant): Add argument.
3378         * fold-const.c (read_from_constant_string): Add arguments to call to
3379         string_constant.
3380         (c_getstr): Likewise.
3381         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3382         to string_constant.
3383         * tree-ssa-strlen.c (get_stridx): Likewise.
3385 2018-08-29  Jan Hubicka  <jh@suse.cz>
3387         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
3388         Do not stream DECL_VINDEX.
3389         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
3390         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
3391         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
3393 2018-08-29  Richard Biener  <rguenther@suse.de>
3395         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
3396         virtual operands that are not default defs to honor region
3397         boundaries.
3398         (rpo_vn_valueize): Remove ineffective code here.
3400 2018-08-29  Richard Biener  <rguenther@suse.de>
3402         PR tree-optimization/87132
3403         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
3404         when skipping defs reachable over backedges.
3406 2018-08-29  Richard Biener  <rguenther@suse.de>
3408         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
3409         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
3410         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
3411         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
3412         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
3413         (vn_reference_lookup_3): Remove use of const_parms.
3414         (free_rpo_vn): Do not free const_parms.
3415         (do_rpo_vn): Do not call init_const_parms.
3416         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
3417         SSA_NAME_POINTS_TO_READONLY_MEMORY.
3418         (call_may_clobber_ref_p_1): Likewise.
3420 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
3422         PR other/86726
3423         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
3424         (-O): Ditto.
3425         (-ftree-scev-cprop): Document.
3427 2018-08-29  Jan Hubicka  <jh@suse.cz>
3429         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
3430         parameters.
3431         (sreal constructor): Update.
3432         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
3433         sreal:operator/): Update.
3435 2018-08-29  Martin Liska  <mliska@suse.cz>
3437         * tree-switch-conversion.c (switch_conversion::expand):
3438         Strenghten assumption about gswitch statements.
3440 2018-08-29  Richard Biener  <rguenther@suse.de>
3442         PR tree-optimization/87117
3443         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
3444         re-value-number released SSA VDEFs.
3446 2018-08-29  Richard Biener  <rguenther@suse.de>
3448         PR tree-optimization/87126
3449         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
3451 2018-08-28  Jim Wilson  <jimw@sifive.com>
3453         * config/riscv/pic.md: Rewrite.
3454         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
3455         invalid address.
3456         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
3457         (SOFTF, default_load, softload, softstore): New.
3459 2018-08-28  Jeff Law  <law@redhat.com>
3461         * fold-const.c (fold_binary_loc): Remove recently added assert.
3463 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
3465         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
3466         to OP parmeter of generated function.
3468 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
3470         PR tree-optimization/87009
3471         * match.pd: Add boolean optimizations.
3473 2018-08-28  Martin Sebor  <msebor@redhat.com>
3475         PR middle-end/86631
3476         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
3477         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
3478         (pass_walloca::gate): Use it.
3479         (alloca_call_type): Same.
3480         (pass_walloca::execute): Same.
3481         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
3483 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
3485         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
3486         GCC_VERSION for usage of "__gcc_dump_printf__" format from
3487         >= 3005 to >= 9000.
3489 2018-08-28  Richard Biener  <rguenther@suse.de>
3491         PR tree-optimization/87124
3492         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
3493         constants before looking up avail.
3495 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
3497         PR middle-end/87099
3498         * calls.c (maybe_warn_nonstring_arg): Punt early if
3499         warn_stringop_overflow is zero.  Don't call get_range_strlen
3500         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
3501         Swap comparison operands to have constants on rhs.  Only use
3502         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
3503         increment lenrng[0].
3505 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
3507         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
3508         use of tree_to_shwi.  Remove duplicated test for the size being
3509         a whole number of bytes.
3511 2018-08-28  Richard Biener  <rguenther@suse.de>
3513         PR tree-optimization/87117
3514         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
3515         Handle removed stmt without LHS (GIMPLE_NOP).
3517 2018-08-28  Richard Biener  <rguenther@suse.de>
3519         PR tree-optimization/87117
3520         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
3521         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
3523 2018-08-28  Richard Biener  <rguenther@suse.de>
3525         PR tree-optimization/87117
3526         * tree-ssa-pre.c (compute_avail): Do not make expressions
3527         with predicated values available.
3528         (get_expr_value_id): Assert we do not run into predicated value
3529         expressions.
3531 2018-08-28  Richard Biener  <rguenther@suse.de>
3533         PR tree-optimization/87117
3534         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
3535         get virtual operands.
3536         (get_expr_operands): Handle STRING_CST like other decls.
3538 2018-08-28  Martin Liska  <mliska@suse.cz>
3540         * tree.h: Update documentation of fndecl_built_in_p
3541         functions.
3544 2018-08-27  Jeff Law  <law@redhat.com>
3545         PR tree-optimization/87110
3546         * tree-ssa-dse.c (compute_trims): Handle non-constant
3547         TYPE_SIZE_UNIT.
3549 2018-08-27  Martin Sebor  <msebor@redhat.com>
3551         PR tree-optimization/86914
3552         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
3554 2018-08-27  Martin Sebor  <msebor@redhat.com>
3556         PR tree-optimization/87112
3557         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
3558         the type of the bound argument.
3560 2018-08-27  Jeff Law  <law@redhat.com>
3562         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
3563         type does not have a TYPE_SIZE_UNIT.
3565 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
3567         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
3568         with include of backend.h.
3570 2018-08-27  Richard Biener  <rguenther@suse.de>
3572         PR tree-optimization/86927
3573         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
3574         use const cond reduction code.
3576 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
3578         PR tree-optimization/85758
3579         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
3581 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
3583         PR c++/87091
3584         * diagnostic-show-locus.c (class layout_range): Update for
3585         conversion of show_caret_p to a tri-state.
3586         (layout_range::layout_range): Likewise.
3587         (make_range): Likewise.
3588         (layout::maybe_add_location_range): Likewise.
3589         (layout::should_print_annotation_line_p): Don't show annotation
3590         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
3591         (layout::get_state_at_point): Update for conversion of
3592         show_caret_p to a tri-state.  Bail out early for
3593         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
3594         underlining or source colorization.
3595         (gcc_rich_location::add_location_if_nearby): Update for conversion
3596         of show_caret_p to a tri-state.
3597         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
3598         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
3599         Likewise.
3600         (selftest::test_one_liner_labels): Likewise.
3601         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
3602         conversion of show_caret_p to a tri-state.
3603         * pretty-print.c (text_info::set_location): Likewise.
3604         * pretty-print.h (text_info::set_location): Likewise.
3605         * substring-locations.c (format_warning_n_va): Likewise.
3606         * tree-diagnostic.c (default_tree_printer): Likewise.
3607         * tree-pretty-print.c (newline_and_indent): Likewise.
3609 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
3611         PR c++/87091
3612         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
3613         line above for line-insertion fix-it hints.
3614         (selftest::test_fixit_insert_containing_newline): Update the
3615         expected results, and add a test with line-numbering enabled.
3617 2018-08-27  Martin Liska  <mliska@suse.cz>
3619         PR sanitizer/86962
3620         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
3621         params with DECL_HAS_VALUE_EXPR_P.
3623 2018-08-27  Martin Liska  <mliska@suse.cz>
3625         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
3626         selected expansion strategy.
3628 2018-08-27  Martin Liska  <mliska@suse.cz>
3630         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
3631         * builtins.c (is_builtin_fn): Likewise.
3632         * attribs.c (diag_attr_exclusions): Use new function
3633         fndecl_built_in_p and remove check for FUNCTION_DECL if
3634         possible.
3635         (builtin_mathfn_code): Likewise.
3636         (fold_builtin_expect): Likewise.
3637         (fold_call_expr): Likewise.
3638         (fold_builtin_call_array): Likewise.
3639         (fold_call_stmt): Likewise.
3640         (set_builtin_user_assembler_name): Likewise.
3641         (is_simple_builtin): Likewise.
3642         * calls.c (gimple_alloca_call_p): Likewise.
3643         (maybe_warn_nonstring_arg): Likewise.
3644         * cfgexpand.c (expand_call_stmt): Likewise.
3645         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
3646         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
3647         (cgraph_node::verify_node): Likewise.
3648         * cgraphclones.c (build_function_decl_skip_args): Likewise.
3649         (cgraph_node::create_clone): Likewise.
3650         * config/arm/arm.c (arm_insert_attributes): Likewise.
3651         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
3652         * dse.c (scan_insn): Likewise.
3653         * expr.c (expand_expr_real_1): Likewise.
3654         * fold-const.c (operand_equal_p): Likewise.
3655         (fold_binary_loc): Likewise.
3656         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
3657         * gimple-low.c (lower_stmt): Likewise.
3658         * gimple-pretty-print.c (dump_gimple_call): Likewise.
3659         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
3660         Likewise.
3661         * gimple.c (gimple_build_call_from_tree): Likewise.
3662         (gimple_call_builtin_p): Likewise.
3663         (gimple_call_combined_fn): Likewise.
3664         * gimplify.c (gimplify_call_expr): Likewise.
3665         (gimple_boolify): Likewise.
3666         (gimplify_modify_expr): Likewise.
3667         (gimplify_addr_expr): Likewise.
3668         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
3669         * ipa-cp.c (determine_versionability): Likewise.
3670         * ipa-fnsummary.c (compute_fn_summary): Likewise.
3671         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
3672         * ipa-split.c (visit_bb): Likewise.
3673         (split_function): Likewise.
3674         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3675         * lto-cgraph.c (input_node): Likewise.
3676         * lto-streamer-out.c (write_symbol): Likewise.
3677         * omp-low.c (setjmp_or_longjmp_p): Likewise.
3678         (lower_omp_1): Likewise.
3679         * predict.c (strip_predict_hints): Likewise.
3680         * print-tree.c (print_node): Likewise.
3681         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
3682         * trans-mem.c (is_tm_irrevocable): Likewise.
3683         (is_tm_load): Likewise.
3684         (is_tm_simple_load): Likewise.
3685         (is_tm_store): Likewise.
3686         (is_tm_simple_store): Likewise.
3687         (is_tm_abort): Likewise.
3688         (tm_region_init_1): Likewise.
3689         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
3690         * tree-cfg.c (verify_gimple_call): Likewise.
3691         (move_stmt_r): Likewise.
3692         (stmt_can_terminate_bb_p): Likewise.
3693         * tree-eh.c (lower_eh_constructs_2): Likewise.
3694         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
3695         * tree-inline.c (remap_gimple_stmt): Likewise.
3696         (copy_bb): Likewise.
3697         (estimate_num_insns): Likewise.
3698         (fold_marked_statements): Likewise.
3699         * tree-sra.c (scan_function): Likewise.
3700         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
3701         (optimize_stack_restore): Likewise.
3702         (pass_fold_builtins::execute): Likewise.
3703         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
3704         (mark_all_reaching_defs_necessary_1): Likewise.
3705         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
3706         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3707         (pass_forwprop::execute): Likewise.
3708         * tree-ssa-loop-im.c (stmt_cost): Likewise.
3709         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3710         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
3711         * tree-ssa-strlen.c (get_string_length): Likewise.
3712         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
3713         (find_func_aliases_for_call): Likewise.
3714         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
3715         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
3716         * tree-tailcall.c (find_tail_calls): Likewise.
3717         * tree.c (need_assembler_name_p): Likewise.
3718         (free_lang_data_in_decl): Likewise.
3719         (get_call_combined_fn): Likewise.
3720         * ubsan.c (is_ubsan_builtin_p): Likewise.
3721         * varasm.c (incorporeal_function_p): Likewise.
3722         * tree.h (DECL_BUILT_IN): Remove and replace with
3723         fndecl_built_in_p.
3724         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
3725         (fndecl_built_in_p): New.
3727 2018-08-27  Martin Liska  <mliska@suse.cz>
3729         PR tree-optimization/86847
3730         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
3731         Dump also subtree probability.
3732         (switch_decision_tree::do_jump_if_equal): New function.
3733         (switch_decision_tree::emit_case_nodes): Handle special
3734         situations in balanced tree that can be emitted much simpler.
3735         Fix calculation of probabilities that happen in tree expansion.
3736         * tree-switch-conversion.h (struct cluster): Add
3737         is_single_value_p.
3738         (struct simple_cluster): Likewise.
3739         (struct case_tree_node): Add new function has_child.
3740         (do_jump_if_equal): New.
3742 2018-08-27  Martin Liska  <mliska@suse.cz>
3744         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
3745         Add new argument to bit_test_cluster constructor.
3746         (bit_test_cluster::emit): Set bits really number of values
3747         handlel by a test.
3748         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
3749         probability argument.
3750         * tree-switch-conversion.h (struct bit_test_cluster):
3751         Add m_handles_entire_switch.
3753 2018-08-27  Martin Liska  <mliska@suse.cz>
3755         PR tree-optimization/86702
3756         * tree-switch-conversion.c (jump_table_cluster::emit):
3757         Make probabilities even for values in jump table
3758         according to number of cases handled.
3759         (switch_decision_tree::compute_cases_per_edge): Pass
3760         argument to reset_out_edges_aux function.
3761         (switch_decision_tree::analyze_switch_statement): Likewise.
3762         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
3763         Make it static.
3765 2018-08-27  Martin Liska  <mliska@suse.cz>
3767         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
3768         cfun argument explicitly.
3769         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
3770         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
3771         function gimple_switch_default_bb.
3772         (convert_switch_statements):
3773         (expand_builtins):
3774         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
3775         * stmt.c (label_to_block_fn): Use label_to_block and pass
3776         cfun argument explicitly and use gimple_switch_label_bb.
3777         (expand_case): Likewise.
3778         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
3779         cfun argument explicitly. Likewise.
3780         (make_edges_bb): Likewise.
3781         (make_cond_expr_edges): Likewise.
3782         (get_cases_for_edge): Likewise.
3783         (make_gimple_switch_edges): Likewise.
3784         (label_to_block_fn): Likewise.
3785         (label_to_block): Likewise.
3786         (make_goto_expr_edges): Likewise.
3787         (make_gimple_asm_edges): Likewise.
3788         (main_block_label): Likewise.
3789         (group_case_labels_stmt): Likewise.
3790         (find_taken_edge_computed_goto): Likewise.
3791         (find_taken_edge_switch_expr): Likewise.
3792         (gimple_verify_flow_info): Likewise.
3793         (gimple_redirect_edge_and_branch): Likewise.
3794         (gimple_switch_label_bb): New function.
3795         (gimple_switch_default_bb): Likewise.
3796         (gimple_switch_edge): Likewise.
3797         (gimple_switch_default_edge): Likewise.
3798         * tree-cfg.h (label_to_block_fn): Remove and replace ...
3799         (label_to_block): ... with this.
3800         (gimple_switch_label_bb): New.
3801         (gimple_switch_default_bb): Likewise.
3802         (gimple_switch_edge): Likewise.
3803         (gimple_switch_default_edge): Likewise.
3804         * tree-cfgcleanup.c (convert_single_case_switch): Use
3805         new gimple functions and pass new argument to label_to_block.
3806         (cleanup_control_flow_bb):
3807         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
3808         cfun argument explicitly.
3809         (make_eh_edges): Likewise.
3810         (redirect_eh_dispatch_edge): Likewise.
3811         (lower_resx): Likewise.
3812         (lower_eh_dispatch): Likewise.
3813         (maybe_remove_unreachable_handlers): Likewise.
3814         (unsplit_eh): Likewise.
3815         (cleanup_empty_eh): Likewise.
3816         (verify_eh_edges): Likewise.
3817         (verify_eh_dispatch_edge): Likewise.
3818         * tree-ssa-dom.c (record_edge_info): Likewise.
3819         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
3820         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
3821         (thread_through_normal_block): Likewise.
3822         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
3823         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
3824         * tree-switch-conversion.c (switch_conversion::collect): Use new
3825         gimple functions.
3826         (switch_conversion::check_final_bb): Likewise.
3827         (switch_conversion::gather_default_values): Pass new argument
3828         to label_to_block.
3829         (switch_conversion::build_constructors): Likewise.
3830         (switch_decision_tree::compute_cases_per_edge): Use new
3831         gimple_switch_edge function.
3832         (switch_decision_tree::analyze_switch_statement): Pass new argument
3833         to label_to_block.
3834         (switch_decision_tree::try_switch_expansion): Use
3835         gimple_switch_default_edge.
3836         * tree-vrp.c (find_switch_asserts): Pass new argument
3837         to label_to_block.
3838         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
3839         (vr_values::simplify_switch_using_ranges): Likewise.
3841 2018-08-27  Richard Biener  <rguenther@suse.de>
3843         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
3844         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
3846         * tree-ssa-sccvn.h (struct vn_pval): New structure.
3847         (struct vn_nary_op_s): Add unwind_to member.  Add
3848         predicated_values flag and put result into a union together
3849         with a linked list of vn_pval.
3850         (struct vn_ssa_aux): Add name member to make maintaining
3851         a map of SSA name to vn_ssa_aux possible.  Remove no longer
3852         needed info, dfsnum, low, visited, on_sccstack, use_processed
3853         and range_info_anti_range_p members.
3854         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
3855         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
3856         New functions.
3857         (vn_valueize): New global.
3858         (vn_context_bb): Likewise.
3859         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
3860         VN_INFO_PTR_INFO): Remove.
3861         * tree-ssa-sccvn.c: ... (rewrite)
3862         (pass_fre::execute): For -O2+ initialize loops and run
3863         RPO VN in optimistic mode (iterating).  For -O1 and -Og
3864         run RPO VN in non-optimistic mode.
3865         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
3866         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
3867         * doc/invoke.texi (sccvn-max-scc-size): Remove.
3868         (rpo-vn-max-loop-depth): Document.
3869         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
3870         when valuezing the VUSE signals we walked out of the region.
3871         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
3872         (phi_translate): Set VN context block to use for availability
3873         lookup.
3874         (compute_avail): Likewise.
3875         (pre_valueize): New function.
3876         (pass_pre::execute): Adjust to the RPO VN API.
3878         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
3879         (propagate_constants_for_unrolling): Remove.
3880         (tree_unroll_loops_completely): Perform value-numbering
3881         on the unrolled bodies loop parent.
3883 2018-08-27  Richard Biener  <rguenther@suse.de>
3885         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
3886         for partial antic compute.
3888 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
3890         PR rtl-optimization/87065
3891         * combine.c (simplify_if_then_else): Formatting fix.
3892         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
3893         check.
3894         (known_cond): Don't return const_true_rtx for vector modes.  Use
3895         CONST0_RTX instead of const0_rtx.  Formatting fixes.
3897 2018-08-27  Martin Liska  <mliska@suse.cz>
3899         PR gcov-profile/87069
3900         * gcov.c (process_file): Record files already processed
3901         and warn about a file being processed multiple times.
3903 2018-08-27  Martin Liska  <mliska@suse.cz>
3905         PR driver/83193
3906         * config/aarch64/aarch64.c (aarch64_override_options_internal):
3907         Set default values for x_aarch64_*_string strings.
3908         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
3909         prefix.  For -mabi do not print '=ABI' in help and use
3910         <option_value> format for -msve-vector-bits and -moverride
3911         options.
3913 2018-08-26  Jeff Law  <law@redhat.com>
3915         * config/mips/frame-header-opt.c: Include "backend.h" rather than
3916         "cfg.h"
3918 2018-08-26  Marek Polacek  <polacek@redhat.com>
3920         PR c++/87029, Implement -Wredundant-move.
3921         * doc/invoke.texi: Document -Wredundant-move.
3923 2018-08-25  Martin Sebor  <msebor@redhat.com>
3925         PR tree-optimization/87059
3926         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
3927         to the same type as the other.
3928         * fold-const.c (fold_binary_loc): Assert expectation.
3930 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
3932         * config/darwin.c (machopic_legitimize_pic_address): Clean up
3933         extraneous parentheses, dead code section and formatting.
3935 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
3937         PR c++/87091
3938         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
3939         wide enough for jumps in the line-numbering to be visible.
3940         (layout::print_gap_in_line_numbering): New member function.
3941         (layout::calculate_line_spans): When using line numbering, merge
3942         line spans that are only 1 line apart.
3943         (diagnostic_show_locus): When printing line numbers, show gaps in
3944         line numbering directly, rather than printing headers.
3945         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
3946         line-numbering with multiple line spans.
3947         (selftest::test_fixit_insert_containing_newline_2): Add test of
3948         line-numbering, in which the spans are close enough to be merged.
3950 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
3952         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
3953         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
3954         * tree-vrp.c (range_is_nonnull): Remove.
3955         (range_includes_zero_p): Accept value_range instead of min/max.
3956         (extract_range_from_binary_expr_1): Do not early bail on
3957         POINTER_PLUS_EXPR.
3958         Use range_includes_zero_p instead of range_is_nonnull.
3959         (extract_range_from_unary_expr): Use range_includes_zero_p instead
3960         of range_is_nonnull.
3961         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
3962         special case VR_ANTI_RANGE.
3963         (vrp_finalize): Same.
3964         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
3965         instead of min/max.
3966         (range_is_nonnull): Remove.
3967         * vr-values.c (vrp_stmt_computes_nonzero): Use
3968         range_includes_zero_p instead of range_is_nonnull.
3969         (extract_range_basic): Pass value_range to range_includes_zero_p
3970         instead of range_is_nonnull.
3972 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
3974         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
3975         * emit-rtl.h (rtl_data): Remove return_bnd.
3976         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
3977         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
3978         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
3979         (POINTER_BOUNDS_MODE): Remove definition.
3980         (make_pointer_bounds_mode): Remove.
3981         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
3982         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
3983         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
3984         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
3985         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
3986         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
3987         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
3989         * config/i386/i386-modes.def (BND32, BND64): Remove.
3990         * config/i386/i386.c (dbx_register_map): Remove bound registers.
3991         (dbx64_register_map): Ditto.
3992         (svr4_dbx_register_map): Ditto.
3993         (indirect_thunk_bnd_needed): Remove.
3994         (indirect_thunks_bnd_used): Ditto.
3995         (indirect_return_bnd_needed): Ditto.
3996         (indirect_return_via_cx_bnd): Ditto.
3997         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
3998         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
3999         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
4000         (output_indirect_thunk_function): Remove handling of
4001         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
4002         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
4003         (ix86_save_reg): Remove handling of crtl->return_bnd.
4004         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
4005         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
4006         and UNSPEC_BNDLX_ADDR.
4007         (ix86_output_indirect_branch_via_reg): Remove handling of
4008         indirect_thunk_prefix_bnd.
4009         (ix86_output_indirect_branch_via_push): Ditto.
4010         (ix86_output_function_return): Ditto.
4011         (ix86_output_indirect_function_return): Ditto.
4012         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
4013         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
4014         (CALL_USED_REGISTERS): Ditto.
4015         (REG_ALLOC_ORDER): Update for removal of bound registers.
4016         (HI_REGISTER_NAMES): Ditto.
4017         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
4018         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
4019         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
4020         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
4021         (FIRST_PSEUDO_REG): Update.
4022         (BND): Remove mode iterator.
4023         * config/i386/predicates.md (bnd_mem_operator): Remove.
4025 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
4027         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
4028         vectors.
4030 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
4032         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
4033         the case in which the permute needs only a single element and
4034         repeats for every vector of the result.  Extend that case to
4035         handle variable-length vectors.
4036         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4038 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
4040         PR debug/79342
4041         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
4042         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
4044 2018-08-24  Richard Biener  <rguenther@suse.de>
4046         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
4047         bb_flags_allocated members.
4048         (auto_flag): New RAII class for allocating flags.
4049         (auto_edge_flag): New RAII class for allocating edge flags.
4050         (auto_bb_flag): New RAII class for allocating bb flags.
4051         * cfgloop.c (verify_loop_structure): Allocate temporary edge
4052         flag dynamically.
4053         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
4054         in favor of temporarily allocated BB flag.
4055         * hsa-brig.c: Re-order includes.
4056         * hsa-dump.c: Likewise.
4057         * hsa-regalloc.c: Likewise.
4058         * print-rtl.c: Likewise.
4059         * profile-count.c: Likewise.
4061 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
4063         PR target/86989
4064         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
4065         the TOC register.
4067 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
4069         PR 87073/bootstrap
4070         * wide-int-range.cc (wide_int_range_div): Do not ignore result
4071         from wide_int_range_multiplicative_op.
4073 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4075         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
4076         "permutaion".
4078 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
4080         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
4081         to 'expanded'.
4083 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
4085         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
4086         full GENERIC expression used for replacement.
4088 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
4090         * tree-vrp.c (abs_extent_range): Remove.
4091         (extract_range_into_wide_ints): Pass wide ints by reference.
4092         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
4093         Pass wide ints by reference in all calls to
4094         extract_range_into_wide_ints.
4095         * wide-int-range.cc (wide_int_range_div): New.
4096         * wide-int-range.h (wide_int_range_div): New.
4097         (wide_int_range_includes_zero_p): New.
4098         (wide_int_range_zero_p): New.
4100 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
4102         * config/aarch64/aarch64.md (arches): New enum.
4103         (arch): New enum attr.
4104         (arch_enabled): New attr.
4105         (enabled): Now uses arch_enabled only.
4106         (simd, sve, fp16): Removed attribute.
4107         (fp): Attr now defined in terms of 'arch'.
4108         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
4109         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
4110         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
4111         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
4112         attributes into 'arch'.
4113         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
4114         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
4115         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
4116         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
4117         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
4118         'simd' attribute into 'arch'.
4119         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
4120         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
4121         Convert use of 'fp' attribute to 'arch'.
4122         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
4123         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
4124         into 'arch'.
4125         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
4126         (different modes) Merge 'fp' and 'simd' into 'arch'.
4127         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
4128         'simd' into 'arch'.
4130 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
4132         PR rtl-optimization/87026
4133         * expmed.c (canonicalize_comparison): If we can no longer create
4134         pseudoregisters, don't.
4136 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
4138         PR target/86951
4139         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
4140         prototype.
4141         * config/arm/arm.c (speculation_barrier_libfunc): New static
4142         variable.
4143         (arm_init_libfuncs): Initialize it.
4144         (arm_emit_speculation_barrier): New function.
4145         * config/arm/arm.md (speculation_barrier): Call
4146         arm_emit_speculation_barrier for architectures that do not have
4147         DSB or ISB.
4148         (speculation_barrier_insn): Only match on Armv7 or later.
4150 2018-08-23  Richard Biener  <rguenther@suse.de>
4152         PR middle-end/87024
4153         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
4154         calls.
4156 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
4158         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
4159         of single-vector TBLs.
4160         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
4161         one input is given.
4163 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
4165         PR target/85910
4166         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
4167         aarch64_evpc_tbl guard.
4169 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4171         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
4172         behaviour.
4174 2018-08-22  Martin Sebor  <msebor@redhat.com>
4176         PR middle-end/87052
4177         * tree-pretty-print.c (pretty_print_string): Add argument.
4178         (dump_generic_node): Call to pretty_print_string with string size.
4180 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
4182         PR rtl-optimization/86771
4183         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
4184         of two SETs into those two SETs, one to be placed at i2, if that SETs
4185         destination is modified between i2 and i3.
4187 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4189         PR tree-optimization/86725
4190         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
4191         function.
4192         (vect_analyze_scalar_cycles_1): Check it.
4194 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4196         PR tree-optimization/86725
4197         * tree-vect-loop.c (vect_is_simple_reduction): When treating
4198         an outer loop phi as a double reduction, make sure that the
4199         single user of the phi result is an inner loop phi.
4201 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4203         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
4204         grouped stores with gaps to a strided group.
4206 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4208         * tree-vect-stmts.c (get_group_load_store_type)
4209         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
4210         first statement in a group.
4212 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4214         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
4215         the sequence used in gcc/gcc.c.
4217 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4219         PR other/704
4220         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
4221         building it.
4223 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4225         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
4226         Darwin10-specific unwinder-shim.
4227         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
4228         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
4229         New to cater for Darwin10 Rosetta.
4231 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4233         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
4234         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
4236 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4238         PR bootstrap/81033
4239         PR target/81733
4240         PR target/52795
4241         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
4242         (dwarf2out_switch_text_section): Generate a local label for the
4243         second function sub-section and apply it as the second FDE start
4244         label.
4245         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
4246         second sub-section start.
4248 2018-08-22  Richard Biener  <rguenther@suse.de>
4250         PR tree-optimization/86988
4251         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
4253 2018-08-22  Richard Biener  <rguenther@suse.de>
4255         PR tree-optimization/86945
4256         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
4258 2018-08-22  Alexandre Oliva <oliva@adacore.com>
4260         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
4261         a comment about how uses of r2 for .sdata2 come about.
4263 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
4265         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
4267 2018-08-21  Marek Polacek  <polacek@redhat.com>
4269         PR c++/86981, Implement -Wpessimizing-move.
4270         * doc/invoke.texi: Document -Wpessimizing-move.
4272 2018-08-21  Jan Hubicka  <jh@suse.cz>
4274         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
4275         * tree.h (is_redundant_typedef): Remove.
4276         * dwarf2out.c (is_redundant_typedef): Turn into static function.
4278 2018-08-21  Jan Hubicka  <jh@suse.cz>
4280         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
4281         when possible.
4283 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
4285         * expmed.c (extract_low_bits): Reject invalid subregs early.
4287 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4289         PR middle-end/86121
4290         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
4291         behaviour.
4293 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4295         * config/vxworks.h: Guard vxworks_asm_out_constructor and
4296         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
4297         * config/vxworks.c: Likewise.
4299 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4301         * config/vxworks.c: Set targetm.have_ctors_dtors
4302         if HAVE_INITFINI_ARRAY_SUPPORT.
4303         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
4304         if HAVE_INITFINI_ARRAY_SUPPORT.
4306 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4308         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
4309         default search path for VxWorks < 7.
4311 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4313         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
4314         (get_format_string): Refer to c_getstr.
4316 2018-08-21  Tom de Vries  <tdevries@suse.de>
4318         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4319         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4320         (debuginfo_early_stop): Declare.
4321         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4322         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4323         (debuginfo_early_stop): New function.
4324         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
4325         and debuginfo_early_stop.
4326         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
4327         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
4328         (general_init): Call debuginfo_early_init.
4329         (finalize): Call debuginfo_fini.
4330         (do_compile): Call debuginfo_init.
4331         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
4332         -fdump-early-debug.
4333         (@item -fdump-debug, @item -fdump-earlydebug): Add.
4335 2018-08-21  Tom de Vries  <tdevries@suse.de>
4337         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
4338         flag_dump_noaddr and flag_dump_unnumbered.
4340 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
4342         * wide-int-range.cc (wide_int_range_abs): New.
4343         (wide_int_range_order_set): Rename from wide_int_range_min_max.
4344         * wide-int-range.h (wide_int_range_abs): New.
4345         (wide_int_range_min_max): New.
4346         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
4347         case to call wide_int_range_abs.
4348         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
4349         (extract_range_from_abs_expr): Delete.
4351 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
4353         PR target/87033
4354         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
4355         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
4356         for indexed loads.
4358 2018-08-20  Nathan Sidwell  <nathan@acm.org>
4359             Jeff Law <law@redhat.com>
4361         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
4362         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
4364 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
4366         PR other/84889
4367         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
4368         (decl_attributes): Likewise.
4369         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
4370         instance.
4371         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4372         * diagnostic-core.h (class auto_diagnostic_group): New class.
4373         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
4374         (diagnostic_report_diagnostic): Handle the first diagnostics within
4375         a group.
4376         (emit_diagnostic): Add auto_diagnostic_group instance.
4377         (inform): Likewise.
4378         (inform_n): Likewise.
4379         (warning): Likewise.
4380         (warning_at): Likewise.
4381         (warning_n): Likewise.
4382         (pedwarn): Likewise.
4383         (permerror): Likewise.
4384         (error): Likewise.
4385         (error_n): Likewise.
4386         (error_at): Likewise.
4387         (sorry): Likewise.
4388         (fatal_error): Likewise.
4389         (internal_error): Likewise.
4390         (internal_error_no_backtrace): Likewise.
4391         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
4392         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
4393         * diagnostic.h (struct diagnostic_context): Add fields
4394         "diagnostic_group_nesting_depth",
4395         "diagnostic_group_emission_count", "begin_group_cb",
4396         "end_group_cb".
4397         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
4398         Add auto_diagnostic_group instance(s).
4399         (find_explicit_erroneous_behavior): Likewise.
4400         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
4401         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
4402         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
4403         (gimplify_va_arg_expr): Likewise.
4404         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
4405         (HSA_SORRY_AT): Likewise.
4406         * ipa-devirt.c (compare_virtual_tables): Likewise.
4407         (warn_odr): Likewise.
4408         * multiple_target.c (expand_target_clones): Likewise.
4409         * opts-common.c (cmdline_handle_error): Likewise.
4410         * reginfo.c (globalize_reg): Likewise.
4411         * substring-locations.c (format_warning_n_va): Likewise.
4412         * tree-inline.c (expand_call_inline): Likewise.
4413         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
4414         * tree-ssa-loop-niter.c
4415         (do_warn_aggressive_loop_optimizations): Likewise.
4416         * tree-ssa-uninit.c (warn_uninit): Likewise.
4417         * tree.c (warn_deprecated_use): Likewise.
4419 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
4421         PR target/87014
4422         * config/i386/i386.md (eh_return): Always update EH return
4423         address in word_mode.
4425 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
4427         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
4428         TARGET_SPLIT_COMPLEX_ARG is defined.
4430 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4432         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
4434 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4436         PR target/86984
4437         * expr.c (expand_assignment): Assert that bitpos is positive.
4438         (store_field): Likewise
4439         (expand_expr_real_1): Make sure that bitpos is positive.
4440         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
4441         integer overflow.
4443 2018-08-20  Nathan Sidwell  <nathan@acm.org>
4445         * Makefile.in (CPP_ID_DATA_H): Delete.
4446         (CPP_INTERNAL_H): Don't add it.
4447         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
4448         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
4450 2018-08-20  Richard Biener  <rguenther@suse.de>
4452         PR tree-optimization/78655
4453         * tree-vrp.c (extract_range_from_binary_expr_1): Make
4454         pointer + offset nonnull if either operand is nonnull work.
4456 2018-08-20  Tom de Vries  <tdevries@suse.de>
4458         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
4459         unless the referenced die describes the added property using
4460         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
4461         Otherwise, add a DW_AT_location to the referenced die.
4463 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
4465         PR target/86994
4466         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
4467         register_operand when calling ix86_set_reg_reg_cost.
4468         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
4469         Set *total to 0 for operands that satisfy x86_64_immediate_operand
4470         predicate and to 1 otherwise.
4472 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
4474         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
4475         emit a diagnostic that it is not supported and reset the option.
4476         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
4477         supported and consume the option.  (ASM_FINAL_SPEC): New.
4479 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
4481         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
4482         a sentence.
4484 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
4486         C-SKY port: Documentation
4488         * doc/extend.texi (C-SKY Function Attributes): New section.
4489         * doc/invoke.texi (Option Summary): Add C-SKY options.
4490         (C-SKY Options): New section.
4491         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
4493 2018-08-17  Jojo  <jijie_rong@c-sky.com>
4494             Huibin Wang  <huibin_wang@c-sky.com>
4495             Sandra Loosemore  <sandra@codesourcery.com>
4496             Chung-Lin Tang  <cltang@codesourcery.com>
4498         C-SKY port: Backend implementation
4500         * config/csky/*: New.
4501         * common/config/csky/*: New.
4503 2018-08-17  Jojo  <jijie_rong@c-sky.com>
4504             Huibin Wang  <huibin_wang@c-sky.com>
4505             Sandra Loosemore  <sandra@codesourcery.com>
4506             Chung-Lin Tang  <cltang@codesourcery.com>
4507             Andrew Jenner  <andrew@codesourcery.com>
4509         C-SKY port: Configury
4511         * config.gcc (csky-*-*): New.
4512         * configure.ac: Add csky to targets for dwarf2 debug_line support.
4513         * configure: Regenerated.
4515 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
4517         * dump-context.h: Include "dumpfile.h".
4518         (dump_context::dump_printf_va): Convert final param from va_list
4519         to va_list *.  Convert from ATTRIBUTE_PRINTF to
4520         ATTRIBUTE_GCC_DUMP_PRINTF.
4521         (dump_context::dump_printf_loc_va): Likewise.
4522         * dumpfile.c: Include "stringpool.h".
4523         (make_item_for_dump_printf_va): Delete.
4524         (make_item_for_dump_printf): Delete.
4525         (class dump_pretty_printer): New class.
4526         (dump_pretty_printer::dump_pretty_printer): New ctor.
4527         (dump_pretty_printer::emit_items): New member function.
4528         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
4529         function.
4530         (dump_pretty_printer::emit_item): New member function.
4531         (dump_pretty_printer::stash_item): New member function.
4532         (dump_pretty_printer::format_decoder_cb): New member function.
4533         (dump_pretty_printer::decode_format): New member function.
4534         (dump_context::dump_printf_va): Reimplement in terms of
4535         dump_pretty_printer.
4536         (dump_context::dump_printf_loc_va): Convert final param from va_list
4537         to va_list *.
4538         (dump_context::begin_scope): Reimplement call to
4539         make_item_for_dump_printf.
4540         (dump_printf): Update for change to dump_printf_va.
4541         (dump_printf_loc): Likewise.
4542         (selftest::test_capture_of_dump_calls): Convert "stmt" from
4543         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
4544         with %T, %E, and %G.
4545         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
4546         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
4547         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
4548         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
4549         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
4550         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
4551         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
4552         within a dump_printf_loc call to "%wu".
4553         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
4554         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
4555         missing space after "=".
4556         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
4557         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
4558         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
4559         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
4560         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
4561         duplicate "vectorized" from message.
4563 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4565         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
4566         polyNxK_t element's TYPE_STRING_FLAG.
4568 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
4570         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
4571         (they were unnamed before).  Fix comments.
4573 2018-08-17  Nathan Sidwell  <nathan@acm.org>
4575         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
4577 2018-08-17  Richard Biener  <rguenther@suse.de>
4579         PR tree-optimization/86841
4580         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
4582 2018-08-17  Martin Liska  <mliska@suse.cz>
4584         * common.opt: Remove Warn, Init and Report for options with
4585         Ignore/Deprecated flag. Warning is done automatically for
4586         Deprecated flags.
4587         * config/i386/i386.opt: Likewise.
4588         * config/ia64/ia64.opt: Likewise.
4589         * config/rs6000/rs6000.opt: Likewise.
4590         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
4591         Remove usage of flag_check_pointer_bounds.
4592         * lto-wrapper.c (merge_and_complain): Do not handle
4593         OPT_fcheck_pointer_bounds.
4594         (append_compiler_options): Likewise.
4595         * opt-functions.awk: Do not handle Deprecated.
4596         * optc-gen.awk: Check that Var, Report and Init are not
4597         used for an option with Ignore/Deprecated flag.
4598         * opts-common.c (decode_cmdline_option): Do not report
4599         CL_ERR_DEPRECATED.
4600         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
4601         options.
4602         * opts.h (struct cl_option): Remove cl_deprecated flag.
4603         (CL_ERR_DEPRECATED): Remove error enum value.
4605 2018-08-17  Richard Biener  <rguenther@suse.de>
4607         PR middle-end/86505
4608         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
4609         across a va-arg-pack using call adjust its return value accordingly.
4611 2018-08-16  Martin Sebor  <msebor@redhat.com>
4613         PR tree-optimization/86853
4614         * gimple-ssa-sprintf.c (struct format_result): Rename member.
4615         (struct fmtresult): Add member and initialize it in ctors.
4616         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
4617         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
4618         (format_directive): Set POSUNDER4K when MAYFAIL is set.
4619         (parse_directive): Handle %C same as %c.
4620         (sprintf_dom_walker::compute_format_length): Adjust.
4621         (is_call_safe): Adjust.
4623 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4625         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
4626         for determining how to count the elements.
4627         * builtins.h (c_strlen): Adjust prototype.
4628         * expr.c (string_constant): Add new parameter mem_size.
4629         Set *mem_size appropriately.
4630         * expr.h (string_constant): Adjust protoype.
4631         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
4632         * gimple-fold.h (get_range_strlen): Adjust prototype.
4633         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
4634         (format_string): Call get_string_length with eltsize.
4636 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
4638         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
4639         to emit the span, rather than setting it as the prefix.
4641 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
4643         * diagnostic-show-locus.c (layout::start_annotation_line): Add
4644         "margin_char" parameter, defaulting to space.  Use it in place
4645         of pp_space for the initial part of the margin.
4646         (layout::print_leading_fixits): Use '+' when filling the margin
4647         of line-insertion fix-it hints.
4649 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4651         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
4652         Delete.
4654 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4656         * config/rs6000/altivec.md: Don't set length attribute to the default
4657         value.
4658         * config/rs6000/darwin.md: Ditto.
4659         * config/rs6000/dfp.md: Ditto.
4660         * config/rs6000/htm.md: Ditto.
4661         * config/rs6000/rs6000.md: Ditto.
4662         * config/rs6000/sync.md: Ditto.
4663         * config/rs6000/vsx.md: Ditto.
4665 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4667         * config/rs6000/altivec.md: Don't set length attribute to the default
4668         value, for branch instructions.
4669         * config/rs6000/darwin.md: Ditto.
4670         * config/rs6000/rs6000.md: Ditto.
4672 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4674         * config/rs6000/rs6000.md (length): Always define as const_int 4.
4675         (unnamed conditional branch define_insn): Set length to 4 or 8
4676         depending on offset.
4677         (<bd>_<mode>): Similar, for alternative 0.
4678         (<bd>tf_<mode>): Ditto.
4680 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
4682         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
4684 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
4686         * doc/rtl.texi: Replace old RTX class names with new names.
4689 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
4691         * expmed.h (canonicalize_comparison): New declaration.
4692         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
4693         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
4694         * optabs.c (prepare_cmp_insn): Likewise.
4695         * rtl.h (unsigned_condition_p): New function which checks if a
4696         comparison operator is unsigned.
4698 2018-08-16  Nathan Sidwell  <nathan@acm.org>
4700         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
4701         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
4703 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
4705         PR target/84711
4706         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
4707         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
4708         (mov<mov>): ..this and enable unconditionally.
4710 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
4712         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
4714 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
4716         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
4717         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
4718         "Common" with "Target".
4720 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
4722         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
4723         * doc/invoke.texi (mmitigate-rop): Remove.
4724         * config/i386/i386.c: Do not include "regrename.h".
4725         (ix86_rop_should_change_byte_p, reg_encoded_number)
4726         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
4727         Remove.
4728         (ix86_reorg): Remove call to ix86_mitigate_rop.
4729         * config/i386/i386.md (attr "modrm_class"): Remove.
4730         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
4731         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
4732         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
4734 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
4736         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
4737         allow folding of mergeh() and mergel() for the float and double types.
4738         (fold_mergehl_helper): Rework to handle building a permute tree
4739         for float vectors.
4741 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
4743         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
4744         for TARGET_SSE.
4746 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
4748         * common.opt (fdiagnostics-show-labels): New option.
4749         * diagnostic-show-locus.c (class layout_range): Add field
4750         "m_label".
4751         (class layout): Add field "m_show_labels_p".
4752         (layout_range::layout_range): Add param "label" and use it to
4753         initialize m_label.
4754         (make_range): Pass in NULL for new "label" param of layout_range's
4755         ctor.
4756         (layout::layout): Initialize m_show_labels_p.
4757         (layout::maybe_add_location_range): Pass in loc_range->m_label
4758         when constructing layout_range instances.
4759         (struct line_label): New struct.
4760         (layout::print_any_labels): New member function.
4761         (layout::print_line): Call it if label-printing is enabled.
4762         (selftest::test_one_liner_labels): New test.
4763         (selftest::test_diagnostic_show_locus_one_liner): Call it.
4764         * diagnostic.c (diagnostic_initialize): Initialize
4765         context->show_labels_p.
4766         * diagnostic.h (struct diagnostic_context): Add field
4767         "show_labels_p".
4768         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
4769         -fno-diagnostics-show-labels.
4770         * dwarf2out.c (gen_producer_string): Add
4771         OPT_fdiagnostics_show_labels to the ignored options.
4772         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
4773         param.
4774         (gcc_rich_location::maybe_add_expr): Likewise.
4775         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
4776         label" param, defaulting to NULL.
4777         (gcc_rich_location::add_expr): Add "label" param.
4778         (gcc_rich_location::maybe_add_expr): Likewise.
4779         (class text_range_label): New class.
4780         (class range_label_for_type_mismatch): New class.
4781         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
4782         of format_warning_va.
4783         (fmtwarn_n): Likewise for new params of format_warning_n_va.
4784         * lto-wrapper.c (merge_and_complain): Add
4785         OPT_fdiagnostics_show_labels to the "pick one setting" options.
4786         (append_compiler_options): Likewise to the dropped options.
4787         (append_diag_options): Likewise to the passed-on options.
4788         * opts.c (common_handle_option): Handle the new option.
4789         * selftest-diagnostic.c
4790         (test_diagnostic_context::test_diagnostic_context): Enable
4791         show_labels_p.
4792         * substring-locations.c: Include "gcc-rich-location.h".
4793         (format_warning_n_va): Add "fmt_label" and "param_label" params
4794         and use them as appropriate.
4795         (format_warning_va): Add "fmt_label" and "param_label" params,
4796         passing them on to format_warning_n_va.
4797         (format_warning_at_substring): Likewise.
4798         (format_warning_at_substring_n): Likewise.
4799         * substring-locations.h (format_warning_va): Add "fmt_label" and
4800         "param_label" params.
4801         (format_warning_n_va): Likewise.
4802         (format_warning_at_substring): Likewise.
4803         (format_warning_at_substring_n): Likewise.
4804         * toplev.c (general_init): Initialize global_dc->show_labels_p.
4806 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
4808         PR testsuite/86519
4809         * builtins.c (expand_builtin_memcmp): Do not expand the call
4810         when overflow is detected.
4812 2018-08-15  Martin Sebor  <msebor@redhat.com>
4814         PR tree-optimization/71625
4815         * config/aarch64/aarch64-builtins.c
4816         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
4818 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
4820         * config/s390/s390.c (s390_reorg): Remove loop.
4822 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
4824         * config/darwin.c
4825          (darwin_function_switched_text_sections): Delete.
4826         * gcc/config/darwin.h
4827          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
4829 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
4831         PR target/81685
4832         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
4833         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
4834         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
4836 2018-08-15  Martin Liska  <mliska@suse.cz>
4838         PR tree-optimization/86925
4839         * predict.c (expr_expected_value_1): When taking
4840         later predictor, assign also probability.
4841         Use fold_build2_initializer_loc in order to fold
4842         the expression in -frounding-math.
4844 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
4846         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
4847         patterns.
4848         (expand_vec_perm_1): Try the new method.
4850 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
4852         PR target/86547
4853         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
4854         Check whether lra_live_max_point is 0 before dividing.
4856 2018-08-14  Martin Sebor  <msebor@redhat.com>
4858         PR tree-optimization/86650
4859         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
4860         (vrp_prop::check_mem_ref): Same.
4862 2018-08-13  Liu Hao <lh_mouse@126.com>
4864         * pretty-print.c (eat_esc_sequence): Swap the foreground and
4865         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
4866         and clear it thereafter, as it only works for DBCS.
4868 2018-08-13  Liu Hao <lh_mouse@126.com>
4870         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
4871         handle returned by _get_osf_handle().
4873 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
4875         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
4876         for folding vec_perm.
4878 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
4880         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
4881         Add support for gimple-folding of vec_pack() and vec_unpack()
4882         intrinsics.
4884 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
4886         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
4887         vec_xst variants to the list.
4888         (rs6000_gimple_fold_builtin): Add support for folding unaligned
4889         vector loads and stores.
4891 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
4893         * config.gcc (rs6000-ibm-aix4.x): Delete.
4894         (rs6000-ibm-aix5.1): Delete.
4895         (rs6000-ibm-aix5.2): Delete.
4896         (rs6000-ibm-aix5.3): Delete.
4897         * config/rs6000/aix43.h: Delete.
4898         * config/rs6000/aix51.h: Delete.
4899         * config/rs6000/aix52.h: Delete.
4900         * config/rs6000/t-aix43: Delete.
4902 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
4904         * config/s390/s390.c (s390_decompose_constant_pool_ref):
4905         New function.
4906         (s390_decompose_address): Factor out constant pool ref
4907         decomposition.
4909 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
4911         * config/nds32/nds32-predicates.c
4912         (nds32_can_use_bclr_p): Change return type as bool.
4913         (nds32_can_use_bset_p): Ditto.
4914         (nds32_can_use_btgl_p): Ditto.
4915         (nds32_can_use_bitci_p): Ditto.
4916         * config/nds32/nds32-protos.h
4917         (nds32_can_use_bclr_p): Change declaration.
4918         (nds32_can_use_bset_p): Ditto.
4919         (nds32_can_use_btgl_p): Ditto.
4920         (nds32_can_use_bitci_p): Ditto.
4922 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
4924         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
4925         Support -msched-prolog-epilog option.
4926         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
4928 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
4930         * common/config/nds32/nds32-common.c
4931         (nds32_option_optimization_table): Enalbe -malways-align.
4933 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
4935         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
4936         extra_headers.
4937         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
4938         OPT_misr_secure_ case.
4939         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
4940         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
4941         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
4942         secure attribute.
4943         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
4944         (nds32_isr_info): New field security_level.
4945         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
4946         * config/nds32/nds32.md (return_internal): Consider critical attribute.
4947         * config/nds32/nds32.opt (misr-secure): New option.
4948         * config/nds32/nds32_init.inc: New file.
4949         * config/nds32/nds32_isr.h: New file.
4951 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
4953         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
4954         Update comment for atomic instructions.
4955         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
4956         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
4957         Remove.
4958         (atomic_loaddi): Revise fence expansion to only emit fence prior to
4959         load for __ATOMIC_SEQ_CST model.
4960         (atomic_loaddi_1): Remove float register target.
4961         (atomic_storedi): Handle CONST_INT values.
4962         (atomic_storedi_1): Remove float register source.  Add special case
4963         for zero value.
4964         (memory_barrier): New expander and insn.
4966 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
4968         PR tree-optimization/86835
4969         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
4970         new_stmt after def_gsi, make sure to insert new_square_stmt after
4971         that stmt, not 2 stmts before it.
4973 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
4975         PR target/82418
4976         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
4977         instead of SWI48.
4979 2018-08-10  Martin Liska  <mliska@suse.cz>
4981         PR target/83610
4982         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
4983         function type.
4984         * builtins.c (expand_builtin_expect_with_probability):
4985         New function.
4986         (expand_builtin_expect_with_probability): New function.
4987         (build_builtin_expect_predicate): Add new argumnet probability
4988         for BUILT_IN_EXPECT_WITH_PROBABILITY.
4989         (fold_builtin_expect):
4990         (fold_builtin_2):
4991         (fold_builtin_3):
4992         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
4993         * builtins.h (fold_builtin_expect): Set new argument.
4994         * doc/extend.texi: Document __builtin_expect_with_probability.
4995         * doc/invoke.texi: Likewise.
4996         * gimple-fold.c (gimple_fold_call): Pass new argument.
4997         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
4998         also BUILT_IN_EXPECT_WITH_PROBABILITY.
4999         * predict.c (get_predictor_value): New function.
5000         (expr_expected_value): Add new argument probability. Assume
5001         that predictor and probability are always non-null.
5002         (expr_expected_value_1): Likewise.  For __builtin_expect and
5003         __builtin_expect_with_probability set probability.  Handle
5004         combination in binary expressions.
5005         (tree_predict_by_opcode): Simplify code by simply calling
5006         get_predictor_value.
5007         (pass_strip_predict_hints::execute): Add handling of
5008         BUILT_IN_EXPECT_WITH_PROBABILITY.
5009         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
5010         new predictor.
5011         * tree.h (DECL_BUILT_IN_P): New function.
5013 2018-08-10  Martin Liska  <mliska@suse.cz>
5015         PR tree-optimization/85799
5016         * passes.def: Add argument for pass_strip_predict_hints.
5017         * predict.c (class pass_strip_predict_hints): Add new argument
5018         early_p.
5019         (strip_predictor_early): New function.
5020         (pass_strip_predict_hints::execute): Call the function to
5021         strip predictors.
5022         (strip_predict_hints): New function.
5023         * predict.def: Fix comment.
5025 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
5027         * Makefile.in: Clarify which tm.texi to copy over to assert the
5028         right to grant a GFDL license for all.
5030 2018-08-09  Jeff Law  <law@redhat.com>
5032         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
5033         unused variable.
5035 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
5037         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
5038         prototype.
5040 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
5042         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
5043         reductions for variable-length vectors.
5045 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
5047         PR other/84889
5048         * common.opt (fdiagnostics-show-line-numbers): New option.
5049         * diagnostic-show-locus.c (class layout): Add fields
5050         "m_show_line_numbers_p" and "m_linenum_width";
5051         (num_digits): New function.
5052         (test_num_digits): New function.
5053         (layout::layout): Initialize new fields.  Update m_x_offset
5054         logic to handle any left margin.
5055         (layout::print_source_line): Print line number when requested.
5056         (layout::start_annotation_line): New member function.
5057         (layout::print_annotation_line): Call it.
5058         (layout::print_leading_fixits): Likewise.
5059         (layout::print_trailing_fixits): Likewise.  Update calls to
5060         move_to_column for new parameter.
5061         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
5062         it to potentially call start_annotation_line.
5063         (layout::show_ruler): Call start_annotation_line.
5064         (selftest::test_line_numbers_multiline_range): New selftest.
5065         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
5066         and selftest::test_line_numbers_multiline_range.
5067         * diagnostic.c (diagnostic_initialize): Initialize
5068         show_line_numbers_p.
5069         * diagnostic.h (struct diagnostic_context): Add field
5070         "show_line_numbers_p".
5071         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5072         -fno-diagnostics-show-line-numbers.
5073         * dwarf2out.c (gen_producer_string): Add
5074         OPT_fdiagnostics_show_line_numbers to the ignored options.
5075         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
5076         one setting" options.
5077         (append_compiler_options): Likewise to the dropped options.
5078         (append_diag_options): Likewise to the passed-on options.
5079         * opts.c (common_handle_option): Handle the new option.
5080         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
5082 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5084         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
5085         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
5086         third argument of type "const signed char" to descriptions of
5087         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
5088         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
5089         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
5090         __builtin_bcdsub_ov functions.
5092 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
5094         PR tree-optimization/86858
5095         * tree-vect-loop.c (vect_is_simple_reduction): Restore
5096         flow_bb_inside_loop_p calls.
5098 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
5100         PR tree-optimization/86871
5101         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
5102         instead of gimple_assign_lhs.
5104 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
5106         PR target/86887
5107         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
5108         register constraint to operand 0.
5109         (add<mode>3_carryinC): Likewise.
5110         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
5112 2018-08-09  Martin Liska  <mliska@suse.cz>
5114         PR c/86895
5115         * common.opt: Remove extra line.
5117 2018-08-09  Martin Liska  <mliska@suse.cz>
5119         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
5120         at the end of a line, make first letter capital and end up
5121         a sentence with a dot.
5122         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
5123         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
5124         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
5125         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
5126         (PARAM_MAX_ISL_OPERATIONS): Likewise.
5127         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
5128         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
5129         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
5130         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
5131         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
5132         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
5133         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
5134         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
5135         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
5136         (PARAM_TREE_REASSOC_WIDTH): Likewise.
5137         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
5138         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
5139         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
5141 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
5143         PR target/84332
5144         * config/s390/s390.c (s390_option_override_internal): Reduce the
5145         stack-clash-protection-probe-interval param if it would be too big
5146         for z900.
5148 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
5150         PR target/46179
5151         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
5152         * config/m68k/m68k.c (handle_move_double): Don't call
5153         m68k_final_prescan_insn.
5154         (m68k_adjust_decorated_operand): Renamed from
5155         m68k_final_prescan_insn, remove first and third operand and
5156         simplify.
5157         (print_operand): Call it.
5158         (print_operand_address): Call it.
5160 2018-08-08  Nathan Sidwell  <nathan@acm.org>
5162         * diagnostic.c (diagnostic_report_current_module): Use
5163         linemap_included_from & linemap_included_from_linemap.
5165 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
5167         * config/aarch64/aarch64-cores.def: Add phecda core.
5168         * config/aarch64/aarch64-tune.md: Regenerate.
5169         * doc/invoke.texi: Add phecda core.
5171 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
5173         PR target/85295
5174         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
5175         definitions.
5176         * config/s390/s390.md ("movti"): Add more alternatives for
5177         constant to GPR copies.
5179 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
5181         * config/s390/s390.c: Fix whitespace damage throughout the file.
5182         * config/s390/s390.h: Likewise.
5183         * config/s390/tpf.h: Likewise.
5185 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
5187         * config/s390/s390.c (s390_loadrelative_operand_p):
5188         Remove TARGET_CPU_ZARCH usages.
5189         (s390_rtx_costs): Likewise.
5190         (s390_legitimate_constant_p): Likewise.
5191         (s390_cannot_force_const_mem): Likewise.
5192         (legitimate_reload_constant_p): Likewise.
5193         (s390_preferred_reload_class): Likewise.
5194         (legitimize_pic_address): Likewise.
5195         (legitimize_tls_address): Likewise.
5196         (s390_split_branches): Removed.
5197         (s390_add_execute): Removed.
5198         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
5199         (s390_mainpool_start): Likewise.
5200         (s390_mainpool_finish): Likewise.
5201         (s390_mainpool_cancel): Removed.
5202         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
5203         (s390_chunkify_cancel): Likewise.
5204         (s390_return_addr_rtx): Likewise.
5205         (s390_register_info): Remove split_branches_pending_p uages.
5206         (s390_optimize_register_info): Likewise.
5207         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
5208         split_branches_pending_p usages.
5209         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
5210         (s390_load_got): Likewise.
5211         (s390_expand_split_stack_prologue): Likewise.
5212         (output_asm_nops): Likewise.
5213         (s390_function_profiler): Likewise.
5214         (s390_emit_call): Likewise.
5215         (s390_conditional_register_usage): Likewise.
5216         (s390_optimize_prologue): Likewise.
5217         (s390_reorg): Remove TARGET_CPU_ZARCH and
5218         split_branches_pending_p usages.
5219         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
5220         usages.
5221         (s390_output_indirect_thunk_function): Likewise.
5222         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
5223         (TARGET_CPU_ZARCH_P): Removed.
5224         (struct machine_function): Remove split_branches_pending_p.
5225         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
5227 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
5229         * common/config/s390/s390-common.c (processor_flags_table):
5230         Remove flags.
5231         * config.gcc: Remove with_arch/with_tune support.
5232         * config/s390/2064.md: Remove cpu attribute comparisons.
5233         * config/s390/driver-native.c (s390_host_detect_local_cpu):
5234         Remove MTN.
5235         * config/s390/linux.h (ASM_SPEC):
5236         Remove -march support.
5237         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
5238         Use a table to get an arch level.
5239         * config/s390/s390-opts.h (enum processor_type):
5240         Remove enum values.
5241         * config/s390/s390.c
5242         (processor_table): Remove entries, add arch_level values.
5243         (s390_issue_rate): Remove cases.
5244         (s390_option_override): Adjust
5245         s390_option_override_internal() call.
5246         (s390_option_override_internal): Remove deprecation warning.
5247         (s390_valid_target_attribute_tree): Adjust
5248         s390_option_override_internal() call.
5249         * config/s390/s390.h (struct s390_processor):
5250         Share with s390-c.c, add arch_level field.
5251         * config/s390/s390.md:
5252         Remove occurrences in cpu attribute.
5253         * config/s390/s390.opt: Remove -march/-mtune support.
5254         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
5255         * doc/invoke.texi: Remove deprecation warning.
5257 2018-08-08  Luis Machado  <luis.machado@linaro.org>
5259         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
5260         global.
5261         (qdf24xx_tunings): Set vector cost structure to
5262         qdf24xx_vector_cost.
5264         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
5265         <register_sextend>: Set to 3.
5267 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
5269         PR target/86838
5270         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
5271         * config/aarch64/aarch64-simd.md
5272         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
5273         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
5274         (aarch64_frecpx<mode>): ...this new pattern.
5275         * config/aarch64/aarch64-simd-builtins.def: Remove comment
5276         about aarch64_frecp<FRECP:frecp_suffix><mode>.
5278 2018-08-07  Martin Liska  <mliska@suse.cz>
5280         PR middle-end/83023
5281         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
5282         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
5283         * predict.def (PRED_MALLOC_NONNULL): New predictor.
5284         * doc/extend.texi: Document that malloc attribute adds
5285         hit to compiler.
5287 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
5289         PR target/86785
5290         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5291         Define to speculation_safe_value_not_needed.
5293 2018-08-06  Jeff Law  <law@redhat.com>
5295         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
5296         the vr_values instance to cprop_into_stmt.
5297         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
5298         (cprop_operand): Also query EVRP to determine if OP is a constant.
5300 2018-08-06  Nathan Sidwell  <nathan@acm.org>
5302         * diagnostic.c (diagnostic_report_current_module): Reroll
5303         included-at loop.  Translate text.
5305 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
5307         * function-tests.c (selftest::test_expansion_to_rtl): Call
5308         free_after_compilation.
5310 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5312         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
5314 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
5316         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
5317         loops with memory block operations from getting unrolled.
5319 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
5321         PR target/86807
5322         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5323         Define to speculation_safe_value_not_needed.
5325 2018-08-06  Jeff Law  <law@redhat.com>
5327         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
5328         assert.
5330 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5332         PR target/86662
5333         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
5334         with all enabled __intN types.
5336         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
5338 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5340         * alias.c (record_set): Check for clobber high.
5341         * cfgexpand.c (expand_gimple_stmt): Likewise.
5342         * combine-stack-adj.c (single_set_for_csa): Likewise.
5343         * combine.c (find_single_use_1): Likewise.
5344         (set_nonzero_bits_and_sign_copies): Likewise.
5345         (get_combine_src_dest): Likewise.
5346         (is_parallel_of_n_reg_sets): Likewise.
5347         (try_combine): Likewise.
5348         (record_dead_and_set_regs_1): Likewise.
5349         (reg_dead_at_p_1): Likewise.
5350         (reg_dead_at_p): Likewise.
5351         * dce.c (deletable_insn_p): Likewise.
5352         (mark_nonreg_stores_1): Likewise.
5353         (mark_nonreg_stores_2): Likewise.
5354         * df-scan.c (df_find_hard_reg_defs): Likewise.
5355         (df_uses_record): Likewise.
5356         (df_get_call_refs): Likewise.
5357         * dwarf2out.c (mem_loc_descriptor): Likewise.
5358         * haifa-sched.c (haifa_classify_rtx): Likewise.
5359         * ira-build.c (create_insn_allocnos): Likewise.
5360         * ira-costs.c (scan_one_insn): Likewise.
5361         * ira.c (equiv_init_movable_p): Likewise.
5362         (rtx_moveable_p): Likewise.
5363         (interesting_dest_for_shprep): Likewise.
5364         * jump.c (mark_jump_label_1): Likewise.
5365         * postreload-gcse.c (record_opr_changes): Likewise.
5366         * postreload.c (reload_cse_simplify): Likewise.
5367         (struct reg_use): Add source expr.
5368         (reload_combine): Check for clobber high.
5369         (reload_combine_note_use): Likewise.
5370         (reload_cse_move2add): Likewise.
5371         (move2add_note_store): Likewise.
5372         * print-rtl.c (print_pattern): Likewise.
5373         * recog.c (decode_asm_operands): Likewise.
5374         (store_data_bypass_p): Likewise.
5375         (if_test_bypass_p): Likewise.
5376         * regcprop.c (kill_clobbered_value): Likewise.
5377         (kill_set_value): Likewise.
5378         * reginfo.c (reg_scan_mark_refs): Likewise.
5379         * reload1.c (maybe_fix_stack_asms): Likewise.
5380         (eliminate_regs_1): Likewise.
5381         (elimination_effects): Likewise.
5382         (mark_not_eliminable): Likewise.
5383         (scan_paradoxical_subregs): Likewise.
5384         (forget_old_reloads_1): Likewise.
5385         * reorg.c (find_end_label): Likewise.
5386         (try_merge_delay_insns): Likewise.
5387         (redundant_insn): Likewise.
5388         (own_thread_p): Likewise.
5389         (fill_simple_delay_slots): Likewise.
5390         (fill_slots_from_thread): Likewise.
5391         (dbr_schedule): Likewise.
5392         * resource.c (update_live_status): Likewise.
5393         (mark_referenced_resources): Likewise.
5394         (mark_set_resources): Likewise.
5395         * rtl.c (copy_rtx): Likewise.
5396         * rtlanal.c (reg_referenced_p): Likewise.
5397         (single_set_2): Likewise.
5398         (noop_move_p): Likewise.
5399         (note_stores): Likewise.
5400         * sched-deps.c (sched_analyze_reg): Likewise.
5401         (sched_analyze_insn): Likewise.
5403 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5405         * cse.c (invalidate_reg): New function extracted from...
5406         (invalidate): ...here.
5407         (canonicalize_insn): Check for clobber high.
5408         (invalidate_from_clobbers): invalidate clobber highs.
5409         (invalidate_from_sets_and_clobbers): Likewise.
5410         (count_reg_usage): Check for clobber high.
5411         (insn_live_p): Likewise.
5412         * cselib.c (cselib_expand_value_rtx_1):Likewise.
5413         (cselib_invalidate_regno): Check for clobber in setter.
5414         (cselib_invalidate_rtx): Pass through setter.
5415         (cselib_invalidate_rtx_note_stores):
5416         (cselib_process_insn): Check for clobber high.
5417         * cselib.h (cselib_invalidate_rtx): Add operand.
5419 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5421         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
5422         (mark_not_eliminable): Likewise.
5423         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
5424         * lra-lives.c (process_bb_lives): Check for clobber high.
5425         * lra.c (new_insn_reg): Remember clobber highs.
5426         (collect_non_operand_hard_regs): Check for clobber high.
5427         (lra_set_insn_recog_data): Likewise.
5428         (add_regs_to_insn_regno_info): Likewise.
5429         (lra_update_insn_regno_info): Likewise.
5431 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5433         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
5434         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
5436 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5438         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
5439         (copy_insn_1): Likewise.
5440         (gen_hard_reg_clobber_high): New gen function.
5441         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
5442         * genemit.c (gen_exp): Likewise.
5443         (gen_emit_seq): Pass through info.
5444         (gen_insn): Check for CLOBBER_HIGH.
5445         (gen_expand): Pass through info.
5446         (gen_split): Likewise.
5447         (output_add_clobbers): Likewise.
5448         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
5449         (remove_clobbers): Likewise.
5450         * rtl.h (gen_hard_reg_clobber_high): New declaration.
5452 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5454         * doc/rtl.texi (clobber_high): Add.
5455         (parallel): Add in clobber high
5456         * rtl.c (rtl_check_failed_code3): Add function.
5457         * rtl.def (CLOBBER_HIGH): Add expression.
5458         * rtl.h (RTL_CHECKC3): Add macro.
5459         (rtl_check_failed_code3): Add declaration.
5460         (XC3EXP): Add macro.
5462 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
5464         PR target/86386
5465         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
5466         cfun->machine->max_used_stack_alignment if needed.
5468 2018-08-04  Martin Sebor  <msebor@redhat.com>
5470         PR tree-optimization/86571
5471         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
5472         NaN output to 4.
5474 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
5476         PR target/86799
5477         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5478         Define.
5480 2018-08-03  Jeff Law  <law@redhat.com>
5482         PR target/86795
5483         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5484         Define to speculation_safe_value_not_needed.
5486 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
5488         * doc/gcov.texi (-x): Remove duplicate "to".
5489         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
5490         (-Wif-not-aligned): Remove duplicate "is".
5491         (-flto): Remove duplicate "the".
5492         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
5493         duplicate "v5.00.b".
5494         (MSP430 Options): Remove duplicate "and" from the description
5495         of "-mgprel-sec=regexp".
5496         (x86 Options): Remove duplicate copies of "vmldLog102" and
5497         vmlsLog104 from description of "-mveclibabi=type".
5499 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
5501         * internal-fn.h (first_commutative_argument): Declare.
5502         * internal-fn.c (first_commutative_argument): New function.
5503         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
5504         restrictions for pattern statements.  Use first_commutative_argument
5505         to look for commutative operands in calls to internal functions.
5507 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
5509         * Makefile.in (wide-int-range.o): New.
5510         * tree-vrp.c: Move all the wide_int_* functions to...
5511         * wide-int-range.cc: ...here.
5512         * tree-vrp.h: Move all the wide_int_* prototypes to...
5513         * wide-int-range.h: ...here.
5515 2018-08-03  Tom de Vries  <tdevries@suse.de>
5517         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
5518         UI_NONE.
5519         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
5520         * except.c (output_function_exception_table): Do early exit if
5521         targetm_common.except_unwind_info (&global_options) == UI_NONE.
5523 2018-08-03  Martin Liska  <mliska@suse.cz>
5525         * predict.c (dump_prediction): Change to 2 digits
5526         in fraction part.
5528 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5530         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
5531         neon_dup_q to...
5532         (falkor_am_1_gtov_gtov): ... a new insn reservation.
5534 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
5536         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
5537         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
5538         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
5539         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
5540         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
5542 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
5544         * diagnostic-show-locus.c (diagnostic_show_locus): Use
5545         pp_take_prefix when saving the existing prefix.
5546         * diagnostic.c (diagnostic_append_note): Likewise.
5547         * langhooks.c (lhd_print_error_function): Likewise.
5548         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
5549         param's type.  Free the existing prefix.
5550         (pp_take_prefix): New function.
5551         (pretty_printer::pretty_printer): Drop the prefix parameter.
5552         Rename the length parameter to match the comment.
5553         (pretty_printer::~pretty_printer): Free the prefix.
5554         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
5555         parameter.
5556         (struct pretty_printer): Drop the "const" from "prefix" field's
5557         type and clarify memory management.
5558         (pp_set_prefix): Drop the "const" from the 2nd param.
5559         (pp_take_prefix): New decl.
5561 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
5563         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
5564         for word_mode_ok here instead of passing as argument.
5565         (expand_block_compare): Change select_block_compare_mode() call.
5566         (expand_strncmp_gpr_sequence): New function.
5567         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
5569 2018-08-02  Jeff Law  <law@redhat.com>
5571         PR target/86790
5572         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5573         Define to speculation_safe_value_not_needed.
5575         PR target/86784
5576         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5577         Define to speculation_safe_value_not_needed.
5579 2018-08-02  Tom de Vries  <tdevries@suse.de>
5581         PR target/86660
5582         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
5583         function.  Return UI_TARGET unconditionally.
5584         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
5585         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
5587 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
5589         * genemit.c (print_overload_test): Fix typo.
5591 2018-08-02  Richard Biener  <rguenther@suse.de>
5593         PR tree-optimization/86816
5594         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
5595         which checks for value availability before querying it.
5596         (gvn_uses_equal): Use it.
5597         (same_succ_hash): Likewise.
5598         (gimple_equal_p): Likewise.
5600 2018-08-02  Nick Clifton  <nickc@redhat.com>
5602         PR target/86813
5603         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5604         Define to speculation_safe_value_not_needed.
5606         PR target/86810
5607         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5608         Define to speculation_safe_value_not_needed.
5610         PR target/86810
5611         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5612         Define to speculation_safe_value_not_needed.
5614         PR target/86803
5615         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5616         Define to speculation_safe_value_not_needed.
5618         PR target/86797
5619         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5620         Define to speculation_safe_value_not_needed.
5622         PR target/86791
5623         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5624         Define to speculation_safe_value_not_needed.
5626         PR target/86789
5627         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5628         Define to speculation_safe_value_not_needed.
5630         PR target/86787
5631         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5632         Define to speculation_safe_value_not_needed.
5634         PR target/86782
5635         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5636         speculation_safe_value_not_needed.
5638         PR target/86781
5639         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
5640         to speculation_safe_value_not_needed.
5642 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
5644         * doc/md.texi: Expand the documentation of instruction names
5645         to mention port-local uses.  Document '@' in pattern names.
5646         * read-md.h (overloaded_instance, overloaded_name): New structs.
5647         (mapping): Declare.
5648         (md_reader::handle_overloaded_name): New member function.
5649         (md_reader::get_overloads): Likewise.
5650         (md_reader::m_first_overload): New member variable.
5651         (md_reader::m_next_overload_ptr): Likewise.
5652         (md_reader::m_overloads_htab): Likewise.
5653         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
5654         m_next_overload_ptr and m_overloads_htab.
5655         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
5656         (get_mode_token, get_code_token, get_int_token): New functions.
5657         (map_attr_string): Add an optional argument that passes back
5658         the associated iterator.
5659         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
5660         (md_reader::handle_overloaded_name, add_overload_instance): New
5661         functions.
5662         (apply_iterators): Handle '@' names.  Report an error if '@'
5663         is used without iterators.
5664         (initialize_iterators): Initialize the new iterator_group fields.
5665         * genopinit.c (handle_overloaded_code_for)
5666         (handle_overloaded_gen): New functions.
5667         (main): Use them to print declarations of maybe_code_for_* and
5668         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
5669         * genemit.c (print_overload_arguments, print_overload_test)
5670         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
5671         (main): Use it to print definitions of maybe_code_for_* and
5672         maybe_gen_* functions.
5673         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
5674         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
5675         instead of explicit mode checks.
5676         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
5677         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
5678         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
5679         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
5680         (aarch64_expand_compare_and_swap): Likewise
5681         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
5682         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
5683         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
5684         (aarch64_constant_pool_reload_icode): Delete.
5685         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
5686         instead of aarch64_constant_pool_reload_icode.  Use
5687         code_for_aarch64_reload_mov instead of explicit mode checks.
5688         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
5689         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
5690         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
5691         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
5692         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
5693         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
5694         (aarch64_atomic_load_op_code): Delete.
5695         (aarch64_emit_atomic_load_op): Likewise.
5696         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
5697         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
5698         instead of aarch64_emit_atomic_load_op.
5699         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
5700         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
5701         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
5702         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
5703         character before the pattern name.
5704         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
5705         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
5706         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
5707         (aarch64_frecps<mode>): Likewise.
5708         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
5709         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
5710         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
5711         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
5712         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
5714 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
5716         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
5717         Allow HFmode constants if TARGET_FP_F16INST.
5719 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
5721         PR target/86014
5722         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
5723         No longer check last store for clobber of address register.
5725 2018-08-02  Martin Liska  <mliska@suse.cz>
5727         PR gcov-profile/86817
5728         * gcov.c (process_all_functions): New function.
5729         (main): Call it.
5730         (process_file): Move functions processing to
5731         process_all_functions.
5733 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
5735         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
5736         "const" to the "gimple *" and "rtx_insn *" parameters.
5737         * dumpfile.h (dump_user_location_t::dump_user_location_t):
5738         Likewise.
5739         (dump_location_t::dump_location_t): Likewise.
5741 2018-08-01  Martin Sebor  <msebor@redhat.com>
5743         PR tree-optimization/86650
5744         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
5745         rather than a "gcall *".  Directly pass the data of interest
5746         to percent_K_format, rather than building a temporary CALL_EXPR
5747         to hold it.
5748         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
5749         (gimple_fold_builtin_strncat): Adjust.
5750         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
5751         gcall* argument with gimple*.
5752         * gimple-ssa-warn-restrict.c (check_call): Same.
5753         (wrestrict_dom_walker::before_dom_children): Same.
5754         (builtin_access::builtin_access): Same.
5755         (check_bounds_or_overlap): Same
5756         (maybe_diag_overlap): Same.
5757         (maybe_diag_offset_bounds): Same.
5758         * tree-diagnostic.c (default_tree_printer): Move usage of
5759         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
5760         to this callsite.
5761         * tree-pretty-print.c (percent_K_format): Add argument.
5762         * tree-pretty-print.h: Add argument.
5763         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
5764         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
5765         (maybe_diag_stxncpy_trunc): Same.
5766         (handle_builtin_stxncpy): Same.
5767         (handle_builtin_strcat): Same.
5769 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5771         * match.pd: Optimise pointer range checks.
5773 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5775         PR tree-optimization/86758
5776         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
5777         to remove pattern statements.
5779 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5781         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
5782         result of dfs_enumerate_from when constructing stmt_vec_infos,
5783         instead of additionally calling get_loop_body.
5785 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5787         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
5788         parameter.
5789         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
5790         When creating an iv, assert that the step is not known to be zero.
5791         (vect_setup_realignment): Update call accordingly.
5792         * tree-vect-stmts.c (vectorizable_store): Likewise.
5793         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
5795 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5797         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
5798         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
5799         (vectorizable_reduction): Likewise.
5800         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5801         (vect_detect_hybrid_slp_stmts): Likewise.
5802         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5804 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
5806         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
5807         (wide_int_set_zero_nonzero_bits): ...this.
5808         (zero_nonzero_bits_from_vr): Rename to...
5809         (vrp_set_zero_nonzero_bits): ...this.
5810         (extract_range_from_multiplicative_op_1): Abstract wide int
5811         code...
5812         (wide_int_range_multiplicative_op): ...here.
5813         (extract_range_from_binary_expr_1): Extract wide int binary
5814         operations into their own functions.
5815         (wide_int_range_lshift): New.
5816         (wide_int_range_can_optimize_bit_op): New.
5817         (wide_int_range_shift_undefined_p): New.
5818         (wide_int_range_bit_xor): New.
5819         (wide_int_range_bit_ior): New.
5820         (wide_int_range_bit_and): New.
5821         (wide_int_range_trunc_mod): New.
5822         (extract_range_into_wide_ints): New.
5823         (vrp_shift_undefined_p): New.
5824         (extract_range_from_multiplicative_op): New.
5825         (vrp_can_optimize_bit_op): New.
5826         * tree-vrp.h (value_range::dump): New.
5827         (wide_int_range_multiplicative_op): New.
5828         (wide_int_range_lshift):New.
5829         (wide_int_range_shift_undefined_p): New.
5830         (wide_int_range_bit_xor): New.
5831         (wide_int_range_bit_ior): New.
5832         (wide_int_range_bit_and): New.
5833         (wide_int_range_trunc_mod): New.
5834         (zero_nonzero_bits_from_bounds): Rename to...
5835         (wide_int_set_zero_nonzero_bits): ...this.
5836         (zero_nonzero_bits_from_vr): Rename to...
5837         (vrp_set_zero_nonzero_bits): ...this.
5838         (range_easy_mask_min_max): Rename to...
5839         (wide_int_range_can_optimize_bit_op): this.
5840         * vr-values.c (simplify_bit_ops_using_ranges): Rename
5841         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
5843 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5845         * tree-vectorizer.h (vect_orig_stmt): New function.
5846         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
5847         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
5848         (vect_create_epilog_for_reduction): Likewise.
5849         (vectorizable_live_operation): Likewise.
5850         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
5851         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
5852         * tree-vect-stmts.c (vectorizable_call): Likewise.
5853         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
5855 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5857         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
5858         argument.
5859         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
5860         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
5861         (vect_transform_loop): Likewise.
5862         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5864 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5866         * tree-vectorizer.h (vect_schedule_slp): Return void.
5867         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5868         (vect_schedule_slp): Likewise.
5870 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5872         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
5873         argument.
5874         (vect_transform_loop): Update calls accordingly.  Schedule SLP
5875         instances before the main loop, if any exist.
5877 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5879         PR tree-optimization/86749
5880         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
5881         If the lhs is used in a COND_EXPR, check that it is being used
5882         as the "then" or "else" value.
5884 2018-08-01  Tom de Vries  <tdevries@suse.de>
5886         PR target/86800
5887         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5888         speculation_safe_value_not_needed.
5890 2018-08-01  Richard Biener  <rguenther@suse.de>
5892         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
5893         as base and offset.
5895 2018-08-01  Martin Liska  <mliska@suse.cz>
5897         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
5898         format how successful transformation is dumped.
5899         (gimple_mod_pow2_value_transform): Likewise.
5900         (gimple_mod_subtract_transform): Likewise.
5901         (gimple_stringops_transform): Likewise.
5903 2018-08-01  Martin Liska  <mliska@suse.cz>
5905         PR value-prof/35543
5906         * value-prof.c (interesting_stringop_to_profile_p):
5907         Simplify the code and add BUILT_IN_MEMMOVE.
5908         (gimple_stringops_transform): Likewise.
5910 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
5912         * config/aarch64/aarch64-simd.md
5913         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
5914         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
5915         use GPI iterator instead of SI mode.
5917 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
5919         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
5920         rs6000_speculation_barrier.
5921         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
5922         new barrier pattern name.
5924 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
5926         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
5927         (speculation_barrier): New insn.
5929 2018-08-01  Richard Biener  <rguenther@suse.de>
5931         PR bootstrap/86724
5932         * graphite.h: Include isl/id.h and isl/space.h to allow build
5933         with ISL 0.20.
5935 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
5937         PR target/86651
5938         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
5939         mode for COFF targets.
5940         * defaults.h (TARGET_COFF): Define.
5941         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
5942         TARGET_COFF): Define.
5943         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
5944         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
5945         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
5947 2018-07-31  Alexandre Oliva <oliva@adacore.com>
5949         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
5950         * gimple-streamer-out.c (output_bb): Save it.
5951         * lto-streamer-in.c (input_struct_function_base): Restore
5952         instance discriminator if available.  Create map on demand.
5953         * lto-streamer-out.c (output_struct_function_base): Save it if
5954         available.
5955         * final.c (decl_to_instance_map): Document LTO strategy.
5957 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
5958             Olivier Hainque  <hainque@adacore.com>
5960         * debug.h (decl_to_instance_map_t): New type.
5961         (decl_to_instance_map): Declare.
5962         (maybe_create_decl_to_instance_map): New inline function.
5963         * final.c (bb_discriminator, last_bb_discriminator): New statics,
5964         to track basic block discriminators.
5965         (final_start_function_1): Initialize them.
5966         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
5967         bb_discriminator.
5968         (decl_to_instance_map): New variable.
5969         (map_decl_to_instance, maybe_set_discriminator): New functions.
5970         (notice_source_line): Set discriminator.
5972 2018-07-31  Ian Lance Taylor  <iant@golang.org>
5974         * targhooks.c (default_have_speculation_safe_value): Add
5975         ATTRIBUTE_UNUSED.
5977 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
5979         * dump-context.h: Include "pretty-print.h".
5980         (dump_context::refresh_dumps_are_enabled): New decl.
5981         (dump_context::emit_item): New decl.
5982         (class dump_context): Add fields "m_test_pp" and
5983         "m_test_pp_flags".
5984         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
5985         (temp_dump_context::get_dumped_text): New decl.
5986         (class temp_dump_context): Add field "m_pp".
5987         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
5988         (dump_context::refresh_dumps_are_enabled): ...and add a test for
5989         m_test_pp.
5990         (set_dump_file): Update for above change.
5991         (set_alt_dump_file): Likewise.
5992         (dump_loc): New overload, taking a pretty_printer *.
5993         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
5994         to any test pretty-printer.
5995         (make_item_for_dump_gimple_stmt): New function, adapted from
5996         optinfo::add_gimple_stmt.
5997         (dump_context::dump_gimple_stmt): Call it, and use the result,
5998         eliminating the direct usage of dump_file and alt_dump_file in
5999         favor of indirectly using them via emit_item.
6000         (make_item_for_dump_gimple_expr): New function, adapted from
6001         optinfo::add_gimple_expr.
6002         (dump_context::dump_gimple_expr): Call it, and use the result,
6003         eliminating the direct usage of dump_file and alt_dump_file in
6004         favor of indirectly using them via emit_item.
6005         (make_item_for_dump_generic_expr): New function, adapted from
6006         optinfo::add_tree.
6007         (dump_context::dump_generic_expr): Call it, and use the result,
6008         eliminating the direct usage of dump_file and alt_dump_file in
6009         favor of indirectly using them via emit_item.
6010         (make_item_for_dump_printf_va): New function, adapted from
6011         optinfo::add_printf_va.
6012         (make_item_for_dump_printf): New function.
6013         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
6014         and use the result, eliminating the direct usage of dump_file and
6015         alt_dump_file in favor of indirectly using them via emit_item.
6016         (make_item_for_dump_dec): New function.
6017         (dump_context::dump_dec): Call it, and use the result,
6018         eliminating the direct usage of dump_file and alt_dump_file in
6019         favor of indirectly using them via emit_item.
6020         (make_item_for_dump_symtab_node): New function, adapted from
6021         optinfo::add_symtab_node.
6022         (dump_context::dump_symtab_node): Call it, and use the result,
6023         eliminating the direct usage of dump_file and alt_dump_file in
6024         favor of indirectly using them via emit_item.
6025         (dump_context::begin_scope): Reimplement, avoiding direct usage
6026         of dump_file and alt_dump_file in favor of indirectly using them
6027         via emit_item.
6028         (dump_context::emit_item): New member function.
6029         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6030         Set up test pretty-printer on the underlying context.  Call
6031         refresh_dumps_are_enabled.
6032         (temp_dump_context::~temp_dump_context): Call
6033         refresh_dumps_are_enabled.
6034         (temp_dump_context::get_dumped_text): New member function.
6035         (selftest::verify_dumped_text): New function.
6036         (ASSERT_DUMPED_TEXT_EQ): New macro.
6037         (selftest::test_capture_of_dump_calls): Run all tests twice, with
6038         and then without optinfo enabled.  Add uses of
6039         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
6040         * dumpfile.h: Update comment for the dump_* API.
6041         * optinfo-emit-json.cc
6042         (selftest::test_building_json_from_dump_calls): Update for new
6043         param for temp_dump_context ctor.
6044         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
6045         and "m_owned" field.
6046         (optinfo_item::~optinfo_item): Likewise.
6047         (optinfo::add_item): New member function.
6048         (optinfo::emit): Update comment.
6049         (optinfo::add_string): Delete.
6050         (optinfo::add_printf): Delete.
6051         (optinfo::add_printf_va): Delete.
6052         (optinfo::add_gimple_stmt): Delete.
6053         (optinfo::add_gimple_expr): Delete.
6054         (optinfo::add_tree): Delete.
6055         (optinfo::add_symtab_node): Delete.
6056         (optinfo::add_dec): Delete.
6057         * optinfo.h (class dump_context): New forward decl.
6058         (optinfo::add_item): New decl.
6059         (optinfo::add_string): Delete.
6060         (optinfo::add_printf): Delete.
6061         (optinfo::add_printf_va): Delete.
6062         (optinfo::add_gimple_stmt): Delete.
6063         (optinfo::add_gimple_expr): Delete.
6064         (optinfo::add_tree): Delete.
6065         (optinfo::add_symtab_node): Delete.
6066         (optinfo::add_dec): Delete.
6067         (optinfo::add_poly_int): Delete.
6068         (optinfo_item::optinfo_item): Remove "owned" param.
6069         (class optinfo_item): Remove field "m_owned".
6071 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6073         PR middle-end/86705
6074         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
6075         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
6076         requested variable alignment.
6077         (expand_one_ssa_partition): Likewise.
6078         (expand_one_var): Likewise.
6080 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6082         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6083         to speculation_safe_value_not_needed.
6085 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6087         * targhooks.h (speculation_safe_value_not_needed): New prototype.
6088         * targhooks.c (speculation_safe_value_not_needed): New function.
6089         * target.def (have_speculation_safe_value): Update documentation.
6090         * doc/tm.texi: Regenerated.
6092 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6094         * config/aarch64/iterators.md (ALLI_TI): New iterator.
6095         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
6096         expand.
6097         (despeculate_copy<ALLI:mode>_insn): New insn.
6098         (despeculate_copyti_insn): New insn.
6099         (despeculate_simple<ALLI:mode>): New insn
6100         (despeculate_simpleti): New insn.
6101         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
6102         function.
6103         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
6104         aarch64_speculation_safe_value.
6105         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
6107 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6109         * config/aarch64/aarch64-speculation.cc: New file.
6110         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
6111         before pass_reorder_blocks.
6112         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
6113         prototype.
6114         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
6115         X14 and X15 when tracking speculation.
6116         * config/aarch64/aarch64.md (register name constants): Add
6117         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
6118         (unspec): Add UNSPEC_SPECULATION_TRACKER.
6119         (speculation_barrier): New insn attribute.
6120         (cmp<mode>): Allow SP in comparisons.
6121         (speculation_tracker): New insn.
6122         (speculation_barrier): Add speculation_barrier attribute.
6123         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
6124         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
6125         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
6127 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6129         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
6130         aarch64_track_speculation is true.
6131         (tb<optab><mode>1): Likewise.
6132         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
6133         generate CB[N]Z when tracking speculation.
6134         (aarch64_split_compare_and_swap): Likewise.
6135         (aarch64_split_atomic_op): Likewise.
6137 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6139         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
6141 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6143         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
6144         (speculation_barrier): New insn.
6146 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6148         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
6149         * config/arm/arm.md (speculation_barrier): New expand.
6150         (speculation_barrier_insn): New pattern.
6152 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6154         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
6155         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
6156         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
6157         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
6158         list.
6159         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
6160         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
6161         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
6162         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
6163         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
6164         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
6165         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
6166         * builtins.c (expand_speculation_safe_value): New function.
6167         (expand_builtin): Call it.
6168         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
6169         * doc/extend.texi: Document __builtin_speculation_safe_value.
6170         * doc/md.texi: Document "speculation_barrier" pattern.
6171         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
6172         TARGET_HAVE_SPECULATION_SAFE_VALUE.
6173         * doc/tm.texi: Regenerated.
6174         * target.def (have_speculation_safe_value, speculation_safe_value): New
6175         hooks.
6176         * targhooks.c (default_have_speculation_safe_value): New function.
6177         (default_speculation_safe_value): New function.
6178         * targhooks.h (default_have_speculation_safe_value): Add prototype.
6179         (default_speculation_safe_value): Add prototype.
6181 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
6183         * dump-context.h (dump_context::dump_loc): New decl.
6184         * dumpfile.c (dump_context::dump_loc): New member function.
6185         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
6186         and dump_gimple_stmt.
6187         (dump_context::dump_gimple_expr_loc): Likewise, using
6188         dump_gimple_expr.
6189         (dump_context::dump_generic_expr_loc): Likewise, using
6190         dump_generic_expr.
6191         (dump_context::dump_printf_loc_va): Likewise, using
6192         dump_printf_va.
6193         (dump_context::begin_scope): Explicitly using the global function
6194         "dump_loc", rather than the member function.
6196 2018-07-31  Martin Sebor  <msebor@redhat.com>
6198         PR tree-optimization/86741
6199         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
6201 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
6203         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
6204         depend on whether prefetch instructions will be emitted or not.
6205         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
6206         will be emitted or not.
6207         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
6208         (TARGET_SETMEM_PFD): New macros.
6210 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6212         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
6213         (NULL_STMT_VEC_INFO): Delete.
6214         (stmt_vec_info::operator*): Likewise.
6215         (stmt_vec_info::operator gimple *): Likewise.
6216         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
6217         of NULL_STMT_VEC_INFO.
6218         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6219         (vect_reassociating_reduction_p): Likewise.
6220         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6221         (vectorizable_store): Likewise.
6222         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
6223         (vec_info::free_stmt_vec_infos): Likewise.
6225 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6227         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
6228         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
6230 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6232         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
6233         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6234         (vec_info::free_stmt_vec_info): New private member functions.
6235         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
6236         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
6237         * tree-parloops.c (gather_scalar_reductions): Remove calls to
6238         set_stmt_vec_info_vec and free_stmt_vec_infos.
6239         * tree-vect-loop.c (_loop_vec_info): Remove call to
6240         set_stmt_vec_info_vec.
6241         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
6242         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
6243         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
6244         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6245         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
6246         assignments in {vec_info::,}new_stmt_vec_info that are redundant
6247         with the clearing in the xcalloc.
6248         (stmt_vec_info_vec): Delete.
6249         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
6250         (vectorize_loops): Likewise.
6251         (vec_info::~vec_info): Remove argument from call to
6252         free_stmt_vec_infos.
6253         (vec_info::add_stmt): Remove vinfo argument from call to
6254         new_stmt_vec_info.
6256 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6258         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
6259         rather than a gimple stmt.
6260         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
6261         information for pattern statements when passed the original
6262         statement; instead wait to be passed the pattern statement itself.
6263         Don't call set_vinfo_for_stmt here.
6264         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
6265         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
6266         stmt_vec_infos here.
6267         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
6268         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
6269         stmt_vec_infos entry.
6271 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6273         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
6274         * tree-vectorizer.c (vec_info::replace_stmt): New function.
6275         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
6276         * tree-vect-stmts.c (vectorizable_call): Likewise.
6277         (vectorizable_simd_clone_call): Likewise.
6279 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6281         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
6282         * tree-vectorizer.c (vec_info::remove_stmt): New function.
6283         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
6284         * tree-vect-loop.c (vect_transform_loop): Likewise.
6285         * tree-vect-slp.c (vect_schedule_slp): Likewise.
6286         * tree-vect-stmts.c (vect_remove_stores): Likewise.
6288 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6290         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
6291         (vect_dr_stmt): Delete.
6292         * tree-vectorizer.c (vec_info::lookup_dr): New function.
6293         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
6294         of DR_VECT_AUX.
6295         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
6296         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
6297         (vect_verify_datarefs_alignment, vect_peeling_supportable)
6298         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6299         (vect_analyze_data_refs): Likewise.
6300         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
6301         argument.
6302         (vect_find_same_alignment_drs): Likewise.
6303         (vect_slp_analyze_node_dependences): Update calls accordingly.
6304         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
6305         instead of DR_VECT_AUX.
6306         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
6307         of a vector data references.  Use vec_info::lookup_dr instead of
6308         DR_VECT_AUX.
6309         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
6310         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
6311         instead of DR_VECT_AUX.
6313 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6315         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
6316         dr_vec_info.
6317         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6318         accordingly.
6319         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6320         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6321         (vect_gen_prolog_loop_niters): Likewise.
6323 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6325         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
6326         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
6327         (vect_known_alignment_in_bytes, vect_dr_behavior)
6328         (vect_get_scalar_dr_size): Take references as dr_vec_infos
6329         instead of data_references.  Update calls to other routines for
6330         which the same change has been made.
6331         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
6332         dr_vec_infos instead of stmt_vec_infos.
6333         (vect_analyze_data_ref_dependence): Update call accordingly.
6334         (vect_slp_analyze_data_ref_dependence)
6335         (vect_record_base_alignments): Use DR_VECT_AUX.
6336         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
6337         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
6338         (vector_alignment_reachable_p, vect_get_data_access_cost)
6339         (vect_peeling_supportable, vect_analyze_group_access_1)
6340         (vect_analyze_group_access, vect_analyze_data_ref_access)
6341         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
6342         (vect_compile_time_alias, vect_small_gap_p)
6343         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
6344         (vect_supportable_dr_alignment): Take references as dr_vec_infos
6345         instead of data_references.  Update calls to other routines for
6346         which the same change has been made.
6347         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
6348         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6349         (vect_slp_analyze_and_verify_node_alignment)
6350         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6351         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6352         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
6353         above changes.
6354         (_vect_peel_info::dr): Replace with...
6355         (_vect_peel_info::dr_info): ...this new field.
6356         (vect_peeling_hash_get_most_frequent)
6357         (vect_peeling_hash_choose_best_peeling): Update accordingly.
6358         (vect_peeling_hash_get_lowest_cost):
6359         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
6360         routines for which the same change has been made.
6361         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
6362         data_reference.
6363         * tree-vect-loop-manip.c (get_misalign_in_elems)
6364         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
6365         above changes.
6366         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6367         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
6368         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
6369         (get_group_load_store_type, get_negative_load_store_type)
6370         (vect_get_data_ptr_increment, vectorizable_store)
6371         (vectorizable_load): Likewise.
6372         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
6373         Update calls to other routines for which the same change has been made.
6375 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6377         * tree-vectorizer.h (vec_info::move_dr): New member function.
6378         (dataref_aux): Rename to...
6379         (dr_vec_info): ...this and add "dr" and "stmt" fields.
6380         (_stmt_vec_info::dr_aux): Update accordingly.
6381         (_stmt_vec_info::data_ref_info): Delete.
6382         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
6383         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
6384         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
6385         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
6386         of data_ref.
6387         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
6388         (STMT_VINFO_DR_INFO): New macro.
6389         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
6390         (set_dr_misalignment): Update after rename of dataref_aux.
6391         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
6392         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
6393         initialization of STMT_VINFO_DATA_REF.
6394         * tree-vectorizer.c (vec_info::move_dr): New function.
6395         * tree-vect-patterns.c (vect_recog_bool_pattern)
6396         (vect_recog_mask_conversion_pattern)
6397         (vect_recog_gather_scatter_pattern): Use it.
6398         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
6399         the "dr" and "stmt" fields of dr_vec_info instead of
6400         STMT_VINFO_DATA_REF.
6402 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6404         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
6405         (is_pattern_stmt_p): Use it.
6406         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
6407         on pattern statements.
6409 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6411         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
6412         original stmt as a stmt_vec_info rather than a gimple stmt.
6413         (vect_pattern_recog_1): Take the statement directly as a
6414         stmt_vec_info, rather than via a gimple_stmt_iterator.
6415         Update call to vect_mark_pattern_stmts.
6416         (vect_pattern_recog): Update calls accordingly.
6418 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6420         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
6421         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
6422         a vect_def_type for the first argument.
6423         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
6424         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
6425         operand if it isn't defined by a vectorized statement.
6426         (vect_build_gather_load_calls): Remove the mask_dt argument and
6427         update calls to vect_get_vec_def_for_stmt_copy.
6428         (vectorizable_bswap): Likewise the dt argument.
6429         (vectorizable_call): Update calls to vectorizable_bswap and
6430         vect_get_vec_def_for_stmt_copy.
6431         (vectorizable_simd_clone_call, vectorizable_assignment)
6432         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
6433         (vectorizable_comparison): Update calls to
6434         vect_get_vec_def_for_stmt_copy.
6435         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
6436         vect_is_simple_use.
6437         (vect_get_loop_based_defs): Remove dt argument and update call
6438         to vect_get_vec_def_for_stmt_copy.
6439         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
6440         and vect_get_vec_def_for_stmt_copy.
6441         (vectorizable_load): Update calls to vect_build_gather_load_calls
6442         and vect_get_vec_def_for_stmt_copy.
6443         * tree-vect-loop.c (vect_create_epilog_for_reduction)
6444         (vectorizable_reduction, vectorizable_live_operation): Update calls
6445         to vect_get_vec_def_for_stmt_copy.
6447 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6449         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
6450         and gimple stmt arguments with a stmt_vec_info.
6451         (vect_record_base_alignments): Update calls accordingly.
6452         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
6453         and gimple stmt arguments with a stmt_vec_info.
6454         (vect_build_slp_tree_1): Remove vinfo argument and update call
6455         to vect_record_max_nunits.
6456         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
6457         and vect_record_max_nunits.
6459 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6461         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
6462         file and take a stmt_vec_info instead of a gimple stmt.
6463         (supportable_widening_operation, vect_finish_replace_stmt)
6464         (vect_finish_stmt_generation, vect_get_store_rhs)
6465         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
6466         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
6467         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
6468         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
6469         (vect_create_data_ref_ptr, bump_vector_ptr)
6470         (vect_permute_store_chain, vect_setup_realignment)
6471         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
6472         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
6473         (vectorizable_reduction, vectorizable_induction)
6474         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
6475         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
6476         than gimple stmts as arguments.
6477         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
6478         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
6479         (can_group_stmts_p, vect_check_gather_scatter)
6480         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6481         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
6482         (vect_permute_load_chain, vect_shift_permute_load_chain)
6483         (vect_transform_grouped_load)
6484         (vect_record_grouped_load_vectors): Likewise.
6485         * tree-vect-loop.c (vect_fixup_reduc_chain)
6486         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
6487         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
6488         (vectorizable_reduction, vectorizable_induction)
6489         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
6490         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
6491         (vect_get_load_store_mask): Likewise.
6492         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
6493         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
6494         * tree-vect-stmts.c (vect_mark_relevant)
6495         (is_simple_and_all_uses_invariant)
6496         (exist_non_indexing_operands_for_use_p, process_use)
6497         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
6498         (vect_get_vec_def_for_operand, vect_get_vec_defs)
6499         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
6500         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
6501         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
6502         (get_negative_load_store_type, get_load_store_type)
6503         (vect_check_load_store_mask, vect_check_store_rhs)
6504         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
6505         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6506         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6507         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6508         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
6509         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
6510         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
6511         (supportable_widening_operation): Likewise.
6513 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6515         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
6516         a stmt_vec_info instead of a gcall.
6517         (vect_check_gather_scatter): Update call accordingly.
6518         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
6519         of a gphi.
6520         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
6521         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
6522         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
6523         instead of a gimple stmt.
6524         (vect_transform_loop): Update calls accordingly.
6525         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
6526         stmt_vec_infos instead of gimple stmts.
6527         (vect_analyze_slp_instance): Update use accordingly.
6528         * tree-vect-stmts.c (read_vector_array, write_vector_array)
6529         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
6530         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
6531         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
6532         (vect_gen_widened_results_half, vect_get_loop_based_defs)
6533         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
6534         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
6535         down to subroutines.
6537 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6539         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
6540         of the worklist from a vector of gimple stmts to a vector of
6541         stmt_vec_infos.
6542         * tree-vect-stmts.c (vect_mark_relevant, process_use)
6543         (vect_mark_stmts_to_be_vectorized): Likewise
6545 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6547         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
6548         statement before passing it to vect_analyze_stmt.
6549         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
6550         the chain of phi vector definitions.  Track the exit phi via its
6551         stmt_vec_info.
6552         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
6553         STMT_VINFO_REDUC_DEF.
6554         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
6555         stmt_vec_infos to handle the statement chains.
6556         (vect_get_slp_defs): Record the first statement in the node
6557         using a stmt_vec_info.
6558         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
6559         statements here and pass their stmt_vec_info down to subroutines.
6560         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
6561         down to vect_finish_stmt_generation.
6562         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
6563         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
6564         stmt_vec_infos to subroutines.
6565         (vect_remove_stores): Use stmt_vec_infos to handle the statement
6566         chains.
6568 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6570         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
6571         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
6572         (vect_permute_store_chain, vect_setup_realignment)
6573         (vect_permute_load_chain, vect_shift_permute_load_chain)
6574         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
6575         stmts internally, and when passing values to other vectorizer routines.
6576         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6577         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
6578         (vect_analyze_loop_operations, get_initial_def_for_reduction)
6579         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
6580         (vectorizable_reduction, vectorizable_induction)
6581         (vectorizable_live_operation, vect_transform_loop_stmt)
6582         (vect_transform_loop): Likewise.
6583         * tree-vect-patterns.c (vect_reassociating_reduction_p)
6584         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
6585         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
6586         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6587         (vect_slp_analyze_node_operations_1): Likewise.
6588         * tree-vect-stmts.c (vect_mark_relevant, process_use)
6589         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
6590         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
6591         (vect_finish_stmt_generation_1, get_group_load_store_type)
6592         (get_load_store_type, vect_build_gather_load_calls)
6593         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6594         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6595         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6596         (vectorizable_store, vectorizable_load, vectorizable_condition)
6597         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
6598         (supportable_widening_operation): Likewise.
6599         (vect_get_vector_types_for_stmt): Likewise.
6600         * tree-vectorizer.h (vect_dr_behavior): Likewise.
6602 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6604         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6605         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
6606         (vect_permute_store_chain, vect_permute_load_chain)
6607         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
6608         repeated stmt_vec_info lookups.
6609         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6610         (vect_update_ivs_after_vectorizer): Likewise.
6611         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
6612         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6613         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
6614         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6615         (vect_bb_slp_scalar_cost): Likewise.
6616         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
6618 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6620         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
6621         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
6622         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
6623         to get gassigns and gcalls, rather than operating on generc gimple
6624         stmts.
6625         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
6626         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
6627         (vectorizable_load, vect_analyze_stmt): Likewise.
6628         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
6630 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6632         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
6633         return stmt_vec_infos rather than gimple stmts.  Do not accept
6634         null arguments.
6635         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
6636         of a gimple stmt.
6637         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6638         Update use of get_later_stmt.
6639         (vect_get_constant_vectors): Update call accordingly.
6640         (vect_schedule_slp_instance): Likewise
6641         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
6642         (vect_slp_analyze_instance_dependence): Likewise.
6643         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
6645 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6647         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
6648         (stmt_info_for_cost::stmt_info): ...this new field.
6649         (add_stmt_costs): Update accordingly.
6650         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6651         (vect_get_known_peeling_cost): Likewise.
6652         (vect_estimate_min_profitable_iters): Likewise.
6653         * tree-vect-stmts.c (record_stmt_cost): Likewise.
6655 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6657         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
6658         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6659         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6660         accordingly.
6661         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
6663 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6665         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
6666         a gimple stmt to a stmt_vec_info.
6667         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6669 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6671         * tree-vectorizer.h (vec_info::grouped_stores): Change from
6672         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6673         (_loop_vec_info::reduction_chains): Likewise.
6674         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
6675         accordingly.
6676         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6678 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6680         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
6681         a gimple stmt to a stmt_vec_info.
6682         (_stmt_vec_info::next_element): Likewise.
6683         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
6684         (vect_slp_analyze_and_verify_node_alignment)
6685         (vect_analyze_group_access_1, vect_analyze_group_access)
6686         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
6687         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
6688         (vect_supportable_dr_alignment): Update accordingly.
6689         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
6690         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
6691         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
6692         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6693         * tree-vect-slp.c (vect_build_slp_tree_1)
6694         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
6695         (vect_split_slp_store_group, vect_analyze_slp_instance)
6696         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
6697         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
6698         (get_group_load_store_type, get_load_store_type)
6699         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
6700         (vect_transform_stmt, vect_remove_stores): Likewise.
6702 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6704         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
6705         than a gimple stmt.
6706         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6707         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
6708         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
6709         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
6710         (vector_alignment_reachable_p, vect_get_data_access_cost)
6711         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
6712         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
6713         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6714         (vect_analyze_group_access_1, vect_analyze_group_access)
6715         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
6716         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
6717         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
6718         result of vect_dr_stmt and use the stmt_vec_info instead of
6719         the associated gimple stmt.
6720         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6721         (vect_gen_prolog_loop_niters): Likewise.
6722         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6724 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6726         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
6727         to a vec<stmt_vec_info>.
6728         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
6729         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
6730         vec<stmt_vec_info>.
6731         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
6732         to a vec<stmt_vec_info>.
6733         (bst_traits::value_type, bst_traits::value_type): Likewise.
6734         (bst_traits::hash): Update accordingly.
6735         (vect_get_and_check_slp_defs): Change the stmts parameter from
6736         a vec<gimple *> to a vec<stmt_vec_info>.
6737         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
6738         (vect_build_slp_tree): Likewise.
6739         (vect_build_slp_tree_2): Likewise.  Update uses of
6740         SLP_TREE_SCALAR_STMTS.
6741         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
6742         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
6743         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
6744         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
6745         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
6746         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
6747         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
6748         (vect_get_constant_vectors, vect_get_slp_defs)
6749         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
6750         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
6751         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
6752         instead of gimple stmts.
6753         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
6754         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
6755         (vect_slp_analyze_instance_dependence): Update uses of
6756         SLP_TREE_SCALAR_STMTS.
6757         (vect_slp_analyze_and_verify_node_alignment): Likewise.
6758         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
6759         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
6760         (get_initial_defs_for_reduction): Likewise.
6761         (vect_create_epilog_for_reduction): Likewise.
6762         (vectorize_fold_left_reduction): Likewise.
6763         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
6764         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
6765         (can_vectorize_live_stmts): Likewise.
6767 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6769         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
6770         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6771         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
6772         than gimple stmts.
6773         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
6774         of a gimple stmt.
6775         (gather_scalar_reductions): Update after above interface changes.
6776         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
6777         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
6778         than gimple stmts.
6779         (vect_force_simple_reduction): Likewise.
6780         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
6781         LOOP_VINFO_REDUCTIONS.
6782         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6784 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6786         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
6787         a gimple stmt to a stmt_vec_info.
6788         * tree-vect-loop.c (vect_active_double_reduction_p)
6789         (vect_force_simple_reduction, vectorizable_reduction): Update
6790         accordingly.
6792 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6794         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
6795         vec<gimple *> to a vec<stmt_vec_info>.
6796         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
6797         the reduction_phis argument from a vec<gimple *> to a
6798         vec<stmt_vec_info>.
6799         (vectorizable_reduction): Likewise the phis local variable that
6800         is passed to vect_create_epilog_for_reduction.  Update for new type
6801         of SLP_TREE_VEC_STMTS.
6802         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
6803         (vectorizable_live_operation): Likewise.
6804         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
6805         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
6807 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6809         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
6810         a gimple stmt to a stmt_vec_info.
6811         (vectorizable_condition, vectorizable_live_operation)
6812         (vectorizable_reduction, vectorizable_induction): Pass back the
6813         vectorized statement as a stmt_vec_info.
6814         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
6815         use of STMT_VINFO_VEC_STMT.
6816         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
6817         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
6818         as stmt_vec_infos rather than gimple stmts.
6819         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
6820         to a stmt_vec_info.
6821         (vectorizable_live_operation): Likewise.
6822         (vectorizable_reduction, vectorizable_induction): Likewise,
6823         updating use of STMT_VINFO_VEC_STMT.
6824         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
6825         of STMT_VINFO_VEC_STMT.
6826         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
6827         (vectorizable_simd_clone_call, vectorizable_conversion)
6828         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6829         (vectorizable_store, vectorizable_load, vectorizable_condition)
6830         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
6831         from a gimple stmt to a stmt_vec_info.
6832         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
6833         pointer to a stmt_vec_info to the vectorizable_* routines.
6835 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6837         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
6838         a gimple stmt to a stmt_vec_info.
6839         (is_pattern_stmt_p): Update accordingly.
6840         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
6841         (vect_record_grouped_load_vectors): Likewise.
6842         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6843         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
6844         (vect_model_reduction_cost): Likewise.
6845         (vect_create_epilog_for_reduction): Likewise.
6846         (vectorizable_reduction, vectorizable_induction): Likewise.
6847         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6848         Return the stmt_vec_info for the pattern statement.
6849         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
6850         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
6851         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
6852         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
6853         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6854         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
6855         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
6856         (free_stmt_vec_info, vect_is_simple_use): Likewise.
6858 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6860         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
6861         (vect_finish_stmt_generation): Likewise.
6862         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6863         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
6864         (vect_build_gather_load_calls): Use the return value of the above
6865         functions instead of a separate call to vinfo_for_stmt.  Use narrow
6866         scopes for the input gimple stmt and wider scopes for the associated
6867         stmt_vec_info.  Use vec_info::lookup_def when setting these
6868         stmt_vec_infos from an SSA_NAME definition.
6869         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6870         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6871         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6872         (vectorizable_store, vectorizable_load, vectorizable_condition)
6873         (vectorizable_comparison): Likewise.
6874         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
6875         (vectorizable_reduction): Likewise.
6877 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6879         * tree-vectorizer.h (vect_is_simple_use): Add an optional
6880         stmt_vec_info * parameter before the optional gimple **.
6881         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6882         (process_use, vect_get_vec_def_for_operand_1): Update callers.
6883         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
6884         * tree-vect-loop.c (vectorizable_reduction): Likewise.
6885         (vectorizable_live_operation): Likewise.
6886         * tree-vect-patterns.c (type_conversion_p): Likewise.
6887         (vect_look_through_possible_promotion): Likewise.
6888         (vect_recog_rotate_pattern): Likewise.
6889         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6891 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6893         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
6894         a typedef to a wrapper class.
6895         (NULL_STMT_VEC_INFO): New macro.
6896         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
6897         (stmt_vec_info::operator*): New function.
6898         (stmt_vec_info::operator gimple *): Likewise.
6899         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
6900         (add_stmt_costs): Likewise.
6901         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
6902         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6903         (vect_get_known_peeling_cost): Likewise.
6904         (vect_estimate_min_profitable_iters): Likewise.
6905         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6906         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
6907         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6908         (vectorizable_store, free_stmt_vec_infos): Likewise.
6909         (new_stmt_vec_info): Change return type of xcalloc to
6910         _stmt_vec_info *.
6912 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6914         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
6915         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
6916         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
6917         a single_imm_use-based sequence.
6918         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
6920 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6922         * tree-vectorizer.h (vec_info::lookup_def): Declare.
6923         * tree-vectorizer.c (vec_info::lookup_def): New function.
6924         * tree-vect-patterns.c (vect_get_internal_def): Use it.
6925         (vect_widened_op_tree): Likewise.
6926         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6927         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
6928         (vectorizable_reduction): Likewise.
6929         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
6930         of a gimple *.
6931         (vect_is_slp_reduction): Update calls accordingly.  Use
6932         vec_info::lookup_def.
6933         (vect_is_simple_reduction): Likewise
6934         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
6936 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6938         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
6939         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
6940         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
6941         of vinfo_for_stmt.
6942         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
6943         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
6944         (vect_update_vf_for_slp, vect_analyze_loop_operations)
6945         (vect_is_slp_reduction, vectorizable_induction)
6946         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
6947         * tree-vect-patterns.c (vect_init_pattern_stmt):
6948         (vect_determine_min_output_precision_1, vect_determine_precisions)
6949         (vect_pattern_recog): Likewise.
6950         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
6951         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
6952         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
6953         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
6954         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
6955         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
6956         info field from a loop to a loop_vec_info.
6958 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6960         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
6961         (vec_info::add_stmt): Declare.
6962         * tree-vectorizer.c (vec_info::add_stmt): New function.
6963         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
6964         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
6965         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6966         (vectorizable_induction): Likewise.
6967         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
6968         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6969         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
6970         (vectorizable_load): Likewise.
6971         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6972         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
6973         (vect_recog_gather_scatter_pattern): Likewise.
6974         (append_pattern_def_seq): Likewise.  Remove a check that is
6975         performed by add_stmt itself.
6977 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6979         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
6980         which make_ssa_name was called with new_stmt before new_stmt
6981         had been created.
6983 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6985         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
6986         split out from...
6987         (vect_is_slp_reduction): ...here...
6988         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
6989         that are already known to be false.
6991 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6993         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
6994         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
6995         STMT_VINFO_NUM_SLP_USES when it's true.
6996         (vect_free_slp_instance): Add a final_p parameter and pass it to
6997         vect_free_slp_tree.
6998         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
6999         (vect_analyze_slp_instance): Likewise.
7000         (vect_slp_analyze_operations): Likewise.
7001         (vect_slp_analyze_bb_1): Likewise.
7002         * tree-vectorizer.c (vec_info): Likewise.
7003         * tree-vect-loop.c (vect_transform_loop): Likewise.
7005 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7007         * tree-vect-loop.c (vectorizable_reduction): Assert that the
7008         function is not called for second and subsequent members of
7009         a reduction group.
7011 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7013         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
7014         cases for nested loops from here to ...
7015         (vect_create_epilog_for_reduction): ...here.  Only call
7016         vect_is_simple_use for inner-loop reductions.
7018 2018-07-31  Martin Liska  <mliska@suse.cz>
7020         PR gcov-profile/85338
7021         PR gcov-profile/85350
7022         PR gcov-profile/85372
7023         * profile.c (struct location_triplet): New.
7024         (struct location_triplet_hash): Likewise.
7025         (output_location): Do not output a BB that
7026         is already recorded for a line.
7027         (branch_prob): Use streamed_locations.
7029 2018-07-31  Martin Liska  <mliska@suse.cz>
7031         PR gcov-profile/85370
7032         * coverage.c (coverage_begin_function): Do not mark target
7033         clones as artificial functions.
7035 2018-07-31  Martin Liska  <mliska@suse.cz>
7037         PR gcov-profile/83813
7038         PR gcov-profile/84758
7039         PR gcov-profile/85217
7040         PR gcov-profile/85332
7041         * profile.c (branch_prob): Do not record GOTO expressions
7042         for GIMPLE statements which locations are already streamed.
7044 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7046         * gcc.c (handle_spec_function): Accept a soft_matched_part
7047         argument, as do_spec_1.  Pass it down to ...
7048         (eval_spec_function): Accept a soft_matched_part argument,
7049         and pass it down to ...
7050         (do_spec_2): Accept a soft_matched_part argument, and pass
7051         it down to do_spec_1.
7052         (do_spec_1): Pass soft_matched_part to handle_spec_function.
7053         (handle_braces): Update call to handle_spec_function.
7054         (driver::set_up_specs): Update calls to do_spec_2.
7055         (compare_debug_dump_opt_spec_function): Likewise.
7056         (compare_debug_self_opt_spec_function): Likewise.
7058 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7060         * common.opt (nolibc): New option.
7061         * doc/invoke.texi (Link Options): Document it.
7062         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
7063         * config/alpha/linux.h: Likewise.
7064         * config/arc/elf.h: Likewise.
7065         * config/arm/uclinux-elf.h: Likewise.
7066         * config/arm/unknown-elf.h: Likewise.
7067         * config/avr/avrlibc.h: Likewise.
7068         * config/bfin/bfin.h: Likewise.
7069         * config/bfin/linux.h: Likewise.
7070         * config/bfin/uclinux.h: Likewise.
7071         * config/darwin.h: Likewise.
7072         * config/darwin10.h: Likewise.
7073         * config/darwin12.h: Likewise.
7074         * config/gnu-user.h: Likewise.
7075         * config/lm32/uclinux-elf.h: Likewise.
7076         * config/pa/pa-hpux11.h: Likewise.
7077         * config/pa/pa64-hpux.h: Likewise.
7078         * config/sparc/sparc.h: Likewise.
7080 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7082         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
7083         undefined variables.
7085 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
7087         PR target/86640
7088         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
7089         instead of GEN_INT.
7091 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7093         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7094         terminated string literal.
7096 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
7098         PR rtl-optimization/85160
7099         * combine.c (is_just_move): New function.
7100         (try_combine): Allow combining two instructions into two if neither of
7101         the original instructions was a move.
7103 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
7105         PR target/86673
7106         * doc/extend.texi (Global Register Variables): Discourage use of type
7107         qualifiers.
7108         (Local Register Variables): Likewise.
7110 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
7112         PR tree-optimization/86506
7113         * hwint.h (ceil_log2): Resync with hwint.c implementation.
7115 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
7117         PR target/86547
7118         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
7119         hard_regno, make sure no insn between `from` and `to` clobbers it.
7121 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
7122             Tom de Vries  <tdevries@suse.de>
7124         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
7125         (PTX_DEFAULT_RUNTIME_DIM): ... this.
7126         (nvptx_goacc_validate_dims): Set default worker and gang dims to
7127         PTX_DEFAULT_RUNTIME_DIM.
7128         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
7130 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
7132         * config/pa/pa.c (pa_output_addr_vec): Align address table.
7133         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
7134         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
7136 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
7138         * config/rs6000/constraints.md (wG constraint): Delete, no longer
7139         used.
7140         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
7141         predicate to reflect toc fusion has been deleted.
7142         (toc_fusion_mem_raw): Delete, no longer used.
7143         (toc_fusion_mem_wrapped): Likewise.
7144         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
7145         fusion mask bit.
7146         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
7147         Delete, no longer used.
7148         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
7149         meant to be used for toc fusion.
7150         (rs6000_debug_print_mode): Delete toc fusion debugging.
7151         (rs6000_debug_reg_global): Likewise.
7152         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
7153         fusion and secondary reload support that were never used.
7154         (rs6000_option_override_internal): Delete TOC fusion, that was only
7155         partially defined, and it did not work unless you also used the
7156         -mcmodel= switch.
7157         (rs6000_legitimate_address_p): Delete TOC fusion support.
7158         (rs6000_opt_masks): Likewise.
7159         (fusion_wrap_memory_address): Delete function, no longer used.
7160         (fusion_split_address); Delete TOC fusion support.
7161         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
7162         longer used with toc fusion being deleted.
7163         (TARGET_TOC_FUSION_FP): Likewise.
7164         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
7165         UNSPEC.
7166         (toc fusion spliter): Delete TOC fusion support.
7167         (toc_fusionload_<mode>): Likewise.
7168         (toc_fusionload_di): Likewise.
7169         (fusion_gpr_load_<mode>): Delete generator function, this insn no
7170         longer needs to be named.  Rename predicate to delete TOC fusion.
7171         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7172         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7173         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7174         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7175         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
7177 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7179         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
7180         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
7181         __int128 in built-in function prototypes.
7182         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
7183         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
7185 2018-07-27  Martin Sebor  <msebor@redhat.com>
7187         PR tree-optimization/86696
7188         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
7189         types, including enums.
7190         (handle_char_store): Be prepared for the above function to fail.
7192 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
7194         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
7195         when optimization level is lower than 2 or optimize for size.
7197 2018-07-26  Martin Sebor  <msebor@redhat.com>
7199         PR tree-optimization/86043
7200         PR tree-optimization/86042
7201         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
7202         (get_string_cst_length): Rename...
7203         (get_min_string_length): ...to this.  Add argument.
7204         (handle_char_store): Extend to handle multi-character stores by
7205         MEM_REF.
7206         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
7207         * tree.h (initializer_zerop): Add argument.
7209 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
7211         PR middle-end/86660
7212         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
7213         declare target to variables if they have always,{to,from,tofrom} map
7214         kinds.
7216 2018-07-26  Martin Liska  <mliska@suse.cz>
7218         PR lto/86548
7219         * lto-wrapper.c: Add linker_output as prefix
7220         for ltrans_output_file.
7222 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
7224         PR rtl-optimization/85805
7225         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
7226         value for hard registers if that was written in the same mode.
7228 2018-07-26  Martin Liska  <mliska@suse.cz>
7230         PR gcov-profile/86536
7231         * gcov.c (format_gcov): Use printf format %.*f directly
7232         and do not handle special values.
7234 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7236         * common/config/arc/arc-common.c (arc_option_optimization_table):
7237         Update default optimizations for size.
7239 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7241         * config/arc/arc.md (movsf_insn): Add short instruction selection.
7242         * config/arc/constraints.md (CfZ): New constraint.
7243         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
7244         (subsf3_fpu): Likewise.
7245         (cmpsf_fpu): Likewise.
7246         (cmpsf_fpu_uneq): Likewise.
7248 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7250         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
7251         accesses as well.
7252         (arc_is_uncached_mem_p): uncached applies to both the variable and
7253         the pointer.
7255 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7257         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
7258         register names.
7260 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
7262         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
7263         field "m_scopes" from vec to auto_vec.
7265 2018-07-25  Martin Liska  <mliska@suse.cz>
7267         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
7268         return type.
7270 2018-07-25  Richard Biener  <rguenther@suse.de>
7272         PR debug/86654
7273         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
7274         special wrt context_die late.
7275         (gen_subprogram_die): Re-use DIEs in local scope.
7277 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
7279         PR tree-optimization/86644
7280         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
7282 2018-07-25  Martin Liska  <mliska@suse.cz>
7284         PR middle-end/86645
7285         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
7286         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
7288 2018-07-25  Martin Liska  <mliska@suse.cz>
7290         PR sanitizer/79635
7291         * params.def: Explain ASan abbreviation and provide
7292         a documentation link.
7294 2018-07-24  Martin Sebor  <msebor@redhat.com>
7296         PR tree-optimization/86622
7297         PR tree-optimization/86532
7298         * builtins.h (string_length): Declare.
7299         * builtins.c (c_strlen): Correct handling of non-constant offsets.
7300         (check_access): Be prepared for non-constant length ranges.
7301         (string_length): Make extern.
7302         * expr.c (string_constant): Only handle the minor non-constant
7303         array index.  Use string_constant to compute the length of
7304         a generic string constant.
7306 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
7308         PR tree-optimization/86618
7309         * tree-vect-stmts.c (vectorizable_call): Don't take the address
7310         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
7312 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
7314         PR tree-optimization/86636
7315         * json.cc (json::object::set): Fix comment.  Add assertions.
7316         (json::array::append): Move here from json.h.  Add comment and an
7317         assertion.
7318         (json::string::string): Likewise.
7319         * json.h (json::array::append): Move to json.cc.
7320         (json::string::string): Likewise.
7321         * optinfo-emit-json.cc
7322         (optrecord_json_writer::impl_location_to_json): Assert that we
7323         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
7324         wrapper around it.  Expand the location once, rather than three
7325         times.
7326         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
7327         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
7328         wrappers.
7329         (optrecord_json_writer::optinfo_to_json): Likewise, in four
7330         places.  Fix some overlong lines.
7332 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
7334         * config/aarch64/aarch64-simd.md
7335         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
7336         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
7337         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
7338         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
7339         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
7340         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
7341         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
7342         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
7343         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
7345 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
7347         PR middle-end/86627
7348         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
7349         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
7350         and abs_d == d, do the power of two handling if profitable.
7352 2018-07-24  Richard Biener  <rguenther@suse.de>
7354         * match.pd: Add BIT_FIELD_REF canonicalizations.
7356 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7358         PR c/86617
7359         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
7361 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7363         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
7364         terminated STRING_CST object.
7366 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7368         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
7370 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
7372         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
7373         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
7374         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
7375         the elements into a register.
7376         (rs6000_split_v4si_init_di_reg): Delete.
7377         (rs6000_split_v4si_init): Delete.
7378         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
7379         (vsx_init_v4si): Rewrite as a define_expand.
7381 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
7383         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
7384         zero_extend argument from memory): New.
7386 2018-07-22  Martin Sebor  <msebor@redhat.com>
7388         PR bootstrap/86621
7389         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
7390         diagnosing calls with unknown arguments unless -Walloca-larger-than
7391         is restricted to less than PTRDIFF_MAX bytes.
7393 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
7395         * doc/gcov.texi (Invoking Gcov): Editorial changes.
7397 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
7399         * pretty-print.c (text_info::set_location): Remove redundant
7400         "line_table" parameter from call to rich_location::set_range.
7402 2018-07-20  Martin Sebor  <msebor@redhat.com>
7404         PR middle-end/82063
7405         * builtins.c (expand_builtin_alloca): Adjust.
7406         * calls.c (alloc_max_size): Simplify.
7407         * cgraphunit.c (cgraph_node::expand): Adjust.
7408         * common.opt (larger_than_size, warn_frame_larger_than): Remove
7409         variables.
7410         (frame_larger_than_size): Same.
7411         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
7412         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
7413         Initialize.
7414         * doc/invoke.texi (GCC Command Options): Document option arguments.
7415         Explain byte-size arguments and suffixes.
7416         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
7417         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
7418         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
7419         * doc/options.texi (UInteger): Expand.
7420         (Host_Wide_Int, ByteSize): Document new properties.
7421         * final.c (final_start_function_1): Include sizes in an error message.
7422         * function.c (frame_offset_overflow): Same.
7423         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
7424         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
7425         Diagnose unbounded alloca calls only for limits of less than
7426         PTRDIFF_MAX.
7427         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
7428         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
7429         for alloca(0).
7430         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
7431         only for limits of less than PTRDIFF_MAX.
7432         * langhooks-def.h (lhd_handle_option): Change function argument
7433         to HOST_WIDE_INT.
7434         * langhooks.c (lhd_handle_option): Same.
7435         * langhooks.h (handle_option): Same.
7436         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
7437         ByteSize flags.
7438         (var_type, var_type_struct): Same.
7439         (var_set): Handle ByteSize flag.
7440         * optc-gen.awk: Add comments to output to ease debugging.  Make
7441         use of HOST_WIDE_INT where appropriate.
7442         * opts-gen-save.awk:  Use %lx to format unsigned long.
7443         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
7444         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
7445         arguments.  Parse bytes-size suffixes.
7446         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
7447         (enum_value_to_arg): Same.
7448         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
7449         (handle_option): Adjust.
7450         (generate_option): Change function argument to HOST_WIDE_INT.
7451         (cmdline_handle_error): Adjust.
7452         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
7453         (set_option): Change function argument to HOST_WIDE_INT.
7454         (option_enabled): Handle cl_host_wide_int.
7455         (get_option_state): Handle CLVC_SIZE.
7456         (control_warning_option): Same.
7457         * opts.c (common_handle_option): Change function argument to
7458         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
7459         OPT_Wvla_larger_than_.
7460         * opts.h (enum cl_var_type): Add an enumerator.
7461         * stor-layout.c (layout_decl): Print a more meaningful warning.
7462         * toplev.c (output_stack_usage): Adjust.
7464 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
7466         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
7467         call to inline_expand_builtin_string_cmp.
7468         (expand_builtin_strcmp): Likewise.
7469         (expand_builtin_strncmp): Likewise.
7470         (inline_string_cmp): Delete the last parameter, change char_type_node
7471         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
7472         two operands.
7473         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
7474         the inlining expansion on target where the type of the call has same or
7475         narrower precision than unsigned char.
7477 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
7479         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
7480         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
7481         * common.opt (fsave-optimization-record): New option.
7482         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
7483         * doc/invoke.texi (-fsave-optimization-record): New option.
7484         * dumpfile.c: Include "optinfo-emit-json.h".
7485         (struct kv_pair): Move to coretypes.h.
7486         (optgroup_options): Make non-static.
7487         (dump_context::end_scope): Call
7488         optimization_records_maybe_pop_dump_scope.
7489         * dumpfile.h (optgroup_options): New decl.
7490         * json.cc: New file.
7491         * json.h: New file.
7492         * optinfo-emit-json.cc: New file.
7493         * optinfo-emit-json.h: New file.
7494         * optinfo.cc: Include "optinfo-emit-json.h".
7495         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
7496         (optinfo_enabled_p): Check optimization_records_enabled_p.
7497         (optinfo_wants_inlining_info_p): Likewise.
7498         * optinfo.h: Update comment.
7499         * profile-count.c (profile_quality_as_string): New function.
7500         * profile-count.h (profile_quality_as_string): New decl.
7501         (profile_count::quality): New accessor.
7502         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
7503         and optinfo_emit_json_cc_tests.
7504         * selftest.h (selftest::json_cc_tests): New decl.
7505         (selftest::optinfo_emit_json_cc_tests): New decl.
7506         * toplev.c: Include "optinfo-emit-json.h".
7507         (compile_file): Call optimization_records_finish.
7508         (do_compile): Call optimization_records_start.
7509         * tree-ssa-live.c: Include optinfo.h.
7510         (remove_unused_scope_block_p): Retain inlining information if
7511         optinfo_wants_inlining_info_p returns true.
7513 2018-07-20  Richard Biener  <rguenther@suse.de>
7515         PR debug/86585
7516         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
7517         to cover -flto-partition=none.
7519 2018-07-20  Martin Liska  <mliska@suse.cz>
7521         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
7522         (get_decl_source_range): Remove unused function.
7524 2018-07-20  Richard Biener  <rguenther@suse.de>
7526         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
7527         (struct vn_phi_s): Likewise.
7528         (struct vn_reference_s): Likewise.
7529         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
7530         for searching the slot of an entry known to be in the hash itself.
7531         (vn_phi_hasher::equal): Likewise.
7532         (vn_reference_hasher::equal): Likewise.
7533         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
7534         globals.
7535         (optimistic_info, current_info): Remove, keeping only valid_info.
7536         (vn_reference_lookup_1): Remove fallback lookup.
7537         (vn_reference_lookup_2): Likewise.
7538         (vn_nary_op_lookup_1): Likewise.
7539         (vn_phi_lookup): Likewise.
7540         (vn_nary_build_or_lookup_1): Make sure to not chain the built
7541         hash element.
7542         (vn_reference_insert): Adjust, chain the inserted hash element
7543         at last_inserted_ref.
7544         (vn_reference_insert_pieces): Likewise.
7545         (visit_reference_op_call): Likewise.
7546         (vn_nary_op_insert_into): Chain the inserted hash element at
7547         last_inserted_nary.
7548         (vn_nary_op_insert_pieces): Adjust.
7549         (vn_nary_op_insert): Likewise.
7550         (vn_nary_op_insert_stmt): Likewise.
7551         (vn_phi_insert): Adjust, chain the inserted hash element at
7552         last_inserted_phi.
7553         (process_scc): Remove clearing and copying the optimistic
7554         table.  Instead remove elements inserted during an optimistic
7555         iteration from the single table we maintain.
7556         (init_scc_vn): Adjust.
7557         (free_scc_vn): Likewise.
7558         (sccvn_dom_walker::record_cond): Likewise.
7559         (sccvn_dom_walker::after_dom_children): Likewise.
7561 2018-07-19  Martin Sebor  <msebor@redhat.com>
7563         PR tree-optimization/84047
7564         PR tree-optimization/83776
7565         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
7566         (check_array_bounds): Call it.
7568 2018-07-19  Martin Sebor  <msebor@redhat.com>
7570         * align.h (align_flags): Use member initialization.
7572 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
7574         * Makefile.in (OBJS): Add optinfo.o.
7575         * coretypes.h (class symtab_node): New forward decl.
7576         (struct cgraph_node): New forward decl.
7577         (class varpool_node): New forward decl.
7578         * dump-context.h: New file.
7579         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
7580         "tree-pass.h".
7581         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
7582         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
7583         (set_alt_dump_file): Likewise.
7584         (dump_context::~dump_context): New dtor.
7585         (dump_gimple_stmt): Move implementation to...
7586         (dump_context::dump_gimple_stmt): ...this new member function.
7587         Add the stmt to any pending optinfo, creating one if need be.
7588         (dump_gimple_stmt_loc): Move implementation to...
7589         (dump_context::dump_gimple_stmt_loc): ...this new member function.
7590         Start a new optinfo and add the stmt to it.
7591         (dump_gimple_expr): Move implementation to...
7592         (dump_context::dump_gimple_expr): ...this new member function.
7593         Add the stmt to any pending optinfo, creating one if need be.
7594         (dump_gimple_expr_loc): Move implementation to...
7595         (dump_context::dump_gimple_expr_loc): ...this new member function.
7596         Start a new optinfo and add the stmt to it.
7597         (dump_generic_expr): Move implementation to...
7598         (dump_context::dump_generic_expr): ...this new member function.
7599         Add the tree to any pending optinfo, creating one if need be.
7600         (dump_generic_expr_loc): Move implementation to...
7601         (dump_context::dump_generic_expr_loc): ...this new member
7602         function.  Add the tree to any pending optinfo, creating one if
7603         need be.
7604         (dump_printf): Move implementation to...
7605         (dump_context::dump_printf_va): ...this new member function.  Add
7606         the text to any pending optinfo, creating one if need be.
7607         (dump_printf_loc): Move implementation to...
7608         (dump_context::dump_printf_loc_va): ...this new member function.
7609         Start a new optinfo and add the stmt to it.
7610         (dump_dec): Move implementation to...
7611         (dump_context::dump_dec): ...this new member function.  Add the
7612         value to any pending optinfo, creating one if need be.
7613         (dump_context::dump_symtab_node): New member function.
7614         (dump_context::get_scope_depth): New member function.
7615         (dump_context::begin_scope): New member function.
7616         (dump_context::end_scope): New member function.
7617         (dump_context::ensure_pending_optinfo): New member function.
7618         (dump_context::begin_next_optinfo): New member function.
7619         (dump_context::end_any_optinfo): New member function.
7620         (dump_context::s_current): New global.
7621         (dump_context::s_default): New global.
7622         (dump_scope_depth): Delete global.
7623         (dumpfile_ensure_any_optinfo_are_flushed): New function.
7624         (dump_symtab_node): New function.
7625         (get_dump_scope_depth): Reimplement in terms of dump_context.
7626         (dump_begin_scope): Likewise.
7627         (dump_end_scope): Likewise.
7628         (selftest::temp_dump_context::temp_dump_context): New ctor.
7629         (selftest::temp_dump_context::~temp_dump_context): New dtor.
7630         (selftest::verify_item): New function.
7631         (ASSERT_IS_TEXT): New macro.
7632         (ASSERT_IS_TREE): New macro.
7633         (ASSERT_IS_GIMPLE): New macro.
7634         (selftest::test_capture_of_dump_calls): New test.
7635         (selftest::dumpfile_c_tests): Call it.
7636         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
7637         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
7638         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
7639         descriptive comment.
7640         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
7641         (dump_node, dump_bb): Move these unrelated decls.
7642         (class dump_manager): Add leading comment.
7643         * optinfo.cc: New file.
7644         * optinfo.h: New file.
7646 2018-07-19  Michael Collison  <michael.collison@arm.com>
7647             Richard Henderson <rth@redhat.com>
7649         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
7650         (subti): Handle op1 zero.
7651         (subvti4, usub4ti4): New.
7652         (*sub<GPI>3_compare1_imm): New.
7653         (sub<GPI>3_carryinCV): New.
7654         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
7655         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
7657 2018-07-19  Michael Collison  <michael.collison@arm.com>
7658             Richard Henderson <rth@redhat.com>
7660         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
7661         (addti3): Create simpler code if low part is already known to be 0.
7662         (addvti4, uaddvti4): New.
7663         (*add<GPI>3_compareC_cconly_imm): New.
7664         (*add<GPI>3_compareC_cconly): New.
7665         (*add<GPI>3_compareC_imm): New.
7666         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
7667         handle constants within this pattern..
7668         (*add<GPI>3_compareV_cconly_imm): New.
7669         (*add<GPI>3_compareV_cconly): New.
7670         (*add<GPI>3_compareV_imm): New.
7671         (add<GPI>3_compareV): New.
7672         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
7673         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
7674         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
7675         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
7676         with 'comparison' operator.
7677         (*add<GPI>3_compareV_cconly_imm): Ditto.
7678         (*add<GPI>3_compareV_cconly): Ditto.
7679         (*add<GPI>3_compareV_imm): Ditto.
7680         (add<GPI>3_compareV): Ditto.
7681         (add<mode>3_carryinC): Ditto.
7682         (*add<mode>3_carryinC_zero): Ditto.
7683         (*add<mode>3_carryinC): Ditto.
7684         (add<mode>3_carryinV): Ditto.
7685         (*add<mode>3_carryinV_zero): Ditto.
7686         (*add<mode>3_carryinV): Ditto.
7688 2018-07-19  Michael Collison  <michael.collison@arm.com>
7689             Richard Henderson <rth@redhat.com>
7691         * config/aarch64/aarch64-modes.def (CC_V): New.
7692         * config/aarch64/aarch64-protos.h
7693         (aarch64_addti_scratch_regs): Declare
7694         (aarch64_subvti_scratch_regs): Declare.
7695         (aarch64_expand_subvti): Declare.
7696         (aarch64_gen_unlikely_cbranch): Declare
7697         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
7698         for signed overflow using CC_Vmode.
7699         (aarch64_get_condition_code_1): Handle CC_Vmode.
7700         (aarch64_gen_unlikely_cbranch): New function.
7701         (aarch64_addti_scratch_regs): New function.
7702         (aarch64_subvti_scratch_regs): New function.
7703         (aarch64_expand_subvti): New function.
7705 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7707         * config/aarch64/aarch64-option-extensions.def: New entry for profile
7708         extension.
7709         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
7710         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
7711         extension.
7713 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7715         PR target/83009
7716         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7717         address check not strict.
7719 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7721         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
7722         Umq with Umn.
7723         (store_pair_lanes<mode>): Likewise.
7724         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
7725         enum value 'ADDR_QUERY_LDP_STP_N'.
7726         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
7727         (aarch64_print_address_internal): Add declaration.
7728         (aarch64_print_ldpstp_address): Remove.
7729         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
7730         (aarch64_print_operand): Change printing of 'y'.
7731         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
7732         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
7733         'true' rather than '1'.
7734         * config/aarch64/constraints.md (Uml): Likewise.
7735         (Uml): Rename to Umn.
7736         (Umq): Remove.
7738 2018-07-19  Richard Biener  <rguenther@suse.de>
7740         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
7741         a trailing array.
7742         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
7743         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
7744         (vn_reference_hasher): Likewise.
7745         (struct vn_tables_s): Remove obstack and alloc-pool members.
7746         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
7747         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
7748         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
7749         (vn_reference_insert_pieces): Likewise.
7750         (alloc_vn_nary_op_noinit): Adjust.
7751         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
7752         (vn_phi_eq): Adjust.
7753         (shared_lookup_phiargs): Remove.
7754         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
7755         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
7756         (visit_reference_op_call): Likewise.
7757         (copy_nary, copy_phi, copy_reference): Remove.
7758         (process_scc): Rewind the obstack when iterating.  Do not
7759         copy the elements to valid_info but just move them from one
7760         hashtable to the other.
7761         (allocate_vn_table): Adjust.
7762         (free_vn_table): Likewise.
7763         (init_scc_vn): Likewise.
7764         (free_scc_vn): Likewise.
7766 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
7768         PR target/86560
7769         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
7770         indirect_return as function type attribute.
7771         (ix86_attribute_table): Change indirect_return to function
7772         type attribute.
7773         * doc/extend.texi: Update indirect_return attribute.
7775 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
7777         * wide-int.h (widest2_int): New.
7778         * gimple-fold.c (arith_overflowed_p): Use it.
7779         * tree.h (widest2_int_cst): New.
7780         * tree-vrp.c (wide_int_binop_overflow): Rename from
7781         vrp_int_const_binop.
7782         Rewrite to work on trees.
7783         (extract_range_from_multiplicative_op_1): Abstract code to...
7784         (wide_int_range_min_max): ...here.
7785         (wide_int_range_cross_product): ...and here.
7786         (extract_range_from_binary_expr_1): Abstract overflow code to...
7787         (wide_int_range_mult_wrapping): ...here.
7788         * tree-vrp.h (wide_int_range_cross_product): New.
7789         (wide_int_range_mult_wrapping): New.
7791 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
7792             Julia Koval  <julia.koval@intel.com>
7794         * config/i386/x86-tune-costs.h (skylake_memcpy,
7795         skylake_memset): Replace rep_prefix with unrolling for size 512.
7797 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
7799         PR middle-end/86544
7800         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
7801         comparision with EQ_EXPR in last stmt.
7803 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7805         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
7806         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
7807         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
7808         previously known as "PowerPC AltiVec Built-in Functions".  Move
7809         some material to new subsubsections "PowerPC AltiVec Built-in
7810         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
7811         ISA 2.07".
7812         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
7813         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
7814         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
7815         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
7817 2018-07-18  Richard Biener  <rguenther@suse.de>
7819         PR tree-optimization/86557
7820         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
7821         EXACT_DIV_EXPR.
7823 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
7825         * config/s390/s390.c (s390_function_profiler): Generate CFI.
7827 2018-07-17  Jeff Law  <law@redhat.com>
7829         * config/arm/arm.c (get_label_padding): Update for recent
7830         changes to label_to_alignment.
7832         PR tree-optimization/86010
7833         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
7835         * config/mips/mips.c (vr4130_align_insns): Update for recent
7836         changes to label_to_alignment.
7838         * config/frv/frv.c (frv_label_align): Update for recent changes
7839         to label_to_alignment.
7841         * config/nios2/nios2.c (nios2_label_align): Update for recent
7842         changes which dropped ALIGN_LABELS_LOG.
7844 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
7846         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
7847         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
7849 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
7851         * config/arc/arc.c (arc_label_align): Use align_labels instead of
7852         deprecated align_labels_log.
7854 2018-07-17  Richard Biener  <rguenther@suse.de>
7856         PR lto/86456
7857         * dwarf2out.c (init_sections_and_labels): Always generate
7858         a debug_line_str_section for early LTO debug.
7859         (dwarf2out_finish): Reset debug_line_str_hash output early.
7860         Bump counter for extra dwarf5 .debug_loc labels to not conflict
7861         with fat LTO part.
7862         (dwarf2out_early_finish): Output debug_line_str.
7864 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
7866         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
7867         index register on z196 or later.
7869 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
7871         * config/s390/s390.c (s390_default_align): Set default function
7872         alignment to 16.
7873         (s390_override_options_after_change): Call s390_default align.
7874         (s390_option_override_internal): Call s390_default_align.
7875         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
7877 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
7879         PR middle-end/86542
7880         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
7881         to _looptemp_ clauses, other than the first two.
7883 2018-07-17  Martin Liska  <mliska@suse.cz>
7885         * opts.c: Do not enable OPT_falign_* for -Os.
7887 2018-07-17  Martin Liska  <mliska@suse.cz>
7889         * align.h (MAX_CODE_ALIGN): New.
7890         (MAX_CODE_ALIGN_VALUE): New.
7891         * common/config/i386/i386-common.c (ix86_handle_option):
7892         (MAX_CODE_ALIGN): Moved to align.h.
7893         * final.c (MAX_CODE_ALIGN): Likewise.
7894         * opts.c (parse_and_check_align_values):
7895         (MAX_CODE_ALIGN): Likewise.
7896         (MAX_CODE_ALIGN_VALUE): Likewise.
7898 2018-07-17  Martin Liska  <mliska@suse.cz>
7900         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
7901         in order to fulfil coding style.
7902         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
7903         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7904         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7905         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
7906         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
7907         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
7908         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
7909         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
7910         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7912 2018-07-17  Martin Liska  <mliska@suse.cz>
7914         * align.h: New file.
7915         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
7916         directly.
7917         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
7918         align_flags of label_to_alignment.
7919         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
7920         align_flags class.
7921         * config/m68k/m68k.c: Do not use removed align_labels_value and
7922         align_loops_value.
7923         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
7924         (LOOP_ALIGN): Likewise.
7925         (LABEL_ALIGN): Likewise.
7926         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
7927         Remove not used macro.
7928         (rs6000_loop_align): Change return type to align_flags.
7929         (rs6000_loop_align_max_skip): Remove.
7930         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
7931         Change return type to align_flags.
7932         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
7933         Remove not used macro.
7934         (rs6000_loop_align):  Change return type to align_flags.
7935         (rs6000_loop_align_max_skip): Remove.
7936         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
7937         * config/rx/rx-protos.h (rx_align_for_label): Make it
7938         static function.
7939         * config/rx/rx.c (rx_align_for_label): Change return type
7940         to align_flags.
7941         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
7942         macro definitions.
7943         into align_flags class.
7944         (LABEL_ALIGN): Likewise.
7945         (LOOP_ALIGN): Likewise.
7946         * config/s390/s390.c (s390_label_align): Use align_flags
7947         class member.
7948         (s390_asm_output_function_label): Likewise.
7949         * config/sh/sh.c (sh_override_options_after_change):
7950         Use align_flags class directly without macros.
7951         (find_barrier): Likewise.
7952         (barrier_align): Likewise.
7953         (sh_loop_align): Likewise.
7954         * config/spu/spu.c (spu_option_override):
7955         Use align_flags_tuple::get_value instead of removed macros.
7956         (spu_sched_init): Likewise.
7957         * config/spu/spu.h (GTY): Likewise.
7958         * config/visium/visium.c (visium_option_override):
7959         Set "8" as default secondary alignment.
7960         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
7961         in order to guarantee secondary alignment of 8.
7962         * coretypes.h: Include align.h header file.
7963         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
7964         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
7965         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
7966         * doc/tm.texi.in: Likewise.
7967         * final.c (struct label_alignment): Remove not used structure.
7968         (LABEL_ALIGN): Change type to align_flags.
7969         (LOOP_ALIGN): Likewise.
7970         (JUMP_ALIGN): Likewise.
7971         (default_loop_align_max_skip): Remove.
7972         (default_label_align_max_skip): Likewise.
7973         (default_jump_align_max_skip): Likewise.
7974         (default_label_align_after_barrier_max_skip):
7975         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
7976         (LABEL_TO_MAX_SKIP): Remove.
7977         (label_to_alignment): Return align_flags type instead of integer.
7978         (label_to_max_skip): Remove.
7979         (align_fuzz): Use align_flags type.
7980         (compute_alignments): Use align_flags type and use align_flags::max
7981         to combine multiple alignments.
7982         (grow_label_align): Grow vec instead of C array.
7983         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
7984         (shorten_branches):  Use align_flags type and use align_flags::max
7985         to combine multiple alignments.
7986         (final_scan_insn_1): Remove usage of secondary alignment that comes
7987         from label alignment, but instead use proper secondary alignment
7988         which is computed in grow_label_align.
7989         * flags.h (struct align_flags_tuple): Move to align.h.
7990         (struct align_flags): Likewise.
7991         (state_align_loops): Rename to align_loops.
7992         (state_align_jumps): Rename to align_jumps.
7993         (state_align_labels): Rename to align_labels.
7994         (state_align_functions): Rename to align_functions.
7995         (align_loops_log): Remove.
7996         (align_jumps_log): Remove.
7997         (align_labels_log): Remove.
7998         (align_functions_log): Remove.
7999         (align_loops_max_skip): Remove.
8000         (align_jumps_max_skip): Remove.
8001         (align_labels_max_skip): Remove.
8002         (align_functions_max_skip): Remove.
8003         (align_loops_value): Remove.
8004         (align_jumps_value): Remove.
8005         (align_labels_value): Remove.
8006         (align_functions_value): Remove.
8007         * output.h (label_to_alignment): Change return type to align_flags.
8008         (label_to_max_skip): Remove.
8009         * target.def: Remove loop_align_max_skip, label_align_max_skip,
8010         jump_align_max_skip macros.
8011         * targhooks.h (default_loop_align_max_skip): Remove.
8012         (default_label_align_max_skip): Likewise.
8013         (default_jump_align_max_skip): Likewise.
8014         (default_label_align_after_barrier_max_skip): Remove.
8015         * toplev.c (read_log_maxskip): Use ::normalize function.
8016         (parse_N_M): Remove not used argument and also call ::normalize.
8017         (parse_alignment_opts): Do not pass unused arguments.
8018         * varasm.c (assemble_start_function): Use directly align_functions
8019         instead of removed macros.
8020         * system.h: Do not poison removed macros.
8022 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
8024         PR middle-end/86539
8025         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
8026         and cond temporaries don't have reference type if iterator has
8027         pointer type.  For init use &for_pre_body instead of pre_p if
8028         for_pre_body is non-empty.
8030 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8032         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
8033         double-double modes to SFmode directly directly.
8034         (trunc<mode>sf2_fprs): Delete.
8036 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8038         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
8039         for conversions between IFmode and the decimal floating point modes.
8040         (init_float128_ieee): Use the correct names for conversions between
8041         KFmode and the decimal floating point modes.
8043 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8045         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
8046         for the conversions between TDmode and IFmode.
8047         (init_float128_ieee): Use more correct names for the conversions
8048         between TDmode and KFmode.
8050 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
8052         PR tree-optimization/86526
8053         * builtins.c (expand_builtin_memcmp): Formatting fixes.
8054         (inline_expand_builtin_string_cmp): Likewise.
8055         (inline_string_cmp): Likewise.  Use c_readstr instead of
8056         builtin_memcpy_read_str.  Add unit_mode temporary.
8058 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8060         PR middle-end/86528
8061         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
8062         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
8064 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8066         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
8067         Alphabetize prototypes of built-in functions, separating out
8068         built-in functions that are listed in this section but should be
8069         described elsewhere.
8071 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
8073         PR target/86511
8074         * expmed.c (emit_store_flag): Do not emit setcc followed by a
8075         conditional move when trapping comparison was split to a
8076         non-trapping one (and vice versa).
8078 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8080         * config/s390/s390.c (s390_function_profiler): Generate nops
8081         instead of profiler call sequences.
8082         * config/s390/s390.opt: Add the new option.
8084 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8086         * config/s390/s390.c (s390_function_profiler): Generate
8087         __mcount_loc section.
8088         * config/s390/s390.opt: Add the new option.
8090 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8092         * common.opt: Add the new warning.
8093         * config/s390/s390.c (s390_function_profiler): Emit "brasl
8094         %r0,__fentry__" when -mfentry is specified.
8095         (s390_option_override_internal): Disallow -mfentry for 31-bit
8096         CPUs.
8097         * config/s390/s390.opt: Add the new option.
8099 2018-07-16  Richard Biener  <rguenther@suse.de>
8101         PR lto/86523
8102         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
8103         for function-local FUNCTION_DECL and RESULT_DECL immediately.
8105 2018-07-16  Martin Liska  <mliska@suse.cz>
8107         PR ipa/86529
8108         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
8109         to ::get_create.
8111 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
8113         * config/arc/arcHS.md: Update ARCHS scheduling rules.
8115 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
8117         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
8118         for ARCHS4x.
8119         * config/arc/arc-cpus.def (hs4x): New cpu.
8120         (hs4xd): Likewise.
8121         * config/arc/arc-tables.opt: Regenerate.
8122         * config/arc/arc.c (arc_sched_issue_rate): New function.
8123         (TARGET_SCHED_ISSUE_RATE): Define.
8124         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
8125         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
8126         fpu_cvt.
8127         (attr tune): Add ARCHS4x tune values.
8128         (attr tune_dspmpy): Define.
8129         (*tst): Correct instruction type.
8130         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
8131         * config/arc/arcHS4x.md: New file.
8132         * config/arc/fpu.md: Update instruction type attributes.
8133         * config/arc/t-multilib: Regenerate.
8135 2018-07-16  Tom de Vries  <tdevries@suse.de>
8137         PR debug/86455
8138         * var-tracking.c (vt_initialize): Fix pre_dec handling.
8140 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8142         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
8143         early clobber.
8145 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
8147         PR tree-optimization/86514
8148         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
8149         conversion to a boolean type from a type with greater precision.
8151 2018-07-16  Tom de Vries  <tdevries@suse.de>
8153         * var-tracking.c (vt_initialize): Print adjusted insn slim if
8154         dump_flags request TDF_SLIM.
8156 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
8158         * fold-const.c (int_const_binop_1): Abstract...
8159         (wide_int_binop): ...wide int code here.
8160         (poly_int_binop): ...poly int code here.
8161         Abstract the rest of int_const_binop_1 into int_const_binop.
8162         * fold-const.h (wide_int_binop): New.
8163         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
8164         Remove useless PLUS/MINUS_EXPR case.
8165         (zero_nonzero_bits_from_vr): Move wide int code...
8166         (zero_nonzero_bits_from_bounds): ...here.
8167         (extract_range_from_binary_expr_1): Move mask optimization code...
8168         (range_easy_mask_min_max): ...here.
8169         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
8170         (range_easy_mask_min_max): New.
8172 2018-07-15  Jeff Law  <law@redhat.com>
8174         PR target/85993
8175         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
8176         block.
8178 2018-07-14  Jim Wilson  <jimw@sifive.com>
8180         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
8182 2018-07-14  Paul Koning  <ni1d@arrl.net>
8184         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
8186 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
8188         * lto-streamer-out.c (copy_function_or_variable): Dump info about
8189         copying section.
8191 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
8192             Steve Munroe  <munroesj52@gmail.com>
8194         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
8195         (_mm_andnot_si128): Likewise.
8196         (_mm_or_si128): Likewise.
8197         (_mm_xor_si128): Likewise.
8199 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
8201         PR middle-end/78809
8202         * builtins.c (expand_builtin_memcmp): Inline the calls first
8203         when result_eq is false.
8204         (expand_builtin_strcmp): Inline the calls first.
8205         (expand_builtin_strncmp): Likewise.
8206         (inline_string_cmp): New routine. Expand a string compare
8207         call by using a sequence of char comparison.
8208         (inline_expand_builtin_string_cmp): New routine. Inline expansion
8209         a call to str(n)cmp/memcmp.
8210         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
8211         New option.
8212         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
8214 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
8216         * config/arm/driver-arm.c: Include arm-native.h.
8217         (host_detect_local_cpu): Use auto-generated data tables.
8218         (vendors, arm_cpu_table): Delete.  Move part information to ...
8219         * config/arm/arm-cpus.in: ... here.
8220         * config/arm/parsecpu.awk (gen_native): New function.
8221         (vendor, part): New CPU fields.
8222         (END): Add support for building the native CPU detection tables.
8223         * config/arm/t-arm (arm-native.h): Add build rule.
8224         (driver-arm.o): Add dependency on arm-native.h.
8226 2018-07-13  Richard Biener  <rguenther@suse.de>
8228         PR middle-end/85974
8229         * match.pd (addr1 - addr2): Allow either of the operand to
8230         have a conversion.
8232 2018-07-13  Tom de Vries  <tdevries@suse.de>
8234         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
8235         in remap_ssa_name.
8237 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
8239         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
8240         arrays instead of numbered variables.
8242 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
8244         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
8245         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
8247 2018-07-13  Richard Biener  <rguenther@suse.de>
8249         PR debug/86452
8250         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
8251         instead of get_context_die.
8253 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
8254             Richard Biener  <rguenther@suse.de>
8256         PR middle-end/86489
8257         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
8258         that the loop latch destination where phi is defined.
8260 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
8262         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
8263         (riscv_expand_epilogue): Add assertion to check interrupt mode.
8264         (riscv_set_current_function): Extract getting interrupt type to new
8265         function.
8266         (riscv_get_interrupt_type): New function.
8267         (riscv_merge_decl_attributes): New function, checking interrupt type is
8268         same.
8269         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
8271 2018-07-12  Paul Koning  <ni1d@arrl.net>
8273         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
8274         directive.
8276 2018-07-12  Paul Koning  <ni1d@arrl.net>
8278         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
8279         zero reference, add doloop_end instead.
8280         * doc/md.texi (decrement_and_branch_until_zero): Remove.
8281         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
8282         detail for doloop_end.
8284 2018-07-12  Martin Sebor  <msebor@redhat.com>
8286         PR c/86453
8287         * attribs.c (decl_attributes): Reject conflicting attributes before
8288         calling attribute handlers.
8290 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
8292         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
8293          parameter.
8294         (gcc::dump_manager::get_dump_file_name): likewise.
8295         (dump_begin): Likewise.
8296         * dumpfile.h (dump_begin): Update prototype.
8297         (gcc::dump_manager::get_dump_file_name,
8298         gcc::dump_manager::get_dump_file_name): Update prototype.
8300 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8302         * internal-fn.h (vectorizable_internal_fn_p): New function.
8303         * tree-vect-slp.c (compatible_calls_p): Likewise.
8304         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
8305         to internal functions.
8306         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
8308 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8310         * fold-const.h (inverse_conditions_p): Declare.
8311         * fold-const.c (inverse_conditions_p): New function.
8312         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
8313         that test the inverse condition of a conditional internal function.
8314         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
8315         * internal-fn.c (internal_fn_mask_index): Handle conditional
8316         internal functions.
8317         (vectorized_internal_fn_supported_p): New function.
8318         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
8319         (any_pred_load_store): Replace with...
8320         (need_to_predicate): ...this new variable.
8321         (redundant_ssa_names): New variable.
8322         (ifcvt_can_use_mask_load_store): Move initial checks to...
8323         (ifcvt_can_predicate): ...this new function.  Handle tree codes
8324         for which a conditional internal function exists.
8325         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
8326         instead of ifcvt_can_use_mask_load_store.  Update after variable
8327         name change.
8328         (predicate_load_or_store): New function, split out from
8329         predicate_mem_writes.
8330         (check_redundant_cond_expr): New function.
8331         (value_available_p): Likewise.
8332         (predicate_rhs_code): Likewise.
8333         (predicate_mem_writes): Rename to...
8334         (predicate_statements): ...this.  Use predicate_load_or_store
8335         and predicate_rhs_code.
8336         (combine_blocks, tree_if_conversion): Update after above name changes.
8337         (ifcvt_local_dce): Handle redundant_ssa_names.
8338         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
8339         general conditional functions.
8340         * tree-vect-stmts.c (vectorizable_call): Likewise.
8342 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8343             Alan Hayward  <alan.hayward@arm.com>
8344             David Sherwood  <david.sherwood@arm.com>
8346         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
8347         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
8348         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
8349         plus and minus and convert them into IFN_COND_FMA-based sequences.
8350         (convert_mult_to_fma): Handle conditional plus and minus.
8352 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8354         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
8355         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
8356         (cond_fnms_optab): New optabs.
8357         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
8358         internal functions.
8359         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
8360         * internal-fn.h (get_conditional_internal_fn): Declare.
8361         (get_unconditional_internal_fn): Likewise.
8362         * internal-fn.c (cond_ternary_direct): New macro.
8363         (expand_cond_ternary_optab_fn): Likewise.
8364         (direct_cond_ternary_optab_supported_p): Likewise.
8365         (FOR_EACH_COND_FN_PAIR): Likewise.
8366         (get_conditional_internal_fn): New function.
8367         (get_unconditional_internal_fn): Likewise.
8368         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
8369         (gimple_match_op::gimple_match_op): Add a new overload for 5
8370         operands.
8371         (gimple_match_op::set_op): Likewise.
8372         (gimple_resimplify5): Declare.
8373         * genmatch.c (decision_tree::gen): Generate simplifications for
8374         5 operands.
8375         * gimple-match-head.c (gimple_simplify): Define an overload for
8376         5 operands.  Handle calls with 5 arguments in the top-level overload.
8377         (convert_conditional_op): Handle conversions from unconditional
8378         internal functions to conditional ones.
8379         (gimple_resimplify5): New function.
8380         (build_call_internal): Pass a fifth operand.
8381         (maybe_push_res_to_seq): Likewise.
8382         (try_conditional_simplification): Try converting conditional
8383         internal functions to unconditional internal functions.
8384         Handle 3-operand unconditional forms.
8385         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
8386         Define ternary equivalents of the current rules for binary conditional
8387         internal functions.
8388         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
8389         ternary operations.
8390         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
8391         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
8392         (optab): Handle them.
8393         (SVE_COND_FP_TERNARY): New int iterator.
8394         (sve_fmla_op, sve_fmad_op): New int attributes.
8395         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
8396         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
8397         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
8399 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8401         * target.def (preferred_else_value): New target hook.
8402         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
8403         * doc/tm.texi: Regenerate.
8404         * targhooks.h (default_preferred_else_value): Declare.
8405         * targhooks.c (default_preferred_else_value): New function.
8406         * internal-fn.h (conditional_internal_fn_code): Declare.
8407         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
8408         (get_conditional_internal_fn): Use it.
8409         (conditional_internal_fn_code): New function.
8410         * gimple-match.h (gimple_match_cond): New struct.
8411         (gimple_match_op): Add a cond member function.
8412         (gimple_match_op::gimple_match_op): Update all forms to take a
8413         gimple_match_cond.
8414         * genmatch.c (expr::gen_transform): Use the same condition as res_op
8415         for the suboperation, but don't specify a particular else_value.
8416         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
8417         (visit_nary_op, visit_reference_op_load): Pass
8418         gimple_match_cond::UNCOND to the gimple_match_op constructor.
8419         * gimple-match-head.c: Include tree-eh.h
8420         (convert_conditional_op): New function.
8421         (maybe_resimplify_conditional_op): Likewise.
8422         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
8423         (gimple_resimplify2): Likewise.
8424         (gimple_resimplify3): Likewise.
8425         (gimple_resimplify4): Likewise.
8426         (maybe_push_res_to_seq): Return null for conditional operations.
8427         (try_conditional_simplification): New function.
8428         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
8429         constructor.
8430         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
8431         IFN_COND_* call.
8432         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
8433         function.
8434         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
8436 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
8438         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8439         DECL_FCONTEXT
8440         (hash_tree): Do not hash DECL_FCONTEXT
8441         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
8442         Do not stream DECL_FCONTEXT.
8443         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
8444         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
8446 2018-07-12  Richard Biener  <rguenther@suse.de>
8448         PR debug/86462
8449         * dwarf2out.c (gen_block_die): Only output blocks when they have
8450         at least one !DECL_IGNORED_P variable.
8452 2018-07-12  Richard Biener  <rguenther@suse.de>
8454         PR target/84829
8455         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
8456         Remove -mieee-fp handling.
8458 2018-07-12  Richard Biener  <rguenther@suse.de>
8460         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
8461         left-over from last patch.
8463 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
8465         PR tree-optimization/86492
8466         * gimple-ssa-store-merging.c
8467         (imm_store_chain_info::coalesce_immediate_stores): Call
8468         check_no_overlap even for the merge_overlapping case.  Formatting fix.
8470 2018-07-12  Richard Biener  <rguenther@suse.de>
8472         PR middle-end/86479
8473         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
8474         move possibly trapping operations into the conditional.
8476 2018-07-12  Richard Biener  <rguenther@suse.de>
8478         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
8479         (vn_lookup_simplify_result): Remove recursion limit applied
8480         here.
8481         (vn_nary_build_or_lookup_1): Adjust.
8482         (try_to_simplify): Likewise.
8483         * gimple-match-head.c (gimple_resimplify1): Instead apply one
8484         here.
8485         (gimple_resimplify2): Likewise.
8486         (gimple_resimplify3): Likewise.
8487         (gimple_resimplify4): Likewise.
8489 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
8491         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
8492         Use __mmask64 type instead of __mmask8 for __M argument.
8493         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
8494         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
8495         __U argument.
8496         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
8497         __mmask16 for __M argument.
8498         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
8499         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
8500         to __mmask16 instead of __mmask8.
8501         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
8502         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
8503         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
8504         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
8505         instead of __mmask16 for __U argument.
8506         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
8507         __mmask16 instead of __mmask8 for __U argument.
8508         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
8509         __U argument.
8510         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
8511         __mmask16.
8512         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
8513         argument.
8514         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
8515         __U argument.
8516         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
8517         __mmask16.
8518         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
8519         of __mmask16.
8520         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
8521         __U argument.
8522         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
8523         __U argument.
8524         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
8525         __U argument.
8526         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
8527         __U argument.
8528         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
8529         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
8530         return type as well as __M argument type and all casts from __mmask8
8531         to __mmask32.
8532         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
8533         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
8534         return type as well as __M argument type and all casts from __mmask8
8535         to __mmask16.
8536         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
8537         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
8538         return type as well as __M argument type and all casts from __mmask8
8539         to __mmask32.
8540         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
8541         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
8542         return type as well as __M argument type and all casts from __mmask8
8543         to __mmask16.
8544         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
8545         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
8546         __mmask16.
8548 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
8550         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
8551         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
8552         for __U argument.
8554 2018-07-11  Paul Koning  <ni1d@arrl.net>
8556         * doc/md.texi (define_subst): Document how multiple occurrences of
8557         the same argument in the replacement pattern are handled.
8559 2018-07-11  Paul Koning  <ni1d@arrl.net>
8561         * doc/extend.texi (Common Variable Attributes): Move "mode" into
8562         alphabetical order.
8563         (Common Type Attributes): Add "mode" attribute.
8565 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
8567         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
8568         stream DECL_ORIGINAL_TYPE.
8569         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
8570         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
8571         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
8572         Do not walk original type.
8573         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
8574         external decls.
8575         (write_ts_decl_non_common_tree_pointers): Do not stream
8576         DECL_ORIGINAL_TYPE
8577         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
8578         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
8580 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
8582         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
8583         thread twice from the same starting edge.
8585 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
8587         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
8588         * gimple.c (gimple_call_nonnull_result_p): ...here...
8589         (gimple_call_nonnull_arg): ...and here.
8590         * gimple.h (gimple_call_nonnull_result_p): New.
8591         (gimple_call_nonnull_arg): New.
8593 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
8595         * config/arm/arm-cpus.in: Move information from fpu field of each
8596         cpu definition to the isa field.
8597         * config/arm/parsecpu.awk (fpu): Delete match rule.
8598         (gen_comm_data): Don't add bits from the CPU's FPU entry.
8600 2018-07-11  Richard Biener  <rguenther@suse.de>
8602         PR debug/86457
8603         * dwarf2out.c (init_sections_and_labels): Use
8604         output_asm_line_debug_info consistently.
8605         (dwarf2out_early_finish): Likewise.
8606         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
8607         type units.
8609 2018-07-11  Richard Biener  <rguenther@suse.de>
8611         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
8612         Rework father_bb setting in a way to avoid propagating constants
8613         multiple times on a loop body.
8615 2018-07-10  Mark Wielaard  <mark@klomp.org>
8617         PR debug/86459
8618         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
8620 2018-07-10  Richard Biener  <rguenther@suse.de>
8622         * hash-map.h (hash_map::iterator::operator*): Return
8623         references to key and value.
8625 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
8627         PR c++/86443
8628         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
8629         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
8630         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
8631         (gimplify_omp_for): For composite loops, move outer
8632         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
8633         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
8634         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
8635         TREE_LIST for both the original class iterator and the "last" helper
8636         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
8637         loop, remember has_decl_expr from outer composite loops for the
8638         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
8640 2018-07-09  Martin Sebor  <msebor@redhat.com>
8642         PR middle-end/77357
8643         PR middle-end/86428
8644         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
8645         accessing implicitly initialized array elements.
8646         * expr.c (string_constant): Handle string initializers of
8647         character arrays within aggregates.
8648         * gimple-fold.c (fold_array_ctor_reference): Add argument.
8649         Store element offset.  As a special case, handle zero size.
8650         (fold_nonarray_ctor_reference): Same.
8651         (fold_ctor_reference): Add argument.  Store subobject offset.
8652         * gimple-fold.h (fold_ctor_reference): Add argument.
8654 2018-07-09  Paul Koning  <ni1d@arrl.net>
8656         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
8657         (pdp11_insn_cost): New function.
8658         (pdp11_md_asm_adjust): New function.
8659         (TARGET_INVALID_WITHIN_DOLOOP): Define.
8660         (pdp11_rtx_costs): Update to match machine better.
8661         (output_addr_const_pdp11): Correct format mismatch warnings.
8662         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
8663         * config/pdp11/pdp11.md: General change to add base_cost and/or
8664         length attributes for use by new pdp11_insn_cost function.
8665         (MIN_BRANCH): Correct definition.
8666         (MIN_SOB): Ditto.
8667         (doloop_end): Use standard pattern name for looping pattern.
8668         (doloop_end_nocc): New.
8669         (movsf): Add another constraint alternative.
8670         (zero_extendqihi2): Add constraint alternatives for not in place
8671         extend.
8672         (zero_extendhisi2): Remove.
8673         (shift patterns): Add CC handling variants.
8674         (bswaphi2): New.
8675         (bswapsi2): New.
8676         (rothi3): New.
8677         (define_peephole2): New peephole to recognize mov that sets CC for
8678         subsequent test.
8680 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8682         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
8683         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
8684         wi::add.
8686 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
8688         PR c/86420
8689         * real.c (real_nextafter): Return true if result is denormal.
8691 2018-07-09  Martin Liska  <mliska@suse.cz>
8693         * common.opt: Add back wrongly removed attribute.
8695 2018-07-09  Richard Biener  <rguenther@suse.de>
8697         PR debug/86413
8698         * dwarf2out.c (gen_block_die): For an early generated DIE
8699         always output high/low PC attributes.
8701 2018-07-09  Tom de Vries  <tdevries@suse.de>
8703         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
8704         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
8705         onto VAR_DECL with abstract origin.
8707 2018-07-07  Jim Wilson  <jimw@sifive.com>
8709         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
8711 2018-07-07  Tom de Vries  <tdevries@suse.de>
8713         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
8715 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
8717         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
8718         overflow_type.
8719         (combine_bound): Use wide-int overflow calculation instead of
8720         rolling our own.
8721         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
8722         overflow_type.
8723         * fold-const.c (int_const_binop_2): Same.
8724         (extract_muldiv_1): Same.
8725         (fold_div_compare): Same.
8726         (fold_abs_const): Same.
8727         * match.pd: Same.
8728         * poly-int.h (add): Same.
8729         (sub): Same.
8730         (neg): Same.
8731         (mul): Same.
8732         * predict.c (predict_iv_comparison): Same.
8733         * profile-count.c (slow_safe_scale_64bit): Same.
8734         * simplify-rtx.c (simplify_const_binary_operation): Same.
8735         * tree-chrec.c (tree_fold_binomial): Same.
8736         * tree-data-ref.c (split_constant_offset_1): Same.
8737         * tree-if-conv.c (idx_within_array_bound): Same.
8738         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
8739         * tree-ssa-phiopt.c (minmax_replacement): Same.
8740         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
8741         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
8742         * vr-values.c (vr_values::adjust_range_with_scev): Same.
8743         * wide-int.cc (wi::add_large): Same.
8744         (wi::mul_internal): Same.
8745         (wi::sub_large): Same.
8746         (wi::divmod_internal): Same.
8747         * wide-int.h: Change overflow type to overflow_type for neg, add,
8748         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
8749         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
8750         mul_internal, divmod_internal.
8751         (overflow_type): New enum.
8752         (accumulate_overflow): New.
8754 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
8756         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
8757         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
8759 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
8761         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
8762         argument is checked for zero before entering loop, avoid checking again.
8764 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
8766         * gimplify.h (generic_expr_could_trap_p): Set as global function.
8767         * gimplify.h (generic_expr_could_trap_p): Likwise.
8768         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
8770 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
8772         PR tree-optimization/86401
8773         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
8774         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
8775         (fold_bit_and_mask): ... here.  New helper function for match.pd.
8776         * fold-const.h (fold_bit_and_mask): Declare.
8777         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
8779 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
8781         PR target/86324
8782         * target.def (translate_mode_attribute): New hook.
8783         * targhooks.h (default_translate_mode_attribute): Declare.
8784         * targhooks.c (default_translate_mode_attribute): New function.
8785         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
8786         * doc/tm.texi: Regenerate.
8787         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
8788         (rs6000_translate_mode_attribute): New function.
8790 2018-07-06  Paul Koning  <ni1d@arrl.net>
8792         * doc/md.texi (define_split): Document DONE and FAIL.
8793         (define_peephole2): Ditto.
8795 2018-07-05  Jeff Law  <law@redhat.com>
8797         PR tree-optimization/86010
8798         * tree-ssa-dse.c (compute_trims): More aggressively trim at
8799         both the head and tail of mem* and str* calls.
8801 2018-07-05  Jim Wilson  <jimw@sifive.com>
8803         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
8805 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
8807         * config/aarch64/aarch64-simd.md: correct flags text for
8808         MIN_EXPR replacement.
8810 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
8812         * configure: Regenerated.
8814 2018-07-05  Carl Love  <cel@us.ibm.com>
8816         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
8817         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
8818         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
8819         VSX_BUILTIN_DOUBLEL_V4SF.
8821 2018-07-05  Martin Sebor  <msebor@redhat.com>
8823         PR c++/86400
8824         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
8825         than its domain to compute its the upper bound of a char array.
8827 2018-07-05  Nathan Sidwell  <nathan@acm.org>
8829         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
8830         * doc/cpp.texi: Update comment.
8831         * doc/tm.texi: Rebuilt.
8832         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
8833         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
8834         * doc/extend.texi (Backwards Compatibility): Clarify it is system
8835         headers affected by extern "C".
8836         * system.h: Poison NO_IMPLICIT_EXTERN_C.
8837         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
8838         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
8839         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
8840         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
8841         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
8842         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
8843         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
8844         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
8845         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
8846         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
8847         config/sparc/sp64-elf.h, config/spu/spu.h,
8848         config/stormy16/stormy16.h, config/v850/v850.h,
8849         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
8850         define NO_IMPLICIT_EXTERN_C.
8851         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
8853 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
8855         PR target/84711
8856         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
8857         instead of GET_MODE_SIZE when comparing Units.
8859 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
8861         PR target/84711
8862         * rtlanal.c (set_noop_p): Constrain on mode change,
8863         include hard-reg-set.h
8865 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
8867         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
8869 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
8871         Revert
8872         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
8874         PR sanitizer/84250
8875         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
8876         libasan.
8877         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
8879 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
8881         PR sanitizer/84250
8882         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
8883         libasan.
8884         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
8886 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
8888         PR middle-end/86380
8889         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
8891 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
8893         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
8894         neg_*_op* variables.
8896 2018-07-04  Martin Liska  <mliska@suse.cz>
8898         * tree-switch-conversion.c: Define
8899         max_ratio_for_speed and max_ratio_for_size constants.
8901 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
8902             Martin Liska  <mliska@suse.cz>
8904         PR middle-end/66240
8905         PR target/45996
8906         PR c/84100
8907         * common.opt: Rename align options with 'str_' prefix.
8908         * common/config/i386/i386-common.c (set_malign_value): New
8909         function.
8910         (ix86_handle_option): Use it to set -falign-* options/
8911         * config/aarch64/aarch64-protos.h (struct tune_params): Change
8912         type from int to string.
8913         * config/aarch64/aarch64.c: Update default values from int
8914         to string.
8915         * config/alpha/alpha.c (alpha_override_options_after_change):
8916         Likewise.
8917         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
8918         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8919         max skip conditionally.
8920         * config/i386/freebsd.h (SUBALIGN_LOG): New.
8921         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8922         max skip conditionally.
8923         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8924         max skip conditionally.
8925         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
8926         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8927         max skip conditionally.
8928         * config/i386/i386.c (struct ptt): Change type from int to
8929         string.
8930         (ix86_default_align): Set default values.
8931         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
8932         max skip conditionally.
8933         * config/i386/iamcu.h (SUBALIGN_LOG): New.
8934         (ASM_OUTPUT_MAX_SKIP_ALIGN):
8935         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
8936         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8937         max skip conditionally.
8938         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
8939         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
8940         * config/i386/x86-64.h (SUBALIGN_LOG): New.
8941         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8942         max skip conditionally.
8943         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8944         * config/ia64/ia64.c (ia64_option_override): Set default values
8945         for alignment options.
8946         * config/m68k/m68k.c: Handle new str_align_* options.
8947         * config/mips/mips.c (mips_set_compression_mode): Change
8948         type of constants.
8949         (mips_option_override): Set default values for options.
8950         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
8951         Likewise.
8952         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8953         Likewise.
8954         * config/rx/rx.c (rx_option_override): Likewise.
8955         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
8956         (LABEL_ALIGN): Use align_labels_log.
8957         (LOOP_ALIGN): Use align_loops_align.
8958         * config/s390/s390.c (s390_asm_output_function_label): Use new
8959         macros.
8960         * config/sh/sh.c (sh_override_options_after_change):
8961         Change type of constants.
8962         * config/spu/spu.c (spu_sched_init): Likewise.
8963         * config/sparc/sparc.c (sparc_option_override): Set default
8964         values for options.
8965         * config/visium/visium.c (visium_option_override): Likewise.
8966         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
8967         emit p2align format with last argument if it's not needed.
8968         * doc/invoke.texi: Document extended format of -falign-*.
8969         * final.c: Use align_labels alignment.
8970         * flags.h (struct target_flag_state): Change type to use
8971         align_flags.
8972         (struct align_flags_tuple): New.
8973         (struct align_flags): Likewise.
8974         (align_loops_log): Redefine macro to use new types.
8975         (align_loops_max_skip): Redefine macro to use new types.
8976         (align_jumps_log): Redefine macro to use new types.
8977         (align_jumps_max_skip): Redefine macro to use new types.
8978         (align_labels_log): Redefine macro to use new types.
8979         (align_labels_max_skip): Redefine macro to use new types.
8980         (align_functions_log): Redefine macro to use new types.
8981         (align_loops): Redefine macro to use new types.
8982         (align_jumps): Redefine macro to use new types.
8983         (align_labels): Redefine macro to use new types.
8984         (align_functions): Redefine macro to use new types.
8985         (align_functions_max_skip): Redefine macro to use new types.
8986         (align_loops_value): New macro.
8987         (align_jumps_value): New macro.
8988         (align_labels_value): New macro.
8989         (align_functions_value): New macro.
8990         * function.c (invoke_set_current_function_hook): Propagate
8991         alignment values from flags to global variables default in
8992         topleev.h.
8993         * ipa-icf.c (sem_function::equals_wpa): Use
8994         cl_optimization_option_eq instead of memcmp.
8995         * lto-streamer.h (cl_optimization_stream_out): Support streaming
8996         of string types.
8997         (cl_optimization_stream_in): Likewise.
8998         * optc-save-gen.awk: Support strings in cl_optimization.
8999         * opth-gen.awk: Likewise.
9000         * opts.c (finish_options): Remove error checking of invalid
9001         value ranges.
9002         (MAX_CODE_ALIGN): Remove.
9003         (MAX_CODE_ALIGN_VALUE): Likewise.
9004         (parse_and_check_align_values): New function.
9005         (check_alignment_argument): Likewise.
9006         (common_handle_option): Use check_alignment_argument.
9007         * opts.h (parse_and_check_align_values): Declare.
9008         * toplev.c (init_alignments): Remove.
9009         (read_log_maxskip): New.
9010         (parse_N_M): Likewise.
9011         (parse_alignment_opts): Likewise.
9012         (backend_init_target): Remove usage of init_alignments.
9013         * toplev.h (parse_alignment_opts): Declare.
9014         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
9015         argument.
9016         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
9017         * tree.c (cl_option_hasher::equal): New.
9018         * varasm.c: Use new global macros.
9020 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
9022         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
9023         Use a simpler align directive also if MAXSKIP = ALIGN-1.
9024         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9025         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9026         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9027         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9028         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
9029         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
9030         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
9031         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9032         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9033         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9034         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9036 2018-07-04  Martin Liska  <mliska@suse.cz>
9037             Jonathan Wakely  <jwakely@redhat.com>
9039         * coverage.c: Use correct type.
9040         * doc/invoke.texi: Language correction.
9042 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
9044         PR target/85620
9045         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
9046         ENDBRANCH for non-tail call which may return via indirect branch.
9047         * doc/extend.texi: Document indirect_return attribute.
9049 2018-07-03  Martin Sebor  <msebor@redhat.com>
9051         PR tree-optimization/86274
9052         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
9053         precondition.
9054         (format_floating): Correct handling of infinities and NaNs.
9056 2018-07-03  Martin Sebor  <msebor@redhat.com>
9058         * print-tree.c (print_real_cst): New function.
9059         (print_node_brief): Call it.
9060         (print_node): Ditto.
9062 2018-07-03  Jeff Law  <law@redhat.com>
9064         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
9065         into a single pattern.
9067         * config/h8300/h8300.md (ors code_iterator): New.
9068         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
9069         a single pattern and single splitter.
9070         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
9071         (iorqi3_1, xorqi3_1): Likewise.
9072         (iorqi3, xorqi3 expanders): Similarly.
9074         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
9075         (movmd_internal) into a single pattern using the P mode iterator.
9076         (movmd splitters): Similarly.
9077         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
9078         (movsd splitters): Similarly.
9080         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
9081         ADDB, ADDW and ADDL into a single ADD attribute which selects the
9082         right table based on the size of the operand.
9083         * config/h8300/h8300.md (length_table): Corresponding changes. All
9084         references to "addb", "addw" and "addl" changed to "add".
9085         (btst patterns): Merge two variants into a single pattern.
9086         (tstqi, tsthi): Likewise.
9087         (addhi3_incdec, addsi3_incdec): Likewise.
9088         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
9089         (mulhi3, mulsi3): Likewise.
9090         (udivhi3, udivsi3): Likewise.
9091         (divhi3, divsi3): Likewise.
9092         (andorqi3, andorhi3, andorsi3): Likewise.
9094 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
9096         PR target/85694
9097         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
9098         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
9100 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9102         PR tree-optimization/85694
9103         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
9104         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
9105         UNSPEC_URHADD.
9106         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
9107         (<u>avg<mode>3_ceil): New patterns.
9109 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
9111         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
9112         scan-tree-dump directive.
9113         * gcc.dg/vect/slp-perm-2.c: Likewise.
9114         * gcc.dg/vect/slp-perm-3.c: Likewise.
9115         * gcc.dg/vect/slp-perm-5.c: Likewise.
9116         * gcc.dg/vect/slp-perm-6.c: Likewise.
9117         * gcc.dg/vect/slp-perm-7.c: Likewise.
9118         * gcc.dg/vect/slp-perm-8.c: Likewise.
9120 2018-07-03  Marek Polacek  <polacek@redhat.com>
9122         PR middle-end/86202
9123         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
9125 2018-07-03  Richard Biener  <rguenther@suse.de>
9127         PR ipa/86389
9128         * tree-ssa-structalias.c (find_func_clobbers): Properly
9129         handle indirect calls.
9131 2018-07-03  Jeff Law  <law@redhat.com>
9133         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
9134         (shifts): New code iterator.
9135         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
9136         expander.  Fix HImode handling on H8/SX.
9137         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
9138         (subqi3, subhi3, subsi3 expanders): Likewise.
9139         (andqi3, andhi3, andsi3 expanders): Likewise.
9140         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
9141         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
9142         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
9143         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
9144         (zero_extendqihi2, zero_extendqisi2): Likewise.
9145         (extendqihi2, extendqisi2): Likewise.
9146         (rotlqi3, rotlhi3, rotlsi3): Likewise.
9147         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
9148         (rotlqi3_1, rotlhi3_1): Likewise.
9149         (logicalhi3_sn, logicalsi3_sn): Likewise.
9150         (logicalhi3, logicalsi3): Likewise.
9152 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9154         * tree-vect-patterns.c (vect_recog_rotate_pattern)
9155         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9156         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
9157         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
9158         type to append_pattern_def_seq instead of creating a stmt_vec_info
9159         directly.
9160         (build_mask_conversion): Likewise.  Remove vinfo argument.
9161         (vect_add_conversion_to_patterm): Likewise, renaming to...
9162         (vect_add_conversion_to_pattern): ...this.
9163         (vect_recog_mask_conversion_pattern): Update call to
9164         build_mask_conversion.  Pass the vector type to
9165         append_pattern_def_seq here too.
9166         (vect_recog_gather_scatter_pattern): Update call to
9167         vect_add_conversion_to_pattern.
9169 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9171         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
9172         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9173         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
9174         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
9175         STMT_VINFO_PATTERN_DEF_SEQ to null here.
9176         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
9177         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
9178         append_pattern_def_seq instead of new_pattern_def_seq.
9179         (vect_recog_divmod_pattern): Do both of the above.
9180         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
9181         is null.
9183 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9185         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
9186         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
9187         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
9188         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
9189         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
9190         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9191         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
9192         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9193         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9194         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
9195         parameter with a single stmt_vec_info.
9196         (vect_recog_func_ptr): Likewise.
9197         (vect_recog_gather_scatter_pattern): Likewise, folding in...
9198         (vect_try_gather_scatter_pattern): ...this.
9199         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
9200         the stmt_vec_info of the statement to be matched.  Don't clear
9201         STMT_VINFO_RELATED_STMT.
9202         (vect_pattern_recog): Update call accordingly.
9204 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9206         PR tree-optimization/85694
9207         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
9208         (uavgM3_ceil): Document new optabs.
9209         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
9210         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
9211         functions.
9212         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
9213         (savg_ceil_optab): New optabs.
9214         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
9215         (vect_vect_recog_func_ptrs): Add it.
9216         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
9217         constant directly from the associated lhs.
9219 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9221         * tree-vect-patterns.c (vect_split_statement): New function.
9222         (vect_convert_input): Use it to try to split an existing cast.
9224 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9226         * poly-int.h (print_hex): New function.
9227         * dumpfile.h (dump_dec, dump_hex): Declare.
9228         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
9229         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
9230         min_input_precision, operation_precision and operation_sign.
9231         * tree-vect-patterns.c (vect_get_range_info): New function.
9232         (vect_same_loop_or_bb_p, vect_single_imm_use)
9233         (vect_operation_fits_smaller_type): Delete.
9234         (vect_look_through_possible_promotion): Add an optional
9235         single_use_p parameter.
9236         (vect_recog_over_widening_pattern): Rewrite to use new
9237         stmt_vec_info infomration.  Handle one operation at a time.
9238         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
9239         (vect_truncatable_operation_p, vect_set_operation_type)
9240         (vect_set_min_input_precision): New functions.
9241         (vect_determine_min_output_precision_1): Likewise.
9242         (vect_determine_min_output_precision): Likewise.
9243         (vect_determine_precisions_from_range): Likewise.
9244         (vect_determine_precisions_from_users): Likewise.
9245         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
9246         (vect_vect_recog_func_ptrs): Put over_widening first.
9247         Add cast_forwprop.
9248         (vect_pattern_recog): Call vect_determine_precisions.
9250 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9252         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
9253         statements that have been replaced by further pattern statements.
9254         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
9256 2018-07-03  Richard Biener  <rguenther@suse.de>
9258         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
9259         always set *dt.  Dump vectype in vectype overload.
9260         * dumpfile.h (dump_gimple_expr): New function.
9261         (dump_gimple_expr_loc): Likewise.
9262         * dumpfile.c (dump_gimple_expr): New function.
9263         (dump_gimple_expr_loc): Likewise.
9265 2018-07-02  Jeff Law  <law@redhat.com>
9267         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
9268         the H8/300, H8/300H and H8/S variants into a single pattern.
9269         (movhi_h8300, movqi_h8300hs): Similarly.
9270         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
9271         (QHI mode iterator): New.
9273         * config/h8300/h8300.md: Remove trailing whitespace.
9275 2018-07-02  Jim Wilson  <jimw@sifive.com>
9277         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
9278         instead of emit_insn for interrupt returns.
9279         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
9280         (riscv_sret, riscv_uret): Likewise.
9282 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
9284         * pretty-print.c (selftest::test_pp_format): Move save and restore
9285         of quotes to class auto_fix_quotes, and add an instance.
9286         * selftest.c: Include "intl.h".
9287         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
9288         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
9289         * selftest.h (selftest::auto_fix_quotes): New class.
9291 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
9293         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
9294         (aarch64_sve_prepare_conditional_op): Remove.
9295         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
9296         Allow aarch64_simd_reg_or_zero as select operand; remove
9297         the aarch64_sve_prepare_conditional_op call.
9298         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
9299         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9300         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
9301         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
9302         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
9303         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
9304         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
9305         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
9306         and a splitters to match all of the *_any patterns.
9307         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
9309         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
9310         (SVE_COND_FP_BINARY_REV): Remove.
9311         (sve_int_op_rev, sve_fp_op_rev): New.
9312         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
9313         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
9314         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
9315         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
9316         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
9317         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
9318         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
9319         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
9320         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
9322         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
9323         Remove match_dup 1 from the inner unspec.
9324         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9326         * config/aarch64/aarch64.md (movprfx): New attr.
9327         (length): Default movprfx to 8.
9328         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
9329         (*madd<SVE_I>, *msub<SVE_I): Likewise.
9330         (*<su>mul<SVE_I>3_highpart): Likewise.
9331         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
9332         (*v<ASHIFT><SVE_I>3): Likewise.
9333         (*<su><MAXMIN><SVE_I>3): Likewise.
9334         (*<su><MAXMIN><SVE_F>3): Likewise.
9335         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
9336         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
9337         (*div<SVE_F>4): Likewise.
9339 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
9341         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
9342         in dump string.
9344 2018-07-02  Richard Biener  <rguenther@suse.de>
9346         PR tree-optimization/86363
9347         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
9348         memset argument refers to a non-variable address.
9350 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
9352         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
9353         {PLUS,MINUS}_EXPR code to...
9354         (adjust_symbolic_bound): ...here,
9355         (combine_bound): ...here,
9356         (set_value_range_with_overflow): ...and here.
9358 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
9360         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
9361         code...
9362         (extract_range_from_abs_expr): ...here.
9364 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
9366         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
9367         -fno-omit-frame-pointer when not optimizing.
9369 2018-07-02  Martin Liska  <mliska@suse.cz>
9371         PR ipa/86279
9372         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
9373         (propagate_nothrow): Likewise.
9375 2018-07-02  Martin Liska  <mliska@suse.cz>
9377         PR ipa/86323
9378         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
9380 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
9382         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
9383         function in r262149, changing "loc" param from source_location to
9384         const dump_location_t &.
9385         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
9386         declaration, as above.
9388 2018-07-01  Paul Koning  <ni1d@arrl.net>
9390         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9391         -munit-asm, -mgnu-asm, -mdec-asm.
9392         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
9393         (pdp11_output_labelref): New.
9394         (pdp11_output_def): New.
9395         (pdp11_output_addr_vec_elt): New.
9396         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
9397         %# and %@ format codes.
9398         (pdp11_option_override): New.
9399         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
9400         (pdp11_output_ident): New.
9401         (pdp11_asm_named_section): New.
9402         (pdp11_asm_init_sections): New.
9403         (pdp11_file_start): New.
9404         (pdp11_file_end): New.
9405         (output_ascii): Use .ascii/.asciz for -mdec-asm.
9406         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
9407         %o, like %c but octal.
9408         (pdp11_option_override): New.
9409         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
9410         -mdec-asm.
9411         (DATA_SECTION_ASM_OP): Ditto.
9412         (READONLY_DATA_SECTION_ASM_OP): New.
9413         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
9414         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
9415         (ASM_OUTPUT_LABELREF): Ditto.
9416         (ASM_OUTPUT_DEF): Ditto.
9417         (ASM_OUTPUT_EXTERNAL): New.
9418         (ASM_OUTPUT_SOURCE_FILENAME): New.
9419         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
9420         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
9421         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
9422         %# and %@ format codes.
9423         * config/pdp11/pdp11.opt (mgnu-asm): New.
9424         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
9425         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
9426         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
9428 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
9430         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
9431         dereferencing path[] beyond its length.
9432         (debug_path): New.
9433         (debug_all_paths): New.
9434         (rewire_first_differing_edge): New.
9435         (adjust_paths_after_duplication): New.
9436         (duplicate_thread_path): Call adjust_paths_after_duplication.
9437         Add new argument.
9438         (thread_through_all_blocks): Add new argument to
9439         duplicate_thread_path.
9441 2018-06-30  Jim Wilson  <jimw@sifive.com>
9443         * config/riscv/predicates.md (p2m1_shift_operand): New.
9444         (high_mask_shift_operand): New.
9445         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
9446         pattern using p2m1_shift_operand.
9447         (lshsi3_zero_extend_3+2): New combiner pattern using
9448         high_mask_shift_operand.
9450 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9452         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
9453         split out from...
9454         (vect_recog_rotate_pattern): ...here.
9455         (vect_convert_input): Try to insert casts of invariants in the
9456         preheader.
9457         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
9458         preheader to be empty.
9460 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9462         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
9463         vector type.  If given, install it in the new statement's
9464         STMT_VINFO_VECTYPE.
9465         (vect_element_precision): New function.
9466         (vect_unpromoted_value): New struct.
9467         (vect_unpromoted_value::vect_unpromoted_value): New function.
9468         (vect_unpromoted_value::set_op): Likewise.
9469         (vect_look_through_possible_promotion): Likewise.
9470         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
9471         (vect_widened_op_tree, vect_convert_input): Likewise.
9472         (vect_convert_inputs, vect_convert_output): Likewise.
9473         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
9474         to handle the optional cast of the multiplication result and
9475         vect_widened_op_tree to detect the widened multiplication itself.
9476         Do not require the input and output of promotion casts to have
9477         the same sign, but base the signedness of the operation on the
9478         input rather than the result.  If the pattern includes two
9479         promotions, check that those promotions have the same sign.
9480         Do not restrict the MULT_EXPR handling to a double-width result;
9481         handle quadruple-width results and wider.  Use vect_convert_inputs
9482         to convert the inputs to the common type.
9483         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
9484         to handle the optional cast of the ABS result.  Also allow a sign
9485         change or a sign extension between the ABS and MINUS.
9486         Use vect_widened_op_tree to detect the widened subtraction and use
9487         vect_convert_inputs to convert the inputs to the common type.
9488         (vect_handle_widen_op_by_const): Delete.
9489         (vect_recog_widen_op_pattern): New function.
9490         (vect_recog_widen_mult_pattern): Use it.
9491         (vect_recog_widen_shift_pattern): Likewise.
9492         (vect_recog_widen_sum_pattern): Use
9493         vect_look_through_possible_promotion to handle the promoted
9494         PLUS_EXPR operand.
9496 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9498         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
9499         the containing gimple_seq *.
9500         * gimple-iterator.h (gsi_for_stmt): Declare it.
9501         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
9502         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
9503         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9504         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9505         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
9506         checks.
9507         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
9508         split out from...
9509         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
9510         statement being replaced is part of an existing pattern
9511         definition sequence, inserting the new pattern statements before
9512         the original one.
9513         (vect_pattern_recog_1): Don't return a bool.  If the statement
9514         is already part of a pattern, instead apply pattern matching
9515         to the pattern definition statements.  Don't clear the
9516         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
9517         (vect_pattern_recog): Don't break after the first match;
9518         continue processing the pattern definition statements instead.
9519         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
9521 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9523         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9524         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9525         (vect_recog_widen_sum_pattern): Use it.
9527 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9529         * tree-vect-loop.c (vectorizable_reduction): Assert that the
9530         phi is not a pattern statement and has not been replaced by
9531         a pattern statement.
9532         * tree-vect-patterns.c (type_conversion_p): Don't check
9533         STMT_VINFO_IN_PATTERN_P.
9534         (vect_recog_vector_vector_shift_pattern): Likewise.
9535         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
9536         the pattern statement rather than the original statement; check
9537         directly for a WIDEN_MULT_EXPR here.
9538         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
9539         vect_is_simple_use to return the pattern statement rather
9540         than the original statement; use is_pattern_stmt_p to check
9541         for such a pattern statement.
9542         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
9543         to return the pattern statement rather than the original statement;
9544         don't do the same transformation here.
9545         (vect_is_simple_use): If the defining statement has been replaced
9546         by a pattern statement, return the pattern statement instead.
9547         Remove the corresponding (local) transformation from the vectype
9548         overload.
9550 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9552         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
9553         end and default to null.
9554         * tree-vect-loop.c (vect_create_epilog_for_reduction)
9555         (vectorizable_reduction): Update calls accordingly, dropping the
9556         gimple ** argument if the passed-back statement isn't needed.
9557         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
9558         (vect_recog_rotate_pattern): Likewise.
9559         (vect_recog_mask_conversion_pattern): Likewise.
9560         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9561         (vect_mask_constant_operand_p): Likewise.
9562         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
9563         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
9564         (get_group_load_store_type, get_load_store_type): Likewise.
9565         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
9566         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
9567         (vectorizable_conversion, vectorizable_assignment): Likewise.
9568         (vectorizable_shift, vectorizable_operation): Likewise.
9569         (vectorizable_store, vect_is_simple_cond): Likewise.
9570         (vectorizable_condition, vectorizable_comparison): Likewise.
9571         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
9572         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
9573         and move it to the end.  Cope with null def_stmt_outs.
9575 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9577         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
9579 2018-06-29  Jeff Law  <law@redhat.com>
9581         * config/v850/v850.c (v850_legitimate_address_p): Handle large
9582         displacements for TARGET_V850E2V3 and newer.
9583         (TARGET_LRA_P): Remove.  Defaults to LRA now.
9584         * config/v850/v850.md (sign23byte_load): Remove.
9585         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
9586         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
9588 2018-06-29  Martin Liska  <mliska@suse.cz>
9590         PR lto/85759
9591         * coverage.c (coverage_init): Mangle full path name.
9592         * doc/invoke.texi: Document the change.
9593         * gcov-io.c (mangle_path): New.
9594         * gcov-io.h (mangle_path): Likewise.
9595         * gcov.c (mangle_name): Use mangle_path for path mangling.
9597 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9599         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
9600         if starting source register is not even.
9602 2018-06-29  Martin Liska  <mliska@suse.cz>
9604         PR tree-optimization/86263
9605         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
9606         Make edge redirection.
9608 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
9610         * dumpfile.c (dump_loc): Add indentation based on scope depth.
9611         (dump_scope_depth): New variable.
9612         (get_dump_scope_depth): New function.
9613         (dump_begin_scope): New function.
9614         (dump_end_scope): New function.
9615         * dumpfile.h (get_dump_scope_depth): New declaration.
9616         (dump_begin_scope): New declaration.
9617         (dump_end_scope): New declaration.
9618         (class auto_dump_scope): New class.
9619         (AUTO_DUMP_SCOPE): New macro.
9620         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
9621         AUTO_DUMP_SCOPE.
9623 2018-06-29  Richard Biener  <rguenther@suse.de>
9625         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
9626         compute_all_dependences succeeds.
9627         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
9628         exceed --param loop-max-datarefs-for-datadeps.
9630 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
9632         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
9634 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
9636         PR target/86348
9637         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
9638         alternative 0 in preferred_for_speed attribute.
9640 2018-06-28  Paul Koning  <ni1d@arrl.net>
9642         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
9643         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
9644         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
9645         * config/pdp11/pdp11.md: Correct "length" attribute calculation
9646         for shift insn patterns.
9648 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
9650         * cgraph.c (cgraph_node::get_body): Replace assignments to
9651         "dump_file" with calls to set_dump_file.
9652         * dumpfile.c (alt_dump_file): Make static, and group with...
9653         (alt_flags): ...this definition.
9654         (dumps_are_enabled): New variable.
9655         (refresh_dumps_are_enabled): New function.
9656         (set_dump_file): New function.
9657         (set_alt_dump_file): New function.
9658         (gcc::dump_manager::dump_start): Replace assignments to
9659         "dump_file" and "alt_dump_file" with calls to set_dump_file and
9660         set_alt_dump_file.
9661         (gcc::dump_manager::dump_finish): Likewise.
9662         * dumpfile.h (alt_dump_file): Delete decl.
9663         (dumps_are_enabled): New variable decl.
9664         (set_dump_file): New function decl.
9665         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
9666         global.
9667         * tree-nested.c (lower_nested_functions): Replace assignments to
9668         "dump_file" with calls to set_dump_file.
9670 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
9672         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
9673         goto_locus of each outgoing edge of each basic block.
9675 2018-06-28  Richard Biener  <rguenther@suse.de>
9677         * dwarf2out.c (decl_scope_table): Remove.
9678         (push_decl_scope): Likewise.
9679         (pop_decl_scope): Likewise.
9680         (gen_type_die_for_member): Do not call push/pop_decl_scope.
9681         (gen_struct_or_union_type_die): Likewise.
9682         (gen_tagged_type_die): Likewise.
9683         (dwarf2out_init): Do not initialize decl_scope_table.
9684         (dwarf2out_c_finalize): Do not free it.
9686 2018-06-28  Richard Biener  <rguenther@suse.de>
9688         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
9689         deciding whether to not re-use a DIE.
9691 2018-06-28  Richard Biener  <rguenther@suse.de>
9693         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
9694         DW_AT_abstract_origin attribute.
9696 2018-06-28  Martin Liska  <mliska@suse.cz>
9698         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
9699         Use newly introduced constants.
9700         * tree-switch-conversion.h (struct jump_table_cluster):
9701         Define max_ratio_for_size and max_ratio_for_speed.
9703 2018-06-28  Martin Liska  <mliska@suse.cz>
9705         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9706         Add new checking assert to catch invalid state.
9707         (jump_table_cluster::can_be_handled): Handle single case
9708         clusters.
9709         (jump_table_cluster::is_beneficial): Bail out for such case.
9710         (bit_test_cluster::find_bit_tests):
9711         Add new checking assert to catch invalid state.
9712         (bit_test_cluster::can_be_handled): Handle single case
9713         clusters.
9714         (bit_test_cluster::is_beneficial): Bail out for such case.
9715         (switch_decision_tree::analyze_switch_statement):
9716         Fix comment.
9718 2018-06-28  Martin Liska  <mliska@suse.cz>
9720         * common.opt: Introduce -completion option.
9721         * gcc.c (driver_handle_option): Handle it.
9722         (driver::main): Print completions if completion
9723         is set.
9724         * opt-suggestions.c (option_proposer::get_completions):
9725         New function.
9726         (option_proposer::suggest_completion): Likewise.
9727         (option_proposer::find_param_completions): Likewise.
9728         (verify_autocompletions): Likewise.
9729         (test_completion_valid_options): Likewise.
9730         (test_completion_valid_params): Likewise.
9731         (in_completion_p): Likewise.
9732         (empty_completion_p): Likewise.
9733         (test_completion_partial_match): Likewise.
9734         (test_completion_garbage): Likewise.
9735         (opt_proposer_c_tests): Likewise.
9736         * opt-suggestions.h: Declare new functions.
9737         * opts.c (common_handle_option): Handle OPT__completion_.
9738         * selftest-run-tests.c (selftest::run_tests): Add
9739         opt_proposer_c_tests.
9740         * selftest.c (assert_str_startswith): New.
9741         * selftest.h (assert_str_startswith): Likewise.
9742         (opt_proposer_c_tests): New.
9743         (ASSERT_STR_STARTSWITH): Likewise.
9745 2018-06-28  Martin Liska  <mliska@suse.cz>
9747         * Makefile.in: Add opt-suggestions.o.
9748         * gcc-main.c: Include opt-suggestions.h.
9749         * gcc.c (driver::driver): Likewise.
9750         (driver::~driver): Remove m_option_suggestions.
9751         (driver::build_option_suggestions): Moved to option_proposer.
9752         (driver::suggest_option): Likewise.
9753         (driver::handle_unrecognized_options): Use option_proposer.
9754         * gcc.h (class driver): Add new memver m_option_proposer.
9755         * opt-suggestions.c: New file.
9756         * opt-suggestions.h: New file.
9758 2018-06-28  Martin Liska  <mliska@suse.cz>
9760         * vec.h (class auto_string_vec): New (moved from auto_argvec).
9761         (auto_string_vec::~auto_string_vec): Likewise.
9763 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
9765         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
9766         prevent_decl_creation_for_types fields up and add reset_location field.
9767         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
9768         statement if id->reset_location is true.
9769         (copy_edges_for_bb): Do not set goto_locus on the new edges if
9770         id->reset_location is true.
9771         (copy_phis_for_bb): Force input_location on the arguments if
9772         id->reset_location is true.
9773         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
9774         is set on the function to be inlined.
9776 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
9778         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
9780 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
9782         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
9783         registers for Pmode.
9784         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
9785         hard registers for the clobbered pseudo.
9787 2018-06-27  Paul Koning  <ni1d@arrl.net>
9789         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9790         mutually exclusive options.
9791         * config/pdp11/constraints.md (h): New constraint.
9792         (O): Update definition to match shift code generation.
9793         (D): New constraint.
9794         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
9795         (CCFP): Remove.
9796         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
9797         function.
9798         (output_jump): Change arguments.
9799         (pdp11_fixed_cc_regs): New function.
9800         (pdp11_cc_mode): Ditto.
9801         (pdp11_expand_shift): Ditto.
9802         (pdp11_assemble_shift): Ditto.
9803         (pdp11_small_shift): Ditto.
9804         (pdp11_branch_cost): Remove.
9805         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
9806         from output.
9807         (pdp11_register_move_cost): Update for CC registers.
9808         (pdp11_rtx_costs): Add case for LSHIFTRT.
9809         (pdp11_output_jump): Add CCNZ mode conditional branches.
9810         (notice_update_cc_on_set): Remove.
9811         (pdp11_cc_mode): New function.
9812         (simple_memory_operand): Correct pre/post decrement case.
9813         (no_side_effect_operand): New function.
9814         (pdp11_regno_reg_class): Add CC_REGS class.
9815         (pdp11_fixed_cc_regs): New function.
9816         (pdp11_small_shift): New function.
9817         (pdp11_expand_shift): New function to expand shift insns.
9818         (pdp11_assemble_shift): New function to output shifts.
9819         (pdp11_branch_cost): Remove.
9820         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
9821         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
9822         (WCHAR_TYPE): Ditto.
9823         (PTRDIFF_TYPE): Ditto.
9824         (ADJUST_INSN_LENGTH): New macro.
9825         (FIXED_REGISTERS): Add CC registers.
9826         (CALL_USED_REGISTERS): Ditto.
9827         (reg_class): Ditto.
9828         (REG_CLASS_NAMES): Ditto.
9829         (REG_CLASS_CONTENTS): Ditto.
9830         (SELECT_CC_MODE): Use new function.
9831         (TARGET_FLAGS_REGNUM): New macro.
9832         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
9833         (cc0_reg_rtx): Remove.
9834         (CC_STATUS_MDEP): Remove.
9835         (CC_STATUS_MDEFP_INIT): Remove.
9836         (CC_IN_FPU): Remove.
9837         (NOTICE_UPDATE_CC): Remove.
9838         (REGISTER_NAMES): Add CC registers.
9839         (BRANCH_COST): Change to constant 1.
9840         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
9841         handling.
9842         * config/pdp11/pdp11.opt (mbcopy): Remove.
9843         (mbcopy-builtin): Remove.
9844         (mbranch-cheap): Remove.
9845         (mbranch-expensive): Remove.
9846         * config/pdp11/predicates.md (expand_shift_operand): Update to
9847         match shift code generation.
9848         (ccnz_operator): New predicate.
9849         * doc/invoke.texi (PDP-11 Options): Remove deleted options
9850         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
9851         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
9852         exclusive options.
9853         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
9854         description of O constraint.
9856 2018-06-27  Jeff Law  <law@redhat.com>
9857             Austin Law  <austinklaw@gmail.com>
9859         * config/v850/v850.md (addsi3_set_flags): New pattern.
9860         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
9861         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
9862         (zero_extendhisi2_v850_set_flags): Likewise.
9863         (zero_extendqisi2_v850_set_flags): Likewise.
9864         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
9865         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
9866         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
9868         * config/v850/v850-protos.h (notice_update_cc): Remove.
9869         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
9870         (v850_print_operand): Handle 'D' and "d".
9871         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
9872         Add handling of arithmetic/logical operations compared against zero.
9873         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
9874         Do not look at v850_compare_op, instead get mode from last argument.
9875         (v850_gen_compare): Remove
9876         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
9877         after reload for prologue insns.
9878         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
9879         patterns.
9880         (construct_save_jarl): Likewise.
9881         (TARGET_FLAGS_REGNUM): Define.
9882         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
9883         (NOTICE_UPDATE_CC): Remove.
9884         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
9885         than cc0.  Conditionalize on reload_completed.
9886         (cmpsi_insn, setfcc_insn): Likewise.
9887         (tst1 splitter): Turn into define_and_split which sets the flags
9888         after reload.
9889         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
9890         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
9891         (cstoresf4, cstoredf4): Clobber the flags.
9892         (cmpsi, cmpsf, cmpdf): Remove expanders.
9893         (setf_insn): Remove pattern.
9894         (addsi3): Turn into define_and_split which clobbers the flags after
9895         reload and a suitable pattern (addsi3_clobber_flags) for use after
9896         reload.
9897         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
9898         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
9899         (ashrsi3, ashrsi3_v850e2): Likewise.
9900         (bins): Clobber the flags.
9901         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
9902         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
9903         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
9904         (call_value_internal_short, call_value_internal_long): Likewise.
9905         (callt_save_interrupt, callt_return_interrupt): Likewise.
9906         (save_interrupt, return_interrupt): Likewise.
9907         (callt_save_all_interrupt, save_all_interrupt): Likewise.
9908         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
9909         (restore_all_interrupt, _restore_all_interrupt): Likewise.
9910         (All FP comparisons): Only allow after reload has completed.
9911         (trfsr): Likewise.
9912         (divh, divhu): Tweak output template.
9913         (branch_z_normal, branch_z_invert): Remove
9914         (branch_nz_normal, branch_nz_invert): Likewise.
9915         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
9917         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
9918         * config/v850/v850.c (notice_update_cc): Remove.
9919         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
9920         (CC_NO_CARRY): Likewise.
9921         (NOTICE_UPDATE_CC): Define to nothing.
9922         * config/v850/v850.md: Remove block comment on cc0 handling
9923         Remove "cc" attribute from all patterns.  Remove cc_status handling
9924         from all patterns.  Minor formatting fixes.
9926 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9928         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
9929         (cortex-a76.cortex-a55): Likewise.
9930         * config/aarch64/aarch64-tune.md: Regenerate.
9931         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
9932         cortex-a76.cortex-a55.
9934 2018-06-27  Jeff Law  <law@redhat.com>
9936         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
9937         (MULTILIB_DIRNAMES): Similarly.
9939 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
9941         * gimple.h (gimple_return_retbnd): Delete.
9942         (gimple_return_set_retbnd): Likewise.
9943         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
9944         gimple_return_set_retbnd.
9945         * gimple-pretty-print.c (dump_gimple_return): Remove call to
9946         gimple_return_retbnd and adjust.
9947         * tree-inline.h (struct copy_body_data): Remove retbnd field.
9948         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
9949         Explicitly return NULL in a couple more cases.  Move assertion
9950         on debug statements and remove unreachable code.
9951         (reset_debug_binding): Do not test id->retbnd.
9952         (expand_call_inline): Do not set it.
9954 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
9956         * configure.ac: Add --disable-gcov option.
9957         * configure: Regenerate.
9958         * Makefile.in: Honour @enable_gcov@.
9959         * doc/install.texi: Document --disable-gcov.
9961 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9963         * config/arm/arm-cpus.in (cortex-a76): New entry.
9964         (cortex-a76.cortex-a55): Likewise.
9965         * config/arm/arm-tables.opt: Regenerate.
9966         * config/arm/arm-tune.md: Likewise.
9967         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
9968         * doc/invoke.texi (ARM Options): Document cortex-a76 and
9969         cortex-a76.cortex-a55.
9971 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
9973         PR target/85769
9974         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
9976 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
9978         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
9979         comment.
9980         (EPILOGUE_USES): Likewise.
9982 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
9984         * tree-inline.c (remap_location): New function extracted from...
9985         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
9986         (copy_phis_for_bb): ...here.  Call remap_location.
9987         (copy_cfg_body): Adjust call to copy_edges_for_bb.
9989 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
9991         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
9992         unaligned vsx for 16B memset.
9994 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
9996         PR target/86285
9997         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
9998         ieee128_float_type_node to long_double_type_node unless
9999         TARGET_LONG_DOUBLE_128 is set.
10001 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
10003         * cfgloop.c (get_loop_location): Convert return type from
10004         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
10005         by implicit construction from rtx_insn *, and using
10006         dump_user_location_t::from_function_decl for the fallback case.
10007         * cfgloop.h (get_loop_location): Convert return type from
10008         location_t to dump_user_location_t.
10009         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
10010         dump_printf_loc to pass in a dump_location_t rather than a
10011         location_t, via the gimple stmt.
10012         * coverage.c (get_coverage_counts): Update calls to
10013         dump_printf_loc to pass in dump_location_t rather than a
10014         location_t.
10015         * doc/optinfo.texi (Dump types): Convert example of
10016         dump_printf_loc from taking "locus" to taking "insn".  Update
10017         description of the "_loc" calls to cover dump_location_t.
10018         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
10019         "selftest.h".
10020         (dump_user_location_t::dump_user_location_t): New constructors,
10021         from gimple *stmt and rtx_insn *.
10022         (dump_user_location_t::from_function_decl): New function.
10023         (dump_loc): Make static.
10024         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
10025         const dump_location_t &.
10026         (dump_generic_expr_loc): Delete.
10027         (dump_printf_loc): Convert param "loc" from location_t to
10028         const dump_location_t &.
10029         (selftest::test_impl_location): New function.
10030         (selftest::dumpfile_c_tests): New function.
10031         * dumpfile.h: Include "profile-count.h".
10032         (class dump_user_location_t): New class.
10033         (struct dump_impl_location_t): New struct.
10034         (class dump_location_t): New class.
10035         (dump_printf_loc): Convert 2nd param from source_location to
10036         const dump_location_t &.
10037         (dump_generic_expr_loc): Delete.
10038         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
10039         const dump_location_t &.
10040         * gimple-fold.c (fold_gimple_assign): Update call to
10041         dump_printf_loc to pass in a dump_location_t rather than a
10042         location_t, via the gimple stmt.
10043         (gimple_fold_call): Likewise.
10044         * gimple-loop-interchange.cc
10045         (loop_cand::analyze_iloop_reduction_var): Update for change to
10046         check_reduction_path.
10047         (tree_loop_interchange::interchange): Update for change to
10048         find_loop_location.
10049         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
10050         change in return-type of find_loop_location.
10051         (graphite_regenerate_ast_isl): Likewise.
10052         * graphite-optimize-isl.c (optimize_isl): Likewise.
10053         * graphite.c (graphite_transform_loops): Likewise.
10054         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
10055         pass in a dump_location_t rather than a location_t, via the
10056         gimple stmt.
10057         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10058         * ipa.c (walk_polymorphic_call_targets): Likewise.
10059         * loop-unroll.c (report_unroll): Convert "locus" param from
10060         location_t to dump_location_t.
10061         (decide_unrolling): Update for change to get_loop_location's
10062         return type.
10063         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
10064         location_t to dump_user_location_t.
10065         (grid_find_single_omp_among_assignments_1): Updates calls to
10066         dump_printf_loc to pass in a dump_location_t rather than a
10067         location_t, via the gimple stmt.
10068         (grid_parallel_clauses_gridifiable): Convert "tloc" from
10069         location_t to dump_location_t.  Updates calls to dump_printf_loc
10070         to pass in a dump_location_t rather than a location_t, via the
10071         gimple stmt.
10072         (grid_inner_loop_gridifiable_p): Likewise.
10073         (grid_dist_follows_simple_pattern): Likewise.
10074         (grid_gfor_follows_tiling_pattern): Likewise.
10075         (grid_target_follows_gridifiable_pattern): Likewise.
10076         (grid_attempt_target_gridification): Convert initialization
10077         of local "grid" from memset to zero-initialization; FIXME: does
10078         this require C++11?  Update call to dump_printf_loc to pass in a
10079         optinfo_location rather than a location_t, via the gimple stmt.
10080         * profile.c (read_profile_edge_counts): Updates call to
10081         dump_printf_loc to pass in a dump_location_t rather than a
10082         location_t
10083         (compute_branch_probabilities): Likewise.
10084         * selftest-run-tests.c (selftest::run_tests): Call
10085         dumpfile_c_tests.
10086         * selftest.h (dumpfile_c_tests): New decl.
10087         * tree-loop-distribution.c (pass_loop_distribution::execute):
10088         Update for change in return type of find_loop_location.
10089         * tree-parloops.c (parallelize_loops): Likewise.
10090         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
10091         "locus" from location_t to dump_user_location_t.
10092         (canonicalize_loop_induction_variables): Likewise.
10093         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
10094         for change in return type of find_loop_location.
10095         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
10096         to dump_printf_loc to pass in a dump_location_t rather than a
10097         location_t, via the stmt.
10098         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
10099         Likewise.
10100         * tree-vect-loop-manip.c (find_loop_location): Convert return
10101         type from source_location to dump_user_location_t.
10102         (vect_do_peeling): Update for above change.
10103         (vect_loop_versioning): Update for change in type of
10104         vect_location.
10105         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
10106         from location_t to dump_user_location_t.
10107         (vect_estimate_min_profitable_iters): Update for change in type
10108         of vect_location.
10109         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
10110         location_t to dump_location_t.
10111         (vect_slp_bb): Update for change in type of vect_location.
10112         * tree-vectorizer.c (vect_location): Convert from source_location
10113         to dump_user_location_t.
10114         (try_vectorize_loop_1): Update for change in vect_location's type.
10115         (vectorize_loops): Likewise.
10116         (increase_alignment): Likewise.
10117         * tree-vectorizer.h (vect_location): Convert from source_location
10118         to dump_user_location_t.
10119         (find_loop_location): Convert return type from source_location to
10120         dump_user_location_t.
10121         (check_reduction_path): Convert 1st param from location_t to
10122         dump_user_location_t.
10123         * value-prof.c (check_counter): Update call to dump_printf_loc to
10124         pass in a dump_user_location_t rather than a location_t; update
10125         call to error_at for change in type of "locus".
10126         (check_ic_target): Update call to dump_printf_loc to
10127         pass in a dump_user_location_t rather than a location_t, via the
10128         call_stmt.
10130 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
10132         * config/s390/s390.h (enum processor_flags): Do not use
10133         default tune parameter when -march was specified.
10135 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
10137         PR target/86314
10138         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
10139         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
10140         operands.
10142 2018-06-26  Richard Biener  <rguenther@suse.de>
10144         PR tree-optimization/86287
10145         PR bootstrap/86316
10146         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
10147         (vect_analyze_loop): Initialize n_stmts.
10149 2018-06-26  Richard Biener  <rguenther@suse.de>
10151         PR middle-end/86271
10152         * fold-const.c (fold_convertible_p): Pointer extension
10153         isn't valid.
10155 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
10157         PR debug/86064
10158         * dwarf2out.c (loc_list_has_views): Adjust comments.
10159         (dw_loc_list): Split single cross-partition range with
10160         nonzero locview.
10162 2018-06-25  Jeff Law  <law@redhat.com>
10164         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
10165         on -mbig-switch by default.
10167         * config/v850/predicates.md (const_float_1_operand): Fix match_code
10168         test.
10169         (const_float_0_operand): Remove unused predicate.
10170         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
10171         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
10172         (recipsf2): New expander.  Original pattern now called
10173         (recipsf2_insn).
10174         (recipdf2, recipdf2_insn): Similarly.
10175         (rsqrtsf2, rsqrtsf2_insn): Similarly
10176         (rsqrtdf2, rsqrtdf2_insn): Similarly
10178 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
10180         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
10181         Simplify logic for FreeBSD (twice).
10183 2018-06-25  Martin Sebor  <msebor@redhat.com>
10185         PR tree-optimization/86204
10186         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
10187         a strnlen result if it's less than the length of the string.
10189 2018-06-25  Martin Sebor  <msebor@redhat.com>
10191         PR tree-optimization/85700
10192         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
10193         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
10194         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
10196 2018-06-25  Martin Sebor  <msebor@redhat.com>
10198         * doc/extend.texi (Zero-length arrays): Update and clarify.
10200 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
10202         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
10203         added IEEE/IBM long double multilib support on PowerPC little
10204         endian Linux systems.
10205         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
10206         (MULTILIB_DEFAULTS): Likewise.
10207         * config/rs6000/rs6000.c (rs6000_option_override_internal):
10208         Likewise.
10209         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
10210         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
10211         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
10213 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
10215         PR middle-end/86311
10216         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
10217         (REORDER_45): Likewise.
10219 2018-06-25  Jeff Law  <law@redhat.com>
10221         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
10222         dividend to 32 bits.  Adjust length.
10223         (udivmodhi4): Cleanup output template.  Fix length.
10225 2018-06-25  Carl Love  <cel@us.ibm.com>
10227         * config/rs6000/vsx.md: Change word selector to prefered location.
10229 2018-06-25  Richard Biener  <rguenther@suse.de>
10231         PR tree-optimization/86304
10232         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
10233         epilogue-if-converted loops as well.
10235 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
10237         * lto-section-out.c (lto_begin_section): Do not print section
10238         name for noaddr and unnumbered dumps.
10240 2018-06-25  Richard Biener  <rguenther@suse.de>
10242         * tree-vectorizer.h (struct vec_info_shared): New structure
10243         with parts split out from struct vec_info and loop_nest from
10244         struct _loop_vec_info.
10245         (struct vec_info): Adjust accordingly.
10246         (struct _loop_vec_info): Likewise.
10247         (LOOP_VINFO_LOOP_NEST): Adjust.
10248         (LOOP_VINFO_DATAREFS): Likewise.
10249         (LOOP_VINFO_DDRS): Likewise.
10250         (struct _bb_vec_info): Likewise.
10251         (BB_VINFO_DATAREFS): Likewise.
10252         (BB_VINFO_DDRS): Likewise.
10253         (struct _stmt_vec_info): Add dr_aux member.
10254         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
10255         (DR_MISALIGNMENT_UNINITIALIZED): New.
10256         (set_dr_misalignment): Adjust.
10257         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
10258         (vect_analyze_loop): Adjust prototype.
10259         (vect_analyze_loop_form): Likewise.
10260         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10261         Compute dependences lazily.
10262         (vect_record_base_alignments): Use shared datarefs/ddrs.
10263         (vect_verify_datarefs_alignment): Likewise.
10264         (vect_analyze_data_refs_alignment): Likewise.
10265         (vect_analyze_data_ref_accesses): Likewise.
10266         (vect_analyze_data_refs): Likewise.
10267         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
10268         constructor parameter for shared part.
10269         (vect_analyze_loop_form): Pass in shared part and adjust.
10270         (vect_analyze_loop_2): Pass in storage for the number of
10271         stmts.  Move loop nest finding to the caller.  Compute
10272         datarefs lazily.
10273         (vect_analyze_loop): Pass in shared part.
10274         (vect_transform_loop): Verify shared datarefs are unchanged.
10275         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
10276         constructor parameter for shared part.
10277         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
10278         (vect_slp_bb): Verify shared datarefs are unchanged before
10279         transform.
10280         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
10281         change.
10282         (new_stmt_vec_info): Initialize DR_AUX misalignment to
10283         DR_MISALIGNMENT_UNINITIALIZED.
10284         * tree-vectorizer.c (vec_info::vec_info): Add constructor
10285         parameter for shared part.
10286         (vec_info::~vec_info): Adjust.
10287         (vec_info_shared::vec_info_shared): New.
10288         (vec_info_shared::~vec_info_shared): Likewise.
10289         (vec_info_shared::save_datarefs): Likewise.
10290         (vec_info_shared::check_datarefs): Likewise.
10291         (try_vectorize_loop_1): Construct shared part live for analyses
10292         of a single loop for multiple vector sizes.
10293         * tree-parloops.c (gather_scalar_reductions): Adjust.
10295 2018-06-25  Richard Biener  <rguenther@suse.de>
10297         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
10298         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
10299         (vect_analyze_data_refs): Remove similar code from here and
10300         simplify accordingly.
10302 2018-06-25  Richard Biener  <rguenther@suse.de>
10304         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
10305         for reverse storage order accesses rather than asserting
10306         they cannot happen here.
10308 2018-06-25  Tom de Vries  <tdevries@suse.de>
10310         PR debug/86257
10311         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
10312         Use data16 instead of .byte for insn prefix.
10314 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
10316         PR C++/86082
10317         * parser.c (make_char_string_pack): Pass this literal chars
10318         through cpp_interpret_string.
10319         (cp_parser_userdef_numeric_literal): Check the result of
10320         make_char_string_pack.
10322 2018-06-24  Maya Rashish  <coypu@sdf.org>
10324         * ginclude/stddef.h: Simplify conditions around avoiding
10325         re-definition of __size_t.
10327 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
10329         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
10330         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
10332 2018-06-22  Maya Rashish  <coypu@sdf.org>
10334         * doc/invoke.texi (mno-fancy-math-387): Update for changes
10335         made to OpenBSD and NetBSD through the years.
10337 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10339         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10340         behavior of vec_pack (vector double, vector double) to match
10341         behavior of vec_float2 (vector double, vector double).
10343 2018-06-22  Olivier Hainque  <hainque@adacore.com>
10345         * gimplify.c (gimplify_function_tree): Prevent creation
10346         of a trampoline for the address of the current function
10347         passed to entry/exit instrumentation hooks.
10349 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
10351         PR target/86222
10352         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
10353         correctly.
10355 2018-06-22  Martin Liska  <mliska@suse.cz>
10357         PR tree-optimization/86263
10358         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10359         Bail out if is_enabled is false.
10360         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
10361         New declaration.
10362         (jump_table_cluster::is_enabled): New function.
10364 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
10366         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10367         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
10368         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
10369         (lto_input_ts_binfo_tree_pointers): Likewise.
10370         * tree-streamer-out.c (streamer_write_tree_bitfields,
10371         write_ts_binfo_tree_pointers): Likewise.
10372         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
10374 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
10376         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
10378 2018-06-22  Martin Liska  <mliska@suse.cz>
10380         * symbol-summary.h (get): Make it pure and inline move
10381         functionality from ::get function.
10382         (get): Remove and inline into ::get and ::get_create.
10383         (get_create): Move code from ::get function.
10385 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10387         PR target/85994
10388         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
10389         -x assembler-with-cpp.
10391 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10393         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
10394         _FILE_OFFSET_BITS=64 for C++.
10396 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
10398         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
10399         conversion insn that shows up when pr85657-3.c is compiled using
10400         IEEE 128-bit long double.
10401         (neg<mode>2_internal): Use the correct mode to check whether the
10402         mode is IBM extended.
10403         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
10404         multiply and divide external functions from being created more
10405         than once.
10407 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10409         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
10410         functions.
10411         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
10412         the edge can be forwarded.
10413         (cfg_layout_merge_blocks): Likewise.
10415 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10417         * except.c (finish_eh_generation): Commit edge insertions only after
10418         the EH edges have been redirected from post-landing to landing pads.
10420 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10422         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
10423         create_tmp_var_for to create the FRAME decl.
10424         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
10426 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10428         * tree-inline.c (copy_edges_for_bb): Minor tweak.
10429         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
10430         debug statement when resetting its value.
10431         (expand_call_inline): Copy the locus of the call onto the assignment
10432         of the return value, if any.  Use local variable in more cases.
10434 2018-06-21  Martin Liska  <mliska@suse.cz>
10436         * ipa-pure-const.c (propagate_nothrow): Use
10437         funct_state_summaries->get.
10438         (dump_malloc_lattice): Likewise.
10439         (propagate_malloc): Likewise.
10441 2018-06-21  Richard Biener  <rguenther@suse.de>
10443         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
10444         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
10445         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
10446         comment.
10447         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
10448         BLOCK_ABSTRACT_ORIGIN unconditionally.
10450 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
10452         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
10453         deleting it.
10454         * ipa-reference.c (ipa_reference_c_finalize): Delete
10455         ipa_ref_opt_sum_summaries and set it to NULL.
10457 2018-06-21  Tom de Vries  <tdevries@suse.de>
10459         PR tree-optimization/85859
10460         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
10461         test with comment from bb_no_side_effects_p.
10463 2018-06-21  Richard Biener  <rguenther@suse.de>
10465         PR tree-optimization/86232
10466         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
10467         max for constant niter.
10469 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10471         * config/aarch64/aarch64-simd.md
10472         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
10474 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10476         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
10477         Make opernads of the unspec commutative.
10479 2018-06-21  Richard Biener  <rguenther@suse.de>
10481         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
10482         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
10483         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
10484         (vect_analyze_data_ref_dependence): Re-order checks to deal with
10485         NULL DR_STEP.
10486         (vect_record_base_alignments): Do not record base alignment
10487         for gathers or scatters.
10488         (vect_compute_data_ref_alignment): Drop return value that is always
10489         true.  Bail out early for gathers or scatters.
10490         (vect_enhance_data_refs_alignment): Bail out early for gathers
10491         or scatters.
10492         (vect_find_same_alignment_drs): Likewise.
10493         (vect_analyze_data_refs_alignment): Remove dead code.
10494         (vect_slp_analyze_and_verify_node_alignment): Likewise.
10495         (vect_analyze_data_refs): For possible gathers or scatters do
10496         not create an alternate DR, just check their possible validity
10497         and mark them.  Adjust DECL_NONALIASED handling to not rely
10498         on DR_BASE_ADDRESS.
10499         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
10500         update inits of gathers or scatters.
10501         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
10502         Also copy gather/scatter flag to pattern vinfo.
10504 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10506         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10507         behavior of vec_packsu (vector unsigned long long, vector unsigned
10508         long long) to match behavior of vec_packs with same signature.
10510 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
10511             Thomas Schwinge <thomas@codesourcery.com>
10512             Cesar Philippidis  <cesar@codesourcery.com>
10514         * gimplify.c (gimplify_scan_omp_clauses): Add support for
10515         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10516         (gimplify_adjust_omp_clauses): Likewise.
10517         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
10518         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
10519         (gimplify_omp_target_update): Update handling of acc update and
10520         enter/exit data.
10521         * omp-low.c (install_var_field): Remove unused parameter
10522         base_pointers_restrict.
10523         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
10524         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
10525         FINALIZE}
10526         (omp_target_base_pointers_restrict_p): Delete.
10527         (scan_omp_target): Update call to scan_sharing_clauses.
10528         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
10529         FINALIZE}.
10530         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
10531         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10532         (convert_local_omp_clauses): Likewise.
10533         * tree-pretty-print.c (dump_omp_clause): Likewise.
10534         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
10535         FINALIZE}.
10536         (omp_clause_code_name): Likewise.
10538 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
10540         PR debug/86194
10541         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
10542         be narrowed.
10544         PR tree-optimization/86231
10545         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
10546         anti-range don't overwrite *vr0min before using it to compute *vr0max.
10548 2018-06-20  Tom de Vries  <tdevries@suse.de>
10550         PR tree-optimization/86097
10551         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
10552         iv type if signedness of iv type is not the same as that of *nit.
10554 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
10556         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
10557         EDGE_EH edges, verify they are all EDGE_EH.
10559 2018-06-20  Maya Rashish  <coypu@sdf.org>
10561         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
10563 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10565         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
10566         * config/aarch64/aarch64.c (xgene1_tunings): Add
10567         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
10568         (aarch64_mode_valid_for_sched_fusion_p):
10569         Allow 16-byte modes.
10570         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
10571         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
10572         128-bit modes.
10573         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
10574         New pattern.
10575         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
10576         * config/aarch64/iterators.md (VQ2): New mode iterator.
10578 2018-06-20  Martin Liska  <mliska@suse.cz>
10580         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10581         Change default ratio from 10 to 8.
10583 2018-06-20  Martin Liska  <mliska@suse.cz>
10585         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10586         New.
10587         (bit_test_cluster::find_bit_tests): Likewise.
10588         (switch_decision_tree::analyze_switch_statement): Find clusters.
10589         * tree-switch-conversion.h (struct jump_table_cluster): Document
10590         hierarchy.
10592 2018-06-20  Martin Liska  <mliska@suse.cz>
10594         * tree-switch-conversion.c (switch_conversion::collect):
10595         Record m_uniq property.
10596         (switch_conversion::expand): Bail out for special conditions.
10597         (group_cluster::~group_cluster): New.
10598         (group_cluster::group_cluster): Likewise.
10599         (group_cluster::dump): Likewise.
10600         (jump_table_cluster::emit): New.
10601         (switch_decision_tree::fix_phi_operands_for_edges): New.
10602         (struct case_node): Remove struct.
10603         (jump_table_cluster::can_be_handled): New.
10604         (case_values_threshold): Moved to header.
10605         (reset_out_edges_aux): Likewise.
10606         (jump_table_cluster::is_beneficial): New.
10607         (bit_test_cluster::can_be_handled): Likewise.
10608         (add_case_node): Remove.
10609         (bit_test_cluster::is_beneficial): New.
10610         (case_bit_test::cmp): New.
10611         (bit_test_cluster::emit): New.
10612         (expand_switch_as_decision_tree_p): Remove.
10613         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
10614         (fix_phi_operands_for_edge): Likewise.
10615         (switch_decision_tree::analyze_switch_statement): New.
10616         (compute_cases_per_edge): Move ...
10617         (switch_decision_tree::compute_cases_per_edge): ... here.
10618         (try_switch_expansion): Likewise.
10619         (switch_decision_tree::try_switch_expansion): Likewise.
10620         (record_phi_operand_mapping): Likewise.
10621         (switch_decision_tree::record_phi_operand_mapping): Likewise.
10622         (emit_case_decision_tree): Likewise.
10623         (switch_decision_tree::emit): Likewise.
10624         (balance_case_nodes): Likewise.
10625         (switch_decision_tree::balance_case_nodes): Likewise.
10626         (dump_case_nodes): Likewise.
10627         (switch_decision_tree::dump_case_nodes): Likewise.
10628         (emit_jump): Likewise.
10629         (switch_decision_tree::emit_jump): Likewise.
10630         (emit_cmp_and_jump_insns): Likewise.
10631         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
10632         (emit_case_nodes): Likewise.
10633         (switch_decision_tree::emit_case_nodes): Likewise.
10634         (conditional_probability): Remove.
10635         * tree-switch-conversion.h (enum cluster_type): New.
10636         (PRINT_CASE): New.
10637         (struct cluster): Likewise.
10638         (cluster::cluster): Likewise.
10639         (struct simple_cluster): Likewise.
10640         (simple_cluster::simple_cluster): Likewise.
10641         (struct group_cluster): Likewise.
10642         (struct jump_table_cluster): Likewise.
10643         (struct bit_test_cluster): Likewise.
10644         (struct min_cluster_item): Likewise.
10645         (struct case_tree_node): Likewise.
10646         (case_tree_node::case_tree_node): Likewise.
10647         (jump_table_cluster::case_values_threshold): Likewise.
10648         (struct case_bit_test): Likewise.
10649         (struct switch_decision_tree): Likewise.
10650         (struct switch_conversion): Likewise.
10651         (switch_decision_tree::reset_out_edges_aux): Likewise.
10653 2018-06-20  Martin Liska  <mliska@suse.cz>
10655         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
10656         (hoist_edge_and_branch_if_true): Likewise.
10657         (expand_switch_using_bit_tests_p): Likewise.
10658         (struct case_bit_test): Likewise.
10659         (case_bit_test_cmp): Likewise.
10660         (emit_case_bit_tests): Likewise.
10661         (switch_conversion::switch_conversion): New class.
10662         (struct switch_conv_info): Remove old struct.
10663         (collect_switch_conv_info): More to ...
10664         (switch_conversion::collect): ... this.
10665         (check_range): Likewise.
10666         (switch_conversion::check_range): Likewise.
10667         (check_all_empty_except_final): Likewise.
10668         (switch_conversion::check_all_empty_except_final): Likewise.
10669         (check_final_bb): Likewise.
10670         (switch_conversion::check_final_bb): Likewise.
10671         (create_temp_arrays): Likewise.
10672         (switch_conversion::create_temp_arrays): Likewise.
10673         (free_temp_arrays): Likewise.
10674         (gather_default_values): Likewise.
10675         (switch_conversion::gather_default_values): Likewise.
10676         (build_constructors): Likewise.
10677         (switch_conversion::build_constructors): Likewise.
10678         (constructor_contains_same_values_p): Likewise.
10679         (switch_conversion::contains_same_values_p): Likewise.
10680         (array_value_type): Likewise.
10681         (switch_conversion::array_value_type): Likewise.
10682         (build_one_array): Likewise.
10683         (switch_conversion::build_one_array): Likewise.
10684         (build_arrays): Likewise.
10685         (switch_conversion::build_arrays): Likewise.
10686         (gen_def_assigns): Likewise.
10687         (switch_conversion::gen_def_assigns): Likewise.
10688         (prune_bbs): Likewise.
10689         (switch_conversion::prune_bbs): Likewise.
10690         (fix_phi_nodes): Likewise.
10691         (switch_conversion::fix_phi_nodes): Likewise.
10692         (gen_inbound_check): Likewise.
10693         (switch_conversion::gen_inbound_check): Likewise.
10694         (process_switch): Use the newly created class.
10695         (switch_conversion::expand): New.
10696         (switch_conversion::~switch_conversion): New.
10697         * tree-switch-conversion.h: New file.
10699 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10701         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
10702         tree-vect-patterns.c.
10703         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
10704         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
10705         (vect_recog_sad_pattern): Likewise.
10706         (vect_recog_widen_sum_pattern): Likewise.
10707         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
10708         (vect_recog_widen_shift_pattern): Remove the type_in argument.
10709         (vect_recog_rotate_pattern): Likewise.
10710         (vect_recog_mult_pattern): Likewise.
10711         (vect_recog_vector_vector_shift_pattern): Likewise.
10712         (vect_recog_divmod_pattern): Likewise.
10713         (vect_recog_mixed_size_cond_pattern): Likewise.
10714         (vect_recog_bool_pattern): Likewise.
10715         (vect_recog_mask_conversion_pattern): Likewise.
10716         (vect_try_gather_scatter_pattern): Likewise.
10717         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
10718         (vect_recog_over_widening_pattern): Likewise.
10719         (vect_recog_gather_scatter_pattern): Likewise.
10720         (vect_recog_func_ptr): Move from tree-vectorizer.h
10721         (vect_vect_recog_func_ptrs): Move further down the file.
10722         (vect_recog_func): Likewise.  Remove the third argument.
10723         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
10724         (vect_pattern_recog_1): Expect the pattern function to do any
10725         necessary target tests.  Also expect it to provide a vector type.
10726         Remove the type_in handling.
10728 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10730         * tree-vect-patterns.c (vect_pattern_detected): New function.
10731         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
10732         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
10733         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
10734         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
10735         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10736         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10737         (vect_recog_mask_conversion_pattern)
10738         (vect_try_gather_scatter_pattern): Likewise.
10740 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10742         * tree-vect-patterns.c (vect_get_internal_def): New function.
10743         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10744         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
10745         (search_type_for_mask_1): Use it.
10747 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10749         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10750         redundant WIDEN_SUM_EXPR handling.
10751         (vect_recog_sad_pattern): Likewise.
10753 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10755         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10756         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
10757         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
10758         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
10759         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
10761 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10763         * tree-vect-stmts.c (vectorizable_call): Make sure that we
10764         use the stmt_vec_info of the original bb statement for the
10765         new zero assignment, even if the call is part of a pattern.
10767 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10769         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
10770         that the sequence is attached to the original statement rather
10771         than the pattern statement.
10772         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
10773         PATTERN_DEF_SEQ from the original statement rather than
10774         the main pattern statement.
10775         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
10776         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
10777         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
10779 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10781         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
10782         definition statements before the early exit for statements that aren't
10783         live or relevant.
10784         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
10785         split out from...
10786         (vect_transform_loop): ...here.  Process pattern definition
10787         statements without first checking whether the main pattern
10788         statement is live or relevant.
10790 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
10792         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
10793         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
10795 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
10797         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
10798         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
10799         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
10800         (expand_block_compare): Change select_block_compare_mode call.
10801         (expand_strncmp_align_check): Use new functions, fix comment.
10802         (emit_final_str_compare_gpr): New function.
10803         (expand_strn_compare): Refactor and clean up code.
10804         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
10806 2018-06-19  Tony Reix  <tony.reix@atos.com>
10807             Damien Bergamini  <damien.bergamini@atos.com>
10808             David Edelsohn  <dje.gcc@gmail.com>
10810         * collect2.c (static_obj): New variable.
10811         (static_libs): New variable.
10812         (is_in_list): Uncomment declaration.
10813         (main): Track AIX libraries linked statically.
10814         (is_in_list): Uncomment definition.
10815         (scan_prog_file): Don't add AIX shared libraries initializer
10816         to constructor list if linking statically.
10818 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
10820         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
10821         constant.
10822         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
10824 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
10826         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
10827         blocks.
10829 2018-06-19  Martin Liska  <mliska@suse.cz>
10831         * config/i386/i386.c (ix86_can_inline_p): Do not use
10832         ipa_fn_summaries::get_create.
10833         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
10834         get.
10835         (devirtualization_time_bonus): Likewise.
10836         (ipcp_propagate_stage): Likewise.
10837         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10838         (edge_set_predicate): Likewise.
10839         (evaluate_conditions_for_known_args): Likewise.
10840         (evaluate_properties_for_edge): Likewise.
10841         (ipa_call_summary::reset): Tranform to ...
10842         (ipa_call_summary::~ipa_call_summary): ... this.
10843         (ipa_fn_summary::reset): Transform to ...
10844         (ipa_fn_summary::~ipa_fn_summary): ... this.
10845         (ipa_fn_summary_t::remove): Rename to ...
10846         (ipa_fn_summary_t::remove_callees): ... this.
10847         (ipa_fn_summary_t::duplicate): Use placement new
10848         instead of memory copy.
10849         (ipa_call_summary_t::duplicate): Likewise.
10850         (ipa_call_summary_t::remove): Remove.
10851         (dump_ipa_call_summary): Change get_create to get.
10852         (ipa_dump_fn_summary): Dump only when summary exists.
10853         (analyze_function_body): Use symbol_summary::get instead
10854         of get_create.
10855         (compute_fn_summary): Likewise.
10856         (estimate_edge_devirt_benefit): Likewise.
10857         (estimate_edge_size_and_time): Likewise.
10858         (inline_update_callee_summaries): Likewise.
10859         (remap_edge_change_prob): Likewise.
10860         (remap_edge_summaries): Likewise.
10861         (ipa_merge_fn_summary_after_inlining): Likewise.
10862         (write_ipa_call_summary): Likewise.
10863         (ipa_fn_summary_write): Likewise.
10864         (ipa_free_fn_summary): Likewise.
10865         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
10866         (struct ipa_call_summary): Likewise.
10867         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
10868         of get_create.
10869         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
10870         (estimate_size_after_inlining): Likewise.
10871         (estimate_growth): Likewise.
10872         (growth_likely_positive): Likewise.
10873         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10874         (inline_call): Likewise.
10875         * ipa-inline.c (caller_growth_limits): Likewise.
10876         (can_inline_edge_p): Likewise.
10877         (can_inline_edge_by_limits_p): Likewise.
10878         (compute_uninlined_call_time): Likewise.
10879         (compute_inlined_call_time): Likewise.
10880         (want_inline_small_function_p): Likewise.
10881         (edge_badness): Likewise.
10882         (update_caller_keys): Likewise.
10883         (update_callee_keys): Likewise.
10884         (inline_small_functions): Likewise.
10885         (inline_to_all_callers_1): Likewise.
10886         (dump_overall_stats): Likewise.
10887         (early_inline_small_functions): Likewise.
10888         (early_inliner): Likewise.
10889         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
10890         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10891         * ipa-pure-const.c (malloc_candidate_p): Likewise.
10892         * ipa-split.c (execute_split_functions): Likewise.
10893         * symbol-summary.h: Likewise.
10894         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
10896 2018-06-19  Richard Biener  <rguenther@suse.de>
10898         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
10899         (vectorize_loops): ... here.  Fix dbgcnt handling.
10900         (try_vectorize_loop): Wrap try_vectorize_loop_1.
10902 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
10904         PR target/86197
10905         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
10906         ieee128 argument takes up only one (vector) register, not two (floating
10907         point) registers.
10909 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
10911         * gimplify.c (gimplify_init_constructor): Really never clear for an
10912         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
10914 2018-06-19  Richard Biener  <rguenther@suse.de>
10916         PR tree-optimization/86179
10917         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
10918         after failed recognition.
10920 2018-06-18  Martin Sebor  <msebor@redhat.com>
10922         PR middle-end/85602
10923         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
10924         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
10925         Handle integer subtraction.
10926         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
10927         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
10929 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
10931         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
10932         param from rtx to rtx_insn *.
10933         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
10934         param.
10935         (frv_ifcvt_modify_insn): Likwise.
10936         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
10937         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
10938         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
10939         as_a <rtx_insn *> cast to local "unprotected_region" once
10940         it's been established that it's not NULL or pc_rtx.
10941         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
10942         param "sethi" from rtx to rtx_insn *.
10943         (nds32_group_float_insns): Likewise for param "insn".
10944         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
10945         param.
10946         (vax_output_int_subtract): Likewise.
10947         * config/vax/vax.c (vax_output_int_add): Likewise for param
10948         "insn".
10949         (vax_output_int_subtract): Likewise.
10950         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
10951         (emit_pattern_after): Likewise for param "after".
10952         (emit_insn_after): Likewise.
10953         (emit_jump_insn_after): Likewise.
10954         (emit_call_insn_after): Likewise.
10955         (emit_debug_insn_after): Likewise.
10956         (emit_pattern_before): Likewise for param "before".
10957         (emit_insn_before): Likewise.
10958         (emit_jump_insn_before): Likewise.
10959         * final.c (get_insn_template): Likewise for param "insn", removing
10960         a cast.
10961         * output.h (get_insn_template): Likewise for 2nd param.
10962         * rtl.h (emit_insn_before): Likewise.
10963         (emit_jump_insn_before): Likewise.
10964         (emit_debug_insn_before_noloc): Likewise.
10965         (emit_insn_after): Likewise.
10966         (emit_jump_insn_after): Likewise.
10967         (emit_call_insn_after): Likewise.
10968         (emit_debug_insn_after): Likewise.
10969         (set_insn_deleted): Likewise for param.
10971 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
10973         PR target/85358
10974         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
10975         floating point modes, so that IFmode is numerically greater than
10976         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
10977         to declare the ordering.  This prevents IFmode from being
10978         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
10979         machine.  Include rs6000-modes.h to share the fractional values
10980         between genmodes* and the rest of the compiler.
10981         (IFmode): Likewise.
10982         (KFmode): Likewise.
10983         (TFmode): Likewise.
10984         * config/rs6000/rs6000-modes.h: New file.
10985         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
10986         meaning of rs6000_long_double_size so that 126..128 selects an
10987         appropriate 128-bit floating point type.
10988         (rs6000_option_override_internal): Likewise.
10989         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
10990         (TARGET_LONG_DOUBLE_128): Change the meaning of
10991         rs6000_long_double_size so that 126..128 selects an appropriate
10992         128-bit floating point type.
10993         (LONG_DOUBLE_TYPE_SIZE): Update comment.
10994         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
10995         source and destination to match the standard usage.
10996         (truncifkf2): Likewise.
10997         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
10998         ISA 2.07 to use an explicit clobber, instead of passing in a
10999         temporary.
11000         (copysign<mode>3_soft): Likewise.
11002 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
11004         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11005         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
11006         (vect_slp_analyze_instance_dependence): Likewise.
11007         (vect_enhance_data_refs_alignment): Likewise.
11008         (vect_analyze_data_refs_alignment): Likewise.
11009         (vect_slp_analyze_and_verify_instance_alignment
11010         (vect_analyze_data_ref_accesses): Likewise.
11011         (vect_prune_runtime_alias_test_list): Likewise.
11012         (vect_analyze_data_refs): Likewise.
11013         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
11014         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11015         (vect_analyze_scalar_cycles_1): Likewise.
11016         (vect_get_loop_niters): Likewise.
11017         (vect_analyze_loop_form_1): Likewise.
11018         (vect_update_vf_for_slp): Likewise.
11019         (vect_analyze_loop_operations): Likewise.
11020         (vect_analyze_loop): Likewise.
11021         (vectorizable_induction): Likewise.
11022         (vect_transform_loop): Likewise.
11023         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
11024         * tree-vect-slp.c (vect_analyze_slp): Likewise.
11025         (vect_make_slp_decision): Likewise.
11026         (vect_detect_hybrid_slp): Likewise.
11027         (vect_slp_analyze_operations): Likewise.
11028         (vect_slp_bb): Likewise.
11029         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
11030         (vectorizable_bswap): Likewise.
11031         (vectorizable_call): Likewise.
11032         (vectorizable_simd_clone_call): Likewise.
11033         (vectorizable_conversion): Likewise.
11034         (vectorizable_assignment): Likewise.
11035         (vectorizable_shift): Likewise.
11036         (vectorizable_operation): Likewise.
11037         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
11039 2018-06-18  Martin Sebor  <msebor@redhat.com>
11041         PR tree-optimization/81384
11042         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
11043         * builtins.c (expand_builtin_strnlen): New function.
11044         (expand_builtin): Call it.
11045         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
11046         * builtins.def (BUILT_IN_STRNLEN): New.
11047         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
11048         Warn for bounds in excess of maximum object size.
11049         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
11050         single-value ranges.  Handle strnlen.
11051         (handle_builtin_strlen): Handle strnlen.
11052         (strlen_check_and_optimize_stmt): Same.
11053         * doc/extend.texi (Other Builtins): Document strnlen.
11055 2018-06-18  Maya Rashish  <coypu@sdf.org>
11057         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
11058         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
11059         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
11061         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
11062         here to ...
11063         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
11065 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11067         * tree.c (escaped_string::escape): Replace cast to char * by
11068         const_cast<char *> (unescaped).
11070 2018-06-18  Nick Clifton  <nickc@redhat.com>
11072         PR 84195
11073         * tree.c (escaped_string): New class.  Converts an unescaped
11074         string into its escaped equivalent.
11075         (warn_deprecated_use): Use the new class to convert the
11076         deprecation message, if present.
11077         (test_escaped_strings): New self test.
11078         (test_c_tests): Add test_escaped_strings.
11079         * doc/extend.texi (deprecated): Add a note that the
11080         deprecation message is affected by the -fmessage-length
11081         option, and that control characters will be escaped.
11082         (#pragma GCC error): Document this pragma.
11083         (#pragma GCC warning): Likewise.
11084         * doc/invoke.texi (-fmessage-length): Document this option's
11085         effect on the #warning and #error preprocessor directives and
11086         the deprecated attribute.
11088 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11090         * tree.c (decl_value_expr_lookup): Revert latest change.
11091         (decl_value_expr_insert): Likewise.
11093 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
11095         * gimplify.c (nonlocal_vlas): Delete.
11096         (nonlocal_vla_vars): Likewise.
11097         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
11098         referenced VLAs.
11099         (gimplify_body): Do not create and destroy nonlocal_vlas.
11100         * tree-nested.c: Include diagnostic.h.
11101         (use_pointer_in_frame): Tweak.
11102         (lookup_field_for_decl): Add assertion and declare the transformation.
11103         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
11104         internal error when the reference is in a wrong context.  Do not
11105         create a debug decl by default.
11106         (note_nonlocal_block_vlas): Delete.
11107         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
11108         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
11109         create a debug decl by default.
11110         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
11111         call is in a wrong context.
11112         (fixup_vla_decls): New function.
11113         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
11114         debug variables were created.
11115         * tree.c (decl_value_expr_lookup): Add checking assertion.
11116         (decl_value_expr_insert): Likewise.
11118 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
11120         PR middle-end/82479
11121         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
11122         * tree-scalar-evolution.c (interpret_expr): Likewise.
11123         (expression_expensive_p): Likewise.
11124         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
11125         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
11126         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
11127         (ssa_defined_by_minus_one_stmt_p): New.
11129 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
11131         PR middle-end/64946
11132         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
11133         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
11134         * dojump.c (do_jump): Likewise.
11135         * expr.c (expand_expr_real_2): Check operand type's sign.
11136         * fold-const.c (const_unop): Handle ABSU_EXPR.
11137         (fold_abs_const): Likewise.
11138         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
11139         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
11140         (strip_sign_op_1): Likesise.
11141         * match.pd: Add new pattern to generate ABSU_EXPR.
11142         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
11143         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11144         * tree-eh.c (operation_could_trap_helper_p): Likewise.
11145         * tree-inline.c (estimate_operator_cost): Likewise.
11146         * tree-pretty-print.c (dump_generic_node): Likewise.
11147         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
11148         * tree.def (ABSU_EXPR): New.
11150 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
11152         PR middle-end/86095
11153         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
11154         documented as preserved for backward compatibility only.
11155         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
11157         PR rtl-optimization/86108
11158         * bb-reorder.c (create_forwarder_block): Renamed to ...
11159         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
11160         jump from new landing pad to the second part.
11161         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
11162         Adjust callers.
11164 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
11166         PR middle-end/85878
11167         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
11168         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
11169         Only call store_expr for halves if the mode is the same.
11171         PR middle-end/86123
11172         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
11173         Fix up comment formatting.
11175 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11177         * typed-splay-tree.h (typed_splay_tree::remove): New function.
11178         (typed_splay_tree::closure,
11179         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
11180         (typed_splay_tree::typed_splay_tree,
11181         typed_splay_tree::operator =): Declared private.
11182         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
11183         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
11184         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
11185         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
11186         typed_splay_tree::splay_tree_splay,
11187         typed_splay_tree::splay_tree_foreach_helper,
11188         typed_splay_tree::splay_tree_insert,
11189         typed_splay_tree::splay_tree_remove,
11190         typed_splay_tree::splay_tree_lookup,
11191         typed_splay_tree::splay_tree_predecessor,
11192         typed_splay_tree::splay_tree_successor,
11193         typed_splay_tree::splay_tree_min,
11194         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
11195         (typed_splay_tree::root, typed_splay_tree::comp,
11196         typed_splay_tree::delete_key,
11197         typed_splay_tree::delete_value): New data members.
11198         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
11199         typed_splay_tree::remove.
11201 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
11203         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
11204         -mginv and -mno-ginv to the assembler.
11205         * config/mips/mips.opt (-mcrc): New option.
11206         (-mginv): Likewise.
11207         * doc/invoke.text (-mcrc): Document.
11208         (-mginv): Likewise.
11210 2018-06-15  Nick Clifton  <nickc@redhat.com>
11212         PR 84195
11213         * tree.c (escaped_string): New class.  Converts an unescaped
11214         string into its escaped equivalent.
11215         (warn_deprecated_use): Use the new class to convert the
11216         deprecation message, if present.
11217         (test_escaped_strings): New self test.
11218         (test_c_tests): Add test_escaped_strings.
11219         * doc/extend.texi (deprecated): Add a note that the
11220         deprecation message is affected by the -fmessage-length
11221         option, and that control characters will be escaped.
11222         (#pragma GCC error): Document this pragma.
11223         (#pragma GCC warning): Likewise.
11224         * doc/invoke.texi (-fmessage-length): Document this option's
11225         effect on the #warning and #error preprocessor directives and
11226         the deprecated attribute.
11228 2018-06-15  Richard Biener  <rguenther@suse.de>
11230         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
11231         here, also noting vector size used.
11232         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
11233         size used in MSG_OPTIMIZED_LOCATIONS dump.
11234         (pass_slp_vectorize::execute): Adjust.
11236 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
11238         PR target/85968
11239         * config/arc/arc.c (arc_return_address_register): Fix
11240         if-condition.
11242 2018-06-15  Richard Biener  <rguenther@suse.de>
11244         PR middle-end/86159
11245         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
11246         leave useless conversion stripping to force_gimple_operand_gsi.
11247         (gimplify_build2): Likewise.
11248         (gimplify_build1): Likewise.
11250 2018-06-15  Richard Biener  <rguenther@suse.de>
11252         PR middle-end/86076
11253         * tree-cfg.c (move_stmt_op): unshare invariant addresses
11254         before adjusting their block.
11256 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11258         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
11259         multilibs for *-*-rtems*.
11260         * config/riscv/t-rtems: New file.
11262 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
11264         PR middle-end/86122
11265         * match.pd ((A +- CST1) +- CST2): Punt if last resort
11266         unsigned_type_for returns NULL.
11268         PR target/85945
11269         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
11270         subregs of multi-word pseudos unless the float mode has word size.
11272 2018-06-14  Richard Biener  <rguenther@suse.de>
11274         PR middle-end/86139
11275         * tree-vect-generic.c (build_word_mode_vector_type): Remove
11276         duplicate and harmful type_hash_canon.
11277         * tree.c (type_hash_canon): Assert we didn't find ourselves.
11279 2018-06-14  Richard Biener  <rguenther@suse.de>
11281         PR ipa/86124
11282         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
11283         NULL cgraph_node.
11285 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11287         * config/rtems.h (STDINT_LONG32): Define.
11289 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
11290             Prachi Godbole  <prachi.godbole@imgtec.com>
11292         * config/mips/mips-cpus.def: Define P6600.
11293         * config/mips/mips-tables.opt: Regenerate.
11294         * config/mips/mips.c (mips_ucbranch_type): New enum.
11295         (mips_rtx_cost_data): Add support for P6600.
11296         (mips_issue_rate): Likewise.
11297         (mips_multipass_dfa_lookahead): Likewise.
11298         (mips_avoid_hazard): Likewise.
11299         (mips_reorg_process_insns): Likewise.
11300         (mips_classify_branch_p6600): New function.
11301         * config/mips/mips.h (TUNE_P6600): New define.
11302         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
11303         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
11304         * config/mips/mips.md: Include p6600.md.
11305         (processor): Add p6600.
11306         * config/mips/p6600.md: New file.
11307         * doc/invoke.texi: Add p6600 to supported architectures.
11309 2018-06-13  Martin Sebor  <msebor@redhat.com>
11311         PR tree-optimization/86114
11312         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
11313         of integer types.
11314         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
11316 2018-06-13  Richard Biener  <rguenther@suse.de>
11318         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
11319         Properly set vector type of the intermediate stmt.
11320         * tree-vect-stmts.c (vectorizable_operation): The destination
11321         var always has vectype_out type.
11323 2018-06-13  Jeff Law  <law@redhat.com>
11325         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
11326         integer 0 for argument to print_rtl_with_bb.
11327         (rl78_reorg): Likewise.
11329 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
11331         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
11332         from rtx to rtx_insn *.
11333         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
11334         "label".
11335         (add_sched_insns_for_speculation): Likewise for local "target",
11336         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11337         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
11338         from rtx_insn ** to rtx_code_label **.
11339         (reorg_emit_nops): Likewise.
11340         (c6x_reorg): Likewise for local "call_labels".
11341         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
11342         rtx to rtx_insn *.
11343         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
11344         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
11345         the loops over LABEL_REFS.
11346         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
11347         braf_label.
11348         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11349         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
11350         (split_branches): Strengthen local "olabel" from rtx to
11351         rtx_insn *, adding a safe_as_a cast.
11352         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
11353         to "rtx_insn *".
11354         (add_insn_after): Likewise for first two params.
11355         (add_insn_before): Likewise.
11356         (remove_insn): Likewise for param.
11357         (emit_pattern_before_noloc): Likewise for second and third params.
11358         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
11359         (emit_call_insn_before_noloc): Likewise.
11360         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
11361         to "rtx_insn *".
11362         (emit_barrier_before): Likewise.
11363         (emit_label_before): Strengthen "label" param from "rtx" to
11364         "rtx_code_label *".  Strengthen "before" param from "rtx" to
11365         "rtx_insn *".
11366         (emit_insn_after_1): Strengthen "after" param from "rtx" to
11367         "rtx_insn *".
11368         (emit_pattern_after_noloc): Likewise.
11369         (emit_insn_after_noloc): Likewise.
11370         (emit_jump_insn_after_noloc): Likewise.
11371         (emit_call_insn_after_noloc): Likewise.
11372         (emit_debug_insn_after_noloc): Likewise.
11373         (emit_barrier_after): Likewise.
11374         (emit_label_after): Likewise for both params.
11375         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
11376         "loc" param from "int" to "location_t".
11377         (emit_insn_after_setloc): Likewise.
11378         (emit_jump_insn_after_setloc): Likewise.
11379         (emit_call_insn_after_setloc): Likewise.
11380         (emit_debug_insn_after_setloc): Likewise.
11381         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
11382         "loc" param from "int" to "location_t".
11383         (emit_pattern_before): Convert NULL_RTX to NULL.
11384         (emit_insn_before_setloc): Convert "loc" param from "int" to
11385         "location_t".
11386         (emit_jump_insn_before_setloc): Likewise.
11387         (emit_call_insn_before_setloc): Likewise.
11388         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
11389         rtx_insn *.  Convert "loc" param from "int" to "location_t".
11390         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
11391         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
11392         Convert 3rd param from "int" to "location_t".
11393         (emit_barrier_before, emit_barrier_after, next_real_insn):
11394         Strengthen param from rtx to rtx_insn *.
11395         (emit_label_before): Strengthen 1st param from "rtx" to
11396         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
11397         "rtx_insn *".
11398         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
11399         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
11400         Strengthen 2nd param from "rtx" to "rtx_insn *".
11401         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
11402         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
11403         Likewise. Convert 3rd param from "int" to "location_t".
11404         (emit_label_after): Strengthen 1st param from "rtx" to
11405         "rtx_code_label *".
11406         (next_real_insn, remove_insn): Strengthen param from "rtx" to
11407         "rtx_insn *".
11408         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
11409         from "rtx" to "rtx_insn *".
11411 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
11413         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
11414         bodies streamed in with -Q.
11415         * dumpfile.c (dump_files): Add lto-stream-out dump file.
11416         * dumpfile.h (tree_dump_index): Add lto_stream_out.
11417         * gimple-streamer-out.c: Include gimple-pretty-print.h
11418         (output_bb): Dump stmts streamed.
11419         * lto-section-out.c: Include print-tree.h
11420         (lto_begin_section): Dump sections created.
11421         (lto_output_decl_index): Dump decl encoded.
11422         * lto-streamer-out.c: Include print-tree.h
11423         (create_output_block): Dump output block created.
11424         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
11425         (output_function): Dump function output.
11426         (output_constructor): Dump constructor streamed.
11427         (write_global_stream): Output indexes encoded.
11428         (produce_asm_for_decls): Dump streams encoded.
11429         * lto-streamer.c (streamer_dump_file): New global var.
11430         * lto-streamer.h (streamer_dump_file): Declare.
11431         * passes.c (ipa_write_summaries): Initialize streamer dump.
11432         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
11433         in.
11435 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
11437         PR target/86048
11438         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
11439         offsets for register save directives.  Emit a second batch of save
11440         directives, if need be, when the function accesses prior frames.
11442 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11444         * config/arc/fpu.md (fmasf4): Force operand to register.
11445         (fnmasf4): Likewise.
11447 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11449         * config/arc/arc-protos.h (arc_pad_return): Remove.
11450         * config/arc/arc.c (machine_function): Remove force_short_suffix
11451         and size_reason.
11452         (arc_print_operand): Adjust printing of '&'.
11453         (arc_verify_short): Remove conditional printing of short suffix.
11454         (arc_final_prescan_insn): Remove reference to size_reason.
11455         (pad_return): New function.
11456         (arc_reorg): Call pad_return.
11457         (arc_pad_return): Remove.
11458         (arc_init_machine_status): Remove reference to force_short_suffix.
11459         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
11460         (attr length): When attribute iscompact is true force to 2
11461         regardless; in the case of maybe check if we want to force the
11462         instruction to have 4 bytes length.
11463         (nopv): Change it to generate 4 byte long nop as well.
11464         (blockage): New pattern.
11465         (simple_return): Remove call to arc_pad_return.
11466         (p_return_i): Likewise.
11468 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11470         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
11472 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11474         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
11475         ARC cores.
11477 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11479         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
11480         for ARC700 and ARCv2.
11482 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
11484         PR target/86076
11485         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
11486         operands[2] instead of operands[1].
11489 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
11491         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
11492         case, check whether the outer register overlaps an unallocatable
11493         register, not just whether it fits the required class.
11495 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
11497         * poly-int.h (can_div_trunc_p): Add new overload in which all values
11498         are poly_ints.
11499         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
11500         (memrefs_conflict_p): Likewise.
11501         (init_alias_analysis): Likewise.
11502         * cfgexpand.c (expand_debug_expr): Likewise.
11503         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
11504         * cse.c (fold_rtx): Likewise.
11505         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
11506         * expr.c (emit_block_move_hints): Likewise.
11507         (clear_storage_hints, push_block, emit_push_insn): Likewise.
11508         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
11509         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
11510         (emit_group_store): Likewise.
11511         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
11512         to read the PRE/POST_MODIFY increment.
11513         * calls.c (store_one_arg): Use strip_offset.
11514         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
11515         poly_int_rtx_p.
11516         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
11517         by a VEC_SELECT.
11518         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
11519         (simplify_binary_operation_1): Extend CONST_INT handling to
11520         poly_int_rtx_p.
11521         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
11522         than a HOST_WIDE_INT.
11523         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
11524         poly_int64.
11525         (adjust_mems, add_stores): Update accodingly.
11526         (vt_canonicalize_addr): Track polynomial offsets.
11527         (emit_note_insn_var_location): Likewise.
11528         (vt_add_function_parameter): Likewise.
11529         (vt_initialize): Likewise.
11531 2018-06-12  Jeff Law  <law@redhat.com>
11533         * config.gcc (alpha*-*-freebsd*): Remove.
11534         * config/alpha/freebsd.h: Remove.
11536 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
11538         PR other/69968
11539         * spellcheck-tree.c (levenshtein_distance): Rename to...
11540         (get_edit_distance): ...this, and update for underlying renaming.
11541         * spellcheck-tree.h (levenshtein_distance): Rename to...
11542         (get_edit_distance): ...this.
11543         * spellcheck.c (levenshtein_distance): Rename to...
11544         (get_edit_distance): ...this.  Convert from Levenshtein distance
11545         to Damerau-Levenshtein distance by supporting transpositions of
11546         adjacent characters.  Rename "v1" to "v_next" and "v0" to
11547         "v_one_ago".
11548         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
11549         (selftest::test_edit_distance_unit_test_oneway): ...this, and
11550         update for underlying renaming.
11551         (selftest::levenshtein_distance_unit_test): Rename to...
11552         (selftest::test_get_edit_distance_unit): ...this, and update for
11553         underlying renaming.
11554         (selftest::test_find_closest_string): Add example from PR 69968
11555         where transposition helps
11556         (selftest::test_metric_conditions): Update for renaming.
11557         (selftest::test_metric_conditions): Likewise.
11558         (selftest::spellcheck_c_tests): Likewise.
11559         * spellcheck.h (levenshtein_distance): Rename both overloads to...
11560         (get_edit_distance): ...this.
11561         (best_match::consider): Update for renaming.
11563 2018-06-12  Martin Sebor  <msebor@redhat.com>
11565         PR tree-optimization/85259
11566         * builtins.c (compute_objsize): Handle constant offsets.
11567         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
11568         true iff a warning has been issued.
11569         * gimple.h (gimple_nonartificial_location): New function.
11570         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
11571         gimple_nonartificial_location and handle -Wno-system-headers.
11572         (handle_builtin_stxncpy): Same.
11574 2018-06-12  Martin Sebor  <msebor@redhat.com>
11576         PR c/85931
11577         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
11579 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
11581         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
11582         BUILTIN_VEC_XST entries for pointer to double and long long.
11584 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
11586         PR target/85990
11587         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11588         Update comments.
11589         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11590         Likewise.
11592 2018-06-12  Martin Liska  <mliska@suse.cz>
11594         * doc/options.texi: Document IntegerRange.
11596 2018-06-12  Martin Liska  <mliska@suse.cz>
11598         * config/i386/i386.opt: Make MPX-related options as Deprecated.
11599         * opt-functions.awk: Handle Deprecated flag.
11600         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
11601         and report error.
11602         (read_cmdline_option): Report warning for a deprecated option.
11603         * opts.h (struct cl_option): Add new field cl_deprecated.
11604         (CL_ERR_DEPRECATED): New.
11606 2018-06-12  Martin Liska  <mliska@suse.cz>
11608         * doc/options.texi: Document Deprecated option flag.
11610 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11612         * config/arc/arc-arch.h (arc_extras): New enum.
11613         (arc_cpu_t):Add field extra.
11614         (arc_cpu_types): Consider the extras.
11615         * config/arc/arc-cpus.def: Add extras info.
11616         * config/arc/arc-opts.h (processor_type): Consider extra field.
11617         * config/arc/arc.c (arc_override_options): Handle extra field.
11619 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11621         * config/arc/arc-arch.h: Update ARC_OPTX macro.
11622         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
11623         field.
11624         * config/arc/arc.c (arc_init): Update pic warning.
11625         (irq_range): Update irq range parsing warnings.
11626         (arc_override_options): Update various warning messages.
11627         (arc_handle_aux_attribute): Likewise.
11629 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
11631         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
11633 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11635         * doc/sourcebuild.texi: Document usage of line number 0 in verify
11636         compiler messages directives.
11638 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
11640         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
11641         * config/mips/mips-tables.opt: Regenerate.
11642         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
11643         mips64r6.
11644         * doc/invoke.texi: Document -march=i6500.
11646 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
11648         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
11649         (i6400_gpmul): Add cpu_unit.
11650         (i6400_gpdiv): Likewise.
11651         (i6400_msa_add_d): Update reservations.
11652         (i6400_msa_int_add) Likewise.
11653         (i6400_msa_short_logic3) Likewise.
11654         (i6400_msa_short_logic2) Likewise.
11655         (i6400_msa_short_logic) Likewise.
11656         (i6400_msa_move) Likewise.
11657         (i6400_msa_cmp) Likewise.
11658         (i6400_msa_short_float2) Likewise.
11659         (i6400_msa_div_d) Likewise.
11660         (i6400_msa_long_logic1) Likewise.
11661         (i6400_msa_long_logic2) Likewise.
11662         (i6400_msa_mult) Likewise.
11663         (i6400_msa_long_float2) Likewise.
11664         (i6400_msa_long_float4) Likewise.
11665         (i6400_msa_long_float5) Likewise.
11666         (i6400_msa_long_float8) Likewise.
11667         (i6400_fpu_fadd): Include frint type.
11668         (i6400_fpu_store): New define_insn_reservation.
11669         (i6400_fpu_load): Likewise.
11670         (i6400_fpu_move): Likewise.
11671         (i6400_fpu_fcmp): Likewise.
11672         (i6400_fpu_fmadd): Likewise.
11673         (i6400_int_mult): Include imul3nc type and update reservation.
11674         (i6400_int_div): Include idiv3 type and update reservation.
11675         (i6400_int_load): Update to check type not move_type.
11676         (i6400_int_store): Likewise.
11677         (i6400_int_prefetch): Set zero latency.
11679 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
11681         * gcc.c: Document new %@{...} sequence.
11682         (LINK_COMMAND_SPEC): Use it for the -L switches.
11683         (cpp_unique_options): Use it for the -I switches.
11684         (at_file_argbuf): New global variable.
11685         (in_at_file): Likewise.
11686         (alloc_args): Create at_file_argbuf.
11687         (clear_args): Truncate at_file_argbuf.
11688         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
11689         (open_at_file): New function.
11690         (close_at_file): Likewise.
11691         (create_at_file): Delete.
11692         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
11693         <'o'>: Likewise.
11694         <'@'>: New case.
11695         (validate_switches_from_spec): Deal with %@{...} sequence.
11696         (validate_switches): Likewise.
11697         (driver::finalize): Call clear_args.
11699 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
11701         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
11703 2018-06-11  Martin Sebor  <msebor@redhat.com>
11705         * doc/invoke.texi (-Wall): List -Wc++17-compat.
11706         (Wno-class-memaccess): Add @opindex.
11707         (Wno-templates, Wno-multiple-inheritance): Same.
11708         (Wno-virtual-inheritance, Wno-namespaces): Same.
11709         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
11710         (Wno-format-overflow, Wno-format-truncation): Same.
11711         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
11712         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
11713         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
11714         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
11715         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
11716         (Wno-misspelled-isr): Same.
11718 2018-06-11  Martin Sebor  <msebor@redhat.com>
11720         * PR tree-optimization/86083
11721         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
11723 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
11725         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
11727 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
11729         PR target/85755
11730         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
11731         on the correct operand.
11732         (*movdi_internal64): Ditto.
11734 2018-06-11  Martin Liska  <mliska@suse.cz>
11736         PR tree-optimization/86089
11737         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
11739 2018-06-11  Julia Koval  <julia.koval@intel.com>
11741         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
11742         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
11743         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
11745 2018-06-11  Olivier Hainque  <hainque@adacore.com>
11747         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
11748         for Ada with strict dwarf2.
11750 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
11752         PR target/85755
11753         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
11754         addresses.
11756 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
11758         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
11760 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
11762         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
11763         TARGET_ELF.
11765 2018-06-08  Martin Liska  <mliska@suse.cz>
11767         * tree-cfg.h (debug_function): Fix argument type to match
11768         implementation.
11770 2018-06-08  Martin Liska  <mliska@suse.cz>
11772         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
11773         Remove usage of MPX-related (and removed) fields.
11774         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
11776 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
11778         * cfg.c (debug): Use TDF_NONE rather than 0.
11779         * cfghooks.c (debug): Likewise.
11780         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
11781         (struct dump_option_value_info): Convert to...
11782         (struct kv_pair): ...this template type.
11783         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
11784         rather than 0.
11785         (optinfo_verbosity_options): Likewise.
11786         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
11787         OPTGROUP_NONE.
11788         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
11789         than int for "optgroup_flags" param.
11790         (dump_generic_expr_loc): Use dump_flags_t rather than int for
11791         "dump_kind" param.
11792         (dump_dec): Likewise.
11793         (dump_finish): Use TDF_NONE rather than 0.
11794         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
11795         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
11796         than 0.  Update for change to option_ptr.
11797         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
11798         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
11799         0.  Update for changes to optinfo_verbosity_options and
11800         optgroup_options.
11801         (opt_info_switch_p): Convert optgroup_flags from int to
11802         optgroup_flags_t.
11803         (dump_basic_block): Use dump_flags_t rather than int
11804         for "dump_kind" param.
11805         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
11806         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
11807         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
11808         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
11809         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
11810         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
11811         TDF_NONE): Convert from macros to...
11812         (enum dump_flag): ...this new enum.
11813         (dump_flags_t): Update to use enum.
11814         (operator|, operator&, operator~, operator|=, operator&=):
11815         Implement for dump_flags_t.
11816         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
11817         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
11818         Convert from macros to...
11819         (enum optgroup_flag): ...this new enum.
11820         (optgroup_flags_t): New typedef.
11821         (operator|, operator|=): Implement for optgroup_flags_t.
11822         (struct dump_file_info): Convert field "alt_flags" to
11823         dump_flags_t.  Convert field "optgroup_flags" to
11824         optgroup_flags_t.
11825         (dump_basic_block): Use dump_flags_t rather than int for param.
11826         (dump_generic_expr_loc): Likewise.
11827         (dump_dec): Likewise.
11828         (dump_register): Convert param "optgroup_flags" to
11829         optgroup_flags_t.
11830         (opt_info_enable_passes): Likewise.
11831         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
11832         than 0.
11833         * gimple-pretty-print.c (debug): Likewise.
11834         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
11835         (merged_store_group::apply_stores): Likewise.
11836         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
11837         * gimple.c (verify_gimple_pp): Likewise.
11838         * graphite-poly.c (print_pbb_body): Likewise.
11839         * passes.c (pass_manager::register_one_dump_file): Convert
11840         local "optgroup_flags" to optgroup_flags_t.
11841         * print-tree.c (print_node): Use TDF_NONE rather than 0.
11842         (debug): Likewise.
11843         (debug_body): Likewise.
11844         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
11845         to optgroup_flags_t.
11846         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
11847         than 0.
11848         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
11849         (convert_mult_to_fma): Likewise.
11850         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
11851         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
11852         * tree-vect-data-refs.c (dump_lower_bound): Convert param
11853         "dump_kind" to dump_flags_t.
11855 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
11857         * config/rs6000/rs6000.c (min, max): Delete.
11859 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
11861         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
11862         -mabi=spe and -mabi=no-spe.
11864 2018-06-08  Martin Liska  <mliska@suse.cz>
11866         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
11867         where we expect an existing summary.
11869 2018-06-08  Martin Liska  <mliska@suse.cz>
11871         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
11872         * ipa-inline.h (estimate_edge_growth): Likewise.
11874 2018-06-08  Martin Liska  <mliska@suse.cz>
11876         * cgraph.c (function_version_hasher::hash): Use
11877         cgraph_node::get_uid ().
11878         (function_version_hasher::equal):
11879         * cgraph.h (cgraph_node::get_uid): New method.
11880         * ipa-inline.c (update_caller_keys): Use
11881         cgraph_node::get_uid ().
11882         (update_callee_keys): Likewise.
11883         * ipa-utils.c (searchc): Likewise.
11884         (ipa_reduced_postorder): Likewise.
11885         * lto-cgraph.c (input_node): Likewise.
11886         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
11887         * symbol-summary.h (symtab_insertion): Likewise.
11888         (symtab_removal): Likewise.
11889         (symtab_duplication): Likewise.
11890         * tree-pretty-print.c (dump_function_header): Likewise.
11891         * tree-sra.c (convert_callers_for_node): Likewise.
11893 2018-06-08  Martin Liska  <mliska@suse.cz>
11895         * cgraph.c (symbol_table::create_edge): Always assign a new
11896         unique number.
11897         (symbol_table::free_edge): Do not recycle numbers.
11898         * cgraph.h (cgraph_edge::get): New method.
11899         * symbol-summary.h (symtab_removal): Use it.
11900         (symtab_duplication): Likewise.
11901         (call_summary::hashable_uid): Remove.
11903 2018-06-08  Martin Liska  <mliska@suse.cz>
11905         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
11906         (initialize_growth_caches): Remove.
11907         (free_growth_caches): Likewise.
11908         (do_estimate_edge_time): Use edge_growth_cache.
11909         (do_estimate_edge_size): Likewise.
11910         (do_estimate_edge_hints): Likewise.
11911         * ipa-inline.c (reset_edge_caches): Likewise.
11912         (recursive_inlining): Likewise.
11913         (inline_small_functions): Likewise.
11914         * ipa-inline.h (initialize_growth_caches): Remove.
11915         (estimate_edge_size): Likewise.
11916         (estimate_edge_time): Likewise.
11917         (estimate_edge_hints): Likewise.
11918         (reset_edge_growth_cache): Likewise.
11919         * symbol-summary.h (call_summary::remove): New method.
11921 2018-06-08  Martin Liska  <mliska@suse.cz>
11923         * ipa-cp.c (class edge_clone_summary): New summary.
11924         (grow_edge_clone_vectors): Remove.
11925         (ipcp_edge_duplication_hook): Remove.
11926         (class edge_clone_summary_t): New call_summary class.
11927         (ipcp_edge_removal_hook): Remove.
11928         (edge_clone_summary_t::duplicate): New function.
11929         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
11930         (create_specialized_node): Likewise.
11931         (ipcp_driver): Initialize edge_clone_summaries and do not
11932         register hooks.
11934 2018-06-08  Martin Liska  <mliska@suse.cz>
11936         * symbol-summary.h (get): New function.
11937         (call_summary::m_initialize_when_cloning): New class member.
11939 2018-06-08  Martin Liska  <mliska@suse.cz>
11941         * cgraph.c (cgraph_node::remove): Do not recycle uid.
11942         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
11943         (symbol_table::allocate_cgraph_symbol): Do not set uid.
11944         * passes.c (uid_hash_t): Record removed_nodes by their uids.
11945         (remove_cgraph_node_from_order): Use the removed_nodes set.
11946         (do_per_function_toporder): Likwise.
11947         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
11948         instead of summary_uid.
11949         (symtab_removal): Likewise.
11950         (symtab_duplication): Likewise.
11952 2018-06-08  Martin Liska  <mliska@suse.cz>
11954         * ipa-cp.c (ipcp_store_bits_results): Use
11955         ipcp_transformation_sum.
11956         (ipcp_store_vr_results): Likewise.
11957         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
11958         to ...
11959         (ipcp_transformation_initialize): ... this.
11960         (ipa_set_node_agg_value_chain):
11961         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
11962         (write_ipcp_transformation_info): Likewise.
11963         (read_ipcp_transformation_info): Likewise.
11964         (ipcp_update_bits): Likewise.
11965         (ipcp_update_vr): Likewise.
11966         (ipcp_transform_function): Likewise.
11967         * ipa-prop.h: Rename ipcp_transformation_summary to
11968         ipcp_transformation.
11969         (class ipcp_transformation_t): New function summary.
11970         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
11971         (ipa_get_agg_replacements_for_node): Likewise.
11973 2018-06-08  Martin Liska  <mliska@suse.cz>
11975         * ipa-pure-const.c (struct funct_state_d): Do it class instead
11976         of struct.
11977         (class funct_state_summary_t): New function_summary class.
11978         (has_function_state): Remove.
11979         (get_function_state): Likewise.
11980         (set_function_state): Likewise.
11981         (add_new_function): Likewise.
11982         (funct_state_summary_t::insert): New function.
11983         (duplicate_node_data): Remove.
11984         (remove_node_data): Remove.
11985         (funct_state_summary_t::duplicate): New function.
11986         (register_hooks): Create new funct_state_summaries.
11987         (pure_const_generate_summary): Use it.
11988         (pure_const_write_summary): Likewise.
11989         (pure_const_read_summary): Likewise.
11990         (propagate_pure_const): Likewise.
11991         (propagate_nothrow): Likewise.
11992         (dump_malloc_lattice): Likewise.
11993         (propagate_malloc): Likewise.
11994         (execute): Do not register hooks, just remove summary
11995         instead.
11996         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
11997         constructor.
11999 2018-06-08  Martin Liska  <mliska@suse.cz>
12001         * ipa-reference.c (remove_node_data): Remove.
12002         (duplicate_node_data): Likewise.
12003         (class ipa_ref_var_info_summary_t): New class.
12004         (class ipa_ref_opt_summary_t): Likewise.
12005         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
12006         (get_reference_optimization_summary): Use
12007         ipa_ref_opt_sum_summaries.
12008         (set_reference_vars_info): Remove.
12009         (set_reference_optimization_summary): Likewise.
12010         (ipa_init): Create summaries.
12011         (init_function_info): Use function summary.
12012         (ipa_ref_opt_summary_t::duplicate): New function.
12013         (ipa_ref_opt_summary_t::remove): New function.
12014         (get_read_write_all_from_node): Fix GNU coding style.
12015         (propagate): Use function summary.
12016         (write_node_summary_p): Fix GNU coding style.
12017         (stream_out_bitmap): Likewise.
12018         (ipa_reference_read_optimization_summary): Use function summary.
12019         (ipa_reference_c_finalize): Do not release hooks.
12021 2018-06-08  Martin Liska  <mliska@suse.cz>
12023         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
12024         (analyze_function_body): Extract multiple calls of get_create.
12025         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12026         * ipa-inline.c (recursive_inlining): Use ::get method.
12027         * ipa-inline.h (estimate_edge_growth): Likewise.
12029 2018-06-08  Martin Liska  <mliska@suse.cz>
12031         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
12032         HSA_INVALID.
12033         (hsa_function_summary::hsa_function_summary): Use the new enum
12034         value.
12035         (hsa_gpu_implementation_p): Use hsa_summaries::get.
12036         * hsa-gen.c (hsa_get_host_function): Likewise.
12037         (get_brig_function_name): Likewise.
12038         * ipa-hsa.c (process_hsa_functions): Likewise.
12039         (ipa_hsa_write_summary): Likewise.
12040         * symbol-summary.h (symtab_duplication): Use ::get function/
12041         (get): New function.
12043 2018-06-08  Martin Liska  <mliska@suse.cz>
12045         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
12046         of get.
12047         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
12048         (hsa_register_kernel): Likewise.
12049         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
12050         * hsa-gen.c (hsa_get_host_function): Likewise.
12051         (get_brig_function_name): Likewise.
12052         (generate_hsa): Likewise.
12053         (pass_gen_hsail::execute): Likewise.
12054         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
12055         (devirtualization_time_bonus): Likewise.
12056         (ipcp_propagate_stage): Likewise.
12057         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12058         (edge_set_predicate): Likewise.
12059         (evaluate_conditions_for_known_args): Likewise.
12060         (evaluate_properties_for_edge): Likewise.
12061         (ipa_fn_summary::reset): Likewise.
12062         (ipa_fn_summary_t::duplicate): Likewise.
12063         (dump_ipa_call_summary): Likewise.
12064         (ipa_dump_fn_summary): Likewise.
12065         (analyze_function_body): Likewise.
12066         (compute_fn_summary): Likewise.
12067         (estimate_edge_devirt_benefit): Likewise.
12068         (estimate_edge_size_and_time): Likewise.
12069         (estimate_calls_size_and_time): Likewise.
12070         (estimate_node_size_and_time): Likewise.
12071         (inline_update_callee_summaries): Likewise.
12072         (remap_edge_change_prob): Likewise.
12073         (remap_edge_summaries): Likewise.
12074         (ipa_merge_fn_summary_after_inlining): Likewise.
12075         (ipa_update_overall_fn_summary): Likewise.
12076         (read_ipa_call_summary): Likewise.
12077         (inline_read_section): Likewise.
12078         (write_ipa_call_summary): Likewise.
12079         (ipa_fn_summary_write): Likewise.
12080         (ipa_free_fn_summary): Likewise.
12081         * ipa-hsa.c (process_hsa_functions): Likewise.
12082         (ipa_hsa_write_summary): Likewise.
12083         (ipa_hsa_read_section): Likewise.
12084         * ipa-icf.c (sem_function::merge): Likewise.
12085         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12086         (do_estimate_edge_time): Likewise.
12087         (estimate_size_after_inlining): Likewise.
12088         (estimate_growth): Likewise.
12089         (growth_likely_positive): Likewise.
12090         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12091         (inline_call): Likewise.
12092         * ipa-inline.c (caller_growth_limits): Likewise.
12093         (can_inline_edge_p): Likewise.
12094         (can_inline_edge_by_limits_p): Likewise.
12095         (compute_uninlined_call_time): Likewise.
12096         (compute_inlined_call_time): Likewise.
12097         (want_inline_small_function_p): Likewise.
12098         (edge_badness): Likewise.
12099         (update_caller_keys): Likewise.
12100         (update_callee_keys): Likewise.
12101         (recursive_inlining): Likewise.
12102         (inline_small_functions): Likewise.
12103         (inline_to_all_callers_1): Likewise.
12104         (dump_overall_stats): Likewise.
12105         (early_inline_small_functions): Likewise.
12106         (early_inliner): Likewise.
12107         * ipa-inline.h (estimate_edge_growth): Likewise.
12108         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12109         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12110         * ipa-prop.h (IPA_NODE_REF): Likewise.
12111         (IPA_EDGE_REF): Likewise.
12112         * ipa-pure-const.c (malloc_candidate_p): Likewise.
12113         (propagate_malloc): Likewise.
12114         * ipa-split.c (execute_split_functions): Likewise.
12115         * symbol-summary.h: Rename get to get_create.
12116         (get): Likewise.
12117         (get_create): Likewise.
12118         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12120 2018-06-08  Martin Liska  <mliska@suse.cz>
12122         * symbol-summary.h (release): Move definition out of class
12123         declaration.
12124         (symtab_removal): Likewise.
12125         (symtab_duplication): Likewise.
12127 2018-06-08  Martin Liska  <mliska@suse.cz>
12129         * symbol-summary.h (function_summary): Move constructor
12130         implementation out of class declaration.
12131         (release): Likewise.
12132         (symtab_insertion): Likewise.
12133         (symtab_removal): Likewise.
12134         (symtab_duplication): Likewise.
12135         (get): Likewise.
12137 2018-06-08  Martin Liska  <mliska@suse.cz>
12139         * Makefile.in: Remove support for MPX (macros, related functions,
12140         fields in cgraph_node, ...).
12141         * builtin-types.def (BT_BND): Likewise.
12142         (BT_FN_BND_CONST_PTR): Likewise.
12143         (BT_FN_CONST_PTR_BND): Likewise.
12144         (BT_FN_VOID_PTR_BND): Likewise.
12145         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
12146         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
12147         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
12148         (expand_builtin_mempcpy_with_bounds): Likewise.
12149         (expand_builtin_memset_with_bounds): Likewise.
12150         (expand_builtin_memset_args): Likewise.
12151         (std_expand_builtin_va_start): Likewise.
12152         (expand_builtin): Likewise.
12153         (expand_builtin_with_bounds): Likewise.
12154         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
12155         (DEF_LIB_BUILTIN_CHKP): Likewise.
12156         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
12157         (DEF_CHKP_BUILTIN): Likewise.
12158         (BUILT_IN_MEMCPY): Likewise.
12159         (BUILT_IN_MEMMOVE): Likewise.
12160         (BUILT_IN_MEMPCPY): Likewise.
12161         (BUILT_IN_MEMSET): Likewise.
12162         (BUILT_IN_STPCPY): Likewise.
12163         (BUILT_IN_STRCAT): Likewise.
12164         (BUILT_IN_STRCHR): Likewise.
12165         (BUILT_IN_STRCPY): Likewise.
12166         (BUILT_IN_STRLEN): Likewise.
12167         (BUILT_IN_MEMCPY_CHK): Likewise.
12168         (BUILT_IN_MEMMOVE_CHK): Likewise.
12169         (BUILT_IN_MEMPCPY_CHK): Likewise.
12170         (BUILT_IN_MEMSET_CHK): Likewise.
12171         (BUILT_IN_STPCPY_CHK): Likewise.
12172         (BUILT_IN_STRCAT_CHK): Likewise.
12173         (BUILT_IN_STRCPY_CHK): Likewise.
12174         * calls.c (store_bounds): Likewise.
12175         (emit_call_1): Likewise.
12176         (special_function_p): Likewise.
12177         (maybe_warn_nonstring_arg): Likewise.
12178         (initialize_argument_information): Likewise.
12179         (finalize_must_preallocate): Likewise.
12180         (compute_argument_addresses): Likewise.
12181         (expand_call): Likewise.
12182         * cfgexpand.c (expand_call_stmt): Likewise.
12183         (expand_return): Likewise.
12184         (expand_gimple_stmt_1): Likewise.
12185         (pass_expand::execute): Likewise.
12186         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
12187         (cgraph_node::remove): Likewise.
12188         (cgraph_node::dump): Likewise.
12189         (cgraph_node::verify_node): Likewise.
12190         * cgraph.h (chkp_function_instrumented_p): Likewise.
12191         (symtab_node::get_alias_target): Likewise.
12192         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
12193         (cgraph_local_p): Likewise.
12194         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
12195         (cgraph_edge::rebuild_references): Likewise.
12196         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
12197         (walk_polymorphic_call_targets): Likewise.
12198         (cgraph_node::expand_thunk): Likewise.
12199         (symbol_table::output_weakrefs): Likewise.
12200         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
12201         (ix86_handle_option): Likewise.
12202         * config/i386/constraints.md: Likewise.
12203         * config/i386/i386-builtin-types.def (BND): Likewise.
12204         (VOID): Likewise.
12205         (PVOID): Likewise.
12206         (ULONG): Likewise.
12207         * config/i386/i386-builtin.def (BDESC_END): Likewise.
12208         (BDESC_FIRST): Likewise.
12209         (BDESC): Likewise.
12210         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
12211         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
12212         * config/i386/i386.c (enum reg_class): Likewise.
12213         (ix86_target_string): Likewise.
12214         (ix86_option_override_internal): Likewise.
12215         (ix86_conditional_register_usage): Likewise.
12216         (ix86_valid_target_attribute_inner_p): Likewise.
12217         (ix86_set_indirect_branch_type): Likewise.
12218         (ix86_set_current_function): Likewise.
12219         (ix86_function_arg_regno_p): Likewise.
12220         (init_cumulative_args): Likewise.
12221         (ix86_function_arg_advance): Likewise.
12222         (ix86_function_arg): Likewise.
12223         (ix86_pass_by_reference): Likewise.
12224         (ix86_function_value_regno_p): Likewise.
12225         (ix86_function_value_1): Likewise.
12226         (ix86_function_value_bounds): Likewise.
12227         (ix86_return_in_memory): Likewise.
12228         (ix86_setup_incoming_vararg_bounds): Likewise.
12229         (ix86_va_start): Likewise.
12230         (indirect_thunk_need_prefix): Likewise.
12231         (print_reg): Likewise.
12232         (ix86_print_operand): Likewise.
12233         (ix86_expand_call): Likewise.
12234         (ix86_output_function_return): Likewise.
12235         (reg_encoded_number): Likewise.
12236         (BDESC_VERIFYS): Likewise.
12237         (ix86_init_mpx_builtins): Likewise.
12238         (ix86_init_builtins): Likewise.
12239         (ix86_emit_cmove): Likewise.
12240         (ix86_emit_move_max): Likewise.
12241         (ix86_expand_builtin): Likewise.
12242         (ix86_builtin_mpx_function): Likewise.
12243         (ix86_get_arg_address_for_bt): Likewise.
12244         (ix86_load_bounds): Likewise.
12245         (ix86_store_bounds): Likewise.
12246         (ix86_load_returned_bounds): Likewise.
12247         (ix86_store_returned_bounds): Likewise.
12248         (ix86_class_likely_spilled_p): Likewise.
12249         (ix86_hard_regno_mode_ok): Likewise.
12250         (x86_order_regs_for_local_alloc): Likewise.
12251         (ix86_mitigate_rop): Likewise.
12252         (ix86_bnd_prefixed_insn_p): Likewise.
12253         (ix86_mpx_bound_mode): Likewise.
12254         (ix86_make_bounds_constant): Likewise.
12255         (ix86_initialize_bounds): Likewise.
12256         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
12257         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
12258         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
12259         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
12260         (TARGET_CHKP_BOUND_MODE): Likewise.
12261         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
12262         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
12263         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
12264         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
12265         * config/i386/i386.h (TARGET_MPX): Likewise.
12266         (TARGET_MPX_P): Likewise.
12267         (VALID_BND_REG_MODE): Likewise.
12268         (FIRST_BND_REG): Likewise.
12269         (LAST_BND_REG): Likewise.
12270         (enum reg_class): Likewise.
12271         (BND_REG_P): Likewise.
12272         (BND_REGNO_P): Likewise.
12273         (BNDmode): Likewise.
12274         (ADJUST_INSN_LENGTH): Likewise.
12275         * config/i386/i386.md: Likewise.
12276         * config/i386/i386.opt: Likewise.
12277         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
12278         (defined): Likewise.
12279         (LINK_MPX): Likewise.
12280         (MPX_SPEC): Likewise.
12281         (LIBMPX_SPEC): Likewise.
12282         (LIBMPXWRAPPERS_SPEC): Likewise.
12283         (CHKP_SPEC): Likewise.
12284         * config/i386/predicates.md: Likewise.
12285         * dbxout.c (dbxout_type): Likewise.
12286         * doc/extend.texi: Likewise.
12287         * doc/invoke.texi: Likewise.
12288         * doc/md.texi: Likewise.
12289         * doc/tm.texi: Likewise.
12290         * doc/tm.texi.in: Likewise.
12291         * dwarf2out.c (is_base_type): Likewise.
12292         (gen_formal_types_die): Likewise.
12293         (gen_subprogram_die): Likewise.
12294         (gen_type_die_with_usage): Likewise.
12295         (gen_decl_die): Likewise.
12296         (dwarf2out_late_global_decl): Likewise.
12297         * expr.c (expand_assignment): Likewise.
12298         (emit_storent_insn): Likewise.
12299         (store_expr_with_bounds): Likewise.
12300         (store_expr): Likewise.
12301         (expand_expr_real_1): Likewise.
12302         * expr.h (store_expr_with_bounds): Likewise.
12303         * function.c (use_register_for_decl): Likewise.
12304         (struct bounds_parm_data): Likewise.
12305         (assign_parms_augmented_arg_list): Likewise.
12306         (assign_parm_find_entry_rtl): Likewise.
12307         (assign_parm_is_stack_parm): Likewise.
12308         (assign_parm_load_bounds): Likewise.
12309         (assign_bounds): Likewise.
12310         (assign_parms): Likewise.
12311         (expand_function_start): Likewise.
12312         * gcc.c (CHKP_SPEC): Likewise.
12313         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
12314         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
12315         (wrestrict_dom_walker::check_call): Likewise.
12316         * gimple.c (gimple_build_call_from_tree): Likewise.
12317         * gimple.h (enum gf_mask): Likewise.
12318         (gimple_call_with_bounds_p): Likewise.
12319         (gimple_call_set_with_bounds): Likewise.
12320         * gimplify.c (gimplify_init_constructor): Likewise.
12321         * ipa-cp.c (initialize_node_lattices): Likewise.
12322         (propagate_constants_across_call): Likewise.
12323         (find_more_scalar_values_for_callers_subset): Likewise.
12324         * ipa-hsa.c (process_hsa_functions): Likewise.
12325         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
12326         * ipa-icf.c (sem_function::merge): Likewise.
12327         * ipa-inline.c (early_inliner): Likewise.
12328         * ipa-pure-const.c (warn_function_noreturn): Likewise.
12329         (warn_function_cold): Likewise.
12330         (propagate_pure_const): Likewise.
12331         * ipa-ref.h (enum GTY): Likewise.
12332         * ipa-split.c (find_retbnd): Likewise.
12333         (consider_split): Likewise.
12334         (split_function): Likewise.
12335         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
12336         * ipa.c (walk_polymorphic_call_targets): Likewise.
12337         (symbol_table::remove_unreachable_nodes): Likewise.
12338         (process_references): Likewise.
12339         (cgraph_build_static_cdtor_1): Likewise.
12340         * lto-cgraph.c (lto_output_node): Likewise.
12341         (output_refs): Likewise.
12342         (compute_ltrans_boundary): Likewise.
12343         (input_overwrite_node): Likewise.
12344         (input_node): Likewise.
12345         (input_cgraph_1): Likewise.
12346         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
12347         * passes.c (pass_manager::execute_early_local_passes): Likewise.
12348         (class pass_chkp_instrumentation_passes): Likewise.
12349         (make_pass_chkp_instrumentation_passes): Likewise.
12350         * passes.def: Likewise.
12351         * rtl.h (struct GTY): Likewise.
12352         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
12353         * stor-layout.c (layout_type): Likewise.
12354         * symtab.c: Likewise.
12355         * target.def: Likewise.
12356         * targhooks.c (default_chkp_bound_type): Likewise.
12357         (default_chkp_bound_mode): Likewise.
12358         (default_builtin_chkp_function): Likewise.
12359         (default_chkp_function_value_bounds): Likewise.
12360         (default_chkp_make_bounds_constant): Likewise.
12361         (default_chkp_initialize_bounds): Likewise.
12362         * targhooks.h (default_chkp_bound_type): Likewise.
12363         (default_chkp_bound_mode): Likewise.
12364         (default_builtin_chkp_function): Likewise.
12365         (default_chkp_function_value_bounds): Likewise.
12366         (default_chkp_make_bounds_constant): Likewise.
12367         (default_chkp_initialize_bounds): Likewise.
12368         * toplev.c (compile_file): Likewise.
12369         (process_options): Likewise.
12370         * tree-core.h (DEF_BUILTIN): Likewise.
12371         (DEF_BUILTIN_CHKP): Likewise.
12372         * tree-inline.c (declare_return_variable): Likewise.
12373         (remap_gimple_stmt): Likewise.
12374         (copy_bb): Likewise.
12375         (initialize_inlined_parameters): Likewise.
12376         (expand_call_inline): Likewise.
12377         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
12378         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
12379         (make_pass_ipa_chkp_produce_thunks): Likewise.
12380         (make_pass_chkp): Likewise.
12381         (make_pass_chkp_opt): Likewise.
12382         (make_pass_chkp_instrumentation_passes): Likewise.
12383         * tree-pretty-print.c (dump_generic_node): Likewise.
12384         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
12385         * tree-ssa-dce.c (propagate_necessity): Likewise.
12386         (eliminate_unnecessary_stmts): Likewise.
12387         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
12388         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
12389         * tree-ssa-sccvn.h: Likewise.
12390         * tree-ssa-strlen.c (get_string_length): Likewise.
12391         (valid_builtin_call): Likewise.
12392         (adjust_last_stmt): Likewise.
12393         (handle_builtin_strchr): Likewise.
12394         (handle_builtin_strcpy): Likewise.
12395         (handle_builtin_stxncpy): Likewise.
12396         (handle_builtin_memcpy): Likewise.
12397         (handle_builtin_strcat): Likewise.
12398         (strlen_check_and_optimize_stmt): Likewise.
12399         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
12400         * tree-streamer-in.c: Likewise.
12401         * tree-streamer.c (record_common_node): Likewise.
12402         * tree.c (tree_code_size): Likewise.
12403         (wide_int_to_tree_1): Likewise.
12404         (type_contains_placeholder_1): Likewise.
12405         (build_common_tree_nodes): Likewise.
12406         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
12407         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
12408         (POINTER_BOUNDS_P): Likewise.
12409         (BOUNDED_TYPE_P): Likewise.
12410         (BOUNDED_P): Likewise.
12411         (CALL_WITH_BOUNDS_P): Likewise.
12412         (pointer_bounds_type_node): Likewise.
12413         * value-prof.c (gimple_ic): Likewise.
12414         * var-tracking.c (vt_add_function_parameters): Likewise.
12415         * varasm.c (make_decl_rtl): Likewise.
12416         (assemble_start_function): Likewise.
12417         (output_constant): Likewise.
12418         (maybe_assemble_visibility): Likewise.
12419         * varpool.c (ctor_for_folding): Likewise.
12420         * chkp-builtins.def: Remove.
12421         * ipa-chkp.c: Remove.
12422         * ipa-chkp.h: Remove.
12423         * rtl-chkp.c: Remove.
12424         * rtl-chkp.h: Remove.
12425         * tree-chkp-opt.c: Remove.
12426         * tree-chkp.c: Remove.
12427         * tree-chkp.h: Remove.
12429 2018-06-07  Carl Love  <cel@us.ibm.com>
12431         * config/rs6000/vsx.md (vextract_fp_from_shorth,
12432         vextract_fp_from_shortl): Add BE support.
12434 2018-06-07  Paul Koning  <ni1d@arrl.net>
12436         * compare-elim.c (try_merge_compare): Don't merge compare if
12437         address contains a side effect.
12438         (try_eliminate_compare): Likewise.
12440 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
12442         * config.gcc: Support "tremont".
12443         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
12444         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12445         PROCESSOR_TREMONT.
12446         * config/i386/i386.c (m_TREMONT): Define.
12447         (processor_target_table): Add "tremont".
12448         (PTA_TREMONT): Define.
12449         (ix86_lea_outperforms): Add TARGET_TREMONT.
12450         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
12451         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
12452         and M_INTEL_GOLDMONT_PLUS.
12453         (fold_builtin_cpu): Add "tremont".
12454         (ix86_add_stmt_cost): Add TARGET_TREMONT.
12455         (ix86_option_override_internal): Add "tremont".
12456         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
12457         (processor_type): Add PROCESSOR_TREMONT.
12458         * config/i386/x86-tune.def: Add m_TREMONT.
12459         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
12461 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12463         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
12464         symbol defined for msp430i* devices to be lower case.
12466 2018-06-07  Richard Biener  <rguenther@suse.de>
12468         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
12469         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
12470         Properly wrap signed arithmetic if overflow wraps.
12472 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
12474         PR tree-optimization/69615
12475         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
12476         of a cast from a same precision integral SSA_NAME in a bb dominated
12477         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
12478         cast to utype if rhs2 has already a compatible type.
12480 2018-06-07  Richard Biener  <rguenther@suse.de>
12482         PR tree-optimization/85935
12483         * graphite-scop-detection.c (find_params_in_bb): Analyze
12484         condition operands with respect to the correct loop.  Assert
12485         the analysis doesn't fail.
12487 2018-06-04  Carl Love  <cel@us.ibm.com>
12489         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
12490         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
12491         as it is slightly cheaper.
12492         (first_match_or_eos_index_<mode>):
12493         Calculate index using natural element order.
12494         (first_match_index_<mode>):
12495         Calculate index using natural element order.
12496         (first_match_or_eos_index_<mode>):
12497         Calculate index using natural order.
12498         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
12499         for BE and LE modes.
12500         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
12501         P9V_BUILTIN_VCLZLSBB_V16QI.
12502         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
12503         specific.
12505 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12507         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
12508         indentation and line wrap for many prototypes.  Add missing
12509         @smallexample directives around block of prototypes for vec_xl and
12510         vec_xst.
12512 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
12514         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
12515         track if we pass or return IEEE 128-bit floating point.
12516         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
12517         C++ mangling that is compatible with GCC 8.1.
12518         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
12519         (init_cumulative_args): Note if we pass or return IEEE 128-bit
12520         floating point types.
12521         (rs6000_function_arg_advance_1): Likewise.
12522         (rs6000_mangle_type): Optionally generate mangled names that match
12523         what GCC 8.1 generated for IEEE 128-bit floating point types.
12524         (rs6000_globalize_decl_name): If we have an external function that
12525         passes or returns IEEE 128-bit types, generate a weak reference
12526         from the mangled name used in GCC 8.1 to the current mangled
12527         name.
12528         (rs6000_init_builtins): Make __ibm128 use the long double type if
12529         long double is IBM extended double.  Make __float128 use the long
12530         double type if long double is IEEE 128-bit.
12532         PR target/85657
12533         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
12534         macro for __ibm128 built-in functions.
12535         (PACK_IF): Add __ibm128 pack/unpack functions.
12536         (UNPACK_IF): Likewise.
12537         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
12538         enable long double built-in functions if long double is IEEE
12539         128-bit floating point.
12540         (rs6000_invalid_builtin): Update long double built-in function
12541         error message.
12542         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
12543         functions, adjust the built-in function to use the long double
12544         built-in function if __ibm128 and long double are the same type.
12545         * doc/extend.texi (PowerPC builtins): Update documention for
12546         __builtin_{,un}pack_longdouble.  Add documentation for
12547         __builtin_{,un}pack_ibm128.
12549 2018-06-06  Jim Wilson  <jimw@sifive.com>
12551         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
12552         (struct machine_function): New field interrupt_mode.
12553         (riscv_handle_type_attribute): New function.  Add forward declaration.
12554         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
12555         (riscv_expand_epilogue): Check interrupt_mode field.
12556         (riscv_set_current_function): Check interrupt attribute args and
12557         set interrupt_mode field.
12558         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
12559         (riscv_sret, riscv_uret): New.
12560         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
12561         new arguments to interrupt attribute.
12563 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
12565         PR target/63177
12566         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
12567         Don't handle -mcpu=power8 if -mpower9-vector is also used.
12569 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12571         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
12572         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
12573         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12574         several redundant entries.
12576 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
12578         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
12579         type from "rtx" to "rtx_insn *".
12580         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
12581         for local "call_insn", removing cast.
12582         (ix86_expand_call): Likewise, introducing a "call_insn" local.
12584 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12586         PR tree-optimization/86066
12587         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
12588         for BIT_INSERT_EXPR stores.
12590 2018-06-06  Richard Biener  <rguenther@suse.de>
12592         PR tree-optimization/86062
12593         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12594         component refs ontop
12595         of to be offsetted base.
12597 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12599         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
12600         to be static and remove check on interrupt attribute name.
12602 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12604         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
12605         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
12607 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
12609         PR target/79924
12610         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
12611         second argument.
12612         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
12613         Remove second argument, change how error is called.
12614         (aarch64_layout_arg): Remove second argument from
12615         aarch64_err_no_fpadvsimd call.
12616         (aarch64_init_cumulative_args): Ditto.
12617         (aarch64_gimplify_va_arg_expr): Ditto.
12618         * config/aarch64/aarch64.md (mov<mode>): Ditto.
12620 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
12622         * config/i386/i386.md (simple_return_indirect_internal): New expander.
12623         (*simple_return_indirect_internal<mode>): Rename from
12624         simple_return_indirect_internal.  Use W mode iterator.
12625         (rstorssp): New expander.
12626         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
12627         (clrssbsy): New expander.
12628         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
12630 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12632         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
12633         __typeof__.
12634         (cmse_check_pointed_object): Likewise.
12636 2018-06-05  Martin Liska  <mliska@suse.cz>
12638         PR gcov-profile/47618
12639         * doc/invoke.texi: Document how -fprofile-dir format
12640         is extended.
12642 2018-06-05  Richard Biener  <rguenther@suse.de>
12644         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
12645         removal pretend DOM info isn't available so we do not update
12646         it and only remove edges, not dominated blocks.  Actually free
12647         DOM info in case we removed something.  Remove unreachable blocks.
12648         (mfb_keep_latches): Work with either DOM info or marked backedges.
12649         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
12650         first.  Mark backedges if DOM info isn't available.
12651         (Re-)compute DOM info after cleanup_control_flow_pre.
12653 2018-06-05  Richard Biener  <rguenther@suse.de>
12655         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
12656         (locus_discrim_hasher::hash): Adjust.
12657         (locus_discrim_hasher::equal): Likewise.
12658         (next_discriminator_for_locus): Work on line directly.
12659         (same_line_p): Pass in expanded locus1 as well.
12660         (assign_discriminators): Avoid redundant location expansions.
12662 2018-06-05  Richard Biener  <rguenther@suse.de>
12664         PR tree-optimization/86046
12665         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
12666         if required after clearing TREE_ADDRESSABLE.
12668 2018-06-05  Richard Biener  <rguenther@suse.de>
12670         PR tree-optimization/86047
12671         * tree-ssa-loop.c (for_each_index): Glob handling of all
12672         decls and constants and really handle all of them.
12674 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12676         PR target/81497
12677         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
12678         qualifier_void_pointer and qualifier_const_void_pointer.
12679         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
12680         (arm_init_builtins): Handle the above.
12681         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
12682         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
12683         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
12684         void intrinsics.
12686 2018-06-05  Martin Liska  <mliska@suse.cz>
12688         * auto-profile.c (read_autofdo_file): Do not use
12689         gcov_ctr_summary struct.
12690         (afdo_callsite_hot_enough_for_early_inline): Likewise.
12691         * coverage.c (struct counts_entry): Likewise.
12692         (read_counts_file): Read just single summary entry.
12693         (get_coverage_counts): Use gcov_summary struct.
12694         * coverage.h (get_coverage_counts): Likewise.
12695         * gcov-dump.c (dump_working_sets): Likewise.
12696         (tag_summary): Dump just single summary.
12697         * gcov-io.c (gcov_write_summary): Write just histogram
12698         summary.
12699         (gcov_read_summary): Read just single summary.
12700         (compute_working_sets): Use gcov_summary struct.
12701         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
12702         of GCOV_COUNTERS_SUMMABLE.
12703         (GCOV_COUNTERS_SUMMABLE): Remove.
12704         (GCOV_FIRST_VALUE_COUNTER): Replace with
12705         GCOV_COUNTER_V_INTERVAL.
12706         (struct gcov_ctr_summary): Remove.
12707         (struct gcov_summary): Directly use fields of former
12708         gcov_ctr_summary.
12709         (compute_working_sets): Use gcov_summary struct.
12710         * gcov.c (read_count_file): Do not use ctrs fields.
12711         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
12712         struct.
12713         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
12714         struct.
12715         * profile.c: Likewise.
12716         * profile.h: Likewise.
12718 2018-06-05  Martin Liska  <mliska@suse.cz>
12720         PR gcov-profile/84846
12721         * gcov.c (output_lines): Print working directory only
12722         in intermediate format.
12724 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
12726         * config/s390/s390-builtin-types.def: Add void function type.
12727         * config/s390/s390-builtins.def: Use the function type for the
12728         tbeginc builtin.
12730 2018-06-04  Jim Wilson  <jimw@sifive.com>
12732         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
12733         to int.
12734         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
12735         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
12736         handle EH_RETURN_DATA_REGNO registers properly.
12737         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
12738         (riscv_expand_epilogue): Update comment.  Change argument name and
12739         type.  Update code to use new name and type.  Pass new args to
12740         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
12741         EXCEPTION_RETURN.
12742         * config/riscv/riscv.md (NORMAL_RETURN): New.
12743         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
12744         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
12745         (eh_return): Call gen_eh_return_internal and emit barrier.
12746         (eh_return_internal): Call riscv_expand_epilogue.
12748 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
12750         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
12751         bit_insertion field and declare can_be_merged_into method.
12752         (merged_store_group::can_be_merged_into): New method.
12753         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
12754         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
12755         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
12757 2018-06-04  Richard Biener  <rguenther@suse.de>
12759         PR tree-optimization/85955
12760         * builtins.c (fold_builtin_sincos): Convert pointers to
12761         destination to appropriate type before dereferencing.
12763 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
12765         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
12767 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
12769         * expr.c (expand_expr_real_1): Force the operand into memory if
12770         its TYPE_MODE is BLKmode and if there is no integer mode for
12771         the number of bits being extracted.
12773 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
12775         PR target/85832
12776         PR target/86036
12777         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12778         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
12780 2018-06-04  Richard Biener  <rguenther@suse.de>
12782         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
12783         (cleanup_tree_cfg_noloop): ... single caller.  Do
12784         start_recording_case_labels later.
12786 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
12788         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
12789         to _IMMINTRIN_H_INCLUDED.
12790         * config/i386/pconfigintrin.h: Ditto.
12791         * config/i386/waitpkgintrin.h: Ditto.
12792         * config/i386/immintrin.h: Add includes for sgxintrin.h,
12793         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
12794         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
12795         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
12796         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
12797         waitpkgintrin.h and cldemoteintrin.h.
12799 2018-06-04  Richard Biener  <rguenther@suse.de>
12801         PR tree-optimization/86038
12802         * tracer.c (find_best_successor): Check probability for
12803         being initialized, bail out if not.
12805 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
12807         PR target/86003
12808         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
12809         of bits to ignore when comparing architectures.
12811 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
12813         PR tree-optimization/69615
12814         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
12815         maximum or minimum of the type, try to merge it also as if
12816         range1 is + [-, x - 1] or + [x + 1, -].
12818         PR c++/86025
12819         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
12821 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
12823         PR tree-optimization/86034
12824         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
12825         the unsigned bitfield type in a bit insertion sequence if it does not
12826         have a larger precision than the bitfield size.
12827         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
12829 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
12831         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
12833 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
12835         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
12836         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
12837         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
12838         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
12840 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
12842         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
12843         Disable -fdelete-null-pointer-checks for ELF toolchain.
12845 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
12846             Kito Cheng  <kito.cheng@gmail.com>
12848         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
12849         (nds32le-*-*, nds32be-*-*): Integrate checking process.
12850         (nds32*-*-*): Add glibc and uclibc conditions.
12851         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
12852         (TARGET_EXCEPT_UNWIND_INFO): Define.
12853         * config/nds32/elf.h: New file.
12854         * config/nds32/linux.h: New file.
12855         * config/nds32/nds32-elf.opt: New file.
12856         * config/nds32/nds32-linux.opt: New file.
12857         * config/nds32/nds32-fp-as-gp.c
12858         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
12859         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
12860         TARGET_LINUX_ABI.
12861         (nds32_asm_file_end): Ditto.
12862         (nds32_print_operand): Ditto.
12863         (nds32_insert_attributes): Ditto.
12864         (nds32_init_libfuncs): New function.
12865         (TARGET_HAVE_TLS): Define.
12866         (TARGET_INIT_LIBFUNCS): Define.
12867         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
12868         spec content.
12869         (TARGET_ELF): Apply different mcmodel setting.
12870         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
12871         been migrated into elf.h and linux.h files.
12872         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
12873         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
12874         (mcmodel): The content has been migrated into nds32-elf.opt and
12875         nds32-linux.opt files.
12876         * config/nds32/t-elf: New file.
12877         * config/nds32/t-linux: New file.
12879 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
12880             Shiva Chen  <shiva0217@gmail.com>
12882         * config/nds32/constants.md (unspec_volatile_element): Add
12883         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
12884         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
12885         optimization.
12886         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
12887         (make_pass_nds32_fp_as_gp): Declare.
12888         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
12889         optmization pass.
12890         (nds32_asm_function_end_prologue): Remove unused asm output.
12891         (nds32_asm_function_begin_epilogue): Remove unused asm output.
12892         (nds32_asm_file_start): Output necessary fp_as_gp information.
12893         (nds32_option_override): Adjust register usage.
12894         (nds32_expand_prologue): Consider fp_as_gp situation.
12895         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
12896         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
12897         (epilogue): Ditto.
12898         (return): Ditto.
12899         (simple_return): Ditto.
12900         (omit_fp_begin): Output special directive for fp_as_gp.
12901         (omit_fp_end): Output special directive for fp_as_gp.
12902         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
12903         mforbid-fp-as-gp): New options.
12905 2018-06-01  Mark Wielaard  <mark@klomp.org>
12907         * dwarf2out.c (dwarf2out_finish): Remove generation of
12908         DW_AT_loclists_base.
12910 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
12912         * gimple-ssa-store-merging.c: Include gimple-fold.h.
12913         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
12914         (struct merged_store_group): Add bit_insertion field.
12915         (dump_char_array): Use standard hexadecimal format.
12916         (merged_store_group::merged_store_group): Set bit_insertion to false.
12917         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
12918         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
12919         also print the mask in the dump file.
12920         (pass_store_merging::gate): Minor tweak.
12921         (imm_store_chain_info::coalesce_immediate): Fix wrong association
12922         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
12923         stores with INTEGER_CST stores.
12924         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
12925         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
12926         and use it throughout.  Generate bit insertion sequences if need be.
12927         (pass_store_merging::process_store): Remove redundant condition.
12928         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
12930 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
12932         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
12933         the 128-bit floating point types.  Fix function comment.
12935 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12937         * config/aarch64/aarch64-simd.md
12938         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
12939         mnemonics.
12940         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
12941         mnemonics.
12943 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
12945         PR tree-optimization/85989
12946         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
12947         variable.
12948         (backprop::intersect_uses): Check it when deciding whether this
12949         is a backedge reference.
12950         (backprop::process_block): Add each phi to m_visited_phis
12951         after visiting it, then clear it at the end.
12953 2018-06-01  Richard Biener  <rguenther@suse.de>
12955         * tree-vectorizer.h (vect_dr_stmt): New function.
12956         (vect_get_load_cost): Adjust.
12957         (vect_get_store_cost): Likewise.
12958         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
12959         Use vect_dr_stmt instead of DR_SMTT.
12960         (vect_record_base_alignments): Likewise.
12961         (vect_calculate_target_alignment): Likewise.
12962         (vect_compute_data_ref_alignment): Likewise and make static.
12963         (vect_update_misalignment_for_peel): Likewise.
12964         (vect_verify_datarefs_alignment): Likewise.
12965         (vector_alignment_reachable_p): Likewise.
12966         (vect_get_data_access_cost): Likewise.  Pass down
12967         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
12968         (vect_get_peeling_costs_all_drs): Likewise.
12969         (vect_peeling_hash_get_lowest_cost): Likewise.
12970         (vect_enhance_data_refs_alignment): Likewise.
12971         (vect_find_same_alignment_drs): Likewise.
12972         (vect_analyze_data_refs_alignment): Likewise.
12973         (vect_analyze_group_access_1): Likewise.
12974         (vect_analyze_group_access): Likewise.
12975         (vect_analyze_data_ref_access): Likewise.
12976         (vect_analyze_data_ref_accesses): Likewise.
12977         (vect_vfa_segment_size): Likewise.
12978         (vect_small_gap_p): Likewise.
12979         (vectorizable_with_step_bound_p): Likewise.
12980         (vect_prune_runtime_alias_test_list): Likewise.
12981         (vect_analyze_data_refs): Likewise.
12982         (vect_supportable_dr_alignment): Likewise.
12983         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12984         (vect_gen_prolog_loop_niters): Likewise.
12985         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12986         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
12987         modify DR_STMT.
12988         (vect_recog_mask_conversion_pattern): Likewise.
12989         (vect_try_gather_scatter_pattern): Likewise.
12990         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
12991         to vect_get_store_cost.
12992         (vect_get_store_cost): Get stmt_info instead of DR.
12993         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
12994         (vect_get_load_cost): Get stmt_info instead of DR.
12996 2018-06-01  Richard Biener  <rguenther@suse.de>
12998         PR middle-end/86017
12999         * gimple-fold.c (var_decl_component_p): Also allow offsetted
13000         vars wrapped in MEM_REFs.
13002 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
13004         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13005         Fix subreg tests so that we only return a choice between
13006         GENERAL_REGS and FP_REGS if the original classes included both.
13008 2018-06-01  Richard Biener  <rguenther@suse.de>
13010         PR ipa/85960
13011         * tree-ssa-structalias.c (get_function_part_constraint):
13012         Handle NULL fi->decl.
13013         (find_func_aliases_for_call): Properly handle indirect
13014         fi from direct call.
13015         (find_func_clobbers): Likewise.
13016         (ipa_pta_execute): Likewise.
13017         (create_variable_info_for): For functions that are ifunc_resolver
13018         resolve to a varinfo that contains the result of the resolver call.
13019         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
13020         aliases.
13022 2018-05-31  Michael Collison  <michael.collison@arm.com>
13024         * config/aarch64/aarch64.md:
13025         (*fix_to_zero_extenddfdi2): New pattern.
13026         * gcc.target/aarch64/fix_extend1.c: New testcase.
13028 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
13030         PR middle-end/78809
13031         PR middle-end/83026
13032         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
13033         and BUILT_IN_STRNCMP_EQ.
13034         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
13035         BUILT_IN_STRNCMP_EQ.
13036         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
13037         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13038         (gimple_fold_builtin): Likewise.
13039         * tree-ssa-strlen.c (compute_string_length): New function.
13040         (determine_min_obsize): New function.
13041         (handle_builtin_string_cmp): New function to handle calls to
13042         string compare functions.
13043         (strlen_optimize_stmt): Add handling to builtin string compare
13044         calls.
13045         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
13046         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13047         * tree.c (build_common_builtin_nodes): Add new defines of
13048         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
13050 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
13052         PR target/85984
13053         * bb-reorder.c (pass_partition_blocks::gate): Return false for
13054         functions with naked attribute.
13056 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
13058         * config/i386/sse.md (avx_vec_concat<mode>):
13059         Substitute concat_tg_mode mode attribute with xtg_mode.
13060         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
13061         (concat_tg_mode): Remove mode attribute.
13063 2018-05-31  Martin Sebor  <msebor@redhat.com>
13065         PR c/82063
13066         * calls.c (alloc_max_size): Correct a logic error/typo.
13067         Treat excessive arguments as infinite.  Warn for invalid arguments.
13068         * doc/invoke.texi (-Walloc-size-larger-than): Update.
13070 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
13072         PR target/85829
13073         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
13074         and movx for Haswell.
13076 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
13077             Cesar Philippidis  <cesar@codesourcery.com>
13079         PR middle-end/85879
13080         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
13081         when emitting error on private/firstprivate reductions.
13082         * omp-low.c (lower_omp_target): Avoid reference-type processing
13083         on pointers for firstprivate clause.
13085 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
13087         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
13088         (st1x2): Likewise.
13089         (st1x3): Likewise.
13090         * config/aarch64/aarch64-simd.md
13091         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
13092         (aarch64_ld1_x3_<mode>): Likewise
13093         (aarch64_st1x2<VALLDIF:mode>): Likewise
13094         (aarch64_st1_x2_<mode>): Likewise
13095         (aarch64_st1x3<VALLDIF:mode>): Likewise
13096         (aarch64_st1_x3_<mode>): Likewise
13097         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
13098         (vld1_s8_x3): Likewise.
13099         (vld1_u16_x3): Likewise.
13100         (vld1_s16_x3): Likewise.
13101         (vld1_u32_x3): Likewise.
13102         (vld1_s32_x3): Likewise.
13103         (vld1_u64_x3): Likewise.
13104         (vld1_s64_x3): Likewise.
13105         (vld1_f16_x3): Likewise.
13106         (vld1_f32_x3): Likewise.
13107         (vld1_f64_x3): Likewise.
13108         (vld1_p8_x3): Likewise.
13109         (vld1_p16_x3): Likewise.
13110         (vld1_p64_x3): Likewise.
13111         (vld1q_u8_x3): Likewise.
13112         (vld1q_s8_x3): Likewise.
13113         (vld1q_u16_x3): Likewise.
13114         (vld1q_s16_x3): Likewise.
13115         (vld1q_u32_x3): Likewise.
13116         (vld1q_s32_x3): Likewise.
13117         (vld1q_u64_x3): Likewise.
13118         (vld1q_s64_x3): Likewise.
13119         (vld1q_f16_x3): Likewise.
13120         (vld1q_f32_x3): Likewise.
13121         (vld1q_f64_x3): Likewise.
13122         (vld1q_p8_x3): Likewise.
13123         (vld1q_p16_x3): Likewise.
13124         (vld1q_p64_x3): Likewise.
13125         (vst1_s64_x2): Likewise.
13126         (vst1_u64_x2): Likewise.
13127         (vst1_f64_x2): Likewise.
13128         (vst1_s8_x2): Likewise.
13129         (vst1_p8_x2): Likewise.
13130         (vst1_s16_x2): Likewise.
13131         (vst1_p16_x2): Likewise.
13132         (vst1_s32_x2): Likewise.
13133         (vst1_u8_x2): Likewise.
13134         (vst1_u16_x2): Likewise.
13135         (vst1_u32_x2): Likewise.
13136         (vst1_f16_x2): Likewise.
13137         (vst1_f32_x2): Likewise.
13138         (vst1_p64_x2): Likewise.
13139         (vst1q_s8_x2): Likewise.
13140         (vst1q_p8_x2): Likewise.
13141         (vst1q_s16_x2): Likewise.
13142         (vst1q_p16_x2): Likewise.
13143         (vst1q_s32_x2): Likewise.
13144         (vst1q_s64_x2): Likewise.
13145         (vst1q_u8_x2): Likewise.
13146         (vst1q_u16_x2): Likewise.
13147         (vst1q_u32_x2): Likewise.
13148         (vst1q_u64_x2): Likewise.
13149         (vst1q_f16_x2): Likewise.
13150         (vst1q_f32_x2): Likewise.
13151         (vst1q_f64_x2): Likewise.
13152         (vst1q_p64_x2): Likewise.
13153         (vst1_s64_x3): Likewise.
13154         (vst1_u64_x3): Likewise.
13155         (vst1_f64_x3): Likewise.
13156         (vst1_s8_x3): Likewise.
13157         (vst1_p8_x3): Likewise.
13158         (vst1_s16_x3): Likewise.
13159         (vst1_p16_x3): Likewise.
13160         (vst1_s32_x3): Likewise.
13161         (vst1_u8_x3): Likewise.
13162         (vst1_u16_x3): Likewise.
13163         (vst1_u32_x3): Likewise.
13164         (vst1_f16_x3): Likewise.
13165         (vst1_f32_x3): Likewise.
13166         (vst1_p64_x3): Likewise.
13167         (vst1q_s8_x3): Likewise.
13168         (vst1q_p8_x3): Likewise.
13169         (vst1q_s16_x3): Likewise.
13170         (vst1q_p16_x3): Likewise.
13171         (vst1q_s32_x3): Likewise.
13172         (vst1q_s64_x3): Likewise.
13173         (vst1q_u8_x3): Likewise.
13174         (vst1q_u16_x3): Likewise.
13175         (vst1q_u32_x3): Likewise.
13176         (vst1q_u64_x3): Likewise.
13177         (vst1q_f16_x3): Likewise.
13178         (vst1q_f32_x3): Likewise.
13179         (vst1q_f64_x3): Likewise.
13180         (vst1q_p64_x3): Likewise.
13182 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13184         * config/msp430/msp430.c (msp430_output_labelref): Prepend
13185         user_label_prefix to name.
13187         * tree-core.h: Update comment about the format of NAME string
13188         passed to handler in attribute_spec.
13190         * config/msp430/msp430.md: Remove erroneous subreg expression from
13191         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
13192         zero_extend{q,h}isi2.
13194 2018-05-30  Borislav Petkov  <bp@suse.de>
13196         * doc/extend.texi: Document some architecture specific
13197         constraints and sort entries.
13199 2018-05-30  Martin Sebor  <msebor@redhat.com>
13201         PR middle-end/85369
13202         * builtins.c (expand_builtin_stpcpy_1): New function.
13203         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
13204         only if the former succeeds.
13206 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
13208         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
13209         in saphira.
13211 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13213         * doc/invoke.texi (-flinker-output): Document
13215 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13217         * passes.c (ipa_write_summaries): Only modify statements if body
13218         is in memory.
13219         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
13220         incrementally linking.
13221         (ipa_passes): Likewise.
13222         * lto-cgraph.c (lto_output_node): When incrementally linking do not
13223         pass down resolution info.
13224         * common.opt (flag_incremental_link): Update info.
13225         * gcc.c (plugin specs): Turn flinker-output=* to
13226         -plugin-opt=-linker-output-known
13227         * toplev.c (compile_file): Also cut compilation when doing incremental
13228         link.
13229         * flag-types. (enum lto_partition_model): Add
13230         LTO_LINKER_OUTPUT_NOLTOREL.
13231         (invoke.texi): Add -flinker-output docs.
13232         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
13233         link same way as WPA; do not stream in dead initializers.
13235         * dwarf2out.c (dwarf2out_die_ref_for_decl,
13236         darf2out_register_external_decl): Support incremental link.
13238 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13240         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
13242 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13244         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
13245         it down to simple_object_copy_lto_debug_sections.
13246         (run_gcc): Determine incremental LTO link time and configure
13247         lto1 into non-wpa mode, disable renaming of debug sections.
13249 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13251         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13252         descriptions of various incorrectly documented functions.
13254 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13256         Revert:
13257         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13258         address check not strict.
13260 2018-05-30  Richard Biener  <rguenther@suse.de>
13262         PR tree-optimization/85964
13263         * tracer.c (better_p): Drop initialized count check, we only
13264         call the function with initialized counts now.
13265         (find_best_successor): Do find a best edge if one
13266         has uninitialized count.
13267         (find_best_predecessor): Likewise.  Do BB frequency check only
13268         if count is initialized.
13270 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
13272         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
13273         (aarch64_ldrstr_offset_compare): New.
13274         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
13275         load/store orderings.
13276         (aarch64_gen_adjusted_ldpstp): Likewise.
13278 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
13280         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13281         Check for subset of GENERAL_REGS and FP_REGS.
13282         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
13283         r=w alternative.
13285 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
13287         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
13288         and wi::to_poly_offset.  Add the current offset and then check
13289         whether the sum fits, rather than using an unchecked addition of
13290         a checked term.  Check for a shwi rather than a uhwi.
13291         * expr.c (get_bit_range): Use tree_to_poly_uint64.
13292         (store_constructor): Use poly_int_tree_p.
13293         (expand_expr_real_1): Likewise.
13294         * function.c (assign_temp): Likewise.
13295         * fold-const.c (const_binop): Use poly_int_tree_p and
13296         wi::to_poly_offset.
13297         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
13298         division.
13299         * ipa-icf-gimple.c (func_checker::compare_operand): Use
13300         to_poly_offset for MEM offsets.
13301         * ipa-icf.c (sem_variable::equals): Likewise.
13302         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
13303         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
13304         wi::to_poly_offset for BIT_FIELD_REF offsets.
13305         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
13306         wi::to_poly_offset.
13307         * var-tracking.c (emit_note_insn_var_location): Use
13308         tree_to_poly_uint64.
13310 2018-05-29  Jim Wilson  <jimw@sifive.com>
13312         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
13314 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
13316         PR target/85950
13317         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
13318         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
13319         sequence.
13320         (sse4_1_round<mode>2): Use nonimmediate_operand
13321         for operand 1 predicate.
13323 2018-05-29  Martin Sebor  <msebor@redhat.com>
13324             Richard Biener  <rguenther@suse.de>
13326         PR testsuite/85888
13327         * calls.c (get_size_range): Call determine_value_range instead
13328         of get_value_range..
13329         * tree-vrp.h (determine_value_range): Declared new function.
13330         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
13332 2018-05-29  Richard Biener  <rguenther@suse.de>
13334         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
13335         sure to use non-pattern stmts for get_earlier_stmt arguments.
13336         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
13337         called on pattern stmts.
13338         (get_later_stmt): Likewise.
13340 2018-05-29  Martin Liska  <mliska@suse.cz>
13342         PR gcov-profile/85759
13343         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
13344         env variables.
13346 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
13348         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
13349         VEC_UNPACK_*_EXPR.
13350         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
13351         VEC_PACK_*_EXPR.
13353         PR target/85918
13354         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13355         VEC_PACK_FLOAT_EXPR): New tree codes.
13356         * tree-pretty-print.c (op_code_prio): Handle
13357         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13358         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13359         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13360         * tree-inline.c (estimate_operator_cost): Likewise.
13361         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
13362         * fold-const.c (const_binop): Likewise.
13363         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
13364         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13365         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13366         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
13367         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13368         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13369         * expr.c (expand_expr_real_2): Likewise.
13370         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
13371         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
13372         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
13373         optabs.
13374         * optabs.c (expand_widen_pattern_expr): For
13375         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
13376         sign from result type rather than operand's type.
13377         (expand_binop_directly): For vec_packu_float_optab and
13378         vec_packs_float_optab allow result type to be different from operand's
13379         type.
13380         * optabs-tree.c (optab_for_tree_code): Handle
13381         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13382         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
13383         * tree-vect-generic.c (expand_vector_operations_1):  Handle
13384         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13385         VEC_PACK_FLOAT_EXPR.
13386         * tree-vect-stmts.c (supportable_widening_operation): Handle
13387         FIX_TRUNC_EXPR.
13388         (supportable_narrowing_operation): Handle FLOAT_EXPR.
13389         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
13390         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
13391         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
13392         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
13393         mode attributes.
13394         (vec_pack<floatprefix>_float_<mode>): New expander.
13395         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
13396         attributes.
13397         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
13398         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
13399         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
13400         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
13401         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
13402         Document.
13403         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
13404         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
13405         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13406         VEC_PACK_FLOAT_EXPR): Document.
13408 2018-05-29  Richard Biener  <rguenther@suse.de>
13410         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
13411         member.
13412         (stmt_vec_info_vec): Make pointer.
13413         (init_stmt_vec_info_vec): Remove.
13414         (free_stmt_vec_info_vec): Likewise.
13415         (set_stmt_vec_info_vec): New function.
13416         (free_stmt_vec_infos): Likewise.
13417         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
13418         (set_vinfo_for_stmt): Likewise.
13419         (get_earlier_stmt): Likewise.
13420         (get_later_stmt): Likewise.
13421         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
13422         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
13423         (vec_info::~vec_info): Free stmt_vec_infos.
13424         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
13425         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
13426         (pass_slp_vectorize::execute): Likewise.
13427         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
13428         (free_stmt_vec_info_vec): Likewise.
13429         (set_stmt_vec_info_vec): New function.
13430         (free_stmt_vec_infos): Likewise.
13431         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
13432         the global stmt_vec_info_vec.
13433         * tree-parloops.c (gather_scalar_reductions): Use
13434         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
13435         vector.
13437 2018-05-29  Richard Biener  <rguenther@suse.de>
13439         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
13441 2018-05-29  Martin Liska  <mliska@suse.cz>
13442             David Malcolm  <dmalcolm@redhat.com>
13444         * vec.c (test_reverse): New.
13445         (vec_c_tests): Add new test.
13446         * vec.h (vl_ptr>::reverse): New function.
13448 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
13450         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
13452         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
13453         and later.
13455 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13457         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
13459 2018-05-28  Richard Biener  <rguenther@suse.de>
13461         PR tree-optimization/85933
13462         * tree-vect-data-refs.c (vect_record_base_alignments): Only
13463         look at stmts marked as vectorizable.
13465 2018-05-28  Richard Biener  <rguenther@suse.de>
13467         PR tree-optimization/85934
13468         * tree-vect-generic.c (expand_vector_operations_1): Hoist
13469         vector boolean check before scalar optimization.
13471 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
13473         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
13474         for armv5te.
13476 2018-05-28  Mark Wielaard  <mark@klomp.org>
13478         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
13479         if it is an expression containing a minus sign.
13481 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
13483         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
13485 2018-05-27  Paul Koning  <ni1d@arrl.net>
13487         * config/pdp11/pdp11.md (truncsihi2): Remove.
13489 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
13490             Chung-Ju Wu  <jasonwucj@gmail.com>
13492         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
13493         implementation.
13494         (unaligned_store_dw): Ditto.
13495         * config/nds32/nds32-memory-manipulation.c
13496         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
13497         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
13498         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
13499         (emit_setmem_word_loop): Rename to ...
13500         (emit_setmem_doubleword_loop): ... this.
13501         (nds32_gen_dup_4_byte_to_word_value): New function.
13502         (nds32_gen_dup_8_byte_to_double_word_value): New function.
13503         (nds32_expand_setmem_loop): Refine implementation.
13504         (nds32_expand_setmem_loop_v3m): Ditto.
13505         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
13506         pattern.
13508 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13510         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
13512 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13514         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
13515         (nds32_init_machine_status): Initialize machine->attr_naked_p and
13516         machine->attr_no_prologue_p.
13517         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
13518         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
13519         (nds32_expand_epilogue): Consider attr_naked_p.
13520         (nds32_expand_epilogue_v3pop): Likewise.
13521         (nds32_can_use_return_insn): Likewise.
13522         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
13523         attr_no_prologue_p fields.
13524         * config/nds32/nds32.opt (mret-in-naked-func): New option.
13526 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
13528         PR target/85918
13529         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
13530         attributes.
13531         * config/i386/sse.md
13532         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
13533         Rename to ...
13534         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
13535         ... this.
13536         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
13537         Rename to ...
13538         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
13539         ... this.
13540         (*<floatsuffix>floatv2div2sf2): Rename to ...
13541         (*float<floatunssuffix>v2div2sf2): ... this.
13542         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
13543         (float<floatunssuffix>v2div2sf2_mask): ... this.
13544         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
13545         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
13546         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
13547         to ...
13548         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
13549         ... this.
13550         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13551         Rename to ...
13552         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13553         ... this.
13554         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13555         Rename to ...
13556         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13557         ... this.
13558         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
13559         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
13560         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
13561         gen_ufix_truncv8dfv8si2.
13562         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
13563         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
13564         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
13565         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
13566         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
13567         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
13568         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
13569         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
13571 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
13573         PR target/85900
13574         PR target/85345
13575         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
13577 2018-05-25  Jim Wilson  <jimw@sifive.com>
13579         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
13580         * config/riscv/riscv.c (struct machine_function): Add
13581         interrupt_handler_p and attribute_checked_p fields.
13582         (riscv_attribute_table): Add interrupt.
13583         (riscv_interrupt_type_p): New.
13584         (riscv_save_reg_p): Save extra regs for interrupt handler.
13585         (riscv_use_save_libcall): Return false  for interrupt handler.
13586         (riscv_first_stack_step): Add forward declaration.
13587         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
13588         for interrupt handler with large frame.  Use it for saved reg list.
13589         (riscv_expand_prologue): Move flag_stack_usage_info support to
13590         eliminate duplication.
13591         (riscv_expand_epilogue): Generate mret for interrupt handler.
13592         (riscv_epilogue_uses): New.
13593         (riscv_can_use_return_insn): Return false for interrupt handler.
13594         (riscv_function_ok_for_sibcall): Likewise.
13595         (riscv_set_current_function): Add interrupt handler support.
13596         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
13597         * config/riscv/riscv.md (UNSPECV_MRET): New.
13598         (GP_REGNUM): New.
13599         (riscv_frflags, riscv_fsflags): Use tab after opcode.
13600         (riscv_mret): New.
13601         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
13603 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
13605         PR tree-optimization/85712
13606         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
13607         this candidate has already been replaced in-situ by a copy.
13609 2018-05-25  Jason Merrill  <jason@redhat.com>
13611         PR c++/80485 - inline function non-zero address.
13612         * symtab.c (nonzero_address): Check DECL_COMDAT.
13614 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
13616         PR target/83628
13617         * config/alpha/alpha.md (ashlsi3): New insn pattern.
13618         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
13619         extension of SImode operation.  Use const123_operand predicate.
13620         (*saddsi_1): Remove.
13621         (*saddl_se_1): Ditto.
13622         (*ssubsi_1): Ditto.
13623         (*ssubl_se_1): Ditto.
13624         * config/alpha/predicates.md (const123_operand): New predicate.
13625         * config/alpha/constraints.md (P): Use IN_RANGE.
13627 2018-05-25  Richard Biener  <rguenther@suse.de>
13629         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
13630         defaulted to true.
13631         (ref_maybe_used_by_stmt_p): Likewise.
13632         (stmt_may_clobber_ref_p): Likewise.
13633         (stmt_may_clobber_ref_p_1): Likewise.
13634         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
13635         and pass it along.
13636         (ref_maybe_used_by_stmt_p): Likewise.
13637         (stmt_may_clobber_ref_p): Likewise.
13638         (stmt_may_clobber_ref_p_1): Likewise.
13639         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
13640         the alias oracle to disambiguate DRs with stmts DR analysis
13641         couldn't handle.
13642         (vect_analyze_data_refs): Do not give up on not analyzable
13643         DRs for BB vectorization.  Remove code truncating the dataref
13644         vector.
13646 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
13648         PR target/85832
13649         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13650         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
13651         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
13653 2018-05-25  Richard Biener  <rguenther@suse.de>
13655         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
13656         function, combining stmt data ref gathering and fatal analysis
13657         parts.
13658         (vect_analyze_data_refs): Remove now redudnant code and simplify.
13659         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
13660         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
13661         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
13662         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
13664 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
13666         PR tree-optimization/85720
13667         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
13668         SCC if all partitions are builtins.
13669         (version_loop_by_alias_check): New parameter.  Generate cancelable
13670         runtime alias check if all partitions are builtins.
13671         (distribute_loop): Update call to above function.
13673 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
13675         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
13676         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
13677         (parm_default_def_partition_arg): Ditto.
13678         (set_parm_default_def_partition): Ditto.
13679         (get_parm_default_def_partitions): Ditto and make it static.
13680         (get_undefined_value_partitions): Ditto and make it static.
13681         (remove_ssa_form): Refactor call to init_var_map here.
13682         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
13683         computation for loop region.
13684         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
13685         (register_default_def): Delete.
13686         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
13687         (parm_default_def_partition_arg): Ditto.
13688         (set_parm_default_def_partition): Ditto.
13689         (get_parm_default_def_partitions): Ditto and make it static.
13690         (get_undefined_value_partitions): Ditto and make it static.
13691         (coalesce_with_default, coalesce_with_default): Update comment.
13692         (create_coalesce_list_for_region): New func factored out from
13693         create_outofssa_var_map.
13694         (populate_coalesce_list_for_outofssa): New func factored out from
13695         create_outofssa_var_map and coalesce_ssa_name.
13696         (create_outofssa_var_map): Delete.
13697         (coalesce_ssa_name): Refactor to support live range computation.
13698         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
13699         (get_parm_default_def_partitions): Delete.
13700         (get_undefined_value_partitions): Ditto.
13701         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
13702         computation for loop region.
13703         (new_tree_live_info, loe_visit_block): Ditto.
13704         (live_worklist, set_var_live_on_entry): Ditto.
13705         (calculate_live_on_exit, verify_live_on_entry): Ditto.
13706         * tree-ssa-live.h (struct _var_map): New fields.
13707         (init_var_map): Change decl.
13708         (region_contains_p): New.
13710 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
13712         * tree-ssa-live.h (live_merge_and_clear): Delete.
13714 2018-05-25  Richard Biener  <rguenther@suse.de>
13716         PR c++/85912
13717         * tree-dump.c (dequeue_and_dump): Remove access to removed
13718         operand 2 of a SWITCH_EXPR.
13720 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13722         * doc/sourcebuild.texi (vect_double_cond_arith): Include
13723         multiplication and division.
13724         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
13725         (cond_udiv@var{m}, cond_umod@var{m}): Document.
13726         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
13727         (cond_udiv_optab, cond_umod_optab): New optabs.
13728         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
13729         (IFN_COND_RDIV): New internal functions.
13730         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
13731         TRUNC_MOD_EXPR and RDIV_EXPR.
13732         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
13733         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
13734         New unspecs.
13735         (SVE_INT_BINARY): Include mult.
13736         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
13737         (optab, sve_int_op): Handle mult.
13738         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
13739         UNSPEC_COND_DIV.
13740         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
13741         for SVE_INT_BINARY_SD.
13743 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13745         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
13746         (optab, sve_int_op): Handle div and udiv.
13747         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
13748         for SVE_INT_BINARY_SD.
13749         (*<optab><mode>3): New insn for the same.
13751 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13753         * tree-vect-patterns.c: Include predict.h.
13754         (vect_recog_divmod_pattern): Restrict check for division support
13755         to when optimizing for size.
13757 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13759         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
13760         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
13761         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
13762         (gimple_match_op::set_op): Likewise.
13763         (gimple_resimplify4): Declare.
13764         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
13765         (expr::gen_transform): Likewise.
13766         (decision_tree::gen): Generate a simplification routine for 4 operands.
13767         * gimple-match-head.c (gimple_simplify): Add an overload for
13768         4 operands.  In the top-level function, handle up to 4 call
13769         arguments and call gimple_resimplify4.
13770         (gimple_resimplify4): New function.
13771         (build_call_internal): Pass a fourth operand.
13772         (maybe_push_to_seq): Likewise.
13773         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
13774         Fold VEC_COND_EXPRs of an operation and a default value into
13775         an IFN_COND_* function if possible.
13776         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
13777         New unspecs.
13778         (SVE_COND_FP_BINARY): Include them.
13779         (optab, sve_fp_op): Handle them.
13780         (SVE_INT_BINARY_REV): New code iterator.
13781         (SVE_COND_FP_BINARY_REV): New int iterator.
13782         (commutative): New int attribute.
13783         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
13784         Declare.
13785         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
13786         function.
13787         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
13788         (*cond_<optab><mode>): New patterns for reversed operands.
13790 2018-05-25  Richard Biener  <rguenther@suse.de>
13792         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
13793         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
13794         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
13795         (STMT_VINFO_GROUPED_ACCESS): Adjust.
13796         * tree-vect-data-refs.c (everywhere): Adjust users.
13797         * tree-vect-loop.c (everywhere): Likewise.
13798         * tree-vect-slp.c (everywhere): Likewise.
13799         * tree-vect-stmts.c (everywhere): Likewise.
13800         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
13802 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13804         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
13805         Rename to...
13806         (gcc_cv_as_section_exclude): ... this.
13807         Try Solaris as #exclude syntax.
13808         * configure: Regenerate.
13809         * config.in: Regenerate.
13810         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
13811         SECTION_EXCLUDE.
13812         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
13813         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
13815         * varasm.c (default_elf_asm_named_section): Don't check if
13816         HAVE_GAS_SECTION_EXCLUDE is defined.
13818 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13820         * doc/md.texi: Update the documentation of the cond_* optabs
13821         to mention the new final operand.  Fix GET_MODE_NUNITS call.
13822         Describe the scalar case too.
13823         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
13824         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
13825         instead of 2.
13826         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
13827         (get_conditional_internal_fn): Update comment.
13828         * tree-vect-loop.c (vectorizable_reduction): Pass the original
13829         accumulator value as a final argument to conditional functions.
13830         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
13831         a define_expand and add an "else" operand.  Assert for now that
13832         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
13833         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
13834         (*cond_<optab><mode>): New patterns.
13835         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
13836         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
13837         (UNSPEC_COND_EOR): Delete.
13838         (optab): Remove associated mappings.
13839         (SVE_INT_BINARY): New code iterator.
13840         (sve_int_op): Remove int attribute and add "minus" to the code
13841         attribute.
13842         (SVE_COND_INT_OP): Delete.
13843         (SVE_COND_FP_OP): Rename to...
13844         (SVE_COND_FP_BINARY): ...this.
13846 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13848         * optabs.c (can_reuse_operands_p): New function.
13849         (maybe_legitimize_operands): Try to reuse the results for
13850         earlier operands.
13852 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
13854         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
13855         Add {q} suffix to insn mnemonic.
13857 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13859         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
13860         (msp430_warn_func_return): New.
13862 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
13864         * fold-const.c (tree_nonzero_bits): New function.
13865         * fold-const.h (tree_nonzero_bits): Likewise.
13866         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
13867         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
13869 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
13871         PR target/85900
13872         PR target/85345
13873         * varasm.c (assemble_alias): Check ifunc_resolver only on
13874         FUNCTION_DECL.
13876 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
13878         PR target/85903
13879         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
13880         when memory input operand is handled.
13882 2018-05-24  Luis Machado  <luis.machado@linaro.org>
13884         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
13885         global.
13886         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
13888 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
13890         * match.pd: Delay FMA folds until after vectorization.
13892 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13894         PR target/83009
13895         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13896         address check not strict.
13898 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
13900         * gimple-match.h (gimple_match_op): New class.
13901         (mprts_hook): Replace parameters with a gimple_match_op *.
13902         (maybe_build_generic_op): Likewise.
13903         (gimple_simplified_result_is_gimple_val): Replace parameters with
13904         a const gimple_match_op *.
13905         (gimple_simplify): Replace code_helper * and tree * parameters with
13906         a gimple_match_op * parameter.
13907         (gimple_resimplify1): Replace code_helper *, tree and tree *
13908         parameters with a gimple_match_op * parameter.
13909         (gimple_resimplify2): Likewise.
13910         (gimple_resimplify3): Likewise.
13911         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
13912         parameters with a gimple_match_op * parameter.
13913         * gimple-match-head.c (gimple_simplify): Change prototypes of
13914         auto-generated functions to take a gimple_match_op * instead of
13915         separate code_helper * and tree * parameters.  Make the same
13916         change in the top-level overload and update calls to the
13917         gimple_resimplify routines.  Update calls to the auto-generated
13918         functions and to maybe_push_res_to_seq in the publicly-facing
13919         operation-specific gimple_simplify overloads.
13920         (gimple_match_op::MAX_NUM_OPS): Define.
13921         (gimple_resimplify1): Replace rcode and ops with a single res_op
13922         parameter.  Update call to gimple_simplify.
13923         (gimple_resimplify2): Likewise.
13924         (gimple_resimplify3): Likewise.
13925         (mprts_hook): Replace parameters with a gimple_match_op *.
13926         (maybe_build_generic_op): Likewise.
13927         (build_call_internal): Replace type, nargs and ops with
13928         a gimple_match_op *.
13929         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
13930         with a single gimple_match_op *.  Update calls to mprts_hook,
13931         build_call_internal and gimple_simplified_result_is_gimple_val.
13932         Factor out code that is common to the tree_code and combined_fn cases.
13933         * genmatch.c (expr::gen_transform): Replace tem_code and
13934         tem_ops with a gimple_match_op called tem_op.  Update calls
13935         to the gimple_resimplify functions and maybe_push_res_to_seq.
13936         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
13937         res_ops.  Update call to the gimple_resimplify functions.
13938         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
13939         (decision_tree::gen): Make the functions take a gimple_match_op *
13940         called res_op instead of separate res_code and res_ops parameters.
13941         Update call accordingly.
13942         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
13943         and ops with a single res_op parameter.  Update calls to
13944         maybe_build_generic_op and maybe_push_res_to_seq.
13945         (fold_stmt_1): Update calls to gimple_simplify and
13946         replace_stmt_with_simplification.
13947         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
13948         and gimple_simplified_result_is_gimple_val.
13949         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
13950         gimple_simplify.
13951         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
13952         with a gimple_match_op *.
13953         (vn_nary_build_or_lookup): Likewise.  Update call to
13954         vn_nary_build_or_lookup_1.
13955         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
13956         gimple_match_op *.  Update calls to the gimple_resimplify routines
13957         and to gimple_simplified_result_is_gimple_val.
13958         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
13959         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
13960         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
13961         (visit_nary_op): Likewise.
13962         (visit_reference_op_load): Likewise.
13964 2018-05-23  Luis Machado  <luis.machado@linaro.org>
13966         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
13967         modifier for printing the step amount.
13969 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
13971         PR target/78849
13972         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
13973         types.
13975 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
13977         * doc/sourcebuild.texi (Endianness): New subsubsection.
13979 2018-05-23  Luis Machado  <luis.machado@linaro.org>
13981         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13982         <prefetch_dynamic_strides>: New const bool field.
13983         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13984         prefetch_dynamic_strides.
13985         (exynosm1_prefetch_tune): Likewise.
13986         (thunderxt88_prefetch_tune): Likewise.
13987         (thunderx_prefetch_tune): Likewise.
13988         (thunderx2t99_prefetch_tune): Likewise.
13989         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
13990         false.
13991         (aarch64_override_options_internal): Update to set
13992         PARAM_PREFETCH_DYNAMIC_STRIDES.
13993         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13994         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13995         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13996         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13997         prefetch-dynamic-strides setting.
13999 2018-05-23  Luis Machado  <luis.machado@linaro.org>
14001         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14002         <minimum_stride>: New const int field.
14003         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14004         minimum_stride field defaulting to -1.
14005         (exynosm1_prefetch_tune): Likewise.
14006         (thunderxt88_prefetch_tune): Likewise.
14007         (thunderx_prefetch_tune): Likewise.
14008         (thunderx2t99_prefetch_tune): Likewise.
14009         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
14010         <default_opt_level>: Set to 3.
14011         (aarch64_override_options_internal): Update to set
14012         PARAM_PREFETCH_MINIMUM_STRIDE.
14013         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14014         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14015         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14016         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14017         stride is constant and is below the minimum stride threshold.
14019 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14021         * config/arm/arm-cpus.in (mode26): Delete.
14022         (armv4): Delete mode26 reference.
14023         * config/arm/arm.c (arm_configure_build_target): Delete use of
14024         isa_bit_mode26.
14026 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
14028         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
14029         New insn pattern.
14030         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
14031         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
14032         for non-SSE modes.
14033         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
14034         (floatunsdidf2): Ditto.
14036 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
14038         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
14039         (fixuns_trunc<mode>si2_avx512f): Ditto.
14040         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
14041         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
14042         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
14044 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
14046         PR rtl-optimization/79985
14047         * df-scan.c (df_insn_refs_collect): Remove special case for
14048         global registers and asm statements.
14050 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
14052         * extend.texi (Global Register Variables): Rewrite the bullet list.
14053         Note that the register is available for allocation. Note that access
14054         via inline asm must use constraints. Add note about async-signal
14055         handlers. Remove paragraph about automagic register selection.
14057 2018-05-23  Richard Biener  <rguenther@suse.de>
14059         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
14060         of fixed offset from memset VN.
14062 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
14064         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
14065         first_interp field.
14066         (alloc_cand_and_find_basis): Initialize first_interp field.
14067         (slsr_process_mul): Modify first_interp field.
14068         (slsr_process_add): Likewise.
14069         (slsr_process_cast): Modify first_interp field for each new
14070         interpretation.
14071         (slsr_process_copy): Likewise.
14072         (dump_candidate): Dump first_interp field.
14073         (replace_mult_candidate): Process all interpretations, not just
14074         subsequent ones.
14075         (replace_rhs_if_not_dup): Likewise.
14076         (replace_one_candidate): Likewise.
14078 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
14080         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
14081         Add new boolean.
14082         (aarch64_needs_frame_chain): New function.
14083         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
14085 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
14087         PR target/84882
14088         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
14089         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
14090         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
14091         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
14092         as true for strict-align.
14093         (aarch64_can_inline_p): Perform checks even when callee has no
14094         attributes to check for strict alignment.
14095         * doc/extend.texi (AArch64 Function Attributes): Document
14096         no-strict-align.
14097         * doc/invoke.texi: (AArch64 Options): Likewise.
14099 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
14101         PR tree-optimization/85853
14102         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
14103         the handling of the root of the node to...
14104         (vect_slp_analyze_node_operations_1): ...this new function,
14105         and run the whole thing with the child nodes' def types
14106         set according to their SLP node's def type.
14108 2018-05-23  Richard Biener  <rguenther@suse.de>
14110         PR middle-end/85874
14111         * tree-data-ref.c (create_runtime_alias_checks): Defer
14112         and ignore overflow warnings.
14114 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
14116         PR tree-optimization/85822
14117         * tree-vrp.c (is_masked_range_test): Fix handling of negative
14118         constants.
14120 2018-05-23  Richard Biener  <rguenther@suse.de>
14122         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14123         memset constants via native_interpret_expr.
14125 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
14127         PR target/85345
14128         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
14129         attribute.
14130         (cgraph_node::create_alias): Likewise.
14131         (cgraph_node::get_availability): Check ifunc_resolver instead
14132         of looking up ifunc attribute.
14133         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
14134         * varasm.c (do_assemble_alias): Likewise.
14135         (assemble_alias): Likewise.
14136         (default_binds_local_p_3): Likewise.
14137         * cgraph.h (cgraph_node): Add ifunc_resolver.
14138         (cgraph_node::only_called_directly_or_aliased_p): Return false
14139         for IFUNC resolver.
14140         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
14141         attribute.
14142         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
14143         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
14144         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
14145         instead of looking up ifunc attribute.
14147 2018-05-22  Luis Machado  <luis.machado@linaro.org>
14149         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
14151 2018-05-22  Martin Sebor  <msebor@redhat.com>
14153         PR middle-end/85359
14154         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
14155         only when expasion succeeds.
14156         (expand_builtin_strcmp): Same.
14157         (expand_builtin_strncmp): Same.
14159 2018-05-22  Martin Sebor  <msebor@redhat.com>
14161         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
14163 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
14164             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14166         * config/aarch64/aarch64-ldpstp.md: Replace uses of
14167         aarch64_mem_pair_operand with memory_operand and delete operand swapping
14168         code.
14169         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14170         Add check for legitimate_address.
14171         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
14172         (aarch64_swap_ldrstr_operands): New.
14173         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
14174         Define prototype.
14176 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
14177             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14179         * config/aarch64/aarch64.md: New patterns to generate stp
14180         and ldp.
14181         (store_pair_sw, store_pair_dw): New patterns to generate stp for
14182         single words and double words.
14183         (load_pair_sw, load_pair_dw): Likewise.
14184         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
14185         Delete.
14186         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
14187         Delete.
14188         * config/aarch64/aarch64-ldpstp.md: Modify peephole
14189         for different mode ldpstp and add peephole for merged zero stores.
14190         Likewise for loads.
14191         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14192         Add size check.
14193         (aarch64_gen_store_pair): Rename calls to match new patterns.
14194         (aarch64_gen_load_pair): Rename calls to match new patterns.
14195         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
14196         (load_pair<DREG:mode><DREG2:mode>): ... This.
14197         (store_pair<mode>): Rename to...
14198         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
14199         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
14200         New mode iterators.
14201         (V_INT_EQUIV): Handle SImode.
14202         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
14203         New predicate.
14205 2018-05-22  Martin Sebor  <msebor@redhat.com>
14207         PR c/85623
14208         * calls.c (maybe_warn_nonstring_arg): Use string length to set
14209         or ajust the presumed bound on an operation to avoid unnecessary
14210         warnings.
14212 2018-05-22  Martin Sebor  <msebor@redhat.com>
14214         PR tree-optimization/85826
14215         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
14216         assuming that a DECL necesarily has a constant size.
14218 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
14220         PR middle-end/85862
14221         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
14223 2018-05-22  Richard Biener  <rguenther@suse.de>
14225         PR tree-optimization/85834
14226         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
14227         non-constant and non-zero memset arguments.
14229 2018-05-22  Martin Liska  <mliska@suse.cz>
14231         PR ipa/85607
14232         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
14234 2018-05-22  Richard Biener  <rguenther@suse.de>
14236         PR tree-optimization/85863
14237         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
14238         comparisons when vectype is specified.
14239         (vectorizable_condition): Do not specify vectype for
14240         vect_is_simple_cond when SLP vectorizing.
14242 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
14244         PR target/85657
14245         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
14246         define __ibm128 as long double.
14247         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
14248         as a distinct type when IEEE 128-bit support is enabled.
14249         (init_float128_ieee): Fix up conversions between IFmode and IEEE
14250         128-bit types to use the correct functions.
14251         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
14252         convert between 128-bit floating point types that have different
14253         modes but the same representation, instead of using gen_lowpart to
14254         makean alias.
14255         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
14256         KFmode.
14257         (IFKF_reg): New attributes to give the register constraints for
14258         IFmode and KFmode.
14259         (extend<mode>tf2_internal): New insns to mark an explicit
14260         conversion between 128-bit floating point types that have a
14261         different mode but share the same representation.
14263 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
14265         PR tree-optimization/85814
14266         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
14267         a null return from get_strinfo when unsharing the next
14268         strinfo in the chain.
14270 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14272         PR gcc/84923
14273         * varasm.c (weak_finish): Clean up weak_decls.
14275 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14277         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
14278         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
14279         UNSPEC_UADALP values.
14280         * config/aarch64/iterators.md (ABAL): New int iterator.
14281         (ABDL2): Likewise.
14282         (ADALP): Likewise.
14283         (sur): Add mappings for the above.
14284         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
14285         New define_insn.
14286         (aarch64_<sur>abal<mode>_4): Likewise.
14287         (aarch64_<sur>adalp<mode>_3): Likewise.
14288         (<sur>sadv16qi): New define_expand.
14290 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
14292         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
14293         (*movdf_internal): Ditto.
14294         (*rcpsf2_sse): Ditto.
14295         (*rsqrtsf2_sse): Ditto.
14296         (*sqrt<mode>2_sse): Ditto.
14298 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
14300         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
14301         eor3q<mode>4.
14302         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
14303         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
14304         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
14305         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
14306         vbcaxq_s64): New.
14307         * config/aarch64/arm_neon.h: Likewise.
14308         * config/aarch64/iterators.md (VQ_I): New.
14310 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
14312         * config.gcc: Add arc/t-multilib-linux to tmake_file for
14313         arc*-*-linux*.
14314         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
14315         MULTILIB_DIRNAMES
14317 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
14319         * config/nds32/constraints.md (S): New constraint.
14320         * config/nds32/nds32.md (call_internal): Use constraint S.
14321         (call_value_internal): Likewise.
14322         (sibcall_internal): Likewise.
14323         (sibcall_value_internal): Likewise.
14325 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
14326             Chung-Ju Wu  <jasonwucj@gmail.com>
14328         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
14329         into consideration.
14331 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
14332             Chung-Ju Wu  <jasonwucj@gmail.com>
14334         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
14335         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
14336         (nds32_rtx_costs_impl): Simplify.
14337         (nds32_address_cost_impl): Simplify.
14338         (nds32_init_rtx_costs): New function.
14339         (nds32_rtx_costs_speed_prefer): Likewise.
14340         (nds32_rtx_costs_size_prefer): Likewise.
14341         (nds32_address_cost_speed_prefer): Likewise.
14342         (nds32_address_cost_speed_fwprop): Likewise.
14343         (nds32_address_cost_size_prefer): Likewise.
14344         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
14345         * config/nds32/nds32.c (nds32_option_override): Use
14346         nds32_init_rtx_costs function.
14348 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
14350         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
14351         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
14352         (TARGET_PIPELINE_N8): Likewise.
14353         (TARGET_PIPELINE_N10): Likewise.
14354         (TARGET_PIPELINE_N13): Likewise.
14355         (TARGET_PIPELINE_GRAYWOLF): Likewise.
14357 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
14359         * config/nds32/nds32-fpu.md: Update copyright year.
14361 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14363         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
14365 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14367         * config/nds32/nds32.c
14368         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
14369         * config/nds32/nds32.opt (minline-asm-r15): New option.
14371 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14373         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
14374         MASK_HW_ABS.
14375         * config/nds32/nds32.md (abssi2): New pattern.
14377 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
14379         * config/i386/i386.md (rex64namesuffix): New mode attribute.
14380         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
14381         Merge insn pattern from sse_cvtsi2ss<round_name> and
14382         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
14383         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
14384         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
14385         using SWI48 mode iterator.
14386         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
14387         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
14388         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
14389         pattern from sse_cvttss2si<round_saeonly_name>
14390         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
14391         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
14392         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
14393         using SWI48 mode iterator.
14394         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
14395         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
14396         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
14397         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
14398         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
14399         using SWI48 mode iterator.
14400         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
14401         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
14402         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
14403         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
14404         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
14405         SWI48 mode iterator.
14406         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
14407         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
14408         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
14409         pattern from sse_cvttsd2si<round_saeonly_name>
14410         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
14412 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14414         * config/nds32/nds32-md-auxiliary.c
14415         (nds32_valid_smw_lwm_base_p): Refine.
14416         (nds32_output_smw_single_word): Refine.
14417         (nds32_output_smw_double_word): New.
14418         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
14420 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14422         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
14423         (nds32_output_stack_pop): Refine.
14424         (nds32_expand_unaligned_load): Refine.
14425         (nds32_expand_unaligned_store): Refine.
14427 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
14428             Chung-Ju Wu  <jasonwucj@gmail.com>
14430         * config/nds32/constants.md: Add TP_REGNUM constant.
14431         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
14432         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
14433         UNSPEC_ADD32.
14434         * config/nds32/nds32-doubleword.md: Consider flag_pic.
14435         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
14436         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
14437         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
14438         and PIC code generation.
14439         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
14440         code generation.
14441         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
14442         optimization.
14443         * config/nds32/nds32.md: Support TLS and PIC.
14444         * config/nds32/nds32.c: Support TLS and PIC.
14445         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
14446         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
14447         predicate.
14449 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14451         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
14452         mode with E_ prefix.
14454 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
14455             Chung-Ju Wu  <jasonwucj@gmail.com>
14457         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
14458         * config/nds32/nds32-md-auxiliary.c
14459         (symbolic_reference_mentioned_p): New.
14460         (nds32_legitimize_ict_address): New.
14461         (nds32_expand_ict_move): New.
14462         (nds32_indirect_call_referenced_p): New.
14463         (nds32_symbol_binds_local_p): Delete.
14464         (nds32_long_call_p): Modify.
14465         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
14466         * config/nds32/nds32-protos.h
14467         (symbolic_reference_mentioned_p): Declare.
14468         (nds32_legitimize_ict_address): Declare.
14469         (nds32_expand_ict_move): Declare.
14470         (nds32_indirect_call_referenced_p): Declare.
14471         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
14472         (nds32_relax_group): Use nds32_ict_const_p as condition.
14473         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
14474         (nds32_asm_file_start): Output ict_model directive in asm code.
14475         (nds32_legitimate_address_p): Consider indirect call.
14476         (nds32_print_operand): Consider indirect call.
14477         (nds32_print_operand_address): Consider indirect call.
14478         (nds32_insert_attributes): Handle "indirect_call" attribute.
14479         (TARGET_LEGITIMATE_ADDRESS_P): Define.
14480         (TARGET_LEGITIMATE_CONSTANT_P): Define.
14481         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
14482         (TARGET_DELEGITIMIZE_ADDRESS): Define.
14483         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
14484         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
14485         (TARGET_ICT_MODEL_SMALL): Define.
14486         (TARGET_ICT_MODEL_LARGE): Define.
14487         * config/nds32/nds32.md (movsi): Consider ict model.
14488         (call, call_value): Consider ict model.
14489         (sibcall, sibcall_value): Consider ict model.
14490         * config/nds32/nds32.opt (mict-model): New option.
14491         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
14492         model.
14494 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
14495             Monk Chiang  <sh.chiang04@gmail.com>
14496             Jim Wilson <jimw@sifive.com>
14498         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
14499         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
14500         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
14501         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
14502         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
14503         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
14504         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
14505         compute save_libcall_adjustment properly.
14506         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
14507         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
14508         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
14509         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
14510         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
14511         (ABI_SPEC): Handle mabi=ilp32e.
14512         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
14513         (RVE): Add RVE mask.
14514         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
14515         <-march>: Add rv32e as an example.
14517 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
14519         PR c++/82899
14520         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
14521         (intra_create_variable_infos): Handle C++ constructors.
14523 2018-05-18  Martin Liska  <mliska@suse.cz>
14525         * passes.def: Remove a redundant pass.
14527 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
14529         PR bootstrap/85838
14530         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
14532 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14534         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
14535         (ARMv4): Update.
14536         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
14537         (ARMv6m): Update.
14538         (armv2, armv2a, armv3, armv3m): Delete architectures.
14539         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
14540         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
14541         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
14542         Delete cpus.
14543         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
14544         (*mulsidi3adddi): Likewise.
14545         (mulsidi3): Likewise.
14546         (*mulsidi3_nov6): Likewise.
14547         (umulsidi3): Likewise.
14548         (umulsidi3_nov6): Likewise.
14549         (umaddsidi4): Likewise.
14550         (*umulsidi3adddi): Likewise.
14551         (smulsi3_highpart): Likewise.
14552         (*smulsi3_highpart_nov6): Likewise.
14553         (umulsi3_highpart): Likewise.
14554         (*umulsi3_highpart_nov6): Likewise.
14555         * config/arm/arm.h (arm_arch3m): Delete.
14556         * config/arm/arm.c (arm_arch3m): Delete.
14557         (arm_option_override_internal): Update armv3-related comment.
14558         (arm_configure_build_target): Delete use of isa_bit_mode32.
14559         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
14560         (arm_rtx_costs_internal): Delete check of arm_arch3m.
14561         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
14562         (mulsa3): Likewise.
14563         (mulusa3): Likewise.
14564         * config/arm/arm-protos.h (arm_arch3m): Delete.
14565         * config/arm/arm-tables.opt: Regenerate.
14566         * config/arm/arm-tune.md: Likewise.
14567         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
14568         deleted architectures.
14570 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14572         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
14573         (armv5t, armv5te): New features.
14574         (ARMv5, ARMv5e): Delete fgroups.
14575         (ARMv5t, ARMv5te): Adjust for above changes.
14576         (ARMv6m): Likewise.
14577         (armv5, armv5e): Delete arches.
14578         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
14579         arm_arch5.
14580         (*call_reg_arm): Likewise.
14581         (*call_value_reg_armv5): Likewise.
14582         (*call_value_reg_arm): Likewise.
14583         (*call_symbol): Likewise.
14584         (*call_value_symbol): Likewise.
14585         (*sibcall_insn): Likewise.
14586         (*sibcall_value_insn): Likewise.
14587         (clzsi2): Likewise.
14588         (prefetch): Likewise.
14589         (define_split and define_peephole2 dependent on arm_arch5):
14590         Likewise.
14591         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
14592         arm_arch5e.
14593         (TARGET_ARM_QBIT): Likewise.
14594         (TARGET_DSP_MULTIPLY): Likewise.
14595         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
14596         (arm_arch5, arm_arch5e): Delete.
14597         (arm_arch5t, arm_arch5te): Declare.
14598         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
14599         (arm_arch5t): Declare.
14600         (arm_option_reconfigure_globals): Update for the above.
14601         (arm_options_perform_arch_sanity_checks): Update comment, replace
14602         use of arm_arch5 with arm_arch5t.
14603         (use_return_insn): Likewise.
14604         (arm_emit_call_insn): Likewise.
14605         (output_return_instruction): Likewise.
14606         (arm_final_prescan_insn): Likewise.
14607         (arm_coproc_builtin_available): Likewise.
14608         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
14609         arm_arch5e with arm_arch5t and arm_arch5te.
14610         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
14611         (arm_arch5t, arm_arch5te): Declare.
14612         * config/arm/arm-tables.opt: Regenerate.
14613         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
14614         * config/arm/t-multilib: Likewise.
14615         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
14616         instead of arm_arch5.
14617         (*call_reg_thumb1): Likewise.
14618         (*call_value_reg_thumb1_v5): Likewise.
14619         (*call_value_reg_thumb1): Likewise.
14620         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
14621         unreachable path.
14622         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
14624 2018-05-18  Martin Liska  <mliska@suse.cz>
14626         PR gcov-profile/84846
14627         * doc/gcov.texi: Document -t option of gcov tool.
14629 2018-05-18  Martin Liska  <mliska@suse.cz>
14631         PR gcov-profile/84846
14632         * gcov.c (print_usage): Add new -t option.
14633         (process_args): Handle the option.
14634         (generate_results): Use stdout as output when requested by
14635         the option.
14637 2018-05-18  Martin Liska  <mliska@suse.cz>
14639         PR gcov-profile/84846
14640         * coverage.c (coverage_init): Write PWD to .gcno file.
14641         * doc/gcov.texi: Document how working directory is printed.
14642         * gcov-dump.c (dump_gcov_file): Print PWD.
14643         * gcov.c (output_intermediate_file): Likewise.
14644         (read_graph_file): Read PWD string.
14645         (output_lines): Print PWD.
14647 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
14649         PR middle-end/85817
14650         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
14651         for retval and return false if all args to phi are zero.
14653 2018-05-18  Richard Biener  <rguenther@suse.de>
14655         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
14656         method.
14657         (evrp_dom_walker::before_dom_children): Call it.
14659 2018-05-18  Richard Biener  <rguenther@suse.de>
14661         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
14662         results when processing array refs with variable index.
14664 2018-05-18  Toon Moene  <toon@moene.org>
14666         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
14667         directly after that of -floop-interchange. Indicate that both
14668         options are enabled by default when specifying -O3.
14670 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14672         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
14673         iterator.  Delete separate integer-mode vec_set<mode> expander.
14674         (aarch64_simd_vec_setv2di): Delete.
14675         (vec_setv2di): Delete.
14676         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
14677         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
14678         the "w, r" alternative.
14680 2018-05-18  Martin Liska  <mliska@suse.cz>
14682         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
14683         * tree-pass.h (make_pass_lower_switch_O0): New function.
14684         * tree-switch-conversion.c (node_has_low_bound): Remove.
14685         (node_has_high_bound): Likewise.
14686         (node_is_bounded): Likewise.
14687         (class pass_lower_switch): Make it a template type and create
14688         two instances.
14689         (pass_lower_switch::execute): Add template argument.
14690         (make_pass_lower_switch): New function.
14691         (make_pass_lower_switch_O0): New function.
14692         (do_jump_if_equal): Remove.
14693         (emit_case_nodes): Simplify to just handle all 3 cases and leave
14694         all the hard work to tree optimization passes.
14696 2018-05-18  Martin Liska  <mliska@suse.cz>
14698         * dbgcnt.c (limit_low): Renamed from limit.
14699         (limit_high): New variable.
14700         (dbg_cnt_is_enabled): Check for upper limit.
14701         (dbg_cnt): Adjust dumping.
14702         (dbg_cnt_set_limit_by_index): Add new argument for high
14703         value.
14704         (dbg_cnt_set_limit_by_name): Likewise.
14705         (dbg_cnt_process_single_pair): Parse new format.
14706         (dbg_cnt_process_opt): Use strtok.
14707         (dbg_cnt_list_all_counters): Remove 'value' and add
14708         'limit_high'.
14709         * doc/invoke.texi: Document changes.
14711 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
14713         * doc/sourcebuild.texi (scalar_all_fma): Document.
14714         * tree.def (FMA_EXPR): Delete.
14715         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
14716         * internal-fn.c (ternary_direct): New macro.
14717         (expand_ternary_optab_fn): Likewise.
14718         (direct_ternary_optab_supported_p): Likewise.
14719         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
14720         * builtins.c (fold_builtin_fma): Delete.
14721         (fold_builtin_3): Don't call it.
14722         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
14723         * expr.c (expand_expr_real_2): Likewise.
14724         * fold-const.c (operand_equal_p): Likewise.
14725         (fold_ternary_loc): Likewise.
14726         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
14727         * gimple.c (DEFTREECODE): Likewise.
14728         * gimplify.c (gimplify_expr): Likewise.
14729         * optabs-tree.c (optab_for_tree_code): Likewise.
14730         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
14731         * tree-eh.c (operation_could_trap_p): Likewise.
14732         (stmt_could_throw_1_p): Likewise.
14733         * tree-inline.c (estimate_operator_cost): Likewise.
14734         * tree-pretty-print.c (dump_generic_node): Likewise.
14735         (op_code_prio): Likewise.
14736         * tree-ssa-loop-im.c (stmt_cost): Likewise.
14737         * tree-ssa-operands.c (get_expr_operands): Likewise.
14738         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
14739         * fold-const-call.h (fold_fma): Delete.
14740         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
14741         CFN_FNMA and CFN_FNMS.
14742         (fold_fma): Delete.
14743         * genmatch.c (combined_fn): New enum.
14744         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
14745         (commutative_op): New function.
14746         (commutate): Use it.  Handle more than 2 operands.
14747         (dt_operand::gen_gimple_expr): Use commutative_op.
14748         (parser::parse_expr): Allow :c to be used with non-binary
14749         operators if the commutative operand is known.
14750         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
14751         CFN_FMS, CFN_FNMA and CFN_FNMS.
14752         (backprop::process_assign_use): Remove FMA_EXPR handling.
14753         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
14754         (gen_hsa_fma): New function.
14755         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
14756         IFN_FNMA and IFN_FNMS.
14757         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
14758         * gimple-fold.h (follow_all_ssa_edges): Declare.
14759         * gimple-fold.c (follow_all_ssa_edges): New function.
14760         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
14761         gimple_build interface and use follow_all_ssa_edges to fold the result.
14762         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
14763         instead of checking for optabs directly.
14764         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
14765         rather than FMA_EXPRs.
14766         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
14767         call to IFN_FMA instead of an FMA_EXPR.
14769 2018-05-17  Jim Wilson  <jimw@sifive.com>
14771         * expr.c (do_tablejump): When converting index to Pmode, if we have a
14772         sign extended promoted subreg, and the range does not have the sign bit
14773         set, then do a sign extend.
14775         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
14776         test, check for sign extended subreg and/or constant operands, and
14777         do a sign extend in that case.
14779 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
14781         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
14782         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
14783         Add untyped.
14784         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
14785         Change logics_shift_reg to logics_shift_imm.
14786         (thunderx2t99_fp_loadpair_basic): Delete.
14787         (thunderx2t99_fp_storepair_basic): Delete.
14788         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
14789         (thunderx2t99_asimd_polynomial): Delete.
14790         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
14791         and neon_fp_mul_d_scalar_q.
14792         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
14793         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
14794         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
14795         (thunderx2t99_asimd_lut): Add missing tbl types.
14796         (thunderx2t99_asimd_ext): Delete.
14797         (thunderx2t99_asimd_load1_1_mult): Delete.
14798         (thunderx2t99_asimd_load1_2_mult): Delete.
14799         (thunderx2t99_asimd_load1_ldp): New.
14800         (thunderx2t99_asimd_load1): New.
14801         (thunderx2t99_asimd_load2): Add missing *load2* types.
14802         (thunderx2t99_asimd_load3): New.
14803         (thunderx2t99_asimd_load4): New.
14804         (thunderx2t99_asimd_store1_1_mult): Delete.
14805         (thunderx2t99_asimd_store1_2_mult): Delete.
14806         (thunderx2t99_asimd_store2_mult): Delete.
14807         (thunderx2t99_asimd_store2_onelane): Delete.
14808         (thunderx2t99_asimd_store_stp): New.
14809         (thunderx2t99_asimd_store1): New.
14810         (thunderx2t99_asimd_store2): New.
14811         (thunderx2t99_asimd_store3): New.
14812         (thunderx2t99_asimd_store4): New.
14814 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
14816         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
14817         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
14819 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
14820             Segher Boessenkool  <segher@kernel.crashing.org>
14822         PR target/85698
14823         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
14824         operand.
14826 2018-05-17  Richard Biener  <rguenther@suse.de>
14828         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
14829         for pruning loop and prune defs feeding only already visited PHIs.
14831 2018-05-17  Richard Biener  <rguenther@suse.de>
14833         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
14835 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
14836             Richard Biener  <rguenther@suse.de>
14838         PR tree-optimization/85793
14839         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
14840         for VMAT_ELEMENTWISE.
14842 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
14844         * internal-fn.h (lookup_internal_fn): Declare
14845         * internal-fn.c (lookup_internal_fn): New function.
14846         * gimple.c (gimple_build_call_from_tree): Handle calls to
14847         internal functions.
14848         * gimple-pretty-print.c (dump_gimple_call): Print "." before
14849         internal function names.
14850         * tree-pretty-print.c (dump_generic_node): Likewise.
14851         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
14853 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
14855         * gimple-fold.h (gimple_build): Make the function forms take
14856         combined_fn rather than built_in_function.
14857         (gimple_simplify): Likewise.
14858         * gimple-match-head.c (gimple_simplify): Likewise.
14859         * gimple-fold.c (gimple_build): Likewise.
14860         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
14861         rather than gimple_build_call_internal.
14862         (get_initial_defs_for_reduction): Likewise.
14863         (vect_create_epilog_for_reduction): Likewise.
14864         (vectorizable_live_operation): Likewise.
14866 2018-05-17  Martin Liska  <mliska@suse.cz>
14868         * gimple-ssa-sprintf.c (format_directive): Do not use
14869         space in between 'G_' and '('.
14871 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
14873         PR target/85323
14874         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
14875         even if the mask is not all ones.
14877         PR target/85323
14878         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
14879         vector.
14880         (ix86_gimple_fold_builtin): Likewise.
14882         PR target/85323
14883         * config/i386/i386.c: Include tree-vector-builder.h.
14884         (ix86_vector_shift_count): New function.
14885         (ix86_fold_builtin): Fold shift builtins by scalar count.
14886         (ix86_gimple_fold_builtin): Likewise.
14888         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
14889         _mm512_setzero): New intrinsics.
14891 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
14892             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14894         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
14895         code generation for cases where splatting a value is not useful.
14896         * simplify-rtx.c (simplify_ternary_operation): Simplify
14897         vec_merge across a vec_duplicate and a paradoxical subreg forming
14898         a vector mode to a vec_concat.
14900 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
14902         * config.gcc: Support "goldmont-plus".
14903         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
14904         "goldmont-plus".
14905         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14906         PROCESSOR_GOLDMONT_PLUS.
14907         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
14908         (processor_target_table): Add "goldmont-plus".
14909         (PTA_GOLDMONT_PLUS): Define.
14910         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
14911         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
14912         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
14913         (fold_builtin_cpu): Add "goldmont-plus".
14914         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
14915         (ix86_option_override_internal): Add "goldmont-plus".
14916         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
14917         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
14918         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
14919         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
14921 2018-05-17  Richard Biener  <rguenther@suse.de>
14923         PR tree-optimization/85757
14924         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
14925         remove defs that only feed that PHI from further processing.
14927 2018-05-16  Jim Wilson  <jimw@sifive.com>
14929         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
14930         asterisk to name.
14931         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
14933 2018-05-16  Mark Wielaard  <mark@klomp.org>
14935         * dwarf2out.c (count_index_strings): New function.
14936         (output_indirect_strings): Call count_index_strings and generate
14937         header for dwarf_version >= 5.
14939 2018-05-16  Mark Wielaard  <mark@klomp.org>
14941         * dwarf2out.c (dwarf_FORM): New function.
14942         (set_indirect_string): Use dwarf_FORM.
14943         (reset_indirect_string): Likewise.
14944         (size_of_die): Likewise.
14945         (value_format): Likewise.
14946         (output_die): Likewise.
14947         (add_skeleton_AT_string): Likewise.
14948         (output_macinfo_op): Likewise.
14949         (index_string): Likewise.
14950         (output_index_string_offset): Likewise.
14951         (output_index_string): Likewise.
14952         (count_index_strings): Likewise.
14954 2018-05-16  Carl Love  <cel@us.ibm.com>
14956         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
14957         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
14959 2018-05-16  Martin Jambor  <mjambor@suse.cz>
14961         * ipa-prop.c (ipa_free_all_edge_args): Remove.
14962         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
14964 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
14966         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
14967         (fnma<mode>4): Likewise.
14968         (fms<mode>4): Likewise.
14969         (fnms<mode>4): Likewise.
14970         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
14971         (aarch64_fnma<mode>4): Likewise.
14972         (aarch64_fms<mode>4): Likewise.
14973         (aarch64_fnms<mode>4): Likewise.
14974         (aarch64_fnmadd<mode>4): Likewise.
14976 2018-05-16  Jason Merrill  <jason@redhat.com>
14978         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
14980 2018-05-16  Richard Biener  <rguenther@suse.de>
14982         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
14983         (dump_stmt_cost): Declare.
14984         (add_stmt_cost): Dump cost we add.
14985         (add_stmt_costs): New function.
14986         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
14987         No longer exported.
14988         (vect_analyze_stmt): Adjust prototype.
14989         (vectorizable_condition): Likewise.
14990         (vectorizable_live_operation): Likewise.
14991         (vectorizable_reduction): Likewise.
14992         (vectorizable_induction): Likewise.
14993         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
14994         cost vector to pass to vectorizable_ and record afterwards.
14995         (vect_model_reduction_cost): Take cost vector argument and adjust.
14996         (vect_model_induction_cost): Likewise.
14997         (vectorizable_reduction): Likewise.
14998         (vectorizable_induction): Likewise.
14999         (vectorizable_live_operation): Likewise.
15000         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
15001         SLP_TREE_NUMBER_OF_VEC_STMTS.
15002         (vect_analyze_slp_cost_1): Remove.
15003         (vect_analyze_slp_cost): Likewise.
15004         (vect_slp_analyze_node_operations): Take visited args and
15005         a target cost vector.  Avoid processing already visited stmt sets.
15006         (vect_slp_analyze_operations): Use a local cost vector to gather
15007         costs and register those of non-discarded instances.
15008         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
15009         (vect_schedule_slp_instance): Remove copying of
15010         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
15011         zero.
15012         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
15013         adding cost.  Record cost entry location.
15014         (vect_prologue_cost_for_slp_op): Function to compute cost of
15015         a constant or invariant generated for SLP vect in the prologue,
15016         split out from vect_analyze_slp_cost_1.
15017         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
15018         (vect_model_promotion_demotion_cost): Likewise.
15019         (vect_model_store_cost): Likewise, make static.
15020         (vect_model_load_cost): Likewise.
15021         (vectorizable_bswap): Add cost vector arg and adjust.
15022         (vectorizable_call): Likewise.
15023         (vectorizable_simd_clone_call): Likewise.
15024         (vectorizable_conversion): Likewise.
15025         (vectorizable_assignment): Likewise.
15026         (vectorizable_shift): Likewise.
15027         (vectorizable_operation): Likewise.
15028         (vectorizable_store): Likewise.
15029         (vectorizable_load): Likewise.
15030         (vectorizable_condition): Likewise.
15031         (vectorizable_comparison): Likewise.
15032         (can_vectorize_live_stmts): Likewise.
15033         (vect_analyze_stmt): Likewise.
15034         (vect_transform_stmt): Adjust calls to vectorizable_*.
15035         * tree-vectorizer.c: Include gimple-pretty-print.h.
15036         (dump_stmt_cost): New function.
15038 2018-05-16  Richard Biener  <rguenther@suse.de>
15040         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
15041         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
15042         * tree-ssa-dse.c: Include tree-ssa-loop.h.
15043         (check_name): New callback.
15044         (dse_classify_store): Track cycles via a visited bitmap of PHI
15045         defs and simplify handling of in-loop and across loop dead stores
15046         and properly fail for loop-variant refs.  Handle byte-tracking with
15047         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
15048         limiting the walk.
15050 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
15052         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
15053         (vect_get_mask_type_for_stmt): Likewise.
15054         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
15055         split out from...
15056         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
15057         to determine the statement's vector type and the vector type that
15058         should be used for calculating nunits.  Deal with cases in which
15059         the type has to be deferred.
15060         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
15061         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
15062         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
15063         (vect_determine_vf_for_stmt): New functions, split out from...
15064         (vect_determine_vectorization_factor): ...here.
15065         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
15066         (vect_get_mask_type_for_stmt): New functions, split out from
15067         vect_determine_vectorization_factor.
15069 2018-05-16  Richard Biener  <rguenther@suse.de>
15071         * tree-cfg.c (verify_gimple_assign_ternary): Properly
15072         verify the [VEC_]COND_EXPR embedded comparison.
15074 2018-05-15  Martin Sebor  <msebor@redhat.com>
15076         PR tree-optimization/85753
15077         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
15078         RECORD_TYPE in addition to ARRAY_TYPE.
15080 2018-05-15  Martin Sebor  <msebor@redhat.com>
15082         PR middle-end/85643
15083         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
15085 2018-05-15  Richard Biener  <rguenther@suse.de>
15087         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
15088         add by_clobber_p one.  Change algorithm to collect all defs
15089         representing uses we need to walk and try reducing them to
15090         a single one before failing.
15091         (dse_dom_walker::dse_optimize_stmt): Adjust.
15093 2018-05-13  Mark Wielaard  <mark@klomp.org>
15095         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
15096         (size_of_loc_descr): Likewise.
15097         (output_loc_operands): Likewise.
15098         (output_loc_operands_raw): Likewise.
15099         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
15100         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
15101         (hash_loc_operands): Likewise.
15102         (compare_loc_operands): Likewise.
15104 2018-05-14  Mark Wielaard  <mark@klomp.org>
15106         * dwarf2out.c (count_index_addrs): New function.
15107         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
15109 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15111         PR tree-optimization/83648
15112         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
15113         return value as malloc candidate.
15115 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15117         PR ipa/85734
15118         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
15119         param as true in call to suggest_attribute.
15121 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
15123         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
15124         -mreadonly-in-sdata.
15126 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15128         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
15129         New pattern.
15130         (aarch64_crypto_aesd_fused): Likewise.
15132 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
15134         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
15135         (movsi_aarch64): Likewise.
15136         (load_pairsi): Likewise.
15137         (load_pairdi): Likewise.
15138         (store_pairsi): Likewise.
15139         (store_pairdi): Likewise.
15140         (load_pairsf): Likewise.
15141         (load_pairdf): Likewise.
15142         (store_pairsf): Likewise.
15143         (store_pairdf): Likewise.
15144         (zero_extend): Likewise.
15145         (trunc): Swap alternatives.
15146         (fcvt_target): Add '?' to prefer w over r.
15148 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
15150         PR target/85756
15151         * config/i386/i386.md: Disallow non-commutative arithmetics in
15152         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
15153         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
15154         in the peephole2 before it.
15156 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
15158         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
15159         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
15160         (ix86_handle_option): Handle -mcldemote.
15161         * config.gcc: New header.
15162         * config/i386/cldemoteintrin.h: New file.
15163         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
15164         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15165         -mcldemote.
15166         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15167         OPTION_MASK_ISA_CLDEMOTE.
15168         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
15169         (ix86_valid_target_attribute_inner_p): Ditto.
15170         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
15171         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
15172         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
15173         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
15174         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
15175         (cldemote): New.
15176         * config/i386/i386.opt: Add -mcldemote.
15177         * config/i386/x86intrin.h: New header.
15178         * doc/invoke.texi: Add -mcldemote.
15180 2018-05-14  Richard Biener  <rguenther@suse.de>
15182         * doc/match-and-simplify.texi: Adjust :s documentation.
15184 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
15186         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
15187         intended memcpy size.
15188         (REORDER_45): Likewise.
15190 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
15192         * sort.cc: New file.
15193         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
15194         * vec.c (qsort_chk): Use gcc_qsort.
15195         * Makefile.in (OBJS-libcommon): Add sort.o.
15196         (build/sort.o): New target.  Use it...
15197         (BUILD_RTL): ... here, and...
15198         (build/gencfn-macros): ... here, and...
15199         (build/genmatch): ... here.
15201 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
15202             Chung-Ju Wu  <jasonwucj@gmail.com>
15204         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
15205         * config/nds32/nds32-graywolf.md: New file.
15206         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
15207         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
15208         pipeline.
15209         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
15210         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
15211         * config/nds32/nds32.md (pipeline_model): Add graywolf.
15212         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
15213         * config/nds32/pipelines.md: Include n15 settings.
15215 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
15216             Chung-Ju Wu  <jasonwucj@gmail.com>
15218         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
15219         * config/nds32/nds32-n13.md: New file.
15220         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
15221         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
15222         pipeline.
15223         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
15224         * config/nds32/nds32.md (pipeline_model): Add n13.
15225         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
15226         * config/nds32/pipelines.md: Include n13 settings.
15228 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
15229             Chung-Ju Wu  <jasonwucj@gmail.com>
15231         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
15232         * config/nds32/nds32-n10.md: New file.
15233         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
15234         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
15235         pipeline.
15236         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
15237         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
15238         * config/nds32/nds32.md (pipeline_model): Add n10.
15239         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
15240         * config/nds32/pipelines.md: Include n10 settings.
15242 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
15243             Kito Cheng  <kito.cheng@gmail.com>
15244             Chung-Ju Wu  <jasonwucj@gmail.com>
15246         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
15247         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15248         Add enum values for DSP extension instructions.
15249         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
15250         New constraints.
15251         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
15252         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
15253         New code iterators.
15254         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
15255         * config/nds32/nds32-dspext.md: New file for DSP implementation.
15256         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
15257         * config/nds32/nds32-intrinsic.md: Likewise.
15258         * config/nds32/nds32_intrinsic.h: Likewise.
15259         * config/nds32/nds32-md-auxiliary.c: Likewise.
15260         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
15261         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
15262         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
15263         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
15264         * config/nds32/nds32-protos.h: New declarations for DSP extension.
15265         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
15266         TYPE_DMAC in switch statement.
15267         * config/nds32/nds32.c: New checking and implementation for DSP
15268         extension instructions.
15269         * config/nds32/nds32.h: Likewise.
15270         * config/nds32/nds32.md: Likewise.
15271         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
15272         * config/nds32/predicates.md: Implement new predicates for DSP
15273         extension.
15275 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
15277         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
15278         Reformat alternatives and attributes so it is easier to identify
15279         which constraints/attributes go with which instruction.
15280         (mov<mode>_hardfloat32, FMOVE64): Likewise.
15281         (mov<mode>_softfloat32, FMOVE64): Likewise.
15282         (mov<mode>_hardfloat64, FMOVE64): Likewise.
15283         (mov<mode>_softfloat64, FMOVE64): Likewise.
15285 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15287         * doc/extend.texi (PowerPC Built-in Functions): Rename this
15288         subsection.
15289         (Basic PowerPC Built-in Functions): The new name of the
15290         subsection previously known as "PowerPC Built-in Functions".
15291         (Basic PowerPC Built-in Functions Available on all Configurations):
15292         New subsubsection.
15293         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
15294         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
15295         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
15296         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
15298 2018-05-11  Martin Jambor  <mjambor@suse.cz>
15300         PR ipa/85655
15301         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
15302         single const.
15304 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
15306         PR target/85733
15307         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
15309 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
15311         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
15312         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
15313         (ix86_handle_option): Handle -mwaitpkg.
15314         * config.gcc: New header.
15315         * config/i386/cpuid.h (bit_WAITPKG): New bit.
15316         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
15317         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
15318         function type.
15319         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15320         OPTION_MASK_ISA_WAITPKG.
15321         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
15322         (ix86_option_override_internal): Add PTA_WAITPKG.
15323         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
15324         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
15325         IX86_BUILTIN_TPAUSE.
15326         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
15327         __builtin_ia32_umwait and __builtin_ia32_tpause.
15328         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
15329         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
15330         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
15331         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
15332         UNSPECV_TPAUSE): New.
15333         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
15334         * config/i386/i386.opt: Add -mwaitpkg.
15335         * config/i386/waitpkgintrin.h: New file.
15336         * config/i386/x86intrin.h: New header.
15337         * doc/invoke.texi: Add -mwaitpkg.
15339 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
15341         PR target/85606
15342         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
15343         equivalent.
15344         (cortex-m0): Use armv6s-m isa.
15345         (cortex-m0plus): Likewise.
15346         (cortex-m1): Likewise.
15347         (cortex-m0.small-multiply): Likewise.
15348         (cortex-m0plus.small-multiply): Likewise.
15349         (cortex-m1.small-multiply): Likewise.
15351 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
15352             Jakub Jelinek  <jakub@redhat.com>
15354         PR tree-optimization/85692
15355         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
15356         source permute as well.
15358 2018-05-11  Martin Liska  <mliska@suse.cz>
15360         PR sanitizer/85556
15361         * doc/extend.texi: Document LLVM style format for no_sanitize
15362         attribute.
15364 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
15366         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
15367         mode_supports_vsx_dform_quad to mode_supports_dq_form.
15368         (mode_supports_vsx_dform_quad): Likewise.
15369         (mode_supports_vmx_dform): Move these functions to be next to the
15370         other mode_supports functions.
15371         (mode_supports_dq_form): Likewise.
15372         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
15373         mode_supports_dq_form.
15374         (reg_offset_addressing_ok_p): Likewise.
15375         (offsettable_ok_by_alignment): Likewise.
15376         (rs6000_legitimate_offset_address_p): Likewise.
15377         (legitimate_lo_sum_address_p): Likewise.
15378         (rs6000_legitimize_address): Likewise.
15379         (rs6000_legitimize_reload_address): Likewise.
15380         (rs6000_secondary_reload_inner): Likewise.
15381         (rs6000_preferred_reload_class): Likewise.
15382         (rs6000_output_move_128bit): Likewise.
15384 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
15386         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
15387         Generate SImode target register for null target.
15388         <case IX86_BUILTIN_XGETBV>: Ditto.
15389         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
15390         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
15392 2018-05-10  Carl Love  <cel@us.ibm.com>
15394         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15395         dcbtt and dcbtstt if operands[2] is 0.
15397 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
15399         PR target/85693
15400         * config/i386/sse.md (usadv64qi): New expander.
15402 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
15404         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
15405         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
15406         -maltivec=be support.
15407         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
15408         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
15409         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
15410         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
15411         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
15412         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
15413         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
15414         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
15415         altivec_vsumsws): Adjust.
15416         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
15417         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
15418         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
15419         support.
15420         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
15421         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
15422         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
15423         (altivec_lve<VI_char>x): Delete expand.
15424         (*altivec_lve<VI_char>x_internal): Rename to...
15425         (altivec_lve<VI_char>x): ... this.
15426         (altivec_lvxl_<mode>): Delete expand.
15427         (*altivec_lvxl_<mode>_internal): Rename to ...
15428         (altivec_lvxl_<mode>): ... this.
15429         (altivec_stvxl_<mode>): Delete expand.
15430         (*altivec_stvxl_<mode>_internal): Rename to ...
15431         (altivec_stvxl_<mode>): ... this.
15432         (altivec_stve<VI_char>x): Delete expand.
15433         (*altivec_stve<VI_char>x_internal): Rename to ...
15434         (altivec_stve<VI_char>x): ... this.
15435         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
15436         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
15437         reduc_plus_scal_<mode>): Adjust.
15438         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
15439         comment.
15440         (rs6000_cpu_cpp_builtins): Adjust.
15441         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
15442         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
15443         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
15444         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
15445         -maltivec=be support.
15446         (rs6000_split_vec_extract_var): Adjust.
15447         (rs6000_split_v4si_init): Adjust.
15448         (swap_selector_for_mode): Delete.
15449         (altivec_expand_lvx_be, altivec_expand_stvx_be,
15450         altivec_expand_stvex_be): Delete.
15451         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
15452         -maltivec=be support.
15453         (rs6000_gimple_fold_builtin): Ditto.
15454         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
15455         Adjust.
15456         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
15457         (TARGET_DIRECT_MOVE_64BIT): Adjust.
15458         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
15459         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
15460         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
15461         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
15462         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
15463         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
15464         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
15465         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
15466         anonymous split): Adjust.
15467         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
15468         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
15470 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
15472         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
15473         when --with-gxx-include-dir is also specified.
15474         * configure: Regenerate.
15476 2018-05-09  Jim Wilson  <jimw@sifive.com>
15478         PR target/84797
15479         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
15480         * config/riscv/t-withmultilib: New.
15481         * config/riscv/withmultilib.h: New.
15482         * doc/install.texi: Document RISC-V --with-multilib-list support.
15484 2018-05-09  Richard Biener  <rguenther@suse.de>
15486         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
15487         vector.
15488         (vect_bb_vectorization_profitable_p): Adjust.  Compute
15489         actual scalar cost using the cost vector and the add_stmt_cost
15490         machinery.
15492 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15494         PR rtl-optimization/85645
15495         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
15496         in the REG_CFA_REGISTER note for LR, don't leave it empty.
15498 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15500         PR rtl-optimization/85645
15501         * shrink-wrap.c (spread_components): Return a boolean saying if
15502         anything was changed.
15503         (try_shrink_wrapping_separate): Iterate spread_components until
15504         nothing changes anymore.
15506 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15508         PR rtl-optimization/85645
15509         * regrename.c (build_def_use): Also kill the chains that include the
15510         destination of a REG_CFA_REGISTER note.
15512 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15514         PR rtl-optimization/85645
15515         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
15516         insn that has a REG_CFA_REGISTER note.
15518 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
15520         * cfgexpand.c (expand_clobber): New function.
15521         (expand_gimple_stmt_1): Use it.
15522         * tree-vect-stmts.c (vect_clobber_variable): New function,
15523         split out from...
15524         (vectorizable_simd_clone_call): ...here.
15525         (vectorizable_store): Emit a clobber either side of an
15526         IFN_STORE_LANES sequence.
15527         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
15529 2018-05-09  Tom de Vries  <tom@codesourcery.com>
15531         PR target/85626
15532         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
15533         (define_insn "trap_if_false"): Add exit after trap.
15535 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
15537         PR rtl-optimization/85638
15538         * bb-reorder.c: Include common/common-target.h.
15539         (create_forwarder_block): New function extracted from...
15540         (fix_up_crossing_landing_pad): ...here.  Rename into...
15541         (dw2_fix_up_crossing_landing_pad): ...this.
15542         (sjlj_fix_up_crossing_landing_pad): New function.
15543         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
15544         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
15545         from both partitions and exit the loop after one iteration.
15547 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15549         Revert:
15550         * doc/extend.texi (PowerPC Built-in Functions): Rename this
15551         subsection.
15552         (Basic PowerPC Built-in Functions): The new name of the
15553         subsection previously known as "PowerPC Built-in Functions".
15554         (Basic PowerPC Built-in Functions Available on all Configurations):
15555         New subsubsection.
15556         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15557         subsubsection.
15558         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15559         subsubsection.
15560         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15561         subsubsection.
15562         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15563         subsubsection.
15565 2018-05-08  Jim Wilson  <jimw@sifive.com>
15567         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
15568         (LD_EMUL_SUFFIX): New.
15569         (LINK_SPEC): Use it.
15571 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15573         * doc/extend.texi (PowerPC Built-in Functions): Rename this
15574         subsection.
15575         (Basic PowerPC Built-in Functions): The new name of the
15576         subsection previously known as "PowerPC Built-in Functions".
15577         (Basic PowerPC Built-in Functions Available on all Configurations):
15578         New subsubsection.
15579         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15580         subsubsection.
15581         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15582         subsubsection.
15583         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15584         subsubsection.
15585         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15586         subsubsection.
15588 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
15590         PR target/85683
15591         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
15592         after cmpelim optimization.
15594 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
15596         * config.gcc: Support "goldmont".
15597         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
15598         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15599         PROCESSOR_GOLDMONT.
15600         * config/i386/i386.c (m_GOLDMONT): Define.
15601         (processor_target_table): Add "goldmont".
15602         (PTA_GOLDMONT): Define.
15603         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
15604         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
15605         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
15606         (fold_builtin_cpu): Add "goldmont".
15607         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
15608         (ix86_option_override_internal): Add "goldmont".
15609         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
15610         (processor_type): Add PROCESSOR_GOLDMONT.
15611         * config/i386/i386.md: Add CPU "glm".
15612         * config/i386/glm.md: New file.
15613         * config/i386/x86-tune.def: Add m_GOLDMONT.
15614         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
15616 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
15618         PR target/85572
15619         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
15620         E_V4DImode.
15621         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
15622         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
15623         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
15625         PR target/85317
15626         * config/i386/i386.c (ix86_fold_builtin): Handle
15627         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
15629         PR target/85480
15630         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
15631         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
15633 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
15635         PR target/85658
15636         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
15637         (check_arch): Likewise.
15638         (check_fpu): Return the result rather than printing it.
15639         (end arch): Fix operator precedence.
15640         (end cpu): Likewise.
15641         (END): Print the result from check_fpu.
15643 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
15644             Alan Hayward  <alan.hayward@arm.com>
15645             David Sherwood  <david.sherwood@arm.com>
15647         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
15648         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
15649         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
15650         (*fcmuo<mode>_and): New patterns.
15652 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
15654         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
15655         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
15656         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
15657         (cmp_op, sve_imm_con): New code attributes.
15658         (SVE_COND_INT_CMP, imm_con): Delete.
15659         (cmp_op): Remove above unspecs from int attribute.
15660         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
15661         to...
15662         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
15663         comparison-specific unspecs.
15664         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
15665         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
15666         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
15667         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
15668         (*vec_fcm<cmp_op><mode>): Rename to...
15669         (*fcm<cmp_op><mode>): ...this and adjust likewise.
15670         (*vec_fcmuo<mode>): Rename to...
15671         (*fcmuo<mode>): ...this and adjust likewise.
15672         (*pred_fcm<cmp_op><mode>): New pattern.
15673         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
15674         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
15675         functions.
15676         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
15677         and UNORDERED.
15678         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
15679         (aarch64_emit_sve_predicated_cond): New function.
15680         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
15681         (aarch64_emit_unspec_cond_or): Replace with...
15682         (aarch64_emit_sve_or_conds): ...this new function.  Use
15683         aarch64_emit_sve_ptrue_op for the individual comparisons and
15684         aarch64_emit_binop to OR them together.
15685         (aarch64_emit_inverted_unspec_cond): Replace with...
15686         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
15687         aarch64_emit_sve_ptrue_op for the comparison and
15688         aarch64_emit_unop to invert the result.
15689         (aarch64_expand_sve_vec_cmp_float): Update after the above
15690         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
15692 2018-05-07  Nathan Sidwell  <nathan@acm.org>
15694         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
15695         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
15696         (Backwards Compatibility): Likewise.
15698 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15700         PR bootstrap/85681
15701         Revert:
15702         2018-05-07  Luis Machado  <luis.machado@linaro.org>
15704         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15705         <prefetch_dynamic_strides>: New const bool field.
15706         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15707         prefetch_dynamic_strides.
15708         (exynosm1_prefetch_tune): Likewise.
15709         (thunderxt88_prefetch_tune): Likewise.
15710         (thunderx_prefetch_tune): Likewise.
15711         (thunderx2t99_prefetch_tune): Likewise.
15712         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15713         to false.
15714         (aarch64_override_options_internal): Update to set
15715         PARAM_PREFETCH_DYNAMIC_STRIDES.
15716         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15717         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15718         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15719         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15720         prefetch-dynamic-strides setting.
15722         2018-05-07  Luis Machado  <luis.machado@linaro.org>
15724         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15725         <minimum_stride>: New const int field.
15726         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15727         minimum_stride field.
15728         (exynosm1_prefetch_tune): Likewise.
15729         (thunderxt88_prefetch_tune): Likewise.
15730         (thunderx_prefetch_tune): Likewise.
15731         (thunderx2t99_prefetch_tune): Likewise.
15732         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15733         (aarch64_override_options_internal): Update to set
15734         PARAM_PREFETCH_MINIMUM_STRIDE.
15735         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15736         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15737         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15738         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15739         stride is constant and is below the minimum stride threshold.
15741 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15743         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
15744         to 512.
15746 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15748         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15749         <prefetch_dynamic_strides>: New const bool field.
15750         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15751         prefetch_dynamic_strides.
15752         (exynosm1_prefetch_tune): Likewise.
15753         (thunderxt88_prefetch_tune): Likewise.
15754         (thunderx_prefetch_tune): Likewise.
15755         (thunderx2t99_prefetch_tune): Likewise.
15756         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15757         to false.
15758         (aarch64_override_options_internal): Update to set
15759         PARAM_PREFETCH_DYNAMIC_STRIDES.
15760         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15761         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15762         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15763         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15764         prefetch-dynamic-strides setting.
15766 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15768         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15769         <minimum_stride>: New const int field.
15770         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15771         minimum_stride field.
15772         (exynosm1_prefetch_tune): Likewise.
15773         (thunderxt88_prefetch_tune): Likewise.
15774         (thunderx_prefetch_tune): Likewise.
15775         (thunderx2t99_prefetch_tune): Likewise.
15776         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15777         (aarch64_override_options_internal): Update to set
15778         PARAM_PREFETCH_MINIMUM_STRIDE.
15779         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15780         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15781         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15782         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15783         stride is constant and is below the minimum stride threshold.
15785 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
15787         PR c++/85659
15788         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
15789         the type is addressable.  Don't force op into register if it has
15790         BLKmode.
15792 2018-05-05  Roland McGrath  <mcgrathr@google.com>
15794         PR other/77609
15795         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
15796         any section for which we don't know a specific type it should have,
15797         regardless of name.  Previously this was done only for the exact
15798         names ".init_array", ".fini_array", and ".preinit_array".
15799         (default_elf_asm_named_section): Add comment about
15800         relationship with default_section_type_flags and SECTION_NOTYPE.
15801         (get_section): Don't consider it a type conflict if one side has
15802         SECTION_NOTYPE and the other doesn't, as long as neither has the
15803         SECTION_BSS et al used in the default_section_type_flags logic.
15805 2018-05-05  Tom de Vries  <tom@codesourcery.com>
15807         PR target/85653
15808         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
15809         (workaround_barsyncs): New function.
15810         (nvptx_reorg): Use workaround_barsyncs.
15811         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15812         (define_expand "nvptx_membar_cta"): New define_expand.
15813         (define_insn "*nvptx_membar_cta"): New insn.
15815 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
15817         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
15818         To improve optimization opportunities.
15819         * builtin-types.def: The new needed builtin types for the above.
15821 2018-05-04  Richard Biener  <rguenther@suse.de>
15823         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
15824         * gimple-ssa-store-merging.c
15825         (imm_store_chain_info::output_merged_store): Remove redundant create,
15826         release split_store vector contents on failure.
15827         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
15828         scalar stmt vector on cache hit.
15830 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
15832         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
15833         Xilinx FP support.
15834         * config.gcc (powerpc-xilinx-eabi*): Remove.
15835         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
15836         support.
15837         (fusion_addis_mem_combo_load): Ditto.
15838         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
15839         FP support.
15840         (rs6000_cpu_cpp_builtins): Ditto.
15841         * config/rs6000/rs6000-linux.c
15842         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
15843         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
15844         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
15845         support.
15846         (rs6000_setup_reg_addr_masks): Ditto.
15847         (rs6000_init_hard_regno_mode_ok): Ditto.
15848         (rs6000_option_override_internal): Ditto.
15849         (legitimate_lo_sum_address_p): Ditto.
15850         (rs6000_legitimize_address): Ditto.
15851         (rs6000_legitimize_reload_address): Ditto.
15852         (rs6000_legitimate_address_p): Ditto.
15853         (abi_v4_pass_in_fpr): Ditto.
15854         (setup_incoming_varargs): Ditto.
15855         (rs6000_gimplify_va_arg): Ditto.
15856         (rs6000_split_multireg_move): Ditto.
15857         (rs6000_savres_strategy): Ditto.
15858         (rs6000_emit_prologue_components): Ditto.
15859         (rs6000_emit_epilogue_components): Ditto.
15860         (rs6000_emit_prologue): Ditto.
15861         (rs6000_emit_epilogue): Ditto.
15862         (rs6000_elf_file_end): Ditto.
15863         (rs6000_function_value): Ditto.
15864         (rs6000_libcall_value): Ditto.
15865         * config/rs6000/rs6000.h: Ditto.
15866         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
15867         (TARGET_MINMAX): ... this.  New.
15868         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
15869         * config/rs6000/rs6000.md: Remove Xilinx FP support.
15870         (*movsi_internal1_single): Delete.
15871         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
15872         mfpu=, mxilinx-fpu): Delete.
15873         * config/rs6000/singlefp.h: Delete.
15874         * config/rs6000/sysv4.h: Remove Xilinx FP support.
15875         * config/rs6000/t-rs6000: Ditto.
15876         * config/rs6000/t-xilinx: Delete.
15877         * config/rs6000/titan.md: Adjust for fp_type removal.
15878         * config/rs6000/vsx.md: Remove Xilinx FP support.
15879         (VStype_simple): Delete.
15880         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
15881         * config/rs6000/xfpu.h: Delete.
15882         * config/rs6000/xfpu.md: Delete.
15883         * config/rs6000/xilinx.h: Delete.
15884         * config/rs6000/xilinx.opt: Delete.
15885         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
15886         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
15888 2018-05-04  Tom de Vries  <tom@codesourcery.com>
15890         PR libgomp/85639
15891         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
15892         if ignore == 0.
15894 2018-05-04  Richard Biener  <rguenther@suse.de>
15896         PR middle-end/85627
15897         * tree-complex.c (update_complex_assignment): We are always in SSA form.
15898         (expand_complex_div_wide): Likewise.
15899         (expand_complex_operations_1): Likewise.
15900         (expand_complex_libcall): Preserve EH info of the original stmt.
15901         (tree_lower_complex): Handle removed blocks.
15902         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
15903         on complex multiplication and division libcall builtins.
15905 2018-05-04  Richard Biener  <rguenther@suse.de>
15907         PR middle-end/85574
15908         * fold-const.c (negate_expr_p): Restrict negation of operand
15909         zero of a division to when we know that can happen without
15910         overflow.
15911         (fold_negate_expr_1): Likewise.
15913 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
15915         PR libstdc++/85466
15916         * real.h (real_nextafter): Declare.
15917         * real.c (real_nextafter): New function.
15918         * fold-const-call.c (fold_const_nextafter): New function.
15919         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
15920         CASE_CFN_NEXTTOWARD.
15921         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
15922         even when arg1_mode is different from arg0_mode.
15924 2018-05-03  Nathan Sidwell  <nathan@acm.org>
15926         * doc/extend.texi (Deprecated Features): Remove
15927         -ffriend-injection.
15928         (Backwards Compatibility): Likewise.
15929         * doc/invoke.texi (C++ Language Options): Likewise.
15930         (C++ Dialect Options): Likewise.
15932 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
15934         PR target/85530
15935         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
15936         _mm512_mask_mullox_epi64): New intrinsics.
15938 2018-05-03  Tom de Vries  <tom@codesourcery.com>
15940         PR testsuite/85106
15941         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
15942         dump files): Add offload-tree.
15944 2018-05-03  Richard Biener  <rguenther@suse.de>
15946         PR tree-optimization/85615
15947         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
15948         to loops not nested in BBs loop father to avoid creating multi-entry
15949         loops.
15951 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15953         PR tree-optimization/70291
15954         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
15955         arguments.  Change return type to tree.  Emit libcall as a new
15956         statement rather than replacing existing one when inplace_p is true.
15957         (expand_complex_multiplication_components): New function.
15958         (expand_complex_multiplication): Expand floating-point complex
15959         multiplication using the above.
15960         (expand_complex_division): Rename inner_type parameter to type.
15961         Update expand_complex_libcall call-site.
15962         (expand_complex_operations_1): Update expand_complex_multiplication
15963         and expand_complex_division call-sites.
15965 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
15967         PR target/85582
15968         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
15969         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
15970         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
15971         the highest significant bit of the shift count mask is clear.  In
15972         check whether and[sq]i3 is needed verify that all significant bits
15973         of the shift count other than the highest are set.
15975 2018-05-02  Tom de Vries  <tom@codesourcery.com>
15977         PR libgomp/82428
15978         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
15979         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
15980         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
15981         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
15982         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
15983         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
15984         __builtin_goacc_parlevel_size.
15986 2018-05-02  Richard Biener  <rguenther@suse.de>
15988         PR tree-optimization/85597
15989         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
15990         do not use split vect_get_vec_defs call but call vect_get_slp_defs
15991         directly.
15993 2018-05-02  Tom de Vries  <tom@codesourcery.com>
15995         PR testsuite/85106
15996         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
15997         dump files): Add ltrans-tree.
15999 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16001         PR testsuite/85106
16002         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16003         dump files): Add wpa-ipa.
16005 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
16007         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
16008         powerpc*-*-linux*paired* target.
16009         * config/rs6000/750cl.h: Delete.
16010         * config/rs6000/paired.h: Delete.
16011         * config/rs6000/paired.md: Delete.
16012         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
16013         float support.
16014         * config/rs6000/rs6000-builtin.def: Remove paired float support.
16015         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
16016         comment.  Remove paired float support.
16017         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
16018         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
16019         VECTOR_PAIRED.
16020         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
16021         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
16022         declarations.
16023         * config/rs6000/rs6000.c: Remove paired float support.
16024         (paired_expand_vector_init, paired_expand_vector_move,
16025         paired_emit_vector_compare, paired_emit_vector_cond_expr,
16026         (paired_expand_lv_builtin, paired_expand_stv_builtin,
16027         paired_expand_builtin, paired_expand_predicate_builtin,
16028         paired_init_builtins): Delete.
16029         * config/rs6000/rs6000.h: Remove paired float support.
16030         * config/rs6000/rs6000.md: Remove paired float support.
16031         (move_from_CR_ov_bit): Delete.
16032         * config/rs6000/rs6000.opt (mpaired): Delete.
16033         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
16034         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
16036 2018-05-02  Richard Biener  <rguenther@suse.de>
16038         PR middle-end/85567
16039         * gimplify.c (gimplify_save_expr): When in SSA form allow
16040         SAVE_EXPRs to compute to SSA vars.
16042 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
16044         PR target/85582
16045         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16046         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16047         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
16048         clobber operands[2], instead use a new pseudo.  Formatting fixes.
16050 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
16052         PR tree-optimization/85586
16053         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
16054         exit early for statements in the same group if the accesses are
16055         not strided.
16057 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16059         PR lto/85451
16060         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
16061         error message.
16063 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
16065         PR tree-optimization/85143
16066         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
16068 2018-05-01  Tom de Vries  <tom@codesourcery.com>
16070         PR lto/85451
16071         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
16072         not found" error message.
16074 2018-05-01  Tom de Vries  <tom@codesourcery.com>
16076         PR other/83786
16077         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
16078         * vec.c (test_ordered_remove_if): New function.
16079         (vec_c_tests): Call test_ordered_remove_if.
16080         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
16081         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
16082         * tree-vect-patterns.c (vect_pattern_recog_1): Use
16083         VEC_ORDERED_REMOVE_IF.
16085 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16087         PR tree-optimization/82665
16088         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
16089         pointer subtraction where arguments come from a memchr call.
16091 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
16093         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
16094         --push-state --as-needed and --pop-state instead of --as-needed and
16095         --no-as-needed if ld supports it.
16096         * configure: Regenerated.
16098         PR web/85578
16099         * doc/install.texi2html: Replace _002d with - and _002a with * in
16100         generated html files using sed.
16102 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16104         PR c++/85523
16105         * gcc-rich-location.c (blank_line_before_p): New function.
16106         (use_new_line): New function.
16107         (gcc_rich_location::add_fixit_insert_formatted): New function.
16108         * gcc-rich-location.h
16109         (gcc_rich_location::add_fixit_insert_formatted): New function.
16111 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16113         * selftest.c (assert_streq): Rename "expected" and "actual" to
16114         "val1" and "val2".  Extend NULL-handling to cover both inputs
16115         symmetrically, while still requiring both to be non-NULL for a pass.
16116         * selftest.h (assert_streq): Rename "expected" and "actual" to
16117         "val1" and "val2".
16118         (ASSERT_EQ): Likewise.
16119         (ASSERT_EQ_AT): Likewise.
16120         (ASSERT_KNOWN_EQ): Likewise.
16121         (ASSERT_KNOWN_EQ_AT): Likewise.
16122         (ASSERT_NE): Likewise.
16123         (ASSERT_MAYBE_NE): Likewise.
16124         (ASSERT_MAYBE_NE_AT): Likewise.
16125         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
16126         the assertion to pass.
16127         (ASSERT_STREQ_AT): Likewise.
16129 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
16131         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
16132         interaction with -pie.
16134 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16136         * selftest.h: Fix alphabetization of per-source-file selftest
16137         declarations.
16139 2018-04-30  Jason Merrill  <jason@redhat.com>
16141         PR c++/61982 - dead stores to destroyed objects.
16142         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
16143         of clobber.
16145 2018-04-30  Jason Merrill  <jason@redhat.com>
16147         * tree.c (build_clobber): New.
16148         * tree.h: Declare it.
16149         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
16151 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16153         * diagnostic-show-locus.c (layout::layout): Update for
16154         location_get_source_line returning a char_span.
16155         (struct char_span): Move to input.h.
16156         (struct correction): Update for fields in char_span becoming
16157         private.
16158         (struct source_line): Update for location_get_source_line
16159         returning a char_span.
16160         (layout::print_line): Likewise.
16161         * edit-context.c (edited_file::print_content): Likewise.
16162         (edited_file::print_diff_hunk): Likewise.
16163         (edited_file::print_run_of_changed_lines): Likewise.
16164         (edited_file::get_num_lines): Likewise.
16165         (edited_line::edited_line): Likewise.
16166         * final.c (asm_show_source): Likewise.
16167         * input.c (location_get_source_line): Convert return type
16168         from const char * to char_span, losing the final "line_len"
16169         param.
16170         (dump_location_info): Update for the above.
16171         (get_substring_ranges_for_loc): Likewise.  Use a char_span
16172         when handling the literal within the line.
16173         (test_reading_source_line): Update for location_get_source_line
16174         returning a char_span.
16175         * input.h (class char_span): Move here from
16176         diagnostic-show-locus.c, converting from a struct to a class.
16177         Make data members private.
16178         (char_span::operator bool): New.
16179         (char_span::length): New.
16180         (char_span::get_buffer): New.
16181         (char_span::operator[]): New.
16182         (char_span::subspan): Make const.
16183         (char_span::xstrdup): New.
16184         (location_get_source_line): Convert return type from const char *
16185         to char_span, losing the final "line_size" param.
16187 2018-04-30  Jan Hubicka  <jh@suse.cz>
16189         * lto-wrapper.c (ltrans_priorities): New static var.
16190         (cmp_priority): New.
16191         (run_gcc): Read priorities and if doing parallel build order
16192         the Makefile by them.
16194 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16196         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
16198 2018-04-30  Richard Biener  <rguenther@suse.de>
16200         * tree-cfg.c (verify_address): Remove base argument, add
16201         flag whether to check TREE_ADDRESSABLE and do that.
16202         (verify_expr): Remove.
16203         (verify_types_in_gimple_reference): Add pieces from verify_expr.
16204         (verify_gimple_assign_single): Likewise.
16205         (verify_gimple_switch): Likewise.
16206         (verify_expr_location_1): Dereference tp once.  Add (disabled)
16207         piece from verify_expr.
16208         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
16210 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
16212         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
16214 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
16216         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
16217         (small_data_pattern): Likewise.
16218         (arc_rewrite_small_data): Likewise.
16219         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
16220         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
16221         (get_symbol_alignment): New function.
16222         (legitimate_small_data_address_p): Likewise.
16223         (legitimate_scaled_address): Update, call
16224         legitimate_small_data_address_p.
16225         (output_sdata): New static variable.
16226         (arc_print_operand): Update how we handle small data operands.
16227         (arc_print_operand_address): Likewise.
16228         (arc_legitimate_address_p): Update, use
16229         legitimate_small_data_address_p.
16230         (arc_rewrite_small_data_p): Remove.
16231         (arc_rewrite_small_data_1): Likewise.
16232         (arc_rewrite_small_data): Likewise.
16233         (small_data_pattern): Likewise.
16234         (compact_sda_memory_operand): Update to use
16235         legitimate_small_data_address_p and get_symbol_alignment.
16236         (prepare_move_operands): Don't rewite sdata pattern.
16237         (prepare_extend_operands): Remove.
16238         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
16239         pattern.
16240         (zero_extendqisi2): Likewise.
16241         (zero_extendhisi2): Likewise.
16242         (extendqihi2): Likewise.
16243         (extendqisi2): Likewise.
16244         (extendhisi2): Likewise.
16245         (addsi3): Likewise.
16246         (subsi3): Likewise.
16247         (andsi3): Likewise.
16248         * config/arc/constraints.md (Usd): Change it to memory constraint.
16250 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
16252         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
16253         as source of std instructions.
16254         * config/arc/arc.md (movsi_insn): Update pattern predicate to
16255         allow 6-bit constants as source for store instructions.
16256         (movdi_insn): Update instruction pattern to allow 6-bit constants
16257         as source for store instructions.
16259 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
16261         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
16263 2018-04-30  Nathan Sidwell  <nathan@acm.org>
16264             Sandra Loosemore <sandra@codesourcery.com>
16266         * dumpfile.c (dump_open): Allow '-' for stdout.
16267         * doc/invoke.texi (Developer Options): Document dump filename
16268         determination early.  Document stdin/stdout selection.
16270 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
16272         Microblaze Target: PIC data text relative
16274         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
16275         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
16276         Add declaration.
16277         * config/microblaze/microblaze.h (microblaze_constant_address_p):
16278         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
16279         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
16280         New addressing mode for data-text relative position indepenedent code.
16281         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
16282         'ADDRESS_SYMBOLIC_TXT_REL'.
16283         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
16284         (microblaze_legitimate_pic_operand): Exclude function calls from
16285         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
16286         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
16287         addresses cases.
16288         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16289         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16290         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
16291         for 'address + offset'.
16292         (microblaze_expand_prologue): Add new function prologue call for
16293         'r20' assignation.
16294         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
16295         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
16296         table in case of TARGET_PIC_DATA_TEXT_REL.
16297         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
16298         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
16299         Add new macros 'UNSPEC_TEXT',
16300         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
16301         + exclude function calls from 'UNSPEC_PLT' in case of data text
16302         relative mode.
16303         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16304         new target hook for generating address diff vector tables in case of
16305         flag_pic.
16306         * doc/tm.texi : Regenerate.
16307         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
16308         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
16309         of addr diff vector generation.
16310         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16311         target hook definition.
16312         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
16313         Add default function for generate_pic_addr_diff_vec -> flag_pic.
16314         * doc/invoke.texi (Add new pic option): Add new microblaze pic
16315         option for data text relative.
16317 2018-04-30  Richard Biener  <rguenther@suse.de>
16319         * tree-chrec.h (evolution_function_is_constant_p): Remove
16320         redundant check.
16321         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
16323 2018-04-30  Richard Biener  <rguenther@suse.de>
16325         PR bootstrap/85571
16326         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
16328 2018-04-30  Richard Biener  <rguenther@suse.de>
16330         PR tree-optimization/28364
16331         PR tree-optimization/85275
16332         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
16333         copying first exit test.
16335 2018-04-28  Mark Wielaard  <mark@klomp.org>
16337         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
16338         dwarf_version >= 5.
16339         (dwarf_AT): Handle DW_AT_addr_base.
16340         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
16342 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
16344         PR target/84431
16345         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
16346         (*ashl<dwi>3_doubleword_mask_1): Ditto.
16347         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
16348         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
16350 2018-04-28  Richard Biener  <rguenther@suse.de>
16352         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
16353         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
16354         to reflect use.  Only add interesting stmts.
16356 2018-04-27  Martin Jambor  <mjambor@suse.cz>
16358         PR ipa/85549
16359         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
16360         the jump function allows for passing through aggregate values.
16362 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
16364         * input.h (in_system_header_at): Convert from macro to inline
16365         function.
16366         (from_macro_expansion_at): Likewise.
16367         (from_macro_definition_at): Likewise.
16369 2018-04-27  Jeff Law  <law@redhat.com>
16371         * config.gcc: Mark tile* targets as deprecated/obsolete.
16373 2018-04-27  Richard Biener  <rguenther@suse.de>
16375         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
16376         fix for ILP32.
16378 2018-04-27  Richard Biener  <rguenther@suse.de>
16380         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
16382 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
16384         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
16385         with Yd constraint. Set "preferred_for_speed" attribute from
16386         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
16387         with Yd constraint.
16388         (*movdi_internal): Ditto.
16389         (movti_interunit splitters): Remove
16390         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
16391         (movdi_interunit splitters): Ditto.
16392         * config/i386/constraints.md (Ye): Remove.
16393         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
16395 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16397         PR target/85512
16398         * config/aarch64/constraints.md (Usg): Limit to 31.
16399         (Usj): Limit to 63.
16401 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
16403         PR tree-optimization/85529
16404         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
16405         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
16406         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
16407         zero extension or masking of the MSB bit.
16408         (optimize_range_tests): Add FIRST_BB argument, pass it through
16409         to optimize_range_tests_var_bound.
16410         (maybe_optimize_range_tests, reassociate_bb): Adjust
16411         optimize_range_tests callers.
16413 2018-04-26  Richard Biener  <rguenther@suse.de>
16414             Jakub Jelinek  <jakub@redhat.com>
16416         * cgraph.h (symbol_table): Just declare debug method here.
16417         * symtab.c (symbol_table::debug): Define.
16419 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
16421         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
16423 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
16425         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
16426         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
16427         (*movdi_internal): Substitute Yi and Yj constraint with x
16428         and Ym and Yn constraint with y constraint.  Update "isa"
16429         attribute and set "preferred_for_speed" attribute from
16430         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
16431         (*movsi_internal): Ditto.
16432         (*movdf_internal): Ditto.
16433         (*movsf_internal): Ditto.
16434         (*zero_extendsidi2): Ditto.
16435         * config/i386/sse.md (vec_set<mode>_0): Ditto.
16436         (sse2_loadld): Ditto.
16437         (*vec_extract<ssevecmodelower>_0): Ditto.
16438         (*vec_extractv4si_0_zext_sse4): Ditto.
16439         (vec_concatv2di): Ditto.
16440         (*vec_dup<mode>): Ditto.
16441         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
16442         * config/i386/constraints.md (Yi): Remove.
16443         (Yj): Remove.
16444         (Ym): Remove.
16445         (Yn): Remove.
16447 2018-04-26  Nathan Sidwell  <nathan@acm.org>
16449         * dumpfile.c (dump_open): New.
16450         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
16451         (dump_finish): Detect stdio/stderr by value not name.
16453 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
16455         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
16457 2018-04-26  Tom de Vries  <tom@codesourcery.com>
16459         PR target/84952
16460         * config/nvptx/nvptx.c (verify_neutering_jumps)
16461         (verify_neutering_labels): New function
16462         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
16464 2018-04-26  Tom de Vries  <tom@codesourcery.com>
16466         PR target/84025
16467         * config/nvptx/nvptx.c (needs_neutering_p): New function.
16468         (nvptx_single): Use needs_neutering_p to skip over insns that do not
16469         need neutering.
16471 2018-04-26  Richard Biener <rguenther@suse.de>
16472             Tom de Vries  <tom@codesourcery.com>
16474         PR lto/85422
16475         * lto-streamer-out.c (output_function): Fixup loops if required to match
16476         discovery done in the reader.
16478 2018-04-26  Richard Biener  <rguenther@suse.de>
16480         PR tree-optimization/85116
16481         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
16482         have a loop exit from the single latch predecessor.  Remove
16483         case of header with just condition.
16484         (ch_base::copy_headers): Exclude infinite loops from any
16485         processing.
16486         (pass_ch::execute): Record exits.
16488 2018-04-26  Richard Biener  <rguenther@suse.de>
16490         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
16491         prologue cost vector and pass it to vect_get_load_cost.
16492         (vect_get_peeling_costs_all_drs): Likewise.
16493         (vect_peeling_hash_get_lowest_cost): Likewise.
16494         (vect_enhance_data_refs_alignment): Likewise.
16496 2018-04-26  Richard Biener  <rguenther@suse.de>
16498         PR middle-end/85450
16499         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
16500         checking of integer<->pointer conversions.
16501         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
16502         sign-/zero-extending pointer types.
16503         (expand_omp_for_static_chunk): Likewise.
16505 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
16506             Jean Lee  <xiaoyur347@gmail.com>
16508         * config/mips/mips.c (mips_asan_shadow_offset): New function.
16509         (TARGET_ASAN_SHADOW_OFFSET): Define.
16510         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
16511         true for -fsanitize=address.
16513 2018-04-25  Mark Wielaard  <mark@klomp.org>
16515         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
16516         shorter ones.
16518 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
16520         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
16521         than "alu", remove explicit "memory" and "imm_disp" attributes.
16522         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
16524         PR middle-end/85414
16525         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
16526         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
16527         gen_lowpart_no_emit.
16529 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
16531         PR target/85473
16532         * config/i386/i386.c (ix86_expand_builtin): Change memory
16533         operand to XI, extend p0 to Pmode.
16534         * config/i386/i386.md: Change unspec volatile and operand
16535         1 mode to XI, change operand 0 mode to P.
16537 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16539         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
16540         GET_MODE_MASK before any checking.
16541         (nds32_can_use_bset_p): Likewise.
16542         (nds32_can_use_btgl_p): Likewise.
16544 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16546         * config/nds32/nds32-doubleword.md: New define_split pattern for
16547         illegal register number.
16549 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16551         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
16553 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16555         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
16557 2018-04-25  Richard Biener  <rguenther@suse.de>
16559         * lto-streamer.h (LTO_major_version): Bump to 8.
16561 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
16563         * BASE-VER: Set to 9.0.0.
16565 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
16567         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
16568         in __abskf2 and __powikf2.
16570 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16572         PR target/85512
16573         * config/aarch64/constraints.md (Usg, Usj): New constraints.
16574         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
16575         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
16576         Use the above on operand 2.  Reindent.
16577         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
16579 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
16581         PR target/85485
16582         * common/config/i386/i386-common.c (ix86_handle_option): Don't
16583         handle OPT_mcet.
16584         * config/i386/i386.opt (mcet): Removed.
16585         * doc/install.texi: Remove -mcet documentation.
16586         * doc/invoke.texi: Likewise.
16588 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
16590         PR target/85485
16591         * doc/install.texi: Remove -mcet from bootstrap-cet.
16593 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
16595         PR target/85511
16596         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
16597         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
16598         if TARGET_64BIT.
16600         PR target/85503
16601         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
16602         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
16603         containing a CONST_VECTOR.
16605 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
16607         * doc/install.texi: Update newlib dependency for nvptx.
16609 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
16611         PR target/85508
16612         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
16613         instead of INTVAL when shifting x left.
16615 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
16617         PR tree-optimization/85478
16618         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
16619         vect_grouped_store_supported for single element vectors.
16621 2018-04-24  Richard Biener  <rguenther@suse.de>
16623         PR target/85491
16624         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
16625         load cost increase to the case of non-constant step.
16627 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
16629         PR target/84828
16630         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
16631         destination if any_malformed_asm.
16633 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
16635         PR middle-end/85496
16636         * expr.c (store_field): In the bitfield case, if the value comes from
16637         a function call and is returned in registers by means of a PARALLEL,
16638         do not change the mode of the temporary unless BLKmode and VOIDmode.
16640 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
16642         PR rtl-optimization/85423
16643         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
16644         dependencies to debug insns when the previous insn is non-debug.
16646 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
16648         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
16649         enums into a single definition.
16650         (fls): Fix predicates and printing.
16651         (seti): Likewise.
16653 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
16655         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
16656         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
16657         and short u6 immediate.
16658         (check_if_valid_sleep_operand): Remove.
16659         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
16661 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16663         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
16664         flag_always_save_lp condition.
16665         * config/nds32/nds32.opt (malways-save-lp): New option.
16667 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
16669         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
16670         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
16671         * config/nds32/nds32.h
16672         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
16673         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
16675 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
16677         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
16678         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
16680 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
16681             Chung-Ju Wu  <jasonwucj@gmail.com>
16683         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
16684         Declare.
16685         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
16686         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
16688 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16690         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
16692 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16694         * config/nds32/nds32-protos.h (nds32_data_alignment,
16695         nds32_local_alignment): Declare.
16696         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
16697         nds32_local_alignment): New functions.
16698         (TARGET_CONSTANT_ALIGNMENT): Define.
16699         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
16701 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16703         * config/nds32/nds32.c
16704         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
16705         (TARGET_MODES_TIEABLE_P): Likewise.
16707 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16709         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
16710         level Ofast and Og.
16712 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
16713             Chung-Ju Wu  <jasonwucj@gmail.com>
16715         * config/nds32/constants.md (unspec_volatile_element): Add enum values
16716         for unaligned access.
16717         * config/nds32/nds32-intrinsic.c: Implementation of expanding
16718         unaligned access.
16719         * config/nds32/nds32-intrinsic.md: Likewise.
16720         * config/nds32/nds32_intrinsic.h: Likewise.
16721         * config/nds32/nds32.h (nds32_builtins): Likewise.
16722         * config/nds32/nds32.opt (munaligned-access): New option.
16723         * config/nds32/nds32.c (nds32_asm_file_start): Display
16724         flag_unaligned_access status.
16726 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
16728         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
16729         -mno-relax is present.
16730         * config/riscv/linux.h (LINK_SPEC): Ditto.
16732 2018-04-20  Martin Sebor  <msebor@redhat.com>
16734         PR c/85365
16735         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
16736         for null pointers.
16737         (gimple_fold_builtin_stxcpy_chk): Same.
16738         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
16740 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
16742         PR target/85456
16743         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
16744         __powikf2 when long double is IEEE 128-bit.
16746 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
16748         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
16749         step to make sure stack always aligned.
16751 2018-04-20  Carl Love  <cel@us.ibm.com>
16753         PR target/83402
16754         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
16755         size check for arg0.
16757 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
16758             Tom de Vries  <tom@codesourcery.com>
16760         PR target/85445
16761         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
16762         Emit insns for calls too.
16763         (nvptx_find_par): Always look for worker-level predecessor insn.
16764         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
16765         calls.
16766         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
16767         (nvptx_process_pars): Propagate frames for calls.
16769 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
16771         PR target/85469
16772         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
16773         Removed.
16774         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
16775         (ix86_handle_option): Don't handle OPT_mibt.
16776         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
16777         __SHSTK__.
16778         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
16779         has_ibt and ibt.
16780         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
16781         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
16782         (ix86_target_macros): Define __CET__ with flag_cf_protection
16783         for -fcf-protection.
16784         * config/i386/i386.c (isa2_opts): Remove -mibt.
16785         * config/i386/i386.h (TARGET_IBT): Removed.
16786         (TARGET_IBT_P): Likewise.
16787         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
16788         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
16789         * config/i386/i386.opt (mcet): Update help message.
16790         (mshstk): Likewise.
16791         (mibt): Removed.
16792         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
16793         -mcet as an alias for -mshstk.
16795 2018-04-20  Richard Biener <rguenther@suse.de>
16797         PR middle-end/85475
16798         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
16799         complexity by forcing a single use of the multiply operand.
16801 2018-04-20  Martin Jambor  <mjambor@suse.cz>
16803         ipa/85449
16804         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
16805         recursion dependency to only apply to non-clones.
16807 2018-04-20  Martin Jambor  <mjambor@suse.cz>
16809         ipa/85447
16810         * ipa-cp.c (create_specialized_node): Check that clones of
16811         self-recursive edges exist during IPA-CP.
16813 2018-04-19  Toon Moene  <toon@moene.org>
16815         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
16816         by -O3.
16818 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
16820         PR tree-optimization/85467
16821         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
16822         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
16823         VECTOR_CST element to type.
16825 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
16827         PR target/85397
16828         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
16829         * config/i386/i386.md (builtin_setjmp_setup): Removed.
16830         (builtin_longjmp): Likewise.
16831         (save_stack_nonlocal): New pattern.
16832         (restore_stack_nonlocal): Likewise.
16834 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
16836         PR target/85404
16837         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16838         Replace ASM_OUTPUT_LABEL with fprintf.
16840 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
16842         PR target/85417
16843         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16844         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
16845         * config/i386/i386-c.c (ix86_target_macros_internal): Also
16846         define __IBT__ and __SHSTK__ for -fcf-protection.
16847         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
16848         TARGET_IBT.
16849         (ix86_trampoline_init): Likewise.
16850         (x86_output_mi_thunk): Likewise.
16851         (ix86_notrack_prefixed_insn_p): Likewise.
16852         (ix86_option_override_internal): Don't disallow -fcf-protection.
16853         * config/i386/i386.md (rdssp<mode>): Also enable for
16854         -fcf-protection.
16855         (incssp<mode>): Likewise.
16856         (nop_endbr): Likewise.
16857         * config/i386/i386.opt (mcet): Change help message to built-in
16858         functions only.
16859         (mibt): Likewise.
16860         (mshstk): Likewise.
16861         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
16862         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
16863         enable CET built-in functions.
16865 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
16867         * common/config/i386/i386-common.c
16868         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
16869         OPTION_MASK_ISA_MOVDIRI_UNSET,
16870         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
16871         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
16872         * config.gcc (movdirintrin.h): New header.
16873         * config/i386/cpuid.h (bit_MOVDIRI,
16874         bit_MOVDIR64B): New bits.
16875         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
16876         and -mmvodir64b.
16877         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
16878         (VOID, PVOID, PCVOID)): New function types.
16879         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
16880         __builtin_ia32_directstoreu_u64,
16881         __builtin_ia32_movdir64b): New builtins.
16882         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
16883         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
16884         and -mmovdiri.
16885         (ix86_valid_target_attribute_inner_p): Ditto.
16886         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
16887         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
16888         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
16889         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
16890         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
16891         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
16892         (movdiri<mode>, movdir64b_<mode>): New.
16893         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
16894         * config/i386/immintrin.h: Include movdirintrin.h.
16895         * config/i386/movdirintrin.h: New file.
16896         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
16898 2018-04-19  Richard Biener  <rguenther@suse.de>
16900         PR middle-end/85455
16901         * cfg.c (clear_bb_flags): When loop state says we have
16902         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
16904 2018-04-19  Richard Biener  <rguenther@suse.de>
16906         PR tree-optimization/84737
16907         * tree-vect-data-refs.c (vect_copy_ref_info): New function
16908         copying restrict info.
16909         (vect_setup_realignment): Use it.
16910         * tree-vectorizer.h (vect_copy_ref_info): Declare.
16911         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
16912         the first DR to all generated stores.
16913         (vectorizable_load): Likewise for loads.
16915 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
16917         PR tree-optimization/85446
16918         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
16919         the integral and pointer types to have the same precision.
16921         * doc/install.texi: Document --disable-cet being the default and
16922         --enable-cet=auto.
16924 2018-04-18  Martin Liska  <mliska@suse.cz>
16926         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
16927         style.
16929 2018-04-18  Martin Liska  <mliska@suse.cz>
16931         Revert
16932         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
16934         PR ipa/83983
16935         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16936         arguments if they are comparable.
16938 2018-04-18  Martin Liska  <mliska@suse.cz>
16940         Revert
16941         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
16943         PR lto/84805
16944         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16945         incomplete types.
16947 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
16949         PR target/85388
16950         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
16951         ENDBR after calling __morestack.
16953 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
16955         PR jit/85384
16956         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
16957         by using gcc_base_ver to generate a gcc_driver_version, and use
16958         it when generating GCC_DRIVER_NAME.
16959         * configure: Regenerate.
16961 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
16963         PR target/81084
16964         * config.gcc: Obsolete powerpc*-*-*spe*.
16966 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
16968         PR debug/84637
16969         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
16970         (stabstr_D): Change type of unum from unsigned int to
16971         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
16972         type.
16974 2018-04-17  Jim Wilson  <jimw@sifive.com>
16976         PR 84856
16977         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
16978         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
16979         Set arg_pointer_offset after using pretend_args_size.
16981 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
16983         PR rtl-optimization/85431
16984         * dse.c (record_store): Ignore zero width stores.
16986         PR sanitizer/85230
16987         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
16988         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
16989         __builtin_stack_restore rather than after it.
16990         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
16991         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
16992         argument instead of virtual_dynamic_stack_rtx.
16994 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16996         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
16997         New prototype.
16998         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
16999         Add note to error message to explain internal mapping of overloaded
17000         built-in function name to non-overloaded built-in function name.
17001         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
17002         function.
17004 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
17006         PR target/85424
17007         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
17008         where the inputs overlap with the output.
17010 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17012         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
17013         (=v, v) alternative and explicit "memory" attribute.
17014         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
17015         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17016         attributes.
17017         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
17018         "sselog1" type instead of "sselog".
17019         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
17020         "sselog".  Remove explicit "memory" attribute.
17021         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
17022         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17023         attributes.
17024         (vec_extract_hi_v32hi): Merge all alternatives into one, use
17025         "sselog1" type instead of "sselog".  Remove explicit "memory"
17026         attribute.
17027         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
17028         use "sselog1" type instead of "sselog".  Remove explicit "memory"
17029         attribute.
17030         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
17031         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17032         attributes.
17033         (vec_extract_hi_v64qi): Merge all alternatives into one, use
17034         "sselog1" type instead of "sselog".  Remove explicit "memory"
17035         attribute.
17036         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
17037         use "sselog1" type instead of "sselog".  Remove explicit "memory"
17038         attribute.
17040         PR target/85430
17041         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
17043         PR middle-end/85414
17044         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
17045         on a SUBREG.
17047 2018-04-17  Martin Jambor  <mjambor@suse.cz>
17049         PR ipa/85421
17050         * ipa-cp.c (create_specialized_node): Call
17051         expand_all_artificial_thunks if necessary.
17053 2018-04-17  Martin Liska  <mliska@suse.cz>
17055         PR lto/85405
17056         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
17057         in message, remote space in between '_G' and '('.
17059 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17061         PR target/85281
17062         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
17063         avx512f_vmcmp<mode>3<round_saeonly_name>,
17064         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
17065         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
17066         avx512f_rndscale<mode><round_saeonly_name>,
17067         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
17068         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
17069         Use %<iptr>2 instead of %2 for -masm=intel.
17070         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
17071         avx512f_vcvttss2usi<round_saeonly_name>,
17072         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
17073         -masm=intel.
17074         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
17075         avx512f_vcvttsd2usi<round_saeonly_name>,
17076         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
17077         Use %q1 instead of %1 for -masm=intel.
17078         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
17079         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
17080         of %3 for -masm=intel.
17081         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
17082         -masm=intel.
17083         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
17084         -masm=intel.
17085         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
17086         -masm=intel.
17087         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
17088         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
17089         %g1.
17090         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
17091         -masm=intel.
17092         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
17093         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
17094         %g1 and one with %0 and %1.
17095         (avx512er_vmrcp28<mode><round_saeonly_name>,
17096         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
17097         %1 for -masm=intel.
17098         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
17099         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
17100         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
17101         of %0 and %{%4%} for -masm=intel.
17102         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
17103         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
17104         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
17105         order of %0 and %{%5%}%{z%} for -masm=intel.
17107 2018-04-17  Jan Hubicka  <jh@suse.cz>
17109         PR lto/85405
17110         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
17112 2018-04-17  Martin Liska  <mliska@suse.cz>
17114         PR ipa/85329
17115         * multiple_target.c (create_dispatcher_calls): Set apostrophes
17116         for target_clone error message.  Make default implementation
17117         clone to be a local declaration.
17118         (separate_attrs): Add new argument and check for an empty
17119         string.
17120         (expand_target_clones): Handle it.
17121         (ipa_target_clone): Make redirection just for target_clones
17122         functions.
17124 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
17125             Tom de Vries  <tom@codesourcery.com>
17127         PR middle-end/84955
17128         * omp-expand.c (expand_oacc_for): Add dummy false branch for
17129         tiled basic blocks without omp continue statements.
17131 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
17133         PR target/83660
17134         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
17135         vec_extract expression as having side effects to make sure it gets
17136         a cleanup point.
17138 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
17140         PR target/85403
17141         * config/i386/i386.c (get_builtin_code_for_version): Check
17142         error_mark_node.
17144 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
17146         PR target/84331
17147         * config.gcc: Support "skylake".
17148         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17149         PROCESSOR_SKYLAKE.
17150         * config/i386/i386.c (m_SKYLAKE): Define.
17151         (processor_target_table): Add "skylake".
17152         (ix86_option_override_internal): Add "skylake".
17153         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
17154         PROCESSOR_CANNONLAKE.
17155         (get_builtin_code_for_version): Fix priority for
17156         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
17157         PROCESSOR_SKYLAKE-AVX512.
17158         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
17159         (processor_type): Add PROCESSOR_SKYLAKE.
17161 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
17162             Jason Merrill  <jason@redhat.com>
17164         PR c++/85112
17165         * convert.c (convert_to_integer_1): Use direct recursion for
17166         enumeral types and types with a precision less than the number
17167         of bits in their mode.
17169 2018-04-16  Julia Koval  <julia.koval@intel.com>
17171         PR target/84413
17172         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
17173         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
17175 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
17177         PR target/85293
17178         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
17179         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
17180         and -mno-direct-move.
17182 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
17184         PR target/83402
17185         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
17186         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
17187         Ensure negative shifts result in {0}.
17189 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
17191         PR rtl-optimization/79916
17192         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
17193         regs (if any) to define how to gnerate SD moves when LRA is in
17194         progress.
17196 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
17198         PR rtl-optimization/85393
17199         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
17200         * except.c (expand_dw2_landing_pad_for_region): Make static.
17201         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
17202         a label and unconditional jump to old_bb, rather than
17203         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
17204         basic block.
17206         PR rtl-optimization/85376
17207         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
17208         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
17209         instead of a specific value.
17211 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
17212             Bin Cheng  <bin.cheng@arm.com>
17214         PR tree-optimization/82965
17215         PR tree-optimization/83991
17216         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
17217         by_profile_only parameter.
17218         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
17219         information if the loop was predicted to iterate too many times.
17220         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
17222 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
17224         PR lto/71991
17225         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
17226         always inline.
17228 2018-04-13  Martin Liska  <mliska@suse.cz>
17229             Jakub Jelinek  <jakub@redhat.com>
17231         PR middle-end/81657
17232         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
17233         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
17234         * builtins.c (expand_builtin_memory_copy_args): Use
17235         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
17236         handle dest_addr == pc_rtx.
17238 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
17240         PR target/85291
17241         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
17242         asked to not generate direct moves.
17243         (fix_trunc<mode>si2_stfiwx): Similar.
17244         (fix_trunc<mode>si2_internal): Similar.
17246 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
17248         PR debug/83157
17249         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
17250         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
17251         lookup if dest in some wider mode is known to be const0_rtx and
17252         if so, record permanent equivalence for it to be ZERO_EXTEND of
17253         the narrower mode destination.
17255 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
17257         * lto-streamer-out.c (output_function): Revert 259346.
17258         * omp-expand.c (expand_oacc_for): Likewise.
17260 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
17262         PR rtl-optimization/85354
17263         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
17264         * sel-sched.c (sel_global_init): ... here.
17266 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
17268         PR target/85238
17269         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
17270         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
17271         mode for PE-COFF targets.
17272         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
17273         (i386_pe_asm_lto_end): Likewise.
17274         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
17275         (TARGET_ASM_LTO_END): Likewise.
17276         * config/i386/winnt.c (saved_debug_info_level): New static variable.
17277         (i386_pe_asm_lto_start): New function.
17278         (i386_pe_asm_lto_end): Likewise.
17280 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
17281             Richard Biener  <rguenther@suse.de>
17283         PR middle-end/84955
17284         * lto-streamer-out.c (output_function): Fix CFG loop state before
17285         streaming out.
17286         * omp-expand.c (expand_oacc_for): Handle calls to internal
17287         functions like regular functions.
17289 2018-04-12  Richard Biener  <rguenther@suse.de>
17291         PR lto/85371
17292         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
17293         for the early LTO debug to properly generate references to it
17294         during DIE emission.  Do not re-use that for the skeleton for
17295         split-dwarf.
17296         (dwarf2out_early_finish): Likewise.
17298 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
17300         PR target/85328
17301         * config/i386/sse.md
17302         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
17303         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
17304         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
17305         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
17306         and output is a reg, avoid creating invalid lowpart subreg, but
17307         instead split into a 512-bit move.  Don't split if not AVX512VL,
17308         input is xmm16+ reg and output is a mem.
17309         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
17310         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
17311         xmm16+ reg and output is a mem.
17313 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17315         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
17316         also for flag_dwarf2_cfi_asm.
17318 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
17320         PR rtl-optimization/85342
17321         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
17322         a bool scalar var inside of the loop instead.  Don't try to update
17323         recog_data.operand after failed apply_change_group.
17325 2018-04-12  Tom de Vries  <tom@codesourcery.com>
17327         PR target/85296
17328         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
17329         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
17330         array with flexible array member as array without given dimension.
17331         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
17332         argument for undefined param to true.
17334 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
17336         PR target/85321
17337         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17338         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
17339         from PowerPC section.
17340         * config/rs6000/sysv4.opt (mcall-): Improve help text.
17341         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
17342         help text that is too long.
17343         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
17344         help text that is too long.
17345         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
17346         help text that is too long.
17348 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
17350         * config/alpha/alpha.md (stack_probe_internal): Rename
17351         from "probe_stack".  Update all callers.
17353 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
17355         PR rtl-optimization/84566
17356         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
17357         sched_macro_fuse_insns.
17359 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
17361         PR target/84301
17362         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
17363         (compute_block_dependences): ... from here.
17365 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
17367         PR tree-optimization/85331
17368         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
17369         from int to HOST_WIDE_INT.
17371 2018-04-11  Martin Jambor  <mjambor@suse.cz>
17373         PR ipa/84149
17374         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
17375         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
17376         not the same as the source val.
17377         (cgraph_edge_brings_value_p): New parameter.
17378         (gather_edges_for_value): Pass destination value to
17379         cgraph_edge_brings_value_p.
17380         (perhaps_add_new_callers): Likewise.
17381         (get_info_about_necessary_edges): Likewise and exclude values brought
17382         only by self-recursive edges.
17383         (create_specialized_node): Redirect only clones of self-calling edges.
17384         (+self_recursive_pass_through_p): New function.
17385         (find_more_scalar_values_for_callers_subset): Use it.
17386         (find_aggregate_values_for_callers_subset): Likewise.
17387         (known_aggs_to_agg_replacement_list): Removed.
17388         (decide_whether_version_node): Re-calculate known constants for all
17389         remaining context clones.
17391 2018-04-11  Richard Biener  <rguenther@suse.de>
17393         PR lto/85339
17394         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
17395         from early DWARF output.
17396         (dwarf2out_early_finish): Output line info unconditionally into
17397         early DWARF and add reference to it.
17399 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
17401         PR target/85281
17402         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
17403         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
17404         other than V2DFmode using iptr mode attribute.
17405         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
17407 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
17409         PR rtl-optimization/84659
17410         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
17412 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
17414         PR debug/85302
17415         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
17416         SIZEP is NULL.
17417         (output_loc_list): Pass address of a dummy size variable even in the
17418         locview handling loop.
17419         (index_location_lists): Add comment on why skip_loc_list_entry can't
17420         call size_of_locs.
17422 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17424         PR target/85261
17425         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
17426         into register.
17428 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
17430         PR target/85321
17431         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17432         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
17433         and -mstring-compare-inline-limit.
17435 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
17437         PR target/85287
17438         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
17439         for stack clash protection in a register whenever we need it to be in
17440         a register.
17442 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
17444         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
17445         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
17447 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
17449         PR target/85321
17450         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
17451         the help text.
17452         (mlong-double-): Ditto.
17453         * config/rs6000/sysv4.opt (msdata=): Ditto.
17454         (mtls-size=): Ditto.
17456 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17458         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17459         erroneous entries for
17460         "vector int vec_ldl (int, long int *)", and
17461         "vector unsigned int vec_ldl (int, unsigned long int *)".
17462         Add comments and entries for
17463         "vector bool char vec_ldl (int, bool char *)",
17464         "vector bool short vec_ldl (int, bool short *)",
17465         "vector bool int vec_ldl (int, bool int *)",
17466         "vector bool long long vec_ldl (int, bool long long *)",
17467         "vector pixel vec_ldl (int, pixel *)",
17468         "vector long long vec_ldl (int, long long *)",
17469         "vector unsigned long long vec_ldl (int, unsigned long long *)".
17470         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
17471         type tree bool_long_long_type_node and correct definition of
17472         bool_V2DI_type_node to make reference to this new type tree.
17473         (rs6000_mangle_type): Replace erroneous reference to
17474         bool_long_type_node with bool_long_long_type_node.
17475         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
17476         comments to emphasize sign distinctions for char and int types and
17477         replace RS6000_BTI_bool_long constant with
17478         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
17479         use of RS6000_BTI_pixel.
17480         (bool_long_type_node): Remove this macro definition.
17481         (bool_long_long_type_node): New macro definition
17483 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
17485         PR rtl-optimization/85300
17486         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
17487         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
17488         simplify_unary_operation fails.
17490 2018-04-10  Martin Liska  <mliska@suse.cz>
17492         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
17493         cgraph_edge and ipa_ref.
17495 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
17497         PR target/85177
17498         PR target/85255
17499         * config/i386/sse.md
17500         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
17501         computation of the VEC_MERGE selector from mask.
17502         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
17503         Fix decoding of the VEC_MERGE selector into mask.
17505 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
17507         PR tree-optimization/85286
17508         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
17510 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
17512         * final.c (final_1): Set insn_last_address as well as
17513         insn_current_address.
17515 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17517         PR target/85173
17518         * explow.c (emit_stack_probe): Call validize_mem on memory location
17519         before passing it to gen_probe_stack.  Create address operand and
17520         legitimize it for the probe_stack_address case.
17522 2018-04-09  Jan Hubicka  <jh@suse.cz>
17524         PR lto/85078
17525         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
17526         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
17527         * tree.c (free_lang_data_in_type): Fix handling of binfos;
17528         walk basetypes.
17529         (free_lang_data): Rebuild type inheritance graph.
17531 2018-04-09  Martin Sebor  <msebor@redhat.com>
17533         * invoke.texi (-finline-small-functions): Mention other optimization
17534         options.
17535         (-findirect-inlining, -fpartial-inlining): Same.
17536         (-finline-functions-called-once): Same.
17537         (-freorder-blocks-and-partition): Same.
17539 2018-04-09  Jan Hubicka  <jh@suse.cz>
17541         PR rtl/84058
17542         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
17543         jumps; choose last target that matches the criteria (i.e.
17544         no partition changes for non-crossing jumps).
17545         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
17546         support for redirecting crossing jumps to non-crossing.
17548 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
17550         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
17551         also for naked functions.
17553 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
17555         * config/arc/arc.md (add_shift): New pattern.
17556         (add_shift2): Likewise.
17557         (sub_shift): Likewise.
17558         (sub_shift_cmp0_noout): Likewise.
17559         (compare_si_ashiftsi): Likewise.
17560         (xbfu_cmp0_noout): New combine pattern.
17561         (xbfu_cmp0"): Likewise.
17562         (movsi_set_cc_insn): Place the predicable variant first.
17563         (commutative_binary_cmp0_noout): Remove clobber.
17564         (commutative_binary_cmp0): New pattern.
17565         (noncommutative_binary_cmp0): Likewise.
17566         (noncommutative_binary_cmp0_noout): Likewise.
17567         (noncommutative_binary_comparison_result_used): Removed.
17568         (rsub_cmp0): New pattern.
17569         (rsub_cmp0_noout): Likewise.
17570         (extzvsi): Changed, keep only meaningful variants.
17571         (SQH, SEZ): New iterators.
17572         (SQH_postfix): New mode attribute.
17573         (SEZ_prefix): New code attribute.
17574         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
17575         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
17576         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
17577         of numerical value.
17578         (noncommutative_operator): Check the availability of barrel
17579         shifter option.
17581 2018-04-09  Richard Biener  <rguenther@suse.de>
17583         PR tree-optimization/85284
17584         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
17585         Only use the niter constraining form of simple_iv when the exit
17586         is always executed.
17588 2018-04-09  Tom de Vries  <tom@codesourcery.com>
17590         PR target/84041
17591         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17592         (define_expand "*memory_barrier"): New define_expand.
17593         (define_insn "memory_barrier"): New insn.
17595 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
17597         PR rtl-optimization/80463
17598         PR rtl-optimization/83972
17599         PR rtl-optimization/83480
17601         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
17602         correct producer for the insn.
17603         (tidy_control_flow): Fixup seqnos in case of debug insns.
17605 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
17607         PR rtl-optimization/83913
17609         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
17610         different sched-times when merging exprs.
17612 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
17614         PR rtl-optimization/83962
17616         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
17617         tidy_fallthru_edge and tidy_control_flow.
17619 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
17621         PR rtl-optimization/83530
17623         * sel-sched.c (force_next_insn): New global variable.
17624         (remove_insn_for_debug): When force_next_insn is true, also leave only
17625         next insn in the ready list.
17626         (sel_sched_region): When the region wasn't scheduled, make another pass
17627         over it with force_next_insn set to 1.
17629 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
17631         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
17632         into tm_file.
17633         * config/nds32/constants.md (unspec_volatile_element): Add enum values
17634         for interrupt control.
17635         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17636         functions for interrupt control.
17637         * config/nds32/nds32-intrinsic.md: Likewise.
17638         * config/nds32/nds32_intrinsic.h: Likewise.
17639         * config/nds32/nds32.h (nds32_builtins): Likewise.
17641 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
17643         * config/nds32/nds32.c (nds32_init_machine_status,
17644         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
17645         strict_aligned_p field.
17646         (nds32_expand_to_rtl_hook): New function.
17647         (TARGET_EXPAND_TO_RTL_HOOK): Define.
17648         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
17650 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17651             Chung-Ju Wu  <jasonwucj@gmail.com>
17653         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
17654         * config/nds32/nds32-n7.md: New file.
17655         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
17656         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
17657         pipeline.
17658         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
17659         * config/nds32/nds32.md (pipeline_model): Add n7.
17660         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
17661         * config/nds32/pipelines.md: Include n7 settings.
17663 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17664             Chung-Ju Wu  <jasonwucj@gmail.com>
17666         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
17667         * config/nds32/nds32-e8.md: New file.
17668         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
17669         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
17670         pipeline.
17671         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
17672         * config/nds32/nds32.md (pipeline_model): Add e8.
17673         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
17674         * config/nds32/pipelines.md: Include e8 settings.
17676 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17677             Chung-Ju Wu  <jasonwucj@gmail.com>
17679         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
17680         * config/nds32/nds32-n8.md: New file.
17681         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
17682         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
17683         pipeline.
17684         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
17685         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
17686         * config/nds32/nds32.md (pipeline_model): Add n8.
17687         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
17688         * config/nds32/pipelines.md: Include n8 settings.
17690 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17691             Chung-Ju Wu  <jasonwucj@gmail.com>
17693         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
17694         * config/nds32/nds32-n9-2r1w.md: New file.
17695         * config/nds32/nds32-n9-3r2w.md: New file.
17696         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
17697         nds32_register_ports): New or modify for cpu n9.
17698         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
17699         pipeline.
17700         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
17701         * config/nds32/nds32-utils.c: New file.
17702         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
17703         TARGET_MUL_SLOW): Define.
17704         * config/nds32/nds32.md (pipeline_model): New attribute.
17705         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
17706         New options that support cpu n9.
17707         * config/nds32/pipelines.md: Include n9 settings.
17708         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
17710 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
17712         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
17713         information if necessary.
17714         (output_cond_branch_compare_zero): Likewise.
17715         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
17716         (nds32_target_alignment): Refine for alignment.
17717         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
17718         (FUNCTION_BOUNDARY): Modify.
17719         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
17720         align case.
17721         * config/nds32/nds32.opt (malways-align, malign-functions): New.
17723 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
17725         * config/nds32/constants.md (unspec_volatile_element): Add values for
17726         TLB operation and data prefetch.
17727         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17728         functions for TLB operation and data prefetch.
17729         * config/nds32/nds32-intrinsic.md: Likewise.
17730         * config/nds32/nds32_intrinsic.h: Likewise.
17731         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
17732         (nds32_print_operand): Likewise.
17733         * config/nds32/nds32.h (nds32_builtins): Likewise.
17735 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
17736         Andrew Pinski <pinsika@gcc.gnu.org>
17738         PR middle-end/82976
17739         * match.pd: Use constant_boolean_node of correct type instead of
17740         boolean_true_node or boolean_false_node for simplifying
17741         pointer comparisons to zero.
17743 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
17745         PR tree-optimization/80021
17746         * tree.c (verify_type_variant): Make error call in verify_variant_match
17747         translatable and remove final full stop.
17749 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17751         * config/nds32/constants.md (unspec_volatile_element): Add
17752         UNSPEC_VOLATILE_EH_RETURN.
17753         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
17754         nds32_output_stack_pop): Support dwarf exception handling process.
17755         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
17756         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
17757         exception handling process.
17758         (nds32_compute_stack_frame): Likewise.
17759         (nds32_return_addr_rtx): Likewise.
17760         (nds32_initial_elimination_offset): Likewise.
17761         (nds32_expand_prologue): Likewise.
17762         (nds32_expand_epilogue): Likewise.
17763         (nds32_dynamic_chain_address): New function.
17764         * config/nds32/nds32.h (machine_function): Add fields for dwarf
17765         exception handling.
17766         (DYNAMIC_CHAIN_ADDRESS): Define.
17767         (EH_RETURN_DATA_REGNO): Define.
17768         (EH_RETURN_STACKADJ_RTX): Define.
17769         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
17770         patterns for dwarf exception handling.
17772 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17774         * config/nds32/nds32.h: Clean up obsolete macros.
17776 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17778         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17779         Add enum values for particular instructions.
17780         * config/nds32/nds32-intrinsic.c: Implementation of expanding
17781         particular intrinsic functions.
17782         * config/nds32/nds32-intrinsic.md: Likewise.
17783         * config/nds32/nds32_intrinsic.h: Likewise.
17784         * config/nds32/nds32.h (nds32_builtins): Likewise.
17785         * config/nds32/nds32.md (type): Add pbsad and pbsada.
17786         (btst, ave): New patterns for particular instructions.
17788 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17790         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17791         Add enum values for atomic load/store and memory sync.
17792         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
17793         and memory sync.
17794         * config/nds32/nds32-intrinsic.md: Likewise.
17795         * config/nds32/nds32_intrinsic.h: Likewise.
17796         * config/nds32/nds32.h (nds32_builtins): Likewise.
17798 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
17800         PR tree-optimization/85257
17801         * fold-const.c (native_encode_vector): If not all elts could fit
17802         and off is -1, return 0 rather than offset.
17803         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
17804         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
17805         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
17806         adjust buffer in native_interpret_expr call.
17808 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17810         * config/nds32/constants.md (unspec_volatile_element): Add cache
17811         control enum values.
17812         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
17813         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
17814         * config/nds32/nds32.c (nds32_cctl_names): New.
17815         (nds32_print_operand): Handle cache control register names.
17816         * config/nds32/nds32.h (nds32_builtins): New enum values.
17817         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
17818         macros.
17819         * config/nds32/nds32.md (type): Add mmu.
17820         * config/nds32/pipelines.md (simple_insn): Add mmu.
17822 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17824         * config/nds32/nds32.md (type): Remove call.
17825         * config/nds32/pipelines.md (simple_insn): Likewise.
17827 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17829         * config/nds32/constants.md (unspec_volatile_element): Add
17830         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
17831         UNSPEC_VOLATILE_FMFCFG.
17832         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
17833         description for fmfcfg and fmfcsr.
17834         (bdesc_1arg): Add fmtcsr.
17835         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
17836         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
17837         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
17838         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
17839         unspec_fmfcfg): New patterns.
17840         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
17841         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
17842         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
17843         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
17844         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
17845         __nds32__fmfcfg): Define.
17847 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17849         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
17850         intrinsic register names.
17851         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
17852         intrinsic register enum values and macros.
17854 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17856         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
17857         for load/store addressing form.
17858         (nds32_print_operand_address): Likewise.
17860 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
17862         PR target/85196
17863         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
17864         based on LABEL_REF.  Remove useless assertion.
17865         (pic_address_needs_scratch): Fix formatting.
17866         (sparc_legitimize_pic_address): Minor tweaks.
17867         (sparc_delegitimize_address): Adjust assertion accordingly.
17868         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
17869         into symbolic_operand.
17870         (movsi_high_pic_label_ref): Likewise.
17871         (movsi_lo_sum_pic_label_ref): Likewise.
17872         (movdi_pic_label_ref): Likewise.
17873         (movdi_high_pic_label_ref): Likewise.
17874         (movdi_lo_sum_pic_label_ref): Likewise.
17876 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
17878         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
17879         custom LIB_SPEC setup.
17881 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
17882             Kito Cheng  <kito.cheng@gmail.com>
17884         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
17885         * config/riscv/freebsd.h: New.
17887 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
17889         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
17890         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
17891         file.
17893 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
17894             Kito Cheng  <kito.cheng@gmail.com>
17896         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
17897         nds32_output_call, nds32_symbol_binds_local_p): New functions.
17898         * config/nds32/nds32-protos.h (nds32_output_call,
17899         nds32_output_return): Declare.
17900         * config/nds32/nds32.md: Refine all the call and return patterns.
17902 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
17904         PR debug/85252
17905         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
17906         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
17908         PR rtl-optimization/84872
17909         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
17910         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
17911         EDGE_CROSSING edge.
17913 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
17915         * expr.c (copy_blkmode_to_reg): Revert 254862.
17916         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
17918 2018-04-06  Richard Biener  <rguenther@suse.de>
17920         PR middle-end/85244
17921         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
17922         after seeing a component reference with an adjacent field.  Treat
17923         refs to arrays at struct end of external decls similar to
17924         refs to unconstrained commons.
17926 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
17928         PR sanitizer/85213
17929         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
17930         look through SAVE_EXPRs with non-side-effects argument.  Adjust
17931         recursive calls.
17932         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
17933         save_p here.
17935 2018-04-06  Richard Biener  <rguenther@suse.de>
17937         PR middle-end/85180
17938         * alias.c (find_base_term): New wrapper around find_base_term
17939         unwinding CSELIB_VAL_PTR changes.
17940         (find_base_term): Do not restore CSELIB_VAL_PTR during the
17941         recursion.
17943 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17945         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
17946         instructions.
17947         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
17948         constant definitions.
17949         ("nop"): lr 0,0 -> nopr r0
17950         ("nop_lr0", "nop_lr1"): New insn definitions.
17952 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
17954         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
17955         NDS32_V3PUSH_AVAILABLE_P macro.
17957 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
17958             Chung-Ju Wu  <jasonwucj@gmail.com>
17960         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
17961         (nds32*-*-*): Add float and fpu_config into supported_defaults.
17962         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
17963         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
17964         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
17965         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
17966         * config/nds32/constraints.md: New constraints and checking for hard
17967         float configuration.
17968         * config/nds32/iterators.md: New mode iterator and attribute for hard
17969         float configuration.
17970         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
17971         patterns.
17972         * config/nds32/nds32-fpu.md: New file.
17973         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
17974         deal with hard float code generation.
17975         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
17976         ARCH_V3S.
17977         (abi_type, float_reg_number): New enum type.
17978         * config/nds32/nds32-predicates.c: New predicates for hard float.
17979         * config/nds32/nds32-protos.h: Declare functions for hard float.
17980         * config/nds32/nds32.c: Implementation for hard float configuration.
17981         * config/nds32/nds32.h: Definitions for hard float configuration.
17982         * config/nds32/nds32.md: Include hard float machine description and
17983         modify patterns for hard float configuration.
17984         * config/nds32/nds32.opt: New options for hard float configuration.
17985         * config/nds32/predicates.md: New predicates for hard float
17986         configuration.
17988 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
17990         * common/config/nds32/nds32-common.c
17991         (nds32_option_optimization_table): Enable -mreleax-hint by default.
17993 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
17995         PR middle-end/85195
17996         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
17997         CONSTRUCTOR_ELT (ctor, ...)->value.
17999 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
18001         PR target/85193
18002         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
18004 2018-04-05  Tom de Vries  <tom@codesourcery.com>
18006         PR target/85204
18007         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
18008         cond jump.
18010 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
18011             Kito Cheng  <kito.cheng@gmail.com>
18013         * config/nds32/constraints.md (U33): Fine-tune checking condition.
18014         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
18015         * config/nds32/nds32.h (nds32_16bit_address_type): Add
18016         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
18018 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
18019             Kito Cheng  <kito.cheng@gmail.com>
18021         * config/nds32/constraints.md (Ufe): New memory constraint.
18022         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
18023         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
18024         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
18025         operands.
18026         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
18027         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
18029 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18031         * config/nds32/nds32.md: Use optimize_size in the condition for
18032         alu-shift instructions.
18034 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18036         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
18038 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18040         * config/nds32/nds32.md (negsi2): Refine pattern.
18042 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
18043             Chung-Ju Wu  <jasonwucj@gmail.com>
18045         * config/nds32/iterators.md (shift_rotate): New code iterator.
18046         (shift): New code attribute.
18047         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
18048         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
18049         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
18050         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
18051         bit-wise operations.
18052         (andsi3, *andsi3): Ditto.
18053         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
18054         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
18055         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
18056         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
18057         nds32_ior_operand, nds32_xor_operand): New predicates.
18059 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18061         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
18062         (addsi3, subsi3): ... this.
18064 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18066         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
18068 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18070         * config/nds32/nds32.md: Adjust indention.
18072 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
18074         * config/nds32/nds32.md (feature): New attribute.
18076 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18078         * config/nds32/nds32.md (subtype): New attribute.
18080 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18082         PR target/85203
18083         * config/arm/arm-builtins.c (arm_expand_builtin): Change
18084         expansion to perform a bitwise AND of the argument followed by a
18085         boolean negation of the result.
18087 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
18089         PR rtl-optimization/84878
18090         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
18091         the basic block.  Assert the use reference is not artificial and that
18092         it has an associated insn.
18094 2018-04-04  Michael Matz  <matz@suse.de>
18096         * builtins.c (compute_objsize): Pass correct operand
18097         to array_at_struct_end_p.
18099 2018-04-04  Richard Biener  <rguenther@suse.de>
18101         PR lto/85176
18102         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
18103         from contexts for DINFO_LEVEL_TERSE and below.
18105 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
18107         * config/nds32/nds32-doubleword.md (move_<mode>): Require
18108         resiter_operand condition.
18109         * config/nds32/nds32.md (*move<mode>): Ditto.
18111 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
18112             Monk Chiang  <sh.chiang04@gmail.com>
18114         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
18116 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18118         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
18120 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18121             Kito Cheng  <kito.cheng@gmail.com>
18123         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
18124         nds32_cond_code_str, output_cond_branch,
18125         output_cond_branch_compare_zero, nds32_expand_cbranch,
18126         nds32_expand_cstore, nds32_expand_movcc,
18127         nds32_output_cbranchsi4_equality_zero,
18128         nds32_output_cbranchsi4_equality_reg,
18129         nds32_output_cbranchsi4_equality_reg_or_const_int,
18130         nds32_output_cbranchsi4_greater_less_zero: New functions.
18131         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
18132         nds32_expand_cstore, nds32_expand_movcc,
18133         nds32_output_cbranchsi4_equality_zero,
18134         nds32_output_cbranchsi4_equality_reg,
18135         nds32_output_cbranchsi4_equality_reg_or_const_int,
18136         nds32_output_cbranchsi4_greater_less_zero): Declare.
18137         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
18138         nds32_rimm11s_operand): New predicates.
18139         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
18140         * config/nds32/nds32.md: Rewrite all the branch and conditional move
18141         patterns.
18143 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
18145         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
18146         * config/nds32/nds32.md: Ditto.
18147         * config/nds32/pipelines.md: Ditto.
18149 2018-04-04  Richard Biener  <rguenther@suse.de>
18151         PR tree-optimization/85168
18152         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
18153         propagating abnormals.
18155 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18157         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
18159 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18160             Kito Cheng  <kito.cheng@gmail.com>
18162         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
18163         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
18164         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
18165         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
18166         * config/nds32/nds32.md (sibcall_internal): New.
18167         (sibcall_register): Remove.
18168         (sibcall_immediate): Remove.
18169         (sibcall_value_internal): New.
18170         (sibcall_value_register): Remove.
18171         (sibcall_value_immediate): Remove.
18172         * config/nds32/predicates.md (nds32_general_register_operand): New.
18173         (nds32_call_address_operand): New.
18175 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
18177         PR rtl-optimization/85167
18178         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
18179         bb_defs if *split_p, instead preinitialize it to NULL.
18181         PR tree-optimization/85156
18182         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
18183         evaluating the argument multiple times.
18185 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
18187         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
18188         than vector.
18189         (_mm_cvtpd_ps): Likewise.
18190         (_mm_cvttpd_epi32): Likewise.
18191         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
18192         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
18193         vector, pixel, and bool following altivec.h include.
18195 2018-04-03  Martin Sebor  <msebor@redhat.com>
18197         * doc/extend.texi (Common Function Attributes): Clarify.
18198         (const attribute): Likewise.
18199         (pure attribute): Likewise.
18201 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
18203         PR target/85169
18204         * config/i386/i386.c (ix86_expand_vector_set): Use
18205         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
18207 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
18209         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
18210         instructions when changing rounding bits to preserve precision bits
18211         in the x87 control word.
18213 2018-04-03  Martin Liska  <mliska@suse.cz>
18215         PR tree-optimization/82491
18216         * rtl.h (strip_offset_and_add): Replace += suboffset with
18217         poly_uint64 () + suboffset.
18219 2018-03-29  Martin Liska  <mliska@suse.cz>
18220             Martin Jambor  <mjambor@suse.cz>
18222         PR ipa/84947
18223         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
18224         param_type is not an integral or pointer type.
18226 2018-04-03  Richard Biener  <rguenther@suse.de>
18228         * sese.h (recompute_all_dominators): Remove.
18230 2018-04-02  Martin Sebor  <msebor@redhat.com>
18232         * doc/invoke.texi (-Wrestrict): Fix typos.
18234 2018-04-02  Jim Wilson  <jimw@sifive.com>
18236         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
18237         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
18238         (<optab>di3, <optab>si3_extend): Likewise.
18239         (<optab>si3_mask, <optab>si3_mask_1): New.
18240         (<optab>di3_mask, <optab>di3_mask_1): New.
18241         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
18242         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
18243         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
18245 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
18247         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
18248         example.
18250 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
18252         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
18253         (nds32_canonicalize_comparison): New function.
18255 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
18256             Kito Cheng  <kito.cheng@gmail.com>
18257             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
18259         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
18260         * config/nds32/constants.md (unspec_volatile_element): Add
18261         UNSPEC_VOLATILE_RELAX_GROUP.
18262         * config/nds32/nds32-relax-opt.c: New file.
18263         * config/nds32/nds32-predicates.c
18264         (nds32_symbol_load_store_p): New function.
18265         * config/nds32/nds32-protos.h
18266         (nds32_symbol_load_store_p): Declare function.
18267         (make_pass_nds32_relax_opt): Declare new rtl pass function.
18268         * config/nds32/nds32.c
18269         (nds32_register_pass): New function to register pass.
18270         (nds32_register_passes): New function to register passes.
18271         * config/nds32/nds32.md (relax_group): New pattern.
18272         * config/nds32/nds32.opt (mrelax-hint): New option.
18273         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
18275 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
18277         * config/nds32/t-nds32: Modify files dependency.
18279 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
18281         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
18282         (PROFILE_HOOK): Define its implementation.
18284 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
18286         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
18287         type and 32-bit size.
18289 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
18291         PR middle-end/85090
18292         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
18293         (V_128_256): New mode iterator.
18294         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
18295         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
18296         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
18297         of V.
18298         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
18299         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
18301 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
18303         PR target/83315
18304         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
18305         NaN inputs correctly.
18307 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
18309         PR target/80546
18310         * config/rs6000/vsx.md (??r): New mode attribute.
18311         (*vsx_mov<mode>_64bit): Use it.
18312         (*vsx_mov<mode>_32bit): Likewise.
18314 2018-03-30  Martin Sebor  <msebor@redhat.com>
18316         PR tree-optimization/84818
18317         * builtins.c (check_access): Use warning_n.
18319 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18321         PR target/83822
18322         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
18323         condition.
18324         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
18325         condition.
18327 2018-03-30  Julia Koval  <julia.koval@intel.com>
18329         PR target/84413
18330         * x86-tune.def (movx, partial_reg_dependency): Enable for
18331         m_SKYLAKE_AVX512.
18333 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
18335         PR inline-asm/84985
18336         * lra-constraints.c (process_alt_operands): Move setting
18337         this_alternative_matches below.
18339 2018-03-29  Martin Liska  <mliska@suse.cz>
18341         PR lto/84995.
18342         * doc/invoke.texi: Document how LTO works with debug info.
18343         Describe auto-load support of binutils.  Mention 'x86-64'
18344         as valid option value of -march option.
18346 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
18348         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
18350         PR c/85094
18351         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
18352         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
18353         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
18354         checking.
18356 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
18358         PR target/84912
18359         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
18360         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
18361         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
18362         for RS6000_BTM_POWERPC64.
18363         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
18364         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
18365         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
18366         definition.
18367         (DIVDE): Use it.
18368         (DIVDEU): Likewise.
18370 2018-03-28  Carl Love  <cel@us.ibm.com>
18372         Revert
18373         2017-09-27  Carl Love  <cel@us.ibm.com>
18375         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
18376         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
18377         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
18378         fctiw instruction.
18380 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18382         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
18383         instead of __vector bool.
18384         (_mm_max_pu8): Likewise.
18385         (_mm_min_pi16): Likewise.
18387 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
18389         PR target/84912
18390         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
18391         (DIVWEUO): Likewise.
18392         (DIVDEO): Likewise.
18393         (DIVDEUO): Likewise.
18394         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
18395         DIVWEUO and DIVDEUO.
18396         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
18397         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
18398         (div_extend): Likewise.
18399         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
18400         builtin function.
18401         (__builtin_divweuo): Likewise.
18402         (__builtin_divdeo): Likewise.
18403         (__builtin_divdeuo): Likewise.
18405 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
18407         PR target/85095
18408         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
18409         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
18411         PR tree-optimization/82004
18412         * gimple-match-head.c (optimize_pow_to_exp): New function.
18413         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
18414         Don't fold to exp if optimize_pow_to_exp is false.
18416 2018-03-28  Martin Liska  <mliska@suse.cz>
18418         PR other/84819
18419         * calls.c (initialize_argument_information): Fix trailing space.
18420         * common.opt: Fix typo and provide better explanation for
18421         -fsanitize-coverage option.
18422         * config/i386/i386.opt: Fix typo.
18424 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
18425             Martin Liska  <mliska@suse.cz>
18427         PR sanitizer/85081
18428         * gimplify.c (asan_poison_variable): Don't do the check for
18429         gimplify_omp_ctxp here.
18430         (gimplify_decl_expr): Do it here.
18431         (gimplify_target_expr): Likewise.
18433 2018-03-28  Martin Liska  <mliska@suse.cz>
18435         PR target/84988
18436         * config/i386/i386.c (ix86_function_arg_advance): Do not call
18437         chkp_type_bounds_count if MPX is not enabled.
18439 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
18441         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
18443 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
18445         PR target/84914
18446         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
18447         function to create the function decl for complex long double
18448         multiply and divide for -mabi=ieeelongdouble.
18449         (init_float128_ieee): Call it.
18451 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
18453         PR target/85044
18454         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
18455         -fcf-protection=branch -mibt.
18456         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
18458 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
18460         PR target/81863
18461         * config/arm/arm.c (arm_valid_symbolic_address): Handle
18462         arm_word_relocations.
18464 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
18466         PR target/85056
18467         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
18468         extern array declarations.
18470 2018-03-27  Richard Biener  <rguenther@suse.de>
18472         PR middle-end/84067
18473         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
18474         explicit single_use checks.
18476 2018-03-27  Richard Biener  <rguenther@suse.de>
18478         PR tree-optimization/85082
18479         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
18480         Valueize the VUSE.
18482 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
18484         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
18485         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
18486         Turn on fasynchronous-unwind-tables and funwind-tables.
18488 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
18490         PR target/85073
18491         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
18492         (*bmi_blsr_<mode>_ccz): Ditto.
18494 2018-03-26  Tom de Vries  <tom@codesourcery.com>
18496         PR tree-optimization/85063
18497         * omp-general.c (offloading_function_p): New function.  Factor out
18498         of ...
18499         * omp-offload.c (pass_omp_target_link::gate): ... here.
18500         * omp-general.h (offloading_function_p): Declare.
18501         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
18502         with attribute omp declare target for offloading functions.
18504 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
18506         PR tree-optimization/84005
18507         * tree-data-ref.h (get_base_for_alignment): Declare.
18508         * tree-data-ref.c (get_base_for_alignment_1): New function.
18509         (get_base_for_alignment): Likewise.
18510         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
18511         get_base_for_alignment to find a suitable base object, instead
18512         of always using drb->base_address.
18514 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
18516         PR inline-asm/85022
18517         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
18518         known size by default.
18520 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
18522         PR inline-asm/85030
18523         * lra-constraints.c (process_alt_operands): Don't match BLKmode
18524         and non BLKmode operands.
18526 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18528         PR target/85026
18529         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
18530         Clean up attributes.
18532 2018-03-23  Richard Biener  <rguenther@suse.de>
18534         PR debug/85020
18535         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
18536         we are going to emit early debug for LTO.
18538 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
18540         PR inline-asm/85034
18541         * function.c (match_asm_constraints_1): Don't optimize if input
18542         doesn't satisfy general_operand predicate for output's mode.
18544         PR inline-asm/85022
18545         * alias.c (write_dependence_p): Don't require for x_canonicalized
18546         non-VOIDmode if x has VOIDmode.
18548         PR sanitizer/85029
18549         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
18550         just don't try to optimize it rather than assert it never happens.
18552 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18554         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
18555         macro expansions for definition of ST_INTERNAL_<mode> and
18556         LD_INTERNAL_<mode> builtins.
18557         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
18558         Remove prototype.
18559         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
18560         function.
18561         (altivec_expand_st_builtin): Likewise.
18562         (altivec_expand_builtin): Remove calls to deleted functions.
18563         (rs6000_address_for_altivec): Delete this function.
18564         * config/rs6000/vector.md: Remove expands for
18565         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
18567 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
18569         PR target/84826
18570         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
18571         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
18572         re-computing once computed.
18573         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
18574         (arm_init_machine_status): Initialize
18575         machine->static_chain_stack_bytes.
18577 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18579         PR target/84760
18580         * doc/extend.texi: Add four new prototypes for vec_ld.
18581         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
18582         definitions for more logical presentation.
18583         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
18584         entries for V1TI variants of __builtin_altivec_ld builtin.
18585         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
18586         handling of V1TI variant of LVX icode pattern.
18587         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
18588         (rs6000_gimple_fold_builtin): Likewise.
18589         (altivec_init_builtins): Add code to define
18590         __builtin_altivec_lvx_v1ti function.
18592 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
18594         PR inline-asm/84941
18595         * function.c (match_asm_constraints_1): Don't do the optimization
18596         if input isn't a REG, SUBREG, MEM or constant.
18598 2018-03-22  Tom de Vries  <tom@codesourcery.com>
18600         PR tree-optimization/84956
18601         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
18602         bb_has_abnormal_pred.
18604 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
18606         PR sanitizer/85018
18607         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
18608         DECL_INITIAL (decl) to decl at the end.
18609         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
18610         adjust the comment.
18612 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
18614         * doc/extend.texi (__builtin_tgmath): Document when complex
18615         integer types are treated as _Complex _Float64.
18617 2018-03-21  Tom de Vries  <tom@codesourcery.com>
18619         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
18621 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
18623         PR tree-optimization/84960
18624         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
18625         if it is ENTRY block, move them into single succ of ENTRY in that case.
18627 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
18629         PR tree-optimization/84811
18630         * poly-int.h (poly_span_traits): Remove the T3 parameter and
18631         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
18632         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
18633         (known_subrange_p): Update accordingly.  Cast each value involved
18634         in the size comparison, rather than casting the result of the
18635         subtraction.
18637 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
18639         PR tree-optimization/84982
18640         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
18641         by flipping the least significant bit rather than all bits from
18642         bitpos to bitpos + bitsize - 1.
18644 2018-03-21  Nathan Sidwell  <nathan@acm.org>
18646         * doc/extend.texi (Deprecated Features): Remove mention of
18647         long-deleted deprecations.
18649 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18651         PR jit/84288
18652         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
18653         * configure: Regenerate.
18655 2018-03-21  Tom de Vries  <tom@codesourcery.com>
18657         PR tree-optimization/83126
18658         * tree-parloops.c (num_phis): New function.
18659         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
18661 2018-03-21  Nathan Sidwell  <nathan@acm.org>
18663         * doc/extend.texi (Deprecated Features): Update deprecated flags,
18664         mention anon-struct/union members and trailing attributes.
18666 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
18668         PR tree-optimization/84969
18669         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
18670         builtin memset partitions if they set different rhs values.
18672 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
18674         PR rtl-optimization/84989
18675         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
18676         VEC_DUPLICATE with scalar result mode.
18678 2018-03-21  Martin Liska  <mliska@suse.cz>
18680         PR ipa/84963
18681         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
18682         not intended return statement.
18684 2018-03-21  Martin Liska  <mliska@suse.cz>
18686         PR target/84988
18687         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
18688         (chkp_find_bound_slots_1): Limit number of iterations.
18690 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
18692         PR target/84838
18693         * Minor grammar fixes for x86 options.
18695 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
18697         PR debug/84875
18698         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
18699         holding REG_CFA_RESTORE notes, instead turn them into a USE.
18701 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
18703         PR target/83789
18704         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
18705         (altivec_lvx_<mode>_1op): Likewise.
18706         (altivec_stvx_<mode>_2op): Likewise.
18707         (altivec_stvx_<mode>_1op): Likewise.
18708         (altivec_lvx_<VM2:mode>): New define_expand.
18709         (altivec_stvx_<VM2:mode>): Likewise.
18710         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
18711         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18712         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
18713         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18714         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
18715         (rs6000_gen_lvx): Likewise.
18716         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
18717         (altivec_expand_stv_builtin): Likewise.
18718         (altivec_expand_builtin): Likewise.
18719         * config/rs6000/vector.md: Likewise.
18721 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18723         PR target/82518
18724         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
18725         BYTES_BIG_ENDIAN.
18727 2018-03-20  Richard Biener  <rguenther@suse.de>
18729         PR target/84986
18730         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
18731         sign-conversions as zero, fall back to standard scalar_stmt
18732         cost for the rest.
18734 2018-03-20  Martin Liska  <mliska@suse.cz>
18736         PR ipa/84825
18737         * predict.c (rebuild_frequencies): Handle case when we have
18738         PROFILE_ABSENT, but flag_guess_branch_prob is false.
18740 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
18742         PR target/84990
18743         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
18744         flag_section_anchors.
18745         * varasm.c (use_blocks_for_decl_p): Remove hack for
18746         dw2_force_const_mem.
18748         PR target/84845
18749         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
18750         to ...
18751         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
18752         be created, use lowpart_subreg of operands[0] rather than operands[0]
18753         itself.
18754         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
18755         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
18756         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
18757         and n constraint instead of aarch64_shift_imm_di and Usd.
18758         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
18759         (*aarch64_<optab>_reg_minus<mode>3): ... this.
18761 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
18763         PR target/82989
18764         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
18765         to favor GPR over NEON registers.
18766         (<shift>di3_neon): Likewise.
18768 2018-03-20  Tom de Vries  <tom@codesourcery.com>
18770         PR target/84952
18771         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
18772         (nvptx_process_pars): Emit bar.sync asap and alap.
18774 2018-03-20  Tom de Vries  <tom@codesourcery.com>
18776         PR target/84954
18777         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
18778         seen_label if seen_label is already set.
18780 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
18782         PR target/84945
18783         * config/i386/i386.c (fold_builtin_cpu): For features above 31
18784         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
18785         Use 1U instead of 1.  Formatting fixes.
18787         PR c/84953
18788         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
18789         instead of TREE_TYPE (s1) for the return value.
18791 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
18793         PR tree-optimization/84946
18794         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
18795         bitsize + bitsize in poly_uint64 rather than poly_int64.
18797         PR sanitizer/78651
18798         * dwarf2asm.c: Include fold-const.c.
18799         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
18800         of decl rather than decl itself.
18802         PR rtl-optimization/84643
18803         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
18805 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
18807         PR sanitizer/78651
18808         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
18809         calling assemble_variable.
18811 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
18813         PR target/81647
18814         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
18815         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
18817 2018-03-19  Jim Wilson  <jimw@sifive.com>
18819         PR bootstrap/84856
18820         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
18821         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
18822         (riscv_first_stack_step): Likewise.
18823         (riscv_option_override): Use STACK_BOUNDARY instead of
18824         MIN_STACK_BOUNDARY.
18825         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
18826         MIN_STACK_BOUNDARY.
18827         (BIGGEST_ALIGNMENT): Set to 128.
18828         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
18829         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
18830         STACK_BOUNDARY.
18832 2018-03-19  Richard Biener  <rguenther@suse.de>
18834         PR tree-optimization/84933
18835         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
18836         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
18838 2018-03-19  Richard Biener  <rguenther@suse.de>
18840         PR tree-optimization/84859
18841         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
18842         (cond_if_else_store_replacement): Perform sinking operation on
18843         single-store BBs regardless of MAX_STORES_TO_SINK setting.
18844         Generalize what a BB with a single eligible store is.
18846 2018-03-19  Richard Biener  <rguenther@suse.de>
18848         PR tree-optimization/84929
18849         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
18850         chrec_is_positive against non-chrec arg.
18852 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
18854         PR target/84711
18855         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
18857 2018-03-18  Martin Liska  <mliska@suse.cz>
18859         PR rtl-optimization/84635
18860         * regrename.c (build_def_use): Use matches_mode only when
18861         matches >= 0.
18863 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
18865         PR tree-optimization/84913
18866         * tree-vect-loop.c (vectorizable_reduction): Don't try to
18867         vectorize chains of COND_EXPRs.
18869 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
18871         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
18873 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
18875         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
18877 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
18879         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
18881 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
18882             Kito Cheng  <kito.cheng@gmail.com>
18884         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
18885         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
18886         (nds32_adjust_reg_alloc_order): New function.
18887         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
18889 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
18891         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
18892         nds32_print_operand, nds32_print_operand_address): Use
18893         HOST_WIDE_INT_PRINT_DEC instead.
18895 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
18897         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
18899 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
18901         PR target/84902
18902         * config/i386/i386.c (initial_ix86_tune_features,
18903         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
18904         unsigned long long.
18905         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
18906         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
18907         rather than 1u << ix86_tune.  Formatting fix.
18908         (ix86_option_override_internal): Change ix86_arch_mask from
18909         unsigned int to unsigned HOST_WIDE_INT, initialize to
18910         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
18911         (ix86_function_specific_restore): Likewise.
18913 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
18915         PR target/84899
18916         * postreload.c (reload_combine_recognize_pattern): Perform
18917         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
18918         truncate_int_for_mode the result for the destination's mode.
18920         PR c/84909
18921         * hsa-gen.c (mem_type_for_type): Fix comment typo.
18922         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
18923         Likewise.
18924         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
18925         Likewise.
18927 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
18929         PR target/84876
18930         * lra-assigns.c (lra_split_hard_reg_for): Don't use
18931         regno_allocno_class_array and sorted_pseudos.
18932         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
18933         insns where regno is used.
18935 2018-03-16  Martin Liska  <mliska@suse.cz>
18937         PR ipa/84833
18938         * multiple_target.c (create_dispatcher_calls): Redirect
18939         reference in the symbol table.
18941 2018-03-16  Martin Liska  <mliska@suse.cz>
18943         PR ipa/84722
18944         * multiple_target.c (create_dispatcher_calls): Redirect also
18945         an alias.
18947 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
18949         PR c++/79937
18950         PR c++/82410
18951         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
18952         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
18953         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
18955 2018-03-16  Julia Koval  <julia.koval@intel.com>
18957         * doc/invoke.texi (Skylake Server): Add CLWB.
18958         Cannonlake): Remove CLWB.
18960 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
18962         PR tree-optimization/84841
18963         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
18964         1 << 3.
18965         (FLOAT_ONE_CONST_TYPE): Define.
18966         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
18967         (sort_by_operand_rank): Put entries with higher constant_type last
18968         rather than first to match comments.
18970 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
18972         * config/nios2/nios2.md (movsi_internal): Fix thinko in
18973         split predicate.
18975 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
18977         PR c++/79085
18978         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
18979         check and use address of target always.
18981 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
18983         PR target/84574
18984         * config/i386/i386.c (indirect_thunk_needed): Update comments.
18985         (indirect_thunk_bnd_needed): Likewise.
18986         (indirect_thunks_used): Likewise.
18987         (indirect_thunks_bnd_used): Likewise.
18988         (indirect_return_needed): New.
18989         (indirect_return_bnd_needed): Likewise.
18990         (output_indirect_thunk_function): Add a bool argument for
18991         function return.
18992         (output_indirect_thunk_function): Don't generate alias for
18993         function return thunk.
18994         (ix86_code_end): Call output_indirect_thunk_function to generate
18995         function return thunks.
18996         (ix86_output_function_return): Set indirect_return_bnd_needed
18997         and indirect_return_needed instead of indirect_thunk_bnd_needed
18998         and indirect_thunk_needed.
19000 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
19002         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
19003         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
19004         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
19006 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
19007             Paul Hua <paul.hua.gm@gmail.com>
19009         PR c/84852
19010         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
19012 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
19014         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
19015         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
19016         resp. SFmode cases.
19018 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
19020         PR target/84711
19021         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
19022         instead of GET_MODE_SIZE when comparing Units.
19024 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
19026         PR target/68256
19027         * varasm.c (hash_section): Return an unchangeble hash value
19028         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
19029         Return !aarch64_can_use_per_function_literal_pools_p ().
19031 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
19033         PR target/84860
19034         * optabs.c (emit_conditional_move): Pass address of cmode's copy
19035         rather than address of cmode as last argument to prepare_cmp_insn.
19037 2018-03-15  Julia Koval  <julia.koval@intel.com>
19039         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
19040         F_AVX512VNNI, F_AVX512BITALG): New.
19042 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
19044         PR target/83451
19045         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
19046         insn for floating-point loads and stores.
19048 2018-03-14  Carl Love  <cel@us.ibm.com>
19050         * config/rs6000/rs6000-c.c: Add macro definitions for
19051         ALTIVEC_BUILTIN_VEC_PERMXOR.
19052         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
19053         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
19054         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
19055         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
19056         UNSPEC_VPERMXOR.
19057         * config/doc/extend.texi: Add prototypes for vec_permxor.
19059 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
19061         PR c/84852
19062         * diagnostic-show-locus.c (class layout_point): Convert m_line
19063         from int to linenum_type.
19064         (line_span::comparator): Use linenum "compare" function when
19065         comparing line numbers.
19066         (test_line_span): New function.
19067         (layout_range::contains_point): Convert param "row" from int to
19068         linenum_type.
19069         (layout_range::intersects_line_p): Likewise.
19070         (layout::will_show_line_p): Likewise.
19071         (layout::print_source_line): Likewise.
19072         (layout::should_print_annotation_line_p): Likewise.
19073         (layout::print_annotation_line): Likewise.
19074         (layout::print_leading_fixits): Likewise.
19075         (layout::annotation_line_showed_range_p): Likewise.
19076         (struct line_corrections): Likewise for field m_row.
19077         (line_corrections::line_corrections): Likewise for param "row".
19078         (layout::print_trailing_fixits): Likewise.
19079         (layout::get_state_at_point): Likewise.
19080         (layout::get_x_bound_for_row): Likewise.
19081         (layout::print_line): Likewise.
19082         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
19083         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
19084         * input.c (selftest::test_linenum_comparisons): New function.
19085         (selftest::input_c_tests): Call it.
19086         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
19087         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
19088         * selftest.h (ASSERT_GT): New macro.
19089         (ASSERT_GT_AT): New macro.
19090         (ASSERT_LT): New macro.
19091         (ASSERT_LT_AT): New macro.
19093 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
19095         PR rtl-optimization/84780
19096         * combine.c (distribute_links): Don't make a link based on pc_rtx.
19098 2018-03-14  Martin Liska  <mliska@suse.cz>
19100         * tree.c (record_node_allocation_statistics): Use
19101         get_stats_node_kind.
19102         (get_stats_node_kind): New function extracted from
19103         record_node_allocation_statistics.
19104         (free_node): Use get_stats_node_kind.
19106 2018-03-14  Richard Biener  <rguenther@suse.de>
19108         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
19109         that the value-set of ANTIC_IN doesn't grow.
19111         Revert
19112         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19113         member.
19114         (BB_VISITED_WITH_VISITED_SUCCS): New define.
19115         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19117 2018-03-14  Julia Koval  <julia.koval@intel.com>
19119         * config.gcc (icelake-client, icelake-server): New.
19120         (icelake): Remove.
19121         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
19122         (initial_ix86_arch_features): Ditto.
19123         (PTA_SKYLAKE): Add SGX.
19124         (PTA_ICELAKE): Remove.
19125         (PTA_ICELAKE_CLIENT): New.
19126         (PTA_ICELAKE_SERVER): New.
19127         (ix86_option_override_internal): Split up icelake on icelake client and
19128         icelake server.
19129         (get_builtin_code_for_version): Ditto.
19130         (fold_builtin_cpu): Ditto.
19131         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
19132         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
19133         * config/i386/i386.h (processor_type): Ditto.
19134         * doc/invoke.texi: Ditto.
19136 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
19138         PR sanitizer/83392
19139         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
19140         INTEGER_CST offset, add it together with bitpos / 8 and
19141         sign extend based on POINTER_SIZE.
19143         PR target/84844
19144         Revert
19145         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
19147         PR target/78090
19148         * config/i386/constraints.md (Yc): New register constraint.
19149         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
19150         Use Yc constraint for alternative 2 of operand 0.  Remove
19151         preferred_for_speed attribute.
19153 2018-03-14  Richard Biener  <rguenther@suse.de>
19155         PR tree-optimization/84830
19156         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
19157         with the old one to avoid oscillations.
19159 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
19161         PR target/83712
19162         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
19163         pseudos.
19164         (assign_by_spills): Return a flag of reload assignment failure.
19165         Do not process the reload assignment failures.  Do not spill other
19166         reload pseudos if they has the same reg class.  Update n if
19167         necessary.
19168         (lra_assign): Add a return arg.  Set up from the result of
19169         assign_by_spills call.
19170         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19171         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
19172         usage_insns if it is not NULL.
19173         (spill_hard_reg_in_range): New function.
19174         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19175         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19176         function prototypes.
19177         (lra_assign): Change prototype.
19178         * lra.c (lra): Add code to deal with fails by splitting hard reg
19179         live ranges.
19181 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
19183         * config/riscv/riscv.opt (mrelax): New option.
19184         * config/riscv/riscv.c (riscv_file_start): Emit ".option
19185         "norelax" when riscv_mrelax is disabled.
19186         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
19188 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19190         PR target/84743
19191         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
19192         reassociation for int modes.
19194 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
19196         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
19197         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
19198         for big-endian.
19199         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
19200         * config/aarch64/aarch64-sve.md
19201         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
19202         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
19203         (*extend<mode><Vwide>2): Rename to...
19204         (aarch64_sve_extend<mode><Vwide>2): ...this.
19205         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
19206         renaming the old pattern to...
19207         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
19208         unsigned packs.
19209         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
19210         define_expand, renaming the old pattern to...
19211         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
19212         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
19213         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
19214         account when deciding which SVE instruction the optab should use.
19215         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
19217 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
19219         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
19220         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
19221         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
19222         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
19223         (tlsdesc_small_<mode>): Turn a define_expand and use
19224         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
19225         (tlsdesc_small_advsimd_<mode>): ...this.
19226         (tlsdesc_small_sve_<mode>): New pattern.
19228 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
19230         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
19231         (UNSPEC_UMUL_HIGHPART): New constants.
19232         (MUL_HIGHPART): New int iteraor.
19233         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
19234         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
19235         define_expand.
19236         (*<su>mul<mode>3_highpart): New define_insn.
19238 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
19240         PR lto/84805
19241         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19242         incomplete types.
19244 2018-03-13  Martin Liska  <mliska@suse.cz>
19246         PR ipa/84658.
19247         * (sem_item_optimizer::sem_item_optimizer): Initialize new
19248         vector.
19249         (sem_item_optimizer::~sem_item_optimizer): Release it.
19250         (sem_item_optimizer::merge_classes): Register variable aliases.
19251         (sem_item_optimizer::fixup_pt_set): New function.
19252         (sem_item_optimizer::fixup_points_to_sets): Likewise.
19253         * ipa-icf.h: Declare new variables and functions.
19255 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
19257         PR middle-end/84834
19258         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
19259         integer_pow2p@2 and test integer_pow2p in condition.
19260         (A < 0 ? C : 0): Similarly for @1.
19262         PR middle-end/84831
19263         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
19264         characters starting at p contain '\0' character, don't look beyond
19265         that.
19267         PR target/84827
19268         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
19269         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
19271         PR target/84828
19272         * reg-stack.c (change_stack): Change update_end var from int to
19273         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
19274         also call set_block_for_insn on the newly added insns and rescan.
19276         PR target/84786
19277         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
19278         on the last operand.
19280         PR c++/84704
19281         * tree.c (stabilize_reference_1): Return save_expr (e) for
19282         STATEMENT_LIST even if it doesn't have side-effects.
19284 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
19286         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
19288 2018-03-12  Renlin Li  <renlin.li@arm.com>
19290         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
19291         aarch64_output_scalar_simd_mov_immediate.
19293 2018-03-12  Martin Sebor  <msebor@redhat.com>
19295         PR tree-optimization/83456
19296         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
19297         for perfectly overlapping calls to memcpy.
19298         (gimple_fold_builtin_memory_chk): Same.
19299         (gimple_fold_builtin_strcpy): Handle no-warning.
19300         (gimple_fold_builtin_stxcpy_chk): Same.
19301         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
19303 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
19305         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
19306         parameter.  Use it for SFmode.
19307         (rs6000_function_arg_advance_1): Adjust.
19308         (rs6000_function_arg): Adjust.
19309         (rs6000_gimplify_va_arg): Pass false for that new parameter.
19311 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
19313         PR rtl-optimization/84169
19314         PR rtl-optimization/84780
19315         * combine.c (can_combine_p): Check for a 2-insn combination whether
19316         the destination register is used between the two insns, too.
19318 2018-03-12  Richard Biener  <rguenther@suse.de>
19320         PR tree-optimization/84803
19321         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
19322         for refs DR analysis didn't process.
19324 2018-03-12  Richard Biener  <rguenther@suse.de>
19326         PR tree-optimization/84777
19327         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
19328         force-vectorize loops ignore whether we are optimizing for size.
19330 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
19332         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
19333         (TARGET_MD_ASM_ADJUST): Define.
19335 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
19336             Kito Cheng  <kito.cheng@gmail.com>
19337             Chung-Ju Wu  <jasonwucj@gmail.com>
19339         * config/nds32/nds32.c (nds32_compute_stack_frame,
19340         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
19341         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
19342         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
19343         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
19344         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
19345         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
19346         * config/nds32/nds32.md (prologue, epilogue): Use macro
19347         NDS32_V3PUSH_AVAILABLE_P to do checking.
19349 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
19351         PR debug/58150
19352         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
19353         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
19354         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
19355         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
19356         addition of most attributes on !orig_type_die or the attribute not
19357         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
19359 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
19360             Chung-Ju Wu  <jasonwucj@gmail.com>
19362         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
19363         __NDS32_VH__ macro.
19364         * config/nds32/nds32.opt (mvh): New option.
19366 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
19367             Chung-Ju Wu  <jasonwucj@gmail.com>
19369         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
19370         function.
19371         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
19372         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
19373         definition.
19375 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
19376             Chung-Ju Wu  <jasonwucj@gmail.com>
19378         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
19379         function.
19380         * config/nds32/nds32-multiple.md (strlensi): New pattern.
19381         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
19383 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
19384             Kito Cheng  <kito.cheng@gmail.com>
19385             Chung-Ju Wu  <jasonwucj@gmail.com>
19387         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
19388         UNSPEC_FFMISM and UNSPEC_FLMISM.
19389         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
19390         for ffb, ffmism and flmism.
19391         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
19392         (unspec_ffmism): Ditto.
19393         (unspec_flmism): Ditto.
19394         (nds32_expand_builtin_impl): Check if string extension is available.
19395         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
19396         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
19398 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
19400         Reverting patch:
19401         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
19403         PR target/83712
19404         * lra-assigns.c (assign_by_spills): Return a flag of reload
19405         assignment failure.  Do not process the reload assignment
19406         failures.  Do not spill other reload pseudos if they has the same
19407         reg class.
19408         (lra_assign): Add a return arg.  Set up from the result of
19409         assign_by_spills call.
19410         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19411         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
19412         usage_insns if it is not NULL.
19413         (spill_hard_reg_in_range): New function.
19414         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19415         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19416         function prototypes.
19417         (lra_assign): Change prototype.
19418         * lra.c (lra): Add code to deal with fails by splitting hard reg
19419         live ranges.
19421 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
19423         PR target/84807
19424         * config/i386/i386.opt: Replace Enforcment with Enforcement.
19426 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
19428         PR debug/84620
19429         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
19430         (dw_val_node): Add val_symbolic_view.
19431         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
19432         (symview_upper_bound): New.
19433         (new_line_info_table): Initialize symviews_since_reset.
19434         (dwarf2out_source_line): Count symviews_since_reset and set
19435         symview_upper_bound.
19436         (dw_val_equal_p): Handle symview.
19437         (add_AT_symview): New.
19438         (print_dw_val): Handle symview.
19439         (attr_checksum, attr_checksum_ordered): Likewise.
19440         (same_dw_val_p, size_of_die): Likewise.
19441         (value_format, output_die): Likewise.
19442         (add_high_low_attributes): Use add_AT_symview for entry_view.
19443         (dwarf2out_finish): Reset symview_upper_bound, clear
19444         zero_view_p.
19446 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
19448         PR target/83969
19449         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
19450         Add strict argument and use it.
19451         (rs6000_split_multireg_move): Update for new strict argument.
19452         (mem_operand_gpr): Disallow all non-offsettable addresses.
19453         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
19455 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
19457         PR target/84772
19458         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
19459         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
19460         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
19462         PR c++/84767
19463         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
19464         decl, use remap_type if we want to use the type.
19466 2018-03-09  Martin Sebor  <msebor@redhat.com>
19468         PR tree-optimization/84526
19469         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19470         Remove dead code.
19471         (builtin_access::generic_overlap): Be prepared to handle non-array
19472         base objects.
19474 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
19476         PR rtl-optimization/84682
19477         * lra-constraints.c (process_address_1): Check is_address flag
19478         for address constraints.
19479         (process_alt_operands): Likewise.
19480         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
19481         preprocess_constraints.
19482         * recog.h (preprocess_constraints): Add oploc parameter.
19483         Adjust callers.
19484         * recog.c (preprocess_constraints): Test address_operand for
19485         CT_ADDRESS constraints.
19487 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
19489         PR target/83712
19490         * lra-assigns.c (assign_by_spills): Return a flag of reload
19491         assignment failure.  Do not process the reload assignment
19492         failures.  Do not spill other reload pseudos if they has the same
19493         reg class.
19494         (lra_assign): Add a return arg.  Set up from the result of
19495         assign_by_spills call.
19496         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19497         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
19498         usage_insns if it is not NULL.
19499         (spill_hard_reg_in_range): New function.
19500         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19501         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19502         function prototypes.
19503         (lra_assign): Change prototype.
19504         * lra.c (lra): Add code to deal with fails by splitting hard reg
19505         live ranges.
19507 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19509         PR target/83193
19510         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
19511         Accept complain bool parameter.  Only emit errors if it is true.
19512         (arm_parse_cpu_option_name): Likewise.
19513         (arm_target_thumb_only): Adjust callers of the above.
19514         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
19515         prototype to take a default true bool parameter.
19516         (arm_parse_arch_option_name): Likewise.
19518 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
19519             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
19521         PR jit/64089
19522         PR jit/84288
19523         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
19524         * configure: Regenerate.
19525         * configure.ac ("linker --version-script option"): New.
19526         ("linker soname option"): New.
19528 2018-03-09  Richard Biener  <rguenther@suse.de>
19530         PR tree-optimization/84775
19531         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
19532         immediate uses of predicate stmts and mark them modified.
19534         Revert
19535         PR tree-optimization/84178
19536         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19537         to caller.
19538         (version_loop_for_if_conversion): Delay update_ssa call.
19539         (tree_if_conversion): Delay update_ssa until after predicate
19540         insertion.
19542 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
19544         PR target/84763
19545         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
19546         when the function accesses prior frames.
19548 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
19550         PR debug/84456
19551         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
19552         gen_llsym, otherwise call maybe_gen_llsym.
19554         PR inline-asm/84742
19555         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
19556         has ',' character inside of it.
19558 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19560         PR target/84748
19561         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
19562         as clobbering CC_REGNUM.
19564 2018-03-08  Richard Biener  <rguenther@suse.de>
19566         PR middle-end/84552
19567         * tree-scalar-evolution.c: Include tree-into-ssa.h.
19568         (follow_copies_to_constant): Do not follow SSA names registered
19569         for update.
19571 2018-03-08  Richard Biener  <rguenther@suse.de>
19573         PR tree-optimization/84178
19574         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19575         to caller.
19576         (version_loop_for_if_conversion): Delay update_ssa call.
19577         (tree_if_conversion): Delay update_ssa until after predicate
19578         insertion.
19580 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
19582         PR tree-optimization/84178
19583         * tree-if-conv.c (release_bb_predicate): Remove the
19584         the assertion that the stmts have NULL use_ops.
19585         Discard the statements, asserting that they haven't
19586         yet been added to a BB.
19588 2018-03-08  Richard Biener  <rguenther@suse.de>
19590         PR tree-optimization/84746
19591         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
19592         (phi_translate): Pass in destination ANTIC_OUT set.
19593         (phi_translate_1): Likewise.  For a simplified result lookup
19594         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
19595         (phi_translate_set): Adjust.
19596         (do_pre_regular_insertion): Likewise.
19597         (do_pre_partial_partial_insertion): Likewise.
19599 2018-03-08  Martin Liska  <mliska@suse.cz>
19601         PR gcov-profile/84735
19602         * doc/gcov.texi: Document usage of profile files.
19603         * gcov-io.h: Document changes in the format.
19605 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
19607         PR debug/84404
19608         PR debug/84408
19609         * dwarf2out.c (struct dw_line_info_table): Update comments for
19610         view == -1.
19611         (FORCE_RESET_NEXT_VIEW): New.
19612         (FORCE_RESETTING_VIEW_P): New.
19613         (RESETTING_VIEW_P): Check for -1 too.
19614         (ZERO_VIEW_P): Likewise.
19615         (new_line_info_table): Force-reset next view.
19616         (dwarf2out_begin_function): Likewise.
19617         (dwarf2out_source_line): Simplify zero_view_p initialization.
19618         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
19619         view directly.  Omit view when omitting .loc at line 0.
19621 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
19623         PR tree-optimization/84740
19624         * tree-switch-conversion.c (process_switch): Call build_constructors
19625         only if info.phi_count is non-zero.
19627         PR tree-optimization/84739
19628         * tree-tailcall.c (find_tail_calls): Check call arguments against
19629         DECL_ARGUMENTS (current_function_decl) rather than
19630         DECL_ARGUMENTS (func) when checking for tail recursion.
19632 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
19634         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
19635         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
19636         Volker Reichelt's entry and add entries for people that perform
19637         GCC fuzzy testing and report numerous bugs.
19639 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
19641         PR target/82411
19642         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
19643         readonly data in sdata, if that is disabled.
19644         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
19645         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
19646         -mreadonly-in-sdata option.
19648 2018-03-07  Martin Sebor  <msebor@redhat.com>
19650         PR tree-optimization/84468
19651         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
19652         basic block when looking for nul assignment.
19654 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
19656         PR target/84277
19657         * except.h (output_function_exception_table): Adjust prototype.
19658         * except.c (output_function_exception_table): Remove FNNAME parameter
19659         and add SECTION parameter.  Ouput one part of the table at a time.
19660         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
19661         the first part of the exception table and emit unwind directives.
19662         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
19663         (i386_pe_seh_cold_init): Likewise.
19664         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
19665         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
19666         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
19667         (ix86_output_call_insn): Emit a nop in one more case for SEH.
19668         * config/i386/winnt.c: Include except.h.
19669         (struct seh_frame_state): Add reg_offset, after_prologue and
19670         in_cold_section fields.
19671         (i386_pe_seh_end_prologue): Set seh->after_prologue.
19672         (i386_pe_seh_cold_init): New function.
19673         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
19674         to seh->in_cold_section.
19675         (seh_emit_push): Record the offset of the push.
19676         (seh_emit_save): Record the offet of the save.
19677         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
19678         Test seh->after_prologue to disregard the epilogue.
19679         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
19680         (i386_pe_end_cold_function): New function.
19682 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
19684         PR fortran/84565
19685         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
19686         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
19688         PR c++/84704
19689         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
19690         on tmp_var.
19691         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
19692         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
19694         PR middle-end/84723
19695         * multiple_target.c: Include tree-inline.h and intl.h.
19696         (expand_target_clones): Diagnose and fail if node->definition and
19697         !tree_versionable_function_p (node->decl).
19699 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
19701         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
19702         sprint_ul.
19703         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
19704         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19705         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
19707 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
19709         PR target/84710
19710         * combine.c (try_combine): Use reg_or_subregno instead of handling
19711         just paradoxical SUBREGs and REGs.
19713 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
19715         * config/arc/arc.c (arc_finalize_pic): Remove function.
19716         (arc_must_save_register): We use single base PIC register, remove
19717         checks to save/restore the PIC register.
19718         (arc_expand_prologue): Likewise.
19719         * config/arc/arc-protos.h (arc_set_default_type_attributes):
19720         Remove.
19721         (arc_verify_short): Likewise.
19722         (arc_attr_type): Likewise.
19723         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
19724         (walk_stores): Likewise.
19725         (arc_address_cost): Make it static.
19726         (arc_verify_short): Likewise.
19727         (branch_dest): Likewise.
19728         (arc_attr_type): Likewise.
19729         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
19730         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
19731         (arc_final_prescan_insn): Remove inserting the nops due to
19732         hardware hazards.  It is done in reorg step.
19733         (insn_length_variant_t): Remove.
19734         (insn_length_parameters_t): Likewise.
19735         (arc_insn_length_parameters): Likewise.
19736         (arc_get_insn_variants): Likewise.
19737         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
19739 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
19741         PR inline-asm/84683
19742         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
19743         assertion failure.
19745         PR tree-optimization/84687
19746         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
19747         on new_node->decl.
19748         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
19750 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19752         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
19753         Rename to ppc_speculation_barrier.
19754         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
19755         __builtin_ppc_speculation_barrier.
19757 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
19759         PR target/84700
19760         * combine.c (combine_simplify_rtx): Don't try to simplify if
19761         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
19762         are equal to x.
19764 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
19766         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
19767         to 32 bytes when compiling for POWER9.
19769 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
19771         PR target/84564
19772         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
19773         regparm >= 3 with no arg reg available also for calls with
19774         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
19776         PR target/84524
19777         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
19778         orig,vex.
19779         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
19781 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
19783         PR target/84264
19784         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
19786 2018-03-05  Richard Biener  <rguenther@suse.de>
19788         PR tree-optimization/84486
19789         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
19790         When inserting a __builtin_assume_aligned call set the LHS
19791         SSA name alignment info accordingly.
19793 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
19795         PR tree-optimization/84114
19796         * config/aarch64/aarch64.c (aarch64_reassociation_width)
19797         Avoid reassociation of FLOAT_MODE addition.
19799 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
19801         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
19802         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
19803         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
19804         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
19805         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
19806         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
19807         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
19808         and -mwbnoinvd.
19809         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
19810         __builtin_ia32_wbinvd): New builtins.
19811         (SPECIAL_ARGS2): New.
19812         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
19813         (SPECIAL_ARGS2): New.
19814         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
19815         (ix86_valid_target_attribute_inner_p): Ditto.
19816         (ix86_init_mmx_sse_builtins): Add special_args2.
19817         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
19818         TARGET_WBNOINVD_P): New.
19819         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
19820         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
19821         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
19822         * config/i386/immintrin.h (_wbinvd): New intrinsic.
19823         * config/i386/pconfigintrin.h: New file.
19824         * config/i386/wbnoinvdintrin.h: Ditto.
19825         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
19826         wbnoinvdintrin.h.
19827         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
19829 2018-03-05  Richard Biener  <rguenther@suse.de>
19831         PR tree-optimization/84670
19832         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19833         member.
19834         (BB_VISITED_WITH_VISITED_SUCCS): New define.
19835         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19836         (compute_antic_aux): Only assert the number of values in ANTIC_IN
19837         doesn't grow if all successors (recursively) were visited at least
19838         once.
19840 2018-03-05  Richard Biener  <rguenther@suse.de>
19842         PR tree-optimization/84650
19843         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
19844         if executed in the loop pipeline.
19846 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
19848         * doc/configfiles.texi (Configuration Files): Move info about
19849         conditionalizing $target-protos.h to...
19850         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
19851         differs from $target-protos.h.
19853 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
19854             Chung-Ju Wu  <jasonwucj@gmail.com>
19856         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
19857         * config/nds32/nds32-multiple.md (setmemsi): Define.
19858         * config/nds32/nds32-memory-manipulation.c
19859         (nds32_gen_dup_4_byte_to_word_value): New.
19860         (emit_setmem_word_loop): New.
19861         (emit_setmem_byte_loop): New.
19862         (nds32_expand_setmem_loop): New.
19863         (nds32_expand_setmem_loop_v3m): New.
19864         (nds32_expand_setmem_unroll): New.
19865         (nds32_expand_setmem): New.
19867 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
19868             Chung-Ju Wu  <jasonwucj@gmail.com>
19870         * config/nds32/nds32-memory-manipulation.c
19871         (nds32_emit_load_store): New.
19872         (nds32_emit_post_inc_load_store): New.
19873         (nds32_emit_mem_move): New.
19874         (nds32_emit_mem_move_block): New.
19875         (nds32_expand_movmemsi_loop_unknown_size): New.
19876         (nds32_expand_movmemsi_loop_known_size): New.
19877         (nds32_expand_movmemsi_loop): New.
19878         (nds32_expand_movmemsi_unroll): New.
19879         (nds32_expand_movmemqi): Rename ...
19880         (nds32_expand_movmemsi): ... to this.
19881         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
19882         (movmemsi): ... to this.
19883         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
19884         (nds32_expand_movmemsi): ... to this.
19886 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
19887             Monk Chiang  <sh.chiang04@gmail.com>
19888             Chung-Ju Wu  <jasonwucj@gmail.com>
19890         * config/nds32/nds32-protos.h
19891         (nds32_expand_load_multiple): New arguments.
19892         (nds32_expand_store_multiple): Ditto.
19893         (nds32_valid_multiple_load_store): Rename ...
19894         (nds32_valid_multiple_load_store_p): ... to this.
19895         * config/nds32/nds32-memory-manipulation.c
19896         (nds32_expand_load_multiple): Refine implementation.
19897         (nds32_expand_store_multiple): Ditto.
19898         * config/nds32/nds32-multiple.md
19899         (load_multiple): Update nds32_expand_load_multiple interface.
19900         (store_multiple): Update nds32_expand_store_multiple interface.
19901         * config/nds32/nds32-predicates.c
19902         (nds32_valid_multiple_load_store): Rename ...
19903         (nds32_valid_multiple_load_store_p): ... to this and refine
19904         implementation.
19905         * config/nds32/predicates.md
19906         (nds32_load_multiple_and_update_address_operation): New predicate.
19907         (nds32_store_multiple_and_update_address_operation): New predicate.
19909 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
19910             Chung-Ju Wu  <jasonwucj@gmail.com>
19912         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
19913         (combo): New attribute.
19914         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
19916 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
19918         * config/nds32/nds32.opt: Change -mcmodel= default value.
19920 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
19921             Monk Chiang  <sh.chiang04@gmail.com>
19922             Chung-Ju Wu  <jasonwucj@gmail.com>
19924         * config/nds32/constants.md (unspec_element): New enum.
19925         * config/nds32/constraints.md (Umw): New constraint.
19926         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
19927         * config/nds32/nds32-intrinsic.md: Likewise.
19928         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
19929         (nds32_valid_smw_lwm_base_p): New.
19930         (nds32_output_smw_single_word): New.
19931         (nds32_output_lmw_single_word): New.
19932         (nds32_expand_unaligned_load): New.
19933         (nds32_expand_unaligned_store): New.
19934         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
19935         (nds32_output_smw_single_word): Declare.
19936         (nds32_output_lmw_single_word): Declare.
19937         (nds32_expand_unaligned_load): Declare.
19938         (nds32_expand_unaligned_store): Declare.
19939         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
19940         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
19941         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
19942         NDS32_BUILTIN_UASTORE_DW.
19943         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
19944         predicate.
19946 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
19947             Kito Cheng  <kito.cheng@gmail.com>
19948             Chung-Ju Wu  <jasonwucj@gmail.com>
19950         * config/nds32/nds32-intrinsic.c
19951         (nds32_expand_builtin_null_ftype_reg): Delete.
19952         (nds32_expand_builtin_reg_ftype_imm): Ditto.
19953         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
19954         (nds32_read_argument): New.
19955         (nds32_legitimize_target): Ditto.
19956         (nds32_legitimize_argument): Ditto.
19957         (nds32_check_constant_argument): Ditto.
19958         (nds32_expand_unop_builtin): Ditto.
19959         (nds32_expand_unopimm_builtin): Ditto.
19960         (nds32_expand_binop_builtin): Ditto.
19961         (nds32_builtin_decl_impl): Ditto.
19962         (builtin_description): Ditto.
19963         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
19964         (nds32_init_builtins_impl): Ditto.
19965         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
19966         (nds32_builtin_decl): New.
19967         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
19968         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
19970 2018-03-02  Jeff Law  <law@redhat.com>
19972         * reorg.c (stop_search_p): Handle DEBUG_INSN.
19973         (redundant_insn, fill_simple_delay_slots): Likewise.
19974         (fill_slots_from_thread): Likewise.
19975         * resource.c (mark_referenced_resources): Likewise.
19976         (mark_set_resources, find_dead_or_set_registers): Likewise.
19978 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
19980         * substring-locations.h (format_warning_va): Formatting fix for
19981         ATTRIBUTE_GCC_DIAG.
19982         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
19983         argument.
19984         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
19985         * substring-locations.c: Include intl.h.
19986         (format_warning_va): Turned into small wrapper around
19987         format_warning_n_va, renamed to ...
19988         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
19989         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
19990         use ngettext.
19991         (format_warning_at_substring_n): New function.
19992         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
19993         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
19994         format_warning_at_substring with just a shorter name instead of
19995         const function pointer.
19996         (fmtwarn_n): New function.
19997         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
19998         appropriate, get rid of all the fmtstr temporaries, move conditionals
19999         with G_() wrapped string literals directly into fmtwarn arguments,
20000         cast dir.len to (int), formatting fixes.
20002 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
20004         * doc/invoke.texi: Remove "Cilk Plus" references.
20006 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20007             Richard Biener  <rguenther@suse.de>
20009         PR ipa/84628
20010         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
20011         for error or warning attributes if CALL_FROM_THUNK_P is set.
20012         Formatting fixes.
20014 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20016         PR target/56540
20017         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
20018         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
20020         PR target/56540
20021         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
20022         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
20024         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
20025         instead of -1U in last predictors element's probability member.
20027 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
20029         PR ipa/83983
20030         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20031         arguments if they are comparable.
20033 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
20035         PR tree-optimization/84634
20036         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
20037         masks and masked_loop_p with a single loop_masks, making sure it's
20038         null for bb vectorization.
20040 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
20042         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
20043         (vect_analyze_data_ref_access): Use loop->safe_len rather than
20044         loop->force_vectorize to check whether there is no alias.
20046 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20048         PR target/84614
20049         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
20050         prototypes.
20051         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
20052         comments.
20053         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
20054         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
20055         instead of a loop around prev_real_insn.
20056         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
20057         prev_real_insn.
20059         PR inline-asm/84625
20060         * config/i386/i386.c (ix86_print_operand): Use conditional
20061         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
20062         zero vector.
20064 2018-03-02  Richard Biener  <rguenther@suse.de>
20066         PR tree-optimization/84427
20067         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
20068         (bitmap_set_subtract_values): Rewrite to handle multiple
20069         exprs per value.
20070         (clean): Likewise.
20071         (prune_clobbered_mems): Likewise.
20072         (phi_translate): Take edge instead of pred/phiblock.
20073         (phi_translate_1): Likewise.
20074         (phi_translate_set): Likewise.  Insert all translated
20075         exprs for a value into the set, keeping possibly multiple
20076         expressions per value.
20077         (compute_antic_aux): Adjust for phi_translate changes.
20078         When intersecting union the expressions and prune those
20079         not in the final value set, keeping possibly multiple
20080         expressions per value.  Do not use value-insertion
20081         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
20082         all expressions.  Add verification that the value-sets
20083         only shrink during iteration.
20084         (compute_partial_antic_aux): Adjust for the phi_translate changes.
20085         (do_pre_regular_insertion): Likewise.
20086         (do_pre_partial_partial_insertion): Likewise.
20088 2018-03-02  Richard Biener  <rguenther@suse.de>
20090         PR target/82005
20091         * config/darwin.c (saved_debug_info_level): New static global.
20092         (darwin_asm_lto_start): Disable debug info generation for LTO out.
20093         (darwin_asm_lto_end): Restore debug info generation settings.
20095 2018-03-01  Martin Liska  <mliska@suse.cz>
20097         PR sanitizer/82484
20098         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
20099         volatile arguments.
20101 2018-03-01  Richard Biener  <rguenther@suse.de>
20103         PR debug/84645
20104         * dwarf2out.c (gen_variable_die): Properly handle late VLA
20105         type annotation with LTO when debug was disabled at compile-time.
20107 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
20109         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
20110         XINT with INTVAL.
20111         (mips_final_postscan_insn): Likewise.
20113 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
20115         PR rtl-optimization/84528
20116         * alias.c (init_alias_target): Add commentary.
20117         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
20118         a unique base value if the frame pointer is not eliminated
20119         to the stack pointer.
20121 2018-03-01  Tom de Vries  <tom@codesourcery.com>
20123         PR rtl-optimization/83327
20124         * lra-int.h (hard_regs_spilled_into): Declare.
20125         * lra.c (hard_regs_spilled_into): Define.
20126         (init_reg_info): Init hard_regs_spilled_into.
20127         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
20128         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
20129         (process_bb_lives): Handle hard_regs_spilled_into.
20130         (lra_create_live_ranges_1): Before doing liveness propagation, clear
20131         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
20133 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
20135         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
20136         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
20137         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
20138         * config/rs6000/aix72.h: New file.
20140 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
20142         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
20143         instead of warning_at with conditional singular and plural messages
20144         where possible.
20146         PR target/52991
20147         * stor-layout.c (update_alignment_for_field): For
20148         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
20149         && !DECL_PACKED (field), do the alignment update, just use
20150         only desired_align instead of MAX (type_align, desired_align)
20151         as the alignment.
20152         (place_field): Don't do known_align < desired_align handling
20153         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
20154         is non-NULL, instead do it after rli->prev_field handling and
20155         only if not within a bitfield word.  For DECL_PACKED (field)
20156         use type_align of BITS_PER_UNIT.
20158 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
20160         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
20161         superfluous parentheses and trailing spaces.
20163 2018-02-28  Richard Biener  <rguenther@suse.de>
20165         PR tree-optimization/84584
20166         * graphite-scop-detection.c (scop_detection::add_scop): Discard
20167         SCoPs with fake exit edge.
20169 2018-02-28  Martin Liska  <mliska@suse.cz>
20171         PR testsuite/84597
20172         * timevar.c (timer::print): Fix format to properly print 100%
20173         values.
20175 2018-02-28  Richard Biener  <rguenther@suse.de>
20177         PR middle-end/84607
20178         * genmatch.c (capture_info::walk_match): Do not mark
20179         captured expressions without operands as expr_p given
20180         they act more like predicates and should be subject to
20181         "lost tail" side-effect preserving.
20183 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
20185         PR rtl-optimization/81611
20186         * auto-inc-dec.c (attempt_change): Move dead note from
20187         mem_insn if it's the next use of regno
20188         (find_address): Take address use of reg holding
20189         non-incremented value.  Add parm to limit search to the named
20190         reg only.
20191         (merge_in_block): Attempt to use a mem insn that is the next
20192         use of the original regno.
20194 2018-02-27  Martin Sebor  <msebor@redhat.com>
20196         PR c++/83871
20197         * doc/invoke.texi (-Wmissing-attributes): New option.
20198         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
20200 2018-02-27  Martin Sebor  <msebor@redhat.com>
20202         PR translation/84207
20203         * diagnostic-core.h (warning_n, error_n, inform_n): Change
20204         n argument to unsigned HOST_WIDE_INT.
20205         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
20206         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
20207         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
20208         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
20210 2018-02-27  Richard Biener  <rguenther@suse.de>
20212         PR tree-optimization/84512
20213         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
20214         Do not use the estimate returned from record_stmt_cost for
20215         the scalar iteration cost but sum properly using add_stmt_cost.
20217 2018-02-27  Richard Biener  <rguenther@suse.de>
20219         PR tree-optimization/84466
20220         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20221         Adjust last change to less strictly validate use operands.
20223 2018-02-27  Martin Liska  <mliska@suse.cz>
20225         PR gcov-profile/84548
20226         * gcov.c (process_file): Allow partial overlap and consider it
20227         also as group functions.
20228         (output_lines): Properly calculate range of lines for a group.
20230 2018-02-27  Martin Liska  <mliska@suse.cz>
20232         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
20233         'ggc' suffixes.  Change first column width.
20234         (timer::print): Fix formatting of the column.
20236 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
20238         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
20239         preserve inline entry blocks for the sake of debug inline
20240         entry point markers alone.
20241         (remove_unused_locals): Suggest in comments a better place to
20242         force the preservation of inline entry blocks that are
20243         otherwise unused, but do not preserve them.
20245 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
20247         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
20249 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
20251         PR target/84039
20252         * config/i386/constraints.md (Bs): Replace
20253         ix86_indirect_branch_register with
20254         TARGET_INDIRECT_BRANCH_REGISTER.
20255         (Bw): Likewise.
20256         * config/i386/i386.md (indirect_jump): Likewise.
20257         (tablejump): Likewise.
20258         (*sibcall_memory): Likewise.
20259         (*sibcall_value_memory): Likewise.
20260         Peepholes of indirect call and jump via memory: Likewise.
20261         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
20262         (*sibcall_value_GOT_32): Likewise.
20263         * config/i386/predicates.md (indirect_branch_operand): Likewise.
20264         (GOT_memory_operand): Likewise.
20265         (call_insn_operand): Likewise.
20266         (sibcall_insn_operand): Likewise.
20267         (GOT32_symbol_operand): Likewise.
20268         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
20270 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
20272         PR rtl-optimization/83496
20273         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
20274         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
20275         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
20276         redundant insn, if any.
20277         (relax_delay_slots): Likewise.
20278         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
20280 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
20282         PR tree-optimization/83965
20283         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
20284         that grouped statements are part of a reduction chain.  Return
20285         true if the statement is not marked as a reduction itself but
20286         is part of a group.
20287         (vect_recog_dot_prod_pattern): Don't check whether the statement
20288         is part of a group here.
20289         (vect_recog_sad_pattern): Likewise.
20290         (vect_recog_widen_sum_pattern): Likewise.
20292 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
20294         PR debug/84545
20295         * final.c (rest_of_clean_state): Also look for calls inside sequences.
20297 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
20299         PR target/84530
20300         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
20301         the bool argument.
20302         (ix86_output_indirect_function_return): New prototype.
20303         (ix86_split_simple_return_pop_internal): Likewise.
20304         * config/i386/i386.c (indirect_return_via_cx): New.
20305         (indirect_return_via_cx_bnd): Likewise.
20306         (indirect_thunk_name): Handle return va CX_REG.
20307         (output_indirect_thunk_function): Create alias for
20308         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
20309         (ix86_output_indirect_jmp): Remove the bool argument.
20310         (ix86_output_indirect_function_return): New function.
20311         (ix86_split_simple_return_pop_internal): Likewise.
20312         * config/i386/i386.md (*indirect_jump): Don't pass false
20313         to ix86_output_indirect_jmp.
20314         (*tablejump_1): Likewise.
20315         (simple_return_pop_internal): Change it to define_insn_and_split.
20316         Call ix86_split_simple_return_pop_internal to split it for
20317         -mfunction-return=.
20318         (simple_return_indirect_internal): Call
20319         ix86_output_indirect_function_return instead of
20320         ix86_output_indirect_jmp.
20322 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
20324         PR bootstrap/84405
20325         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
20326         memset and value initialization afterwards.
20328 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
20330         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
20332 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
20334         PR target/84521
20335         * common/config/aarch64/aarch64-common.c
20336         (aarch_option_optimization_table[]): Switch
20337         off fomit-frame-pointer
20339 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
20340             Chung-Ju Wu  <jasonwucj@gmail.com>
20342         * config/nds32/nds32-multiple.md (load_multiple): Disallow
20343         volatile memory.
20344         (store_multiple): Ditto.
20346 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
20348         * config.gcc: Add --with-cpu support for nds32 target.
20349         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
20350         * config/nds32/nds32.opt: Add -mcpu= option.
20352 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
20354         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
20355         isel=yes): Warn for these deprecated options.
20357 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
20359         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
20360         ISA_2_5_MASKS_EMBEDDED.
20362 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
20364         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
20365         p->max as pointers rather than using iterative_hash_expr.
20367 2018-02-23  Carl Love  <cel@us.ibm.com>
20369         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
20370         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
20371         BU_P8V_OVERLOAD_2.
20372         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
20373         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
20374         P8V_BUILTIN_VEC_VUNSIGNED2.
20376 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
20378         PR target/81572
20379         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
20380         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
20381         LRA_UNKNOWN_ALT.
20382         * lra-constraints.c (curr_insn_transform): Set up
20383         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
20384         LRA_UNKNOWN_ALT.
20385         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
20386         * lra-eliminations.c (spill_pseudos): Ditto.
20387         (process_insn_for_elimination): Ditto.
20388         * lra-lives.c (reg_early_clobber_p): Use the new macros.
20389         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
20390         LRA_NON_CLOBBERED_ALT.
20392 2018-02-22  Martin Sebor  <msebor@redhat.com>
20394         PR tree-optimization/84480
20395         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
20396         to maybe_diag_stxncpy_trunc.  Call it.
20397         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
20398         from gimple_fold_builtin_strcpy.  Print inlining stack.
20399         (handle_builtin_stxncpy): Print inlining stack.
20400         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
20402 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
20404         PR target/84176
20405         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
20406         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
20407         and -fcheck-pointer-bounds are used together.
20408         (indirect_thunk_prefix): New enum.
20409         (indirect_thunk_need_prefix): New function.
20410         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
20411         "_nt" instead of "_bnd" for NOTRACK prefix.
20412         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
20413         (output_indirect_thunk_function): Likewise.
20414         (): Likewise.
20415         (ix86_code_end): Update output_indirect_thunk_function calls.
20416         (ix86_output_indirect_branch_via_reg): Replace
20417         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
20418         (ix86_output_indirect_branch_via_push): Likewise.
20419         (ix86_output_function_return): Likewise.
20420         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
20421         incompatible with -fcf-protection=branch and
20422         -fcheck-pointer-bounds.
20424 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
20426         PR target/83335
20427         * config/aarch64/aarch64.c (aarch64_print_address_internal):
20428         Change gcc_assert call to output_operand_lossage.
20430 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
20432         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
20434 2018-02-22  DJ Delorie  <dj@redhat.com>
20435             Sebastian Perta  <sebastian.perta@renesas.com>
20436             Oleg Endo  <olegendo@gcc.gnu.org>
20438         * config/rx/rx.c (rx_rtx_costs): New function.
20439         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
20441 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
20443         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
20445 2018-02-22  Martin Liska  <mliska@suse.cz>
20447         PR driver/83193
20448         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
20449         Add "native" as a possible value.
20451 2018-02-22  Martin Liska  <mliska@suse.cz>
20453         PR driver/83193
20454         * config/i386/i386.c (ix86_option_override_internal):
20455         Add "native" as a possible value for -march and -mtune.
20457 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
20459         PR target/84502
20460         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
20461         to all type variants.
20463         PR tree-optimization/84503
20464         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
20465         width as info->bitpos + info->bitsize - start.
20466         (merged_store_group::merge_overlapping): Simplify width computation.
20467         (check_no_overlap): New function.
20468         (imm_store_chain_info::try_coalesce_bswap): Compute expected
20469         start + width and last_order of the group, fail if check_no_overlap
20470         fails.
20471         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
20472         to group if check_no_overlap fails.
20474 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
20476         * config/rs6000/altivec.md: Delete contraint arguments to
20477         define_expand, define_split, and define_peephole2, and in
20478         define_insn_and_split if always unused.
20479         * config/rs6000/darwin.md: Ditto.
20480         * config/rs6000/dfp.md: Ditto.
20481         * config/rs6000/rs6000.md: Ditto.
20482         * config/rs6000/sync.md: Ditto.
20483         * config/rs6000/vector.md: Ditto.
20484         * config/rs6000/vsx.md: Ditto.
20486 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
20488         * config/rs6000/altivec.md: Write output control strings as braced
20489         blocks instead of double-quoted strings.
20490         * config/rs6000/darwin.md: Ditto.
20491         * config/rs6000/rs6000.md: Ditto.
20492         * config/rs6000/vector.md: Ditto.
20493         * config/rs6000/vsx.md: Ditto.
20495 2018-02-21  Jason Merrill  <jason@redhat.com>
20497         PR c++/84314 - ICE with templates and fastcall attribute.
20498         * attribs.c (build_type_attribute_qual_variant): Remove assert.
20500 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
20502         * ipa-cp.c (determine_versionability): Fix comment typos.
20504 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
20506         PR c/84229
20507         * ipa-cp.c (determine_versionability): Do not version functions caling
20508         va_arg_pack.
20510 2018-02-21  Martin Liska  <mliska@suse.cz>
20512         PR driver/83193
20513         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
20514         Add "native" as a possible value.
20515         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
20516         the macro when native cpu detection is available.
20518 2018-02-21  Martin Liska  <mliska@suse.cz>
20520         PR driver/83193
20521         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
20522         Add "native" as a possible value.
20523         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
20524         when native cpu detection is available.
20526 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
20527             Martin Sebor  <msebor@redhat.com>
20529         PR tree-optimization/84478
20530         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
20531         false.
20532         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
20533         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
20534         support which is conservatively correct, for 2 only stay conservative
20535         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
20536         argument to the 2 argument get_range_strlen, adjust 6 arg
20537         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
20538         false.
20539         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
20540         (gimple_fold_builtin_strlen): Pass true as last argument to
20541         get_range_strlen.
20543 2018-02-20  Martin Sebor  <msebor@redhat.com>
20545         PR middle-end/84095
20546         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
20547         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
20548         (builtin_memref::builtin_memref): Factor out parts into
20549         set_base_and_offset and call it.
20551 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
20553         PR middle-end/84406
20554         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
20555         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
20556         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
20557         search at the associated MODE_INT.
20559 2018-02-20  Jeff Law  <law@redhat.com>
20561         PR middle-end/82123
20562         PR tree-optimization/81592
20563         PR middle-end/79257
20564         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
20565         for range data rather than using global data.
20566         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
20567         range data rather than using global data.
20568         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
20569         pass it to children as needed.
20570         (struct directive::fmtresult): Similarly.
20571         (struct directive::set_width): Similarly.
20572         (struct directive::set_precision): Similarly.
20573         (format_integer, format_directive, parse_directive): Similarly.
20574         (format_none): Accept unnamed vr_values parameter.
20575         (format_percent, format_floating, format_character): Similarly.
20576         (format_string, format_plain): Similarly.
20577         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
20578         the EVRP range analyzer for range data rather than using global data.
20579         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
20580         gimple-ssa-evrp-analyze.h
20581         (class sprintf_dom_walker): Add after_dom_children member function.
20582         Add evrp_range_analyzer member.
20583         (sprintf_dom_walker::before_dom_children): Call into the EVRP
20584         range analyzer as needed.
20585         (sprintf_dom_walker::after_dom_children): New member function.
20586         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
20587         if not optimizing.
20588         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
20589         (evrp_range_analyzer::pop_to_marker): Likewise.
20591 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
20593         PR tree-optimization/84419
20594         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
20595         with the required type if its current type is compatible but
20596         different.
20598 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
20600         PR middle-end/82004
20601         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
20602         after vectorization.
20604 2018-02-20  Martin Liska  <mliska@suse.cz>
20606         PR driver/83193
20607         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
20608         possible values if we don't have a hint.
20610 2018-02-20  Martin Liska  <mliska@suse.cz>
20612         PR c/84310
20613         PR target/79747
20614         * final.c (shorten_branches): Build align_tab array with one
20615         more element.
20616         * opts.c (finish_options): Add alignment option limit check.
20617         (MAX_CODE_ALIGN): Likewise.
20618         (MAX_CODE_ALIGN_VALUE): Likewise.
20619         * doc/invoke.texi: Document maximum allowed option value for
20620         all -falign-* options.
20622 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
20624         PR target/84146
20625         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
20626         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
20627         * var-tracking.c (emit_note_insn_var_location): Remove all references
20628         to NOTE_INSN_CALL_ARG_LOCATION.
20629         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
20630         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
20631         Use copy_rtx_if_shared.
20632         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
20633         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
20634         (dwarf2out_var_location): Remove handling of
20635         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
20636         on call_insn.
20637         * final.c (final_scan_insn): Remove all references to
20638         NOTE_INSN_CALL_ARG_LOCATION.
20639         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
20640         before dumping final insns.
20641         * except.c (emit_note_eh_region_end): Remove all references to
20642         NOTE_INSN_CALL_ARG_LOCATION.
20643         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
20644         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
20645         * config/arc/arc.c (hwloop_optimize): Likewise.
20646         * config/arm/arm.c (create_fix_barrier): Likewise.
20647         * config/s390/s390.c (s390_chunkify_start): Likewise.
20648         * config/sh/sh.c (find_barrier): Likewise.
20649         * config/i386/i386.c (rest_of_insert_endbranch,
20650         ix86_seh_fixup_eh_fallthru): Likewise.
20651         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
20652         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
20653         * config/frv/frv.c (frv_function_prologue): Likewise.
20654         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
20655         reg note.
20656         (note_outside_basic_block_p): Remove all references to
20657         NOTE_INSN_CALL_ARG_LOCATION.
20658         * gengtype.c (adjust_field_rtx_def): Likewise.
20659         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
20660         Likewise.
20661         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
20662         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
20664         PR c++/84444
20665         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
20666         is ADDR_EXPR.
20668         PR tree-optimization/84452
20669         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
20670         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
20671         is NULL.
20673 2018-02-19  Martin Liska  <mliska@suse.cz>
20675         PR sanitizer/82183
20676         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
20678 2018-02-19  Martin Liska  <mliska@suse.cz>
20679             Richard Sandiford  <richard.sandiford@linaro.org>
20681         PR tree-optimization/82491
20682         * gimple-fold.c (get_base_constructor): Make earlier bail out
20683         to prevent ubsan.
20685 2018-02-19  Carl Love  <cel@us.ibm.com>
20687         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
20688         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
20689         BU_P8V_OVERLOAD_1.
20690         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
20691         P8V_BUILTIN_VEC_NEG.
20693 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
20695         * config/rl78/rl78.md (movdf): New define expand.
20697 2018-02-19  Martin Liska  <mliska@suse.cz>
20699         PR other/80589
20700         * doc/invoke.texi: Fix typo.
20701         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
20703 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
20705         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
20706         handle rs6000_single_float and rs6000_double_float specially for
20707         e500 family CPUs.
20709 2018-02-16  Jeff Law  <law@redhat.com>
20711         * config/rx/rx.c (add_pop_cfi_notes): New function.;
20712         (pop_regs): Use it.
20714 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
20716         PR ipa/84425
20717         * ipa-inline.c (inline_small_functions): Fix a typo.
20719 2018-02-16  Nathan Sidwell  <nathan@acm.org>
20721         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
20723 2018-02-16  Carl Love  <cel@us.ibm.com>
20725         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
20726         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
20727         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
20728         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
20729         expansion to P8V_BUILTIN_VEC_FLOAT2.
20731 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
20733         PR rtl-optimization/70023
20734         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
20735         src_regno into account.
20737 2018-02-16  Carl Love  <cel@us.ibm.com>
20739         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
20740         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
20741         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
20742         * config/rs6000/rs6000.c: Remove case statements for
20743         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
20744         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
20745         and P9V_BUILTIN_VEC_VINSERT4B.
20746         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
20747         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
20748         * config/rs6000/vsx.md:
20749         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
20750         vec_insert4b.
20752 2018-02-16  Carl Love  <cel@us.ibm.com>
20754         * config/rs6000/altivec.h: Add builtin names vec_extract4b
20755         vec_insert4b.
20756         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
20757         definitions.
20758         * config/rs6000/rs6000-c.c: Add the definitions for
20759         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
20760         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
20761         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
20762         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
20763         definition for insert4b and define insn *insert3b_internal.
20764         * doc/extend.texi: Add documentation for vec_extract4b.
20766 2018-02-16  Nathan Sidwell  <nathan@acm.org>
20768         * doc/extend.texi (Backwards Compatibility): Mention friend
20769         injection.  Note for-scope is deprecated.
20770         * doc/invoke.texi (-ffriend-injection): Deprecate.
20772 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
20774         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
20775         that moved to I2, also allow destinations that are a paradoxical
20776         subreg (instead of a normal reg).
20778 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
20780         PR target/83831
20781         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
20782         to QImode.
20784 2018-02-16  Richard Biener  <rguenther@suse.de>
20786         PR tree-optimization/84037
20787         PR tree-optimization/84016
20788         PR target/82862
20789         * config/i386/i386.c (ix86_builtin_vectorization_cost):
20790         Adjust vec_construct for the fact we need additional higher latency
20791         128bit inserts for AVX256 and AVX512 vector builds.
20792         (ix86_add_stmt_cost): Scale vector construction cost for
20793         elementwise loads.
20795 2018-02-16  Richard Biener  <rguenther@suse.de>
20797         PR tree-optimization/84417
20798         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
20799         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
20800         (non_rewritable_lvalue_p): Likewise, use poly-ints.
20802 2018-02-16  Martin Liska  <mliska@suse.cz>
20804         PR sanitizer/84307
20805         * internal-fn.def (ASAN_CHECK): Set proper flags.
20806         (ASAN_MARK): Likewise.
20808 2018-02-16  Julia Koval  <julia.koval@intel.com>
20810         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
20811         from PTA_CANNONLAKE.
20813 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
20815         PR target/84272
20816         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
20817         Use ++iter rather than iter++ for std::list iterators.
20818         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
20819         defer deleting them until all nodes in the forest are processed.  Do
20820         free even leaf nodes.  Change to_process into auto_vec.
20822         PR bootstrap/84405
20823         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
20824         * vec.h (vec_default_construct): Use memset instead of placement new
20825         if BROKEN_VALUE_INITIALIZATION is defined.
20826         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
20827         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
20828         is defined.
20830         PR rtl-optimization/83723
20831         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
20832         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
20833         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
20834         recursive calls.
20835         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
20836         callers.
20837         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
20839 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
20841         PR rtl-optimization/81443
20842         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
20843         from inner REGs to paradoxical SUBREGs.
20845 2018-02-16  Richard Biener  <rguenther@suse.de>
20847         PR tree-optimization/84399
20848         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20849         For operands we can analyze at their definition make sure we can
20850         analyze them at each use as well.
20852 2018-02-16  Richard Biener  <rguenther@suse.de>
20854         PR tree-optimization/84190
20855         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
20856         volatile accesses if the decl isn't volatile.
20858 2018-02-15  Jason Merrill  <jason@redhat.com>
20860         PR c++/84314 - ICE with templates and fastcall attribute.
20861         * attribs.c (build_type_attribute_qual_variant): Don't clobber
20862         TYPE_CANONICAL on an existing type.
20864 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
20866         PR tree-optimization/84383
20867         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
20868         dstoff nor call operand_equal_p if dstbase is NULL.
20870         PR tree-optimization/84334
20871         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
20872         also a CONSTANT_CLASS_P, punt.
20874 2018-02-14  Jim Wilson  <jimw@sifive.com>
20876         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
20877         first SMALL_OPERAND check.  New local min_second_step.  Move assert
20878         to where locals are set.  Add TARGET_RVC support.
20879         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
20881 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
20883         * doc/invoke.texi: Correct -Wformat-overflow code sample.
20885 2018-02-14  Martin Sebor  <msebor@redhat.com>
20887         PR tree-optimization/83698
20888         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
20889         arrays constrain the offset range to their bounds.
20890         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
20891         (builtin_access::overlap): Avoid setting the size of overlap if it's
20892         already been set.
20893         (maybe_diag_overlap): Also consider arrays when deciding what values
20894         of offsets to include in diagnostics.
20896 2018-02-14  Martin Sebor  <msebor@redhat.com>
20898         PR c/84108
20899         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
20900         that correspond to the kind of a declaration.
20902 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
20904         PR target/83984
20905         * config/pa/pa.md: Load address of PIC label using the linkage table
20906         if the label is nonlocal.
20908 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20910         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
20911         warning message if user requests -maltivec=be.
20912         * doc/invoke.texi: Document deprecation of -maltivec=be.
20914 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
20916         PR target/84220
20917         * config/rs6000/rs6000-c.c: Update definitions for
20918         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
20919         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
20921 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
20923         PR target/84239
20924         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
20925         add _get_ssp intrinsics. Remove argument from
20926         __builtin_ia32_rdssp[d|q].
20927         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
20928         * config/i386/i386-builtin.def: Remove argument from
20929         __builtin_ia32_rdssp[d|q].
20930         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
20931         ix86_expand_special_args_builtin for _rdssp[d|q].
20932         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
20933         Clear register before usage.
20934         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
20935         Add documentation for new _get_ssp and _inc_ssp intrinsics.
20937 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
20939         PR tree-optimization/84357
20940         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
20941         operand 1 of an ARRAY_REF too.
20943 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
20945         PR target/83831
20946         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
20947         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
20948         declarations.
20949         (set_of_reg): New struct.
20950         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
20951         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
20952         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
20953         functions.
20954         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
20955         Split into bitclr, bitset, bitinvert patterns if appropriate.
20956         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
20957         use rx_fuse_in_memory_bitop.
20958         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
20959         to named insn, correct maximum insn length.
20961 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
20963         PR target/79242
20964         * machmode.def: Define a complex mode for PARTIAL_INT.
20965         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
20966         MODE_PARTIAL_INT.
20967         * doc/rtl.texi: Document CSPImode.
20968         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
20969         handling.
20970         (msp430_hard_regno_nregs_with_padding): Likewise.
20972 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
20974         PR target/84279
20975         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
20977 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
20979         PR rtl-optimization/84169
20980         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
20981         we generated a parallel as new i3 and we split that to new i2 and i3
20982         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
20983         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
20984         those to i2, not i1.  Partially rewrite this scan code.
20986 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
20988         PR c/82210
20989         * stor-layout.c (place_field): For variable length fields, adjust
20990         offset_align afterwards not just based on the field's alignment,
20991         but also on the size.
20993         PR middle-end/84309
20994         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
20995         of exps and logs in the use_exp2 case.
20997 2018-02-13  Jeff Law  <law@redhat.com>
20999         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
21000         entry for "vector".
21002         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
21003         ARGS as unused.
21005 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
21007         PR debug/84342
21008         PR debug/84319
21009         * common.opt (gas-loc-support, gas-locview-support): New.
21010         (ginline-points, ginternal-reset-location-views): New.
21011         * doc/invoke.texi: Document them.  Use @itemx where intended.
21012         (gvariable-location-views): Adjust.
21013         * target.def (reset_location_view): New.
21014         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
21015         (TARGET_RESET_LOCATION_VIEW): New.
21016         * doc/tm.texi: Rebuilt.
21017         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
21018         (dwarf2out_default_as_locview_support): New.
21019         (output_asm_line_debug_info): Use option variables.
21020         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
21021         (output_loc_list): Likewise.
21022         (add_high_low_attributes): Check option variables.
21023         Don't output entry view attribute in strict mode.
21024         (gen_inlined_subroutine_die): Check option variables.
21025         (dwarf2out_inline_entry): Likewise.
21026         (init_sections_and_labels): Likewise.
21027         (dwarf2out_early_finish): Likewise.
21028         (maybe_reset_location_view): New, from...
21029         (dwarf2out_var_location): ... here.  Call it.
21030         * debug.h (dwarf2out_default_as_loc_support): Declare.
21031         (dwarf2out_default_as_locview_support): Declare.
21032         * hooks.c (hook_int_rtx_insn_0): New.
21033         * hooks.h (hook_int_rtx_insn_0): Declare.
21034         * toplev.c (process_options): Take -gas-loc-support and
21035         -gas-locview-support from dwarf2out.  Enable
21036         -gvariable-location-views by default only with locview
21037         assembler support.  Enable -ginternal-reset-location-views by
21038         default only if the target defines the corresponding hook.
21039         Enable -ginline-points by default if location views are
21040         enabled; force it disabled if statement frontiers are
21041         disabled.
21042         * tree-inline.c (expand_call_inline): Check option variables.
21043         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
21045 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
21047         PR tree-optimization/84321
21048         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
21049         handling.  Also check whether the anti-range contains any values
21050         that satisfy the mask; switch to a VR_RANGE if not.
21052 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
21054         PR sanitizer/84340
21055         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
21057 2018-02-13  Martin Jambor  <mjambor@suse.cz>
21059         PR c++/83990
21060         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
21061         of call statements, also set location of a load to a temporary.
21063 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
21065         * config/rl78/rl78.c (add_vector_labels): New function.
21066         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
21067         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
21068         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
21069         which checks that no arguments are passed.
21070         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
21071         * doc/extend.texi: Documentation for the new attribute.
21073 2018-02-13  Andreas Schwab  <schwab@suse.de>
21075         * config/riscv/linux.h (CPP_SPEC): Define.
21077 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
21079         PR target/84335
21080         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
21081         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
21082         OPTION_MASK_ISA_AES as first argument to def_builtin_const
21083         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
21084         instead of OPTION_MASK_ISA_PCLMUL as first argument to
21085         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
21086         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
21087         temporarily for AES and PCLMUL builtins.
21089         PR tree-optimization/84339
21090         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
21091         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
21092         Formatting fixes.
21094         PR middle-end/84309
21095         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
21096         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
21097         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
21098         inline function.
21099         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
21100         inline function.
21101         * omp-simd-clone.h: New file.
21102         * omp-simd-clone.c: Include omp-simd-clone.h.
21103         (expand_simd_clones): No longer static.
21104         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
21105         cgraph.h and omp-simd-clone.h.
21106         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
21107         (vect_recog_widen_shift_pattern): Formatting fix.
21108         (vect_pattern_recog_1): Don't check optab for calls.
21110         PR target/84336
21111         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
21112         operands[2] into a REG before using gen_lowpart on it.
21114 2018-02-12  Jeff Law  <law@redhat.com>
21116         PR target/83760
21117         * config/sh/sh.c (find_barrier): Consider a sibling call
21118         a barrier as well.
21120         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
21121         successfully back substituting a reg.
21123 2018-02-12  Richard Biener  <rguenther@suse.de>
21125         PR tree-optimization/84037
21126         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
21127         parameter, move visited init to caller.
21128         (vect_slp_analyze_operations): Separate cost from validity
21129         check, initialize visited once for all instances.
21130         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
21131         for all instances.
21132         * tree-vect-stmts.c (vect_model_simple_cost): Make early
21133         out an assert.
21134         (vect_model_promotion_demotion_cost): Likewise.
21135         (vectorizable_bswap): Guard cost modeling with !slp_node
21136         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
21137         SLP stmts.
21138         (vectorizable_call): Likewise.
21139         (vectorizable_conversion): Likewise.
21140         (vectorizable_assignment): Likewise.
21141         (vectorizable_shift): Likewise.
21142         (vectorizable_operation): Likewise.
21143         (vectorizable_store): Likewise.
21144         (vectorizable_load): Likewise.
21145         (vectorizable_condition): Likewise.
21146         (vectorizable_comparison): Likewise.
21148 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
21150         PR sanitizer/84307
21151         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
21152         (ASAN_MARK): Fix fnspec to account for return value, change pointer
21153         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
21155 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
21157         PR middle-end/83665
21158         * params.def (inline-min-speedup): Increase from 8 to 15.
21159         (max-inline-insns-auto): Decrease from 40 to 30.
21160         * ipa-split.c (consider_split): Add some buffer for function to
21161         be considered inlining candidate.
21162         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
21163         default values.
21165 2018-02-12  Richard Biener  <rguenther@suse.de>
21167         PR tree-optimization/84037
21168         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
21169         matched stmts if we cannot swap the non-matched ones.
21171 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
21173         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
21174         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
21175         _mm_maskz_scalef_round_ss): New intrinsics.
21176         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
21177         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
21178         __builtin_ia32_scalefss_round): Remove.
21179         (__builtin_ia32_scalefsd_mask_round,
21180         __builtin_ia32_scalefss_mask_round): New intrinsics.
21181         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
21182         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
21183         ((match_operand:VF_128 2 "<round_nimm_predicate>"
21184         "<round_constraint>")): Changed to ...
21185         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
21186         "<round_scalar_constraint>")): ... this.
21187         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
21188         %0, %1, %2<round_op3>}"): Changed to ...
21189         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
21190         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
21191         %2<round_scalar_mask_op3>}"): ... this.
21192         * config/i386/subst.md (round_scalar_nimm_predicate): New.
21194 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
21196         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
21197         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
21198         (_mm_maskz_sqrt_round_ss): New intrinsics.
21199         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
21200         (__builtin_ia32_sqrtsd_mask_round)
21201         (__builtin_ia32_sqrtss_mask_round): New builtins.
21202         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
21203         (__builtin_ia32_sqrtss_round): Remove.
21204         (__builtin_ia32_sqrtsd_mask_round)
21205         (__builtin_ia32_sqrtss_mask_round): New builtins.
21206         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
21207         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
21208         ((match_operand:VF_128 1 "vector_operand"
21209         "xBm,<round_constraint>")): Changed to ...
21210         ((match_operand:VF_128 1 "vector_operand"
21211         "xBm,<round_scalar_constraint>")): ... this.
21212         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
21213         %0, %2, %<iptr>1<round_op3>}): Changed to ...
21214         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
21215         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
21216         %<iptr>1<round_scalar_mask_op3>}): ... this.
21217         ((set_attr "prefix" "<round_prefix>")): Changed to ...
21218         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
21220 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
21222         PR target/84266
21223         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
21224         Cast vec_cmpeq result to correct type.
21225         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
21226         Cast vec_cmpgt result to correct type.
21228 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
21230         * final.c (final_scan_insn_1): Renamed from...
21231         (final_scan_insn): ... this.  New wrapper, to recover
21232         seen from the outermost call in recursive ones.
21233         * config/sparc/sparc.c (output_return): Drop seen from call.
21234         (output_sibcall): Likewise.
21235         * config/visium/visium.c (output_branch): Likewise.
21237 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
21239         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
21240         function label.
21242 2018-02-10  Alan Modra  <amodra@gmail.com>
21244         PR target/84300
21245         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
21246         Specify LR as an input.
21248 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
21250         PR sanitizer/83987
21251         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
21252         remove_member_access_dummy_vars): New functions.
21253         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
21254         lower_omp_1, execute_lower_omp): Use them.
21256         PR rtl-optimization/84308
21257         * shrink-wrap.c (spread_components): Release todo vector.
21259 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
21261         PR rtl-optimization/57193
21262         * ira-color.c (struct allocno_color_data): Add member
21263         conflict_allocno_hard_prefs.
21264         (update_conflict_allocno_hard_prefs): New.
21265         (bucket_allocno_compare_func): Add a preference based on
21266         conflict_allocno_hard_prefs.
21267         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
21268         (color_allocnos): Remove a dead code.  Initiate
21269         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
21271 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
21273         PR target/84226
21274         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
21275         constraint from =wa to wa.  Avoid a subreg on the output operand,
21276         instead use a pseudo and subreg it in a move.
21277         (p9_xxbrd_<mode>): Changed to ...
21278         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
21279         (p9_xxbrd_v2df): New expander.
21280         (p9_xxbrw_<mode>): Changed to ...
21281         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
21282         (p9_xxbrw_v4sf): New expander.
21284 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
21286         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
21288 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
21290         PR target/83926
21291         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
21292         multiply in 32-bit mode.
21293         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
21294         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
21295         mode.
21297 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
21299         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
21300         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
21301         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
21302         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
21304 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
21306         PR lto/84213
21307         * dwarf2out.c (is_trivial_indirect_ref): New function.
21308         (dwarf2out_late_global_decl): Do not generate a location
21309         attribute for variables that have a non-trivial DECL_VALUE_EXPR
21310         and that are not defined in the current unit.
21312 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
21314         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
21315         instead of a libcall for UNORDERED.
21317 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
21319         PR target/82641
21320         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
21321         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
21323 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21325         PR target/PR84295
21326         * config/s390/s390.c (s390_set_current_function): Invoke
21327         s390_indirect_branch_settings also if fndecl didn't change.
21329 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
21331         * config/rs6000/rs6000.md (blockage): Set length to zero.
21333 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
21335         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
21337 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
21339         PR sanitizer/84285
21340         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
21341         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
21342         -static-lib*san.
21344         PR debug/84252
21345         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
21346         PARALLEL incoming that failed vt_get_decl_and_offset check.
21348         PR middle-end/84237
21349         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
21350         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
21351         TREE_READONLY bit.
21352         (get_variable_section): For decls in named .bss* sections pass true as
21353         second argument to bss_initializer_p.
21355 2018-02-09  Marek Polacek  <polacek@redhat.com>
21356             Jakub Jelinek  <jakub@redhat.com>
21358         PR c++/83659
21359         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
21360         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
21361         Sync some changes from cxx_fold_indirect_ref.
21363 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
21365         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
21366         markers.
21367         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
21368         (BLOCK_INLINE_ENTRY_LABEL): New.
21369         (dwarf2out_var_location): Disregard inline entry markers.
21370         (inline_entry_data): New struct.
21371         (inline_entry_data_hasher): New hashtable type.
21372         (inline_entry_data_hasher::hash): New.
21373         (inline_entry_data_hasher::equal): New.
21374         (inline_entry_data_table): New variable.
21375         (add_high_low_attributes): Add DW_AT_entry_pc and
21376         DW_AT_GNU_entry_view attributes if a pending entry is found
21377         in inline_entry_data_table.  Add old entry_pc attribute only
21378         if debug nonbinding markers are disabled.
21379         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
21380         markers are enabled.
21381         (block_within_block_p, dwarf2out_inline_entry): New.
21382         (dwarf2out_finish): Check that no entries remained in
21383         inline_entry_data_table.
21384         * final.c (reemit_insn_block_notes): Handle inline entry notes.
21385         (final_scan_insn, notice_source_line): Likewise.
21386         (rest_of_clean_state): Skip inline entry markers.
21387         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
21388         markers.
21389         * gimple.c (gimple_build_debug_inline_entry): New.
21390         * gimple.h (enum gimple_debug_subcode): Add
21391         GIMPLE_DEBUG_INLINE_ENTRY.
21392         (gimple_build_debug_inline_entry): Declare.
21393         (gimple_debug_inline_entry_p): New.
21394         (gimple_debug_nonbind_marker_p): Adjust.
21395         * insn-notes.def (INLINE_ENTRY): New.
21396         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
21397         inline entry marker notes.
21398         (print_insn): Likewise.
21399         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
21400         (INSN_DEBUG_MARKER_KIND): Likewise.
21401         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
21402         * tree-inline.c (expand_call_inline): Build and insert
21403         debug_inline_entry stmt.
21404         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
21405         inline entry blocks early, if nonbind markers are enabled.
21406         (dump_scope_block): Dump fragment info.
21407         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
21408         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
21409         (gimple_build_debug_inline_entry): New.
21410         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
21411         Enable/disable inline entry points too.
21412         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
21413         (DEBUG_INSN): Describe inline entry markers.
21415         * common.opt (gvariable-location-views): New.
21416         (gvariable-location-views=incompat5): New.
21417         * config.in: Rebuilt.
21418         * configure: Rebuilt.
21419         * configure.ac: Test assembler for view support.
21420         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
21421         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
21422         * dwarf2out.c (var_loc_view): New typedef.
21423         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
21424         (dwarf2out_locviews_in_attribute): New.
21425         (dwarf2out_locviews_in_loclist): New.
21426         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
21427         (enum dw_line_info_opcode): Add LI_adv_address.
21428         (struct dw_line_info_table): Add view.
21429         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
21430         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
21431         (zero_view_p): New variable.
21432         (ZERO_VIEW_P): New macro.
21433         (output_asm_line_debug_info): New.
21434         (struct var_loc_node): Add view.
21435         (add_AT_view_list, AT_loc_list): New.
21436         (add_var_loc_to_decl): Add view param.  Test it against last.
21437         (new_loc_list): Add view params.  Record them.
21438         (AT_loc_list_ptr): Handle loc and view lists.
21439         (view_list_to_loc_list_val_node): New.
21440         (print_dw_val): Handle dw_val_class_view_list.
21441         (size_of_die): Likewise.
21442         (value_format): Likewise.
21443         (loc_list_has_views): New.
21444         (gen_llsym): Set vl_symbol too.
21445         (maybe_gen_llsym, skip_loc_list_entry): New.
21446         (dwarf2out_maybe_output_loclist_view_pair): New.
21447         (output_loc_list): Output view list or entries too.
21448         (output_view_list_offset): New.
21449         (output_die): Handle dw_val_class_view_list.
21450         (output_dwarf_version): New.
21451         (output_compilation_unit_header): Use it.
21452         (output_skeleton_debug_sections): Likewise.
21453         (output_rnglists, output_line_info): Likewise.
21454         (output_pubnames, output_aranges): Update version comments.
21455         (output_one_line_info_table): Output view numbers in asm comments.
21456         (dw_loc_list): Determine current endview, pass it to new_loc_list.
21457         Call maybe_gen_llsym.
21458         (loc_list_from_tree_1): Adjust.
21459         (add_AT_location_description): Create view list attribute if
21460         needed, check it's absent otherwise.
21461         (convert_cfa_to_fb_loc_list): Adjust.
21462         (maybe_emit_file): Call output_asm_line_debug_info for test.
21463         (dwarf2out_var_location): Reset views as needed.  Precompute
21464         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
21465         attribute.  Set view.
21466         (new_line_info_table): Reset next view.
21467         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
21468         (dwarf2out_source_line): Likewise.  Output view resets and labels to
21469         the assembler, or select appropriate line info opcodes.
21470         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
21471         (optimize_string_length): Catch it.  Adjust.
21472         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
21473         dw_val_class_view_list, and remove it if no longer needed.
21474         (hash_loc_list): Hash view numbers.
21475         (loc_list_hasher::equal): Compare them.
21476         (optimize_location_lists): Check whether a view list symbol is
21477         needed, and whether the locview attribute is present, and
21478         whether they match.  Remove the locview attribute if no longer
21479         needed.
21480         (index_location_lists): Call skip_loc_list_entry for test.
21481         (dwarf2out_finish): Call output_asm_line_debug_info for test.
21482         Use output_dwarf_version.
21483         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
21484         (struct dw_val_node): Add val_view_list.
21485         * final.c (SEEN_NEXT_VIEW): New.
21486         (set_next_view_needed): New.
21487         (clear_next_view_needed): New.
21488         (maybe_output_next_view): New.
21489         (final_start_function): Rename to...
21490         (final_start_function_1): ... this.  Take pointer to FIRST,
21491         add SEEN parameter.  Emit param bindings in the initial view.
21492         (final_start_function): Reintroduce SEEN-less interface.
21493         (final): Rename to...
21494         (final_1): ... this.  Take SEEN parameter.  Output final pending
21495         next view at the end.
21496         (final): Reintroduce seen-less interface.
21497         (final_scan_insn): Output pending next view before switching
21498         sections or ending a block.  Mark the next view as needed when
21499         outputting variable locations.  Notify debug backend of section
21500         changes, and of location view changes.
21501         (rest_of_handle_final): Adjust.
21502         * toplev.c (process_options): Autodetect value for debug variable
21503         location views option.  Warn on incompat5 without -gdwarf-5.
21504         * doc/invoke.texi (gvariable-location-views): New.
21505         (gvariable-location-views=incompat5): New.
21506         (gno-variable-location-views): New.
21508 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
21510         PR tree-optimization/84136
21511         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
21512         that the result of find_edge is non-NULL.
21514 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
21516         PR target/83008
21517         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
21518         storing integer register in SImode.  Fix cost of 256 and 512
21519         byte aligned SSE register store.
21521 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
21523         * config/i386/i386.c (ix86_multiplication_cost): Fix
21524         multiplication cost for TARGET_AVX512DQ.
21526 2018-02-08  Marek Polacek  <polacek@redhat.com>
21528         PR tree-optimization/84238
21529         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
21530         get_range_strlen.
21532 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
21534         PR tree-optimization/84265
21535         * tree-vect-stmts.c (vectorizable_store): Don't treat
21536         VMAT_CONTIGUOUS accesses as grouped.
21537         (vectorizable_load): Likewise.
21539 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
21541         PR tree-optimization/81635
21542         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
21543         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
21544         (test_round_for_mask): New functions.
21545         (wide_int_cc_tests): Call test_round_for_mask.
21546         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
21547         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
21548         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
21549         range returned by get_range_info.
21551 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
21553         PR ipa/81360
21554         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
21555         * symtab.c: Include builtins.h
21556         (symtab_node::output_to_lto_symbol_table_p): Move here
21557         from lto-streamer-out.c:output_symbol_p.
21558         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
21559         (output_symbol_p): Move all logic to symtab.c
21560         (produce_symtab): Update.
21562 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21564         * config/s390/s390-opts.h (enum indirect_branch): Define.
21565         * config/s390/s390-protos.h (s390_return_addr_from_memory)
21566         (s390_indirect_branch_via_thunk)
21567         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
21568         (enum s390_indirect_branch_type): Define.
21569         * config/s390/s390.c (struct s390_frame_layout, struct
21570         machine_function): Remove.
21571         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
21572         (indirect_branch_table_label_no, indirect_branch_table_name):
21573         Define variables.
21574         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
21575         (enum s390_indirect_branch_option): Define.
21576         (s390_return_addr_from_memory): New function.
21577         (s390_handle_string_attribute): New function.
21578         (s390_attribute_table): Add new attribute handler.
21579         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
21580         (s390_indirect_branch_via_thunk): New function.
21581         (s390_indirect_branch_via_inline_thunk): New function.
21582         (s390_function_ok_for_sibcall): When jumping via thunk disallow
21583         sibling call optimization for non z10 compiles.
21584         (s390_emit_call): Force indirect branch target to be a single
21585         register.  Add r1 clobber for non-z10 compiles.
21586         (s390_emit_epilogue): Emit return jump via return_use expander.
21587         (s390_reorg): Handle JUMP_INSNs as execute targets.
21588         (s390_option_override_internal): Perform validity checks for the
21589         new command line options.
21590         (s390_indirect_branch_attrvalue): New function.
21591         (s390_indirect_branch_settings): New function.
21592         (s390_set_current_function): Invoke s390_indirect_branch_settings.
21593         (s390_output_indirect_thunk_function):  New function.
21594         (s390_code_end): Implement target hook.
21595         (s390_case_values_threshold): Implement target hook.
21596         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
21597         macros.
21598         * config/s390/s390.h (struct s390_frame_layout)
21599         (struct machine_function): Move here from s390.c.
21600         (TARGET_INDIRECT_BRANCH_NOBP_RET)
21601         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
21602         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
21603         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
21604         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
21605         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
21606         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
21607         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
21608         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
21609         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
21610         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
21611         (mnemonic attribute): Add values which aren't recognized
21612         automatically.
21613         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
21614         pattern for branch conversion.  Fix mnemonic attribute.
21615         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
21616         indirect branch via thunk if requested.
21617         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
21618         ("*indirect_jump"): Disable for branch conversion using out of
21619         line thunks.
21620         ("indirect_jump_via_thunk<mode>_z10")
21621         ("indirect_jump_via_thunk<mode>")
21622         ("indirect_jump_via_inlinethunk<mode>_z10")
21623         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
21624         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
21625         ("casesi_jump_via_inlinethunk<mode>_z10")
21626         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
21627         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
21628         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
21629         ("*indirect2_jump"): Disable for branch conversion.
21630         ("casesi_jump"): Turn into expander and expand patterns for branch
21631         conversion.
21632         ("return_use"): New expander.
21633         ("*return"): Emit return via thunk and rename it to ...
21634         ("*return<mode>"): ... this one.
21635         * config/s390/s390.opt: Add new options and and enum for the
21636         option values.
21638 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
21640         * lra-constraints.c (match_reload): Unconditionally use
21641         gen_lowpart_SUBREG, rather than selecting between that
21642         and equivalent gen_rtx_SUBREG code.
21644 2018-02-08  Richard Biener  <rguenther@suse.de>
21646         PR tree-optimization/84233
21647         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
21648         changed flag instead of boguously re-using phi_inserted.
21650 2018-02-08  Martin Jambor  <mjambor@suse.cz>
21652         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
21653         static local variables.
21655 2018-02-08  Richard Biener  <rguenther@suse.de>
21657         PR tree-optimization/84278
21658         * tree-vect-stmts.c (vectorizable_store): When looking for
21659         smaller vector types to perform grouped strided loads/stores
21660         make sure the mode is supported by the target.
21661         (vectorizable_load): Likewise.
21663 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
21665         * config/aarch64/aarch64.c (aarch64_components_for_bb):
21666         Increase LDP/STP opportunities by adding adjacent callee-saves.
21668 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
21670         PR rtl-optimization/84068
21671         PR rtl-optimization/83459
21672         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
21674 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
21676         PR tree-optimization/84224
21677         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
21678         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
21679         non-zero arguments.
21681 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
21683         PR target/84113
21684         * config/rs6000/altivec.md (*restore_world): Remove LR use.
21685         * config/rs6000/predicates.md (restore_world_operation): Adjust op
21686         count, remove one USE.
21688 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
21690         * doc/install.texi (Configuration): Document the
21691         --with-long-double-format={ibm,ieee} PowerPC configuration
21692         options.
21694         PR target/84154
21695         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
21696         Convert from define_expand to be define_insn_and_split.  Rework
21697         float/double/_Float128 conversions to QI/HI/SImode to work with
21698         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
21699         conversions to QI/HImode types did a store and then a load to
21700         truncate the value.  For conversions to VSX registers, don't split
21701         the insn, instead emit the code directly.  Use the code iterator
21702         any_fix to combine signed and unsigned conversions.
21703         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
21704         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
21705         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21706         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
21707         (fix_<mode>di2_hw): Likewise.
21708         (fixuns_<mode>di2_hw): Likewise.
21709         (fix_<mode>si2_hw): Likewise.
21710         (fixuns_<mode>si2_hw): Likewise.
21711         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
21712         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21713         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
21714         fix<uns>_trunc<SFDF:mode>si2_p8.
21715         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
21716         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
21717         (fix<uns>_<mode>_mem): Likewise.
21718         (fctiw<u>z_<mode>_mem): Likewise.
21719         (fix<uns>_<mode>_mem): Likewise.
21720         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
21721         the register allocator from doing a direct move to the GPRs to do
21722         a store, and instead use the ISA 3.0 store byte/half-word from
21723         vector register instruction.  For IEEE 128-bit floating point,
21724         also optimize stores of 32-bit ints.
21725         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
21727 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
21729         * genextract.c (push_pathstr_operand): New function to support
21730         [a-zA-Z].
21731         (walk_rtx): Call push_pathstr_operand.
21732         (print_path): Support [a-zA-Z].
21734 2018-02-07  Richard Biener  <rguenther@suse.de>
21736         PR tree-optimization/84037
21737         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
21738         (cse_and_gimplify_to_preheader): Declare.
21739         (vect_get_place_in_interleaving_chain): Likewise.
21740         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21741         ivexpr_map.
21742         (_loop_vec_info::~_loop_vec_info): Delete it.
21743         (cse_and_gimplify_to_preheader): New function.
21744         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
21745         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
21746         (vectorizable_load): Likewise.  For grouped stores always base
21747         the IV on the first element.
21748         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
21749         condition before gimplifying.
21751 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
21753         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
21754         *DIV_EXPR and *MOD_EXPR.
21756 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
21758         PR target/84248
21759         * config/i386/i386.c (ix86_option_override_internal): Mask out
21760         the CF_SET bit when checking -fcf-protection.
21762 2018-02-07  Tom de Vries  <tom@codesourcery.com>
21764         PR libgomp/84217
21765         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
21766         enough.
21768 2018-02-07  Richard Biener  <rguenther@suse.de>
21770         PR tree-optimization/84204
21771         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
21772         this place.
21774         PR tree-optimization/84205
21775         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
21776         special-case isl_ast_op_zdiv_r.
21778         PR tree-optimization/84223
21779         * graphite-scop-detection.c (gather_bbs::before_dom_children):
21780         Only add conditions from within the region.
21781         (gather_bbs::after_dom_children): Adjust.
21783 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
21785         PR target/84209
21786         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
21787         * config/avr/avr.md: Only post-reload split REG-REG moves if
21788         either register is GENERAL_REG_P.
21790 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
21792         PR tree-optimization/84235
21793         * tree-ssa-scopedtables.c
21794         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
21795         if the subtraction is performed in floating point type where NaNs are
21796         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
21797         build 1.  Formatting fix.
21799 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
21801         PR target/84146
21802         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
21803         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
21804         and skip it regardless of bb boundaries.  Use CALL_P macro,
21805         don't test INSN_P (insn) together with CALL_P or JUMP_P check
21806         unnecessarily, formatting fix.
21808 2018-02-06  Michael Collison  <michael.collison@arm.com>
21810         * config/arm/thumb2.md:
21811         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
21812         (*thumb_mov_notscc): Ditto.
21814 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
21816         PR target/84154
21817         * config/rs6000/rs6000.md (su code attribute): Use "u" for
21818         unsigned_fix, not "s".
21820 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21822         * configure.ac (gcc_fn_eh_frame_ro): New function.
21823         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
21824         correct .eh_frame permissions.
21825         * configure: Regenerate.
21827 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
21829         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
21830         irrelevant options.
21832 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21834         * config/rs6000/rs6000.c (rs6000_option_override_internal):
21835         Display warning message for -mno-speculate-indirect-jumps.
21837 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
21839         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
21840         Undocumented.
21841         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
21843 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
21845         PR tree-optimization/84225
21846         * tree-eh.c (find_trapping_overflow): Only call
21847         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
21849 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
21851         PR target/84145
21852         * config/i386/i386.c: Reimplement the check of possible options
21853         -mibt/-mshstk conbination. Change error messages.
21854         * doc/invoke.texi: Fix a typo: remove extra '='.
21856 2018-02-06  Marek Polacek  <polacek@redhat.com>
21858         PR tree-optimization/84228
21859         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
21861 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
21863         PR target/82641
21864         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
21865         emitted arch directives.
21866         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
21867         __ARM_FEATURE_COPROC before changing architectures.
21869 2018-02-06  Richard Biener  <rguenther@suse.de>
21871         * config/i386/i386.c (print_reg): Fix typo.
21872         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
21874 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
21876         * configure: Regenerate.
21878 2018-02-05  Martin Sebor  <msebor@redhat.com>
21880         PR tree-optimization/83369
21881         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
21882         inlining context.
21884 2018-02-05  Martin Liska  <mliska@suse.cz>
21886         * doc/invoke.texi: Cherry-pick upstream r323995.
21888 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
21890         * ira.c (ira_init_register_move_cost): Adjust comment.
21892 2018-02-05  Martin Liska  <mliska@suse.cz>
21894         PR gcov-profile/84137
21895         * doc/gcov.texi: Fix typo in documentation.
21897 2018-02-05  Martin Liska  <mliska@suse.cz>
21899         PR gcov-profile/83879
21900         * doc/gcov.texi: Document necessity of --dynamic-list-data when
21901         using dlopen functionality.
21903 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
21905         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
21906         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
21907         _mm_maskz_range_ss, _mm_mask_range_round_ss,
21908         _mm_maskz_range_round_ss): New intrinsics.
21909         (__builtin_ia32_rangesd128_round)
21910         (__builtin_ia32_rangess128_round): Remove.
21911         (__builtin_ia32_rangesd128_mask_round,
21912         __builtin_ia32_rangess128_mask_round): New builtins.
21913         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
21914         __builtin_ia32_rangess128_round): Remove.
21915         (__builtin_ia32_rangesd128_mask_round,
21916         __builtin_ia32_rangess128_mask_round): New builtins.
21917         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
21918         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
21919         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
21920         "<round_saeonly_constraint>")): Changed to ...
21921         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
21922         "<round_saeonly_scalar_constraint>")): ... this.
21923         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
21924         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
21925         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
21926         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
21927         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
21929 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
21931         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
21932         options.
21933         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
21934         Remove all values except native, 8540 and 8548.
21936 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
21938         * config/i386/i386.c (ix86_output_function_return): Pass
21939         INVALID_REGNUM, instead of -1, as invalid register number to
21940         indirect_thunk_name and output_indirect_thunk.
21942 2018-02-02  Julia Koval  <julia.koval@intel.com>
21944         * config.gcc: Add -march=icelake.
21945         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
21946         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
21947         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
21948         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
21949         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
21950         (processor_target_table): Add icelake.
21951         (ix86_option_override_internal): Handle new PTAs.
21952         (get_builtin_code_for_version): Handle icelake.
21953         (M_INTEL_COREI7_ICELAKE): New.
21954         (fold_builtin_cpu): Handle icelake.
21955         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
21956         * doc/invoke.texi: Add -march=icelake.
21958 2018-02-02  Julia Koval  <julia.koval@intel.com>
21960         * config/i386/i386.c (ix86_option_override_internal): Change flags type
21961         to wide_int_bitmask.
21962         * wide-int-bitmask.h: New.
21964 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
21966         PR target/84066
21967         * config/i386/i386.md: Replace Pmode with word_mode in
21968         builtin_setjmp_setup and builtin_longjmp to support x32.
21970 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
21972         PR target/56010
21973         PR target/83743
21974         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
21975         #include "opts.h".
21976         (rs6000_supported_cpu_names): New static variable.
21977         (linux_cpu_translation_table): Likewise.
21978         (elf_platform) <cpu>: Define new static variable and use it.
21979         Translate kernel AT_PLATFORM name to canonical name if needed.
21980         Error if platform name is unknown.
21982 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
21984         PR target/84089
21985         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
21987 2018-02-01  Jeff Law  <law@redhat.com>
21989         PR target/84128
21990         * config/i386/i386.c (release_scratch_register_on_entry): Add new
21991         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
21992         the scratch if RELEASE_VIA_POP is false.
21993         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
21994         If we have to save a temporary register, decrement SIZE appropriately.
21995         Pass new arguments to release_scratch_register_on_entry.
21996         (ix86_adjust_stack_and_probe): Likewise.
21997         (ix86_emit_probe_stack_range): Pass new arguments to
21998         release_scratch_register_on_entry.
22000 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
22002         PR rtl-optimization/84157
22003         * combine.c (change_zero_ext): Use REG_P predicate in
22004         front of HARD_REGISTER_P predicate.
22006 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
22008         * config/avr/avr.c (avr_option_override): Move disabling of
22009         -fdelete-null-pointer-checks to...
22010         * common/config/avr/avr-common.c (avr_option_optimization_table):
22011         ...here.
22013 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22015         PR tree-optimization/81635
22016         * tree-data-ref.c (split_constant_offset_1): For types that
22017         wrap on overflow, try to use range info to prove that wrapping
22018         cannot occur.
22020 2018-02-01  Renlin Li  <renlin.li@arm.com>
22022         PR target/83370
22023         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
22024         TAILCALL_ADDR_REGS.
22025         (aarch64_register_move_cost): Likewise.
22026         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
22027         TAILCALL_ADDR_REGS.
22028         (REG_CLASS_NAMES): Likewise.
22029         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
22030         TAILCALL_ADDR_REGS. Remove IP registers.
22031         * config/aarch64/aarch64.md (Ucs): Update register constraint.
22033 2018-02-01  Richard Biener  <rguenther@suse.de>
22035         * domwalk.h (dom_walker::dom_walker): Add additional constructor
22036         for specifying RPO order and allow NULL for that.
22037         * domwalk.c (dom_walker::dom_walker): Likewise.
22038         (dom_walker::walk): Handle NULL RPO order.
22039         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
22040         in RPO order.
22041         (rewrite_update_dom_walker): Likewise.
22042         (mark_def_dom_walker): Likewise.
22044 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22046         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
22047         (aarch64_maybe_expand_sve_subreg_move): Declare.
22048         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
22049         * config/aarch64/predicates.md (aarch64_any_register_operand): New
22050         predicate.
22051         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
22052         that are semantically a reverse operation.
22053         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
22054         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
22055         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
22056         functions.
22057         (aarch64_can_change_mode_class): For big-endian, forbid changes
22058         between two SVE modes if they have different element sizes.
22060 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22062         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
22063         the TImode handling for big-endian targets.
22065 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22067         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
22068         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
22069         not just bytes.
22070         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
22071         Remove BSWAP handing for big-endian targets and use the form of
22072         LD1RQ appropariate for the mode.
22074 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22076         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
22077         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
22078         duplicated element.
22080 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22082         PR tearget/83845
22083         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
22084         check for operands that need to go through aarch64_sve_reload_be.
22086 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
22088         PR tree-optimization/81661
22089         PR tree-optimization/84117
22090         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
22091         * tree-eh.c: Include gimplify.h.
22092         (find_trapping_overflow, replace_trapping_overflow,
22093         rewrite_to_non_trapping_overflow): New functions.
22094         * tree-vect-loop.c: Include tree-eh.h.
22095         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
22096         * tree-data-ref.c: Include tree-eh.h.
22097         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
22099 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
22101         PR rtl-optimization/84123
22102         * combine.c (change_zero_ext): Check if hard register satisfies
22103         can_change_dest_mode before calling gen_lowpart_SUBREG.
22105 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
22107         PR target/82444
22108         * ira.c (ira_init_register_move_cost): Remove assert.
22110 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
22112         PR rtl-optimization/84071
22113         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
22114         * doc/tm.texi: Regenerate.
22116 2018-01-31  Richard Biener  <rguenther@suse.de>
22118         PR tree-optimization/84132
22119         * tree-data-ref.c (analyze_miv_subscript): Properly
22120         check whether evolution_function_is_affine_multivariate_p
22121         before calling gcd_of_steps_may_divide_p.
22123 2018-01-31  Julia Koval  <julia.koval@intel.com>
22125         PR target/83618
22126         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
22127         * config/i386/i386.md (rdpid_rex64) New.
22128         (rdpid): Make 32bit only.
22130 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
22132         PR lto/84105
22133         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
22134         an IDENTIFIER_NODE for FUNCTION_TYPE's.
22136 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
22138         Revert
22139         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22141         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22143 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
22145         PR rtl-optimization/84071
22146         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
22147         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
22149 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
22151         * config/arc/arc.c (arc_handle_aux_attribute): New function.
22152         (arc_attribute_table): Add 'aux' attribute.
22153         (arc_in_small_data_p): Consider aux like variables.
22154         (arc_is_aux_reg_p): New function.
22155         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
22156         (arc_get_aux_arg): New function.
22157         (prepare_move_operands): Handle aux-register access.
22158         (arc_handle_aux_attribute): New function.
22159         * doc/extend.texi (ARC Variable attributes): Add subsection.
22161 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
22163         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
22164         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
22165         (arc_attribute_table): Add 'uncached' attribute.
22166         (arc_print_operand): Print '.di' flag for uncached memory
22167         accesses.
22168         (arc_in_small_data_p): Do not consider for small data the uncached
22169         types.
22170         (arc_is_uncached_mem_p): New function.
22171         * config/arc/predicates.md (compact_store_memory_operand): Check
22172         for uncached memory accesses.
22173         (nonvol_nonimm_operand): Likewise.
22174         * doc/extend.texi (ARC Type Attribute): New subsection.
22176 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
22178         PR c/84100
22179         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
22180         falign-loops=): Add Optimization flag.
22182 2018-01-30  Jeff Law  <law@redhat.com>
22184         PR target/84064
22185         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
22186         INT_REGISTERS_SAVED.  Check it prior to calling
22187         get_scratch_register_on_entry.
22188         (ix86_adjust_stack_and_probe): Similarly.
22189         (ix86_emit_probe_stack_range): Similarly.
22190         (ix86_expand_prologue): Corresponding changes.
22192 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22194         PR target/40411
22195         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
22196         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
22198 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
22200         PR target/84112
22201         * lra-constraints.c (curr_insn_transform): Process AND in the
22202         address.
22204 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
22206         PR rtl-optimization/83986
22207         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
22208         dependence against last_pending_memory_flush in addition to
22209         pending_jump_insns.
22211 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
22213         PR tree-optimization/81611
22214         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
22215         copies.
22217 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22219         PR target/83758
22220         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
22221         a reg rtx.
22223 2018-01-30  Richard Biener  <rguenther@suse.de>
22224             Jakub Jelinek  <jakub@redhat.com>
22226         PR tree-optimization/84111
22227         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
22228         inner loops added during recursion, as they don't have up-to-date
22229         SSA form.
22231 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
22233         PR ipa/81360
22234         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
22235         (can_inline_edge_by_limits_p): ... here.
22236         (can_early_inline_edge_p, check_callers,
22237         update_caller_keys, update_callee_keys, recursive_inlining,
22238         add_new_edges_to_heap, speculation_useful_p,
22239         inline_small_functions,
22240         inline_small_functions, flatten_function,
22241         inline_to_all_callers_1): Update.
22243 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
22245         * profile-count.c (profile_count::combine_with_ipa_count): Handle
22246         zeros correctly.
22248 2018-01-30  Richard Biener  <rguenther@suse.de>
22250         PR tree-optimization/83008
22251         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
22252         invariant and constant vector uses in stmts when they need
22253         more than one stmt.
22255 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22257         PR bootstrap/84017
22258         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
22259         * configure: Regenerate.
22261 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
22263         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
22264         pattern.
22265         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
22266         Use gen_rtx_REG rather than gen_lowpart.
22268 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
22270         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
22271         rather than 0 when creating partial subregs.
22273 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
22275         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
22276         of usage.
22278 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
22280         PR target/81550
22281         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
22282         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
22283         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
22284         flags.  This restores the settings used before the 2017-07-24.
22285         Turning off pre increment/decrement/modify allows IVOPTS to
22286         optimize DF/SF loops where the index is an int.
22288 2018-01-29  Richard Biener  <rguenther@suse.de>
22289             Kelvin Nilsen  <kelvin@gcc.gnu.org>
22291         PR bootstrap/80867
22292         * tree-vect-stmts.c (vectorizable_call): Don't call
22293         targetm.vectorize_builtin_md_vectorized_function if callee is
22294         NULL.
22296 2018-01-22  Carl Love  <cel@us.ibm.com>
22298         * doc/extend.tex: Fix typo in second arg in
22299         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
22301 2018-01-29  Richard Biener  <rguenther@suse.de>
22303         PR tree-optimization/84086
22304         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
22305         (flush_ssaname_freelist): When SSA names were released reset
22306         the SCEV hash table.
22308 2018-01-29  Richard Biener  <rguenther@suse.de>
22310         PR tree-optimization/84057
22311         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
22312         removed paths when removing edges.
22314 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
22316         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
22317         -mfunction-return=@var{choice}.
22319 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
22321         PR diagnostic/84034
22322         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
22323         Handle CR like TAB.
22324         (layout::print_source_line): Likewise.
22325         (test_get_line_width_without_trailing_whitespace): Add test cases.
22327 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
22329         PR middle-end/84040
22330         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
22331         debug insns.
22333 2018-01-26  Jim Wilson  <jimw@sifive.com>
22335         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
22337         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
22338         specified.
22340 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22342         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
22343         and CMP + SUB-immediate -> SUBS.
22345 2018-01-26  Martin Sebor  <msebor@redhat.com>
22347         PR tree-optimization/83896
22348         * tree-ssa-strlen.c (get_string_len): Rename...
22349         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
22350         Avoid assuming length is constant.
22351         (handle_char_store): Use HOST_WIDE_INT for string length.
22353 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
22355         PR target/81763
22356         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
22357         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
22359 2018-01-26  Richard Biener  <rguenther@suse.de>
22361         PR rtl-optimization/84003
22362         * dse.c (record_store): Only record redundant stores when
22363         the earlier store aliases at least all accesses the later one does.
22365 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
22367         PR rtl-optimization/83985
22368         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
22369         REG_CFA_RESTORE insns.
22370         (delete_unmarked_insns): Don't ignore separate shrink wrapping
22371         REG_CFA_RESTORE insns here.
22373         PR c/83989
22374         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
22375         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
22377 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22379         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
22380         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
22381         (arc_init): Likewise.
22382         (arc_override_options): Likewise.
22383         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
22384         value.
22385         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
22386         support.
22387         * config/arc/arc.h (TARGET_DBNZ): Define.
22388         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
22389         properly set the tune attribute.
22390         (dbnz): Use TARGET_DBNZ guard.
22391         * config/arc/arc.opt (mtune): Add core3 option.
22393 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22395         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
22396         recognize new pic like addresses.
22397         (arc_delegitimize_address): Clean up.
22399 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22401         * config/arc/arc-arches.def: Option mrf16 valid for all
22402         architectures.
22403         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
22404         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
22405         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
22406         * config/arc/arc-tables.opt: Regenerate.
22407         * config/arc/arc.c (arc_conditional_register_usage): Handle
22408         reduced register file case.
22409         (arc_file_start): Set must have build attributes.
22410         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
22411         mrf16 option value.
22412         * config/arc/arc.opt (mrf16): Add new option.
22413         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
22414         * config/arc/genmultilib.awk: Handle new mrf16 option.
22415         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
22416         * config/arc/t-multilib: Regenerate.
22417         * doc/invoke.texi (ARC Options): Document mrf16 option.
22419 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22421         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
22422         * config/arc/arc.c (arc_handle_secure_attribute): New function.
22423         (arc_attribute_table): Add 'secure_call' attribute.
22424         (arc_print_operand): Print secure call operand.
22425         (arc_function_ok_for_sibcall): Don't optimize tail calls when
22426         secure.
22427         (arc_is_secure_call_p): New function.  * config/arc/arc.md
22428         (call_i): Add support for sjli instruction.
22429         (call_value_i): Likewise.
22430         * config/arc/constraints.md (Csc): New constraint.
22432 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22433             John Eric Martin  <John.Martin@emmicro-us.com>
22435         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
22436         * config/arc/arc.c (_arc_jli_section): New struct.
22437         (arc_jli_section): New type.
22438         (rc_jli_sections): New static variable.
22439         (arc_handle_jli_attribute): New function.
22440         (arc_attribute_table): Add jli_always and jli_fixed attribute.
22441         (arc_file_end): New function.
22442         (TARGET_ASM_FILE_END): Define.
22443         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
22444         (arc_add_jli_section): New function.
22445         (jli_call_scan): Likewise.
22446         (arc_reorg): Call jli_call_scan.
22447         (arc_output_addsi): Remove 'S' from printing asm operand.
22448         (arc_is_jli_call_p): New function.
22449         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
22450         operand.
22451         (movhi_insn): Likewise.
22452         (movsi_insn): Likewise.
22453         (movsi_set_cc_insn): Likewise.
22454         (loadqi_update): Likewise.
22455         (load_zeroextendqisi_update): Likewise.
22456         (load_signextendqisi_update): Likewise.
22457         (loadhi_update): Likewise.
22458         (load_zeroextendhisi_update): Likewise.
22459         (load_signextendhisi_update): Likewise.
22460         (loadsi_update): Likewise.
22461         (loadsf_update): Likewise.
22462         (movsicc_insn): Likewise.
22463         (bset_insn): Likewise.
22464         (bxor_insn): Likewise.
22465         (bclr_insn): Likewise.
22466         (bmsk_insn): Likewise.
22467         (bicsi3_insn): Likewise.
22468         (cmpsi_cc_c_insn): Likewise.
22469         (movsi_ne): Likewise.
22470         (movsi_cond_exec): Likewise.
22471         (clrsbsi2): Likewise.
22472         (norm_f): Likewise.
22473         (normw): Likewise.
22474         (swap): Likewise.
22475         (divaw): Likewise.
22476         (flag): Likewise.
22477         (sr): Likewise.
22478         (kflag): Likewise.
22479         (ffs): Likewise.
22480         (ffs_f): Likewise.
22481         (fls): Likewise.
22482         (call_i): Remove 'S' asm letter, add jli instruction.
22483         (call_value_i): Likewise.
22484         * config/arc/arc.op (mjli-always): New option.
22485         * config/arc/constraints.md (Cji): New constraint.
22486         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
22487         operand.
22488         (subsf3_fpx): Likewise.
22489         (mulsf3_fpx): Likewise.
22490         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
22491         asm operand.
22492         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
22493         function attrbutes.
22494         * doc/invoke.texi (ARC): Document mjli-always option.
22496 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
22498         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
22499         avoid addition with 0 and use incw and decw where possible.
22501 2018-01-26  Richard Biener  <rguenther@suse.de>
22503         PR tree-optimization/81082
22504         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
22505         association if it requires casting to unsigned.
22506         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
22507         from fold_plusminus_mult_expr to catch important cases late when
22508         range info is available.
22510 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22512         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
22513         * configure.ac (hidden_linkonce): New test.
22514         * configure: Regenerate.
22515         * config.in: Regenerate.
22517 2018-01-26  Julia Koval  <julia.koval@intel.com>
22519         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
22520         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
22521         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
22522         _mm_mask_bitshuffle_epi64_mask): Fix type.
22523         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
22524         USI_FTYPE_V4DI_V4DI_USI): Remove.
22525         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
22526         __builtin_ia32_vpshufbitqmb256_mask,
22527         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
22528         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
22529         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
22531 2018-01-26  Alan Modra  <amodra@gmail.com>
22533         PR target/84033
22534         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
22535         UNSPEC_VBPERMQ.  Sort other unspecs.
22537 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
22539         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
22541 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
22543         PR middle-end/83055
22544         * predict.c (drop_profile): Do not push/pop cfun; update also
22545         node->count.
22546         (handle_missing_profiles): Fix logic looking for zero profiles.
22548 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
22550         PR middle-end/83977
22551         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
22552         on functions with #pragma omp declare simd or functions with simd
22553         attribute.
22554         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
22555         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
22556         Remove trailing \n from warning_at calls.
22558 2018-01-25  Tom de Vries  <tom@codesourcery.com>
22560         PR target/84028
22561         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22562         for neutered workers.
22564 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
22566         PR target/68467
22567         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
22568         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
22570 2018-01-24  Jeff Law  <law@redhat.com>
22572         PR target/83994
22573         * i386.c (get_probe_interval): Move to earlier point.
22574         (ix86_compute_frame_layout): If -fstack-clash-protection and
22575         the frame is larger than the probe interval, then use pushes
22576         to save registers rather than reg->mem moves.
22577         (ix86_expand_prologue): Remove conditional for int_registers_saved
22578         assertion.
22580 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
22582         PR target/84014
22583         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
22584         min/max for never referenced object.
22586 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
22588         PR middle-end/83977
22589         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
22590         here.
22591         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
22592         attributes from DECL_ATTRIBUTES (decl) without affecting
22593         DECL_ATTRIBUTES (current_function_decl).
22594         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
22595         functions with non-NULL DECL_ABSTRACT_ORIGIN.
22597 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
22599         PR tree-optimization/83979
22600         * fold-const.c (fold_comparison): Use constant_boolean_node
22601         instead of boolean_{true,false}_node.
22603 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
22605         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
22606         with zero counts.
22608 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22610         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22611         Simplify the clause that sets the length attribute.
22612         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22613         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
22614         clause that sets the length attribute.
22615         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22617 2018-01-24  Tom de Vries  <tom@codesourcery.com>
22619         PR target/83589
22620         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
22621         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
22622         Add strict parameter.
22623         (prevent_branch_around_nothing): Insert dummy insn between branch to
22624         label and label with no ptx insn inbetween.
22625         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
22627 2018-01-24  Tom de Vries  <tom@codesourcery.com>
22629         PR target/81352
22630         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22631         for neutered threads in warp.
22632         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
22634 2018-01-24  Richard Biener  <rguenther@suse.de>
22636         PR tree-optimization/83176
22637         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
22638         operands.
22640 2018-01-24  Richard Biener  <rguenther@suse.de>
22642         PR tree-optimization/82819
22643         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
22644         code generating pluses that are no-ops in the target precision.
22646 2018-01-24  Richard Biener  <rguenther@suse.de>
22648         PR middle-end/84000
22649         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
22651 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
22653         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
22654         to merge probabilities.
22655         * predict.c (probably_never_executed): Also mark as cold functions
22656         with global 0 profile and guessed local profile.
22657         * profile-count.c (profile_probability::combine_with_count): New
22658         member function.
22659         * profile-count.h (profile_probability::operator*,
22660         profile_probability::operator*=, profile_probability::operator/,
22661         profile_probability::operator/=): Reduce precision to adjusted
22662         and set value to guessed on contradictory divisions.
22663         (profile_probability::combine_with_freq): Remove.
22664         (profile_probability::combine_wiht_count): Declare.
22665         (profile_count::force_nonzero):: Set to adjusted.
22666         (profile_count::probability_in):: Set quality to adjusted.
22667         * tree-ssa-tail-merge.c (replace_block_by): Use
22668         combine_with_count.
22670 2018-01-23  Andrew Waterman  <andrew@sifive.com>
22671             Jim Wilson  <jimw@sifive.com>
22673         * config/riscv/riscv.c (riscv_stack_boundary): New.
22674         (riscv_option_override): Set riscv_stack_boundary.  Handle
22675         riscv_preferred_stack_boundary_arg.
22676         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
22677         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
22678         (STACK_BOUNDARY): Set to riscv_stack_boundary.
22679         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
22680         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
22681         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
22683 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
22685         PR target/83905
22686         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
22687         of struct ix86_frame.
22688         (ix86_expand_epilogue): Likewise.  Add a local variable for
22689         the reg_save_offset field in struct ix86_frame.
22691 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
22693         PR tree-optimization/82604
22694         * tree-loop-distribution.c (enum partition_kind): New enum item
22695         PKIND_PARTIAL_MEMSET.
22696         (partition_builtin_p): Support above new enum item.
22697         (generate_code_for_partition): Ditto.
22698         (compute_access_range): Differentiate cases that equality can be
22699         proven at all loops, the innermost loops or no loops.
22700         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
22701         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
22702         (finalize_partitions, distribute_loop): Don't fuse partition of
22703         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
22704         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
22705         parloop is enabled.
22707 2018-01-23  Martin Liska  <mliska@suse.cz>
22709         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
22710         order to ignore the predictor.
22711         (PRED_POLYMORPHIC_CALL): Likewise.
22712         (PRED_RECURSIVE_CALL): Likewise.
22714 2018-01-23  Martin Liska  <mliska@suse.cz>
22716         * tree-profile.c (tree_profiling): Print function header to
22717         aware reader which function we are working on.
22718         * value-prof.c (gimple_find_values_to_profile): Do not print
22719         not interesting value histograms.
22721 2018-01-23  Martin Liska  <mliska@suse.cz>
22723         * profile-count.h (enum profile_quality): Add
22724         profile_uninitialized as the first value. Do not number values
22725         as they are zero based.
22726         (profile_count::verify): Update sanity check.
22727         (profile_probability::verify): Likewise.
22729 2018-01-23  Nathan Sidwell  <nathan@acm.org>
22731         * doc/invoke.texi (ffor-scope): Deprecate.
22733 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
22735         PR tree-optimization/83510
22736         * domwalk.c (set_all_edges_as_executable): New function.
22737         (dom_walker::dom_walker): Convert bool param
22738         "skip_unreachable_blocks" to enum reachability.  Move setup of
22739         edge flags to set_all_edges_as_executable and only do it when
22740         reachability is REACHABLE_BLOCKS.
22741         * domwalk.h (enum dom_walker::reachability): New enum.
22742         (dom_walker::dom_walker): Convert bool param
22743         "skip_unreachable_blocks" to enum reachability.
22744         (set_all_edges_as_executable): New decl.
22745         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
22746         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
22747         "reachability".
22748         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
22749         but converting true to REACHABLE_BLOCKS.
22750         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
22751         * tree-vrp.c
22752         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
22753         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
22754         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
22755         REACHABLE_BLOCKS.
22756         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
22757         if check_all_array_refs will be called.
22759 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
22761         * tree.c (selftest::test_location_wrappers): Add more test
22762         coverage.
22764 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
22766         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
22767         (selftest::test_bit_in_range): Likewise.
22769 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
22771         PR testsuite/83888
22772         * doc/sourcebuild.texi (vect_float): Say that the selector
22773         only describes the situation when -funsafe-math-optimizations is on.
22774         (vect_float_strict): Document.
22776 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
22778         PR tree-optimization/83965
22779         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
22780         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
22781         instead of checking only for a reduction.
22782         (vect_recog_widen_sum_pattern): Likewise.
22784 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
22786         * predict.c (probably_never_executed): Only use precise profile info.
22787         (compute_function_frequency): Skip after inlining hack since we now
22788         have quality checking.
22790 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
22792         * profile-count.h (profile_probability::very_unlikely,
22793         profile_probability::unlikely, profile_probability::even): Set
22794         precision to guessed.
22796 2018-01-23  Richard Biener  <rguenther@suse.de>
22798         PR tree-optimization/83963
22799         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
22800         Properly terminate dominator walk when crossing the exit edge not
22801         when visiting its source block.
22803 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
22805         PR c++/83918
22806         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
22807         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
22809 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
22811         PR tree-optimization/83957
22812         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
22813         semicolon after for body surrounded by braces.
22815         PR tree-optimization/83081
22816         * profile-count.h (profile_probability::split): New method.
22817         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
22818         Use profile_probability::split.
22819         (do_compare_rtx_and_jump): Fix adjustment of probabilities
22820         when splitting a single conditional jump into 2.
22822 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
22824         PR tree-optimization/69452
22825         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
22826         decl.
22828 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22830         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
22831         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
22832         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
22834 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22836         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
22837         declaration.
22838         * config/rl78/rl78.md (movdi): New define_expand.
22839         * config/rl78/rl78.c (rl78_split_movdi): New function.
22841 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
22843         PR target/83862
22844         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
22845         no longer used.
22846         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
22847         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
22848         128-bit to produce an UNSPEC move to get the double word with the
22849         signbit and then a shift directly to do signbit.
22850         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
22851         implementation with a new version that just does either a direct
22852         move or a regular move.  Move memory interface to separate insns.
22853         Move insns so they are next to the expander.
22854         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
22855         with signbit move.  Split big and little endian case.
22856         (signbit<mode>2_dm_mem_le): Likewise.
22857         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
22858         (signbit<mode>2_dm2): Likewise.
22860 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22862         * config/rl78/rl78.md (anddi3): New define_expand.
22864 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22866         * config/rl78/rl78.md (umindi3): New define_expand.
22868 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22870         * config/rl78/rl78.md (smindi3): New define_expand.
22872 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22874         * config/rl78/rl78.md (smaxdi3): New define_expand.
22876 2018-01-22  Carl Love  <cel@us.ibm.com>
22878         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
22879         LVX_V1TI): Add macro expansion.
22880         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
22881         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
22882         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
22883         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
22884         Change check to determine if the instruction is a byte reversing
22885         entry.  Fix typo in comment.
22886         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
22887         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
22888         Add def_builtin calls for new builtins.
22889         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
22890         Add define_insn expansion.
22892 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22894         * config/rl78/rl78.md (umaxdi3): New define_expand.
22896 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22898         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
22899         for non-QImode registers.
22901 2018-01-22  Richard Biener  <rguenther@suse.de>
22903         PR tree-optimization/83963
22904         * graphite-scop-detection.c (scop_detection::get_sese): Delay
22905         including the loop exit block.
22906         (scop_detection::merge_sese): Likewise.
22907         (scop_detection::add_scop): Do it here instead.
22909 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22911         * doc/sourcebuild.texi (arm_softfloat): Document.
22913 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
22915         PR gcc/77734
22916         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
22917         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
22918         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
22920 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22921             David Edelsohn  <dje.gcc@gmail.com>
22923         PR target/83946
22924         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22925         Change "crset eq" to "crset 2".
22926         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22927         (*call_indirect_aix<mode>_nospec): Likewise.
22928         (*call_value_indirect_aix<mode>_nospec): Likewise.
22929         (*call_indirect_elfv2<mode>_nospec): Likewise.
22930         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
22931         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
22932         change assembly output from . to $.
22933         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22934         (indirect_jump<mode>_nospec): Change assembly output from . to $.
22935         (*tablejump<mode>_internal1_nospec): Likewise.
22937 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
22939         PR target/80870
22940         * config/sh/sh_optimize_sett_clrt.cc:
22941         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
22943 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
22945         PR tree-optimization/83940
22946         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
22947         offset_dt to vect_constant_def rather than vect_unknown_def_type.
22948         (vect_check_load_store_mask): Add a mask_dt_out parameter and
22949         use it to pass back the definition type.
22950         (vect_check_store_rhs): Likewise rhs_dt_out.
22951         (vect_build_gather_load_calls): Add a mask_dt argument and use
22952         it instead of a call to vect_is_simple_use.
22953         (vectorizable_store): Update calls to vect_check_load_store_mask
22954         and vect_check_store_rhs.  Use the dt returned by the latter instead
22955         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
22956         instead of calls to vect_is_simple_use.  Pass the scalar rather
22957         than the vector operand to vect_is_simple_use when handling
22958         second and subsequent copies of an rhs value.
22959         (vectorizable_load): Update calls to vect_check_load_store_mask
22960         and vect_build_gather_load_calls.  Use the cached mask_dt and
22961         gs_info.offset_dt instead of calls to vect_is_simple_use.
22963 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
22965         PR middle-end/83945
22966         * tree-emutls.c: Include gimplify.h.
22967         (lower_emutls_2): New function.
22968         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
22969         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
22970         it before further processing.
22972         PR target/83930
22973         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
22974         UINTVAL (trueop1) instead of INTVAL (op1).
22976 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
22978         PR debug/81570
22979         PR debug/83728
22980         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
22981         INCOMING_FRAME_SP_OFFSET if not defined.
22982         (scan_trace): Add ENTRY argument.  If true and
22983         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
22984         emit a note to adjust the CFA offset.
22985         (create_cfi_notes): Adjust scan_trace callers.
22986         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
22987         INCOMING_FRAME_SP_OFFSET in the CIE.
22988         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
22989         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
22990         Likewise.
22991         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
22992         * doc/tm.texi: Regenerated.
22994 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22996         PR rtl-optimization/83147
22997         * lra-constraints.c (remove_inheritance_pseudos): Use
22998         lra_substitute_pseudo_within_insn.
23000 2018-01-19  Tom de Vries  <tom@codesourcery.com>
23001             Cesar Philippidis  <cesar@codesourcery.com>
23003         PR target/83920
23004         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
23006 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
23008         PR target/83790
23009         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
23010         spaces for function labels.
23012 2018-01-19  Martin Liska  <mliska@suse.cz>
23014         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
23015         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
23016         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
23017         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
23018         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
23019         (PRED_CONST_RETURN): Change from 69 to 65.
23020         (PRED_NULL_RETURN): Change from 91 to 71.
23021         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
23022         (PRED_LOOP_GUARD): Change from 66 to 73.
23024 2018-01-19  Martin Liska  <mliska@suse.cz>
23026         * predict.c (predict_insn_def): Add new assert.
23027         (struct branch_predictor): Change type to signed integer.
23028         (test_prediction_value_range): Amend test to cover
23029         PROB_UNINITIALIZED.
23030         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
23031         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
23032         (PRED_LOOP_ITERATIONS_MAX): Likewise.
23033         (PRED_LOOP_IV_COMPARE): Likewise.
23034         * predict.h (PROB_UNINITIALIZED): Define new constant.
23036 2018-01-19  Martin Liska  <mliska@suse.cz>
23038         * predict.c (dump_prediction): Add new format for
23039         analyze_brprob.py script which is enabled with -details
23040         suboption.
23041         * profile-count.h (precise_p): New function.
23043 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
23045         PR tree-optimization/83922
23046         * tree-vect-loop.c (vect_verify_full_masking): Return false if
23047         there are no statements that need masking.
23048         (vect_active_double_reduction_p): New function.
23049         (vect_analyze_loop_operations): Use it when handling phis that
23050         are not in the loop header.
23052 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
23054         PR tree-optimization/83914
23055         * tree-vect-loop.c (vectorizable_induction): Don't convert
23056         init_expr or apply the peeling adjustment for inductions
23057         that are nested within the vectorized loop.
23059 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23061         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
23062         instead of NEG.
23064 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
23066         PR sanitizer/81715
23067         PR testsuite/83882
23068         * function.h (gimplify_parameters): Add gimple_seq * argument.
23069         * function.c: Include gimple.h and options.h.
23070         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
23071         for the added local temporaries if needed.
23072         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
23073         if there are any parameter cleanups, wrap whole body into a
23074         try/finally with the cleanups.
23076 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
23078         PR target/82964
23079         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
23080         Use GET_MODE_CLASS for scalar floating point.
23082 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
23084         PR ipa/82256
23085         patch by PaX Team
23086         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
23087         Fix call of call_cgraph_insertion_hooks.
23089 2018-01-18  Martin Sebor  <msebor@redhat.com>
23091         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
23093 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
23095         PR ipa/83619
23096         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
23097         frequencies.
23099 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
23101         PR other/70268
23102         * common.opt: (-ffile-prefix-map): New option.
23103         * opts.c (common_handle_option): Defer it.
23104         * opts-global.c (handle_common_deferred_options): Handle it.
23105         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
23106         * file-prefix-map.h: New file.
23107         (remap_debug_filename, add_debug_prefix_map): ...here.
23108         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
23109         * final.c (debug_prefix_map, add_debug_prefix_map
23110         remap_debug_filename): Move to...
23111         * file-prefix-map.c: New file.
23112         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
23113         generalize, get rid of alloca(), use strrchr() instead of strchr().
23114         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
23115         Implement in terms of add_prefix_map().
23116         (remap_macro_filename, remap_debug_filename): Implement in term of
23117         remap_filename().
23118         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
23119         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
23120         * dbxout.c: Include file-prefix-map.h.
23121         * varasm.c: Likewise.
23122         * vmsdbgout.c: Likewise.
23123         * xcoffout.c: Likewise.
23124         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
23125         * doc/cppopts.texi (-fmacro-prefix-map): Document.
23126         * doc/invoke.texi (-ffile-prefix-map): Document.
23127         (-fdebug-prefix-map): Update description.
23129 2018-01-18  Martin Liska  <mliska@suse.cz>
23131         * config/i386/i386.c (indirect_thunk_name): Document that also
23132         lfence is emitted.
23133         (output_indirect_thunk): Document why both instructions
23134         (pause and lfence) are generated.
23136 2018-01-18  Richard Biener  <rguenther@suse.de>
23138         PR tree-optimization/83887
23139         * graphite-scop-detection.c
23140         (scop_detection::get_nearest_dom_with_single_entry): Remove.
23141         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
23142         (scop_detection::merge_sese): Re-implement with a flood-fill
23143         algorithm that properly finds a SESE region if it exists.
23145 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
23147         PR c/61240
23148         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
23149         pointer_diff optimizations use view_convert instead of convert.
23151 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23153         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23154         Generate different code for -mno-speculate-indirect-jumps.
23155         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23156         (*call_indirect_aix<mode>): Disable for
23157         -mno-speculate-indirect-jumps.
23158         (*call_indirect_aix<mode>_nospec): New define_insn.
23159         (*call_value_indirect_aix<mode>): Disable for
23160         -mno-speculate-indirect-jumps.
23161         (*call_value_indirect_aix<mode>_nospec): New define_insn.
23162         (*sibcall_nonlocal_sysv<mode>): Generate different code for
23163         -mno-speculate-indirect-jumps.
23164         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23166 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
23168         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
23169         long double type, set the flags for noting the default long double
23170         type, even if we don't pass or return a long double type.
23172 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
23174         PR ipa/83051
23175         * ipa-inline.c (flatten_function): Do not overwrite final inlining
23176         failure.
23178 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
23180         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
23181         support for merge[hl].
23182         (fold_mergehl_helper): New helper function.
23183         (tree-vector-builder.h): New #include for tree_vector_builder usage.
23184         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
23185         (altivec_vmrglw_direct): Add xxmrglw insn.
23187 2018-01-17  Andrew Waterman  <andrew@sifive.com>
23189         * config/riscv/riscv.c (riscv_conditional_register_usage): If
23190         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
23192 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
23194         PR lto/83121
23195         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
23196         call the lto_location_cache before reading the
23197         DECL_SOURCE_LOCATION of the types.
23199 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
23200             Richard Sandiford  <richard.sandiford@linaro.org>
23202         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
23203         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
23204         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
23205         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
23206         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
23207         Add declaration.
23208         * config/aarch64/constraints.md (aarch64_movti_operand):
23209         Limit immediates.
23210         * config/aarch64/predicates.md (Uti): Add new constraint.
23212 2018-01-17  Carl Love  <cel@us.ibm.com>
23214         * config/rs6000/vsx.md (define_expand xl_len_r,
23215         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
23216         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
23217         lxvll.
23218         (define_expand, define_insn): Move the shift left from  the
23219         define_insn to the define_expand for lxvl and stxvl instructions.
23220         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
23221         and XL_LEN_R definitions to PURE.
23223 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
23225         * config/i386/i386.c (indirect_thunk_name): Declare regno
23226         as unsigned int.  Compare regno with INVALID_REGNUM.
23227         (output_indirect_thunk): Ditto.
23228         (output_indirect_thunk_function): Ditto.
23229         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
23230         in the call to output_indirect_thunk_function.
23232 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
23234         PR middle-end/83884
23235         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
23236         rather than the size of inner_type to determine the stack slot size
23237         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
23239 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
23241         PR target/83546
23242         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
23243         to PTA_SILVERMONT.
23245 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
23247         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
23248         endian Linux systems to optionally enable multilibs for selecting
23249         the long double type if the user configured an explicit type.
23250         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
23251         have no long double multilibs if not defined.
23252         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
23253         warn if the user used -mabi={ieee,ibm}longdouble and we built
23254         multilibs for long double.
23255         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
23256         appropriate multilib option.
23257         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
23258         multilib options.
23259         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
23260         for building long double multilibs.
23261         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
23263 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
23265         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
23266         copies.
23268         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
23269         64 bits.
23270         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
23271         128 bits.
23273         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
23274         variables.
23276         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
23277         return value.
23279 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
23281         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
23282         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
23284 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23286         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
23287         different rtl trees depending on TARGET_64BIT.
23288         (rs6000_gen_lvx): Likewise.
23290 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
23292         * config/visium/visium.md (nop): Tweak comment.
23293         (hazard_nop): Likewise.
23295 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23297         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
23298         -mspeculate-indirect-jumps.
23299         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
23300         for -mno-speculate-indirect-jumps.
23301         (*call_indirect_elfv2<mode>_nospec): New define_insn.
23302         (*call_value_indirect_elfv2<mode>): Disable for
23303         -mno-speculate-indirect-jumps.
23304         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
23305         (indirect_jump): Emit different RTL for
23306         -mno-speculate-indirect-jumps.
23307         (*indirect_jump<mode>): Disable for
23308         -mno-speculate-indirect-jumps.
23309         (*indirect_jump<mode>_nospec): New define_insn.
23310         (tablejump): Emit different RTL for
23311         -mno-speculate-indirect-jumps.
23312         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
23313         (tablejumpsi_nospec): New define_expand.
23314         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
23315         (tablejumpdi_nospec): New define_expand.
23316         (*tablejump<mode>_internal1): Disable for
23317         -mno-speculate-indirect-jumps.
23318         (*tablejump<mode>_internal1_nospec): New define_insn.
23319         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
23320         option.
23322 2018-01-16  Artyom Skrobov tyomitch@gmail.com
23324         * caller-save.c (insert_save): Drop unnecessary parameter.  All
23325         callers updated.
23327 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
23328             Richard Biener  <rguenth@suse.de>
23330         PR libgomp/83590
23331         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
23332         return early, inline manually is_gimple_sizepos.  Make sure if we
23333         call gimplify_expr we don't end up with a gimple constant.
23334         * tree.c (variably_modified_type_p): Don't return true for
23335         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
23336         * gimplify.h (is_gimple_sizepos): Remove.
23338 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23340         PR tree-optimization/83857
23341         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
23342         vectorizable_live_operation for pure SLP statements.
23343         (vectorizable_live_operation): Handle PHIs.
23345 2018-01-16  Richard Biener  <rguenther@suse.de>
23347         PR tree-optimization/83867
23348         * tree-vect-stmts.c (vect_transform_stmt): Precompute
23349         nested_in_vect_loop_p since the scalar stmt may get invalidated.
23351 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
23353         PR c/83844
23354         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
23355         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
23356         If off is not INTEGER_CST, issue a may not be aligned warning
23357         rather than isn't aligned.  Use isn%'t rather than isn't.
23358         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
23359         into MULT_EXPR.
23360         <case MULT_EXPR>: Improve the case when bottom and one of the
23361         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
23362         operand, in that case check if the other operand is multiple of
23363         bottom divided by the INTEGER_CST operand.
23365 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23367         PR target/83858
23368         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
23369         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
23370         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
23371         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
23372         * config/pa/pa.c (pa_function_arg_advance): Likewise.
23373         (pa_function_arg, pa_arg_partial_bytes): Likewise.
23374         (pa_function_arg_size): New function.
23376 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23378         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
23379         in a separate statement.
23381 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23383         PR tree-optimization/83847
23384         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
23385         group gathers and scatters.
23387 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
23389         PR rtl-optimization/86620
23390         * params.def (max-sched-ready-insns): Bump minimum value to 1.
23392         PR rtl-optimization/83213
23393         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
23394         to last if both are JUMP_INSNs.
23396         PR tree-optimization/83843
23397         * gimple-ssa-store-merging.c
23398         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
23399         store_immediate_info for bswap/nop orig_stores.
23401 2018-01-15  Andrew Waterman  <andrew@sifive.com>
23403         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
23404         !TARGET_MUL.
23405         <UDIV>: Increase cost if !TARGET_DIV.
23407 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
23409         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
23410         (define_attr "cr_logical_3op"): New.
23411         (cceq_ior_compare): Adjust.
23412         (cceq_ior_compare_complement): Adjust.
23413         (*cceq_rev_compare): Adjust.
23414         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
23415         (is_cracked_insn): Adjust.
23416         (insn_must_be_first_in_group): Adjust.
23417         * config/rs6000/40x.md: Adjust.
23418         * config/rs6000/440.md: Adjust.
23419         * config/rs6000/476.md: Adjust.
23420         * config/rs6000/601.md: Adjust.
23421         * config/rs6000/603.md: Adjust.
23422         * config/rs6000/6xx.md: Adjust.
23423         * config/rs6000/7450.md: Adjust.
23424         * config/rs6000/7xx.md: Adjust.
23425         * config/rs6000/8540.md: Adjust.
23426         * config/rs6000/cell.md: Adjust.
23427         * config/rs6000/e300c2c3.md: Adjust.
23428         * config/rs6000/e500mc.md: Adjust.
23429         * config/rs6000/e500mc64.md: Adjust.
23430         * config/rs6000/e5500.md: Adjust.
23431         * config/rs6000/e6500.md: Adjust.
23432         * config/rs6000/mpc.md: Adjust.
23433         * config/rs6000/power4.md: Adjust.
23434         * config/rs6000/power5.md: Adjust.
23435         * config/rs6000/power6.md: Adjust.
23436         * config/rs6000/power7.md: Adjust.
23437         * config/rs6000/power8.md: Adjust.
23438         * config/rs6000/power9.md: Adjust.
23439         * config/rs6000/rs64.md: Adjust.
23440         * config/rs6000/titan.md: Adjust.
23442 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23444         * config/i386/predicates.md (indirect_branch_operand): Rewrite
23445         ix86_indirect_branch_register logic.
23447 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23449         * config/i386/constraints.md (Bs): Update
23450         ix86_indirect_branch_register check.  Don't check
23451         ix86_indirect_branch_register with GOT_memory_operand.
23452         (Bw): Likewise.
23453         * config/i386/predicates.md (GOT_memory_operand): Don't check
23454         ix86_indirect_branch_register here.
23455         (GOT32_symbol_operand): Likewise.
23457 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23459         * config/i386/predicates.md (constant_call_address_operand):
23460         Rewrite ix86_indirect_branch_register logic.
23461         (sibcall_insn_operand): Likewise.
23463 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23465         * config/i386/constraints.md (Bs): Replace
23466         ix86_indirect_branch_thunk_register with
23467         ix86_indirect_branch_register.
23468         (Bw): Likewise.
23469         * config/i386/i386.md (indirect_jump): Likewise.
23470         (tablejump): Likewise.
23471         (*sibcall_memory): Likewise.
23472         (*sibcall_value_memory): Likewise.
23473         Peepholes of indirect call and jump via memory: Likewise.
23474         * config/i386/i386.opt: Likewise.
23475         * config/i386/predicates.md (indirect_branch_operand): Likewise.
23476         (GOT_memory_operand): Likewise.
23477         (call_insn_operand): Likewise.
23478         (sibcall_insn_operand): Likewise.
23479         (GOT32_symbol_operand): Likewise.
23481 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
23483         PR middle-end/83837
23484         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
23485         type rather than type addr's type points to.
23486         (expand_omp_atomic_mutex): Likewise.
23487         (expand_omp_atomic): Likewise.
23489 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23491         PR target/83839
23492         * config/i386/i386.c (output_indirect_thunk_function): Use
23493         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
23494         for  __x86_return_thunk.
23496 2018-01-15  Richard Biener  <rguenther@suse.de>
23498         PR middle-end/83850
23499         * expmed.c (extract_bit_field_1): Fix typo.
23501 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23503         PR target/83687
23504         * config/arm/iterators.md (VF): New mode iterator.
23505         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
23506         Remove integer-related logic from pattern.
23507         (neon_vabd<mode>_3): Likewise.
23509 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
23511         PR middle-end/82694
23512         * common.opt (fstrict-overflow): No longer an alias.
23513         (fwrapv-pointer): New option.
23514         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
23515         also for pointer types based on flag_wrapv_pointer.
23516         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
23517         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
23518         opts->x_flag_wrapv got set.
23519         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
23520         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
23521         POINTER_TYPE_OVERFLOW_UNDEFINED.
23522         * match.pd: Likewise in address comparison pattern.
23523         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
23525 2018-01-15  Richard Biener  <rguenther@suse.de>
23527         PR lto/83804
23528         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
23529         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
23530         Reset type names to their identifier if their TYPE_DECL doesn't
23531         have linkage (and thus is used for ODR and devirt).
23532         (save_debug_info_for_decl): Remove.
23533         (save_debug_info_for_type): Likewise.
23534         (add_tree_to_fld_list): Adjust.
23535         * tree-pretty-print.c (dump_generic_node): Make dumping of
23536         type names more robust.
23538 2018-01-15  Richard Biener  <rguenther@suse.de>
23540         * BASE-VER: Bump to 8.0.1.
23542 2018-01-14  Martin Sebor  <msebor@redhat.com>
23544         PR other/83508
23545         * builtins.c (check_access): Avoid warning when the no-warning bit
23546         is set.
23548 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
23550         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
23551         * ira-color (allocno_hard_regs_compare): Likewise.
23553 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
23555         PR target/83013
23556         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
23557         Use .pushsection/.popsection.
23559 2018-01-14  Martin Sebor  <msebor@redhat.com>
23561         PR c++/81327
23562         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
23564 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
23566         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
23567         entry from extra_headers.
23568         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
23569         extra_headers, make the list bitwise identical to the i?86-*-* one.
23571 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23573         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
23574         -mcmodel=large with -mindirect-branch=thunk,
23575         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
23576         -mfunction-return=thunk-extern.
23577         * doc/invoke.texi: Document -mcmodel=large is incompatible with
23578         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
23579         -mfunction-return=thunk and -mfunction-return=thunk-extern.
23581 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23583         * config/i386/i386.c (print_reg): Print the name of the full
23584         integer register without '%'.
23585         (ix86_print_operand): Handle 'V'.
23586         * doc/extend.texi: Document 'V' modifier.
23588 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23590         * config/i386/constraints.md (Bs): Disallow memory operand for
23591         -mindirect-branch-register.
23592         (Bw): Likewise.
23593         * config/i386/predicates.md (indirect_branch_operand): Likewise.
23594         (GOT_memory_operand): Likewise.
23595         (call_insn_operand): Likewise.
23596         (sibcall_insn_operand): Likewise.
23597         (GOT32_symbol_operand): Likewise.
23598         * config/i386/i386.md (indirect_jump): Call convert_memory_address
23599         for -mindirect-branch-register.
23600         (tablejump): Likewise.
23601         (*sibcall_memory): Likewise.
23602         (*sibcall_value_memory): Likewise.
23603         Disallow peepholes of indirect call and jump via memory for
23604         -mindirect-branch-register.
23605         (*call_pop): Replace m with Bw.
23606         (*call_value_pop): Likewise.
23607         (*sibcall_pop_memory): Replace m with Bs.
23608         * config/i386/i386.opt (mindirect-branch-register): New option.
23609         * doc/invoke.texi: Document -mindirect-branch-register option.
23611 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23613         * config/i386/i386-protos.h (ix86_output_function_return): New.
23614         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
23615         set function_return_type.
23616         (indirect_thunk_name): Add ret_p to indicate thunk for function
23617         return.
23618         (output_indirect_thunk_function): Pass false to
23619         indirect_thunk_name.
23620         (ix86_output_indirect_branch_via_reg): Likewise.
23621         (ix86_output_indirect_branch_via_push): Likewise.
23622         (output_indirect_thunk_function): Create alias for function
23623         return thunk if regno < 0.
23624         (ix86_output_function_return): New function.
23625         (ix86_handle_fndecl_attribute): Handle function_return.
23626         (ix86_attribute_table): Add function_return.
23627         * config/i386/i386.h (machine_function): Add
23628         function_return_type.
23629         * config/i386/i386.md (simple_return_internal): Use
23630         ix86_output_function_return.
23631         (simple_return_internal_long): Likewise.
23632         * config/i386/i386.opt (mfunction-return=): New option.
23633         (indirect_branch): Mention -mfunction-return=.
23634         * doc/extend.texi: Document function_return function attribute.
23635         * doc/invoke.texi: Document -mfunction-return= option.
23637 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23639         * config/i386/i386-opts.h (indirect_branch): New.
23640         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
23641         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
23642         with local indirect jump when converting indirect call and jump.
23643         (ix86_set_indirect_branch_type): New.
23644         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
23645         (indirectlabelno): New.
23646         (indirect_thunk_needed): Likewise.
23647         (indirect_thunk_bnd_needed): Likewise.
23648         (indirect_thunks_used): Likewise.
23649         (indirect_thunks_bnd_used): Likewise.
23650         (INDIRECT_LABEL): Likewise.
23651         (indirect_thunk_name): Likewise.
23652         (output_indirect_thunk): Likewise.
23653         (output_indirect_thunk_function): Likewise.
23654         (ix86_output_indirect_branch_via_reg): Likewise.
23655         (ix86_output_indirect_branch_via_push): Likewise.
23656         (ix86_output_indirect_branch): Likewise.
23657         (ix86_output_indirect_jmp): Likewise.
23658         (ix86_code_end): Call output_indirect_thunk_function if needed.
23659         (ix86_output_call_insn): Call ix86_output_indirect_branch if
23660         needed.
23661         (ix86_handle_fndecl_attribute): Handle indirect_branch.
23662         (ix86_attribute_table): Add indirect_branch.
23663         * config/i386/i386.h (machine_function): Add indirect_branch_type
23664         and has_local_indirect_jump.
23665         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
23666         to true.
23667         (tablejump): Likewise.
23668         (*indirect_jump): Use ix86_output_indirect_jmp.
23669         (*tablejump_1): Likewise.
23670         (simple_return_indirect_internal): Likewise.
23671         * config/i386/i386.opt (mindirect-branch=): New option.
23672         (indirect_branch): New.
23673         (keep): Likewise.
23674         (thunk): Likewise.
23675         (thunk-inline): Likewise.
23676         (thunk-extern): Likewise.
23677         * doc/extend.texi: Document indirect_branch function attribute.
23678         * doc/invoke.texi: Document -mindirect-branch= option.
23680 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
23682         PR ipa/83051
23683         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
23685 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
23687         * ipa-inline.c (want_inline_small_function_p): Return false if
23688         inlining has already failed with CIF_FINAL_ERROR.
23689         (update_caller_keys): Call want_inline_small_function_p before
23690         can_inline_edge_p.
23691         (update_callee_keys): Likewise.
23693 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23695         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
23696         New function.
23697         (rs6000_quadword_masked_address_p): Likewise.
23698         (quad_aligned_load_p): Likewise.
23699         (quad_aligned_store_p): Likewise.
23700         (const_load_sequence_p): Add comment to describe the outer-most loop.
23701         (mimic_memory_attributes_and_flags): New function.
23702         (rs6000_gen_stvx): Likewise.
23703         (replace_swapped_aligned_store): Likewise.
23704         (rs6000_gen_lvx): Likewise.
23705         (replace_swapped_aligned_load): Likewise.
23706         (replace_swapped_load_constant): Capitalize argument name in
23707         comment describing this function.
23708         (rs6000_analyze_swaps): Add a third pass to search for vector loads
23709         and stores that access quad-word aligned addresses and replace
23710         with stvx or lvx instructions when appropriate.
23711         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
23712         New function prototype.
23713         (rs6000_quadword_masked_address_p): Likewise.
23714         (rs6000_gen_lvx): Likewise.
23715         (rs6000_gen_stvx): Likewise.
23716         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
23717         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
23718         when memory address is aligned.
23719         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
23720         this split to select lvx instruction when memory address is aligned.
23721         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
23722         instruction when memory address is aligned.
23723         (*vsx_le_perm_load_v16qi): Likewise.
23724         (four unnamed splitters): Modify to select the stvx instruction
23725         when memory is aligned.
23727 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
23729         * predict.c (determine_unlikely_bbs): Handle correctly BBs
23730         which appears in the queue multiple times.
23732 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23733             Alan Hayward  <alan.hayward@arm.com>
23734             David Sherwood  <david.sherwood@arm.com>
23736         * tree-vectorizer.h (vec_lower_bound): New structure.
23737         (_loop_vec_info): Add check_nonzero and lower_bounds.
23738         (LOOP_VINFO_CHECK_NONZERO): New macro.
23739         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
23740         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
23741         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
23742         fields.  Make seg_len the distance travelled, not including the
23743         access size.
23744         (dr_direction_indicator): Declare.
23745         (dr_zero_step_indicator): Likewise.
23746         (dr_known_forward_stride_p): Likewise.
23747         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
23748         tree-ssanames.h.
23749         (runtime_alias_check_p): Allow runtime alias checks with
23750         variable strides.
23751         (operator ==): Compare access_size and align.
23752         (prune_runtime_alias_test_list): Rework for new distinction between
23753         the access_size and seg_len.
23754         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
23755         segment lengths.
23756         (get_segment_min_max): New function.
23757         (create_intersect_range_checks): Use it.
23758         (dr_step_indicator): New function.
23759         (dr_direction_indicator): Likewise.
23760         (dr_zero_step_indicator): Likewise.
23761         (dr_known_forward_stride_p): Likewise.
23762         * tree-loop-distribution.c (data_ref_segment_size): Return
23763         DR_STEP * (niters - 1).
23764         (compute_alias_check_pairs): Update call to the dr_with_seg_len
23765         constructor.
23766         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
23767         (vect_preserves_scalar_order_p): New function, split out from...
23768         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
23769         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
23770         (vect_vfa_access_size): New function.
23771         (vect_vfa_align): Likewise.
23772         (vect_compile_time_alias): Take access_size_a and access_b arguments.
23773         (dump_lower_bound): New function.
23774         (vect_check_lower_bound): Likewise.
23775         (vect_small_gap_p): Likewise.
23776         (vectorizable_with_step_bound_p): Likewise.
23777         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
23778         depencies if the vectorization factor is 1.  Convert the checks
23779         for nonzero steps into checks on the bounds of DR_STEP.  Try using
23780         a bunds check for variable steps if the minimum required step is
23781         relatively small. Update calls to the dr_with_seg_len
23782         constructor and to vect_compile_time_alias.
23783         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
23784         function.
23785         (vect_loop_versioning): Call it.
23786         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
23787         when retrying.
23788         (vect_estimate_min_profitable_iters): Account for any bounds checks.
23790 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23791             Alan Hayward  <alan.hayward@arm.com>
23792             David Sherwood  <david.sherwood@arm.com>
23794         * doc/sourcebuild.texi (vect_scatter_store): Document.
23795         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
23796         optabs.
23797         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
23798         Document.
23799         * genopinit.c (main): Add supports_vec_scatter_store and
23800         supports_vec_scatter_store_cached to target_optabs.
23801         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
23802         IFN_MASK_SCATTER_STORE.
23803         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
23804         functions.
23805         * internal-fn.h (internal_store_fn_p): Declare.
23806         (internal_fn_stored_value_index): Likewise.
23807         * internal-fn.c (scatter_store_direct): New macro.
23808         (expand_scatter_store_optab_fn): New function.
23809         (direct_scatter_store_optab_supported_p): New macro.
23810         (internal_store_fn_p): New function.
23811         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
23812         IFN_MASK_SCATTER_STORE.
23813         (internal_fn_mask_index): Likewise.
23814         (internal_fn_stored_value_index): New function.
23815         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
23816         for scatter stores.
23817         * optabs-query.h (supports_vec_scatter_store_p): Declare.
23818         * optabs-query.c (supports_vec_scatter_store_p): New function.
23819         * tree-vectorizer.h (vect_get_store_rhs): Declare.
23820         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
23821         true for scatter stores.
23822         (vect_gather_scatter_fn_p): Handle scatter stores too.
23823         (vect_check_gather_scatter): Consider using scatter stores if
23824         supports_vec_scatter_store_p.
23825         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
23826         scatter stores too.
23827         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23828         internal_fn_stored_value_index.
23829         (check_load_store_masking): Handle scatter stores too.
23830         (vect_get_store_rhs): Make public.
23831         (vectorizable_call): Use internal_store_fn_p.
23832         (vectorizable_store): Handle scatter store internal functions.
23833         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
23834         when deciding whether the end of the group has been reached.
23835         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
23836         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
23837         (mask_scatter_store<mode>): New insns.
23839 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23840             Alan Hayward  <alan.hayward@arm.com>
23841             David Sherwood  <david.sherwood@arm.com>
23843         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
23844         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
23845         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
23846         function.
23847         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
23848         Use vect_truncate_gather_scatter_offset if we can't treat the
23849         operation as a normal gather load or scatter store.
23850         (get_group_load_store_type): Take the gather_scatter_info
23851         as argument.  Try using a gather load or scatter store for
23852         single-element groups.
23853         (get_load_store_type): Update calls to get_group_load_store_type
23854         and vect_use_strided_gather_scatters_p.
23856 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23857             Alan Hayward  <alan.hayward@arm.com>
23858             David Sherwood  <david.sherwood@arm.com>
23860         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
23861         optional tree argument.
23862         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
23863         null target hooks.
23864         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
23865         but continue to use the current value as a fallback.
23866         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
23867         to compare the updates.
23868         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
23869         (get_load_store_type): Use it when handling a strided access.
23870         (vect_get_strided_load_store_ops): New function.
23871         (vect_get_data_ptr_increment): Likewise.
23872         (vectorizable_load): Handle strided gather loads.  Always pass
23873         a step to vect_create_data_ref_ptr and bump_vector_ptr.
23875 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23876             Alan Hayward  <alan.hayward@arm.com>
23877             David Sherwood  <david.sherwood@arm.com>
23879         * doc/md.texi (gather_load@var{m}): Document.
23880         (mask_gather_load@var{m}): Likewise.
23881         * genopinit.c (main): Add supports_vec_gather_load and
23882         supports_vec_gather_load_cached to target_optabs.
23883         * optabs-tree.c (init_tree_optimization_optabs): Use
23884         ggc_cleared_alloc to allocate target_optabs.
23885         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
23886         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
23887         functions.
23888         * internal-fn.h (internal_load_fn_p): Declare.
23889         (internal_gather_scatter_fn_p): Likewise.
23890         (internal_fn_mask_index): Likewise.
23891         (internal_gather_scatter_fn_supported_p): Likewise.
23892         * internal-fn.c (gather_load_direct): New macro.
23893         (expand_gather_load_optab_fn): New function.
23894         (direct_gather_load_optab_supported_p): New macro.
23895         (direct_internal_fn_optab): New function.
23896         (internal_load_fn_p): Likewise.
23897         (internal_gather_scatter_fn_p): Likewise.
23898         (internal_fn_mask_index): Likewise.
23899         (internal_gather_scatter_fn_supported_p): Likewise.
23900         * optabs-query.c (supports_at_least_one_mode_p): New function.
23901         (supports_vec_gather_load_p): Likewise.
23902         * optabs-query.h (supports_vec_gather_load_p): Declare.
23903         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
23904         and memory_type field.
23905         (NUM_PATTERNS): Bump to 15.
23906         * tree-vect-data-refs.c: Include internal-fn.h.
23907         (vect_gather_scatter_fn_p): New function.
23908         (vect_describe_gather_scatter_call): Likewise.
23909         (vect_check_gather_scatter): Try using internal functions for
23910         gather loads.  Recognize existing calls to a gather load function.
23911         (vect_analyze_data_refs): Consider using gather loads if
23912         supports_vec_gather_load_p.
23913         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
23914         (vect_get_gather_scatter_offset_type): Likewise.
23915         (vect_convert_mask_for_vectype): Likewise.
23916         (vect_add_conversion_to_patterm): Likewise.
23917         (vect_try_gather_scatter_pattern): Likewise.
23918         (vect_recog_gather_scatter_pattern): New pattern recognizer.
23919         (vect_vect_recog_func_ptrs): Add it.
23920         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23921         internal_fn_mask_index and internal_gather_scatter_fn_p.
23922         (check_load_store_masking): Take the gather_scatter_info as an
23923         argument and handle gather loads.
23924         (vect_get_gather_scatter_ops): New function.
23925         (vectorizable_call): Check internal_load_fn_p.
23926         (vectorizable_load): Likewise.  Handle gather load internal
23927         functions.
23928         (vectorizable_store): Update call to check_load_store_masking.
23929         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
23930         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
23931         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
23932         (aarch64_gather_scale_operand_d): New predicates.
23933         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
23934         (mask_gather_load<mode>): New insns.
23936 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23937             Alan Hayward  <alan.hayward@arm.com>
23938             David Sherwood  <david.sherwood@arm.com>
23940         * optabs.def (fold_left_plus_optab): New optab.
23941         * doc/md.texi (fold_left_plus_@var{m}): Document.
23942         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
23943         * internal-fn.c (fold_left_direct): Define.
23944         (expand_fold_left_optab_fn): Likewise.
23945         (direct_fold_left_optab_supported_p): Likewise.
23946         * fold-const-call.c (fold_const_fold_left): New function.
23947         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
23948         * tree-parloops.c (valid_reduction_p): New function.
23949         (gather_scalar_reductions): Use it.
23950         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
23951         (vect_finish_replace_stmt): Declare.
23952         * tree-vect-loop.c (fold_left_reduction_fn): New function.
23953         (needs_fold_left_reduction_p): New function, split out from...
23954         (vect_is_simple_reduction): ...here.  Accept reductions that
23955         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
23956         (vect_force_simple_reduction): Also store the reduction type in
23957         the assignment's STMT_VINFO_REDUC_TYPE.
23958         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
23959         (merge_with_identity): New function.
23960         (vect_expand_fold_left): Likewise.
23961         (vectorize_fold_left_reduction): Likewise.
23962         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
23963         scalar phi in place for it.  Check for target support and reject
23964         cases that would reassociate the operation.  Defer the transform
23965         phase to vectorize_fold_left_reduction.
23966         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
23967         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
23968         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
23970 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23972         * tree-if-conv.c (predicate_mem_writes): Remove redundant
23973         call to ifc_temp_var.
23975 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23976             Alan Hayward  <alan.hayward@arm.com>
23977             David Sherwood  <david.sherwood@arm.com>
23979         * target.def (legitimize_address_displacement): Take the original
23980         offset as a poly_int.
23981         * targhooks.h (default_legitimize_address_displacement): Update
23982         accordingly.
23983         * targhooks.c (default_legitimize_address_displacement): Likewise.
23984         * doc/tm.texi: Regenerate.
23985         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
23986         as an argument, moving assert of ad->disp == ad->disp_term to...
23987         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
23988         Try calling targetm.legitimize_address_displacement before expanding
23989         the address rather than afterwards, and adjust for the new interface.
23990         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
23991         Match the new hook interface.  Handle SVE addresses.
23992         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
23993         new hook interface.
23995 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23997         * Makefile.in (OBJS): Add early-remat.o.
23998         * target.def (select_early_remat_modes): New hook.
23999         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
24000         * doc/tm.texi: Regenerate.
24001         * targhooks.h (default_select_early_remat_modes): Declare.
24002         * targhooks.c (default_select_early_remat_modes): New function.
24003         * timevar.def (TV_EARLY_REMAT): New timevar.
24004         * passes.def (pass_early_remat): New pass.
24005         * tree-pass.h (make_pass_early_remat): Declare.
24006         * early-remat.c: New file.
24007         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
24008         function.
24009         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
24011 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24012             Alan Hayward  <alan.hayward@arm.com>
24013             David Sherwood  <david.sherwood@arm.com>
24015         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
24016         vfm1 with a bound_epilog parameter.
24017         (vect_do_peeling): Update calls accordingly, and move the prologue
24018         call earlier in the function.  Treat the base bound_epilog as 0 for
24019         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
24020         this base when peeling for gaps.
24021         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
24022         with fully-masked loops.
24023         (vect_estimate_min_profitable_iters): Handle the single peeled
24024         iteration in that case.
24026 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24027             Alan Hayward  <alan.hayward@arm.com>
24028             David Sherwood  <david.sherwood@arm.com>
24030         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
24031         single-element interleaving even if the size is not a power of 2.
24032         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
24033         accesses for single-element interleaving if the group size is
24034         not a power of 2.
24036 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24037             Alan Hayward  <alan.hayward@arm.com>
24038             David Sherwood  <david.sherwood@arm.com>
24040         * doc/md.texi (fold_extract_last_@var{m}): Document.
24041         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
24042         * optabs.def (fold_extract_last_optab): New optab.
24043         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
24044         * internal-fn.c (fold_extract_direct): New macro.
24045         (expand_fold_extract_optab_fn): Likewise.
24046         (direct_fold_extract_optab_supported_p): Likewise.
24047         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
24048         * tree-vect-loop.c (vect_model_reduction_cost): Handle
24049         EXTRACT_LAST_REDUCTION.
24050         (get_initial_def_for_reduction): Do not create an initial vector
24051         for EXTRACT_LAST_REDUCTION reductions.
24052         (vectorizable_reduction): Leave the scalar phi in place for
24053         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
24054         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
24055         epilogue code for EXTRACT_LAST_REDUCTION and defer the
24056         transform phase to vectorizable_condition.
24057         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
24058         split out from...
24059         (vect_finish_stmt_generation): ...here.
24060         (vect_finish_replace_stmt): New function.
24061         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
24062         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
24063         pattern.
24064         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
24066 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24067             Alan Hayward  <alan.hayward@arm.com>
24068             David Sherwood  <david.sherwood@arm.com>
24070         * doc/md.texi (extract_last_@var{m}): Document.
24071         * optabs.def (extract_last_optab): New optab.
24072         * internal-fn.def (EXTRACT_LAST): New internal function.
24073         * internal-fn.c (cond_unary_direct): New macro.
24074         (expand_cond_unary_optab_fn): Likewise.
24075         (direct_cond_unary_optab_supported_p): Likewise.
24076         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
24077         loops using EXTRACT_LAST.
24078         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
24079         (extract_last_<mode>): ...this optab.
24080         (vec_extract<mode><Vel>): Update accordingly.
24082 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24083             Alan Hayward  <alan.hayward@arm.com>
24084             David Sherwood  <david.sherwood@arm.com>
24086         * target.def (empty_mask_is_expensive): New hook.
24087         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
24088         * doc/tm.texi: Regenerate.
24089         * targhooks.h (default_empty_mask_is_expensive): Declare.
24090         * targhooks.c (default_empty_mask_is_expensive): New function.
24091         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
24092         if the target says that empty masks are expensive.
24093         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
24094         New function.
24095         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
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 (_loop_vec_info::mask_skip_niters): New field.
24102         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
24103         (vect_use_loop_mask_for_alignment_p): New function.
24104         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
24105         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
24106         niters_skip argument.  Make sure that the first niters_skip elements
24107         of the first iteration are inactive.
24108         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
24109         Update call to vect_set_loop_masks_directly.
24110         (get_misalign_in_elems): New function, split out from...
24111         (vect_gen_prolog_loop_niters): ...here.
24112         (vect_update_init_of_dr): Take a code argument that specifies whether
24113         the adjustment should be added or subtracted.
24114         (vect_update_init_of_drs): Likewise.
24115         (vect_prepare_for_masked_peels): New function.
24116         (vect_do_peeling): Skip prologue peeling if we're using a mask
24117         instead.  Update call to vect_update_inits_of_drs.
24118         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24119         mask_skip_niters.
24120         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
24121         alignment.  Do not include the number of peeled iterations in
24122         the minimum threshold in that case.
24123         (vectorizable_induction): Adjust the start value down by
24124         LOOP_VINFO_MASK_SKIP_NITERS iterations.
24125         (vect_transform_loop): Call vect_prepare_for_masked_peels.
24126         Take the number of skipped iterations into account when calculating
24127         the loop bounds.
24128         * tree-vect-stmts.c (vect_gen_while_not): New function.
24130 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24131             Alan Hayward  <alan.hayward@arm.com>
24132             David Sherwood  <david.sherwood@arm.com>
24134         * doc/sourcebuild.texi (vect_fully_masked): Document.
24135         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
24136         default value to 0.
24137         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
24138         split out from...
24139         (vect_analyze_loop_2): ...here. Don't check the vectorization
24140         factor against the number of loop iterations if the loop is
24141         fully-masked.
24143 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24144             Alan Hayward  <alan.hayward@arm.com>
24145             David Sherwood  <david.sherwood@arm.com>
24147         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
24148         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
24149         (dump_groups): Update accordingly.
24150         (iv_use::mem_type): New member variable.
24151         (address_p): New function.
24152         (record_use): Add a mem_type argument and initialize the new
24153         mem_type field.
24154         (record_group_use): Add a mem_type argument.  Use address_p.
24155         Remove obsolete null checks of base_object.  Update call to record_use.
24156         (find_interesting_uses_op): Update call to record_group_use.
24157         (find_interesting_uses_cond): Likewise.
24158         (find_interesting_uses_address): Likewise.
24159         (get_mem_type_for_internal_fn): New function.
24160         (find_address_like_use): Likewise.
24161         (find_interesting_uses_stmt): Try find_address_like_use before
24162         calling find_interesting_uses_op.
24163         (addr_offset_valid_p): Use the iv mem_type field as the type
24164         of the addressed memory.
24165         (add_autoinc_candidates): Likewise.
24166         (get_address_cost): Likewise.
24167         (split_small_address_groups_p): Use address_p.
24168         (split_address_groups): Likewise.
24169         (add_iv_candidate_for_use): Likewise.
24170         (autoinc_possible_for_pair): Likewise.
24171         (rewrite_groups): Likewise.
24172         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
24173         (determine_group_iv_cost): Update after split of USE_ADDRESS.
24174         (get_alias_ptr_type_for_ptr_address): New function.
24175         (rewrite_use_address): Rewrite address uses in calls that were
24176         identified by find_address_like_use.
24178 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24179             Alan Hayward  <alan.hayward@arm.com>
24180             David Sherwood  <david.sherwood@arm.com>
24182         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
24183         TARGET_MEM_REFs.
24184         * gimple-expr.h (is_gimple_addressable: Likewise.
24185         * gimple-expr.c (is_gimple_address): Likewise.
24186         * internal-fn.c (expand_call_mem_ref): New function.
24187         (expand_mask_load_optab_fn): Use it.
24188         (expand_mask_store_optab_fn): Likewise.
24190 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24191             Alan Hayward  <alan.hayward@arm.com>
24192             David Sherwood  <david.sherwood@arm.com>
24194         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
24195         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
24196         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
24197         (cond_umax@var{mode}): Document.
24198         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
24199         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
24200         (cond_umin_optab, cond_umax_optab): New optabs.
24201         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
24202         (COND_IOR, COND_XOR): New internal functions.
24203         * internal-fn.h (get_conditional_internal_fn): Declare.
24204         * internal-fn.c (cond_binary_direct): New macro.
24205         (expand_cond_binary_optab_fn): Likewise.
24206         (direct_cond_binary_optab_supported_p): Likewise.
24207         (get_conditional_internal_fn): New function.
24208         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
24209         Cope with reduction statements that are vectorized as calls rather
24210         than assignments.
24211         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
24212         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
24213         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
24214         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
24215         (UNSPEC_COND_EOR): New unspecs.
24216         (optab): Add mappings for them.
24217         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
24218         (sve_int_op, sve_fp_op): New int attributes.
24220 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24221             Alan Hayward  <alan.hayward@arm.com>
24222             David Sherwood  <david.sherwood@arm.com>
24224         * optabs.def (while_ult_optab): New optab.
24225         * doc/md.texi (while_ult@var{m}@var{n}): Document.
24226         * internal-fn.def (WHILE_ULT): New internal function.
24227         * internal-fn.h (direct_internal_fn_supported_p): New override
24228         that takes two types as argument.
24229         * internal-fn.c (while_direct): New macro.
24230         (expand_while_optab_fn): New function.
24231         (convert_optab_supported_p): Likewise.
24232         (direct_while_optab_supported_p): New macro.
24233         * wide-int.h (wi::udiv_ceil): New function.
24234         * tree-vectorizer.h (rgroup_masks): New structure.
24235         (vec_loop_masks): New typedef.
24236         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
24237         and fully_masked_p.
24238         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
24239         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
24240         (vect_max_vf): New function.
24241         (slpeel_make_loop_iterate_ntimes): Delete.
24242         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
24243         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
24244         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
24245         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
24246         internal-fn.h, stor-layout.h and optabs-query.h.
24247         (vect_set_loop_mask): New function.
24248         (add_preheader_seq): Likewise.
24249         (add_header_seq): Likewise.
24250         (interleave_supported_p): Likewise.
24251         (vect_maybe_permute_loop_masks): Likewise.
24252         (vect_set_loop_masks_directly): Likewise.
24253         (vect_set_loop_condition_masked): Likewise.
24254         (vect_set_loop_condition_unmasked): New function, split out from
24255         slpeel_make_loop_iterate_ntimes.
24256         (slpeel_make_loop_iterate_ntimes): Rename to..
24257         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
24258         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
24259         (vect_do_peeling): Update call accordingly.
24260         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
24261         loops.
24262         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24263         mask_compare_type, can_fully_mask_p and fully_masked_p.
24264         (release_vec_loop_masks): New function.
24265         (_loop_vec_info): Use it to free the loop masks.
24266         (can_produce_all_loop_masks_p): New function.
24267         (vect_get_max_nscalars_per_iter): Likewise.
24268         (vect_verify_full_masking): Likewise.
24269         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
24270         retries, and free the mask rgroups before retrying.  Check loop-wide
24271         reasons for disallowing fully-masked loops.  Make the final decision
24272         about whether use a fully-masked loop or not.
24273         (vect_estimate_min_profitable_iters): Do not assume that peeling
24274         for the number of iterations will be needed for fully-masked loops.
24275         (vectorizable_reduction): Disable fully-masked loops.
24276         (vectorizable_live_operation): Likewise.
24277         (vect_halve_mask_nunits): New function.
24278         (vect_double_mask_nunits): Likewise.
24279         (vect_record_loop_mask): Likewise.
24280         (vect_get_loop_mask): Likewise.
24281         (vect_transform_loop): Handle the case in which the final loop
24282         iteration might handle a partial vector.  Call vect_set_loop_condition
24283         instead of slpeel_make_loop_iterate_ntimes.
24284         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
24285         (check_load_store_masking): New function.
24286         (prepare_load_store_mask): Likewise.
24287         (vectorizable_store): Handle fully-masked loops.
24288         (vectorizable_load): Likewise.
24289         (supportable_widening_operation): Use vect_halve_mask_nunits for
24290         booleans.
24291         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
24292         (vect_gen_while): New function.
24293         * config/aarch64/aarch64.md (umax<mode>3): New expander.
24294         (aarch64_uqdec<mode>): New insn.
24296 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24297             Alan Hayward  <alan.hayward@arm.com>
24298             David Sherwood  <david.sherwood@arm.com>
24300         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
24301         (reduc_xor_scal_optab): New optabs.
24302         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
24303         (reduc_xor_scal_@var{m}): Document.
24304         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
24305         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
24306         internal functions.
24307         * fold-const-call.c (fold_const_call): Handle them.
24308         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
24309         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
24310         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
24311         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
24312         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
24313         (UNSPEC_XORV): New unspecs.
24314         (optab): Add entries for them.
24315         (BITWISEV): New int iterator.
24316         (bit_reduc_op): New int attributes.
24318 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24319             Alan Hayward  <alan.hayward@arm.com>
24320             David Sherwood  <david.sherwood@arm.com>
24322         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
24323         * internal-fn.def (VEC_SHL_INSERT): New internal function.
24324         * optabs.def (vec_shl_insert_optab): New optab.
24325         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
24326         (duplicate_and_interleave): Likewise.
24327         * tree-vect-loop.c: Include internal-fn.h.
24328         (neutral_op_for_slp_reduction): New function, split out from
24329         get_initial_defs_for_reduction.
24330         (get_initial_def_for_reduction): Handle option 2 for variable-length
24331         vectors by loading the neutral value into a vector and then shifting
24332         the initial value into element 0.
24333         (get_initial_defs_for_reduction): Replace the code argument with
24334         the neutral value calculated by neutral_op_for_slp_reduction.
24335         Use gimple_build_vector for constant-length vectors.
24336         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
24337         but the first group_size elements have a neutral value.
24338         Use duplicate_and_interleave otherwise.
24339         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
24340         Update call to get_initial_defs_for_reduction.  Handle SLP
24341         reductions for variable-length vectors by creating one vector
24342         result for each scalar result, with the elements associated
24343         with other scalar results stubbed out with the neutral value.
24344         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
24345         Require IFN_VEC_SHL_INSERT for double reductions on
24346         variable-length vectors, or SLP reductions that have
24347         a neutral value.  Require can_duplicate_and_interleave_p
24348         support for variable-length unchained SLP reductions if there
24349         is no neutral value, such as for MIN/MAX reductions.  Also require
24350         the number of vector elements to be a multiple of the number of
24351         SLP statements when doing variable-length unchained SLP reductions.
24352         Update call to vect_create_epilog_for_reduction.
24353         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
24354         and remove initial values.
24355         (duplicate_and_interleave): Make public.
24356         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
24357         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
24359 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24360             Alan Hayward  <alan.hayward@arm.com>
24361             David Sherwood  <david.sherwood@arm.com>
24363         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
24364         (can_duplicate_and_interleave_p): New function.
24365         (vect_get_and_check_slp_defs): Take the vector of statements
24366         rather than just the current one.  Remove excess parentheses.
24367         Restriction rejectinon of vect_constant_def and vect_external_def
24368         for variable-length vectors to boolean types, or types for which
24369         can_duplicate_and_interleave_p is false.
24370         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
24371         (duplicate_and_interleave): New function.
24372         (vect_get_constant_vectors): Use gimple_build_vector for
24373         constant-length vectors and suitable variable-length constant
24374         vectors.  Use duplicate_and_interleave for other variable-length
24375         vectors.  Don't defer the update when inserting new statements.
24377 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24378             Alan Hayward  <alan.hayward@arm.com>
24379             David Sherwood  <david.sherwood@arm.com>
24381         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
24382         min_profitable_iters doesn't go negative.
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         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
24389         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
24390         * optabs.def (vec_mask_load_lanes_optab): New optab.
24391         (vec_mask_store_lanes_optab): Likewise.
24392         * internal-fn.def (MASK_LOAD_LANES): New internal function.
24393         (MASK_STORE_LANES): Likewise.
24394         * internal-fn.c (mask_load_lanes_direct): New macro.
24395         (mask_store_lanes_direct): Likewise.
24396         (expand_mask_load_optab_fn): Handle masked operations.
24397         (expand_mask_load_lanes_optab_fn): New macro.
24398         (expand_mask_store_optab_fn): Handle masked operations.
24399         (expand_mask_store_lanes_optab_fn): New macro.
24400         (direct_mask_load_lanes_optab_supported_p): Likewise.
24401         (direct_mask_store_lanes_optab_supported_p): Likewise.
24402         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
24403         parameter.
24404         (vect_load_lanes_supported): Likewise.
24405         * tree-vect-data-refs.c (strip_conversion): New function.
24406         (can_group_stmts_p): Likewise.
24407         (vect_analyze_data_ref_accesses): Use it instead of checking
24408         for a pair of assignments.
24409         (vect_store_lanes_supported): Take a masked_p parameter.
24410         (vect_load_lanes_supported): Likewise.
24411         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
24412         vect_store_lanes_supported and vect_load_lanes_supported.
24413         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
24414         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
24415         parameter.  Don't allow gaps for masked accesses.
24416         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
24417         and vect_load_lanes_supported.
24418         (get_load_store_type): Take a masked_p parameter and update
24419         call to get_group_load_store_type.
24420         (vectorizable_store): Update call to get_load_store_type.
24421         Handle IFN_MASK_STORE_LANES.
24422         (vectorizable_load): Update call to get_load_store_type.
24423         Handle IFN_MASK_LOAD_LANES.
24425 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24426             Alan Hayward  <alan.hayward@arm.com>
24427             David Sherwood  <david.sherwood@arm.com>
24429         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
24430         modes for SVE.
24431         * config/aarch64/aarch64-protos.h
24432         (aarch64_sve_struct_memory_operand_p): Declare.
24433         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
24434         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
24435         (VPRED, vpred): Handle SVE structure modes.
24436         * config/aarch64/constraints.md (Utx): New constraint.
24437         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
24438         (aarch64_sve_struct_nonimmediate_operand): New predicates.
24439         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
24440         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
24441         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
24442         structure modes.  Split into pieces after RA.
24443         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
24444         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
24445         New patterns.
24446         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
24447         SVE structure modes.
24448         (aarch64_classify_address): Likewise.
24449         (sizetochar): Move earlier in file.
24450         (aarch64_print_operand): Handle SVE register lists.
24451         (aarch64_array_mode): New function.
24452         (aarch64_sve_struct_memory_operand_p): Likewise.
24453         (TARGET_ARRAY_MODE): Redefine.
24455 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24456             Alan Hayward  <alan.hayward@arm.com>
24457             David Sherwood  <david.sherwood@arm.com>
24459         * target.def (array_mode): New target hook.
24460         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
24461         * doc/tm.texi: Regenerate.
24462         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
24463         * hooks.c (hook_optmode_mode_uhwi_none): New function.
24464         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
24465         targetm.array_mode.
24466         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
24467         type sizes.
24469 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24470             Alan Hayward  <alan.hayward@arm.com>
24471             David Sherwood  <david.sherwood@arm.com>
24473         * fold-const.c (fold_binary_loc): Check the argument types
24474         rather than the result type when testing for a vector operation.
24476 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24478         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
24479         * doc/tm.texi: Regenerate.
24481 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24482             Alan Hayward  <alan.hayward@arm.com>
24483             David Sherwood  <david.sherwood@arm.com>
24485         * doc/invoke.texi (-msve-vector-bits=): Document new option.
24486         (sve): Document new AArch64 extension.
24487         * doc/md.texi (w): Extend the description of the AArch64
24488         constraint to include SVE vectors.
24489         (Upl, Upa): Document new AArch64 predicate constraints.
24490         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
24491         enum.
24492         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
24493         (msve-vector-bits=): New option.
24494         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
24495         SVE when these are disabled.
24496         (sve): New extension.
24497         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
24498         modes.  Adjust their number of units based on aarch64_sve_vg.
24499         (MAX_BITSIZE_MODE_ANY_MODE): Define.
24500         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
24501         aarch64_addr_query_type.
24502         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
24503         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
24504         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
24505         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
24506         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
24507         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
24508         (aarch64_simd_imm_zero_p): Delete.
24509         (aarch64_check_zero_based_sve_index_immediate): Declare.
24510         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24511         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24512         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24513         (aarch64_sve_float_mul_immediate_p): Likewise.
24514         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24515         rather than an rtx.
24516         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
24517         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
24518         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
24519         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
24520         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
24521         (aarch64_regmode_natural_size): Likewise.
24522         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
24523         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
24524         left one place.
24525         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
24526         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
24527         for VG and the SVE predicate registers.
24528         (V_ALIASES): Add a "z"-prefixed alias.
24529         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
24530         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
24531         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
24532         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
24533         (REG_CLASS_NAMES): Add entries for them.
24534         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
24535         and the predicate registers.
24536         (aarch64_sve_vg): Declare.
24537         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
24538         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
24539         (REGMODE_NATURAL_SIZE): Define.
24540         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
24541         SVE macros.
24542         * config/aarch64/aarch64.c: Include cfgrtl.h.
24543         (simd_immediate_info): Add a constructor for series vectors,
24544         and an associated step field.
24545         (aarch64_sve_vg): New variable.
24546         (aarch64_dbx_register_number): Handle VG and the predicate registers.
24547         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
24548         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
24549         (VEC_ANY_DATA, VEC_STRUCT): New constants.
24550         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
24551         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
24552         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
24553         (aarch64_get_mask_mode): New functions.
24554         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
24555         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
24556         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
24557         predicate modes and predicate registers.  Explicitly restrict
24558         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
24559         to store a vector mode if it is recognized by
24560         aarch64_classify_vector_mode.
24561         (aarch64_regmode_natural_size): New function.
24562         (aarch64_hard_regno_caller_save_mode): Return the original mode
24563         for predicates.
24564         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
24565         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
24566         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
24567         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
24568         functions.
24569         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
24570         does not overlap dest if the function is frame-related.  Handle
24571         SVE constants.
24572         (aarch64_split_add_offset): New function.
24573         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
24574         them aarch64_add_offset.
24575         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
24576         and update call to aarch64_sub_sp.
24577         (aarch64_add_cfa_expression): New function.
24578         (aarch64_expand_prologue): Pass extra temporary registers to the
24579         functions above.  Handle the case in which we need to emit new
24580         DW_CFA_expressions for registers that were originally saved
24581         relative to the stack pointer, but now have to be expressed
24582         relative to the frame pointer.
24583         (aarch64_output_mi_thunk): Pass extra temporary registers to the
24584         functions above.
24585         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
24586         IP0 and IP1 values for SVE frames.
24587         (aarch64_expand_vec_series): New function.
24588         (aarch64_expand_sve_widened_duplicate): Likewise.
24589         (aarch64_expand_sve_const_vector): Likewise.
24590         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
24591         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
24592         into the register, rather than emitting a SET directly.
24593         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
24594         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
24595         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
24596         (offset_9bit_signed_scaled_p): New functions.
24597         (aarch64_replicate_bitmask_imm): New function.
24598         (aarch64_bitmask_imm): Use it.
24599         (aarch64_cannot_force_const_mem): Reject expressions involving
24600         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
24601         (aarch64_classify_index): Handle SVE indices, by requiring
24602         a plain register index with a scale that matches the element size.
24603         (aarch64_classify_address): Handle SVE addresses.  Assert that
24604         the mode of the address is VOIDmode or an integer mode.
24605         Update call to aarch64_classify_symbol.
24606         (aarch64_classify_symbolic_expression): Update call to
24607         aarch64_classify_symbol.
24608         (aarch64_const_vec_all_in_range_p): New function.
24609         (aarch64_print_vector_float_operand): Likewise.
24610         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
24611         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
24612         and the FP immediates 1.0 and 0.5.
24613         (aarch64_print_address_internal): Handle SVE addresses.
24614         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
24615         (aarch64_regno_regclass): Handle predicate registers.
24616         (aarch64_secondary_reload): Handle big-endian reloads of SVE
24617         data modes.
24618         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
24619         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
24620         (aarch64_convert_sve_vector_bits): New function.
24621         (aarch64_override_options): Use it to handle -msve-vector-bits=.
24622         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24623         rather than an rtx.
24624         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
24625         Handle SVE vector and predicate modes.  Accept VL-based constants
24626         that need only one temporary register, and VL offsets that require
24627         no temporary registers.
24628         (aarch64_conditional_register_usage): Mark the predicate registers
24629         as fixed if SVE isn't available.
24630         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
24631         Return true for SVE vector and predicate modes.
24632         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
24633         rather than an unsigned int.  Handle SVE modes.
24634         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
24635         SVE modes.
24636         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
24637         if SVE is enabled.
24638         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24639         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24640         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24641         (aarch64_sve_float_mul_immediate_p): New functions.
24642         (aarch64_sve_valid_immediate): New function.
24643         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
24644         Explicitly reject structure modes.  Check for INDEX constants.
24645         Handle PTRUE and PFALSE constants.
24646         (aarch64_check_zero_based_sve_index_immediate): New function.
24647         (aarch64_simd_imm_zero_p): Delete.
24648         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
24649         vector modes.  Accept constants in the range of CNT[BHWD].
24650         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
24651         ask for an Advanced SIMD mode.
24652         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
24653         (aarch64_simd_vector_alignment): Handle SVE predicates.
24654         (aarch64_vectorize_preferred_vector_alignment): New function.
24655         (aarch64_simd_vector_alignment_reachable): Use it instead of
24656         the vector size.
24657         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
24658         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
24659         functions.
24660         (MAX_VECT_LEN): Delete.
24661         (expand_vec_perm_d): Add a vec_flags field.
24662         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
24663         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
24664         (aarch64_evpc_ext): Don't apply a big-endian lane correction
24665         for SVE modes.
24666         (aarch64_evpc_rev): Rename to...
24667         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
24668         (aarch64_evpc_rev_global): New function.
24669         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
24670         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
24671         MAX_VECT_LEN.
24672         (aarch64_evpc_sve_tbl): New function.
24673         (aarch64_expand_vec_perm_const_1): Update after rename of
24674         aarch64_evpc_rev.  Handle SVE permutes too, trying
24675         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
24676         than aarch64_evpc_tbl.
24677         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
24678         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
24679         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
24680         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
24681         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
24682         (aarch64_expand_sve_vcond): New functions.
24683         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
24684         of aarch64_vector_mode_p.
24685         (aarch64_dwarf_poly_indeterminate_value): New function.
24686         (aarch64_compute_pressure_classes): Likewise.
24687         (aarch64_can_change_mode_class): Likewise.
24688         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
24689         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
24690         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
24691         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
24692         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
24693         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
24694         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
24695         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
24696         constraints.
24697         (Dn, Dl, Dr): Accept const as well as const_vector.
24698         (Dz): Likewise.  Compare against CONST0_RTX.
24699         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
24700         of "vector" where appropriate.
24701         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
24702         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
24703         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
24704         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
24705         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
24706         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
24707         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
24708         (v_int_equiv): Extend to SVE modes.
24709         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
24710         mode attributes.
24711         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
24712         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
24713         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
24714         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
24715         (SVE_COND_FP_CMP): New int iterators.
24716         (perm_hilo): Handle the new unpack unspecs.
24717         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
24718         attributes.
24719         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
24720         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
24721         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
24722         (aarch64_equality_operator, aarch64_constant_vector_operand)
24723         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
24724         (aarch64_sve_nonimmediate_operand): Likewise.
24725         (aarch64_sve_general_operand): Likewise.
24726         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
24727         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
24728         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
24729         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
24730         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
24731         (aarch64_sve_float_arith_immediate): Likewise.
24732         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
24733         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
24734         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
24735         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
24736         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
24737         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
24738         (aarch64_sve_float_arith_operand): Likewise.
24739         (aarch64_sve_float_arith_with_sub_operand): Likewise.
24740         (aarch64_sve_float_mul_operand): Likewise.
24741         (aarch64_sve_vec_perm_operand): Likewise.
24742         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
24743         (aarch64_mov_operand): Accept const_poly_int and const_vector.
24744         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
24745         as well as const_vector.
24746         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
24747         in file.  Use CONST0_RTX and CONSTM1_RTX.
24748         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
24749         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
24750         Use aarch64_simd_imm_zero.
24751         * config/aarch64/aarch64-sve.md: New file.
24752         * config/aarch64/aarch64.md: Include it.
24753         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
24754         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
24755         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
24756         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
24757         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
24758         (sve): New attribute.
24759         (enabled): Disable instructions with the sve attribute unless
24760         TARGET_SVE.
24761         (movqi, movhi): Pass CONST_POLY_INT operaneds through
24762         aarch64_expand_mov_immediate.
24763         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
24764         CNT[BHSD] immediates.
24765         (movti): Split CONST_POLY_INT moves into two halves.
24766         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
24767         Split additions that need a temporary here if the destination
24768         is the stack pointer.
24769         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
24770         (*add<mode>3_poly_1): New instruction.
24771         (set_clobber_cc): New expander.
24773 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24775         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
24776         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
24777         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
24778         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
24779         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
24780         Change innermode from fixed_mode_size to machine_mode.
24781         (simplify_subreg): Update call accordingly.  Handle a constant-sized
24782         subreg of a variable-length CONST_VECTOR.
24784 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24785             Alan Hayward  <alan.hayward@arm.com>
24786             David Sherwood  <david.sherwood@arm.com>
24788         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
24789         (add_offset_to_base): New function, split out from...
24790         (create_mem_ref): ...here.  When handling a scale other than 1,
24791         check first whether the address is valid without the offset.
24792         Add it into the base if so, leaving the index and scale as-is.
24794 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
24796         PR c++/83778
24797         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
24798         fold_for_warn before checking if arg2 is INTEGER_CST.
24800 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
24802         * config/rs6000/predicates.md (load_multiple_operation): Delete.
24803         (store_multiple_operation): Delete.
24804         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
24805         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
24806         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
24807         guarded by TARGET_STRING.
24808         (rs6000_output_load_multiple): Delete.
24809         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
24810         OPTION_MASK_STRING / TARGET_STRING handling.
24811         (print_operand) <'N', 'O'>: Add comment that these are unused now.
24812         (const rs6000_opt_masks) <"string">: Change mask to 0.
24813         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
24814         (MASK_STRING): Delete.
24815         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
24816         parts.  Simplify.
24817         (load_multiple): Delete.
24818         (*ldmsi8): Delete.
24819         (*ldmsi7): Delete.
24820         (*ldmsi6): Delete.
24821         (*ldmsi5): Delete.
24822         (*ldmsi4): Delete.
24823         (*ldmsi3): Delete.
24824         (store_multiple): Delete.
24825         (*stmsi8): Delete.
24826         (*stmsi7): Delete.
24827         (*stmsi6): Delete.
24828         (*stmsi5): Delete.
24829         (*stmsi4): Delete.
24830         (*stmsi3): Delete.
24831         (movmemsi_8reg): Delete.
24832         (corresponding unnamed define_insn): Delete.
24833         (movmemsi_6reg): Delete.
24834         (corresponding unnamed define_insn): Delete.
24835         (movmemsi_4reg): Delete.
24836         (corresponding unnamed define_insn): Delete.
24837         (movmemsi_2reg): Delete.
24838         (corresponding unnamed define_insn): Delete.
24839         (movmemsi_1reg): Delete.
24840         (corresponding unnamed define_insn): Delete.
24841         * config/rs6000/rs6000.opt (mno-string): New.
24842         (mstring): Replace by deprecation warning stub.
24843         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
24845 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
24847         * regrename.c (regrename_do_replace): If replacing the same
24848         reg multiple times, try to reuse last created gen_raw_REG.
24850         PR debug/81155
24851         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
24852         main to workaround a bug in GDB.
24854 2018-01-12  Tom de Vries  <tom@codesourcery.com>
24856         PR target/83737
24857         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
24859 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
24861         PR rtl-optimization/80481
24862         * ira-color.c (get_cap_member): New function.
24863         (allocnos_conflict_by_live_ranges_p): Use it.
24864         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
24865         (setup_slot_coalesced_allocno_live_ranges): Ditto.
24867 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
24869         PR target/83628
24870         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
24871         (*saddl_se_1): Ditto.
24872         (*ssubsi_1): Ditto.
24873         (*ssubl_se_1): Ditto.
24875 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
24877         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
24878         rather than wi::to_widest for DR_INITs.
24879         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
24880         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
24881         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
24882         INTEGER_CSTs.
24883         (vect_analyze_group_access_1): Note that here.
24885 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
24887         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
24888         polynomial type sizes.
24890 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
24892         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
24893         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
24894         (gimple_add_tmp_var): Likewise.
24896 2018-01-12  Martin Liska  <mliska@suse.cz>
24898         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
24899         (gimple_alloc_sizes): Likewise.
24900         (dump_gimple_statistics): Use PRIu64 in printf format.
24901         * gimple.h: Change uint64_t to int.
24903 2018-01-12  Martin Liska  <mliska@suse.cz>
24905         * tree-core.h: Use uint64_t instead of int.
24906         * tree.c (tree_node_counts): Likewise.
24907         (tree_node_sizes): Likewise.
24908         (dump_tree_statistics): Use PRIu64 in printf format.
24910 2018-01-12  Martin Liska  <mliska@suse.cz>
24912         * Makefile.in: As qsort_chk is implemented in vec.c, add
24913         vec.o to linkage of gencfn-macros.
24914         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
24915         passing the info to record_node_allocation_statistics.
24916         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
24917         and pass the info.
24918         * ggc-common.c (struct ggc_usage): Add operator== and use
24919         it in operator< and compare function.
24920         * mem-stats.h (struct mem_usage): Likewise.
24921         * vec.c (struct vec_usage): Remove operator< and compare
24922         function. Can be simply inherited.
24924 2018-01-12  Martin Jambor  <mjambor@suse.cz>
24926         PR target/81616
24927         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
24928         * tree-ssa-math-opts.c: Include domwalk.h.
24929         (convert_mult_to_fma_1): New function.
24930         (fma_transformation_info): New type.
24931         (fma_deferring_state): Likewise.
24932         (cancel_fma_deferring): New function.
24933         (result_of_phi): Likewise.
24934         (last_fma_candidate_feeds_initial_phi): Likewise.
24935         (convert_mult_to_fma): Added deferring logic, split actual
24936         transformation to convert_mult_to_fma_1.
24937         (math_opts_dom_walker): New type.
24938         (math_opts_dom_walker::after_dom_children): New method, body moved
24939         here from pass_optimize_widening_mul::execute, added deferring logic
24940         bits.
24941         (pass_optimize_widening_mul::execute): Moved most of code to
24942         math_opts_dom_walker::after_dom_children.
24943         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
24944         * config/i386/i386.c (ix86_option_override_internal): Added
24945         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
24947 2018-01-12  Richard Biener  <rguenther@suse.de>
24949         PR debug/83157
24950         * dwarf2out.c (gen_variable_die): Do not reset old_die for
24951         inline instance vars.
24953 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
24955         PR target/81819
24956         * config/rx/rx.c (rx_is_restricted_memory_address):
24957         Handle SUBREG case.
24959 2018-01-12  Richard Biener  <rguenther@suse.de>
24961         PR tree-optimization/80846
24962         * target.def (split_reduction): New target hook.
24963         * targhooks.c (default_split_reduction): New function.
24964         * targhooks.h (default_split_reduction): Declare.
24965         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
24966         target requests first reduce vectors by combining low and high
24967         parts.
24968         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
24969         (get_vectype_for_scalar_type_and_size): Export.
24970         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
24971         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
24972         * doc/tm.texi: Regenerate.
24973         * config/i386/i386.c (ix86_split_reduction): Implement
24974         TARGET_VECTORIZE_SPLIT_REDUCTION.
24976 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
24978         PR target/83368
24979         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
24980         in PIC mode except for TARGET_VXWORKS_RTP.
24981         * config/sparc/sparc.c: Include cfgrtl.h.
24982         (TARGET_INIT_PIC_REG): Define.
24983         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
24984         (sparc_pic_register_p): New predicate.
24985         (sparc_legitimate_address_p): Use it.
24986         (sparc_legitimize_pic_address): Likewise.
24987         (sparc_delegitimize_address): Likewise.
24988         (sparc_mode_dependent_address_p): Likewise.
24989         (gen_load_pcrel_sym): Remove 4th parameter.
24990         (load_got_register): Adjust call to above.  Remove obsolete stuff.
24991         (sparc_expand_prologue): Do not call load_got_register here.
24992         (sparc_flat_expand_prologue): Likewise.
24993         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
24994         (sparc_use_pseudo_pic_reg): New function.
24995         (sparc_init_pic_reg): Likewise.
24996         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24997         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
24999 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
25001         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25002         Add item for branch_cost.
25004 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
25006         PR rtl-optimization/83565
25007         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
25008         not extend the result to a larger mode for rotate operations.
25009         (num_sign_bit_copies1): Likewise.
25011 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25013         PR target/40411
25014         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
25015         -symbolic.
25016         Use values-Xc.o for -pedantic.
25017         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
25019 2018-01-12  Martin Liska  <mliska@suse.cz>
25021         PR ipa/83054
25022         * ipa-devirt.c (final_warning_record::grow_type_warnings):
25023         New function.
25024         (possible_polymorphic_call_targets): Use it.
25025         (ipa_devirt): Likewise.
25027 2018-01-12  Martin Liska  <mliska@suse.cz>
25029         * profile-count.h (enum profile_quality): Use 0 as invalid
25030         enum value of profile_quality.
25032 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
25034         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
25035         -mext-string options.
25037 2018-01-12  Richard Biener  <rguenther@suse.de>
25039         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
25040         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
25041         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
25042         Likewise.
25043         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
25045 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
25047         * configure.ac (--with-long-double-format): Add support for the
25048         configuration option to change the default long double format on
25049         PowerPC systems.
25050         * config.gcc (powerpc*-linux*-*): Likewise.
25051         * configure: Regenerate.
25052         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
25053         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
25054         used without modification.
25056 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25058         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
25059         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
25060         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
25061         MISC_BUILTIN_SPEC_BARRIER.
25062         (rs6000_init_builtins): Likewise.
25063         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
25064         enum value.
25065         (speculation_barrier): New define_insn.
25066         * doc/extend.texi: Document __builtin_speculation_barrier.
25068 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
25070         PR target/83203
25071         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
25072         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
25073         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
25074         iterators.
25075         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
25076         integral modes instead of "ss" and "sd".
25077         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
25078         vectors with 32-bit and 64-bit elements.
25079         (vecdupssescalarmodesuffix): New mode attribute.
25080         (vec_dup<mode>): Use it.
25082 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
25084         PR target/83330
25085         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
25086         frame if argument is passed on stack.
25088 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
25090         PR target/82682
25091         * ree.c (combine_reaching_defs): Optimize also
25092         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
25093         reg2=any_extend(exp); reg1=reg2;, formatting fix.
25095 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
25097         PR middle-end/83189
25098         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
25100 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
25102         PR middle-end/83718
25103         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
25104         after they are computed.
25106 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
25108         PR tree-optimization/83695
25109         * gimple-loop-linterchange.cc
25110         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
25111         reset cached scev information after interchange.
25112         (pass_linterchange::execute): Remove call to scev_reset_htab.
25114 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25116         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
25117         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
25118         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
25119         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
25120         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
25121         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
25122         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
25123         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
25124         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
25125         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
25126         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
25127         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
25128         (V_lane_reg): Likewise.
25129         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
25130         New define_expand.
25131         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
25132         (vfmal_lane_low<mode>_intrinsic,
25133         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
25134         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
25135         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
25136         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
25137         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
25138         vfmsl_lane_high<mode>_intrinsic): New define_insns.
25140 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25142         * config/arm/arm-cpus.in (fp16fml): New feature.
25143         (ALL_SIMD): Add fp16fml.
25144         (armv8.2-a): Add fp16fml as an option.
25145         (armv8.3-a): Likewise.
25146         (armv8.4-a): Add fp16fml as part of fp16.
25147         * config/arm/arm.h (TARGET_FP16FML): Define.
25148         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
25149         when appropriate.
25150         * config/arm/arm-modes.def (V2HF): Define.
25151         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
25152         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
25153         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
25154         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
25155         vfmsl_low, vfmsl_high): New set of builtins.
25156         * config/arm/iterators.md (PLUSMINUS): New code iterator.
25157         (vfml_op): New code attribute.
25158         (VFMLHALVES): New int iterator.
25159         (VFML, VFMLSEL): New mode attributes.
25160         (V_reg): Define mapping for V2HF.
25161         (V_hi, V_lo): New mode attributes.
25162         (VF_constraint): Likewise.
25163         (vfml_half, vfml_half_selector): New int attributes.
25164         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
25165         define_expand.
25166         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
25167         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
25168         New define_insn.
25169         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
25170         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
25171         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
25172         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
25173         documentation.
25174         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
25175         Document new effective target and option set.
25177 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25179         * config/arm/arm-cpus.in (armv8_4): New feature.
25180         (ARMv8_4a): New fgroup.
25181         (armv8.4-a): New arch.
25182         * config/arm/arm-tables.opt: Regenerate.
25183         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
25184         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
25185         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
25186         Add matching rules for -march=armv8.4-a and extensions.
25187         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
25189 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
25191         PR target/81821
25192         * config/rx/rx.md (BW): New mode attribute.
25193         (sync_lock_test_and_setsi): Add mode suffix to insn output.
25195 2018-01-11  Richard Biener  <rguenther@suse.de>
25197         PR tree-optimization/83435
25198         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
25199         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
25200         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
25202 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25203             Alan Hayward  <alan.hayward@arm.com>
25204             David Sherwood  <david.sherwood@arm.com>
25206         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
25207         field.
25208         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
25209         (aarch64_print_address_internal): Use it to check for a zero offset.
25211 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25212             Alan Hayward  <alan.hayward@arm.com>
25213             David Sherwood  <david.sherwood@arm.com>
25215         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
25216         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
25217         Return a poly_int64 rather than a HOST_WIDE_INT.
25218         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
25219         rather than a HOST_WIDE_INT.
25220         * config/aarch64/aarch64.h (aarch64_frame): Protect with
25221         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
25222         hard_fp_offset, frame_size, initial_adjust, callee_offset and
25223         final_offset from HOST_WIDE_INT to poly_int64.
25224         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
25225         to_constant when getting the number of units in an Advanced SIMD
25226         mode.
25227         (aarch64_builtin_vectorized_function): Check for a constant number
25228         of units.
25229         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
25230         GET_MODE_SIZE.
25231         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
25232         attribute instead of GET_MODE_NUNITS.
25233         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
25234         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
25235         GET_MODE_SIZE for fixed-size registers.
25236         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
25237         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
25238         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
25239         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
25240         (aarch64_print_operand, aarch64_print_address_internal)
25241         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
25242         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
25243         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
25244         Handle polynomial GET_MODE_SIZE.
25245         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
25246         wider than SImode without modification.
25247         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
25248         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
25249         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
25250         passing and returning SVE modes.
25251         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
25252         rather than GEN_INT.
25253         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
25254         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
25255         (aarch64_allocate_and_probe_stack_space): Likewise.
25256         (aarch64_layout_frame): Cope with polynomial offsets.
25257         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
25258         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
25259         polynomial offsets.
25260         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
25261         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
25262         poly_int64 rather than a HOST_WIDE_INT.
25263         (aarch64_get_separate_components, aarch64_process_components)
25264         (aarch64_expand_prologue, aarch64_expand_epilogue)
25265         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
25266         (aarch64_anchor_offset): New function, split out from...
25267         (aarch64_legitimize_address): ...here.
25268         (aarch64_builtin_vectorization_cost): Handle polynomial
25269         TYPE_VECTOR_SUBPARTS.
25270         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
25271         GET_MODE_NUNITS.
25272         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
25273         number of elements from the PARALLEL rather than the mode.
25274         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
25275         rather than GET_MODE_BITSIZE.
25276         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
25277         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
25278         (aarch64_expand_vec_perm_const_1): Handle polynomial
25279         d->perm.length () and d->perm elements.
25280         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
25281         Apply to_constant to d->perm elements.
25282         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
25283         polynomial CONST_VECTOR_NUNITS.
25284         (aarch64_move_pointer): Take amount as a poly_int64 rather
25285         than an int.
25286         (aarch64_progress_pointer): Avoid temporary variable.
25287         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
25288         the mode attribute instead of GET_MODE.
25290 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25291             Alan Hayward  <alan.hayward@arm.com>
25292             David Sherwood  <david.sherwood@arm.com>
25294         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
25295         x exists before using it.
25296         (aarch64_add_constant_internal): Rename to...
25297         (aarch64_add_offset_1): ...this.  Replace regnum with separate
25298         src and dest rtxes.  Handle the case in which they're different,
25299         including when the offset is zero.  Replace scratchreg with an rtx.
25300         Use 2 additions if there is no spare register into which we can
25301         move a 16-bit constant.
25302         (aarch64_add_constant): Delete.
25303         (aarch64_add_offset): Replace reg with separate src and dest
25304         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
25305         Use aarch64_add_offset_1.
25306         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
25307         an rtx rather than an int.  Take the delta as a poly_int64
25308         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
25309         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
25310         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
25311         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
25312         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
25313         and aarch64_add_sp.
25314         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
25315         aarch64_add_constant.
25317 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25319         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
25320         Use scalar_float_mode.
25322 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25324         * config/aarch64/aarch64-simd.md
25325         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
25326         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
25327         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
25328         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
25329         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
25330         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
25331         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
25332         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
25333         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
25334         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
25336 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
25338         PR target/83514
25339         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
25340         targ_options->x_arm_arch_string is non NULL.
25342 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
25344         * config/aarch64/aarch64.h
25345         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
25347 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
25349         PR target/82096
25350         * expmed.c (emit_store_flag_force): Swap if const op0
25351         and change VOIDmode to mode of op0.
25353 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25355         PR rtl-optimization/83761
25356         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
25357         than bytes to mode_for_size.
25359 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
25361         PR middle-end/83189
25362         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
25363         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
25364         profile.
25366 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
25368         PR middle-end/83575
25369         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
25370         when in layout mode.
25371         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
25372         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
25373         partition fixup.
25375 2018-01-10  Michael Collison  <michael.collison@arm.com>
25377         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
25378         * config/aarch64/aarch64-option-extension.def: Add
25379         AARCH64_OPT_EXTENSION of 'fp16fml'.
25380         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25381         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
25382         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
25383         * config/aarch64/constraints.md (Ui7): New constraint.
25384         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
25385         (VFMLA_SEL_W): Ditto.
25386         (f16quad): Ditto.
25387         (f16mac1): Ditto.
25388         (VFMLA16_LOW): New int iterator.
25389         (VFMLA16_HIGH): Ditto.
25390         (UNSPEC_FMLAL): New unspec.
25391         (UNSPEC_FMLSL): Ditto.
25392         (UNSPEC_FMLAL2): Ditto.
25393         (UNSPEC_FMLSL2): Ditto.
25394         (f16mac): New code attribute.
25395         * config/aarch64/aarch64-simd-builtins.def
25396         (aarch64_fmlal_lowv2sf): Ditto.
25397         (aarch64_fmlsl_lowv2sf): Ditto.
25398         (aarch64_fmlalq_lowv4sf): Ditto.
25399         (aarch64_fmlslq_lowv4sf): Ditto.
25400         (aarch64_fmlal_highv2sf): Ditto.
25401         (aarch64_fmlsl_highv2sf): Ditto.
25402         (aarch64_fmlalq_highv4sf): Ditto.
25403         (aarch64_fmlslq_highv4sf): Ditto.
25404         (aarch64_fmlal_lane_lowv2sf): Ditto.
25405         (aarch64_fmlsl_lane_lowv2sf): Ditto.
25406         (aarch64_fmlal_laneq_lowv2sf): Ditto.
25407         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
25408         (aarch64_fmlalq_lane_lowv4sf): Ditto.
25409         (aarch64_fmlsl_lane_lowv4sf): Ditto.
25410         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
25411         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
25412         (aarch64_fmlal_lane_highv2sf): Ditto.
25413         (aarch64_fmlsl_lane_highv2sf): Ditto.
25414         (aarch64_fmlal_laneq_highv2sf): Ditto.
25415         (aarch64_fmlsl_laneq_highv2sf): Ditto.
25416         (aarch64_fmlalq_lane_highv4sf): Ditto.
25417         (aarch64_fmlsl_lane_highv4sf): Ditto.
25418         (aarch64_fmlalq_laneq_highv4sf): Ditto.
25419         (aarch64_fmlsl_laneq_highv4sf): Ditto.
25420         * config/aarch64/aarch64-simd.md:
25421         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
25422         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25423         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
25424         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25425         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
25426         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
25427         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
25428         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
25429         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
25430         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
25431         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
25432         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
25433         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
25434         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
25435         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
25436         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
25437         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
25438         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
25439         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
25440         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
25441         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
25442         (vfmlsl_low_u32): Ditto.
25443         (vfmlalq_low_u32): Ditto.
25444         (vfmlslq_low_u32): Ditto.
25445         (vfmlal_high_u32): Ditto.
25446         (vfmlsl_high_u32): Ditto.
25447         (vfmlalq_high_u32): Ditto.
25448         (vfmlslq_high_u32): Ditto.
25449         (vfmlal_lane_low_u32): Ditto.
25450         (vfmlsl_lane_low_u32): Ditto.
25451         (vfmlal_laneq_low_u32): Ditto.
25452         (vfmlsl_laneq_low_u32): Ditto.
25453         (vfmlalq_lane_low_u32): Ditto.
25454         (vfmlslq_lane_low_u32): Ditto.
25455         (vfmlalq_laneq_low_u32): Ditto.
25456         (vfmlslq_laneq_low_u32): Ditto.
25457         (vfmlal_lane_high_u32): Ditto.
25458         (vfmlsl_lane_high_u32): Ditto.
25459         (vfmlal_laneq_high_u32): Ditto.
25460         (vfmlsl_laneq_high_u32): Ditto.
25461         (vfmlalq_lane_high_u32): Ditto.
25462         (vfmlslq_lane_high_u32): Ditto.
25463         (vfmlalq_laneq_high_u32): Ditto.
25464         (vfmlslq_laneq_high_u32): Ditto.
25465         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
25466         (AARCH64_FL_FOR_ARCH8_4): New.
25467         (AARCH64_ISA_F16FML): New ISA flag.
25468         (TARGET_F16FML): New feature flag for fp16fml.
25469         (doc/invoke.texi): Document new fp16fml option.
25471 2018-01-10  Michael Collison  <michael.collison@arm.com>
25473         * config/aarch64/aarch64-builtins.c:
25474         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
25475         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25476         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
25477         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
25478         (AARCH64_ISA_SHA3): New ISA flag.
25479         (TARGET_SHA3): New feature flag for sha3.
25480         * config/aarch64/iterators.md (sha512_op): New int attribute.
25481         (CRYPTO_SHA512): New int iterator.
25482         (UNSPEC_SHA512H): New unspec.
25483         (UNSPEC_SHA512H2): Ditto.
25484         (UNSPEC_SHA512SU0): Ditto.
25485         (UNSPEC_SHA512SU1): Ditto.
25486         * config/aarch64/aarch64-simd-builtins.def
25487         (aarch64_crypto_sha512hqv2di): New builtin.
25488         (aarch64_crypto_sha512h2qv2di): Ditto.
25489         (aarch64_crypto_sha512su0qv2di): Ditto.
25490         (aarch64_crypto_sha512su1qv2di): Ditto.
25491         (aarch64_eor3qv8hi): Ditto.
25492         (aarch64_rax1qv2di): Ditto.
25493         (aarch64_xarqv2di): Ditto.
25494         (aarch64_bcaxqv8hi): Ditto.
25495         * config/aarch64/aarch64-simd.md:
25496         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
25497         (aarch64_crypto_sha512su0qv2di): Ditto.
25498         (aarch64_crypto_sha512su1qv2di): Ditto.
25499         (aarch64_eor3qv8hi): Ditto.
25500         (aarch64_rax1qv2di): Ditto.
25501         (aarch64_xarqv2di): Ditto.
25502         (aarch64_bcaxqv8hi): Ditto.
25503         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
25504         (vsha512h2q_u64): Ditto.
25505         (vsha512su0q_u64): Ditto.
25506         (vsha512su1q_u64): Ditto.
25507         (veor3q_u16): Ditto.
25508         (vrax1q_u64): Ditto.
25509         (vxarq_u64): Ditto.
25510         (vbcaxq_u16): Ditto.
25511         * config/arm/types.md (crypto_sha512): New type attribute.
25512         (crypto_sha3): Ditto.
25513         (doc/invoke.texi): Document new sha3 option.
25515 2018-01-10  Michael Collison  <michael.collison@arm.com>
25517         * config/aarch64/aarch64-builtins.c:
25518         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
25519         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25520         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
25521         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
25522         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
25523         (AARCH64_ISA_SM4): New ISA flag.
25524         (TARGET_SM4): New feature flag for sm4.
25525         * config/aarch64/aarch64-simd-builtins.def
25526         (aarch64_sm3ss1qv4si): Ditto.
25527         (aarch64_sm3tt1aq4si): Ditto.
25528         (aarch64_sm3tt1bq4si): Ditto.
25529         (aarch64_sm3tt2aq4si): Ditto.
25530         (aarch64_sm3tt2bq4si): Ditto.
25531         (aarch64_sm3partw1qv4si): Ditto.
25532         (aarch64_sm3partw2qv4si): Ditto.
25533         (aarch64_sm4eqv4si): Ditto.
25534         (aarch64_sm4ekeyqv4si): Ditto.
25535         * config/aarch64/aarch64-simd.md:
25536         (aarch64_sm3ss1qv4si): Ditto.
25537         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
25538         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
25539         (aarch64_sm4eqv4si): Ditto.
25540         (aarch64_sm4ekeyqv4si): Ditto.
25541         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
25542         (sm3part_op): Ditto.
25543         (CRYPTO_SM3TT): Ditto.
25544         (CRYPTO_SM3PART): Ditto.
25545         (UNSPEC_SM3SS1): New unspec.
25546         (UNSPEC_SM3TT1A): Ditto.
25547         (UNSPEC_SM3TT1B): Ditto.
25548         (UNSPEC_SM3TT2A): Ditto.
25549         (UNSPEC_SM3TT2B): Ditto.
25550         (UNSPEC_SM3PARTW1): Ditto.
25551         (UNSPEC_SM3PARTW2): Ditto.
25552         (UNSPEC_SM4E): Ditto.
25553         (UNSPEC_SM4EKEY): Ditto.
25554         * config/aarch64/constraints.md (Ui2): New constraint.
25555         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
25556         * config/arm/types.md (crypto_sm3): New type attribute.
25557         (crypto_sm4): Ditto.
25558         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
25559         (vsm3tt1aq_u32): Ditto.
25560         (vsm3tt1bq_u32): Ditto.
25561         (vsm3tt2aq_u32): Ditto.
25562         (vsm3tt2bq_u32): Ditto.
25563         (vsm3partw1q_u32): Ditto.
25564         (vsm3partw2q_u32): Ditto.
25565         (vsm4eq_u32): Ditto.
25566         (vsm4ekeyq_u32): Ditto.
25567         (doc/invoke.texi): Document new sm4 option.
25569 2018-01-10  Michael Collison  <michael.collison@arm.com>
25571         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
25572         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
25573         (AARCH64_FL_FOR_ARCH8_4): New.
25574         (AARCH64_FL_V8_4): New flag.
25575         (doc/invoke.texi): Document new armv8.4-a option.
25577 2018-01-10  Michael Collison  <michael.collison@arm.com>
25579         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25580         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
25581         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
25582         * config/aarch64/aarch64-option-extension.def: Add
25583         AARCH64_OPT_EXTENSION of 'sha2'.
25584         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
25585         (crypto): Disable sha2 and aes if crypto disabled.
25586         (crypto): Enable aes and sha2 if enabled.
25587         (simd): Disable sha2 and aes if simd disabled.
25588         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
25589         New flags.
25590         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
25591         (TARGET_SHA2): New feature flag for sha2.
25592         (TARGET_AES): New feature flag for aes.
25593         * config/aarch64/aarch64-simd.md:
25594         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
25595         conditional on TARGET_AES.
25596         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
25597         (aarch64_crypto_sha1hsi): Make pattern conditional
25598         on TARGET_SHA2.
25599         (aarch64_crypto_sha1hv4si): Ditto.
25600         (aarch64_be_crypto_sha1hv4si): Ditto.
25601         (aarch64_crypto_sha1su1v4si): Ditto.
25602         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
25603         (aarch64_crypto_sha1su0v4si): Ditto.
25604         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
25605         (aarch64_crypto_sha256su0v4si): Ditto.
25606         (aarch64_crypto_sha256su1v4si): Ditto.
25607         (doc/invoke.texi): Document new aes and sha2 options.
25609 2018-01-10  Martin Sebor  <msebor@redhat.com>
25611         PR tree-optimization/83781
25612         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
25613         as string arrays.
25615 2018-01-11  Martin Sebor  <msebor@gmail.com>
25616             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
25618         PR tree-optimization/83501
25619         PR tree-optimization/81703
25621         * tree-ssa-strlen.c (get_string_cst): Rename...
25622         (get_string_len): ...to this.  Handle global constants.
25623         (handle_char_store): Adjust.
25625 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
25626             Jim Wilson  <jimw@sifive.com>
25628         * config/riscv/riscv-protos.h (riscv_output_return): New.
25629         * config/riscv/riscv.c (struct machine_function): New naked_p field.
25630         (riscv_attribute_table, riscv_output_return),
25631         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
25632         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
25633         (riscv_compute_frame_info): Only compute frame->mask if not a naked
25634         function.
25635         (riscv_expand_prologue): Add early return for naked function.
25636         (riscv_expand_epilogue): Likewise.
25637         (riscv_function_ok_for_sibcall): Return false for naked function.
25638         (riscv_set_current_function): New.
25639         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
25640         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
25641         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
25642         * doc/extend.texi (RISC-V Function Attributes): New.
25644 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
25646         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
25647         check for 128-bit long double before checking TCmode.
25648         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
25649         128-bit long doubles before checking TFmode or TCmode.
25650         (FLOAT128_IBM_P): Likewise.
25652 2018-01-10  Martin Sebor  <msebor@redhat.com>
25654         PR tree-optimization/83671
25655         * builtins.c (c_strlen): Unconditionally return zero for the empty
25656         string.
25657         Use -Warray-bounds for warnings.
25658         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
25659         for non-constant array indices with COMPONENT_REF, arrays of
25660         arrays, and pointers to arrays.
25661         (gimple_fold_builtin_strlen): Determine and set length range for
25662         non-constant character arrays.
25664 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
25666         PR middle-end/81897
25667         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
25668         empty blocks.
25670 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
25672         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
25674 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
25676         PR target/83399
25677         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
25678         VECTOR_MEM_ALTIVEC_OR_VSX_P.
25679         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
25680         indexed_or_indirect_operand predicate.
25681         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
25682         (*vsx_le_perm_load_v8hi): Likewise.
25683         (*vsx_le_perm_load_v16qi): Likewise.
25684         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
25685         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
25686         (*vsx_le_perm_store_v8hi): Likewise.
25687         (*vsx_le_perm_store_v16qi): Likewise.
25688         (eight unnamed splitters): Likewise.
25690 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
25692         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
25693         * config/rs6000/emmintrin.h: Likewise.
25694         * config/rs6000/mmintrin.h: Likewise.
25695         * config/rs6000/xmmintrin.h: Likewise.
25697 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
25699         PR c++/43486
25700         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
25701         "public_flag".
25702         * tree.c (tree_nop_conversion): Return true for location wrapper
25703         nodes.
25704         (maybe_wrap_with_location): New function.
25705         (selftest::check_strip_nops): New function.
25706         (selftest::test_location_wrappers): New function.
25707         (selftest::tree_c_tests): Call it.
25708         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
25709         (maybe_wrap_with_location): New decl.
25710         (EXPR_LOCATION_WRAPPER_P): New macro.
25711         (location_wrapper_p): New inline function.
25712         (tree_strip_any_location_wrapper): New inline function.
25714 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
25716         PR target/83735
25717         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
25718         stack_realign_offset for the largest alignment of stack slot
25719         actually used.
25720         (ix86_find_max_used_stack_alignment): New function.
25721         (ix86_finalize_stack_frame_flags): Use it.  Set
25722         max_used_stack_alignment if we don't realign stack.
25723         * config/i386/i386.h (machine_function): Add
25724         max_used_stack_alignment.
25726 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
25728         * config/arm/arm.opt (-mbranch-cost): New option.
25729         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
25730         account.
25732 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
25734         PR target/83629
25735         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
25736         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
25738 2018-01-10  Richard Biener  <rguenther@suse.de>
25740         PR debug/83765
25741         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
25742         early out so it also covers the case where we have a non-NULL
25743         origin.
25745 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
25747         PR tree-optimization/83753
25748         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
25749         for non-strided grouped accesses if the number of elements is 1.
25751 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
25753         PR target/81616
25754         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
25755         * i386.h (TARGET_USE_GATHER): Define.
25756         * x86-tune.def (X86_TUNE_USE_GATHER): New.
25758 2018-01-10  Martin Liska  <mliska@suse.cz>
25760         PR bootstrap/82831
25761         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
25762         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
25763         partitioning.
25764         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
25765         CLEANUP_NO_PARTITIONING is not set.
25767 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
25769         * doc/rtl.texi: Remove documentation of (const ...) wrappers
25770         for vectors, as a partial revert of r254296.
25771         * rtl.h (const_vec_p): Delete.
25772         (const_vec_duplicate_p): Don't test for vector CONSTs.
25773         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
25774         * expmed.c (make_tree): Likewise.
25776         Revert:
25777         * common.md (E, F): Use CONSTANT_P instead of checking for
25778         CONST_VECTOR.
25779         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
25780         checking for CONST_VECTOR.
25782 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
25784         PR middle-end/83575
25785         * predict.c (force_edge_cold): Handle in more sane way edges
25786         with no prediction.
25788 2018-01-09  Carl Love  <cel@us.ibm.com>
25790         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
25791         V4SI, V4SF types.
25792         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
25793         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
25794         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
25795         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
25796         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
25797         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
25798         * config/rs6000/rs6000-protos.h: Add extern defition for
25799         rs6000_generate_float2_double_code.
25800         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
25801         function.
25802         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
25803         (float2_v2df): Add define_expand.
25805 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
25807         PR target/83628
25808         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
25809         op_mode in the force_to_mode call.
25811 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
25813         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
25814         instead of checking each element individually.
25815         (aarch64_evpc_uzp): Likewise.
25816         (aarch64_evpc_zip): Likewise.
25817         (aarch64_evpc_ext): Likewise.
25818         (aarch64_evpc_rev): Likewise.
25819         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
25820         instead of checking each element individually.  Return true without
25821         generating rtl if
25822         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
25823         whether all selected elements come from the same input, instead of
25824         checking each element individually.  Remove calls to gen_rtx_REG,
25825         start_sequence and end_sequence and instead assert that no rtl is
25826         generated.
25828 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
25830         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
25831         order of HIGH and CONST checks.
25833 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
25835         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
25836         if the destination isn't an SSA_NAME.
25838 2018-01-09  Richard Biener  <rguenther@suse.de>
25840         PR tree-optimization/83668
25841         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
25842         move prologue...
25843         (canonicalize_loop_form): ... here, renamed from ...
25844         (canonicalize_loop_closed_ssa_form): ... this and amended to
25845         swap successor edges for loop exit blocks to make us use
25846         the RPO order we need for initial schedule generation.
25848 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
25850         PR tree-optimization/64811
25851         * match.pd: When optimizing comparisons with Inf, avoid
25852         introducing or losing exceptions from comparisons with NaN.
25854 2018-01-09  Martin Liska  <mliska@suse.cz>
25856         PR sanitizer/82517
25857         * asan.c (shadow_mem_size): Add gcc_assert.
25859 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
25861         Don't save registers in main().
25863         PR target/83738
25864         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
25865         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
25866         * config/avr/avr.c (avr_set_current_function): Don't error if
25867         naked, OS_task or OS_main are specified at the same time.
25868         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
25869         OS_main.
25870         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
25871         attribute.
25872         * common/config/avr/avr-common.c (avr_option_optimization_table):
25873         Switch on -mmain-is-OS_task for optimizing compilations.
25875 2018-01-09  Richard Biener  <rguenther@suse.de>
25877         PR tree-optimization/83572
25878         * graphite.c: Include cfganal.h.
25879         (graphite_transform_loops): Connect infinite loops to exit
25880         and remove fake edges at the end.
25882 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
25884         * ipa-inline.c (edge_badness): Revert accidental checkin.
25886 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
25888         PR ipa/80763
25889         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
25890         symbols; not inline clones.
25892 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
25894         PR target/83507
25895         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
25896         hard registers.  Formatting fixes.
25898         PR preprocessor/83722
25899         * gcc.c (try_generate_repro): Pass
25900         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
25901         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
25902         do_report_bug.
25904 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
25905             Kito Cheng  <kito.cheng@gmail.com>
25907         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
25908         (riscv_leaf_function_p): Delete.
25909         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
25911 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25913         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
25914         function.
25915         (do_ifelse): New function.
25916         (do_isel): New function.
25917         (do_sub3): New function.
25918         (do_add3): New function.
25919         (do_load_mask_compare): New function.
25920         (do_overlap_load_compare): New function.
25921         (expand_compare_loop): New function.
25922         (expand_block_compare): Call expand_compare_loop() when appropriate.
25923         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
25924         option description.
25925         (-mblock-compare-inline-loop-limit): New option.
25927 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25929         PR target/83677
25930         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
25931         Reverse order of second and third operands in first alternative.
25932         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
25933         of first and second elements in UNSPEC_VPERMR vector.
25934         (altivec_expand_vec_perm_le): Likewise.
25936 2018-01-08  Jeff Law  <law@redhat.com>
25938         PR rtl-optimizatin/81308
25939         * tree-switch-conversion.c (cfg_altered): New file scoped static.
25940         (process_switch): If group_case_labels makes a change, then set
25941         cfg_altered.
25942         (pass_convert_switch::execute): If a switch is converted, then
25943         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
25945         PR rtl-optimization/81308
25946         * recog.c (split_all_insns): Conditionally cleanup the CFG after
25947         splitting insns.
25949 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
25951         PR target/83663 - Revert r255946
25952         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
25953         generation for cases where splatting a value is not useful.
25954         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
25955         across a vec_duplicate and a paradoxical subreg forming a vector
25956         mode to a vec_concat.
25958 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25960         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
25961         -march=armv8.3-a variants.
25962         * config/arm/t-multilib: Likewise.
25963         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
25965 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25967         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
25968         to generate rtl.
25969         (cceq_ior_compare_complement): Give it a name so I can use it, and
25970         change boolean_or_operator predicate to boolean_operator so it can
25971         be used to generate a crand.
25972         (eqne): New code iterator.
25973         (bd/bd_neg): New code_attrs.
25974         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
25975         a single define_insn.
25976         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
25977         decrement (bdnzt/bdnzf/bdzt/bdzf).
25978         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
25979         with the new names of the branch decrement patterns, and added the
25980         names of the branch decrement conditional patterns.
25982 2018-01-08  Richard Biener  <rguenther@suse.de>
25984         PR tree-optimization/83563
25985         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
25986         cache.
25988 2018-01-08  Richard Biener  <rguenther@suse.de>
25990         PR middle-end/83713
25991         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
25993 2018-01-08  Richard Biener  <rguenther@suse.de>
25995         PR tree-optimization/83685
25996         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
25997         references to abnormals.
25999 2018-01-08  Richard Biener  <rguenther@suse.de>
26001         PR lto/83719
26002         * dwarf2out.c (output_indirect_strings): Handle empty
26003         skeleton_debug_str_hash.
26004         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
26006 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
26008         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
26009         (emit_store_direct): Likewise.
26010         (arc_trampoline_adjust_address): Likewise.
26011         (arc_asm_trampoline_template): New function.
26012         (arc_initialize_trampoline): Use asm_trampoline_template.
26013         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
26014         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
26015         * config/arc/arc.md (flush_icache): Delete pattern.
26017 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
26019         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
26020         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
26021         munaligned-access.
26023 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26025         PR target/83681
26026         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
26027         by not USED_FOR_TARGET.
26028         (make_pass_resolve_sw_modes): Likewise.
26030 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26032         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
26033         USED_FOR_TARGET.
26035 2018-01-08  Richard Biener  <rguenther@suse.de>
26037         PR middle-end/83580
26038         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
26040 2018-01-08  Richard Biener  <rguenther@suse.de>
26042         PR middle-end/83517
26043         * match.pd ((t * 2) / 2) -> t): Add missing :c.
26045 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
26047         PR middle-end/81897
26048         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
26049         basic blocks with a small number of successors.
26050         (convert_control_dep_chain_into_preds): Improve handling of
26051         forwarder blocks.
26052         (dump_predicates): Split apart into...
26053         (dump_pred_chain): ...here...
26054         (dump_pred_info): ...and here.
26055         (can_one_predicate_be_invalidated_p): Add debugging printfs.
26056         (can_chain_union_be_invalidated_p): Improve check for invalidation
26057         of paths.
26058         (uninit_uses_cannot_happen): Avoid unnecessary if
26059         convert_control_dep_chain_into_preds yielded nothing.
26061 2018-01-06  Martin Sebor  <msebor@redhat.com>
26063         PR tree-optimization/83640
26064         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
26065         subtracting negative offset from size.
26066         (builtin_access::overlap): Adjust offset bounds of the access to fall
26067         within the size of the object if possible.
26069 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
26071         PR rtl-optimization/83699
26072         * expmed.c (extract_bit_field_1): Restrict the vector usage of
26073         extract_bit_field_as_subreg to cases in which the extracted
26074         value is also a vector.
26076         * lra-constraints.c (process_alt_operands): Test for the equivalence
26077         substitutions when detecting a possible reload cycle.
26079 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
26081         PR debug/83480
26082         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
26083         by default if flag_selective_schedling{,2}.  Formatting fixes.
26085         PR rtl-optimization/83682
26086         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
26087         if it has non-VECTOR_MODE element mode.
26088         (vec_duplicate_p): Likewise.
26090         PR middle-end/83694
26091         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
26092         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
26094 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
26096         PR target/83604
26097         * config/i386/i386-builtin.def
26098         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
26099         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
26100         Require also OPTION_MASK_ISA_AVX512F in addition to
26101         OPTION_MASK_ISA_GFNI.
26102         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
26103         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
26104         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
26105         to OPTION_MASK_ISA_GFNI.
26106         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
26107         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
26108         OPTION_MASK_ISA_AVX512BW.
26109         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
26110         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
26111         addition to OPTION_MASK_ISA_GFNI.
26112         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
26113         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
26114         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
26115         to OPTION_MASK_ISA_GFNI.
26116         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
26117         a requirement for all ISAs rather than any of them with a few
26118         exceptions.
26119         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
26120         processing.
26121         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
26122         bitmasks to be enabled with 3 exceptions, instead of requiring any
26123         enabled ISA with lots of exceptions.
26124         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
26125         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
26126         Change avx512bw in isa attribute to avx512f.
26127         * config/i386/sgxintrin.h: Add license boilerplate.
26128         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
26129         to __AVX512F__ and __AVX512VL to __AVX512VL__.
26130         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
26131         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
26132         defined.
26133         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
26134         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
26135         temporarily sse2 rather than sse if not enabled already.
26137         PR target/83604
26138         * config/i386/sse.md (VI248_VLBW): Rename to ...
26139         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
26140         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
26141         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
26142         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
26143         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
26144         mode iterator instead of VI248_VLBW.
26146 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
26148         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
26149         (record_modified): Skip clobbers; add debug output.
26150         (param_change_prob): Use sreal frequencies.
26152 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
26154         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
26155         punt for user-aligned variables.
26157 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
26159         * tree-chrec.c (chrec_contains_symbols): Return true for
26160         POLY_INT_CST.
26162 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
26164         PR target/82439
26165         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
26166         of (x|y) == x for BICS pattern.
26168 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
26170         PR tree-optimization/83605
26171         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
26172         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
26173         can throw.
26175 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26177         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
26178         * config/epiphany/rtems.h: New file.
26180 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26181             Uros Bizjak  <ubizjak@gmail.com>
26183         PR target/83554
26184         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
26185         QIreg_operand instead of register_operand predicate.
26186         * config/i386/i386.c (ix86_rop_should_change_byte_p,
26187         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
26188         comments instead of -fmitigate[-_]rop.
26190 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26192         PR bootstrap/81926
26193         * cgraphunit.c (symbol_table::compile): Switch to text_section
26194         before calling assembly_start debug hook.
26195         * run-rtl-passes.c (run_rtl_passes): Likewise.
26196         Include output.h.
26198 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26200         * tree-vrp.c (extract_range_from_binary_expr_1): Check
26201         range_int_cst_p rather than !symbolic_range_p before calling
26202         extract_range_from_multiplicative_op_1.
26204 2018-01-04  Jeff Law  <law@redhat.com>
26206         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
26207         redundant test in assertion.
26209 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26211         * doc/rtl.texi: Document machine_mode wrapper classes.
26213 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26215         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
26216         using tree_to_uhwi.
26218 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26220         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
26221         the VEC_PERM_EXPR fold to fail.
26223 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26225         PR debug/83585
26226         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
26227         to switched_sections.
26229 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26231         PR target/83680
26232         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
26233         test for d.testing.
26235 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
26237         PR target/83387
26238         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
26239         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
26241 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26243         PR debug/83666
26244         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
26245         is BLKmode and bitpos not zero or mode change is needed.
26247 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26249         PR target/83675
26250         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
26251         TARGET_VIS2.
26253 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
26255         PR target/83628
26256         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
26257         instead of MULT rtx.  Update all corresponding splitters.
26258         (*saddl_se): Ditto.
26259         (*ssub<modesuffix>): Ditto.
26260         (*ssubl_se): Ditto.
26261         (*cmp_sadd_di): Update split patterns.
26262         (*cmp_sadd_si): Ditto.
26263         (*cmp_sadd_sidi): Ditto.
26264         (*cmp_ssub_di): Ditto.
26265         (*cmp_ssub_si): Ditto.
26266         (*cmp_ssub_sidi): Ditto.
26267         * config/alpha/predicates.md (const23_operand): New predicate.
26268         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
26269         Look for ASHIFT, not MULT inner operand.
26270         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
26272 2018-01-04  Martin Liska  <mliska@suse.cz>
26274         PR gcov-profile/83669
26275         * gcov.c (output_intermediate_file): Add version to intermediate
26276         gcov file.
26277         * doc/gcov.texi: Document new field 'version' in intermediate
26278         file format. Fix location of '-k' option of gcov command.
26280 2018-01-04  Martin Liska  <mliska@suse.cz>
26282         PR ipa/82352
26283         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
26285 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26287         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
26289 2018-01-03  Martin Sebor  <msebor@redhat.com>
26291         PR tree-optimization/83655
26292         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
26293         checking calls with invalid arguments.
26295 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26297         * tree-vect-stmts.c (vect_get_store_rhs): New function.
26298         (vectorizable_mask_load_store): Delete.
26299         (vectorizable_call): Return false for masked loads and stores.
26300         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
26301         instead of gimple_assign_rhs1.
26302         (vectorizable_load): Handle IFN_MASK_LOAD.
26303         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
26305 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26307         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
26308         split out from..,
26309         (vectorizable_mask_load_store): ...here.
26310         (vectorizable_load): ...and here.
26312 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26314         * tree-vect-stmts.c (vect_build_all_ones_mask)
26315         (vect_build_zero_merge_argument): New functions, split out from...
26316         (vectorizable_load): ...here.
26318 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26320         * tree-vect-stmts.c (vect_check_store_rhs): New function,
26321         split out from...
26322         (vectorizable_mask_load_store): ...here.
26323         (vectorizable_store): ...and here.
26325 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26327         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
26328         split out from...
26329         (vectorizable_mask_load_store): ...here.
26331 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26333         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
26334         (vect_model_store_cost): Take a vec_load_store_type instead of a
26335         vect_def_type.
26336         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
26337         (vect_model_store_cost): Take a vec_load_store_type instead of a
26338         vect_def_type.
26339         (vectorizable_mask_load_store): Update accordingly.
26340         (vectorizable_store): Likewise.
26341         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
26343 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26345         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
26346         IFN_MASK_LOAD calls here rather than...
26347         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
26349 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26350             Alan Hayward  <alan.hayward@arm.com>
26351             David Sherwood  <david.sherwood@arm.com>
26353         * expmed.c (extract_bit_field_1): For vector extracts,
26354         fall back to extract_bit_field_as_subreg if vec_extract
26355         isn't available.
26357 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26358             Alan Hayward  <alan.hayward@arm.com>
26359             David Sherwood  <david.sherwood@arm.com>
26361         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
26362         they are variable or constant sized.
26363         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
26364         slots for constant-sized data.
26366 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26367             Alan Hayward  <alan.hayward@arm.com>
26368             David Sherwood  <david.sherwood@arm.com>
26370         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
26371         handling COND_EXPRs with boolean comparisons, try to find a better
26372         basis for the mask type than the boolean itself.
26374 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26376         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
26377         is calculated and how it can be overridden.
26378         * genmodes.c (max_bitsize_mode_any_mode): New variable.
26379         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
26380         if defined.
26381         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
26382         if nonzero.
26384 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26385             Alan Hayward  <alan.hayward@arm.com>
26386             David Sherwood  <david.sherwood@arm.com>
26388         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
26389         Remove the mode argument.
26390         (aarch64_simd_valid_immediate): Remove the mode and inverse
26391         arguments.
26392         * config/aarch64/iterators.md (bitsize): New iterator.
26393         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
26394         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
26395         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
26396         aarch64_simd_valid_immediate.
26397         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
26398         (aarch64_reg_or_bic_imm): Likewise.
26399         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
26400         with an insn_type enum and msl with a modifier_type enum.
26401         Replace element_width with a scalar_mode.  Change the shift
26402         to unsigned int.  Add constructors for scalar_float_mode and
26403         scalar_int_mode elements.
26404         (aarch64_vect_float_const_representable_p): Delete.
26405         (aarch64_can_const_movi_rtx_p)
26406         (aarch64_simd_scalar_immediate_valid_for_move)
26407         (aarch64_simd_make_constant): Update call to
26408         aarch64_simd_valid_immediate.
26409         (aarch64_advsimd_valid_immediate_hs): New function.
26410         (aarch64_advsimd_valid_immediate): Likewise.
26411         (aarch64_simd_valid_immediate): Remove mode and inverse
26412         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
26413         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
26414         and aarch64_float_const_representable_p on the result.
26415         (aarch64_output_simd_mov_immediate): Remove mode argument.
26416         Update call to aarch64_simd_valid_immediate and use of
26417         simd_immediate_info.
26418         (aarch64_output_scalar_simd_mov_immediate): Update call
26419         accordingly.
26421 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26422             Alan Hayward  <alan.hayward@arm.com>
26423             David Sherwood  <david.sherwood@arm.com>
26425         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
26426         (mode_nunits): Likewise CONST_MODE_NUNITS.
26427         * machmode.def (ADJUST_NUNITS): Document.
26428         * genmodes.c (mode_data::need_nunits_adj): New field.
26429         (blank_mode): Update accordingly.
26430         (adj_nunits): New variable.
26431         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
26432         parameter.
26433         (emit_mode_size_inline): Set need_bytesize_adj for all modes
26434         listed in adj_nunits.
26435         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
26436         listed in adj_nunits.  Don't emit case statements for such modes.
26437         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
26438         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
26439         nothing if adj_nunits is nonnull.
26440         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
26441         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
26442         (emit_mode_fbit): Update use of print_maybe_const_decl.
26443         (emit_move_size): Likewise.  Treat the array as non-const
26444         if adj_nunits.
26445         (emit_mode_adjustments): Handle adj_nunits.
26447 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26449         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
26450         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
26451         (VECTOR_MODES): Use it.
26452         (make_vector_modes): Take the prefix as an argument.
26454 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26455             Alan Hayward  <alan.hayward@arm.com>
26456             David Sherwood  <david.sherwood@arm.com>
26458         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
26459         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
26460         for MODE_VECTOR_BOOL.
26461         * machmode.def (VECTOR_BOOL_MODE): Document.
26462         * genmodes.c (VECTOR_BOOL_MODE): New macro.
26463         (make_vector_bool_mode): New function.
26464         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
26465         MODE_VECTOR_BOOL.
26466         * lto-streamer-in.c (lto_input_mode_table): Likewise.
26467         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
26468         Likewise.
26469         * stor-layout.c (int_mode_for_mode): Likewise.
26470         * tree.c (build_vector_type_for_mode): Likewise.
26471         * varasm.c (output_constant_pool_2): Likewise.
26472         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
26473         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
26474         for MODE_VECTOR_BOOL.
26475         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
26476         of mode class checks.
26477         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
26478         instead of a list of mode class checks.
26479         (expand_vector_scalar_condition): Likewise.
26480         (type_for_widest_vector_mode): Handle BImode as an inner mode.
26482 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26483             Alan Hayward  <alan.hayward@arm.com>
26484             David Sherwood  <david.sherwood@arm.com>
26486         * machmode.h (mode_size): Change from unsigned short to
26487         poly_uint16_pod.
26488         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
26489         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26490         or if measurement_type is not polynomial.
26491         (fixed_size_mode::includes_p): Check for constant-sized modes.
26492         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
26493         return a poly_uint16 rather than an unsigned short.
26494         (emit_mode_size): Change the type of mode_size from unsigned short
26495         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
26496         (emit_mode_adjustments): Cope with polynomial vector sizes.
26497         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26498         for GET_MODE_SIZE.
26499         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26500         for GET_MODE_SIZE.
26501         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
26502         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
26503         * caller-save.c (setup_save_areas): Likewise.
26504         (replace_reg_with_saved_mem): Likewise.
26505         * calls.c (emit_library_call_value_1): Likewise.
26506         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
26507         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
26508         (gen_lowpart_for_combine): Likewise.
26509         * convert.c (convert_to_integer_1): Likewise.
26510         * cse.c (equiv_constant, cse_insn): Likewise.
26511         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
26512         (cselib_subst_to_values): Likewise.
26513         * dce.c (word_dce_process_block): Likewise.
26514         * df-problems.c (df_word_lr_mark_ref): Likewise.
26515         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
26516         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
26517         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
26518         (rtl_for_decl_location): Likewise.
26519         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
26520         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
26521         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
26522         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
26523         (expand_expr_real_1): Likewise.
26524         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
26525         (pad_below): Likewise.
26526         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26527         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
26528         * ira.c (get_subreg_tracking_sizes): Likewise.
26529         * ira-build.c (ira_create_allocno_objects): Likewise.
26530         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
26531         (ira_sort_regnos_for_alter_reg): Likewise.
26532         * ira-costs.c (record_operand_costs): Likewise.
26533         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
26534         (resolve_simple_move): Likewise.
26535         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
26536         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
26537         (lra_constraints): Likewise.
26538         (CONST_POOL_OK_P): Reject variable-sized modes.
26539         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
26540         (add_pseudo_to_slot, lra_spill): Likewise.
26541         * omp-low.c (omp_clause_aligned_alignment): Likewise.
26542         * optabs-query.c (get_best_extraction_insn): Likewise.
26543         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26544         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
26545         (expand_mult_highpart, valid_multiword_target_p): Likewise.
26546         * recog.c (offsettable_address_addr_space_p): Likewise.
26547         * regcprop.c (maybe_mode_change): Likewise.
26548         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
26549         * regrename.c (build_def_use): Likewise.
26550         * regstat.c (dump_reg_info): Likewise.
26551         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
26552         (find_reloads, find_reloads_subreg_address): Likewise.
26553         * reload1.c (eliminate_regs_1): Likewise.
26554         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
26555         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
26556         (simplify_binary_operation_1, simplify_subreg): Likewise.
26557         * targhooks.c (default_function_arg_padding): Likewise.
26558         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
26559         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
26560         (verify_gimple_assign_ternary): Likewise.
26561         * tree-inline.c (estimate_move_cost): Likewise.
26562         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26563         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
26564         (get_address_cost_ainc): Likewise.
26565         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
26566         (vect_supportable_dr_alignment): Likewise.
26567         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26568         (vectorizable_reduction): Likewise.
26569         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
26570         (vectorizable_operation, vectorizable_load): Likewise.
26571         * tree.c (build_same_sized_truth_vector_type): Likewise.
26572         * valtrack.c (cleanup_auto_inc_dec): Likewise.
26573         * var-tracking.c (emit_note_insn_var_location): Likewise.
26574         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
26575         (ADDR_VEC_ALIGN): Likewise.
26577 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26578             Alan Hayward  <alan.hayward@arm.com>
26579             David Sherwood  <david.sherwood@arm.com>
26581         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
26582         unsigned short.
26583         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26584         or if measurement_type is polynomial.
26585         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
26586         * combine.c (make_extraction): Likewise.
26587         * dse.c (find_shift_sequence): Likewise.
26588         * dwarf2out.c (mem_loc_descriptor): Likewise.
26589         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
26590         (extract_bit_field, extract_low_bits): Likewise.
26591         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
26592         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
26593         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
26594         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
26595         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26596         * reload.c (find_reloads): Likewise.
26597         * reload1.c (alter_reg): Likewise.
26598         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
26599         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
26600         * tree-if-conv.c (predicate_mem_writes): Likewise.
26601         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
26602         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
26603         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
26604         * valtrack.c (dead_debug_insert_temp): Likewise.
26605         * varasm.c (mergeable_constant_section): Likewise.
26606         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
26608 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26609             Alan Hayward  <alan.hayward@arm.com>
26610             David Sherwood  <david.sherwood@arm.com>
26612         * expr.c (expand_assignment): Cope with polynomial mode sizes
26613         when assigning to a CONCAT.
26615 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26616             Alan Hayward  <alan.hayward@arm.com>
26617             David Sherwood  <david.sherwood@arm.com>
26619         * machmode.h (mode_precision): Change from unsigned short to
26620         poly_uint16_pod.
26621         (mode_to_precision): Return a poly_uint16 rather than an unsigned
26622         short.
26623         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
26624         or if measurement_type is not polynomial.
26625         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
26626         in which the mode is already known to be a scalar_int_mode.
26627         * genmodes.c (emit_mode_precision): Change the type of mode_precision
26628         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
26629         initializer.
26630         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26631         for GET_MODE_PRECISION.
26632         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26633         for GET_MODE_PRECISION.
26634         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
26635         as polynomial.
26636         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
26637         (expand_field_assignment, make_extraction): Likewise.
26638         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
26639         (get_last_value): Likewise.
26640         * convert.c (convert_to_integer_1): Likewise.
26641         * cse.c (cse_insn): Likewise.
26642         * expr.c (expand_expr_real_1): Likewise.
26643         * lra-constraints.c (simplify_operand_subreg): Likewise.
26644         * optabs-query.c (can_atomic_load_p): Likewise.
26645         * optabs.c (expand_atomic_load): Likewise.
26646         (expand_atomic_store): Likewise.
26647         * ree.c (combine_reaching_defs): Likewise.
26648         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
26649         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
26650         * tree.h (type_has_mode_precision_p): Likewise.
26651         * ubsan.c (instrument_si_overflow): Likewise.
26653 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26654             Alan Hayward  <alan.hayward@arm.com>
26655             David Sherwood  <david.sherwood@arm.com>
26657         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
26658         polynomial numbers of units.
26659         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
26660         (valid_vector_subparts_p): New function.
26661         (build_vector_type): Remove temporary shim and take the number
26662         of units as a poly_uint64 rather than an int.
26663         (build_opaque_vector_type): Take the number of units as a
26664         poly_uint64 rather than an int.
26665         * tree.c (build_vector_from_ctor): Handle polynomial
26666         TYPE_VECTOR_SUBPARTS.
26667         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
26668         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
26669         (build_vector_from_val): If the number of units is variable,
26670         use build_vec_duplicate_cst for constant operands and
26671         VEC_DUPLICATE_EXPR otherwise.
26672         (make_vector_type): Remove temporary is_constant ().
26673         (build_vector_type, build_opaque_vector_type): Take the number of
26674         units as a poly_uint64 rather than an int.
26675         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
26676         VECTOR_CST_NELTS.
26677         * cfgexpand.c (expand_debug_expr): Likewise.
26678         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
26679         (store_constructor, expand_expr_real_1): Likewise.
26680         (const_scalar_mask_from_tree): Likewise.
26681         * fold-const-call.c (fold_const_reduction): Likewise.
26682         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
26683         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
26684         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
26685         (fold_relational_const): Likewise.
26686         (native_interpret_vector): Likewise.  Change the size from an
26687         int to an unsigned int.
26688         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
26689         TYPE_VECTOR_SUBPARTS.
26690         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
26691         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
26692         duplicating a non-constant operand into a variable-length vector.
26693         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
26694         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
26695         * ipa-icf.c (sem_variable::equals): Likewise.
26696         * match.pd: Likewise.
26697         * omp-simd-clone.c (simd_clone_subparts): Likewise.
26698         * print-tree.c (print_node): Likewise.
26699         * stor-layout.c (layout_type): Likewise.
26700         * targhooks.c (default_builtin_vectorization_cost): Likewise.
26701         * tree-cfg.c (verify_gimple_comparison): Likewise.
26702         (verify_gimple_assign_binary): Likewise.
26703         (verify_gimple_assign_ternary): Likewise.
26704         (verify_gimple_assign_single): Likewise.
26705         * tree-pretty-print.c (dump_generic_node): Likewise.
26706         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26707         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
26708         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
26709         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
26710         (vect_shift_permute_load_chain): Likewise.
26711         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
26712         (expand_vector_condition, optimize_vector_constructor): Likewise.
26713         (lower_vec_perm, get_compute_type): Likewise.
26714         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26715         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
26716         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
26717         (vect_recog_mask_conversion_pattern): Likewise.
26718         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
26719         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
26720         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26721         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
26722         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
26723         (vectorizable_shift, vectorizable_operation, vectorizable_store)
26724         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
26725         (supportable_widening_operation): Likewise.
26726         (supportable_narrowing_operation): Likewise.
26727         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
26728         Likewise.
26729         * varasm.c (output_constant): Likewise.
26731 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26732             Alan Hayward  <alan.hayward@arm.com>
26733             David Sherwood  <david.sherwood@arm.com>
26735         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
26736         so that both the length == 3 and length != 3 cases set up their
26737         own permute vectors.  Add comments explaining why we know the
26738         number of elements is constant.
26739         (vect_permute_load_chain): Likewise.
26741 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26742             Alan Hayward  <alan.hayward@arm.com>
26743             David Sherwood  <david.sherwood@arm.com>
26745         * machmode.h (mode_nunits): Change from unsigned char to
26746         poly_uint16_pod.
26747         (ONLY_FIXED_SIZE_MODES): New macro.
26748         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
26749         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
26750         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
26751         New typedefs.
26752         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
26753         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
26754         or if measurement_type is not polynomial.
26755         * genmodes.c (ZERO_COEFFS): New macro.
26756         (emit_mode_nunits_inline): Make mode_nunits_inline return a
26757         poly_uint16.
26758         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
26759         Use ZERO_COEFFS when emitting initializers.
26760         * data-streamer.h (bp_pack_poly_value): New function.
26761         (bp_unpack_poly_value): Likewise.
26762         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26763         for GET_MODE_NUNITS.
26764         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26765         for GET_MODE_NUNITS.
26766         * tree.c (make_vector_type): Remove temporary shim and make
26767         the real function take the number of units as a poly_uint64
26768         rather than an int.
26769         (build_vector_type_for_mode): Handle polynomial nunits.
26770         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
26771         * emit-rtl.c (const_vec_series_p_1): Likewise.
26772         (gen_rtx_CONST_VECTOR): Likewise.
26773         * fold-const.c (test_vec_duplicate_folding): Likewise.
26774         * genrecog.c (validate_pattern): Likewise.
26775         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
26776         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26777         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
26778         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
26779         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
26780         * rtlanal.c (subreg_get_info): Likewise.
26781         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26782         (vect_grouped_load_supported): Likewise.
26783         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
26784         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
26785         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
26786         (simplify_const_unary_operation, simplify_binary_operation_1)
26787         (simplify_const_binary_operation, simplify_ternary_operation)
26788         (test_vector_ops_duplicate, test_vector_ops): Likewise.
26789         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
26790         instead of CONST_VECTOR_NUNITS.
26791         * varasm.c (output_constant_pool_2): Likewise.
26792         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
26793         explicit-encoded elements in the XVEC for variable-length vectors.
26795 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26797         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
26799 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26800             Alan Hayward  <alan.hayward@arm.com>
26801             David Sherwood  <david.sherwood@arm.com>
26803         * coretypes.h (fixed_size_mode): Declare.
26804         (fixed_size_mode_pod): New typedef.
26805         * builtins.h (target_builtins::x_apply_args_mode)
26806         (target_builtins::x_apply_result_mode): Change type to
26807         fixed_size_mode_pod.
26808         * builtins.c (apply_args_size, apply_result_size, result_vector)
26809         (expand_builtin_apply_args_1, expand_builtin_apply)
26810         (expand_builtin_return): Update accordingly.
26812 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26814         * cse.c (hash_rtx_cb): Hash only the encoded elements.
26815         * cselib.c (cselib_hash_rtx): Likewise.
26816         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
26817         CONST_VECTOR encoding.
26819 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26820             Jeff Law  <law@redhat.com>
26822         PR target/83641
26823         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
26824         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
26825         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
26826         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
26828         PR target/83641
26829         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
26830         explicitly probe *sp in a noreturn function if there were any callee
26831         register saves or frame pointer is needed.
26833 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26835         PR debug/83621
26836         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
26837         BLKmode for ternary, binary or unary expressions.
26839         PR debug/83645
26840         * var-tracking.c (delete_vta_debug_insn): New inline function.
26841         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
26842         insns from get_insns () to NULL instead of each bb separately.
26843         Use delete_vta_debug_insn.  No longer static.
26844         (vt_debug_insns_local, variable_tracking_main_1): Adjust
26845         delete_vta_debug_insns callers.
26846         * rtl.h (delete_vta_debug_insns): Declare.
26847         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
26848         instead of variable_tracking_main.
26850 2018-01-03  Martin Sebor  <msebor@redhat.com>
26852         PR tree-optimization/83603
26853         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
26854         arguments past the endof the argument list in functions declared
26855         without a prototype.
26856         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
26857         Avoid checking when arguments are null.
26859 2018-01-03  Martin Sebor  <msebor@redhat.com>
26861         PR c/83559
26862         * doc/extend.texi (attribute const): Fix a typo.
26863         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
26864         issuing -Wsuggest-attribute for void functions.
26866 2018-01-03  Martin Sebor  <msebor@redhat.com>
26868         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
26869         offset_int::from instead of wide_int::to_shwi.
26870         (maybe_diag_overlap): Remove assertion.
26871         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
26872         * gimple-ssa-sprintf.c (format_directive): Same.
26873         (parse_directive): Same.
26874         (sprintf_dom_walker::compute_format_length): Same.
26875         (try_substitute_return_value): Same.
26877 2018-01-03  Jeff Law  <law@redhat.com>
26879         PR middle-end/83654
26880         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
26881         non-constant residual for zero at runtime and avoid probing in
26882         that case.  Reorganize code for trailing problem to mirror handling
26883         of the residual.
26885 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26887         PR tree-optimization/83501
26888         * tree-ssa-strlen.c (get_string_cst): New.
26889         (handle_char_store): Call get_string_cst.
26891 2018-01-03  Martin Liska  <mliska@suse.cz>
26893         PR tree-optimization/83593
26894         * tree-ssa-strlen.c: Include tree-cfg.h.
26895         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
26896         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
26897         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
26898         to false.
26899         (strlen_dom_walker::before_dom_children): Call
26900         gimple_purge_dead_eh_edges. Dump tranformation with details
26901         dump flags.
26902         (strlen_dom_walker::before_dom_children): Update call by adding
26903         new argument cleanup_eh.
26904         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
26906 2018-01-03  Martin Liska  <mliska@suse.cz>
26908         PR ipa/83549
26909         * cif-code.def (VARIADIC_THUNK): New enum value.
26910         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
26911         thunks.
26913 2018-01-03  Jan Beulich  <jbeulich@suse.com>
26915         * sse.md (mov<mode>_internal): Tighten condition for when to use
26916         vmovdqu<ssescalarsize> for TI and OI modes.
26918 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26920         Update copyright years.
26922 2018-01-03  Martin Liska  <mliska@suse.cz>
26924         PR ipa/83594
26925         * ipa-visibility.c (function_and_variable_visibility): Skip
26926         functions with noipa attribure.
26928 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26930         * gcc.c (process_command): Update copyright notice dates.
26931         * gcov-dump.c (print_version): Ditto.
26932         * gcov.c (print_version): Ditto.
26933         * gcov-tool.c (print_version): Ditto.
26934         * gengtype.c (create_file): Ditto.
26935         * doc/cpp.texi: Bump @copying's copyright year.
26936         * doc/cppinternals.texi: Ditto.
26937         * doc/gcc.texi: Ditto.
26938         * doc/gccint.texi: Ditto.
26939         * doc/gcov.texi: Ditto.
26940         * doc/install.texi: Ditto.
26941         * doc/invoke.texi: Ditto.
26943 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26945         * vector-builder.h (vector_builder::m_full_nelts): Change from
26946         unsigned int to poly_uint64.
26947         (vector_builder::full_nelts): Update prototype accordingly.
26948         (vector_builder::new_vector): Likewise.
26949         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
26950         (vector_builder::operator ==): Likewise.
26951         (vector_builder::finalize): Likewise.
26952         * int-vector-builder.h (int_vector_builder::int_vector_builder):
26953         Take the number of elements as a poly_uint64 rather than an
26954         unsigned int.
26955         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
26956         from unsigned int to poly_uint64.
26957         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
26958         (vec_perm_indices::new_vector): Likewise.
26959         (vec_perm_indices::length): Likewise.
26960         (vec_perm_indices::nelts_per_input): Likewise.
26961         (vec_perm_indices::input_nelts): Likewise.
26962         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
26963         number of elements per input as a poly_uint64 rather than an
26964         unsigned int.  Use the original encoding for variable-length
26965         vectors, rather than clamping each individual element.
26966         For the second and subsequent elements in each pattern,
26967         clamp the step and base before clamping their sum.
26968         (vec_perm_indices::series_p): Handle polynomial element counts.
26969         (vec_perm_indices::all_in_range_p): Likewise.
26970         (vec_perm_indices_to_tree): Likewise.
26971         (vec_perm_indices_to_rtx): Likewise.
26972         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
26973         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
26974         (tree_vector_builder::new_binary_operation): Handle polynomial
26975         element counts.  Return false if we need to know the number
26976         of elements at compile time.
26977         * fold-const.c (fold_vec_perm): Punt if the number of elements
26978         isn't known at compile time.
26980 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26982         * vec-perm-indices.h (vec_perm_builder): Change element type
26983         from HOST_WIDE_INT to poly_int64.
26984         (vec_perm_indices::element_type): Update accordingly.
26985         (vec_perm_indices::clamp): Handle polynomial element_types.
26986         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
26987         (vec_perm_indices::all_in_range_p): Likewise.
26988         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
26989         than shwi trees.
26990         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
26991         polynomial vec_perm_indices element types.
26992         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
26993         * fold-const.c (fold_vec_perm): Likewise.
26994         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
26995         * tree-vect-generic.c (lower_vec_perm): Likewise.
26996         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
26997         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
26998         element type to HOST_WIDE_INT.
27000 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27001             Alan Hayward  <alan.hayward@arm.com>
27002             David Sherwood  <david.sherwood@arm.com>
27004         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
27005         rather than an int.  Use plus_constant.
27006         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
27007         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
27009 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27010             Alan Hayward  <alan.hayward@arm.com>
27011             David Sherwood  <david.sherwood@arm.com>
27013         * calls.c (emit_call_1, expand_call): Change struct_value_size from
27014         a HOST_WIDE_INT to a poly_int64.
27016 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27017             Alan Hayward  <alan.hayward@arm.com>
27018             David Sherwood  <david.sherwood@arm.com>
27020         * calls.c (load_register_parameters): Cope with polynomial
27021         mode sizes.  Require a constant size for BLKmode parameters
27022         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
27023         forces a parameter to be padded at the lsb end in order to
27024         fill a complete number of words, require the parameter size
27025         to be ordered wrt UNITS_PER_WORD.
27027 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27028             Alan Hayward  <alan.hayward@arm.com>
27029             David Sherwood  <david.sherwood@arm.com>
27031         * reload1.c (spill_stack_slot_width): Change element type
27032         from unsigned int to poly_uint64_pod.
27033         (alter_reg): Treat mode sizes as polynomial.
27035 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27036             Alan Hayward  <alan.hayward@arm.com>
27037             David Sherwood  <david.sherwood@arm.com>
27039         * reload.c (complex_word_subreg_p): New function.
27040         (reload_inner_reg_of_subreg, push_reload): Use it.
27042 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27043             Alan Hayward  <alan.hayward@arm.com>
27044             David Sherwood  <david.sherwood@arm.com>
27046         * lra-constraints.c (process_alt_operands): Reject matched
27047         operands whose sizes aren't ordered.
27048         (match_reload): Refer to this check here.
27050 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27051             Alan Hayward  <alan.hayward@arm.com>
27052             David Sherwood  <david.sherwood@arm.com>
27054         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
27055         that the mode size is in the set {1, 2, 4, 8, 16}.
27057 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27058             Alan Hayward  <alan.hayward@arm.com>
27059             David Sherwood  <david.sherwood@arm.com>
27061         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
27062         Use plus_constant instead of gen_rtx_PLUS.
27064 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27065             Alan Hayward  <alan.hayward@arm.com>
27066             David Sherwood  <david.sherwood@arm.com>
27068         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
27069         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
27070         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
27071         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
27072         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
27073         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
27074         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
27075         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
27076         * config/i386/i386.c (ix86_push_rounding): ...this new function.
27077         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
27078         a poly_int64.
27079         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
27080         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
27081         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
27082         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
27083         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
27084         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
27085         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
27086         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
27087         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
27088         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
27089         function.
27090         * expr.c (emit_move_resolve_push): Treat the input and result
27091         of PUSH_ROUNDING as a poly_int64.
27092         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
27093         (emit_push_insn): Likewise.
27094         * lra-eliminations.c (mark_not_eliminable): Likewise.
27095         * recog.c (push_operand): Likewise.
27096         * reload1.c (elimination_effects): Likewise.
27097         * rtlanal.c (nonzero_bits1): Likewise.
27098         * calls.c (store_one_arg): Likewise.  Require the padding to be
27099         known at compile time.
27101 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27102             Alan Hayward  <alan.hayward@arm.com>
27103             David Sherwood  <david.sherwood@arm.com>
27105         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
27106         Use plus_constant instead of gen_rtx_PLUS.
27108 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27109             Alan Hayward  <alan.hayward@arm.com>
27110             David Sherwood  <david.sherwood@arm.com>
27112         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
27113         rather than an int.
27115 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27116             Alan Hayward  <alan.hayward@arm.com>
27117             David Sherwood  <david.sherwood@arm.com>
27119         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
27120         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
27121         via stack temporaries.  Treat the mode size as polynomial too.
27123 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27124             Alan Hayward  <alan.hayward@arm.com>
27125             David Sherwood  <david.sherwood@arm.com>
27127         * expr.c (expand_expr_real_2): When handling conversions involving
27128         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
27129         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
27130         as a poly_uint64 too.
27132 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27133             Alan Hayward  <alan.hayward@arm.com>
27134             David Sherwood  <david.sherwood@arm.com>
27136         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
27138 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27139             Alan Hayward  <alan.hayward@arm.com>
27140             David Sherwood  <david.sherwood@arm.com>
27142         * combine.c (can_change_dest_mode): Handle polynomial
27143         REGMODE_NATURAL_SIZE.
27144         * expmed.c (store_bit_field_1): Likewise.
27145         * expr.c (store_constructor): Likewise.
27146         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
27147         and polynomial REGMODE_NATURAL_SIZE.
27148         (gen_lowpart_common): Likewise.
27149         * reginfo.c (record_subregs_of_mode): Likewise.
27150         * rtlanal.c (read_modify_subreg_p): Likewise.
27152 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27153             Alan Hayward  <alan.hayward@arm.com>
27154             David Sherwood  <david.sherwood@arm.com>
27156         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
27157         numbers of elements.
27159 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27160             Alan Hayward  <alan.hayward@arm.com>
27161             David Sherwood  <david.sherwood@arm.com>
27163         * match.pd: Cope with polynomial numbers of vector elements.
27165 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27166             Alan Hayward  <alan.hayward@arm.com>
27167             David Sherwood  <david.sherwood@arm.com>
27169         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
27170         in a POINTER_PLUS_EXPR.
27172 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27173             Alan Hayward  <alan.hayward@arm.com>
27174             David Sherwood  <david.sherwood@arm.com>
27176         * omp-simd-clone.c (simd_clone_subparts): New function.
27177         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
27178         (ipa_simd_modify_function_body): Likewise.
27180 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27181             Alan Hayward  <alan.hayward@arm.com>
27182             David Sherwood  <david.sherwood@arm.com>
27184         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
27185         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
27186         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
27187         (expand_vector_condition, vector_element): Likewise.
27188         (subparts_gt): New function.
27189         (get_compute_type): Use subparts_gt.
27190         (count_type_subparts): Delete.
27191         (expand_vector_operations_1): Use subparts_gt instead of
27192         count_type_subparts.
27194 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27195             Alan Hayward  <alan.hayward@arm.com>
27196             David Sherwood  <david.sherwood@arm.com>
27198         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
27199         (vect_compile_time_alias): ...this new function.  Do the calculation
27200         on poly_ints rather than trees.
27201         (vect_prune_runtime_alias_test_list): Update call accordingly.
27203 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27204             Alan Hayward  <alan.hayward@arm.com>
27205             David Sherwood  <david.sherwood@arm.com>
27207         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
27208         numbers of units.
27209         (vect_schedule_slp_instance): Likewise.
27211 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27212             Alan Hayward  <alan.hayward@arm.com>
27213             David Sherwood  <david.sherwood@arm.com>
27215         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
27216         constant and extern definitions for variable-length vectors.
27217         (vect_get_constant_vectors): Note that the number of units
27218         is known to be constant.
27220 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27221             Alan Hayward  <alan.hayward@arm.com>
27222             David Sherwood  <david.sherwood@arm.com>
27224         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
27225         of units as polynomial.  Choose between WIDE and NARROW based
27226         on multiple_p.
27228 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27229             Alan Hayward  <alan.hayward@arm.com>
27230             David Sherwood  <david.sherwood@arm.com>
27232         * tree-vect-stmts.c (simd_clone_subparts): New function.
27233         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
27235 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27236             Alan Hayward  <alan.hayward@arm.com>
27237             David Sherwood  <david.sherwood@arm.com>
27239         * tree-vect-stmts.c (vectorizable_call): Treat the number of
27240         vectors as polynomial.  Use build_index_vector for
27241         IFN_GOMP_SIMD_LANE.
27243 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27244             Alan Hayward  <alan.hayward@arm.com>
27245             David Sherwood  <david.sherwood@arm.com>
27247         * tree-vect-stmts.c (get_load_store_type): Treat the number of
27248         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
27249         for variable-length vectors.
27250         (vectorizable_mask_load_store): Treat the number of units as
27251         polynomial, asserting that it is constant if the condition has
27252         already been enforced.
27253         (vectorizable_store, vectorizable_load): Likewise.
27255 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27256             Alan Hayward  <alan.hayward@arm.com>
27257             David Sherwood  <david.sherwood@arm.com>
27259         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
27260         of units as polynomial.  Punt if we can't tell at compile time
27261         which vector contains the final result.
27263 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27264             Alan Hayward  <alan.hayward@arm.com>
27265             David Sherwood  <david.sherwood@arm.com>
27267         * tree-vect-loop.c (vectorizable_induction): Treat the number
27268         of units as polynomial.  Punt on SLP inductions.  Use an integer
27269         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
27270         cast of such a series for variable-length floating-point
27271         reductions.
27273 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27274             Alan Hayward  <alan.hayward@arm.com>
27275             David Sherwood  <david.sherwood@arm.com>
27277         * tree.h (build_index_vector): Declare.
27278         * tree.c (build_index_vector): New function.
27279         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
27280         of units as polynomial, forcibly converting it to a constant if
27281         vectorizable_reduction has already enforced the condition.
27282         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
27283         to create a {1,2,3,...} vector.
27284         (vectorizable_reduction): Treat the number of units as polynomial.
27285         Choose vectype_in based on the largest scalar element size rather
27286         than the smallest number of units.  Enforce the restrictions
27287         relied on above.
27289 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27290             Alan Hayward  <alan.hayward@arm.com>
27291             David Sherwood  <david.sherwood@arm.com>
27293         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
27294         number of units as polynomial.
27296 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27297             Alan Hayward  <alan.hayward@arm.com>
27298             David Sherwood  <david.sherwood@arm.com>
27300         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
27301         * target.def (autovectorize_vector_sizes): Return the vector sizes
27302         by pointer, using vector_sizes rather than a bitmask.
27303         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
27304         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
27305         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
27306         Likewise.
27307         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
27308         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
27309         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
27310         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
27311         * omp-general.c (omp_max_vf): Likewise.
27312         * omp-low.c (omp_clause_aligned_alignment): Likewise.
27313         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
27314         * tree-vect-loop.c (vect_analyze_loop): Likewise.
27315         * tree-vect-slp.c (vect_slp_bb): Likewise.
27316         * doc/tm.texi: Regenerate.
27317         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
27318         to a poly_uint64.
27319         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
27320         the vector size as a poly_uint64 rather than an unsigned int.
27321         (current_vector_size): Change from an unsigned int to a poly_uint64.
27322         (get_vectype_for_scalar_type): Update accordingly.
27323         * tree.h (build_truth_vector_type): Take the size and number of
27324         units as a poly_uint64 rather than an unsigned int.
27325         (build_vector_type): Add a temporary overload that takes
27326         the number of units as a poly_uint64 rather than an unsigned int.
27327         * tree.c (make_vector_type): Likewise.
27328         (build_truth_vector_type): Take the number of units as a poly_uint64
27329         rather than an unsigned int.
27331 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27332             Alan Hayward  <alan.hayward@arm.com>
27333             David Sherwood  <david.sherwood@arm.com>
27335         * target.def (get_mask_mode): Take the number of units and length
27336         as poly_uint64s rather than unsigned ints.
27337         * targhooks.h (default_get_mask_mode): Update accordingly.
27338         * targhooks.c (default_get_mask_mode): Likewise.
27339         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
27340         * doc/tm.texi: Regenerate.
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         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
27347         * omp-general.c (omp_max_vf): Likewise.
27348         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
27349         (expand_omp_simd): Handle polynomial safelen.
27350         * omp-low.c (omplow_simd_context): Add a default constructor.
27351         (omplow_simd_context::max_vf): Change from int to poly_uint64.
27352         (lower_rec_simd_input_clauses): Update accordingly.
27353         (lower_rec_input_clauses): Likewise.
27355 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27356             Alan Hayward  <alan.hayward@arm.com>
27357             David Sherwood  <david.sherwood@arm.com>
27359         * tree-vectorizer.h (vect_nunits_for_cost): New function.
27360         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
27361         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
27362         (vect_analyze_slp_cost): Likewise.
27363         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
27364         (vect_model_load_cost): Likewise.
27366 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27367             Alan Hayward  <alan.hayward@arm.com>
27368             David Sherwood  <david.sherwood@arm.com>
27370         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
27371         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
27372         from an unsigned int * to a poly_uint64_pod *.
27373         (calculate_unrolling_factor): New function.
27374         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
27376 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27377             Alan Hayward  <alan.hayward@arm.com>
27378             David Sherwood  <david.sherwood@arm.com>
27380         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
27381         from an unsigned int to a poly_uint64.
27382         (_loop_vec_info::slp_unrolling_factor): Likewise.
27383         (_loop_vec_info::vectorization_factor): Change from an int
27384         to a poly_uint64.
27385         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
27386         (vect_get_num_vectors): New function.
27387         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
27388         (vect_get_num_copies): Use vect_get_num_vectors.
27389         (vect_analyze_data_ref_dependences): Change max_vf from an int *
27390         to an unsigned int *.
27391         (vect_analyze_data_refs): Change min_vf from an int * to a
27392         poly_uint64 *.
27393         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27394         than an unsigned HOST_WIDE_INT.
27395         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
27396         (vect_analyze_data_ref_dependence): Change max_vf from an int *
27397         to an unsigned int *.
27398         (vect_analyze_data_ref_dependences): Likewise.
27399         (vect_compute_data_ref_alignment): Handle polynomial vf.
27400         (vect_enhance_data_refs_alignment): Likewise.
27401         (vect_prune_runtime_alias_test_list): Likewise.
27402         (vect_shift_permute_load_chain): Likewise.
27403         (vect_supportable_dr_alignment): Likewise.
27404         (dependence_distance_ge_vf): Take the vectorization factor as a
27405         poly_uint64 rather than an unsigned HOST_WIDE_INT.
27406         (vect_analyze_data_refs): Change min_vf from an int * to a
27407         poly_uint64 *.
27408         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
27409         vfm1 as a poly_uint64 rather than an int.  Make the same change
27410         for the returned bound_scalar.
27411         (vect_gen_vector_loop_niters): Handle polynomial vf.
27412         (vect_do_peeling): Likewise.  Update call to
27413         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
27414         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
27415         be constant.
27416         * tree-vect-loop.c (vect_determine_vectorization_factor)
27417         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
27418         (vect_get_known_peeling_cost): Likewise.
27419         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
27420         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
27421         (vect_transform_loop): Likewise.  Use the lowest possible VF when
27422         updating the upper bounds of the loop.
27423         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
27424         rather than an int.
27425         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
27426         polynomial unroll factors.
27427         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
27428         (vect_make_slp_decision): Likewise.
27429         (vect_supported_load_permutation_p): Likewise, and polynomial
27430         vf too.
27431         (vect_analyze_slp_cost): Handle polynomial vf.
27432         (vect_slp_analyze_node_operations): Likewise.
27433         (vect_slp_analyze_bb_1): Likewise.
27434         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27435         than an unsigned HOST_WIDE_INT.
27436         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
27437         (vectorizable_load): Handle polynomial vf.
27438         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
27439         a poly_uint64.
27440         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
27442 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27443             Alan Hayward  <alan.hayward@arm.com>
27444             David Sherwood  <david.sherwood@arm.com>
27446         * match.pd: Handle bit operations involving three constants
27447         and try to fold one pair.
27449 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27451         * tree-vect-loop-manip.c: Include gimple-fold.h.
27452         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
27453         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
27454         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
27455         Add a path that uses a step of VF instead of 1, but disable it
27456         for now.
27457         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
27458         and niters_no_overflow parameters.  Update calls to
27459         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
27460         Create a new SSA name if the latter choses to use a ste other
27461         than zero, and return it via niters_vector_mult_vf_var.
27462         * tree-vect-loop.c (vect_transform_loop): Update calls to
27463         vect_do_peeling, vect_gen_vector_loop_niters and
27464         slpeel_make_loop_iterate_ntimes.
27465         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
27466         (vect_gen_vector_loop_niters): Update declarations after above changes.
27468 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
27470         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
27471         128-bit round to integer instructions.
27472         (ceil<mode>2): Likewise.
27473         (btrunc<mode>2): Likewise.
27474         (round<mode>2): Likewise.
27476 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27478         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
27479         unaligned VSX load/store on P8/P9.
27480         (expand_block_clear): Allow the use of unaligned VSX
27481         load/store on P8/P9.
27483 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27485         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
27486         New function.
27487         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
27488         swap associated with both a load and a store.
27490 2018-01-02  Andrew Waterman  <andrew@sifive.com>
27492         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
27493         * config/riscv/riscv.md (clear_cache): Use it.
27495 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
27497         * web.c: Remove out-of-date comment.
27499 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27501         * expr.c (fixup_args_size_notes): Check that any existing
27502         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
27503         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
27504         (emit_single_push_insn): ...here.
27506 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27508         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
27509         (const_vector_encoded_nelts): New function.
27510         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
27511         (const_vector_int_elt, const_vector_elt): Declare.
27512         * emit-rtl.c (const_vector_int_elt_1): New function.
27513         (const_vector_elt): Likewise.
27514         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
27515         of CONST_VECTOR_ELT.
27517 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27519         * expr.c: Include rtx-vector-builder.h.
27520         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
27521         directly on the tree encoding.
27522         (const_vector_from_tree): Likewise.
27523         * optabs.c: Include rtx-vector-builder.h.
27524         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
27525         sequence of "u" values.
27526         * vec-perm-indices.c: Include rtx-vector-builder.h.
27527         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
27528         directly on the vec_perm_indices encoding.
27530 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27532         * doc/rtl.texi (const_vector): Describe new encoding scheme.
27533         * Makefile.in (OBJS): Add rtx-vector-builder.o.
27534         * rtx-vector-builder.h: New file.
27535         * rtx-vector-builder.c: Likewise.
27536         * rtl.h (rtx_def::u2): Add a const_vector field.
27537         (CONST_VECTOR_NPATTERNS): New macro.
27538         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
27539         (CONST_VECTOR_DUPLICATE_P): Likewise.
27540         (CONST_VECTOR_STEPPED_P): Likewise.
27541         (CONST_VECTOR_ENCODED_ELT): Likewise.
27542         (const_vec_duplicate_p): Check for a duplicated vector encoding.
27543         (unwrap_const_vec_duplicate): Likewise.
27544         (const_vec_series_p): Check for a non-duplicated vector encoding.
27545         Say that the function only returns true for integer vectors.
27546         * emit-rtl.c: Include rtx-vector-builder.h.
27547         (gen_const_vec_duplicate_1): Delete.
27548         (gen_const_vector): Call gen_const_vec_duplicate instead of
27549         gen_const_vec_duplicate_1.
27550         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
27551         (gen_const_vec_duplicate): Use rtx_vector_builder.
27552         (gen_const_vec_series): Likewise.
27553         (gen_rtx_CONST_VECTOR): Likewise.
27554         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
27555         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27556         Build a new vector rather than modifying a CONST_VECTOR in-place.
27557         (handle_special_swappables): Update call accordingly.
27558         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
27559         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27560         Build a new vector rather than modifying a CONST_VECTOR in-place.
27561         (handle_special_swappables): Update call accordingly.
27563 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27565         * simplify-rtx.c (simplify_const_binary_operation): Use
27566         CONST_VECTOR_ELT instead of XVECEXP.
27568 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27570         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
27571         the selector elements to be different from the data elements
27572         if the selector is a VECTOR_CST.
27573         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
27574         ssizetype for the selector.
27576 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27578         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
27579         before testing each element individually.
27580         * tree-vect-generic.c (lower_vec_perm): Likewise.
27582 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27584         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
27585         * selftest-run-tests.c (selftest::run_tests): Call it.
27586         * vector-builder.h (vector_builder::operator ==): New function.
27587         (vector_builder::operator !=): Likewise.
27588         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
27589         (vec_perm_indices::all_from_input_p): New function.
27590         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27591         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
27592         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
27593         instead of reading the VECTOR_CST directly.  Detect whether both
27594         vector inputs are the same before constructing the vec_perm_indices,
27595         and update the number of inputs argument accordingly.  Use the
27596         utility functions added above.  Only construct sel2 if we need to.
27598 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27600         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
27601         the broadcast of the low byte.
27602         (expand_mult_highpart): Use an explicit encoding for the permutes.
27603         * optabs-query.c (can_mult_highpart_p): Likewise.
27604         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
27605         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27606         (vectorizable_bswap): Likewise.
27607         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
27608         explicit encoding for the power-of-2 permutes.
27609         (vect_permute_store_chain): Likewise.
27610         (vect_grouped_load_supported): Likewise.
27611         (vect_permute_load_chain): Likewise.
27613 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27615         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
27616         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
27617         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
27618         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27619         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
27620         (vect_gen_perm_mask_any): Likewise.
27622 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27624         * int-vector-builder.h: New file.
27625         * vec-perm-indices.h: Include int-vector-builder.h.
27626         (vec_perm_indices): Redefine as an int_vector_builder.
27627         (auto_vec_perm_indices): Delete.
27628         (vec_perm_builder): Redefine as a stand-alone class.
27629         (vec_perm_indices::vec_perm_indices): New function.
27630         (vec_perm_indices::clamp): Likewise.
27631         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
27632         (vec_perm_indices::new_vector): New function.
27633         (vec_perm_indices::new_expanded_vector): Update for new
27634         vec_perm_indices class.
27635         (vec_perm_indices::rotate_inputs): New function.
27636         (vec_perm_indices::all_in_range_p): Operate directly on the
27637         encoded form, without computing elided elements.
27638         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
27639         encoding.  Update for new vec_perm_indices class.
27640         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
27641         the given vec_perm_builder.
27642         (expand_vec_perm_var): Update vec_perm_builder constructor.
27643         (expand_mult_highpart): Use vec_perm_builder instead of
27644         auto_vec_perm_indices.
27645         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
27646         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
27647         or double series encoding as appropriate.
27648         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
27649         vec_perm_indices instead of auto_vec_perm_indices.
27650         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27651         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27652         (vect_permute_store_chain): Likewise.
27653         (vect_grouped_load_supported): Likewise.
27654         (vect_permute_load_chain): Likewise.
27655         (vect_shift_permute_load_chain): Likewise.
27656         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27657         (vect_transform_slp_perm_load): Likewise.
27658         (vect_schedule_slp_instance): Likewise.
27659         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27660         (vectorizable_mask_load_store): Likewise.
27661         (vectorizable_bswap): Likewise.
27662         (vectorizable_store): Likewise.
27663         (vectorizable_load): Likewise.
27664         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
27665         vec_perm_indices instead of auto_vec_perm_indices.  Use
27666         tree_to_vec_perm_builder to read the vector from a tree.
27667         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
27668         vec_perm_builder instead of a vec_perm_indices.
27669         (have_whole_vector_shift): Use vec_perm_builder and
27670         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
27671         truncation to calc_vec_perm_mask_for_shift.
27672         (vect_create_epilog_for_reduction): Likewise.
27673         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
27674         from auto_vec_perm_indices to vec_perm_indices.
27675         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27676         instead of changing individual elements.
27677         (aarch64_vectorize_vec_perm_const): Use new_vector to install
27678         the vector in d.perm.
27679         * config/arm/arm.c (expand_vec_perm_d::perm): Change
27680         from auto_vec_perm_indices to vec_perm_indices.
27681         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27682         instead of changing individual elements.
27683         (arm_vectorize_vec_perm_const): Use new_vector to install
27684         the vector in d.perm.
27685         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
27686         Update vec_perm_builder constructor.
27687         (rs6000_expand_interleave): Likewise.
27688         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
27689         (rs6000_expand_interleave): Likewise.
27691 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27693         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
27694         to qimode could truncate the indices.
27695         * optabs.c (expand_vec_perm_var): Likewise.
27697 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27699         * Makefile.in (OBJS): Add vec-perm-indices.o.
27700         * vec-perm-indices.h: New file.
27701         * vec-perm-indices.c: Likewise.
27702         * target.h (vec_perm_indices): Replace with a forward class
27703         declaration.
27704         (auto_vec_perm_indices): Move to vec-perm-indices.h.
27705         * optabs.h: Include vec-perm-indices.h.
27706         (expand_vec_perm): Delete.
27707         (selector_fits_mode_p, expand_vec_perm_var): Declare.
27708         (expand_vec_perm_const): Declare.
27709         * target.def (vec_perm_const_ok): Replace with...
27710         (vec_perm_const): ...this new hook.
27711         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
27712         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
27713         * doc/tm.texi: Regenerate.
27714         * optabs.def (vec_perm_const): Delete.
27715         * doc/md.texi (vec_perm_const): Likewise.
27716         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
27717         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
27718         expand_vec_perm for constant permutation vectors.  Assert that
27719         the mode of variable permutation vectors is the integer equivalent
27720         of the mode that is being permuted.
27721         * optabs-query.h (selector_fits_mode_p): Declare.
27722         * optabs-query.c: Include vec-perm-indices.h.
27723         (selector_fits_mode_p): New function.
27724         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
27725         is defined, instead of checking whether the vec_perm_const_optab
27726         exists.  Use targetm.vectorize.vec_perm_const instead of
27727         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
27728         fit in the vector mode before using a variable permute.
27729         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
27730         vec_perm_indices instead of an rtx.
27731         (expand_vec_perm): Replace with...
27732         (expand_vec_perm_const): ...this new function.  Take the selector
27733         as a vec_perm_indices rather than an rtx.  Also take the mode of
27734         the selector.  Update call to shift_amt_for_vec_perm_mask.
27735         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
27736         Use vec_perm_indices::new_expanded_vector to expand the original
27737         selector into bytes.  Check whether the indices fit in the vector
27738         mode before using a variable permute.
27739         (expand_vec_perm_var): Make global.
27740         (expand_mult_highpart): Use expand_vec_perm_const.
27741         * fold-const.c: Includes vec-perm-indices.h.
27742         * tree-ssa-forwprop.c: Likewise.
27743         * tree-vect-data-refs.c: Likewise.
27744         * tree-vect-generic.c: Likewise.
27745         * tree-vect-loop.c: Likewise.
27746         * tree-vect-slp.c: Likewise.
27747         * tree-vect-stmts.c: Likewise.
27748         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
27749         Delete.
27750         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
27751         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
27752         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
27753         (aarch64_vectorize_vec_perm_const): ...this new function.
27754         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27755         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27756         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
27757         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
27758         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27759         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27760         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
27761         into...
27762         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
27763         check for NEON modes.
27764         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
27765         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
27766         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
27767         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
27768         into...
27769         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
27770         the old VEC_PERM_CONST conditions.
27771         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
27772         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
27773         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
27774         (ia64_vectorize_vec_perm_const_ok): Merge into...
27775         (ia64_vectorize_vec_perm_const): ...this new function.
27776         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
27777         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
27778         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
27779         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
27780         * config/mips/mips.c (mips_expand_vec_perm_const)
27781         (mips_vectorize_vec_perm_const_ok): Merge into...
27782         (mips_vectorize_vec_perm_const): ...this new function.
27783         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
27784         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
27785         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
27786         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
27787         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
27788         (rs6000_expand_vec_perm_const): Delete.
27789         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
27790         Delete.
27791         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27792         (altivec_expand_vec_perm_const_le): Take each operand individually.
27793         Operate on constant selectors rather than rtxes.
27794         (altivec_expand_vec_perm_const): Likewise.  Update call to
27795         altivec_expand_vec_perm_const_le.
27796         (rs6000_expand_vec_perm_const): Delete.
27797         (rs6000_vectorize_vec_perm_const_ok): Delete.
27798         (rs6000_vectorize_vec_perm_const): New function.
27799         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27800         an element count and rtx array.
27801         (rs6000_expand_extract_even): Update call accordingly.
27802         (rs6000_expand_interleave): Likewise.
27803         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
27804         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
27805         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
27806         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
27807         (rs6000_expand_vec_perm_const): Delete.
27808         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27809         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27810         (altivec_expand_vec_perm_const_le): Take each operand individually.
27811         Operate on constant selectors rather than rtxes.
27812         (altivec_expand_vec_perm_const): Likewise.  Update call to
27813         altivec_expand_vec_perm_const_le.
27814         (rs6000_expand_vec_perm_const): Delete.
27815         (rs6000_vectorize_vec_perm_const_ok): Delete.
27816         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
27817         reference to the SPE evmerge intructions.
27818         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27819         an element count and rtx array.
27820         (rs6000_expand_extract_even): Update call accordingly.
27821         (rs6000_expand_interleave): Likewise.
27822         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
27823         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
27824         new function.
27825         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27827 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27829         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
27830         vector mode and that that mode matches the mode of the data
27831         being permuted.
27832         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
27833         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
27834         directly using expand_vec_perm_1 when forcing selectors into
27835         registers.
27836         (expand_vec_perm_var): New function, split out from expand_vec_perm.
27838 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27840         * optabs-query.h (can_vec_perm_p): Delete.
27841         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
27842         * optabs-query.c (can_vec_perm_p): Split into...
27843         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
27844         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
27845         particular selector is valid.
27846         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27847         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27848         (vect_grouped_load_supported): Likewise.
27849         (vect_shift_permute_load_chain): Likewise.
27850         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27851         (vect_transform_slp_perm_load): Likewise.
27852         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27853         (vectorizable_bswap): Likewise.
27854         (vect_gen_perm_mask_checked): Likewise.
27855         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
27856         implementations of variable permutation vectors into account
27857         when deciding which selector to use.
27858         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
27859         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
27860         with a false third argument.
27861         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
27862         to test whether the constant selector is valid and can_vec_perm_var_p
27863         to test whether a variable selector is valid.
27865 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27867         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
27868         * optabs-query.c (can_vec_perm_p): Likewise.
27869         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
27870         instead of vec_perm_indices.
27871         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
27872         (vect_gen_perm_mask_checked): Likewise,
27873         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
27874         (vect_gen_perm_mask_checked): Likewise,
27876 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27878         * optabs-query.h (qimode_for_vec_perm): Declare.
27879         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
27880         (qimode_for_vec_perm): ...this new function.
27881         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
27883 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27885         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
27886         does not have a conditional at the top.
27888 2018-01-02  Richard Biener  <rguenther@suse.de>
27890         * ipa-inline.c (big_speedup_p): Fix expression.
27892 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
27894         PR target/81616
27895         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
27896         for generic 4->6.
27898 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
27900         PR target/81616
27901         Generic tuning.
27902         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
27903         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
27904         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
27905         cond_taken_branch_cost 3->4.
27907 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
27909         PR tree-optimization/83581
27910         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
27911         TODO_cleanup_cfg if any changes have been made.
27913         PR middle-end/83608
27914         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
27915         convert_modes if target mode has the right side, but different mode
27916         class.
27918         PR middle-end/83609
27919         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
27920         last argument when extracting from CONCAT.  If either from_real or
27921         from_imag is NULL, use expansion through memory.  If result is not
27922         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
27923         the parts directly to inner mode, if even that fails, use expansion
27924         through memory.
27926         PR middle-end/83623
27927         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
27928         check for bswap in mode rather than HImode and use that in expand_unop
27929         too.
27931 Copyright (C) 2018 Free Software Foundation, Inc.
27933 Copying and distribution of this file, with or without modification,
27934 are permitted in any medium without royalty provided the copyright
27935 notice and this notice are preserved.