gcc/ChangeLog:
[official-gcc.git] / gcc / ChangeLog
blob67b39211811a1b641b3fd94ed0686d41f31081dc
1 2018-10-11  Martin Sebor  <msebor@redhat.com>
3         * doc/extend.texi (attribute packed): Correct typos.
5 2018-10-11  Martin Sebor  <msebor@redhat.com>
7         * doc/extend.texi (attribute flatten): Mention interaction with
8         noinline.
10 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
12         PR target/87156
13         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
14         Set new_decl virtual flag to zero.
16 2018-10-11  Martin Sebor  <msebor@redhat.com>
18         PR middle-end/87593
19         * doc/extend.texi (attribute format_arg): Discuss using multiple
20         attributes on a single function.
22 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
24         PR tree-optimization/86829
25         * match.pd (sin (atan (x))): New simplification rules.
26         (cos (atan (x))): Likewise.
27         * real.c (build_sinatan_real): New function.
28         * real.h (build_sinatan_real): Prototype.
30 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
32         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
33         function.
34         (fold_mergeeo_helper): New helper function.
35         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
36         intrinsics.  Correct some whitespace indentation issues.
38 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
40         PR target/87511
41         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
42         Use HOST_WIDE_INT_1U for shift.
44 2018-10-11  Doug Rupp  <rupp@adacore.com>
45             Olivier Hainque  <hainque@adacore.com>
47         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
48         Pass --relax to the linker for RTPs.
49         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
51 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
52             Jan Hubicka  <jh@suse.cz>
53             Martin Jambor  <mjambor@suse.cz>
55         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
56         the same elements are repeated rather than printing all of them.
57         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
58         "repeated" elements.
59         * read-rtl-function.c (test_loading_repeat): New function.
60         (read_rtl_function_c_tests): Call test_loading_repeat.
61         * rtl-tests.c (test_dumping_repeat): New function.
62         (rtl_tests_c_tests): Call test_dumping_repeat.
64 2018-10-11  Richard Biener  <rguenther@suse.de>
66         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
67         bdver?_cost): Unify to ...
68         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
69         * config/i386/i386.c (processor_cost_table): Adjust.
71 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
73         PR middle-end/87574
74         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
75         the thunk when expanding to GIMPLE.
77 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
79         * varasm.c (mergeable_string_section): Don't try to move zero-length
80         strings to the merge section.
82 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
84         PR target/87573
85         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
87 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
89         PR target/87550
90         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
91         to special_args set.
93 2018-10-10  Richard Biener  <rguenther@suse.de>
95         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
96         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
97         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
98         and recursing and pattern terminating the recursion on SSE
99         vector width using ix86_expand_reduc.
100         (reduc_sminmax_scal_<mode>): Split into part reducing to half
101         width and recursing and SSE2 vector variant doing the final
102         reduction with ix86_expand_reduc.
103         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
104         with terminating the recursion at AVX level, splitting that
105         to SSE there.
107 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
109         * genmatch.c (error_cb): Rename to...
110         (diagnostic_cb): ...this, converting int params to enums.
111         (fatal_at): Update for renaming.
112         (warning_at): Likewise.
113         (main): Likewise.
114         * input.c (selftest::ebcdic_execution_charset::apply):
115         Update for renaming of...
116         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
117         to...
118         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
119         converting level and reason to enums.
120         (class selftest::lexer_error_sink): Rename to...
121         (class selftest::lexer_test_options): ...this, renaming field
122         "m_errors" to "m_diagnostics".
123         (selftest::lexer_test_options::apply): Update for renaming of...
124         (selftest::lexer_test_options::on_error): ...this, renaming to...
125         (selftest::lexer_test_options::on_diagnostic): ...this
126         converting level and reason to enums.
127         (selftest::test_lexer_string_locations_raw_string_unterminated):
128         Update for renamings.
129         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
130         "reason".
132 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
134         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
135         * config/rs6000/pmmintrin.h: New file.
137 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
139         PR tree-optimization/86659
140         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
142 2018-10-09  Richard Biener  <rguenther@suse.de>
144         PR tree-optimization/63155
145         * tree-ssa-structalias.c: Include tree-ssa.h.
146         (get_constraint_for_ssa_var): For undefs return nothing_id.
147         (find_func_aliases): Cleanup PHI handling.
149 2018-10-09  Richard Biener  <rguenther@suse.de>
151         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
152         replacements.
154 2018-10-09  Martin Liska  <mliska@suse.cz>
156         * asan.c (asan_emit_stack_protection): If a stack variable
157         is located in a same file as current function, then emit
158         line info into variable definition string.
160 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
162         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
163         information.
165 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
167         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
168         on the thunk.
170 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
172         PR tree-optimization/86659
173         * gimple-match.h (struct gimple_match_op): Add reverse field.
174         (gimple_match_op::set_op): New overloaded method.
175         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
176         the REF_REVERSE_STORAGE_ORDER flag on the value.
177         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
178         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
179         
180 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
182         PR middle-end/63155
183         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
184         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
186 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
188         PR target/87517
189         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
190         Defined with __builtin_ia32_vfmaddsubpd512_mask.
192 2018-10-08  Richard Biener  <rguenther@suse.de>
194         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
195         cost the same as AVX128 ones.
197 2018-10-08  Paul Koning  <ni1d@arrl.net>
199         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
200         (expand_block_move): New function.
201         * config/pdp11/pdp11.c (output_block_move): Remove.
202         (expand_block_move): New function.
203         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
204         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
205         (*movmemhi1): Remove.
207 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
209         * config/s390/2827.md: Increase latencies for some FP instructions.
211 2018-10-08  Richard Biener  <rguenther@suse.de>
213         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
214         Open a dump scope.
215         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
216         * tree-vectorizer.h (dump_stmt_cost): Adjust.
217         (add_stmt_cost): Dump return value of the hook.
219 2018-10-08  Richard Biener  <rguenther@suse.de>
221         PR tree-optimization/63155
222         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
223         (ssa_propagation_engine::ssa_propagate): Remove redundant
224         bitmap bit clearing.
226 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
228         PR rtl-optimization/86939
229         PR rtl-optimization/87479
230         * ira.h (non_conflicting_reg_copy_p): New prototype.
231         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
232         (make_hard_regno_dead): Don't add conflicts for register
233         ignore_reg_for_conflicts.
234         (make_object_dead): Likewise.
235         (non_conflicting_reg_copy_p): New function.
236         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
237         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
238         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
239         (make_hard_regno_dead): Don't add conflicts for register
240         ignore_reg_for_conflicts.  Remove special conflict handling of
241         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
242         check_pic_pseudo_p and update callers.
243         (mark_pseudo_dead): Don't add conflicts for register
244         ignore_reg_for_conflicts.
245         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
247 2018-10-05  Andrew Waterman  <andrew@sifive.com>
248             Jim Wilson  <jimw@sifive.com>
250         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
251         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
252         new pattern using HONOR_SNANS that emits one extra instruction.
254 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
256         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
257         patterns): Merge SI and DI patterns to a GPR pattern.
258         (unnamed define_insn and define_split for record form of that): Merge
259         to a single define_insn_and_split pattern.
261 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
263         PR c++/56856
264         * input.c (expand_location_to_spelling_point): Add param "aspect"
265         and use rather than hardcoding LOCATION_ASPECT_CARET.
266         (get_substring_ranges_for_loc): Handle the case of a single token
267         within a macro expansion.
268         * input.h (expand_location_to_spelling_point): Add "aspect" param,
269         defaulting to LOCATION_ASPECT_CARET.
271 2018-10-05  Paul Koning  <ni1d@arrl.net>
273         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
274         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
275         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
276         (pdp11_guard_type): New function.
278 2018-10-05  Paul Koning  <ni1d@arrl.net>
280         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
281         * config/pdp11/pdp11.opt (mfloat32): Remove.
282         (mfloat64): Remove.
283         * doc/invoke.texi (pdp11 -mfloat32): Remove:
284         (pdp11 -mfloat64): Remove.
286 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
288         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
289         (*cmp<mode>_cc_i387): Ditto.
290         (*cmpu<mode>_cc_i387): Ditto.
291         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
292         * config/i386/i386.c (ix86_expand_fp_compare): Remove
293         "scratch" argument.
294         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
295         Emit x86_sahf_1 pattern.
296         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
297         (ix86_expand_carry_flag_compare): Ditto.
299 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
301         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
302         to reg_or_0_operand.  Add "C" constraint.
303         (*cmpxf_cc_i387): Ditto.
304         (*cmp<mode>_i387): Change operand 2 predicate
305         to nonimm_or_0_operand.  Add "C" constraint.
306         (*cmp<mode>_cc_i387): Ditto.
307         (*cmp<mode>_0_i387): Remove insn pattern.
308         (*cmp<mode>_0_cc_i387): Ditto.
310 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
312         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
313         * config/i386/predicates.md (nonimm_or_0_operand): Rename
314         from vector_move_operand.  Update all uses.
316 2018-10-05  Martin Sebor  <msebor@redhat.com>
318         PR tree-optimization/87490
319         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
320         consistently.
322 2018-10-05  Richard Biener  <rguenther@suse.de>
324         PR tree-optimization/63155
325         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
326         vertical space in dumpfiles.
327         * tree-ssa-propagate.h
328         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
329         * tree-ssa-propagate.c (cfg_blocks_back): New global.
330         (ssa_edge_worklist_back): Likewise.
331         (curr_order): Likewise.
332         (cfg_blocks_get): Remove abstraction.
333         (cfg_blocks_add): Likewise.
334         (cfg_blocks_empty_p): Likewise.
335         (add_ssa_edge): Add to current or next worklist based on
336         RPO index.
337         (add_control_edge): Likewise.
338         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
339         into ...
340         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
341         iteration from CFG and SSA edge worklist so we process
342         everything in RPO order, prioritizing forward progress
343         over iteration.
344         (ssa_prop_init): Allocate new worklists, do not dump
345         immediate uses.
346         (ssa_prop_fini): Free new worklists.
348 2018-10-05  Richard Biener  <rguenther@suse.de>
350         * tree-core.h (tree_block::abstract_flag): Remove.
351         (tree_block::block_num): Make full 32bits.
352         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
353         * tree.h (BLOCK_ABSTRACT): Remove.
354         * dwarf2out.c (gen_lexical_block_die): Remove dead code
355         resulting from BLOCK_ABSTRACT being always false.
356         (gen_inlined_subroutine_die): Likewise.
357         (gen_block_die): Likewise.
358         * tree.c (block_ultimate_origin): Likewise.
359         * tree-pretty-print.c (dump_block_node): Remove code dealing
360         with BLOCK_ABSTRACT.
361         * tree-ssa-live.c (dump_scope_block): Likewise.
362         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
363         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
365 2018-10-05   Richard Biener  <rguenther@suse.de>
367         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
368         is asked for initialize mode to the component mode of the
369         vector type.
371 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
373         PR target/87522
374         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
375         assembler for -mavx.
376         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
378 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
380         PR target/87509
381         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
382         RS6000_BTM_DFP.
383         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
384         to be DImode.  When using mffscrn, force the operand to a register.
386 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
388         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
389         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
390         X87MODEF mode iterator.
391         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
392         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
393         X87MODEF mode iterator.
395 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
397         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
398         -Wno-prio-ctor-dtor.
400 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
402         * Makefile.in (OBJS): Add opt-problem.o.
403         * dump-context.h: Include "selftest.h.
404         (selftest::temp_dump_context): New forward decl.
405         (class dump_context): Make friend of class
406         selftest::temp_dump_context.
407         (dump_context::dump_loc_immediate): New decl.
408         (class dump_pretty_printer): Move here from dumpfile.c.
409         (class temp_dump_context): Move to namespace selftest.
410         (temp_dump_context::temp_dump_context): Add param
411         "forcibly_enable_dumping".
412         (selftest::verify_dumped_text):
413         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
414         (selftest::verify_item):
415         (ASSERT_IS_TEXT): Move here from dumpfile.c.
416         (ASSERT_IS_TREE): Likewise.
417         (ASSERT_IS_GIMPLE): Likewise.
418         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
419         to...
420         (dump_context::dump_loc_immediate): ...this new function.
421         (class dump_pretty_printer): Move to dump-context.h.
422         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
423         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
424         (temp_dump_context::temp_dump_context): Move to "selftest"
425         namespace.  Add param "forcibly_enable_dumping", and use it to
426         conditionalize the use of m_pp;
427         (selftest::verify_dumped_text): Make non-static.
428         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
429         (selftest::verify_item): Make non-static.
430         (ASSERT_IS_TEXT): Move to dump-context.h.
431         (ASSERT_IS_TREE): Likewise.
432         (ASSERT_IS_GIMPLE): Likewise.
433         (selftest::test_capture_of_dump_calls): Pass "true" for new
434         param of temp_dump_context.
435         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
436         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
437         TDF_COMPARE_DEBUG.
438         * opt-problem.cc: New file.
439         * opt-problem.h: New file.
440         * optinfo-emit-json.cc
441         (selftest::test_building_json_from_dump_calls): Pass "true" for
442         new param of temp_dump_context.
443         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
444         (optinfo::emit_for_opt_problem): New function.
445         (optinfo::emit): Clarity which emit_item is used.
446         * optinfo.h (optinfo::get_dump_location): New accessor.
447         (optinfo::emit_for_opt_problem): New decl.
448         (optinfo::emit): Make const.
449         * selftest-run-tests.c (selftest::run_tests): Call
450         selftest::opt_problem_cc_tests.
451         * selftest.h (selftest::opt_problem_cc_tests): New decl.
452         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
453         bool to opt_result, converting fprintf messages to
454         opt_result::failure_at calls.  Add "stmt" param for use by the
455         failure_at calls.
456         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
457         (runtime_alias_check_p): Convert return type from bool to
458         opt_result, converting dump_printf calls to
459         opt_result::failure_at, using the statement DDR_A for their
460         location.
461         (find_data_references_in_stmt): Convert return type from bool to
462         opt_result, converting "return false" to opt_result::failure_at
463         with a new message.
464         * tree-data-ref.h: Include "opt-problem.h".
465         (dr_analyze_innermost): Convert return type from bool to opt_result,
466         and add a const gimple * param.
467         (find_data_references_in_stmt): Convert return type from bool to
468         opt_result.
469         (runtime_alias_check_p): Likewise.
470         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
471         dr_analyze_innermost.
472         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
473         Convert return type from bool to opt_result, adding a message for
474         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
475         (vect_analyze_data_ref_dependence): Convert return type from bool
476         to opt_result.  Change sense of return type from "false"
477         effectively meaning "no problems" to "false" meaning a problem,
478         so that "return false" becomes "return opt_result::success".
479         Convert "return true" calls to opt_result::failure_at, using
480         the location of statement A rather than vect_location.
481         (vect_analyze_data_ref_dependences): Convert return type from bool
482         to opt_result.
483         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
484         calls to opt_result::failure_at, using the stmt location rather
485         than vect_location.
486         (vect_verify_datarefs_alignment): Convert return type from bool
487         to opt_result.
488         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
489         into multiple more-tightly-scoped copies.
490         (vect_analyze_data_refs_alignment): Convert return type from bool
491         to opt_result.
492         (vect_analyze_data_ref_accesses): Likewise, converting a
493         "return false" to a "return opt_result::failure_at", adding a
494         new message.
495         (vect_prune_runtime_alias_test_list): Convert return type from
496         bool to opt_result, converting dump_printf_loc to
497         opt_result::failure_at.  Add a %G to show the pertinent statement,
498         and use the stmt's location rather than vect_location.
499         (vect_find_stmt_data_reference): Convert return type from
500         bool to opt_result, converting dump_printf_loc to
501         opt_result::failure_at, using stmt's location.
502         (vect_analyze_data_refs):  Convert return type from bool to
503         opt_result.  Convert "return false" to "return
504         opt_result::failure_at", adding messages as needed.
505         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
506         type from bool to opt_result.
507         (vect_determine_vf_for_stmt): Likewise.
508         (vect_determine_vectorization_factor): Likewise, converting
509         dump_printf_loc to opt_result::failure_at, using location of phi
510         rather than vect_location.
511         (vect_analyze_loop_form_1): Convert return type from bool to
512         opt_result, converting dump_printf_loc calls, retaining the use of
513         vect_location.
514         (vect_analyze_loop_form): Convert return type from loop_vec_info
515         to opt_loop_vec_info.
516         (vect_analyze_loop_operations): Convert return type from bool to
517         opt_result, converting dump_printf_loc calls, using the location
518         of phi/stmt rather than vect_location where available.  Convert
519         various "return false" to "return opt_result::failure_at" with
520         "unsupported phi" messages.
521         (vect_get_datarefs_in_loop): Convert return type from bool to
522         opt_result.  Add a message for the
523         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
524         (vect_analyze_loop_2): Convert return type from bool to
525         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
526         each "goto again;", adding new messages where needed.
527         Add "unsupported grouped {store|load}" messages.
528         (vect_analyze_loop): Convert return type from loop_vec_info to
529         opt_loop_vec_info.
530         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
531         bool to opt_result.
532         * tree-vect-stmts.c (process_use): Likewise, converting
533         dump_printf_loc call and using stmt location, rather than
534         vect_location.
535         (vect_mark_stmts_to_be_vectorized): Likeise.
536         (vect_analyze_stmt): Likewise, adding a %G.
537         (vect_get_vector_types_for_stmt): Convert return type from bool to
538         opt_result, converting dump_printf_loc calls and using stmt
539         location, rather than vect_location.
540         (vect_get_mask_type_for_stmt): Convert return type from tree to
541         opt_tree, converting dump_printf_loc calls and using stmt location.
542         * tree-vectorizer.c: Include "opt-problem.h.
543         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
544         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
545         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
546         enabled, use it to report at the top level "couldn't vectorize
547         loop" followed by the problem.
548         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
549         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
550         to opt_result.
551         (vect_analyze_stmt): Likewise.
552         (vect_get_vector_types_for_stmt): Likewise.
553         (tree vect_get_mask_type_for_stmt): Likewise.
554         (vect_analyze_data_ref_dependences): Likewise.
555         (vect_enhance_data_refs_alignment): Likewise.
556         (vect_analyze_data_refs_alignment): Likewise.
557         (vect_verify_datarefs_alignment): Likewise.
558         (vect_analyze_data_ref_accesses): Likewise.
559         (vect_prune_runtime_alias_test_list): Likewise.
560         (vect_find_stmt_data_reference): Likewise.
561         (vect_analyze_data_refs): Likewise.
562         (vect_analyze_loop): Convert return type from loop_vec_info to
563         opt_loop_vec_info.
564         (vect_analyze_loop_form): Likewise.
565         (vect_analyze_slp): Convert return type from bool to opt_result.
567 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
569         * doc/invoke.texi (-fopt-info): Document new "internals"
570         sub-option.
571         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
572         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
573         MSG_ALL_KINDS.
574         (optinfo_verbosity_options): Add "internals".
575         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
576         (dump_context::apply_dump_filter_p): New member function.
577         (dump_context::dump_loc): Use apply_dump_filter_p rather than
578         explicitly masking the dump_kind.
579         (dump_context::begin_scope): Increment the scope depth first.  Use
580         apply_dump_filter_p rather than explicitly masking the dump_kind.
581         (dump_context::emit_item): Use apply_dump_filter_p rather than
582         explicitly masking the dump_kind.
583         (dump_dec): Likewise.
584         (dump_hex): Likewise.
585         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
586         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
587         (opt_info_switch_p): Update handling of default
588         MSG_OPTIMIZED_LOCATIONS to cope with default of
589         MSG_PRIORITY_USER_FACING.
590         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
591         masking the dump_kind.
592         (selftest::test_capture_of_dump_calls): Update test_dump_context
593         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
594         than MSG_ALL.  Generalize scope test to be run at all four
595         combinations of with/without MSG_PRIORITY_USER_FACING and
596         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
597         for each of the two values.
598         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
599         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
600         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
601         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
602         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
603         with MSG_PRIORITY_*.
604         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
605         dump messages as MSG_PRIORITY_USER_FACING.
606         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
607         about the interaction with MSG_PRIORITY_*.
609 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
611         * varasm.c (output_constant): Add new parameter merge_strings.
612         Make strings properly zero terminated in merge string sections.
613         (mergeable_string_section): Don't fail if the last char is non-zero.
614         (assemble_variable_contents): Handle merge string sections.
615         (assemble_variable): Likewise.
616         (assemble_constant_contents): Likewise.
617         (output_constant_def_contents): Likewise.
618         (output_constructor_array_range,
619         output_constructor_regular_field): Adjust call to output_constant.
620         (output_object_block): Adjust call to assemble_constant_contents
621         and assemble_variable_contents.
623 2018-10-04  Martin Liska  <mliska@suse.cz>
625         PR c/87483
626         * cgraphunit.c (process_function_and_variable_attributes):
627         Warn about a function with alias attribute and a body.
629 2018-10-04  Martin Liska  <mliska@suse.cz>
631         PR ipa/82625
632         * multiple_target.c (redirect_to_specific_clone): New function.
633         (ipa_target_clone): Use it.
634         * tree-inline.c: Fix comment.
636 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
638         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
639         fields.
640         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
641         (gcc::dump_manager::register_pass): New member function, adapted
642         from loop body in gcc::pass_manager::register_pass, adding a
643         call to update_dfi_for_opt_info.
644         (gcc::dump_manager::opt_info_enable_passes): Store the
645         -fopt-info options into the new fields.  Move the loop
646         bodies into...
647         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
648         function.
649         * dumpfile.h (struct opt_pass): New forward decl.
650         (gcc::dump_manager::register_pass): New decl.
651         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
652         (class gcc::dump_manager): Add fields "m_optgroup_flags",
653         "m_optinfo_flags", and "m_optinfo_filename".
654         * passes.c (gcc::pass_manager::register_pass): Move all of the
655         dump-handling code to gcc::dump_manager::register_pass.
657 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
659         PR rtl-optimization/87466
660         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
661         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
662         * doc/tm.texi: Regenerate.
663         * ira-lives.c (process_bb_node_lives): Use the new target hook.
664         * lra-lives.c (process_bb_lives): Likewise.
665         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
666         Define.
668 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
670         * params.c (add_params): Fix initialization.
672 2018-10-04  Martin Liska  <mliska@suse.cz>
674         PR gcov-profile/84107
675         * tree-profile.c (init_ic_make_global_vars):
676         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
677         Come up with new ic_tuple* variables.  Emit
678         __gcov_indirect_call{,_topn} variables.
679         (gimple_gen_ic_profiler): Access the variable
680         and emit gimple.
681         (gimple_gen_ic_func_profiler): Access
682         __gcov_indirect_call.callee field.
683         (gimple_init_gcov_profiler): Use ptr_type_node.
684         * value-prof.c (gimple_ic): Use ptr_type_node.
686 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
688         PR tree-optimization/85787
689         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
690         into this function and add support for detecting multiple phis.
691         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
693 2018-10-04  Martin Liska  <mliska@suse.cz>
695         PR ipa/87491
696         * ipa-inline.c (inline_to_all_callers_1):
697         Call ultimate_alias_target for node being inlined.
699 2018-10-03  Jeff Law  <law@redhat.com>
701         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
702         target's wchar_t.
703         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
704         * tree.h (get_typenode_from_name): Prototype.
706 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
708         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
709         Change operand 2 predicate to nonimmediate_operand.
710         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
712 2018-10-03  Martin Sebor  <msebor@redhat.com>
713             Jeff Law  <law@redhat.com>
715         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
716         initialize it.
717         (get_string_length): Detect unterminated arrays.
718         (format_string): Same.
719         (format_directive): Warn about unterminated arrays.
720         (handle_gimple_call): Mark statements with no_warning as needed.
722 2018-10-03  Jim Wilson  <jimw@sifive.com>
724         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
725         also define __riscv_abi_rve.  Delete trailing white space.
727 2018-10-03  Paul Koning  <ni1d@arrl.net>
729         Enable LRA register allocator for PDP11.
730         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
731         (R): Likewise.
732         (D): Likewise.
733         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
734         * config/pdp11/pdp11.opt (-mlra): New option.
735         * doc/invoke.texi (PDP-11 Options): Document -mlra.
737 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
739         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
740         (*<absneg:code>extend<mode>xf2): Ditto.
742 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
744         PR tree-optimization/87415
745         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
746         precision fields.
748 2018-10-02  Jeff Law  <law@redhat.com>
750         * gimple-fold.c (get_range_strlen): Only set *nonstr when
751         an unterminated string is discovered.  Bubble up range
752         even for unterminated strings.
753         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
754         indicates the string was not terminated via NONSTR.
756 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
758         * tree-vrp.c (extract_range_from_unary_expr): Special case all
759         pointer conversions.
760         Do not do anything special for anti-ranges.
762 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
764         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
765         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
767 2018-10-03  Martin Liska  <mliska@suse.cz>
769         PR gcov-profile/86109
770         * coverage.c (coverage_begin_function): Do not
771         mark lambdas as artificial.
772         * tree-core.h (struct GTY): Remove tm_clone_flag
773         and introduce new lambda_function.
774         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
776 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
778         PR target/87474
779         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
780         P8_VECTOR and VSX are enabled.
782 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
784         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
785         0x3907 as CPU model number.
787 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
789         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
790         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
791         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
792         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
793         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
794         * config/s390/s390.md: Likewise. Rename also the cpu attribute
795         value from arch12 to z14.
797 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
799         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
800         (isinfxf2): Ditto.
801         (isinf<mode>2): Ditto.
803 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
805         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
806         before emitting fxam.  Perform calculations in XFmode.
808 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
810         * match.pd (((X /[ex] A) +- B) * A): New transformation.
812 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
814         PR middle-end/87319
815         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
816         * tree.c (signed_or_unsigned_type_for): Handle complex.
818 2018-10-02  Jeff Law  <law@redhat.com>
820         * gimple-fold.c (get_range_strlen): Remove dead code.
822 2018-10-02  Martin Sebor  <msebor@redhat.com>
823             Jeff Law  <law@redhat.com>
825         * builtins.c (unterminated_array): Add new arguments.
826         If argument is not terminated, bubble up size and exact
827         state to callers.
828         (expand_builtin_strnlen): Detect, avoid expanding
829         and diagnose unterminated arrays.
830         (c_strlen): Fill in offset of start of unterminated strings.
831         * builtins.h (unterminated_array): Update prototype.
833 2018-10-02  Richard Biener  <rguenther@suse.de>
835         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
836         of haddv4df, first reduce to SSE width and exploit the fact
837         that we only need element zero with the reduction result.
838         (reduc_plus_scal_v2df): Likewise.
840 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
842         * dojump.h (do_jump): Delete.
843         (do_jump_1): Likewise.
844         (split_comparison): Move around.
845         * dojump.c (do_jump): Make static.
846         (do_jump_1): Likewise.
847         (jumpifnot): Move around.
848         (jumpifnot_1): Likewise.
849         (jumpif): Likewise.
850         (jumpif_1): Likewise.
851         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
853 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
855         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
856         insns in the delay slot and add_insn_after for the jump insn.
858 2018-10-02  Richard Biener  <rguenther@suse.de>
860         * tree-inline.c (expand_call_inline): Use the location of
861         the callee declaration for the inline-entry marker.
862         * final.c (notice_source_line): Remove special-casing of
863         NOTE_INSN_INLINE_ENTRY.
865 2018-10-01  Carl Love  <cel@us.ibm.com>
867         PR 69431
868         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
869         (__builtin_mtfsb0): New.
870         (__builtin_mtfsb1): New.
871         ( __builtin_set_fpscr_rn): New.
872         (__builtin_set_fpscr_drn): New.
873         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
874         (rs6000_expand_set_fpscr_rn_builtin): Add.
875         (rs6000_expand_set_fpscr_drn_builtin): Add.
876         (rs6000_expand_builtin): Add case statement entries for
877         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
878         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
879         RS6000_BUILTIN_MFFSL.
880         (rs6000_init_builtins): Add ftype initialization and def_builtin
881         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
882         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
883         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
884         rs6000_mffscdrn): Add define_insn.
885         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
886         * doc/extend.texi: Add documentation for the builtins.
888 2018-10-01  Richard Biener  <rguenther@suse.de>
890         PR tree-optimization/87465
891         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
892         causing branch miscounts.
894 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
896         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
897         aarch64_option_default_param):  New.
898         (params.h): Include.
899         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
900         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
901         stack-clash protection validation code.
903 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
905         * params.c (validate_param): New.
906         (add_params): Use it.
907         (set_param_value): Refactor param validation into validate_param.
908         (diagnostic.h): Include.
909         * diagnostic.h (diagnostic_ready_p): New.
911 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
913         * params.c (set_param_value):
914         Add index of parameter being validated.
915         * common/common-target.def (option_validate_param): New.
916         * common/common-targhooks.h (default_option_validate_param): New.
917         * common/common-targhooks.c (default_option_validate_param): New.
918         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
919         * doc/tm.texi: Regenerate.
921 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
923         PR target/86486
924         * config/aarch64/aarch64.c (aarch64_override_options_internal):
925         Add validation for stack-clash parameters and set defaults.
927 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
929         PR target/86486
930         * configure.ac: Add stack-clash-protection-guard-size.
931         * doc/install.texi: Document it.
932         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
933         * params.def: Update comment for guard-size.
934         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
935         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
936         * configure: Regenerate.
938 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
940         PR target/86486
941         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
942         STACK_DYNAMIC_OFFSET): New.
943         * config/aarch64/aarch64.c (aarch64_layout_frame):
944         Update outgoing args size.
945         (aarch64_stack_clash_protection_alloca_probe_range,
946         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
948 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
950         PR target/86486
951         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
952         probe ranges.
953         * target.def (stack_clash_protection_alloca_probe_range): New.
954         (stack_clash_protection_final_dynamic_probe): Remove.
955         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
956         (default_stack_clash_protection_final_dynamic_probe): Remove.
957         * targhooks.c: Likewise.
958         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
959         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
960         * doc/tm.texi: Regenerate.
962 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
964         PR target/86486
965         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
966         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
967         aarch64_clamp_to_uimm12_shift): New.
968         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
969         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
971 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
973         PR target/86486
974         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
976 2018-10-01  Jeff Law  <law@redhat.com>
977             Richard Sandiford <richard.sandiford@linaro.org>
978             Tamar Christina  <tamar.christina@arm.com>
980         PR target/86486
981         * config/aarch64/aarch64.md
982         (probe_stack_range): Add k (SP) constraint.
983         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
984         STACK_CLASH_MAX_UNROLL_PAGES): New.
985         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
986         stack probes for stack clash.
987         (aarch64_allocate_and_probe_stack_space): New.
988         (aarch64_expand_prologue): Use it.
989         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
990         (aarch64_sub_sp): Add emit_move_imm optional param.
992 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
994         PR tree-optimization/87261
995         * match.pd: Remove trailing whitespace.
996         Add (x & y) | ~(x | y) -> ~(x ^ y),
997         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
999 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
1001         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
1002         constraints.
1003         (ashlsi3_insn): Update instruction constraints.
1004         (ashrsi3_insn): Likewise.
1005         (rotrsi3): Likewise.
1006         (add_shift): Likewise.
1007         * config/arc/constraints.md (Csz): New 32 bit constraint. It
1008         avoids placing in the limm field small constants which, otherwise,
1009         could end into a small instruction.
1011 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
1013         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
1014         destination register is not odd-even.
1015         (umaddsidi4_split): Likewise.
1017 2018-10-01  Richard Biener  <rguenther@suse.de>
1019         * tree-inline.c (expand_call_inline): Store origin of fn
1020         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
1021         * tree.c (block_ultimate_origin): Simplify and do some
1022         checking.
1024 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
1026         * config/i386/mmx.md (EMMS): New int iterator.
1027         (emms): New int attribute.
1028         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
1029         EMMS int iterator.  Explicitly declare clobbers.
1030         (mmx_emms): Remove expander.
1031         (mmx_femms): Ditto.
1032         * config/i386/predicates.md (emms_operation): Remove predicate.
1033         (vzeroall_pattern): New predicate.
1034         (vzeroupper_pattern): Rename from vzeroupper_operation.
1035         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
1036         vzeroupper_pattern and vzeroall_pattern predicates.
1038 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
1040         PR rtl-optimization/86939
1041         * ira-lives.c (make_hard_regno_born): Rename from this...
1042         (make_hard_regno_live): ... to this.  Remove update to conflict
1043         information.  Update function comment.
1044         (make_hard_regno_dead): Add conflict information update.  Update
1045         function comment.
1046         (make_object_born): Rename from this...
1047         (make_object_live): ... to this.  Remove update to conflict information.
1048         Update function comment.
1049         (make_object_dead):  Add conflict information update.  Update function
1050         comment.
1051         (mark_pseudo_regno_live): Call make_object_live.
1052         (mark_pseudo_regno_subword_live): Likewise.
1053         (mark_hard_reg_dead): Update function comment.
1054         (mark_hard_reg_live): Call make_hard_regno_live.
1055         (process_bb_node_lives): Likewise.
1056         * lra-lives.c (make_hard_regno_born): Rename from this...
1057         (make_hard_regno_live): ... to this.  Remove update to conflict
1058         information.  Remove now uneeded check_pic_pseudo_p argument.
1059         Update function comment.
1060         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
1061         to conflict information.  Update function comment.
1062         (mark_pseudo_live): Remove update to conflict information.  Update
1063         function comment.
1064         (mark_pseudo_dead): Add conflict information update.
1065         (mark_regno_live): Call make_hard_regno_live.
1066         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
1067         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
1069 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
1071         PR target/87370
1072         * config/i386/i386.c (construct_container): Use TImode for
1073         BLKmode values in 2 integer registers.
1075 2018-09-29  Jeff Law  <law@redhat.com>
1077         * builtins.c (unterminated_array): Pass in c_strlen_data * to
1078         c_strlen rather than just a tree *.
1079         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
1080         Update recursive calls appropriately.  If caller did not provide a
1081         suitable data pointer, create a local one.  When a non-terminated
1082         string is discovered, bubble up information about the string via the
1083         c_strlen_data object.
1084         * builtins.h (c_strlen): Update prototype.
1085         (c_strlen_data): New structure.
1086         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
1087         For a type 2 call, if c_strlen indicates a non-terminated string
1088         use the length of the non-terminated string.
1089         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
1091 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
1093         PR target/87467
1094         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
1095         __m512d type for __A argument rather than __m512.
1097 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
1099         * match.pd (simple_comparison): Don't optimize if either operand is
1100         a function pointer when target needs function pointer canonicalization.
1102 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1104         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
1105         power5 .. power9 to remove indirection.
1106         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
1107         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
1108         ASM_CPU_476_SPEC): Delete.
1109         (ASM_CPU_SPEC): Adjust.
1110         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
1111         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
1113 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1115         * config.in: Delete HAVE_AS_DCI.
1116         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
1117         * config/rs6000/rs6000.h: Ditto.
1118         * configure.ac: Delete HAVE_AS_DCI.
1119         * configure: Regenerate.
1121 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1123         * config.in (HAVE_AS_LWSYNC): Delete.
1124         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1125         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
1126         do it as a .long .
1127         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1128         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
1129         as a .long .
1130         * configure.ac: Delete HAVE_AS_LWSYNC.
1131         * configure: Regenerate.
1133 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
1134             Pierre-Marie de Rodat  <derodat@adacore.com>
1136         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
1137         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
1138         (cgraph_node::create_thunk): Add indirect_offset parameter.
1139         (thunk_adjust): Likewise.
1140         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
1141         and initialize the corresponding field with it.
1142         (cgraph_node::dump): Dump indirect_offset field.
1143         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
1144         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
1145         (thunk_adjust): Add indirect_offset parameter and deal with it.
1146         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
1147         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
1148         or if the thunk is external or local.  Fix formatting.  Do not chain
1149         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
1150         if any, in the GIMPLE representation.
1151         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
1152         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
1153         (input_node): Read indirect_offset field.
1154         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
1155         call to thunk_adjust.
1156         * tree-nested.c (struct nesting_info): Add thunk_p field.
1157         (create_nesting_tree): Set it.
1158         (convert_all_function_calls): Copy static chain from targets to thunks.
1159         (finalize_nesting_tree_1): Return early for thunks.
1160         (unnest_nesting_tree_1): Do not finalize thunks.
1161         (gimplify_all_functions): Do not gimplify thunks.
1163 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
1165         * opt-suggestions.c (option_proposer::build_option_suggestions):
1166         Release "option_values".
1168 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
1170         * coverage.c (get_coverage_counts): Convert problem-reporting dump
1171         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
1172         * dumpfile.c (kind_as_string): New function.
1173         (dump_loc): Rather than a hardcoded prefix of "note: ", use
1174         kind_as_string to vary the prefix based on dump_kind.
1175         (selftest::test_capture_of_dump_calls): Update for above.
1177 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
1179         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
1180         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
1182 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
1184         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
1185         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
1186         INVALID_REGNUM instead of FPSR_REG.
1187         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
1188         * config/i386/i386.md: Update comment of FP compares.
1189         (fldenv): Do not clobber FPSR_REG.
1191 2018-09-28  Richard Biener  <rguenther@suse.de>
1193         * tree.h (BLOCK_ORIGIN): New.
1194         * omp-expand.c (grid_expand_target_grid_body): Assign
1195         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
1196         * tree-inline.c (remap_block): Likewise.
1197         * auto-profile.c (get_function_decl_from_block): Simplify
1198         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
1199         * langhooks.c (lhd_print_error_function): Likewise.
1200         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
1201         Likewise.
1202         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
1203         * tree.c (block_nonartificial_location): Likewise.
1204         (block_ultimate_origin): Likewise.
1205         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
1206         no longer needed LTO case.
1208 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
1209             Jan Hubicka  <jh@suse.cz>
1210             Martin Jambor  <mjambor@suse.cz>
1212         * simplify-rtx.c (simplify_merge_mask): New function.
1213         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
1214         same masks are used in op1 or op2.
1215         (test_vec_merge): New function.
1216         (test_vector_ops): Call test_vec_merge.
1218 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
1220         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
1221         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
1222         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
1223         (cypress_costs): Set it.
1224         (supersparc_costs): Likewise.
1225         (hypersparc_costs): Likewise.
1226         (leon_cost): Likewise.
1227         (leon3_costs): Likewise.
1228         (sparclet_costs): Likewise.
1229         (ultrasparc_costs): Likewise.
1230         (ultrasparc_costs): Likewise.
1231         (niagara_costs): Likewise.
1232         (niagara2_costs): Likewise.
1233         (niagara3_costs): Likewise.
1234         (niagara4_costs): Likewise.
1235         (niagara7_costs): Likewise.
1236         (m8_costs): Likewise.
1237         (TARGET_CAN_FOLLOW_JUMP): Define.
1238         (pass_work_around_errata::gate): Minor tweak.
1239         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
1240         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
1241         Automaitcally clear MASK_FSMULD mask for V7 processors.
1242         (sparc_can_follow_jump): New static function.
1243         (output_ubranch): Deal with CROSSING_JUMP_P.
1244         (sparc_use_sched_lookahead): Rewrite using switch statement.
1245         (sparc_issue_rate): Reorder.
1246         (sparc_branch_cost): New function.
1248 2018-09-27  Martin Sebor  <msebor@redhat.com>
1250         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
1251         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
1252         (int_fits_type_p): Same.
1254 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
1256         * config/i386/i386.md (FPCR_REG): Remove.
1257         (UNSPEC_FLDCW): Remove.
1258         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
1259         (x86_fldcw_1): Remove insn pattern.
1260         (fnstenv): Do not clobber FPCR_REG.
1261         (fldenv): Ditto.
1262         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
1263         (CALL_USED_REGISTERS): Ditto.
1264         (REG_ALLOC_ORDER): Ditto.
1265         (REG_CLASS_CONTENTS): Ditto.
1266         (HI_REGISTER_NAMES): Ditto.
1267         (ADDITIONAL_REGISTER_NAMES): Use defines instead
1268         of numerical constants.
1269         * config/i386/i386.c (regclass_map): Remove fpsr register.
1270         (dbx_register_map): Ditto.
1271         (dbx64_register_map): Ditto.
1272         (svr4_dbx_register_map): Ditto.
1273         (print_reg): Do not handle FPCR_REG.
1275 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
1277         PR target/87149
1278         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
1279         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
1280         Delete, always treat as true.
1281         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1282         Ditto.  Simplify remaining code.
1283         * config/powerpcspe/powerpcspe.h: Ditto.
1284         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
1285         Simplify remaining code.
1286         (rs6000_expand_builtin): Ditto.
1287         * config/rs6000/rs6000.h: Ditto.
1288         * configure.ac: Ditto.
1289         * configure: Regenerate.
1291 2018-09-27  Martin Liska  <mliska@suse.cz>
1293         * coverage.c (get_coverage_counts): Revert the formatting
1294         of missing profile opt info.
1296 2018-09-27  Richard Biener  <rguenther@suse.de>
1298         PR debug/37801
1299         PR debug/87440
1300         * dwarf2out.c (set_block_origin_self): Do not mark outermost
1301         block as we do not output that.
1302         (gen_inlined_subroutine_die): Elide the originally outermost
1303         block, matching what we do for concrete instances.
1304         (decls_for_scope): Add parameter specifying whether to recurse
1305         to subblocks.
1307 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
1308             Tom de Vries  <tom@codesourcery.com>
1310         PR 82089
1312         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
1313         STORE_FLAG_VALUE == 1.
1315 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
1317         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
1318         constant definitions.
1319         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
1320         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
1321         ("speculation_barrier"): New expander definition.
1323 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
1325         PR gcov-profile/86957
1326         * common.opt: New warning option -Wmissing-profile.
1327         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
1328         * doc/invoke.texi: Document -Wmissing-profile.
1330 2018-09-26  Jim Wilson  <jimw@sifive.com>
1332         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
1333         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
1335 2018-09-26  Martin Sebor  <msebor@redhat.com>
1337         * tree.c (zerop): Change return type to bool.
1338         (integer_zerop, integer_onep, integer_each_onep): Same.
1339         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1340         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1341         (real_onep, real_minus_onep, chain_index): Same.
1342         (print_type_hash_statistics, type_list_equal): Same.
1343         * tree.h (zerop): Same.
1344         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
1345         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1346         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1347         (real_onep, real_minus_onep, chain_index): Same.
1348         (print_type_hash_statistics, type_list_equal): Same.
1350 2018-09-26  Jim Wilson  <jimw@sifive.com>
1352         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
1354 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
1356         PR target/87414
1357         * config/i386/i386.c: Include debug.h and dwarf2out.h.
1358         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
1359         call.
1361 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
1363         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
1365 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
1367         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
1368         and FP_SECOND_SSE_REGS.
1369         (REG_CLASS_NAMES): Ditto.
1370         (REG_CLASS_CONTENTS): Ditto.
1371         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
1372         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
1373         (ix86_preferred_output_reload_class): Ditto.
1374         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
1375         clobber constraint to "=&f".
1376         (fix_truncdi_i387): Ditto.
1377         (lrintxfdi2): Ditto.
1378         (fistdi2_<rounding>): Ditto.
1379         (fpremxf4_i387): Change "=u" constraint to "=f".
1380         (fprem1xf4_i387): Ditto.
1381         (sincosxf3): Ditto.
1382         (fptanxf4_i387): Ditto.
1383         (fxtractxf3_i387): Ditto.
1384         (fscalexf4_i387): Ditto.
1385         (atan2xf3): Change "u" constraint to "f".
1386         (fyl2xxf3_i387): Ditto.
1387         (fyl2xp1xf3_i387): Ditto.
1389 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
1391         PR target/87439
1392         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
1393         for removed I387_MASK_PM entity.
1396 2018-09-26  Jeff Law  <law@redhat.com>
1397         Revert
1398         2018-09-26  Alexey Neyman  <stilor@att.net>
1400         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1401         headers are no longer pulled in by <isl/val.h>.
1403 2018-09-26  Richard Biener  <rguenther@suse.de>
1405         PR debug/87443
1406         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
1407         or concrete instance DIE to the tree.  Create abstract origin
1408         attributes also for concrete instances.
1410 2018-09-26  Alexey Neyman  <stilor@att.net>
1412         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1413         headers are no longer pulled in by <isl/val.h>.
1415 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
1417         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
1418         Use new helper functions.
1419         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
1420         Use new helper functions.
1421         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
1422         aarch_mm_needs_release): New declarations.
1423         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
1424         aarch_mm_needs_release): New.
1426 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1428         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
1429         (arm32_output_mi_thunk): Deal with long calls.
1431 2018-09-26  Richard Biener  <rguenther@suse.de>
1433         PR debug/87428
1434         PR debug/87362
1435         * tree-inline.c (expand_call_inline): When the location
1436         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
1437         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
1438         the inserted BLOCK to make inlined_function_outer_scope_p
1439         recognize it.
1440         * dwarf2out.c (add_call_src_coords_attributes): Do not add
1441         coords for reserved locations.
1443 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
1445         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
1446         (*call_indirect_nonlocal_sysv<mode>): Ditto.
1447         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
1448         (*sibcall_nonlocal_sysv<mode>): Ditto.
1449         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
1450         (<bd>_<mode>): Ditto.
1451         (<bd>tf_<mode>): Ditto.
1453 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
1455         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
1456         control string as a list of templates instead of as C code.
1457         (*altivec_movti): Ditto.
1458         * config/rs6000/darwin.md (movdf_low_di): Ditto.
1460 2018-09-25  Jim Wilson  <jimw@sifive.com>
1462         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
1463         when target symbol is weak.
1465 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1467         PR c/87387
1468         * builtins.c (unterminated_array): Simplify.
1469         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
1470         where pointer arithmetic is safe.
1472 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
1474         PR target/86987
1475         * config/rs6000/altivec.md (altivec_vspltb): Use
1476         const_0_to_15_operand instead of u5bit_cint_operand.
1477         (*altivec_vspltb_internal): Ditto.
1478         (altivec_vspltb_direct): Ditto.
1479         (altivec_vsplth): Use const_0_to_7_operand instead of
1480         u5bit_cint_operand.
1481         (*altivec_vsplth_internal): Ditto.
1482         (altivec_vsplth_direct): Ditto.
1483         (altivec_vspltw): Use const_0_to_3_operand instead of
1484         u5bit_cint_operand.
1485         (*altivec_vspltw_internal): Ditto.
1486         (altivec_vspltw_direct): Ditto.
1487         (altivec_vspltsf): Ditto.
1488         (*altivec_vspltsf_internal): Ditto.
1489         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
1490         various splats with the proper size immediate.  Reorder the various
1491         cases by ascending size of immediate, and put all such together.
1493 2018-09-25  Richard Biener  <rguenther@suse.de>
1495         PR debug/83941
1496         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
1497         GC-ification.
1498         (maybe_create_die_with_external_ref): Do not create
1499         DW_TAG_imported_unit here.
1500         (add_abstract_origin_attribute): Handle external BLOCK refs.
1501         (dwarf2out_abstract_function): Simplify LTO case.
1502         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
1503         rather than using maybe_create_die_with_external_ref.
1505 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
1507         PR target/71278
1508         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
1509         (frndintxf2_mask_pm_i387): Ditto.
1510         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
1511         Enable for !flag_trapping_math.
1512         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
1513         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
1514         Change operand 1 predicate to nonimmediate_operand.
1515         (attr "i387_cw"): Remove mask_pm.
1516         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
1517         (enum ix86_entity): Remove I387_MASK_PM.
1518         * config/i386/i386.c (ix86_i387_mode_needed): Do not
1519         handle I387_MASK_PM.
1520         (ix86_mode_needed): Ditto.
1521         (ix86_mode_after): Ditto.
1522         (ix86_mode_entry): Ditto.
1523         (ix86_mode_exit): Ditto.
1524         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
1526 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
1528         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
1529         to_update_switch_stmts to vNULL instead of calling create on them
1530         immediately.
1532 2018-09-25  Richard Biener  <rguenther@suse.de>
1534         PR tree-optimization/87402
1535         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
1536         (visit_phi): Re-instantiate handling of supposed to be VARYING
1537         but non-VARYING backedge value.
1539 2018-09-25  Richard Biener  <rguenther@suse.de>
1541         PR debug/83941
1542         * dwarf2out.c (struct sym_off_pair): New.
1543         (external_die_map): New global.
1544         (lookup_decl_die): When in LTO create DIEs lazily from the
1545         external_die_map.
1546         (lookup_block_die): New function, create DIEs lazily in LTO.
1547         (equate_block_to_die): New function.
1548         (dwarf2out_die_ref_for_decl): During WPA get the association
1549         from the external DIE map.
1550         (dwarf2out_register_external_die): Record mapping into the
1551         external DIE map.
1552         (maybe_create_die_with_external_ref): New function split out from
1553         DIE generation part of old dwarf2out_register_external_die.
1554         (add_abstract_origin_attribute): Do not return the DIE.  When
1555         in LTO reference externals directly.
1556         (dwarf2out_abstract_function): When in LTO ignore calls for
1557         decls with external DIEs (already present abstract instances).
1558         (gen_call_site_die): Adjust.
1559         (add_high_low_attributes): Likewise.
1560         (gen_lexical_block_die): Likewise.
1561         (gen_inlined_subroutine_die): Likewie.
1562         (gen_block_die): Likewise.
1563         (dwarf2out_inline_entry): Likewise.
1564         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
1565         DIEs.
1567 2018-09-25  Martin Liska  <mliska@suse.cz>
1569         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
1570         integers and not by a float value.
1572 2018-09-25  Martin Liska  <mliska@suse.cz>
1574         PR fortran/87394
1575         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
1576         instead of NULL.
1577         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
1578         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
1579         * godump.c (go_format_type): Remove extra parenthesis.
1581 2018-09-25  Martin Liska  <mliska@suse.cz>
1583         * alias.c (set_dest_equal_p): Remove unused function.
1584         * config/i386/i386.c (def_builtin_pure2): Likewise.
1585         * diagnostic-show-locus.c (class layout): Remove
1586         unused field.
1587         (layout::layout): Likewise here.
1588         * dump-context.h (class temp_dump_context): Likewise.
1589         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
1590         (add_AT_loclistsptr): Likewise.
1591         (add_AT_offset): Likewise.
1592         (get_AT_hi_pc): Likewise.
1593         (is_comdat_die): Likewise.
1594         (type_is_enum): Likewise.
1595         (ceiling): Likewise.
1596         (add_AT_vms_delta): Likewise.
1597         (is_class_die): Likewise.
1598         * edit-context.c (class line_event): Remove unused field.
1599         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
1600         unused function.
1601         * ipa-cp.c (ipa_get_vr_lat): Likewise.
1602         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
1603         (ok_for_base_p_nonstrict): Likewise.
1604         * tree-chrec.c (is_not_constant_evolution): Likewise.
1605         (chrec_fold_poly_cst): Likewise.
1606         * tree-if-conv.c (has_pred_critical_p): Likewise.
1607         * tree-ssa-coalesce.c (print_exprs): Likewise.
1608         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
1609         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
1610         * tree-vrp.c (value_ranges_intersect_p): Likewise.
1611         (value_range_nonnegative_p): Likewise.
1613 2018-09-25  Martin Liska  <mliska@suse.cz>
1615         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
1616         Do not handle "GNU Pascal".
1617         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1618         Likewise.
1619         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
1620         from documentation. Likewise.
1621         * dbxout.c (dbxout_range_type): Likewise.
1622         * doc/cpp.texi: Likewise.
1623         * doc/extend.texi: Likewise.
1624         * doc/frontends.texi: Likewise.
1625         * doc/invoke.texi: Remove Pascal entry.
1626         * tree.def (CLEANUP_POINT_EXPR): Likewise.
1627         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
1629 2018-09-25  Martin Liska  <mliska@suse.cz>
1631         PR middle-end/86078
1632         * doc/invoke.texi: Document all parameters and remove default
1633         of the parameters.
1635 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
1637         PR bootstrap/87417
1638         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
1639         contains HOST_WIDE_INTs when computing its size.
1641 2018-09-24  Jim Wilson  <jimw@sifive.com>
1643         PR target/87391
1644         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
1645         not TARGET_RVE.
1646         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
1648 2018-09-24  Andrew Pinski  <apinski@marvell.com>
1650         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
1651         access prev before checking it for NULLness in the
1652         AARCH64_FUSE_CMP_BRANCH case.
1654 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
1656         PR target/82699
1657         * config/i386/i386.c (rest_of_insert_endbranch): Set
1658         endbr_queued_at_entrance to true and don't insert ENDBR if
1659         x86_function_profiler will be called.
1660         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
1661         is true.
1662         * config/i386/i386.h (machine_function): Add
1663         endbr_queued_at_entrance.
1665 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
1667         * genattrtab.c (mk_attr_alt): Use alternative_mask.
1668         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
1669         types.
1670         (check_attr_test): Use alternative_mask.
1671         (get_attr_value): Likewise.
1672         (compute_alternative_mask): Use alternative_mask and XWINT.
1673         (make_alternative_compare): Use alternative_mask.
1674         (attr_alt_subset_p): Use XWINT.
1675         (attr_alt_subset_of_compl_p): Likewise.
1676         (attr_alt_intersection): Use alternative_mask and XWINT.
1677         (attr_alt_union): Likewise.
1678         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
1679         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
1680         (simplify_test_exp): Use alternative_mask and XWINT.
1681         (write_test_expr): Use alternative_mask and XWINT, adjust bit
1682         number calculation to support 64 bits.  Generate code that
1683         checks 64-bit masks.
1684         (main): Use alternative_mask.
1685         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
1687 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
1689         PR target/80080
1690         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
1691         RETURN+USE when returning via %r14.
1693 2018-09-24  Martin Liska  <mliska@suse.cz>
1695         * gcov.c (output_lines): Print colorization legend
1696         for both flag_use_colors and flag_use_hotness_colors.
1697         Reword the help.
1699 2018-09-24  Martin Liska  <mliska@suse.cz>
1701         * coverage.c (get_coverage_counts): Use warning_at
1702         with current_function_decl location. Use %qD in warning
1703         message.
1705 2018-09-24  Martin Liska  <mliska@suse.cz>
1707         * memory-block.h (memory_block_pool::release): Annotate with
1708         valgrind that the memory is not accessible.
1710 2018-09-24  Martin Liska  <mliska@suse.cz>
1712         PR sanitizer/85774
1713         * asan.c: Make asan_handled_variables extern.
1714         * asan.h: Likewise.
1715         * cfgexpand.c (expand_stack_vars): Make sure
1716         a representative is unpoison if another
1717         variable in the partition is handled by
1718         use-after-scope sanitization.
1720 2018-09-24  Richard Biener  <rguenther@suse.de>
1722         PR tree-optimization/63155
1723         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
1724         the worklist when the edge of the respective argument isn't
1725         executable.
1727 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
1729         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
1730         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
1731         (MASK_CLASS_P): Update for rename.
1732         (MAYBE_MASK_CLASS_P): Ditto.
1733         (REG_CLASS_NAMES): Update.
1734         (REG_CLASS_CONTENT): Update.
1735         * config/i386/i386.c (regclass_map): Update for MASK_REG
1736         and ALL_MASK_REGS rename.
1737         * config/i386/constraints.md (Yk): Update for rename.
1738         (k): Ditto.
1740 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
1742         * config/i386/i386.h (enum reg_class): Remove
1743         EVEX_SSE_REGS and MOD4_SSE_REGS.
1744         (REG_CLASS_NAMES): Update.
1745         (REG_CLASS_CONTENT): Update.
1746         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
1747         registers as ALL_SSE_REGS.
1748         (ix86_additional_allocno_class_p): Remove.
1749         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
1750         (ix86_register_priority): Lower priority of EVEX SSE registers.
1751         Use IN_RANGE macro where appropriate.
1752         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
1753         AVX-5124VNNIW checks.
1754         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
1755         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
1756         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
1757         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
1758         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
1759         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
1760         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
1761         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
1762         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
1763         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
1764         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
1765         * config/i386/constraints.md (Yh): Remove.
1767 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
1769         * config/i386/i386.c (regclass_map): Declare integer REX registers
1770         as GENERAL_REGS.
1772 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
1774         * doc/service.texi (Service): Switch the fsf.org link to https.
1776 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
1778         PR target/86798
1779         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1780         Define to speculation_safe_value_not_needed.
1782 2018-09-21  Florian Weimer  <fweimer@redhat.com>
1784         PR middle-end/81035
1785         * doc/extend.texi (Common Function Attributes): Mention that
1786         noreturn suppresses tail call optimization.
1788 2018-09-21  Jeff Law  <law@redhat.com>
1790         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
1791         vr_values::cleanup_edges_and_switches.
1792         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
1793         vr_values class.
1794         (identify_jump_threads): Remove EDGE_IGNORE handling.
1795         (execute_vrp): Move handling of to_remove_edges and
1796         to_update_switch_stmts into vr_values class member functions.
1797         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
1798         (to_update_switch_stmts): Likewise.
1799         * vr-values.c: Include cfghooks.h.
1800         (vr_values::vr_values): Initialize to_remove_edges and
1801         to_update_switch_stmts.
1802         (vr_values::~vr_values): Verify to_remove_edges and
1803         to_update_switch_stmts are empty.
1804         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
1805         (vr_values::cleanup_edges_and_switches): New member function.
1806         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
1807         function.  Add new data members.
1809 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
1811         PR tree-optimization/87309
1812         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
1813         calls with pflags and alt_flags.
1814         (selftest::test_capture_of_dump_calls): Add test of interaction of
1815         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
1817 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1819         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
1821 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1823         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
1825 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1827         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
1828         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
1829         (VXWORKS_LIBS_RTP): Minor reordering.
1831 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1833         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
1834         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
1836 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1838         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
1839         (PTRDIFF_TYPE): Likewise.
1841 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1843         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
1844         triplet, similar to support for VxWorks7.
1845         * config/vxworks-dummy.h: Provide a default definition
1846         of TARGET_VXWORKS64 to 0.
1848 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1850         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
1851         * config/vxworks-dummy.h: here.
1853 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1855         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
1857 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
1858             Bo Zhou  <zbo.zhou@hisilicon.com>
1860         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
1861         * config/aarch64/aarch64-tune.md: Regenerated.
1862         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
1863         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
1864         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
1866 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
1867             Julian Brown  <julian@codesourcery.com>
1869         * builtins.c (get_builtin_sync_mem): Handle address spaces.
1871 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
1873         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
1874         if the call takes a static chain.
1876 2018-09-21  Martin Liska  <mliska@suse.cz>
1878         * auto-profile.c (autofdo_source_profile::read): Do not
1879         set sum_all.
1880         (read_profile): Do not add working sets.
1881         (read_autofdo_file): Remove sum_all.
1882         (afdo_callsite_hot_enough_for_early_inline): Remove const
1883         qualifier.
1884         * coverage.c (struct counts_entry): Remove gcov_summary.
1885         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
1886         do not support GCOV_TAG_PROGRAM_SUMMARY.
1887         (get_coverage_counts): Remove summary and expected
1888         arguments.
1889         * coverage.h (get_coverage_counts): Likewise.
1890         * doc/gcov-dump.texi: Remove -w option.
1891         * gcov-dump.c (dump_working_sets): Remove.
1892         (main): Do not support '-w' option.
1893         (print_usage): Likewise.
1894         (tag_summary): Likewise.
1895         * gcov-io.c (gcov_write_summary): Do not dump
1896         histogram.
1897         (gcov_read_summary): Likewise.
1898         (gcov_histo_index): Remove.
1899         (gcov_histogram_merge): Likewise.
1900         (compute_working_sets): Likewise.
1901         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
1902         it not obsolete.
1903         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
1904         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
1905         (GCOV_HISTOGRAM_SIZE): Remove.
1906         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
1907         (struct gcov_summary): Simplify rapidly just
1908         to runs and sum_max fields.
1909         (gcov_histo_index): Remove.
1910         (NUM_GCOV_WORKING_SETS): Likewise.
1911         (compute_working_sets): Likewise.
1912         * gcov-tool.c (print_overlap_usage_message): Remove
1913         trailing empty line.
1914         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
1915         (output_lines): Remove program related line.
1916         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
1917         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
1918         histogram.
1919         (input_profile_summary): Do not read it.
1920         (merge_profile_summaries): And do not merge it.
1921         (input_symtab): Do not call removed function.
1922         * modulo-sched.c (sms_schedule): Do not print sum_max.
1923         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
1924         removed when histogram method was invented.
1925         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
1926         mode.
1927         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
1928         GCOV coding style.
1929         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
1930         and dump selected value.
1931         * profile.c (add_working_set): Remove.
1932         (get_working_sets): Likewise.
1933         (find_working_set): Likewise.
1934         (get_exec_counts): Do not work with working sets.
1935         (read_profile_edge_counts): Do not inform as sum_max is removed.
1936         (compute_branch_probabilities): Likewise.
1937         (compute_value_histograms): Remove argument for call of
1938         get_coverage_counts.
1939         * profile.h: Do not make gcov_summary const.
1941 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
1943         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
1945 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
1947         PR tree-optimization/86990
1948         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
1949         Check that the entire merged store group is made of constants only for
1950         overlapping stores.
1952 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
1954         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
1955         (VTABLE_VERIFICATION_SPEC): Likewise.
1956         (SANITIZER_EARLY_SPEC): Likewise.
1957         (SANITIZER_SPEC): Likewise.
1958         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
1959         * doc/invoke.texi (Link Options): Document -r.
1961 2018-09-20  Richard Biener <rguenther@suse.de>
1963         PR middle-end/87054
1964         * gimplify.c (gimplify_expr): Retain alignment of
1965         addressable lvalue in dereference.
1967 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
1969         PR bootstrap/87013
1970         * configure.ac: Check for .loc is_stmt support.
1971         * configure, config.in: Rebuilt.
1972         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
1973         if not supported.
1975 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
1977         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
1978         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
1979         -misel=no.
1981 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
1983         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
1984         VECTOR_OTHER.
1985         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
1986         case VECTOR_OTHER.
1988 2018-09-20  Marek Polacek  <polacek@redhat.com>
1990         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
1992 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
1994         PR tree-optimization/87288
1995         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
1996         into account when determining PEELING_FOR_NITERS.
1998 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
2000         PR tree-optimization/86877
2001         * tree-vect-loop.c (vect_analyze_loop_2): Call
2002         vect_verify_datarefs_alignment.
2004 2018-09-19  Marek Polacek  <polacek@redhat.com>
2006         * doc/invoke.texi: Document -Wclass-conversion.
2008 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
2010         * config/pa/pa.c (pa_adjust_priority): Delete.
2011         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
2013         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
2014         (atomic_storehi): Likewise.
2015         (atomic_storesi): Likewise.
2016         (atomic_loaddi): Restore compare and swap exchange loop code.
2018 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
2020         PR rtl-optimization/86902
2021         * combine.c (try_combine): When changing the CC mode used, don't change
2022         an unrelated mode in other_insn to that new CC mode.
2024 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
2026         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
2027         with %T in place of calls to dump_generic_expr.
2028         (prune_runtime_alias_test_list): Likewise.
2029         (create_runtime_alias_checks): Likewise.
2030         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
2031         (vect_analyze_data_ref_dependence): Likewise.
2032         (vect_slp_analyze_data_ref_dependence): Likewise.
2033         (vect_record_base_alignment): Likewise.  Use %G in place of call
2034         to dump_gimple_stmt.
2035         (vect_compute_data_ref_alignment): Likewise.
2036         (verify_data_ref_alignment): Likewise.
2037         (vect_find_same_alignment_drs): Likewise.
2038         (vect_analyze_group_access_1): Likewise.
2039         (vect_analyze_data_ref_accesses): Likewise.
2040         (dependence_distance_ge_vf): Likewise.
2041         (dump_lower_bound): Likewise.
2042         (vect_prune_runtime_alias_test_list): Likewise.
2043         (vect_find_stmt_data_reference): Likewise.
2044         (vect_analyze_data_refs): Likewise.
2045         (vect_create_addr_base_for_vector_ref): Likewise.
2046         (vect_create_data_ref_ptr): Likewise.
2047         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
2048         (vect_can_advance_ivs_p): Likewise.
2049         (vect_update_ivs_after_vectorizer): Likewise.
2050         (vect_gen_prolog_loop_niters): Likewise.
2051         (vect_prepare_for_masked_peels): Likewise.
2052         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2053         (vect_determine_vectorization_factor): Likewise.
2054         (vect_is_simple_iv_evolution): Likewise.
2055         (vect_analyze_scalar_cycles_1): Likewise.
2056         (vect_analyze_loop_operations): Likewise.
2057         (report_vect_op): Likewise.
2058         (vect_is_slp_reduction): Likewise.
2059         (check_reduction_path): Likewise.
2060         (vect_is_simple_reduction): Likewise.
2061         (vect_create_epilog_for_reduction): Likewise.
2062         (vect_finalize_reduction:): Likewise.
2063         (vectorizable_induction): Likewise.
2064         (vect_transform_loop_stmt): Likewise.
2065         (vect_transform_loop): Likewise.
2066         (optimize_mask_stores): Likewise.
2067         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
2068         (vect_split_statement): Likewise.
2069         (vect_recog_over_widening_pattern): Likewise.
2070         (vect_recog_average_pattern): Likewise.
2071         (vect_determine_min_output_precision_1): Likewise.
2072         (vect_determine_precisions_from_range): Likewise.
2073         (vect_determine_precisions_from_users): Likewise.
2074         (vect_mark_pattern_stmts): Likewise.
2075         (vect_pattern_recog_1): Likewise.
2076         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2077         (vect_record_max_nunits): Likewise.
2078         (vect_build_slp_tree_1): Likewise.
2079         (vect_build_slp_tree_2): Likewise.
2080         (vect_print_slp_tree): Likewise.
2081         (vect_analyze_slp_instance): Likewise.
2082         (vect_detect_hybrid_slp_stmts): Likewise.
2083         (vect_detect_hybrid_slp_1): Likewise.
2084         (vect_slp_analyze_operations): Likewise.
2085         (vect_slp_analyze_bb_1): Likewise.
2086         (vect_transform_slp_perm_load): Likewise.
2087         (vect_schedule_slp_instance): Likewise.
2088         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2089         (vect_mark_stmts_to_be_vectorized): Likewise.
2090         (vect_init_vector_1): Likewise.
2091         (vect_get_vec_def_for_operand): Likewise.
2092         (vect_finish_stmt_generation_1): Likewise.
2093         (vect_check_load_store_mask): Likewise.
2094         (vectorizable_call): Likewise.
2095         (vectorizable_conversion): Likewise.
2096         (vectorizable_operation): Likewise.
2097         (vectorizable_load): Likewise.
2098         (vect_analyze_stmt): Likewise.
2099         (vect_is_simple_use): Likewise.
2100         (vect_get_vector_types_for_stmt): Likewise.
2101         (vect_get_mask_type_for_stmt): Likewise.
2102         * tree-vectorizer.c (increase_alignment): Likewise.
2104 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
2106         * doc/rtl.texi: Adjust vec_select description.
2107         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
2108         non-constant selectors.
2110 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
2112         * config/aarch64/aarch64-protos.h
2113         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
2114         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
2115         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
2116         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
2117         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
2118         (AARCH64_FL_PROFILE): Move index so flags are ordered.
2119         (AARCH64_ISA_RCPC8_4): New flag.
2120         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
2121         to aarch64_offset_9bit_signed_unscaled_p.
2122         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
2123         and use stlur.
2124         * config/aarch64/constraints.md (Ust): New constraint.
2125         * config/aarch64/predicates.md.
2126         (aarch64_9bit_offset_memory_operand): New predicate.
2127         (aarch64_rcpc_memory_operand): New predicate.
2129 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
2131         PR rtl-optimization/87361
2132         * rtlanal.c (nonzero_bits1): Revert accidental change.
2134 2018-09-19  Richard Biener  <rguenther@suse.de>
2136         PR tree-optimization/87349
2137         PR tree-optimization/87342
2138         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
2140 2018-09-18  Marek Polacek  <polacek@redhat.com>
2142         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
2143         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
2145 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
2147         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
2149 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
2151         PR rtl-optimization/86882
2152         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
2154 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
2156         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
2157         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
2159 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
2161         PR other/87353
2162         * doc/invoke.texi (Link Options): Fix formatting and grammar.
2164 2018-09-18  Richard Biener  <rguenther@suse.de>
2166         PR middle-end/63155
2167         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
2168         (compute_samebase_partition_bases): Likewise.
2169         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
2170         (gimple_can_coalesce_p): Simplify.
2172 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
2174         Handle a library implementation of ffs calling __builtin_ffs.
2175         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
2176         (mmix_init_libfuncs): New function: make __builtin_ffs expand
2177         to __ffsdi2.
2179 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
2181         * diagnostic-show-locus.c (class layout_range): Add field
2182         "m_original_idx".
2183         (layout_range::layout_range): Add "original_idx" param and use it
2184         to initialize new field.
2185         (make_range): Use 0 for original_idx.
2186         (layout::layout): Pass in index to calls to
2187         maybe_add_location_range.
2188         (layout::maybe_add_location_range): Add param "original_idx" and
2189         pass it on to layout_range.
2190         (layout::print_any_labels): Pass on range->m_original_idx to
2191         get_text call.
2192         (gcc_rich_location::add_location_if_nearby): Use 0 for
2193         original_idx.
2194         * gcc-rich-location.h (text_range_label::get_text): Update for new
2195         param.
2196         (range_label_for_type_mismatch::get_text): Likewise.
2198 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
2200         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
2202 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
2204         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
2205         format_string_diagnostic_t.
2206         (fmtwarn_n): Likewise.
2207         * substring-locations.c
2208         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
2209         (format_warning_n_va): Convert to...
2210         (format_string_diagnostic_t::emit_warning_n_va): ...this.
2211         (format_warning_va): Convert to...
2212         (format_string_diagnostic_t::emit_warning_va): ...this.
2213         (format_warning_at_substring): Convert to...
2214         (format_string_diagnostic_t::emit_warning): ...this.
2215         (format_warning_at_substring_n): Convert to...
2216         (format_string_diagnostic_t::emit_warning_n): ...this.
2217         * substring-locations.h (class format_string_diagnostic_t): New
2218         class.
2219         (format_warning_va): Convert to
2220         format_string_diagnostic_t::emit_warning_va.
2221         (format_warning_n_va): Convert to
2222         format_string_diagnostic_t::emit_warning_n_va.
2223         (format_warning_at_substring): Convert to
2224         format_string_diagnostic_t::emit_warning.
2225         (format_warning_at_substring_n): Convert to
2226         format_string_diagnostic_t::emit_warning_n.
2228 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
2229             Bernd Schmidt <bernds_cb1@t-online.de>
2231         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
2232         SImode args.
2234 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
2236         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
2237         operand 0 predicate to nonimmediate operand.
2238         (rint<mode>2_frndint): Remove insn pattern.
2239         (rint<mode>2): Change operand 1 predicate to general_operand.
2240         Extend operand 1 to XFmode and generate rintxf2 insn.
2241         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
2242         Do not use X87MODEF mode macro.
2243         (frndintxf2_<rounding>_i387): Rename from
2244         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
2245         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
2246         to XFmode and generate significandxf3 insn.
2248 2018-09-17  Richard Biener  <rguenther@suse.de>
2250         PR tree-optimization/87328
2251         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
2252         visiting unexecutable backedges when not iterating.
2253         (do_rpo_vn): Mark all edges not executable even when not
2254         iterating.
2256 2018-09-17  Martin Jambor  <mjambor@suse.cz>
2258         PR c/63886
2259         * doc/invoke.texi (Warning Options): Likewise.
2261 2018-09-17  Richard Biener  <rguenther@suse.de>
2263         PR tree-optimization/87301
2264         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
2265         clean EH info from leftover copy assignments.
2267 2018-09-17  Martin Liska  <mliska@suse.cz>
2269         PR gcov-profile/85871
2270         * gcov.c (output_intermediate_file): Fix out of bounds
2271         access.
2273 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
2275         * config/arc/arc.c: Object attributes for core4 not reflected
2276         correctly.
2277         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
2278         core3).
2280 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
2282         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2284 2018-09-17  Martin Liska  <mliska@suse.cz>
2286         * doc/gcov.texi: Document new option --use-hotness-colors.
2287         * gcov.c (struct source_info): Declare new field.
2288         (source_info::source_info): Set default for maximum_count.
2289         (print_usage): Add new -q option.
2290         (process_args): Process it.
2291         (accumulate_line_info): Save src->maximum_count.
2292         (output_line_beginning): Make color line number if
2293         flag_use_hotness_colors is set.
2294         (output_line_details): Pass default argument value.
2295         (output_lines): Pass src->maximum_count.
2297 2018-09-17  Martin Liska  <mliska@suse.cz>
2299         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
2300         Use processor_names table.
2301         * config/i386/i386.c (ix86_default_align): Use
2302         processor_cost_table for alignment values.
2303         (ix86_option_override_internal): Use processor_names.
2304         (ix86_function_specific_print): Likewise.
2305         * config/i386/i386.h (struct processor_costs):
2306         Add alignment values.
2307         (struct ptt): Remove and replace with const char *.
2308         * config/i386/x86-tune-costs.h (struct processor_costs):
2309         Declare default alignments for all costs.
2311 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
2313         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
2314         symbolics or VR_VARYING ranges for ABS_EXPR.
2315         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
2316         when range will wrap.
2318 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
2320         PR middle-end/86864
2321         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
2322         before and after a JUMP_TABLE_DATA.
2324 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
2326         PR middle-end/87188
2327         * dojump.c (do_compare_and_jump): Canonicalize function pointers
2328         when one operand is a function pointer.  Use POINTER_TYPE_P and
2329         FUNC_OR_METHOD_TYPE_P.
2330         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
2331         * fold-const.c (build_range_check): Likewise.
2332         * match.pd (simple_comparison): Likewise.
2334 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
2336         PR c/82967
2337         * spellcheck.c (get_edit_distance_cutoff): New function.
2338         (selftest::test_edit_distance_unit_test_oneway): Rename to...
2339         (selftest::test_get_edit_distance_one_way): ...this.
2340         (selftest::test_get_edit_distance_unit): Rename to...
2341         (selftest::test_get_edit_distance_both_ways): ...this.
2342         (selftest::test_edit_distances): Move tests to this new function,
2343         and test some more pairs of strings.  Update for above renaming.
2344         (selftest::get_old_cutoff): New function.
2345         (selftest::test_get_edit_distance_cutoff): New function.
2346         (selftest::assert_suggested_for): New function.
2347         (ASSERT_SUGGESTED_FOR): New macro.
2348         (selftest::assert_not_suggested_for): New function.
2349         (ASSERT_NOT_SUGGESTED_FOR): New macro.
2350         (selftest::test_suggestions): New function.
2351         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
2352         tests to selftest::test_edit_distances and call it.  Add calls to
2353         selftest::test_get_edit_distance_cutoff and
2354         selftest::test_suggestions.
2355         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
2356         (best_match::consider): Replace hard-coded cutoff calculation with
2357         a call to...
2358         (best_match::get_cutoff): New declaration.
2359         (best_match::get_best_meaningful_candidate): Likewise.
2361 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2363         * builtins.c (fold_builtin_strlen): Remove TODO comment.
2365 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2367         revert:
2368         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2370         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2371         terminated string literal.
2373 2018-09-14  Martin Sebor  <msebor@redhat.com>
2375         * builtins.c (unterminated_array): Handle ARRAY_REF.
2376         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
2377         * builtins.h (unterminated_array): Declare extern.
2378         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
2379         arrays.
2380         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
2381         calls.
2383 2018-09-14  Martin Sebor  <msebor@redhat.com>
2384             Jeff Law  <law@redhat.com>
2386         * builtins.c (unterminated_array): New.
2387         (expand_builtin_strcpy): Adjust.
2388         (expand_builtin_strcpy_args): Detect unterminated arrays.
2389         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
2390         unterminated arrays.
2391         * gimple-fold.h (get_maxval_strlen): Add argument.
2392         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
2394         * gimple-fold.c (get_range_strlen): Add argument.
2395         (get_maxval_strlen): Adjust.
2396         * gimple-fold.h (get_range_strlen): Add argument.
2398 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
2400         * config/i386/movdirintrin.h: Fix copyright year.
2402 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
2404         * reg-stack.c: Include regs.h.
2405         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
2406         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
2407         FIRST_STACK_REG, not DFmode.
2408         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
2409         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
2410         (change stack): Default register mode to the reg_raw_mode of
2411         FIRST_STACK_REG, not DFmode.
2412         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
2413         (*swapxf): Rename from swapxf.
2415 2018-09-14  Carl Love  <cel@us.ibm.com>
2417         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
2418         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
2420 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
2422         PR target/87224
2423         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
2424         alternatives.
2426 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
2428         PR target/85628
2429         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
2431 2018-09-14  Jason Merrill  <jason@redhat.com>
2433         Fix --enable-gather-detailed-mem-stats.
2434         * hash-table.c (hash_table_usage): Change from variable to function.
2435         * hash-table.h: Adjust.
2436         * Makefile.in: Add missing dependencies on hash-table.h.
2438 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2440         PR tree-optimization/87259
2441         PR lto/87283
2442         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
2443         execute_cse_reciprocals_1 has tried transforming.
2445 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
2447         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
2448         VR_VARYING for PLUS/MINUS_EXPR.
2450 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
2452         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
2453         formatting.
2455 2018-09-14  Richard Biener  <rguenther@suse.de>
2457         PR middle-end/63155
2458         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
2459         bits for the merged partition.
2461 2018-09-13  Martin Sebor  <msebor@redhat.com>
2462             Bernd Edlinger  <bernd.edlinger@hotmail.de>
2464         * builtins.h (c_srlen): Add argument.
2465         * builtins.c (warn_string_no_nul): New function.
2466         (c_strlen): Add argument and use it.  Update recursive calls.
2467         Pass DECL argument to string_constant to get info on non
2468         terminated strings.  Update *NONSTR as needed.
2469         (fold_builtin_strlen): Add argument to calls to c_strlen.
2470         Warn for unterminated arrays.
2471         (warn_string_no_null): Add prototype.
2472         * expr.c (string_constant): Update arguments.  Update recursive
2473         calls appropriately.  Detect missing NUL terminator and outermost
2474         declaration its missing in.
2475         Improve checks for arrays with nonzero lower bound or elements
2476         that are not a single byte.  Simplify offset computation.
2477         Simplify checks for non-NUL terminated strings.
2478         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
2479         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
2481 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2483         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
2484         correctly.
2485         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
2486         argument.  Fix range checks.
2487         * fold-const.h (c_getstr): Adjust protoype.
2488         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
2489         string is constant but contains no NUL byte.
2491         * expr.c (string_constant): Adjust function comment.
2492         Remove bogus check for zero termination.
2494         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
2496         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
2497         (get_constant_size): Don't make STRING_CSTs larger than they are.
2498         (check_string_literal): New check function for STRING_CSTs.
2499         (output_constant): Use it.
2501 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
2503         PR target/86812
2504         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
2506 2018-09-13  Richard Biener  <rguenther@suse.de>
2508         PR tree-optimization/87263
2509         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
2510         (struct unwind_state): Add max_rpo field.
2511         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
2512         Compute max_rpo, the max RPO number a block can be backwards reached
2513         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
2514         separating it from the iterating mode.
2516 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
2518         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
2519         (rfs_decision): New scheduling decision.
2521 2018-09-13  Richard Biener  <rguenther@suse.de>
2523         PR bootstrap/87134
2524         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
2525         (vn_nary_op_insert_pieces_predicated): Do not write useless
2526         valid_dominated_by_p entry outside of the allocated storage.
2528 2018-09-13  Omar Sandoval  <osandov@osandov.com>
2529             Tom de Vries  <tdevries@suse.de>
2531         PR debug/86985
2532         * dwarf2out.c (is_c): New function.
2533         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
2535 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
2537         PR target/85628
2538         * config/aarch64/aarch64.md (*aarch64_bfxil):
2539         Define.
2540         * config/aarch64/constraints.md (Ulc): Define.
2541         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
2542         Define.
2543         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
2544         New function.
2546 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
2548         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
2549         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
2550         aarch64_layout_frame call.
2551         (aarch64_expand_epilogue): Likewise.
2552         (aarch64_initial_elimination_offset): Likewise.
2553         (aarch64_get_separate_components): Likewise.
2554         (aarch64_use_return_insn_p): Likewise.
2555         (aarch64_layout_frame): Remove unneeded check.
2557 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
2559         * configure.ac: Only append
2560         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
2561         gcc_config_arguments if it was never reconfigured or last reconfigure
2562         was with different arguments.
2563         * configure: Regenerated.
2565 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
2566             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2568         PR middle-end/87290
2569         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
2570         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
2572 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
2574         PR tree-optimization/87287
2575         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
2576         X % C == 0 to X % (unsigned) C == 0 optimization to ...
2577         * match.pd (X % C == 0): ... here.  New optimization.
2579 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
2581         PR middle-end/82853
2582         * expr.h (maybe_optimize_mod_cmp): Declare.
2583         * expr.c (mod_inv): New function.
2584         (maybe_optimize_mod_cmp): New function.
2585         (do_store_flag): Use it.
2586         * cfgexpand.c (expand_gimple_cond): Likewise.
2588 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
2589             Julian Brown  <julian@codesourcery.com>
2591         PR middle-end/86336
2592         * gimplify.c (gimplify_scan_omp_clauses): Set
2593         target_firstprivatize_array_bases in OpenACC parallel and kernels
2594         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
2595         OpenACC data regions.
2597 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
2599         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
2600         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
2602 2018-09-12  Richard Biener  <rguenther@suse.de>
2604         PR tree-optimization/87280
2605         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
2606         edge but unreachable target.
2607         (do_rpo_vn): For conservatively handling a PHI only mark
2608         the backedge executable but not the block reachable.
2610 2018-09-12  Richard Biener  <rguenther@suse.de>
2612         PR tree-optimization/87266
2613         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
2614         visited blocks.
2616 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
2618         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
2619         constants.
2620         ("trunc<BFP:mode><DFP_ALL:mode>2")
2621         ("trunc<DFP_ALL:mode><BFP:mode>2")
2622         ("extend<BFP:mode><DFP_ALL:mode>2")
2623         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
2624         according to the target operand type.
2626 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
2627             Andreas Krebbel  <krebbel@linux.ibm.com>
2629         PR tree-optimization/86844
2630         * gimple-ssa-store-merging.c
2631         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
2632         there are any overlapping stores in between them, make sure they are
2633         also coalesced or we give up completely.
2635 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
2637         PR middle-end/87248
2638         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
2639         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
2641 2018-09-12  Tom de Vries  <tdevries@suse.de>
2643         * common.opt (gdescribe-dies): Add option.
2644         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
2645         attribute for artifical and nameless decls.
2646         (dwarf2out_register_external_die): Add description attribute to
2647         external reference die.
2648         (add_desc_attribute): New functions.
2649         (gen_subprogram_die): Add description attribute to
2650         DW_TAG_call_site_parameter.
2651         * tree-pretty-print.c (print_generic_expr_to_str): New function.
2652         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
2653         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
2654         -gno-describe-dies.
2655         (@item -gdescribe-dies): Add.
2657 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
2659         * tree-vrp.c (vrp_shift_undefined_p): Remove.
2660         (extract_range_from_binary_expr_1: Call
2661         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
2662         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
2663         depend on sign.
2665 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
2667         * gimple-ssa-warn-alloca.c
2668         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
2669         field for ALLOCA_BOUND_*_LARGE.
2671 2018-09-11  Nathan Sidwell  <nathan@acm.org>
2673         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
2675 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
2677         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
2678         for clobbers.  Remove obsolete comment.
2680 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
2682         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
2683         mpxchk, mpxld and mpxst types.
2684         (define_attr length_immediate): Remove all processing of mpx types.
2685         (define_attr prefix_0f): Ditto.
2686         (define_attr memory): Ditto.
2688 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
2690         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
2691         (log<mode>2): Change operand 1 predicate to general_operand.
2692         Extend operand 1 to XFmode and generate logxf3 insn.
2693         (log10<mode>2): Change operand 1 predicate to general_operand.
2694         Extend operand 1 to XFmode and generate log10xf3 insn.
2695         (log2<mode>2): Change operand 1 predicate to general_operand.
2696         Extend operand 1 to XFmode and generate log2xf3 insn.
2697         (fyl2xp1_extend<mode>xf3_i387): Remove.
2698         (log1p<mode>2): Change operand 1 predicate to general_operand.
2699         Extend operand 1 to XFmode and generate log1pxf3 insn.
2700         (fxtract_extend<mode>xf3_i387): Remove.
2701         (logb<mode>2): Change operand 1 predicate to general_operand.
2702         Extend operand 1 to XFmode and generate logbxf3 insn.
2703         (ilogb<mode>2): Change operand 1 predicate to general_operand.
2704         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
2705         (significand<mode>2): Change operand 1 predicate to general_operand.
2706         Extend operand 1 to XFmode and generate significandxf3 insn.
2708 2018-09-11  Nathan Sidwell  <nathan@acm.org>
2710         * gcc.c (perror_with_name, pfatal_with_name): Delete.
2711         (load_specs): Use fatal_error.
2712         (DELETE_IF_ORDINARY, process_command): Use error.
2713         (execute, run_attempt): Use fatal_error.
2715 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
2717         * diagnostic-core.h (sorry_at): New prototype.
2718         * diagnostic.c (sorry_at): New function.
2720 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
2722         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
2723         by zero as VR_UNDEFINED.
2725 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
2727         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
2728         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
2729         (<sincos>mode2): New expander.
2730         (sincos_extend<mode>xf3_i387): Remove insn pattern.
2731         (sincos -> sin, cos splitters): Remove splitter patterns.
2732         (sincos<mode>3): Change operand 2 predicate to general_operand.
2733         Extend operand 2 to XFmode and generate sincosxf3 insn.
2734         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
2735         Change operand 3 predicate to const1_operand.
2736         (fptan_extend<mode>xf4_i387): Remove insn pattern.
2737         (tanxf2): Update operands in the call to fptanxf4_i387.
2738         (tan<mode>2): Change operand 1 predicate to general_operand.
2739         Extend operand 1 to XFmode and generate tanxf3 insn.
2740         (atan2xf3): Rename from *fpatanxf3_i387.
2741         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
2742         (atan2xf3): Remove expander.
2743         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
2744         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
2745         (atan<mode>2): Change operand 1 predicate to general_operand.
2746         Extend operand 1 to XFmode and generate atanxf3 insn.
2748 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
2750         * config/i386/i386.md (x87/SSE constant load splitter): Use
2751         memory_operand instead of nonimmediate_operand for input operand
2752         predicate.
2754 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
2756         * config/i386/i386.md (float partial SSE register stall splitter): Move
2757         splitter near its instruction pattern.
2758         (float_extend partial SSE register stall splitter): Ditto.
2759         (float_truncate partial SSE register stall splitter): Ditto.
2761 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
2763         PR target/86794
2764         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2765         to speculation_safe_value_not_needed.
2767         PR target/85666
2768         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
2769         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
2770         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
2771         leaf_function_p, instead use has_hard_reg_initial_val.
2773 2018-09-09  Nathan Sidwell  <nathan@acm.org>
2775         * gcc.h (pfatal_with_name): Don't declare here.
2776         * gcc.c (pfatal_with_name): Make static.
2778 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
2780         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
2781         earlyclobber.
2783 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
2785         PR rtl-optimization/85458
2786         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
2787         priority hook to reduce the priority of EXPR.
2789 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
2791         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
2792         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
2793         with X87_ENABLE_FLOAT.  Remove preparation code.
2794         (*float<SWI48:mode><MODEF:mode>2): Rename from
2795         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
2796         math using "enabled" attribute.
2797         (*floatdi<MODEF:mode>2_i387): Rename from
2798         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
2799         enable for 32bit targets only.
2800         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
2801         splitter.
2802         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
2803         as operand 1 predicate.  Rewrite as define_insn_and_split.
2804         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
2806 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
2808         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
2809         to fallthru to FLOAT case.
2811 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
2813         PR target/86731
2814         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
2815         around folding of vec_sl to handle out of range shift values.
2817 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
2819         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
2820         Update callers to gen_fix_trunc<mode>_i387_fisttp
2821         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
2822         nonimmediate_operand.
2823         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
2824         and corresponding splitters.
2825         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
2826         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
2827         (fix_truncdi_i387_with_temp): Remove insn pattern
2828         and corresponding splitters.
2829         (fix_trunc<mode>_i387): Change operand 0 predicate to
2830         nonimmediate_operand.
2831         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
2832         and corresponding splitters.
2833         (*fistdi2_1): Remove.
2834         (fistdi2): Ditto.
2835         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
2836         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
2837         (*fist<mode>2_1): Remove.
2838         (fist<mode>2): Ditto.
2839         (fist<mode>2_with_temp): Remove insn pattern and corresponding
2840         splitters.
2841         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
2842         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
2843         (fistdi2_<rounding>): Change operand 0 predicate to
2844         nonimmediate_operand.
2845         (fistdi2_<rounding>_with_temp): Remove insn pattern
2846         and corresponding splitters.
2847         (fist<mode>2_<rounding>): Change operand 0 predicate to
2848         nonimmediate_operand.
2849         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
2850         and corresponding splitters.
2852         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
2854 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2856         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
2857         the init value.
2859 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
2861         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
2862         early gimple folding of vec_splat().
2863         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
2864         * gimple-fold.h: Add an extern define for tree_vec_extract().
2866 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
2868         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
2869         wrappers around TREE_TYPE comparisons.
2871 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2873         PR target/80080
2874         * config/s390/predicates.md: Add nonsym_memory_operand.
2875         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
2876         contains a SYMBOL_REF, load it into an intermediate pseudo.
2877         (s390_emit_compare_and_swap): Legitimize operand.
2878         * config/s390/s390.md: Use the new nonsym_memory_operand
2879         with UNSPECV_CAS patterns.
2881 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2883         PR target/80080
2884         * config/s390/s390-passes.def: New file.
2885         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
2886         declaration.
2887         (make_pass_s390_early_mach): Add declaration.
2888         * config/s390/s390.c (make_pass_s390_early_mach):
2889         (s390_option_override): Remove dynamic registration.
2890         * config/s390/t-s390: Add s390-passes.def.
2892 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2894         * config/s390/s390.c (s390_decompose_constant_pool_ref):
2895         Remove UNSPEC_LTREL_BASE check.
2896         (annotate_constant_pool_refs): Likewise.
2897         (find_constant_pool_ref): Likewise.
2898         (find_ltrel_base): Removed.
2899         (replace_ltrel_base): Removed.
2900         (s390_mainpool_finish): Remove replace_ltrel_base call.
2901         (s390_chunkify_start): Remove pending LTREL_BASE logic.
2902         (s390_chunkify_finish): Remove replace_ltrel_base call.
2903         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
2905 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
2907         PR target/86779
2908         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2909         to speculation_safe_value_not_needed.
2911 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
2912             Bernd Schmidt  <bernds_cb1@t-online.de>
2914         * config/nvptx/nvptx-opts.h: New file.
2915         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
2916         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
2917         (ASM_SPEC): Define.
2918         (TARGET_SM35): New macro.
2919         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
2920         correct predicate.
2921         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
2922         values.
2923         (misa=): New option.
2924         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
2926 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
2928         * config/i386/i386.md (truncdfsf2): Remove expander.
2929         (truncdfsf2_with_temp): Ditto.
2930         (truncxf<mode>2): Ditto.
2931         (*truncdfsf_fast_mixed): Remove insn pattern.
2932         (*truncdfsf_fast_i387): Ditto.
2933         (*truncdfsf_mixed): Ditto.
2934         (*truncdfsf_i387): Ditto.
2935         (*truncdfsf2_i387_1): Ditto.
2936         (*truncxfsf2_mixed): Ditto.
2937         (*truncxfdf2_mixed): Ditto.
2938         (*truncxf<mode>2_i387_noop): Ditto. Update callers
2939         to call gen_truncxf<mode>2 instead.
2940         (*truncxf<mode>2_i387): Remove.
2941         (reg->reg splitters): Remove splitter pattern.
2942         (reg->mem splitters): Ditto.
2944         (truncdfsf2): New insn pattern.
2945         (truncxf<mode>2): Ditto.
2947 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2949         * tree-ssa-math-opts.c (is_mult_by): New function.
2950         (is_square_of): Use the above.
2951         (optimize_recip_sqrt): New function.
2952         (pass_cse_reciprocals::execute): Use the above.
2954 2018-09-05  Richard Biener  <rguenther@suse.de>
2956         PR bootstrap/87134
2957         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
2958         to zero-init the emplaced vec.
2960 2018-09-05  Martin Liska  <mliska@suse.cz>
2962         PR tree-optimization/87205
2963         * tree-switch-conversion.c (pass_lower_switch::execute):
2964         Group cases for switch statements.
2966 2018-09-05  Richard Biener  <rguenther@suse.de>
2968         PR tree-optimization/87217
2969         * tree-ssa-sccvn.c (vuse_valueize): New.
2970         (vn_reference_lookup_pieces): Use it.
2971         (vn_reference_lookup): Likewise.
2973 2018-09-05  Nathan Sidwell  <nathan@acm.org>
2975         PR c++/87137
2976         * stor-layout.c (place_field): Scan forwards to check last
2977         bitfield when ms_bitfield_placement is in effect.
2979 2018-09-05  Richard Biener  <rguenther@suse.de>
2981         PR bootstrap/87225
2982         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
2983         return.
2985 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
2986             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
2988         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
2989         * config.gcc (extra_objs): Build it.
2990         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
2991         Likewise.
2992         * config/aarch64/aarch64-passes.def
2993         (pass_tag_collision_avoidance): New pass.
2994         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
2995         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
2996         (aarch64_classify_address): Remove static qualifier.
2997         (aarch64_address_info, aarch64_address_type): Move to...
2998         * config/aarch64/aarch64-protos.h: ... here.
2999         (make_pass_tag_collision_avoidance): New function.
3000         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
3001         New tuning flag.
3003 2018-09-05  Martin Liska  <mliska@suse.cz>
3005         * doc/gcov.texi: Update documentation of humar
3006         readable mode.
3007         * gcov.c (format_count): Print one decimal place, it provides
3008         more fine number of situations like '1G' vs. '1.4G'.
3010 2018-09-05  Martin Liska  <mliska@suse.cz>
3012         PR target/87164
3013         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
3014         * optc-gen.awk: Allow 'Var' for Deprecated options in order
3015         to generate a MASK value.
3017 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
3019         PR debug/86593
3020         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
3021         if frame pointer isn't used.
3022         (compute_frame_pointer_to_fb_displacement): Likewise.
3024 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
3026         PR target/87198
3027         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
3028         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
3029         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
3030         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
3031         and OPTION_MASK_ISA_XSAVEC_UNSET.
3033 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
3035         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
3036         XOR operations in NAND case.
3038 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
3040         * wide-int-range.cc (wide_int_range_convert): New.
3041         * wide-int-range.h (wide_int_range_convert): New.
3042         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
3043         code into wide_int_range_convert.
3044         (extract_range_into_wide_ints): Do not munge anti range constants
3045         into the entire domain.  Just return the range back.
3047 2018-09-04  Martin Liska  <mliska@suse.cz>
3049         * genmatch.c (output_line_directive): Add new argument
3050         fnargs.
3051         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
3053 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
3055         * doc/invoke.texi (Option Summary): Add whitespace.
3057         * doc/invoke.texi (Option Summary): Add -Waligned-new.
3059 2018-09-04  Richard Biener  <rguenther@suse.de>
3061         PR tree-optimization/87211
3062         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
3063         backedge value we're supposed to treat as VARYING also number
3064         the PHI to VARYING in case it got a different value-number already.
3066 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
3068         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
3069         (extract_range_from_binary_expr_1): Do not call
3070         vrp_can_optimize_bit_op.
3071         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
3072         static.
3073         (wide_int_range_get_mask_and_bounds): New.
3074         (wide_int_range_optimize_bit_op): New.
3075         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
3076         (wide_int_range_bit_and): Same.
3077         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
3078         (wide_int_range_optimize_bit_op): New.
3079         (wide_int_range_get_mask_and_bounds): New.
3081 2018-09-04  Richard Biener  <rguenther@suse.de>
3083         PR tree-optimization/87176
3084         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
3085         variable.  When value-numbering a virtual PHI node make sure
3086         to not value-number to the backedge value.
3088 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
3090         * doc/extend.texi (Long Long, Hex Floats): Document support for
3091         long long and hex floats in more recent versions of ISO C++.
3093 2018-09-03  Richard Biener  <rguenther@suse.de>
3095         PR tree-optimization/87177
3096         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
3097         cleanup.
3099 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3101         * bb-reorder.c (edge_order): Convert to C-qsort-style
3102         tri-state comparator.
3103         (reorder_basic_blocks_simple): Change std::stable_sort to
3104         gcc_stablesort.
3106 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3108         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
3109         tri-state comparator.
3110         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
3112 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3114         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
3115         (mergesort): ... here as maximum count for using netsort.
3116         (gcc_qsort): Set nlim to 3 if stable sort is requested.
3117         (gcc_stablesort): New.
3118         * system.h (gcc_stablesort): Declare.
3120 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3122         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
3123         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
3124         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
3126 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
3128         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
3129         lxsdx and stxsdx alternatives.
3130         (*mov<mode>_hardfloat64): Ditto.
3131         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
3133 2018-09-03  Richard Biener  <rguenther@suse.de>
3135         PR tree-optimization/87200
3136         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
3137         simplify result.
3139 2018-09-03  Martin Liska  <mliska@suse.cz>
3141         PR tree-optimization/87201
3142         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3143         Fix parenthesis in an expression.
3145 2018-09-03  Richard Biener  <rguenther@suse.de>
3147         PR tree-optimization/87197
3148         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
3149         visited.  CSE the VN_INFO hashtable lookup.
3151         PR tree-optimization/87169
3152         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
3153         iterating make sure there's no extra backedges from irreducible
3154         regions feeding the header.  Mark the destination block
3155         executable.
3157 2018-09-03  Martin Liska  <mliska@suse.cz>
3159         PR driver/83193
3160         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
3161         * common/common-targhooks.c (default_get_valid_option_values):
3162         New function.
3163         * common/common-targhooks.h (default_get_valid_option_values):
3164         Likewise.
3165         * common/config/i386/i386-common.c: Move processor_target_table
3166         from i386.c.
3167         (ix86_get_valid_option_values): New function.
3168         (TARGET_GET_VALID_OPTION_VALUES): New macro.
3169         * config/i386/i386.c (struct ptt): Move to i386-common.c.
3170         (PTA_*): Move all defined masks into i386-common.c.
3171         (ix86_function_specific_restore): Use new processor_cost_table.
3172         * config/i386/i386.h (struct ptt): Moved from i386.c.
3173         (struct pta): Likewise.
3174         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
3175         * doc/tm.texi.in: Likewise.
3176         * opt-suggestions.c (option_proposer::suggest_option):
3177         Pass prefix to build_option_suggestions.
3178         (option_proposer::get_completions): Likewise.
3179         (option_proposer::build_option_suggestions): Use the new target
3180         hook.
3181         * opts.c (struct option_help_tuple): New struct.
3182         (print_filtered_help): Use the new target hook.
3184 2018-09-03  Martin Liska  <mliska@suse.cz>
3186         PR middle-end/59521
3187         * predict.c (set_even_probabilities): Add likely_edges
3188         argument and handle cases where we have precisely one
3189         likely edge.
3190         (combine_predictions_for_bb): Catch also likely_edges.
3191         (tree_predict_by_opcode): Handle gswitch statements.
3192         * tree-cfg.h (find_case_label_for_value): New declaration.
3193         (find_taken_edge_switch_expr): Likewise.
3194         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3195         Find pivot in decision tree based on probabily, not by number of
3196         nodes.
3198 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
3200         * doc/standards.texi (Standards): Update Objective-C reference.
3202 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
3204         * doc/install.texi (Prerequisites): Update link for MPC.
3206 2018-09-01  Michael Matz  <matz@suse.de>
3208         PR tree-optimization/87074
3209         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
3210         PHIs for outer-loop uses.
3212 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
3214         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
3215         * doc/invoke.texi (C Dialect Options): Ditto.
3217 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
3219         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
3221 2018-08-31  Richard Biener  <rguenther@suse.de>
3223         PR tree-optimization/87168
3224         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
3225         (rpo_elim::eliminate_avail): When OP was not visited it must
3226         be available.
3228 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
3230         * tree-vrp.c (copy_value_range): Convert param "from" from
3231         "value_range *" to "const value_range *".
3232         (range_is_null): Likewise for param "vr".
3233         (range_int_cst_p): Likewise.
3234         (range_int_cst_singleton_p): Likewise.
3235         (symbolic_range_p): Likewise.
3236         (value_ranges_intersect_p): Likewise for both params.
3237         (value_range_nonnegative_p): Likewise for param "vr".
3238         (value_range_constant_singleton): Likewise.
3239         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
3240         (extract_range_into_wide_ints): Likewise for param "vr".
3241         (extract_range_from_multiplicative_op): Likewise for params "vr0"
3242         and "vr1".
3243         (vrp_can_optimize_bit_op): Likewise.
3244         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
3245         "vr1_".
3246         (extract_range_from_unary_expr): Likewise.
3247         (debug_value_range): Likewise for param "vr".
3248         (value_range::dump): Add "const" qualifier.
3249         (vrp_prop::check_array_ref): Convert local "vr" from
3250         "value_range *" to "const value_range *".
3251         (vrp_prop::check_mem_ref): Likewise.
3252         (vrp_prop::visit_stmt): Likewise for local "old_vr".
3253         (vrp_intersect_ranges_1): Likewise for param "vr_1".
3254         (vrp_intersect_ranges): Likewise.
3255         (simplify_stmt_for_jump_threading): Likewise for local "vr".
3256         (vrp_prop::vrp_finalize): Likewise.
3257         * tree-vrp.h (value_range::dump): Add "const" qualifier.
3258         (vrp_intersect_ranges): Add "const" qualifier to params as above.
3259         (extract_range_from_unary_expr): Likewise.
3260         (value_range_constant_singleton): Likewise.
3261         (symbolic_range_p): Likewise.
3262         (copy_value_range): Likewise.
3263         (extract_range_from_binary_expr_1): Likewise.
3264         (range_int_cst_p): Likewise.
3265         (vrp_set_zero_nonzero_bits): Likewise.
3266         (range_int_cst_singleton_p): Likewise.
3268 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
3270         * config/aarch64/arm_neon.h (vabsd_s64): New.
3271         (vnegd_s64): Likewise.
3273 2018-08-31  Martin Jambor  <mjambor@suse.cz>
3275         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
3277 2018-08-31  Martin Liska  <mliska@suse.cz>
3279         * ipa-icf.c (sem_item::add_type): Use
3280         sem_item::m_type_hash_cache.
3281         * ipa-icf.h: Move the cache from sem_item_optimizer
3282         to sem_item.
3284 2018-08-31  Nathan Sidwell  <nathan@acm.org>
3286         * doc/extend.texi (Backwards Compatibility): Remove implicit
3287         extern C leeway of () being (...).
3289 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3291         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
3293 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
3295         PR target/86684
3296         PR target/87149
3297         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
3299 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
3301         PR middle-end/87138
3302         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
3303         gen_int_mode.  Formatting fixes.
3305 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
3307         * target.def (custom_function_descriptors): Improve documentation.
3308         * doc/tm.texi.in (Trampolines): Expand discussion of function
3309         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
3310         beginning of the section.
3311         * doc/tm.texi: Regenerated.
3313 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
3315         * cfg.h (class auto_edge_flag): Spell out the template-id of the
3316         base class in the initializer list.  This is a workaround for
3317         building with older GCC.
3318         (class auto_bb_flag): Likewise.
3320 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
3322         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
3323         (altivec_vcmpequ<VI_char>_p): Remove star.
3324         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
3325         vector load modes.
3326         (expand_strncmp_vec_sequence): New function.
3327         (emit_final_str_compare_vec): New function.
3328         (expand_strn_compare): Add support for vector strncmp.
3329         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
3330         length specification to bytes.
3331         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
3332         (vcmpnezb_p): New pattern.
3333         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
3334         for option -mstring-compare-inline-limit.
3336 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
3338         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
3339         (PTA_SKYLAKE): Add PTA_AES.
3340         (PTA_GOLDMONT): Likewise.
3342 2018-08-29  Jan Hubicka  <jh@suse.cz>
3344         PR lto/86517
3345         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
3346         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
3348 2018-08-29  Jan Hubicka  <jh@suse.cz>
3350         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
3351         TYPE_STUB_DECL.
3352         (hash_tree): Do not visit TYPE_STUB_DECL.
3353         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
3354         stream TYPE_STUB_DECL.
3355         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
3356         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
3357         after free_lang_data.
3358         (type_in_anonymous_namespace_p): Likewise.
3360 2018-08-29  Jan Hubicka  <jh@suse.cz>
3362         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3363         comment that it has to be even number.
3364         (class sreal): Change m_sig type to int32_t.
3365         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3366         int64_t for temporary calculations.
3367         (sreal_verify_basics): Drop one bit from minimum and maximum.
3369 2018-08-30  Richard Biener  <rguenther@suse.de>
3371         PR tree-optimization/87147
3372         * tree-ssa-sccvn.c (SSA_VISITED): New function.
3373         (visit_phi): When the degenerate result is from the backedge and
3374         we didn't visit its definition yet drop to VARYING.
3375         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
3377 2018-08-29  Jan Hubicka  <jh@suse.cz>
3379         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
3380         DECL_VINDEX.
3381         (hash_tree): Likewise.
3383 2018-08-29  Jan Hubicka  <jh@suse.cz>
3385         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
3386         and TYPE_NEXT_REF_TO.
3388 2018-08-29  Jan Hubicka  <jh@suse.cz>
3390         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3391         comment that it has to be even number.
3392         (class sreal): Change m_sig type to int32_t.
3393         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3394         int64_t for temporary calculations.
3395         (sreal_verify_basics): Drop one bit from minimum and maximum.
3397 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
3399         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
3401 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
3403         PR middle-end/86995
3404         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
3405         if to_add is negative.
3407 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3409         PR middle-end/87053
3410         * builtins.c (c_strlen): Improve range checks.
3412 2018-08-29  Martin Sebor  <msebor@redhat.com>
3413             Jeff Law  <law@redhat.com>
3415         PR tree-optimization/86714
3416         PR tree-optimization/86711
3417         * builtins.c (c_strlen): Add arguments to call to string_constant.
3418         * expr.c (string_constant): Add argument.  Detect missing nul
3419         terminator and outermost declaration it's missing in.
3420         * expr.h (string_constant): Add argument.
3421         * fold-const.c (read_from_constant_string): Add arguments to call to
3422         string_constant.
3423         (c_getstr): Likewise.
3424         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3425         to string_constant.
3426         * tree-ssa-strlen.c (get_stridx): Likewise.
3428 2018-08-29  Jan Hubicka  <jh@suse.cz>
3430         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
3431         Do not stream DECL_VINDEX.
3432         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
3433         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
3434         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
3436 2018-08-29  Richard Biener  <rguenther@suse.de>
3438         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
3439         virtual operands that are not default defs to honor region
3440         boundaries.
3441         (rpo_vn_valueize): Remove ineffective code here.
3443 2018-08-29  Richard Biener  <rguenther@suse.de>
3445         PR tree-optimization/87132
3446         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
3447         when skipping defs reachable over backedges.
3449 2018-08-29  Richard Biener  <rguenther@suse.de>
3451         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
3452         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
3453         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
3454         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
3455         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
3456         (vn_reference_lookup_3): Remove use of const_parms.
3457         (free_rpo_vn): Do not free const_parms.
3458         (do_rpo_vn): Do not call init_const_parms.
3459         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
3460         SSA_NAME_POINTS_TO_READONLY_MEMORY.
3461         (call_may_clobber_ref_p_1): Likewise.
3463 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
3465         PR other/86726
3466         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
3467         (-O): Ditto.
3468         (-ftree-scev-cprop): Document.
3470 2018-08-29  Jan Hubicka  <jh@suse.cz>
3472         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
3473         parameters.
3474         (sreal constructor): Update.
3475         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
3476         sreal:operator/): Update.
3478 2018-08-29  Martin Liska  <mliska@suse.cz>
3480         * tree-switch-conversion.c (switch_conversion::expand):
3481         Strenghten assumption about gswitch statements.
3483 2018-08-29  Richard Biener  <rguenther@suse.de>
3485         PR tree-optimization/87117
3486         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
3487         re-value-number released SSA VDEFs.
3489 2018-08-29  Richard Biener  <rguenther@suse.de>
3491         PR tree-optimization/87126
3492         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
3494 2018-08-28  Jim Wilson  <jimw@sifive.com>
3496         * config/riscv/pic.md: Rewrite.
3497         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
3498         invalid address.
3499         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
3500         (SOFTF, default_load, softload, softstore): New.
3502 2018-08-28  Jeff Law  <law@redhat.com>
3504         * fold-const.c (fold_binary_loc): Remove recently added assert.
3506 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
3508         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
3509         to OP parmeter of generated function.
3511 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
3513         PR tree-optimization/87009
3514         * match.pd: Add boolean optimizations.
3516 2018-08-28  Martin Sebor  <msebor@redhat.com>
3518         PR middle-end/86631
3519         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
3520         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
3521         (pass_walloca::gate): Use it.
3522         (alloca_call_type): Same.
3523         (pass_walloca::execute): Same.
3524         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
3526 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
3528         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
3529         GCC_VERSION for usage of "__gcc_dump_printf__" format from
3530         >= 3005 to >= 9000.
3532 2018-08-28  Richard Biener  <rguenther@suse.de>
3534         PR tree-optimization/87124
3535         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
3536         constants before looking up avail.
3538 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
3540         PR middle-end/87099
3541         * calls.c (maybe_warn_nonstring_arg): Punt early if
3542         warn_stringop_overflow is zero.  Don't call get_range_strlen
3543         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
3544         Swap comparison operands to have constants on rhs.  Only use
3545         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
3546         increment lenrng[0].
3548 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
3550         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
3551         use of tree_to_shwi.  Remove duplicated test for the size being
3552         a whole number of bytes.
3554 2018-08-28  Richard Biener  <rguenther@suse.de>
3556         PR tree-optimization/87117
3557         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
3558         Handle removed stmt without LHS (GIMPLE_NOP).
3560 2018-08-28  Richard Biener  <rguenther@suse.de>
3562         PR tree-optimization/87117
3563         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
3564         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
3566 2018-08-28  Richard Biener  <rguenther@suse.de>
3568         PR tree-optimization/87117
3569         * tree-ssa-pre.c (compute_avail): Do not make expressions
3570         with predicated values available.
3571         (get_expr_value_id): Assert we do not run into predicated value
3572         expressions.
3574 2018-08-28  Richard Biener  <rguenther@suse.de>
3576         PR tree-optimization/87117
3577         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
3578         get virtual operands.
3579         (get_expr_operands): Handle STRING_CST like other decls.
3581 2018-08-28  Martin Liska  <mliska@suse.cz>
3583         * tree.h: Update documentation of fndecl_built_in_p
3584         functions.
3587 2018-08-27  Jeff Law  <law@redhat.com>
3588         PR tree-optimization/87110
3589         * tree-ssa-dse.c (compute_trims): Handle non-constant
3590         TYPE_SIZE_UNIT.
3592 2018-08-27  Martin Sebor  <msebor@redhat.com>
3594         PR tree-optimization/86914
3595         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
3597 2018-08-27  Martin Sebor  <msebor@redhat.com>
3599         PR tree-optimization/87112
3600         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
3601         the type of the bound argument.
3603 2018-08-27  Jeff Law  <law@redhat.com>
3605         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
3606         type does not have a TYPE_SIZE_UNIT.
3608 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
3610         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
3611         with include of backend.h.
3613 2018-08-27  Richard Biener  <rguenther@suse.de>
3615         PR tree-optimization/86927
3616         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
3617         use const cond reduction code.
3619 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
3621         PR tree-optimization/85758
3622         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
3624 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
3626         PR c++/87091
3627         * diagnostic-show-locus.c (class layout_range): Update for
3628         conversion of show_caret_p to a tri-state.
3629         (layout_range::layout_range): Likewise.
3630         (make_range): Likewise.
3631         (layout::maybe_add_location_range): Likewise.
3632         (layout::should_print_annotation_line_p): Don't show annotation
3633         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
3634         (layout::get_state_at_point): Update for conversion of
3635         show_caret_p to a tri-state.  Bail out early for
3636         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
3637         underlining or source colorization.
3638         (gcc_rich_location::add_location_if_nearby): Update for conversion
3639         of show_caret_p to a tri-state.
3640         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
3641         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
3642         Likewise.
3643         (selftest::test_one_liner_labels): Likewise.
3644         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
3645         conversion of show_caret_p to a tri-state.
3646         * pretty-print.c (text_info::set_location): Likewise.
3647         * pretty-print.h (text_info::set_location): Likewise.
3648         * substring-locations.c (format_warning_n_va): Likewise.
3649         * tree-diagnostic.c (default_tree_printer): Likewise.
3650         * tree-pretty-print.c (newline_and_indent): Likewise.
3652 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
3654         PR c++/87091
3655         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
3656         line above for line-insertion fix-it hints.
3657         (selftest::test_fixit_insert_containing_newline): Update the
3658         expected results, and add a test with line-numbering enabled.
3660 2018-08-27  Martin Liska  <mliska@suse.cz>
3662         PR sanitizer/86962
3663         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
3664         params with DECL_HAS_VALUE_EXPR_P.
3666 2018-08-27  Martin Liska  <mliska@suse.cz>
3668         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
3669         selected expansion strategy.
3671 2018-08-27  Martin Liska  <mliska@suse.cz>
3673         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
3674         * builtins.c (is_builtin_fn): Likewise.
3675         * attribs.c (diag_attr_exclusions): Use new function
3676         fndecl_built_in_p and remove check for FUNCTION_DECL if
3677         possible.
3678         (builtin_mathfn_code): Likewise.
3679         (fold_builtin_expect): Likewise.
3680         (fold_call_expr): Likewise.
3681         (fold_builtin_call_array): Likewise.
3682         (fold_call_stmt): Likewise.
3683         (set_builtin_user_assembler_name): Likewise.
3684         (is_simple_builtin): Likewise.
3685         * calls.c (gimple_alloca_call_p): Likewise.
3686         (maybe_warn_nonstring_arg): Likewise.
3687         * cfgexpand.c (expand_call_stmt): Likewise.
3688         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
3689         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
3690         (cgraph_node::verify_node): Likewise.
3691         * cgraphclones.c (build_function_decl_skip_args): Likewise.
3692         (cgraph_node::create_clone): Likewise.
3693         * config/arm/arm.c (arm_insert_attributes): Likewise.
3694         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
3695         * dse.c (scan_insn): Likewise.
3696         * expr.c (expand_expr_real_1): Likewise.
3697         * fold-const.c (operand_equal_p): Likewise.
3698         (fold_binary_loc): Likewise.
3699         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
3700         * gimple-low.c (lower_stmt): Likewise.
3701         * gimple-pretty-print.c (dump_gimple_call): Likewise.
3702         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
3703         Likewise.
3704         * gimple.c (gimple_build_call_from_tree): Likewise.
3705         (gimple_call_builtin_p): Likewise.
3706         (gimple_call_combined_fn): Likewise.
3707         * gimplify.c (gimplify_call_expr): Likewise.
3708         (gimple_boolify): Likewise.
3709         (gimplify_modify_expr): Likewise.
3710         (gimplify_addr_expr): Likewise.
3711         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
3712         * ipa-cp.c (determine_versionability): Likewise.
3713         * ipa-fnsummary.c (compute_fn_summary): Likewise.
3714         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
3715         * ipa-split.c (visit_bb): Likewise.
3716         (split_function): Likewise.
3717         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3718         * lto-cgraph.c (input_node): Likewise.
3719         * lto-streamer-out.c (write_symbol): Likewise.
3720         * omp-low.c (setjmp_or_longjmp_p): Likewise.
3721         (lower_omp_1): Likewise.
3722         * predict.c (strip_predict_hints): Likewise.
3723         * print-tree.c (print_node): Likewise.
3724         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
3725         * trans-mem.c (is_tm_irrevocable): Likewise.
3726         (is_tm_load): Likewise.
3727         (is_tm_simple_load): Likewise.
3728         (is_tm_store): Likewise.
3729         (is_tm_simple_store): Likewise.
3730         (is_tm_abort): Likewise.
3731         (tm_region_init_1): Likewise.
3732         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
3733         * tree-cfg.c (verify_gimple_call): Likewise.
3734         (move_stmt_r): Likewise.
3735         (stmt_can_terminate_bb_p): Likewise.
3736         * tree-eh.c (lower_eh_constructs_2): Likewise.
3737         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
3738         * tree-inline.c (remap_gimple_stmt): Likewise.
3739         (copy_bb): Likewise.
3740         (estimate_num_insns): Likewise.
3741         (fold_marked_statements): Likewise.
3742         * tree-sra.c (scan_function): Likewise.
3743         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
3744         (optimize_stack_restore): Likewise.
3745         (pass_fold_builtins::execute): Likewise.
3746         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
3747         (mark_all_reaching_defs_necessary_1): Likewise.
3748         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
3749         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3750         (pass_forwprop::execute): Likewise.
3751         * tree-ssa-loop-im.c (stmt_cost): Likewise.
3752         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3753         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
3754         * tree-ssa-strlen.c (get_string_length): Likewise.
3755         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
3756         (find_func_aliases_for_call): Likewise.
3757         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
3758         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
3759         * tree-tailcall.c (find_tail_calls): Likewise.
3760         * tree.c (need_assembler_name_p): Likewise.
3761         (free_lang_data_in_decl): Likewise.
3762         (get_call_combined_fn): Likewise.
3763         * ubsan.c (is_ubsan_builtin_p): Likewise.
3764         * varasm.c (incorporeal_function_p): Likewise.
3765         * tree.h (DECL_BUILT_IN): Remove and replace with
3766         fndecl_built_in_p.
3767         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
3768         (fndecl_built_in_p): New.
3770 2018-08-27  Martin Liska  <mliska@suse.cz>
3772         PR tree-optimization/86847
3773         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
3774         Dump also subtree probability.
3775         (switch_decision_tree::do_jump_if_equal): New function.
3776         (switch_decision_tree::emit_case_nodes): Handle special
3777         situations in balanced tree that can be emitted much simpler.
3778         Fix calculation of probabilities that happen in tree expansion.
3779         * tree-switch-conversion.h (struct cluster): Add
3780         is_single_value_p.
3781         (struct simple_cluster): Likewise.
3782         (struct case_tree_node): Add new function has_child.
3783         (do_jump_if_equal): New.
3785 2018-08-27  Martin Liska  <mliska@suse.cz>
3787         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
3788         Add new argument to bit_test_cluster constructor.
3789         (bit_test_cluster::emit): Set bits really number of values
3790         handlel by a test.
3791         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
3792         probability argument.
3793         * tree-switch-conversion.h (struct bit_test_cluster):
3794         Add m_handles_entire_switch.
3796 2018-08-27  Martin Liska  <mliska@suse.cz>
3798         PR tree-optimization/86702
3799         * tree-switch-conversion.c (jump_table_cluster::emit):
3800         Make probabilities even for values in jump table
3801         according to number of cases handled.
3802         (switch_decision_tree::compute_cases_per_edge): Pass
3803         argument to reset_out_edges_aux function.
3804         (switch_decision_tree::analyze_switch_statement): Likewise.
3805         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
3806         Make it static.
3808 2018-08-27  Martin Liska  <mliska@suse.cz>
3810         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
3811         cfun argument explicitly.
3812         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
3813         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
3814         function gimple_switch_default_bb.
3815         (convert_switch_statements):
3816         (expand_builtins):
3817         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
3818         * stmt.c (label_to_block_fn): Use label_to_block and pass
3819         cfun argument explicitly and use gimple_switch_label_bb.
3820         (expand_case): Likewise.
3821         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
3822         cfun argument explicitly. Likewise.
3823         (make_edges_bb): Likewise.
3824         (make_cond_expr_edges): Likewise.
3825         (get_cases_for_edge): Likewise.
3826         (make_gimple_switch_edges): Likewise.
3827         (label_to_block_fn): Likewise.
3828         (label_to_block): Likewise.
3829         (make_goto_expr_edges): Likewise.
3830         (make_gimple_asm_edges): Likewise.
3831         (main_block_label): Likewise.
3832         (group_case_labels_stmt): Likewise.
3833         (find_taken_edge_computed_goto): Likewise.
3834         (find_taken_edge_switch_expr): Likewise.
3835         (gimple_verify_flow_info): Likewise.
3836         (gimple_redirect_edge_and_branch): Likewise.
3837         (gimple_switch_label_bb): New function.
3838         (gimple_switch_default_bb): Likewise.
3839         (gimple_switch_edge): Likewise.
3840         (gimple_switch_default_edge): Likewise.
3841         * tree-cfg.h (label_to_block_fn): Remove and replace ...
3842         (label_to_block): ... with this.
3843         (gimple_switch_label_bb): New.
3844         (gimple_switch_default_bb): Likewise.
3845         (gimple_switch_edge): Likewise.
3846         (gimple_switch_default_edge): Likewise.
3847         * tree-cfgcleanup.c (convert_single_case_switch): Use
3848         new gimple functions and pass new argument to label_to_block.
3849         (cleanup_control_flow_bb):
3850         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
3851         cfun argument explicitly.
3852         (make_eh_edges): Likewise.
3853         (redirect_eh_dispatch_edge): Likewise.
3854         (lower_resx): Likewise.
3855         (lower_eh_dispatch): Likewise.
3856         (maybe_remove_unreachable_handlers): Likewise.
3857         (unsplit_eh): Likewise.
3858         (cleanup_empty_eh): Likewise.
3859         (verify_eh_edges): Likewise.
3860         (verify_eh_dispatch_edge): Likewise.
3861         * tree-ssa-dom.c (record_edge_info): Likewise.
3862         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
3863         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
3864         (thread_through_normal_block): Likewise.
3865         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
3866         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
3867         * tree-switch-conversion.c (switch_conversion::collect): Use new
3868         gimple functions.
3869         (switch_conversion::check_final_bb): Likewise.
3870         (switch_conversion::gather_default_values): Pass new argument
3871         to label_to_block.
3872         (switch_conversion::build_constructors): Likewise.
3873         (switch_decision_tree::compute_cases_per_edge): Use new
3874         gimple_switch_edge function.
3875         (switch_decision_tree::analyze_switch_statement): Pass new argument
3876         to label_to_block.
3877         (switch_decision_tree::try_switch_expansion): Use
3878         gimple_switch_default_edge.
3879         * tree-vrp.c (find_switch_asserts): Pass new argument
3880         to label_to_block.
3881         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
3882         (vr_values::simplify_switch_using_ranges): Likewise.
3884 2018-08-27  Richard Biener  <rguenther@suse.de>
3886         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
3887         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
3889         * tree-ssa-sccvn.h (struct vn_pval): New structure.
3890         (struct vn_nary_op_s): Add unwind_to member.  Add
3891         predicated_values flag and put result into a union together
3892         with a linked list of vn_pval.
3893         (struct vn_ssa_aux): Add name member to make maintaining
3894         a map of SSA name to vn_ssa_aux possible.  Remove no longer
3895         needed info, dfsnum, low, visited, on_sccstack, use_processed
3896         and range_info_anti_range_p members.
3897         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
3898         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
3899         New functions.
3900         (vn_valueize): New global.
3901         (vn_context_bb): Likewise.
3902         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
3903         VN_INFO_PTR_INFO): Remove.
3904         * tree-ssa-sccvn.c: ... (rewrite)
3905         (pass_fre::execute): For -O2+ initialize loops and run
3906         RPO VN in optimistic mode (iterating).  For -O1 and -Og
3907         run RPO VN in non-optimistic mode.
3908         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
3909         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
3910         * doc/invoke.texi (sccvn-max-scc-size): Remove.
3911         (rpo-vn-max-loop-depth): Document.
3912         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
3913         when valuezing the VUSE signals we walked out of the region.
3914         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
3915         (phi_translate): Set VN context block to use for availability
3916         lookup.
3917         (compute_avail): Likewise.
3918         (pre_valueize): New function.
3919         (pass_pre::execute): Adjust to the RPO VN API.
3921         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
3922         (propagate_constants_for_unrolling): Remove.
3923         (tree_unroll_loops_completely): Perform value-numbering
3924         on the unrolled bodies loop parent.
3926 2018-08-27  Richard Biener  <rguenther@suse.de>
3928         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
3929         for partial antic compute.
3931 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
3933         PR rtl-optimization/87065
3934         * combine.c (simplify_if_then_else): Formatting fix.
3935         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
3936         check.
3937         (known_cond): Don't return const_true_rtx for vector modes.  Use
3938         CONST0_RTX instead of const0_rtx.  Formatting fixes.
3940 2018-08-27  Martin Liska  <mliska@suse.cz>
3942         PR gcov-profile/87069
3943         * gcov.c (process_file): Record files already processed
3944         and warn about a file being processed multiple times.
3946 2018-08-27  Martin Liska  <mliska@suse.cz>
3948         PR driver/83193
3949         * config/aarch64/aarch64.c (aarch64_override_options_internal):
3950         Set default values for x_aarch64_*_string strings.
3951         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
3952         prefix.  For -mabi do not print '=ABI' in help and use
3953         <option_value> format for -msve-vector-bits and -moverride
3954         options.
3956 2018-08-26  Jeff Law  <law@redhat.com>
3958         * config/mips/frame-header-opt.c: Include "backend.h" rather than
3959         "cfg.h"
3961 2018-08-26  Marek Polacek  <polacek@redhat.com>
3963         PR c++/87029, Implement -Wredundant-move.
3964         * doc/invoke.texi: Document -Wredundant-move.
3966 2018-08-25  Martin Sebor  <msebor@redhat.com>
3968         PR tree-optimization/87059
3969         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
3970         to the same type as the other.
3971         * fold-const.c (fold_binary_loc): Assert expectation.
3973 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
3975         * config/darwin.c (machopic_legitimize_pic_address): Clean up
3976         extraneous parentheses, dead code section and formatting.
3978 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
3980         PR c++/87091
3981         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
3982         wide enough for jumps in the line-numbering to be visible.
3983         (layout::print_gap_in_line_numbering): New member function.
3984         (layout::calculate_line_spans): When using line numbering, merge
3985         line spans that are only 1 line apart.
3986         (diagnostic_show_locus): When printing line numbers, show gaps in
3987         line numbering directly, rather than printing headers.
3988         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
3989         line-numbering with multiple line spans.
3990         (selftest::test_fixit_insert_containing_newline_2): Add test of
3991         line-numbering, in which the spans are close enough to be merged.
3993 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
3995         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
3996         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
3997         * tree-vrp.c (range_is_nonnull): Remove.
3998         (range_includes_zero_p): Accept value_range instead of min/max.
3999         (extract_range_from_binary_expr_1): Do not early bail on
4000         POINTER_PLUS_EXPR.
4001         Use range_includes_zero_p instead of range_is_nonnull.
4002         (extract_range_from_unary_expr): Use range_includes_zero_p instead
4003         of range_is_nonnull.
4004         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
4005         special case VR_ANTI_RANGE.
4006         (vrp_finalize): Same.
4007         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
4008         instead of min/max.
4009         (range_is_nonnull): Remove.
4010         * vr-values.c (vrp_stmt_computes_nonzero): Use
4011         range_includes_zero_p instead of range_is_nonnull.
4012         (extract_range_basic): Pass value_range to range_includes_zero_p
4013         instead of range_is_nonnull.
4015 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
4017         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
4018         * emit-rtl.h (rtl_data): Remove return_bnd.
4019         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
4020         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
4021         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
4022         (POINTER_BOUNDS_MODE): Remove definition.
4023         (make_pointer_bounds_mode): Remove.
4024         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
4025         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
4026         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
4027         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
4028         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
4029         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
4030         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
4032         * config/i386/i386-modes.def (BND32, BND64): Remove.
4033         * config/i386/i386.c (dbx_register_map): Remove bound registers.
4034         (dbx64_register_map): Ditto.
4035         (svr4_dbx_register_map): Ditto.
4036         (indirect_thunk_bnd_needed): Remove.
4037         (indirect_thunks_bnd_used): Ditto.
4038         (indirect_return_bnd_needed): Ditto.
4039         (indirect_return_via_cx_bnd): Ditto.
4040         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
4041         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
4042         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
4043         (output_indirect_thunk_function): Remove handling of
4044         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
4045         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
4046         (ix86_save_reg): Remove handling of crtl->return_bnd.
4047         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
4048         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
4049         and UNSPEC_BNDLX_ADDR.
4050         (ix86_output_indirect_branch_via_reg): Remove handling of
4051         indirect_thunk_prefix_bnd.
4052         (ix86_output_indirect_branch_via_push): Ditto.
4053         (ix86_output_function_return): Ditto.
4054         (ix86_output_indirect_function_return): Ditto.
4055         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
4056         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
4057         (CALL_USED_REGISTERS): Ditto.
4058         (REG_ALLOC_ORDER): Update for removal of bound registers.
4059         (HI_REGISTER_NAMES): Ditto.
4060         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
4061         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
4062         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
4063         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
4064         (FIRST_PSEUDO_REG): Update.
4065         (BND): Remove mode iterator.
4066         * config/i386/predicates.md (bnd_mem_operator): Remove.
4068 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
4070         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
4071         vectors.
4073 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
4075         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
4076         the case in which the permute needs only a single element and
4077         repeats for every vector of the result.  Extend that case to
4078         handle variable-length vectors.
4079         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4081 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
4083         PR debug/79342
4084         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
4085         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
4087 2018-08-24  Richard Biener  <rguenther@suse.de>
4089         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
4090         bb_flags_allocated members.
4091         (auto_flag): New RAII class for allocating flags.
4092         (auto_edge_flag): New RAII class for allocating edge flags.
4093         (auto_bb_flag): New RAII class for allocating bb flags.
4094         * cfgloop.c (verify_loop_structure): Allocate temporary edge
4095         flag dynamically.
4096         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
4097         in favor of temporarily allocated BB flag.
4098         * hsa-brig.c: Re-order includes.
4099         * hsa-dump.c: Likewise.
4100         * hsa-regalloc.c: Likewise.
4101         * print-rtl.c: Likewise.
4102         * profile-count.c: Likewise.
4104 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
4106         PR target/86989
4107         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
4108         the TOC register.
4110 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
4112         PR 87073/bootstrap
4113         * wide-int-range.cc (wide_int_range_div): Do not ignore result
4114         from wide_int_range_multiplicative_op.
4116 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4118         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
4119         "permutaion".
4121 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
4123         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
4124         to 'expanded'.
4126 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
4128         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
4129         full GENERIC expression used for replacement.
4131 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
4133         * tree-vrp.c (abs_extent_range): Remove.
4134         (extract_range_into_wide_ints): Pass wide ints by reference.
4135         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
4136         Pass wide ints by reference in all calls to
4137         extract_range_into_wide_ints.
4138         * wide-int-range.cc (wide_int_range_div): New.
4139         * wide-int-range.h (wide_int_range_div): New.
4140         (wide_int_range_includes_zero_p): New.
4141         (wide_int_range_zero_p): New.
4143 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
4145         * config/aarch64/aarch64.md (arches): New enum.
4146         (arch): New enum attr.
4147         (arch_enabled): New attr.
4148         (enabled): Now uses arch_enabled only.
4149         (simd, sve, fp16): Removed attribute.
4150         (fp): Attr now defined in terms of 'arch'.
4151         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
4152         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
4153         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
4154         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
4155         attributes into 'arch'.
4156         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
4157         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
4158         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
4159         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
4160         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
4161         'simd' attribute into 'arch'.
4162         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
4163         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
4164         Convert use of 'fp' attribute to 'arch'.
4165         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
4166         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
4167         into 'arch'.
4168         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
4169         (different modes) Merge 'fp' and 'simd' into 'arch'.
4170         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
4171         'simd' into 'arch'.
4173 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
4175         PR rtl-optimization/87026
4176         * expmed.c (canonicalize_comparison): If we can no longer create
4177         pseudoregisters, don't.
4179 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
4181         PR target/86951
4182         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
4183         prototype.
4184         * config/arm/arm.c (speculation_barrier_libfunc): New static
4185         variable.
4186         (arm_init_libfuncs): Initialize it.
4187         (arm_emit_speculation_barrier): New function.
4188         * config/arm/arm.md (speculation_barrier): Call
4189         arm_emit_speculation_barrier for architectures that do not have
4190         DSB or ISB.
4191         (speculation_barrier_insn): Only match on Armv7 or later.
4193 2018-08-23  Richard Biener  <rguenther@suse.de>
4195         PR middle-end/87024
4196         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
4197         calls.
4199 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
4201         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
4202         of single-vector TBLs.
4203         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
4204         one input is given.
4206 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
4208         PR target/85910
4209         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
4210         aarch64_evpc_tbl guard.
4212 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4214         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
4215         behaviour.
4217 2018-08-22  Martin Sebor  <msebor@redhat.com>
4219         PR middle-end/87052
4220         * tree-pretty-print.c (pretty_print_string): Add argument.
4221         (dump_generic_node): Call to pretty_print_string with string size.
4223 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
4225         PR rtl-optimization/86771
4226         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
4227         of two SETs into those two SETs, one to be placed at i2, if that SETs
4228         destination is modified between i2 and i3.
4230 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4232         PR tree-optimization/86725
4233         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
4234         function.
4235         (vect_analyze_scalar_cycles_1): Check it.
4237 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4239         PR tree-optimization/86725
4240         * tree-vect-loop.c (vect_is_simple_reduction): When treating
4241         an outer loop phi as a double reduction, make sure that the
4242         single user of the phi result is an inner loop phi.
4244 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4246         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
4247         grouped stores with gaps to a strided group.
4249 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4251         * tree-vect-stmts.c (get_group_load_store_type)
4252         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
4253         first statement in a group.
4255 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4257         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
4258         the sequence used in gcc/gcc.c.
4260 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4262         PR other/704
4263         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
4264         building it.
4266 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4268         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
4269         Darwin10-specific unwinder-shim.
4270         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
4271         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
4272         New to cater for Darwin10 Rosetta.
4274 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4276         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
4277         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
4279 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4281         PR bootstrap/81033
4282         PR target/81733
4283         PR target/52795
4284         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
4285         (dwarf2out_switch_text_section): Generate a local label for the
4286         second function sub-section and apply it as the second FDE start
4287         label.
4288         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
4289         second sub-section start.
4291 2018-08-22  Richard Biener  <rguenther@suse.de>
4293         PR tree-optimization/86988
4294         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
4296 2018-08-22  Richard Biener  <rguenther@suse.de>
4298         PR tree-optimization/86945
4299         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
4301 2018-08-22  Alexandre Oliva <oliva@adacore.com>
4303         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
4304         a comment about how uses of r2 for .sdata2 come about.
4306 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
4308         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
4310 2018-08-21  Marek Polacek  <polacek@redhat.com>
4312         PR c++/86981, Implement -Wpessimizing-move.
4313         * doc/invoke.texi: Document -Wpessimizing-move.
4315 2018-08-21  Jan Hubicka  <jh@suse.cz>
4317         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
4318         * tree.h (is_redundant_typedef): Remove.
4319         * dwarf2out.c (is_redundant_typedef): Turn into static function.
4321 2018-08-21  Jan Hubicka  <jh@suse.cz>
4323         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
4324         when possible.
4326 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
4328         * expmed.c (extract_low_bits): Reject invalid subregs early.
4330 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4332         PR middle-end/86121
4333         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
4334         behaviour.
4336 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4338         * config/vxworks.h: Guard vxworks_asm_out_constructor and
4339         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
4340         * config/vxworks.c: Likewise.
4342 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4344         * config/vxworks.c: Set targetm.have_ctors_dtors
4345         if HAVE_INITFINI_ARRAY_SUPPORT.
4346         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
4347         if HAVE_INITFINI_ARRAY_SUPPORT.
4349 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4351         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
4352         default search path for VxWorks < 7.
4354 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4356         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
4357         (get_format_string): Refer to c_getstr.
4359 2018-08-21  Tom de Vries  <tdevries@suse.de>
4361         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4362         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4363         (debuginfo_early_stop): Declare.
4364         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4365         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4366         (debuginfo_early_stop): New function.
4367         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
4368         and debuginfo_early_stop.
4369         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
4370         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
4371         (general_init): Call debuginfo_early_init.
4372         (finalize): Call debuginfo_fini.
4373         (do_compile): Call debuginfo_init.
4374         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
4375         -fdump-early-debug.
4376         (@item -fdump-debug, @item -fdump-earlydebug): Add.
4378 2018-08-21  Tom de Vries  <tdevries@suse.de>
4380         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
4381         flag_dump_noaddr and flag_dump_unnumbered.
4383 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
4385         * wide-int-range.cc (wide_int_range_abs): New.
4386         (wide_int_range_order_set): Rename from wide_int_range_min_max.
4387         * wide-int-range.h (wide_int_range_abs): New.
4388         (wide_int_range_min_max): New.
4389         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
4390         case to call wide_int_range_abs.
4391         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
4392         (extract_range_from_abs_expr): Delete.
4394 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
4396         PR target/87033
4397         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
4398         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
4399         for indexed loads.
4401 2018-08-20  Nathan Sidwell  <nathan@acm.org>
4402             Jeff Law <law@redhat.com>
4404         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
4405         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
4407 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
4409         PR other/84889
4410         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
4411         (decl_attributes): Likewise.
4412         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
4413         instance.
4414         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4415         * diagnostic-core.h (class auto_diagnostic_group): New class.
4416         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
4417         (diagnostic_report_diagnostic): Handle the first diagnostics within
4418         a group.
4419         (emit_diagnostic): Add auto_diagnostic_group instance.
4420         (inform): Likewise.
4421         (inform_n): Likewise.
4422         (warning): Likewise.
4423         (warning_at): Likewise.
4424         (warning_n): Likewise.
4425         (pedwarn): Likewise.
4426         (permerror): Likewise.
4427         (error): Likewise.
4428         (error_n): Likewise.
4429         (error_at): Likewise.
4430         (sorry): Likewise.
4431         (fatal_error): Likewise.
4432         (internal_error): Likewise.
4433         (internal_error_no_backtrace): Likewise.
4434         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
4435         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
4436         * diagnostic.h (struct diagnostic_context): Add fields
4437         "diagnostic_group_nesting_depth",
4438         "diagnostic_group_emission_count", "begin_group_cb",
4439         "end_group_cb".
4440         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
4441         Add auto_diagnostic_group instance(s).
4442         (find_explicit_erroneous_behavior): Likewise.
4443         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
4444         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
4445         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
4446         (gimplify_va_arg_expr): Likewise.
4447         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
4448         (HSA_SORRY_AT): Likewise.
4449         * ipa-devirt.c (compare_virtual_tables): Likewise.
4450         (warn_odr): Likewise.
4451         * multiple_target.c (expand_target_clones): Likewise.
4452         * opts-common.c (cmdline_handle_error): Likewise.
4453         * reginfo.c (globalize_reg): Likewise.
4454         * substring-locations.c (format_warning_n_va): Likewise.
4455         * tree-inline.c (expand_call_inline): Likewise.
4456         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
4457         * tree-ssa-loop-niter.c
4458         (do_warn_aggressive_loop_optimizations): Likewise.
4459         * tree-ssa-uninit.c (warn_uninit): Likewise.
4460         * tree.c (warn_deprecated_use): Likewise.
4462 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
4464         PR target/87014
4465         * config/i386/i386.md (eh_return): Always update EH return
4466         address in word_mode.
4468 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
4470         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
4471         TARGET_SPLIT_COMPLEX_ARG is defined.
4473 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4475         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
4477 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4479         PR target/86984
4480         * expr.c (expand_assignment): Assert that bitpos is positive.
4481         (store_field): Likewise
4482         (expand_expr_real_1): Make sure that bitpos is positive.
4483         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
4484         integer overflow.
4486 2018-08-20  Nathan Sidwell  <nathan@acm.org>
4488         * Makefile.in (CPP_ID_DATA_H): Delete.
4489         (CPP_INTERNAL_H): Don't add it.
4490         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
4491         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
4493 2018-08-20  Richard Biener  <rguenther@suse.de>
4495         PR tree-optimization/78655
4496         * tree-vrp.c (extract_range_from_binary_expr_1): Make
4497         pointer + offset nonnull if either operand is nonnull work.
4499 2018-08-20  Tom de Vries  <tdevries@suse.de>
4501         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
4502         unless the referenced die describes the added property using
4503         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
4504         Otherwise, add a DW_AT_location to the referenced die.
4506 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
4508         PR target/86994
4509         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
4510         register_operand when calling ix86_set_reg_reg_cost.
4511         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
4512         Set *total to 0 for operands that satisfy x86_64_immediate_operand
4513         predicate and to 1 otherwise.
4515 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
4517         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
4518         emit a diagnostic that it is not supported and reset the option.
4519         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
4520         supported and consume the option.  (ASM_FINAL_SPEC): New.
4522 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
4524         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
4525         a sentence.
4527 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
4529         C-SKY port: Documentation
4531         * doc/extend.texi (C-SKY Function Attributes): New section.
4532         * doc/invoke.texi (Option Summary): Add C-SKY options.
4533         (C-SKY Options): New section.
4534         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
4536 2018-08-17  Jojo  <jijie_rong@c-sky.com>
4537             Huibin Wang  <huibin_wang@c-sky.com>
4538             Sandra Loosemore  <sandra@codesourcery.com>
4539             Chung-Lin Tang  <cltang@codesourcery.com>
4541         C-SKY port: Backend implementation
4543         * config/csky/*: New.
4544         * common/config/csky/*: New.
4546 2018-08-17  Jojo  <jijie_rong@c-sky.com>
4547             Huibin Wang  <huibin_wang@c-sky.com>
4548             Sandra Loosemore  <sandra@codesourcery.com>
4549             Chung-Lin Tang  <cltang@codesourcery.com>
4550             Andrew Jenner  <andrew@codesourcery.com>
4552         C-SKY port: Configury
4554         * config.gcc (csky-*-*): New.
4555         * configure.ac: Add csky to targets for dwarf2 debug_line support.
4556         * configure: Regenerated.
4558 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
4560         * dump-context.h: Include "dumpfile.h".
4561         (dump_context::dump_printf_va): Convert final param from va_list
4562         to va_list *.  Convert from ATTRIBUTE_PRINTF to
4563         ATTRIBUTE_GCC_DUMP_PRINTF.
4564         (dump_context::dump_printf_loc_va): Likewise.
4565         * dumpfile.c: Include "stringpool.h".
4566         (make_item_for_dump_printf_va): Delete.
4567         (make_item_for_dump_printf): Delete.
4568         (class dump_pretty_printer): New class.
4569         (dump_pretty_printer::dump_pretty_printer): New ctor.
4570         (dump_pretty_printer::emit_items): New member function.
4571         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
4572         function.
4573         (dump_pretty_printer::emit_item): New member function.
4574         (dump_pretty_printer::stash_item): New member function.
4575         (dump_pretty_printer::format_decoder_cb): New member function.
4576         (dump_pretty_printer::decode_format): New member function.
4577         (dump_context::dump_printf_va): Reimplement in terms of
4578         dump_pretty_printer.
4579         (dump_context::dump_printf_loc_va): Convert final param from va_list
4580         to va_list *.
4581         (dump_context::begin_scope): Reimplement call to
4582         make_item_for_dump_printf.
4583         (dump_printf): Update for change to dump_printf_va.
4584         (dump_printf_loc): Likewise.
4585         (selftest::test_capture_of_dump_calls): Convert "stmt" from
4586         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
4587         with %T, %E, and %G.
4588         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
4589         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
4590         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
4591         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
4592         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
4593         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
4594         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
4595         within a dump_printf_loc call to "%wu".
4596         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
4597         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
4598         missing space after "=".
4599         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
4600         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
4601         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
4602         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
4603         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
4604         duplicate "vectorized" from message.
4606 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4608         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
4609         polyNxK_t element's TYPE_STRING_FLAG.
4611 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
4613         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
4614         (they were unnamed before).  Fix comments.
4616 2018-08-17  Nathan Sidwell  <nathan@acm.org>
4618         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
4620 2018-08-17  Richard Biener  <rguenther@suse.de>
4622         PR tree-optimization/86841
4623         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
4625 2018-08-17  Martin Liska  <mliska@suse.cz>
4627         * common.opt: Remove Warn, Init and Report for options with
4628         Ignore/Deprecated flag. Warning is done automatically for
4629         Deprecated flags.
4630         * config/i386/i386.opt: Likewise.
4631         * config/ia64/ia64.opt: Likewise.
4632         * config/rs6000/rs6000.opt: Likewise.
4633         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
4634         Remove usage of flag_check_pointer_bounds.
4635         * lto-wrapper.c (merge_and_complain): Do not handle
4636         OPT_fcheck_pointer_bounds.
4637         (append_compiler_options): Likewise.
4638         * opt-functions.awk: Do not handle Deprecated.
4639         * optc-gen.awk: Check that Var, Report and Init are not
4640         used for an option with Ignore/Deprecated flag.
4641         * opts-common.c (decode_cmdline_option): Do not report
4642         CL_ERR_DEPRECATED.
4643         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
4644         options.
4645         * opts.h (struct cl_option): Remove cl_deprecated flag.
4646         (CL_ERR_DEPRECATED): Remove error enum value.
4648 2018-08-17  Richard Biener  <rguenther@suse.de>
4650         PR middle-end/86505
4651         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
4652         across a va-arg-pack using call adjust its return value accordingly.
4654 2018-08-16  Martin Sebor  <msebor@redhat.com>
4656         PR tree-optimization/86853
4657         * gimple-ssa-sprintf.c (struct format_result): Rename member.
4658         (struct fmtresult): Add member and initialize it in ctors.
4659         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
4660         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
4661         (format_directive): Set POSUNDER4K when MAYFAIL is set.
4662         (parse_directive): Handle %C same as %c.
4663         (sprintf_dom_walker::compute_format_length): Adjust.
4664         (is_call_safe): Adjust.
4666 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4668         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
4669         for determining how to count the elements.
4670         * builtins.h (c_strlen): Adjust prototype.
4671         * expr.c (string_constant): Add new parameter mem_size.
4672         Set *mem_size appropriately.
4673         * expr.h (string_constant): Adjust protoype.
4674         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
4675         * gimple-fold.h (get_range_strlen): Adjust prototype.
4676         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
4677         (format_string): Call get_string_length with eltsize.
4679 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
4681         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
4682         to emit the span, rather than setting it as the prefix.
4684 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
4686         * diagnostic-show-locus.c (layout::start_annotation_line): Add
4687         "margin_char" parameter, defaulting to space.  Use it in place
4688         of pp_space for the initial part of the margin.
4689         (layout::print_leading_fixits): Use '+' when filling the margin
4690         of line-insertion fix-it hints.
4692 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4694         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
4695         Delete.
4697 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4699         * config/rs6000/altivec.md: Don't set length attribute to the default
4700         value.
4701         * config/rs6000/darwin.md: Ditto.
4702         * config/rs6000/dfp.md: Ditto.
4703         * config/rs6000/htm.md: Ditto.
4704         * config/rs6000/rs6000.md: Ditto.
4705         * config/rs6000/sync.md: Ditto.
4706         * config/rs6000/vsx.md: Ditto.
4708 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4710         * config/rs6000/altivec.md: Don't set length attribute to the default
4711         value, for branch instructions.
4712         * config/rs6000/darwin.md: Ditto.
4713         * config/rs6000/rs6000.md: Ditto.
4715 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4717         * config/rs6000/rs6000.md (length): Always define as const_int 4.
4718         (unnamed conditional branch define_insn): Set length to 4 or 8
4719         depending on offset.
4720         (<bd>_<mode>): Similar, for alternative 0.
4721         (<bd>tf_<mode>): Ditto.
4723 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
4725         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
4727 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
4729         * doc/rtl.texi: Replace old RTX class names with new names.
4732 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
4734         * expmed.h (canonicalize_comparison): New declaration.
4735         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
4736         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
4737         * optabs.c (prepare_cmp_insn): Likewise.
4738         * rtl.h (unsigned_condition_p): New function which checks if a
4739         comparison operator is unsigned.
4741 2018-08-16  Nathan Sidwell  <nathan@acm.org>
4743         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
4744         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
4746 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
4748         PR target/84711
4749         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
4750         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
4751         (mov<mov>): ..this and enable unconditionally.
4753 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
4755         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
4757 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
4759         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
4760         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
4761         "Common" with "Target".
4763 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
4765         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
4766         * doc/invoke.texi (mmitigate-rop): Remove.
4767         * config/i386/i386.c: Do not include "regrename.h".
4768         (ix86_rop_should_change_byte_p, reg_encoded_number)
4769         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
4770         Remove.
4771         (ix86_reorg): Remove call to ix86_mitigate_rop.
4772         * config/i386/i386.md (attr "modrm_class"): Remove.
4773         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
4774         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
4775         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
4777 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
4779         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
4780         allow folding of mergeh() and mergel() for the float and double types.
4781         (fold_mergehl_helper): Rework to handle building a permute tree
4782         for float vectors.
4784 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
4786         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
4787         for TARGET_SSE.
4789 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
4791         * common.opt (fdiagnostics-show-labels): New option.
4792         * diagnostic-show-locus.c (class layout_range): Add field
4793         "m_label".
4794         (class layout): Add field "m_show_labels_p".
4795         (layout_range::layout_range): Add param "label" and use it to
4796         initialize m_label.
4797         (make_range): Pass in NULL for new "label" param of layout_range's
4798         ctor.
4799         (layout::layout): Initialize m_show_labels_p.
4800         (layout::maybe_add_location_range): Pass in loc_range->m_label
4801         when constructing layout_range instances.
4802         (struct line_label): New struct.
4803         (layout::print_any_labels): New member function.
4804         (layout::print_line): Call it if label-printing is enabled.
4805         (selftest::test_one_liner_labels): New test.
4806         (selftest::test_diagnostic_show_locus_one_liner): Call it.
4807         * diagnostic.c (diagnostic_initialize): Initialize
4808         context->show_labels_p.
4809         * diagnostic.h (struct diagnostic_context): Add field
4810         "show_labels_p".
4811         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
4812         -fno-diagnostics-show-labels.
4813         * dwarf2out.c (gen_producer_string): Add
4814         OPT_fdiagnostics_show_labels to the ignored options.
4815         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
4816         param.
4817         (gcc_rich_location::maybe_add_expr): Likewise.
4818         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
4819         label" param, defaulting to NULL.
4820         (gcc_rich_location::add_expr): Add "label" param.
4821         (gcc_rich_location::maybe_add_expr): Likewise.
4822         (class text_range_label): New class.
4823         (class range_label_for_type_mismatch): New class.
4824         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
4825         of format_warning_va.
4826         (fmtwarn_n): Likewise for new params of format_warning_n_va.
4827         * lto-wrapper.c (merge_and_complain): Add
4828         OPT_fdiagnostics_show_labels to the "pick one setting" options.
4829         (append_compiler_options): Likewise to the dropped options.
4830         (append_diag_options): Likewise to the passed-on options.
4831         * opts.c (common_handle_option): Handle the new option.
4832         * selftest-diagnostic.c
4833         (test_diagnostic_context::test_diagnostic_context): Enable
4834         show_labels_p.
4835         * substring-locations.c: Include "gcc-rich-location.h".
4836         (format_warning_n_va): Add "fmt_label" and "param_label" params
4837         and use them as appropriate.
4838         (format_warning_va): Add "fmt_label" and "param_label" params,
4839         passing them on to format_warning_n_va.
4840         (format_warning_at_substring): Likewise.
4841         (format_warning_at_substring_n): Likewise.
4842         * substring-locations.h (format_warning_va): Add "fmt_label" and
4843         "param_label" params.
4844         (format_warning_n_va): Likewise.
4845         (format_warning_at_substring): Likewise.
4846         (format_warning_at_substring_n): Likewise.
4847         * toplev.c (general_init): Initialize global_dc->show_labels_p.
4849 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
4851         PR testsuite/86519
4852         * builtins.c (expand_builtin_memcmp): Do not expand the call
4853         when overflow is detected.
4855 2018-08-15  Martin Sebor  <msebor@redhat.com>
4857         PR tree-optimization/71625
4858         * config/aarch64/aarch64-builtins.c
4859         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
4861 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
4863         * config/s390/s390.c (s390_reorg): Remove loop.
4865 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
4867         * config/darwin.c
4868          (darwin_function_switched_text_sections): Delete.
4869         * gcc/config/darwin.h
4870          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
4872 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
4874         PR target/81685
4875         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
4876         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
4877         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
4879 2018-08-15  Martin Liska  <mliska@suse.cz>
4881         PR tree-optimization/86925
4882         * predict.c (expr_expected_value_1): When taking
4883         later predictor, assign also probability.
4884         Use fold_build2_initializer_loc in order to fold
4885         the expression in -frounding-math.
4887 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
4889         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
4890         patterns.
4891         (expand_vec_perm_1): Try the new method.
4893 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
4895         PR target/86547
4896         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
4897         Check whether lra_live_max_point is 0 before dividing.
4899 2018-08-14  Martin Sebor  <msebor@redhat.com>
4901         PR tree-optimization/86650
4902         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
4903         (vrp_prop::check_mem_ref): Same.
4905 2018-08-13  Liu Hao <lh_mouse@126.com>
4907         * pretty-print.c (eat_esc_sequence): Swap the foreground and
4908         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
4909         and clear it thereafter, as it only works for DBCS.
4911 2018-08-13  Liu Hao <lh_mouse@126.com>
4913         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
4914         handle returned by _get_osf_handle().
4916 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
4918         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
4919         for folding vec_perm.
4921 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
4923         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
4924         Add support for gimple-folding of vec_pack() and vec_unpack()
4925         intrinsics.
4927 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
4929         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
4930         vec_xst variants to the list.
4931         (rs6000_gimple_fold_builtin): Add support for folding unaligned
4932         vector loads and stores.
4934 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
4936         * config.gcc (rs6000-ibm-aix4.x): Delete.
4937         (rs6000-ibm-aix5.1): Delete.
4938         (rs6000-ibm-aix5.2): Delete.
4939         (rs6000-ibm-aix5.3): Delete.
4940         * config/rs6000/aix43.h: Delete.
4941         * config/rs6000/aix51.h: Delete.
4942         * config/rs6000/aix52.h: Delete.
4943         * config/rs6000/t-aix43: Delete.
4945 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
4947         * config/s390/s390.c (s390_decompose_constant_pool_ref):
4948         New function.
4949         (s390_decompose_address): Factor out constant pool ref
4950         decomposition.
4952 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
4954         * config/nds32/nds32-predicates.c
4955         (nds32_can_use_bclr_p): Change return type as bool.
4956         (nds32_can_use_bset_p): Ditto.
4957         (nds32_can_use_btgl_p): Ditto.
4958         (nds32_can_use_bitci_p): Ditto.
4959         * config/nds32/nds32-protos.h
4960         (nds32_can_use_bclr_p): Change declaration.
4961         (nds32_can_use_bset_p): Ditto.
4962         (nds32_can_use_btgl_p): Ditto.
4963         (nds32_can_use_bitci_p): Ditto.
4965 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
4967         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
4968         Support -msched-prolog-epilog option.
4969         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
4971 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
4973         * common/config/nds32/nds32-common.c
4974         (nds32_option_optimization_table): Enalbe -malways-align.
4976 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
4978         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
4979         extra_headers.
4980         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
4981         OPT_misr_secure_ case.
4982         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
4983         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
4984         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
4985         secure attribute.
4986         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
4987         (nds32_isr_info): New field security_level.
4988         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
4989         * config/nds32/nds32.md (return_internal): Consider critical attribute.
4990         * config/nds32/nds32.opt (misr-secure): New option.
4991         * config/nds32/nds32_init.inc: New file.
4992         * config/nds32/nds32_isr.h: New file.
4994 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
4996         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
4997         Update comment for atomic instructions.
4998         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
4999         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
5000         Remove.
5001         (atomic_loaddi): Revise fence expansion to only emit fence prior to
5002         load for __ATOMIC_SEQ_CST model.
5003         (atomic_loaddi_1): Remove float register target.
5004         (atomic_storedi): Handle CONST_INT values.
5005         (atomic_storedi_1): Remove float register source.  Add special case
5006         for zero value.
5007         (memory_barrier): New expander and insn.
5009 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
5011         PR tree-optimization/86835
5012         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
5013         new_stmt after def_gsi, make sure to insert new_square_stmt after
5014         that stmt, not 2 stmts before it.
5016 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
5018         PR target/82418
5019         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
5020         instead of SWI48.
5022 2018-08-10  Martin Liska  <mliska@suse.cz>
5024         PR target/83610
5025         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
5026         function type.
5027         * builtins.c (expand_builtin_expect_with_probability):
5028         New function.
5029         (expand_builtin_expect_with_probability): New function.
5030         (build_builtin_expect_predicate): Add new argumnet probability
5031         for BUILT_IN_EXPECT_WITH_PROBABILITY.
5032         (fold_builtin_expect):
5033         (fold_builtin_2):
5034         (fold_builtin_3):
5035         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
5036         * builtins.h (fold_builtin_expect): Set new argument.
5037         * doc/extend.texi: Document __builtin_expect_with_probability.
5038         * doc/invoke.texi: Likewise.
5039         * gimple-fold.c (gimple_fold_call): Pass new argument.
5040         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
5041         also BUILT_IN_EXPECT_WITH_PROBABILITY.
5042         * predict.c (get_predictor_value): New function.
5043         (expr_expected_value): Add new argument probability. Assume
5044         that predictor and probability are always non-null.
5045         (expr_expected_value_1): Likewise.  For __builtin_expect and
5046         __builtin_expect_with_probability set probability.  Handle
5047         combination in binary expressions.
5048         (tree_predict_by_opcode): Simplify code by simply calling
5049         get_predictor_value.
5050         (pass_strip_predict_hints::execute): Add handling of
5051         BUILT_IN_EXPECT_WITH_PROBABILITY.
5052         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
5053         new predictor.
5054         * tree.h (DECL_BUILT_IN_P): New function.
5056 2018-08-10  Martin Liska  <mliska@suse.cz>
5058         PR tree-optimization/85799
5059         * passes.def: Add argument for pass_strip_predict_hints.
5060         * predict.c (class pass_strip_predict_hints): Add new argument
5061         early_p.
5062         (strip_predictor_early): New function.
5063         (pass_strip_predict_hints::execute): Call the function to
5064         strip predictors.
5065         (strip_predict_hints): New function.
5066         * predict.def: Fix comment.
5068 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
5070         * Makefile.in: Clarify which tm.texi to copy over to assert the
5071         right to grant a GFDL license for all.
5073 2018-08-09  Jeff Law  <law@redhat.com>
5075         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
5076         unused variable.
5078 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
5080         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
5081         prototype.
5083 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
5085         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
5086         reductions for variable-length vectors.
5088 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
5090         PR other/84889
5091         * common.opt (fdiagnostics-show-line-numbers): New option.
5092         * diagnostic-show-locus.c (class layout): Add fields
5093         "m_show_line_numbers_p" and "m_linenum_width";
5094         (num_digits): New function.
5095         (test_num_digits): New function.
5096         (layout::layout): Initialize new fields.  Update m_x_offset
5097         logic to handle any left margin.
5098         (layout::print_source_line): Print line number when requested.
5099         (layout::start_annotation_line): New member function.
5100         (layout::print_annotation_line): Call it.
5101         (layout::print_leading_fixits): Likewise.
5102         (layout::print_trailing_fixits): Likewise.  Update calls to
5103         move_to_column for new parameter.
5104         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
5105         it to potentially call start_annotation_line.
5106         (layout::show_ruler): Call start_annotation_line.
5107         (selftest::test_line_numbers_multiline_range): New selftest.
5108         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
5109         and selftest::test_line_numbers_multiline_range.
5110         * diagnostic.c (diagnostic_initialize): Initialize
5111         show_line_numbers_p.
5112         * diagnostic.h (struct diagnostic_context): Add field
5113         "show_line_numbers_p".
5114         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5115         -fno-diagnostics-show-line-numbers.
5116         * dwarf2out.c (gen_producer_string): Add
5117         OPT_fdiagnostics_show_line_numbers to the ignored options.
5118         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
5119         one setting" options.
5120         (append_compiler_options): Likewise to the dropped options.
5121         (append_diag_options): Likewise to the passed-on options.
5122         * opts.c (common_handle_option): Handle the new option.
5123         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
5125 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5127         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
5128         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
5129         third argument of type "const signed char" to descriptions of
5130         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
5131         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
5132         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
5133         __builtin_bcdsub_ov functions.
5135 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
5137         PR tree-optimization/86858
5138         * tree-vect-loop.c (vect_is_simple_reduction): Restore
5139         flow_bb_inside_loop_p calls.
5141 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
5143         PR tree-optimization/86871
5144         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
5145         instead of gimple_assign_lhs.
5147 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
5149         PR target/86887
5150         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
5151         register constraint to operand 0.
5152         (add<mode>3_carryinC): Likewise.
5153         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
5155 2018-08-09  Martin Liska  <mliska@suse.cz>
5157         PR c/86895
5158         * common.opt: Remove extra line.
5160 2018-08-09  Martin Liska  <mliska@suse.cz>
5162         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
5163         at the end of a line, make first letter capital and end up
5164         a sentence with a dot.
5165         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
5166         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
5167         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
5168         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
5169         (PARAM_MAX_ISL_OPERATIONS): Likewise.
5170         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
5171         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
5172         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
5173         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
5174         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
5175         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
5176         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
5177         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
5178         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
5179         (PARAM_TREE_REASSOC_WIDTH): Likewise.
5180         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
5181         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
5182         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
5184 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
5186         PR target/84332
5187         * config/s390/s390.c (s390_option_override_internal): Reduce the
5188         stack-clash-protection-probe-interval param if it would be too big
5189         for z900.
5191 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
5193         PR target/46179
5194         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
5195         * config/m68k/m68k.c (handle_move_double): Don't call
5196         m68k_final_prescan_insn.
5197         (m68k_adjust_decorated_operand): Renamed from
5198         m68k_final_prescan_insn, remove first and third operand and
5199         simplify.
5200         (print_operand): Call it.
5201         (print_operand_address): Call it.
5203 2018-08-08  Nathan Sidwell  <nathan@acm.org>
5205         * diagnostic.c (diagnostic_report_current_module): Use
5206         linemap_included_from & linemap_included_from_linemap.
5208 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
5210         * config/aarch64/aarch64-cores.def: Add phecda core.
5211         * config/aarch64/aarch64-tune.md: Regenerate.
5212         * doc/invoke.texi: Add phecda core.
5214 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
5216         PR target/85295
5217         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
5218         definitions.
5219         * config/s390/s390.md ("movti"): Add more alternatives for
5220         constant to GPR copies.
5222 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
5224         * config/s390/s390.c: Fix whitespace damage throughout the file.
5225         * config/s390/s390.h: Likewise.
5226         * config/s390/tpf.h: Likewise.
5228 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
5230         * config/s390/s390.c (s390_loadrelative_operand_p):
5231         Remove TARGET_CPU_ZARCH usages.
5232         (s390_rtx_costs): Likewise.
5233         (s390_legitimate_constant_p): Likewise.
5234         (s390_cannot_force_const_mem): Likewise.
5235         (legitimate_reload_constant_p): Likewise.
5236         (s390_preferred_reload_class): Likewise.
5237         (legitimize_pic_address): Likewise.
5238         (legitimize_tls_address): Likewise.
5239         (s390_split_branches): Removed.
5240         (s390_add_execute): Removed.
5241         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
5242         (s390_mainpool_start): Likewise.
5243         (s390_mainpool_finish): Likewise.
5244         (s390_mainpool_cancel): Removed.
5245         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
5246         (s390_chunkify_cancel): Likewise.
5247         (s390_return_addr_rtx): Likewise.
5248         (s390_register_info): Remove split_branches_pending_p uages.
5249         (s390_optimize_register_info): Likewise.
5250         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
5251         split_branches_pending_p usages.
5252         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
5253         (s390_load_got): Likewise.
5254         (s390_expand_split_stack_prologue): Likewise.
5255         (output_asm_nops): Likewise.
5256         (s390_function_profiler): Likewise.
5257         (s390_emit_call): Likewise.
5258         (s390_conditional_register_usage): Likewise.
5259         (s390_optimize_prologue): Likewise.
5260         (s390_reorg): Remove TARGET_CPU_ZARCH and
5261         split_branches_pending_p usages.
5262         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
5263         usages.
5264         (s390_output_indirect_thunk_function): Likewise.
5265         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
5266         (TARGET_CPU_ZARCH_P): Removed.
5267         (struct machine_function): Remove split_branches_pending_p.
5268         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
5270 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
5272         * common/config/s390/s390-common.c (processor_flags_table):
5273         Remove flags.
5274         * config.gcc: Remove with_arch/with_tune support.
5275         * config/s390/2064.md: Remove cpu attribute comparisons.
5276         * config/s390/driver-native.c (s390_host_detect_local_cpu):
5277         Remove MTN.
5278         * config/s390/linux.h (ASM_SPEC):
5279         Remove -march support.
5280         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
5281         Use a table to get an arch level.
5282         * config/s390/s390-opts.h (enum processor_type):
5283         Remove enum values.
5284         * config/s390/s390.c
5285         (processor_table): Remove entries, add arch_level values.
5286         (s390_issue_rate): Remove cases.
5287         (s390_option_override): Adjust
5288         s390_option_override_internal() call.
5289         (s390_option_override_internal): Remove deprecation warning.
5290         (s390_valid_target_attribute_tree): Adjust
5291         s390_option_override_internal() call.
5292         * config/s390/s390.h (struct s390_processor):
5293         Share with s390-c.c, add arch_level field.
5294         * config/s390/s390.md:
5295         Remove occurrences in cpu attribute.
5296         * config/s390/s390.opt: Remove -march/-mtune support.
5297         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
5298         * doc/invoke.texi: Remove deprecation warning.
5300 2018-08-08  Luis Machado  <luis.machado@linaro.org>
5302         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
5303         global.
5304         (qdf24xx_tunings): Set vector cost structure to
5305         qdf24xx_vector_cost.
5307         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
5308         <register_sextend>: Set to 3.
5310 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
5312         PR target/86838
5313         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
5314         * config/aarch64/aarch64-simd.md
5315         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
5316         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
5317         (aarch64_frecpx<mode>): ...this new pattern.
5318         * config/aarch64/aarch64-simd-builtins.def: Remove comment
5319         about aarch64_frecp<FRECP:frecp_suffix><mode>.
5321 2018-08-07  Martin Liska  <mliska@suse.cz>
5323         PR middle-end/83023
5324         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
5325         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
5326         * predict.def (PRED_MALLOC_NONNULL): New predictor.
5327         * doc/extend.texi: Document that malloc attribute adds
5328         hit to compiler.
5330 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
5332         PR target/86785
5333         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5334         Define to speculation_safe_value_not_needed.
5336 2018-08-06  Jeff Law  <law@redhat.com>
5338         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
5339         the vr_values instance to cprop_into_stmt.
5340         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
5341         (cprop_operand): Also query EVRP to determine if OP is a constant.
5343 2018-08-06  Nathan Sidwell  <nathan@acm.org>
5345         * diagnostic.c (diagnostic_report_current_module): Reroll
5346         included-at loop.  Translate text.
5348 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
5350         * function-tests.c (selftest::test_expansion_to_rtl): Call
5351         free_after_compilation.
5353 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5355         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
5357 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
5359         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
5360         loops with memory block operations from getting unrolled.
5362 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
5364         PR target/86807
5365         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5366         Define to speculation_safe_value_not_needed.
5368 2018-08-06  Jeff Law  <law@redhat.com>
5370         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
5371         assert.
5373 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5375         PR target/86662
5376         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
5377         with all enabled __intN types.
5379         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
5381 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5383         * alias.c (record_set): Check for clobber high.
5384         * cfgexpand.c (expand_gimple_stmt): Likewise.
5385         * combine-stack-adj.c (single_set_for_csa): Likewise.
5386         * combine.c (find_single_use_1): Likewise.
5387         (set_nonzero_bits_and_sign_copies): Likewise.
5388         (get_combine_src_dest): Likewise.
5389         (is_parallel_of_n_reg_sets): Likewise.
5390         (try_combine): Likewise.
5391         (record_dead_and_set_regs_1): Likewise.
5392         (reg_dead_at_p_1): Likewise.
5393         (reg_dead_at_p): Likewise.
5394         * dce.c (deletable_insn_p): Likewise.
5395         (mark_nonreg_stores_1): Likewise.
5396         (mark_nonreg_stores_2): Likewise.
5397         * df-scan.c (df_find_hard_reg_defs): Likewise.
5398         (df_uses_record): Likewise.
5399         (df_get_call_refs): Likewise.
5400         * dwarf2out.c (mem_loc_descriptor): Likewise.
5401         * haifa-sched.c (haifa_classify_rtx): Likewise.
5402         * ira-build.c (create_insn_allocnos): Likewise.
5403         * ira-costs.c (scan_one_insn): Likewise.
5404         * ira.c (equiv_init_movable_p): Likewise.
5405         (rtx_moveable_p): Likewise.
5406         (interesting_dest_for_shprep): Likewise.
5407         * jump.c (mark_jump_label_1): Likewise.
5408         * postreload-gcse.c (record_opr_changes): Likewise.
5409         * postreload.c (reload_cse_simplify): Likewise.
5410         (struct reg_use): Add source expr.
5411         (reload_combine): Check for clobber high.
5412         (reload_combine_note_use): Likewise.
5413         (reload_cse_move2add): Likewise.
5414         (move2add_note_store): Likewise.
5415         * print-rtl.c (print_pattern): Likewise.
5416         * recog.c (decode_asm_operands): Likewise.
5417         (store_data_bypass_p): Likewise.
5418         (if_test_bypass_p): Likewise.
5419         * regcprop.c (kill_clobbered_value): Likewise.
5420         (kill_set_value): Likewise.
5421         * reginfo.c (reg_scan_mark_refs): Likewise.
5422         * reload1.c (maybe_fix_stack_asms): Likewise.
5423         (eliminate_regs_1): Likewise.
5424         (elimination_effects): Likewise.
5425         (mark_not_eliminable): Likewise.
5426         (scan_paradoxical_subregs): Likewise.
5427         (forget_old_reloads_1): Likewise.
5428         * reorg.c (find_end_label): Likewise.
5429         (try_merge_delay_insns): Likewise.
5430         (redundant_insn): Likewise.
5431         (own_thread_p): Likewise.
5432         (fill_simple_delay_slots): Likewise.
5433         (fill_slots_from_thread): Likewise.
5434         (dbr_schedule): Likewise.
5435         * resource.c (update_live_status): Likewise.
5436         (mark_referenced_resources): Likewise.
5437         (mark_set_resources): Likewise.
5438         * rtl.c (copy_rtx): Likewise.
5439         * rtlanal.c (reg_referenced_p): Likewise.
5440         (single_set_2): Likewise.
5441         (noop_move_p): Likewise.
5442         (note_stores): Likewise.
5443         * sched-deps.c (sched_analyze_reg): Likewise.
5444         (sched_analyze_insn): Likewise.
5446 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5448         * cse.c (invalidate_reg): New function extracted from...
5449         (invalidate): ...here.
5450         (canonicalize_insn): Check for clobber high.
5451         (invalidate_from_clobbers): invalidate clobber highs.
5452         (invalidate_from_sets_and_clobbers): Likewise.
5453         (count_reg_usage): Check for clobber high.
5454         (insn_live_p): Likewise.
5455         * cselib.c (cselib_expand_value_rtx_1):Likewise.
5456         (cselib_invalidate_regno): Check for clobber in setter.
5457         (cselib_invalidate_rtx): Pass through setter.
5458         (cselib_invalidate_rtx_note_stores):
5459         (cselib_process_insn): Check for clobber high.
5460         * cselib.h (cselib_invalidate_rtx): Add operand.
5462 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5464         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
5465         (mark_not_eliminable): Likewise.
5466         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
5467         * lra-lives.c (process_bb_lives): Check for clobber high.
5468         * lra.c (new_insn_reg): Remember clobber highs.
5469         (collect_non_operand_hard_regs): Check for clobber high.
5470         (lra_set_insn_recog_data): Likewise.
5471         (add_regs_to_insn_regno_info): Likewise.
5472         (lra_update_insn_regno_info): Likewise.
5474 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5476         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
5477         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
5479 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5481         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
5482         (copy_insn_1): Likewise.
5483         (gen_hard_reg_clobber_high): New gen function.
5484         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
5485         * genemit.c (gen_exp): Likewise.
5486         (gen_emit_seq): Pass through info.
5487         (gen_insn): Check for CLOBBER_HIGH.
5488         (gen_expand): Pass through info.
5489         (gen_split): Likewise.
5490         (output_add_clobbers): Likewise.
5491         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
5492         (remove_clobbers): Likewise.
5493         * rtl.h (gen_hard_reg_clobber_high): New declaration.
5495 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5497         * doc/rtl.texi (clobber_high): Add.
5498         (parallel): Add in clobber high
5499         * rtl.c (rtl_check_failed_code3): Add function.
5500         * rtl.def (CLOBBER_HIGH): Add expression.
5501         * rtl.h (RTL_CHECKC3): Add macro.
5502         (rtl_check_failed_code3): Add declaration.
5503         (XC3EXP): Add macro.
5505 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
5507         PR target/86386
5508         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
5509         cfun->machine->max_used_stack_alignment if needed.
5511 2018-08-04  Martin Sebor  <msebor@redhat.com>
5513         PR tree-optimization/86571
5514         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
5515         NaN output to 4.
5517 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
5519         PR target/86799
5520         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5521         Define.
5523 2018-08-03  Jeff Law  <law@redhat.com>
5525         PR target/86795
5526         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5527         Define to speculation_safe_value_not_needed.
5529 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
5531         * doc/gcov.texi (-x): Remove duplicate "to".
5532         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
5533         (-Wif-not-aligned): Remove duplicate "is".
5534         (-flto): Remove duplicate "the".
5535         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
5536         duplicate "v5.00.b".
5537         (MSP430 Options): Remove duplicate "and" from the description
5538         of "-mgprel-sec=regexp".
5539         (x86 Options): Remove duplicate copies of "vmldLog102" and
5540         vmlsLog104 from description of "-mveclibabi=type".
5542 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
5544         * internal-fn.h (first_commutative_argument): Declare.
5545         * internal-fn.c (first_commutative_argument): New function.
5546         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
5547         restrictions for pattern statements.  Use first_commutative_argument
5548         to look for commutative operands in calls to internal functions.
5550 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
5552         * Makefile.in (wide-int-range.o): New.
5553         * tree-vrp.c: Move all the wide_int_* functions to...
5554         * wide-int-range.cc: ...here.
5555         * tree-vrp.h: Move all the wide_int_* prototypes to...
5556         * wide-int-range.h: ...here.
5558 2018-08-03  Tom de Vries  <tdevries@suse.de>
5560         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
5561         UI_NONE.
5562         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
5563         * except.c (output_function_exception_table): Do early exit if
5564         targetm_common.except_unwind_info (&global_options) == UI_NONE.
5566 2018-08-03  Martin Liska  <mliska@suse.cz>
5568         * predict.c (dump_prediction): Change to 2 digits
5569         in fraction part.
5571 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5573         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
5574         neon_dup_q to...
5575         (falkor_am_1_gtov_gtov): ... a new insn reservation.
5577 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
5579         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
5580         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
5581         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
5582         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
5583         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
5585 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
5587         * diagnostic-show-locus.c (diagnostic_show_locus): Use
5588         pp_take_prefix when saving the existing prefix.
5589         * diagnostic.c (diagnostic_append_note): Likewise.
5590         * langhooks.c (lhd_print_error_function): Likewise.
5591         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
5592         param's type.  Free the existing prefix.
5593         (pp_take_prefix): New function.
5594         (pretty_printer::pretty_printer): Drop the prefix parameter.
5595         Rename the length parameter to match the comment.
5596         (pretty_printer::~pretty_printer): Free the prefix.
5597         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
5598         parameter.
5599         (struct pretty_printer): Drop the "const" from "prefix" field's
5600         type and clarify memory management.
5601         (pp_set_prefix): Drop the "const" from the 2nd param.
5602         (pp_take_prefix): New decl.
5604 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
5606         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
5607         for word_mode_ok here instead of passing as argument.
5608         (expand_block_compare): Change select_block_compare_mode() call.
5609         (expand_strncmp_gpr_sequence): New function.
5610         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
5612 2018-08-02  Jeff Law  <law@redhat.com>
5614         PR target/86790
5615         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5616         Define to speculation_safe_value_not_needed.
5618         PR target/86784
5619         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5620         Define to speculation_safe_value_not_needed.
5622 2018-08-02  Tom de Vries  <tdevries@suse.de>
5624         PR target/86660
5625         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
5626         function.  Return UI_TARGET unconditionally.
5627         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
5628         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
5630 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
5632         * genemit.c (print_overload_test): Fix typo.
5634 2018-08-02  Richard Biener  <rguenther@suse.de>
5636         PR tree-optimization/86816
5637         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
5638         which checks for value availability before querying it.
5639         (gvn_uses_equal): Use it.
5640         (same_succ_hash): Likewise.
5641         (gimple_equal_p): Likewise.
5643 2018-08-02  Nick Clifton  <nickc@redhat.com>
5645         PR target/86813
5646         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5647         Define to speculation_safe_value_not_needed.
5649         PR target/86810
5650         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5651         Define to speculation_safe_value_not_needed.
5653         PR target/86810
5654         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5655         Define to speculation_safe_value_not_needed.
5657         PR target/86803
5658         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5659         Define to speculation_safe_value_not_needed.
5661         PR target/86797
5662         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5663         Define to speculation_safe_value_not_needed.
5665         PR target/86791
5666         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5667         Define to speculation_safe_value_not_needed.
5669         PR target/86789
5670         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5671         Define to speculation_safe_value_not_needed.
5673         PR target/86787
5674         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5675         Define to speculation_safe_value_not_needed.
5677         PR target/86782
5678         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5679         speculation_safe_value_not_needed.
5681         PR target/86781
5682         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
5683         to speculation_safe_value_not_needed.
5685 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
5687         * doc/md.texi: Expand the documentation of instruction names
5688         to mention port-local uses.  Document '@' in pattern names.
5689         * read-md.h (overloaded_instance, overloaded_name): New structs.
5690         (mapping): Declare.
5691         (md_reader::handle_overloaded_name): New member function.
5692         (md_reader::get_overloads): Likewise.
5693         (md_reader::m_first_overload): New member variable.
5694         (md_reader::m_next_overload_ptr): Likewise.
5695         (md_reader::m_overloads_htab): Likewise.
5696         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
5697         m_next_overload_ptr and m_overloads_htab.
5698         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
5699         (get_mode_token, get_code_token, get_int_token): New functions.
5700         (map_attr_string): Add an optional argument that passes back
5701         the associated iterator.
5702         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
5703         (md_reader::handle_overloaded_name, add_overload_instance): New
5704         functions.
5705         (apply_iterators): Handle '@' names.  Report an error if '@'
5706         is used without iterators.
5707         (initialize_iterators): Initialize the new iterator_group fields.
5708         * genopinit.c (handle_overloaded_code_for)
5709         (handle_overloaded_gen): New functions.
5710         (main): Use them to print declarations of maybe_code_for_* and
5711         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
5712         * genemit.c (print_overload_arguments, print_overload_test)
5713         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
5714         (main): Use it to print definitions of maybe_code_for_* and
5715         maybe_gen_* functions.
5716         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
5717         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
5718         instead of explicit mode checks.
5719         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
5720         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
5721         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
5722         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
5723         (aarch64_expand_compare_and_swap): Likewise
5724         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
5725         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
5726         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
5727         (aarch64_constant_pool_reload_icode): Delete.
5728         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
5729         instead of aarch64_constant_pool_reload_icode.  Use
5730         code_for_aarch64_reload_mov instead of explicit mode checks.
5731         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
5732         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
5733         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
5734         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
5735         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
5736         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
5737         (aarch64_atomic_load_op_code): Delete.
5738         (aarch64_emit_atomic_load_op): Likewise.
5739         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
5740         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
5741         instead of aarch64_emit_atomic_load_op.
5742         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
5743         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
5744         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
5745         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
5746         character before the pattern name.
5747         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
5748         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
5749         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
5750         (aarch64_frecps<mode>): Likewise.
5751         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
5752         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
5753         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
5754         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
5755         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
5757 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
5759         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
5760         Allow HFmode constants if TARGET_FP_F16INST.
5762 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
5764         PR target/86014
5765         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
5766         No longer check last store for clobber of address register.
5768 2018-08-02  Martin Liska  <mliska@suse.cz>
5770         PR gcov-profile/86817
5771         * gcov.c (process_all_functions): New function.
5772         (main): Call it.
5773         (process_file): Move functions processing to
5774         process_all_functions.
5776 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
5778         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
5779         "const" to the "gimple *" and "rtx_insn *" parameters.
5780         * dumpfile.h (dump_user_location_t::dump_user_location_t):
5781         Likewise.
5782         (dump_location_t::dump_location_t): Likewise.
5784 2018-08-01  Martin Sebor  <msebor@redhat.com>
5786         PR tree-optimization/86650
5787         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
5788         rather than a "gcall *".  Directly pass the data of interest
5789         to percent_K_format, rather than building a temporary CALL_EXPR
5790         to hold it.
5791         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
5792         (gimple_fold_builtin_strncat): Adjust.
5793         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
5794         gcall* argument with gimple*.
5795         * gimple-ssa-warn-restrict.c (check_call): Same.
5796         (wrestrict_dom_walker::before_dom_children): Same.
5797         (builtin_access::builtin_access): Same.
5798         (check_bounds_or_overlap): Same
5799         (maybe_diag_overlap): Same.
5800         (maybe_diag_offset_bounds): Same.
5801         * tree-diagnostic.c (default_tree_printer): Move usage of
5802         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
5803         to this callsite.
5804         * tree-pretty-print.c (percent_K_format): Add argument.
5805         * tree-pretty-print.h: Add argument.
5806         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
5807         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
5808         (maybe_diag_stxncpy_trunc): Same.
5809         (handle_builtin_stxncpy): Same.
5810         (handle_builtin_strcat): Same.
5812 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5814         * match.pd: Optimise pointer range checks.
5816 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5818         PR tree-optimization/86758
5819         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
5820         to remove pattern statements.
5822 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5824         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
5825         result of dfs_enumerate_from when constructing stmt_vec_infos,
5826         instead of additionally calling get_loop_body.
5828 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5830         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
5831         parameter.
5832         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
5833         When creating an iv, assert that the step is not known to be zero.
5834         (vect_setup_realignment): Update call accordingly.
5835         * tree-vect-stmts.c (vectorizable_store): Likewise.
5836         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
5838 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5840         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
5841         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
5842         (vectorizable_reduction): Likewise.
5843         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5844         (vect_detect_hybrid_slp_stmts): Likewise.
5845         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5847 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
5849         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
5850         (wide_int_set_zero_nonzero_bits): ...this.
5851         (zero_nonzero_bits_from_vr): Rename to...
5852         (vrp_set_zero_nonzero_bits): ...this.
5853         (extract_range_from_multiplicative_op_1): Abstract wide int
5854         code...
5855         (wide_int_range_multiplicative_op): ...here.
5856         (extract_range_from_binary_expr_1): Extract wide int binary
5857         operations into their own functions.
5858         (wide_int_range_lshift): New.
5859         (wide_int_range_can_optimize_bit_op): New.
5860         (wide_int_range_shift_undefined_p): New.
5861         (wide_int_range_bit_xor): New.
5862         (wide_int_range_bit_ior): New.
5863         (wide_int_range_bit_and): New.
5864         (wide_int_range_trunc_mod): New.
5865         (extract_range_into_wide_ints): New.
5866         (vrp_shift_undefined_p): New.
5867         (extract_range_from_multiplicative_op): New.
5868         (vrp_can_optimize_bit_op): New.
5869         * tree-vrp.h (value_range::dump): New.
5870         (wide_int_range_multiplicative_op): New.
5871         (wide_int_range_lshift):New.
5872         (wide_int_range_shift_undefined_p): New.
5873         (wide_int_range_bit_xor): New.
5874         (wide_int_range_bit_ior): New.
5875         (wide_int_range_bit_and): New.
5876         (wide_int_range_trunc_mod): New.
5877         (zero_nonzero_bits_from_bounds): Rename to...
5878         (wide_int_set_zero_nonzero_bits): ...this.
5879         (zero_nonzero_bits_from_vr): Rename to...
5880         (vrp_set_zero_nonzero_bits): ...this.
5881         (range_easy_mask_min_max): Rename to...
5882         (wide_int_range_can_optimize_bit_op): this.
5883         * vr-values.c (simplify_bit_ops_using_ranges): Rename
5884         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
5886 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5888         * tree-vectorizer.h (vect_orig_stmt): New function.
5889         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
5890         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
5891         (vect_create_epilog_for_reduction): Likewise.
5892         (vectorizable_live_operation): Likewise.
5893         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
5894         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
5895         * tree-vect-stmts.c (vectorizable_call): Likewise.
5896         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
5898 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5900         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
5901         argument.
5902         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
5903         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
5904         (vect_transform_loop): Likewise.
5905         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5907 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5909         * tree-vectorizer.h (vect_schedule_slp): Return void.
5910         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5911         (vect_schedule_slp): Likewise.
5913 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5915         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
5916         argument.
5917         (vect_transform_loop): Update calls accordingly.  Schedule SLP
5918         instances before the main loop, if any exist.
5920 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5922         PR tree-optimization/86749
5923         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
5924         If the lhs is used in a COND_EXPR, check that it is being used
5925         as the "then" or "else" value.
5927 2018-08-01  Tom de Vries  <tdevries@suse.de>
5929         PR target/86800
5930         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5931         speculation_safe_value_not_needed.
5933 2018-08-01  Richard Biener  <rguenther@suse.de>
5935         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
5936         as base and offset.
5938 2018-08-01  Martin Liska  <mliska@suse.cz>
5940         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
5941         format how successful transformation is dumped.
5942         (gimple_mod_pow2_value_transform): Likewise.
5943         (gimple_mod_subtract_transform): Likewise.
5944         (gimple_stringops_transform): Likewise.
5946 2018-08-01  Martin Liska  <mliska@suse.cz>
5948         PR value-prof/35543
5949         * value-prof.c (interesting_stringop_to_profile_p):
5950         Simplify the code and add BUILT_IN_MEMMOVE.
5951         (gimple_stringops_transform): Likewise.
5953 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
5955         * config/aarch64/aarch64-simd.md
5956         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
5957         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
5958         use GPI iterator instead of SI mode.
5960 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
5962         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
5963         rs6000_speculation_barrier.
5964         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
5965         new barrier pattern name.
5967 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
5969         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
5970         (speculation_barrier): New insn.
5972 2018-08-01  Richard Biener  <rguenther@suse.de>
5974         PR bootstrap/86724
5975         * graphite.h: Include isl/id.h and isl/space.h to allow build
5976         with ISL 0.20.
5978 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
5980         PR target/86651
5981         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
5982         mode for COFF targets.
5983         * defaults.h (TARGET_COFF): Define.
5984         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
5985         TARGET_COFF): Define.
5986         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
5987         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
5988         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
5990 2018-07-31  Alexandre Oliva <oliva@adacore.com>
5992         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
5993         * gimple-streamer-out.c (output_bb): Save it.
5994         * lto-streamer-in.c (input_struct_function_base): Restore
5995         instance discriminator if available.  Create map on demand.
5996         * lto-streamer-out.c (output_struct_function_base): Save it if
5997         available.
5998         * final.c (decl_to_instance_map): Document LTO strategy.
6000 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
6001             Olivier Hainque  <hainque@adacore.com>
6003         * debug.h (decl_to_instance_map_t): New type.
6004         (decl_to_instance_map): Declare.
6005         (maybe_create_decl_to_instance_map): New inline function.
6006         * final.c (bb_discriminator, last_bb_discriminator): New statics,
6007         to track basic block discriminators.
6008         (final_start_function_1): Initialize them.
6009         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
6010         bb_discriminator.
6011         (decl_to_instance_map): New variable.
6012         (map_decl_to_instance, maybe_set_discriminator): New functions.
6013         (notice_source_line): Set discriminator.
6015 2018-07-31  Ian Lance Taylor  <iant@golang.org>
6017         * targhooks.c (default_have_speculation_safe_value): Add
6018         ATTRIBUTE_UNUSED.
6020 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
6022         * dump-context.h: Include "pretty-print.h".
6023         (dump_context::refresh_dumps_are_enabled): New decl.
6024         (dump_context::emit_item): New decl.
6025         (class dump_context): Add fields "m_test_pp" and
6026         "m_test_pp_flags".
6027         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6028         (temp_dump_context::get_dumped_text): New decl.
6029         (class temp_dump_context): Add field "m_pp".
6030         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
6031         (dump_context::refresh_dumps_are_enabled): ...and add a test for
6032         m_test_pp.
6033         (set_dump_file): Update for above change.
6034         (set_alt_dump_file): Likewise.
6035         (dump_loc): New overload, taking a pretty_printer *.
6036         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
6037         to any test pretty-printer.
6038         (make_item_for_dump_gimple_stmt): New function, adapted from
6039         optinfo::add_gimple_stmt.
6040         (dump_context::dump_gimple_stmt): Call it, and use the result,
6041         eliminating the direct usage of dump_file and alt_dump_file in
6042         favor of indirectly using them via emit_item.
6043         (make_item_for_dump_gimple_expr): New function, adapted from
6044         optinfo::add_gimple_expr.
6045         (dump_context::dump_gimple_expr): Call it, and use the result,
6046         eliminating the direct usage of dump_file and alt_dump_file in
6047         favor of indirectly using them via emit_item.
6048         (make_item_for_dump_generic_expr): New function, adapted from
6049         optinfo::add_tree.
6050         (dump_context::dump_generic_expr): Call it, and use the result,
6051         eliminating the direct usage of dump_file and alt_dump_file in
6052         favor of indirectly using them via emit_item.
6053         (make_item_for_dump_printf_va): New function, adapted from
6054         optinfo::add_printf_va.
6055         (make_item_for_dump_printf): New function.
6056         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
6057         and use the result, eliminating the direct usage of dump_file and
6058         alt_dump_file in favor of indirectly using them via emit_item.
6059         (make_item_for_dump_dec): New function.
6060         (dump_context::dump_dec): Call it, and use the result,
6061         eliminating the direct usage of dump_file and alt_dump_file in
6062         favor of indirectly using them via emit_item.
6063         (make_item_for_dump_symtab_node): New function, adapted from
6064         optinfo::add_symtab_node.
6065         (dump_context::dump_symtab_node): Call it, and use the result,
6066         eliminating the direct usage of dump_file and alt_dump_file in
6067         favor of indirectly using them via emit_item.
6068         (dump_context::begin_scope): Reimplement, avoiding direct usage
6069         of dump_file and alt_dump_file in favor of indirectly using them
6070         via emit_item.
6071         (dump_context::emit_item): New member function.
6072         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6073         Set up test pretty-printer on the underlying context.  Call
6074         refresh_dumps_are_enabled.
6075         (temp_dump_context::~temp_dump_context): Call
6076         refresh_dumps_are_enabled.
6077         (temp_dump_context::get_dumped_text): New member function.
6078         (selftest::verify_dumped_text): New function.
6079         (ASSERT_DUMPED_TEXT_EQ): New macro.
6080         (selftest::test_capture_of_dump_calls): Run all tests twice, with
6081         and then without optinfo enabled.  Add uses of
6082         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
6083         * dumpfile.h: Update comment for the dump_* API.
6084         * optinfo-emit-json.cc
6085         (selftest::test_building_json_from_dump_calls): Update for new
6086         param for temp_dump_context ctor.
6087         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
6088         and "m_owned" field.
6089         (optinfo_item::~optinfo_item): Likewise.
6090         (optinfo::add_item): New member function.
6091         (optinfo::emit): Update comment.
6092         (optinfo::add_string): Delete.
6093         (optinfo::add_printf): Delete.
6094         (optinfo::add_printf_va): Delete.
6095         (optinfo::add_gimple_stmt): Delete.
6096         (optinfo::add_gimple_expr): Delete.
6097         (optinfo::add_tree): Delete.
6098         (optinfo::add_symtab_node): Delete.
6099         (optinfo::add_dec): Delete.
6100         * optinfo.h (class dump_context): New forward decl.
6101         (optinfo::add_item): New decl.
6102         (optinfo::add_string): Delete.
6103         (optinfo::add_printf): Delete.
6104         (optinfo::add_printf_va): Delete.
6105         (optinfo::add_gimple_stmt): Delete.
6106         (optinfo::add_gimple_expr): Delete.
6107         (optinfo::add_tree): Delete.
6108         (optinfo::add_symtab_node): Delete.
6109         (optinfo::add_dec): Delete.
6110         (optinfo::add_poly_int): Delete.
6111         (optinfo_item::optinfo_item): Remove "owned" param.
6112         (class optinfo_item): Remove field "m_owned".
6114 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6116         PR middle-end/86705
6117         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
6118         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
6119         requested variable alignment.
6120         (expand_one_ssa_partition): Likewise.
6121         (expand_one_var): Likewise.
6123 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6125         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6126         to speculation_safe_value_not_needed.
6128 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6130         * targhooks.h (speculation_safe_value_not_needed): New prototype.
6131         * targhooks.c (speculation_safe_value_not_needed): New function.
6132         * target.def (have_speculation_safe_value): Update documentation.
6133         * doc/tm.texi: Regenerated.
6135 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6137         * config/aarch64/iterators.md (ALLI_TI): New iterator.
6138         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
6139         expand.
6140         (despeculate_copy<ALLI:mode>_insn): New insn.
6141         (despeculate_copyti_insn): New insn.
6142         (despeculate_simple<ALLI:mode>): New insn
6143         (despeculate_simpleti): New insn.
6144         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
6145         function.
6146         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
6147         aarch64_speculation_safe_value.
6148         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
6150 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6152         * config/aarch64/aarch64-speculation.cc: New file.
6153         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
6154         before pass_reorder_blocks.
6155         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
6156         prototype.
6157         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
6158         X14 and X15 when tracking speculation.
6159         * config/aarch64/aarch64.md (register name constants): Add
6160         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
6161         (unspec): Add UNSPEC_SPECULATION_TRACKER.
6162         (speculation_barrier): New insn attribute.
6163         (cmp<mode>): Allow SP in comparisons.
6164         (speculation_tracker): New insn.
6165         (speculation_barrier): Add speculation_barrier attribute.
6166         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
6167         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
6168         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
6170 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6172         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
6173         aarch64_track_speculation is true.
6174         (tb<optab><mode>1): Likewise.
6175         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
6176         generate CB[N]Z when tracking speculation.
6177         (aarch64_split_compare_and_swap): Likewise.
6178         (aarch64_split_atomic_op): Likewise.
6180 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6182         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
6184 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6186         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
6187         (speculation_barrier): New insn.
6189 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6191         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
6192         * config/arm/arm.md (speculation_barrier): New expand.
6193         (speculation_barrier_insn): New pattern.
6195 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6197         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
6198         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
6199         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
6200         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
6201         list.
6202         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
6203         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
6204         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
6205         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
6206         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
6207         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
6208         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
6209         * builtins.c (expand_speculation_safe_value): New function.
6210         (expand_builtin): Call it.
6211         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
6212         * doc/extend.texi: Document __builtin_speculation_safe_value.
6213         * doc/md.texi: Document "speculation_barrier" pattern.
6214         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
6215         TARGET_HAVE_SPECULATION_SAFE_VALUE.
6216         * doc/tm.texi: Regenerated.
6217         * target.def (have_speculation_safe_value, speculation_safe_value): New
6218         hooks.
6219         * targhooks.c (default_have_speculation_safe_value): New function.
6220         (default_speculation_safe_value): New function.
6221         * targhooks.h (default_have_speculation_safe_value): Add prototype.
6222         (default_speculation_safe_value): Add prototype.
6224 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
6226         * dump-context.h (dump_context::dump_loc): New decl.
6227         * dumpfile.c (dump_context::dump_loc): New member function.
6228         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
6229         and dump_gimple_stmt.
6230         (dump_context::dump_gimple_expr_loc): Likewise, using
6231         dump_gimple_expr.
6232         (dump_context::dump_generic_expr_loc): Likewise, using
6233         dump_generic_expr.
6234         (dump_context::dump_printf_loc_va): Likewise, using
6235         dump_printf_va.
6236         (dump_context::begin_scope): Explicitly using the global function
6237         "dump_loc", rather than the member function.
6239 2018-07-31  Martin Sebor  <msebor@redhat.com>
6241         PR tree-optimization/86741
6242         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
6244 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
6246         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
6247         depend on whether prefetch instructions will be emitted or not.
6248         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
6249         will be emitted or not.
6250         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
6251         (TARGET_SETMEM_PFD): New macros.
6253 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6255         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
6256         (NULL_STMT_VEC_INFO): Delete.
6257         (stmt_vec_info::operator*): Likewise.
6258         (stmt_vec_info::operator gimple *): Likewise.
6259         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
6260         of NULL_STMT_VEC_INFO.
6261         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6262         (vect_reassociating_reduction_p): Likewise.
6263         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6264         (vectorizable_store): Likewise.
6265         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
6266         (vec_info::free_stmt_vec_infos): Likewise.
6268 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6270         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
6271         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
6273 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6275         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
6276         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6277         (vec_info::free_stmt_vec_info): New private member functions.
6278         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
6279         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
6280         * tree-parloops.c (gather_scalar_reductions): Remove calls to
6281         set_stmt_vec_info_vec and free_stmt_vec_infos.
6282         * tree-vect-loop.c (_loop_vec_info): Remove call to
6283         set_stmt_vec_info_vec.
6284         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
6285         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
6286         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
6287         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6288         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
6289         assignments in {vec_info::,}new_stmt_vec_info that are redundant
6290         with the clearing in the xcalloc.
6291         (stmt_vec_info_vec): Delete.
6292         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
6293         (vectorize_loops): Likewise.
6294         (vec_info::~vec_info): Remove argument from call to
6295         free_stmt_vec_infos.
6296         (vec_info::add_stmt): Remove vinfo argument from call to
6297         new_stmt_vec_info.
6299 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6301         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
6302         rather than a gimple stmt.
6303         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
6304         information for pattern statements when passed the original
6305         statement; instead wait to be passed the pattern statement itself.
6306         Don't call set_vinfo_for_stmt here.
6307         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
6308         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
6309         stmt_vec_infos here.
6310         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
6311         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
6312         stmt_vec_infos entry.
6314 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6316         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
6317         * tree-vectorizer.c (vec_info::replace_stmt): New function.
6318         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
6319         * tree-vect-stmts.c (vectorizable_call): Likewise.
6320         (vectorizable_simd_clone_call): Likewise.
6322 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6324         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
6325         * tree-vectorizer.c (vec_info::remove_stmt): New function.
6326         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
6327         * tree-vect-loop.c (vect_transform_loop): Likewise.
6328         * tree-vect-slp.c (vect_schedule_slp): Likewise.
6329         * tree-vect-stmts.c (vect_remove_stores): Likewise.
6331 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6333         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
6334         (vect_dr_stmt): Delete.
6335         * tree-vectorizer.c (vec_info::lookup_dr): New function.
6336         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
6337         of DR_VECT_AUX.
6338         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
6339         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
6340         (vect_verify_datarefs_alignment, vect_peeling_supportable)
6341         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6342         (vect_analyze_data_refs): Likewise.
6343         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
6344         argument.
6345         (vect_find_same_alignment_drs): Likewise.
6346         (vect_slp_analyze_node_dependences): Update calls accordingly.
6347         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
6348         instead of DR_VECT_AUX.
6349         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
6350         of a vector data references.  Use vec_info::lookup_dr instead of
6351         DR_VECT_AUX.
6352         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
6353         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
6354         instead of DR_VECT_AUX.
6356 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6358         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
6359         dr_vec_info.
6360         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6361         accordingly.
6362         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6363         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6364         (vect_gen_prolog_loop_niters): Likewise.
6366 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6368         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
6369         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
6370         (vect_known_alignment_in_bytes, vect_dr_behavior)
6371         (vect_get_scalar_dr_size): Take references as dr_vec_infos
6372         instead of data_references.  Update calls to other routines for
6373         which the same change has been made.
6374         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
6375         dr_vec_infos instead of stmt_vec_infos.
6376         (vect_analyze_data_ref_dependence): Update call accordingly.
6377         (vect_slp_analyze_data_ref_dependence)
6378         (vect_record_base_alignments): Use DR_VECT_AUX.
6379         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
6380         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
6381         (vector_alignment_reachable_p, vect_get_data_access_cost)
6382         (vect_peeling_supportable, vect_analyze_group_access_1)
6383         (vect_analyze_group_access, vect_analyze_data_ref_access)
6384         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
6385         (vect_compile_time_alias, vect_small_gap_p)
6386         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
6387         (vect_supportable_dr_alignment): Take references as dr_vec_infos
6388         instead of data_references.  Update calls to other routines for
6389         which the same change has been made.
6390         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
6391         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6392         (vect_slp_analyze_and_verify_node_alignment)
6393         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6394         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6395         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
6396         above changes.
6397         (_vect_peel_info::dr): Replace with...
6398         (_vect_peel_info::dr_info): ...this new field.
6399         (vect_peeling_hash_get_most_frequent)
6400         (vect_peeling_hash_choose_best_peeling): Update accordingly.
6401         (vect_peeling_hash_get_lowest_cost):
6402         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
6403         routines for which the same change has been made.
6404         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
6405         data_reference.
6406         * tree-vect-loop-manip.c (get_misalign_in_elems)
6407         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
6408         above changes.
6409         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6410         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
6411         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
6412         (get_group_load_store_type, get_negative_load_store_type)
6413         (vect_get_data_ptr_increment, vectorizable_store)
6414         (vectorizable_load): Likewise.
6415         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
6416         Update calls to other routines for which the same change has been made.
6418 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6420         * tree-vectorizer.h (vec_info::move_dr): New member function.
6421         (dataref_aux): Rename to...
6422         (dr_vec_info): ...this and add "dr" and "stmt" fields.
6423         (_stmt_vec_info::dr_aux): Update accordingly.
6424         (_stmt_vec_info::data_ref_info): Delete.
6425         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
6426         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
6427         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
6428         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
6429         of data_ref.
6430         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
6431         (STMT_VINFO_DR_INFO): New macro.
6432         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
6433         (set_dr_misalignment): Update after rename of dataref_aux.
6434         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
6435         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
6436         initialization of STMT_VINFO_DATA_REF.
6437         * tree-vectorizer.c (vec_info::move_dr): New function.
6438         * tree-vect-patterns.c (vect_recog_bool_pattern)
6439         (vect_recog_mask_conversion_pattern)
6440         (vect_recog_gather_scatter_pattern): Use it.
6441         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
6442         the "dr" and "stmt" fields of dr_vec_info instead of
6443         STMT_VINFO_DATA_REF.
6445 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6447         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
6448         (is_pattern_stmt_p): Use it.
6449         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
6450         on pattern statements.
6452 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6454         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
6455         original stmt as a stmt_vec_info rather than a gimple stmt.
6456         (vect_pattern_recog_1): Take the statement directly as a
6457         stmt_vec_info, rather than via a gimple_stmt_iterator.
6458         Update call to vect_mark_pattern_stmts.
6459         (vect_pattern_recog): Update calls accordingly.
6461 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6463         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
6464         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
6465         a vect_def_type for the first argument.
6466         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
6467         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
6468         operand if it isn't defined by a vectorized statement.
6469         (vect_build_gather_load_calls): Remove the mask_dt argument and
6470         update calls to vect_get_vec_def_for_stmt_copy.
6471         (vectorizable_bswap): Likewise the dt argument.
6472         (vectorizable_call): Update calls to vectorizable_bswap and
6473         vect_get_vec_def_for_stmt_copy.
6474         (vectorizable_simd_clone_call, vectorizable_assignment)
6475         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
6476         (vectorizable_comparison): Update calls to
6477         vect_get_vec_def_for_stmt_copy.
6478         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
6479         vect_is_simple_use.
6480         (vect_get_loop_based_defs): Remove dt argument and update call
6481         to vect_get_vec_def_for_stmt_copy.
6482         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
6483         and vect_get_vec_def_for_stmt_copy.
6484         (vectorizable_load): Update calls to vect_build_gather_load_calls
6485         and vect_get_vec_def_for_stmt_copy.
6486         * tree-vect-loop.c (vect_create_epilog_for_reduction)
6487         (vectorizable_reduction, vectorizable_live_operation): Update calls
6488         to vect_get_vec_def_for_stmt_copy.
6490 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6492         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
6493         and gimple stmt arguments with a stmt_vec_info.
6494         (vect_record_base_alignments): Update calls accordingly.
6495         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
6496         and gimple stmt arguments with a stmt_vec_info.
6497         (vect_build_slp_tree_1): Remove vinfo argument and update call
6498         to vect_record_max_nunits.
6499         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
6500         and vect_record_max_nunits.
6502 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6504         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
6505         file and take a stmt_vec_info instead of a gimple stmt.
6506         (supportable_widening_operation, vect_finish_replace_stmt)
6507         (vect_finish_stmt_generation, vect_get_store_rhs)
6508         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
6509         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
6510         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
6511         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
6512         (vect_create_data_ref_ptr, bump_vector_ptr)
6513         (vect_permute_store_chain, vect_setup_realignment)
6514         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
6515         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
6516         (vectorizable_reduction, vectorizable_induction)
6517         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
6518         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
6519         than gimple stmts as arguments.
6520         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
6521         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
6522         (can_group_stmts_p, vect_check_gather_scatter)
6523         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6524         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
6525         (vect_permute_load_chain, vect_shift_permute_load_chain)
6526         (vect_transform_grouped_load)
6527         (vect_record_grouped_load_vectors): Likewise.
6528         * tree-vect-loop.c (vect_fixup_reduc_chain)
6529         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
6530         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
6531         (vectorizable_reduction, vectorizable_induction)
6532         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
6533         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
6534         (vect_get_load_store_mask): Likewise.
6535         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
6536         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
6537         * tree-vect-stmts.c (vect_mark_relevant)
6538         (is_simple_and_all_uses_invariant)
6539         (exist_non_indexing_operands_for_use_p, process_use)
6540         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
6541         (vect_get_vec_def_for_operand, vect_get_vec_defs)
6542         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
6543         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
6544         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
6545         (get_negative_load_store_type, get_load_store_type)
6546         (vect_check_load_store_mask, vect_check_store_rhs)
6547         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
6548         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6549         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6550         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6551         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
6552         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
6553         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
6554         (supportable_widening_operation): Likewise.
6556 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6558         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
6559         a stmt_vec_info instead of a gcall.
6560         (vect_check_gather_scatter): Update call accordingly.
6561         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
6562         of a gphi.
6563         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
6564         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
6565         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
6566         instead of a gimple stmt.
6567         (vect_transform_loop): Update calls accordingly.
6568         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
6569         stmt_vec_infos instead of gimple stmts.
6570         (vect_analyze_slp_instance): Update use accordingly.
6571         * tree-vect-stmts.c (read_vector_array, write_vector_array)
6572         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
6573         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
6574         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
6575         (vect_gen_widened_results_half, vect_get_loop_based_defs)
6576         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
6577         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
6578         down to subroutines.
6580 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6582         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
6583         of the worklist from a vector of gimple stmts to a vector of
6584         stmt_vec_infos.
6585         * tree-vect-stmts.c (vect_mark_relevant, process_use)
6586         (vect_mark_stmts_to_be_vectorized): Likewise
6588 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6590         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
6591         statement before passing it to vect_analyze_stmt.
6592         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
6593         the chain of phi vector definitions.  Track the exit phi via its
6594         stmt_vec_info.
6595         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
6596         STMT_VINFO_REDUC_DEF.
6597         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
6598         stmt_vec_infos to handle the statement chains.
6599         (vect_get_slp_defs): Record the first statement in the node
6600         using a stmt_vec_info.
6601         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
6602         statements here and pass their stmt_vec_info down to subroutines.
6603         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
6604         down to vect_finish_stmt_generation.
6605         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
6606         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
6607         stmt_vec_infos to subroutines.
6608         (vect_remove_stores): Use stmt_vec_infos to handle the statement
6609         chains.
6611 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6613         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
6614         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
6615         (vect_permute_store_chain, vect_setup_realignment)
6616         (vect_permute_load_chain, vect_shift_permute_load_chain)
6617         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
6618         stmts internally, and when passing values to other vectorizer routines.
6619         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6620         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
6621         (vect_analyze_loop_operations, get_initial_def_for_reduction)
6622         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
6623         (vectorizable_reduction, vectorizable_induction)
6624         (vectorizable_live_operation, vect_transform_loop_stmt)
6625         (vect_transform_loop): Likewise.
6626         * tree-vect-patterns.c (vect_reassociating_reduction_p)
6627         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
6628         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
6629         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6630         (vect_slp_analyze_node_operations_1): Likewise.
6631         * tree-vect-stmts.c (vect_mark_relevant, process_use)
6632         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
6633         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
6634         (vect_finish_stmt_generation_1, get_group_load_store_type)
6635         (get_load_store_type, vect_build_gather_load_calls)
6636         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6637         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6638         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6639         (vectorizable_store, vectorizable_load, vectorizable_condition)
6640         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
6641         (supportable_widening_operation): Likewise.
6642         (vect_get_vector_types_for_stmt): Likewise.
6643         * tree-vectorizer.h (vect_dr_behavior): Likewise.
6645 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6647         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6648         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
6649         (vect_permute_store_chain, vect_permute_load_chain)
6650         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
6651         repeated stmt_vec_info lookups.
6652         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6653         (vect_update_ivs_after_vectorizer): Likewise.
6654         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
6655         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6656         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
6657         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6658         (vect_bb_slp_scalar_cost): Likewise.
6659         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
6661 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6663         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
6664         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
6665         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
6666         to get gassigns and gcalls, rather than operating on generc gimple
6667         stmts.
6668         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
6669         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
6670         (vectorizable_load, vect_analyze_stmt): Likewise.
6671         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
6673 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6675         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
6676         return stmt_vec_infos rather than gimple stmts.  Do not accept
6677         null arguments.
6678         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
6679         of a gimple stmt.
6680         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6681         Update use of get_later_stmt.
6682         (vect_get_constant_vectors): Update call accordingly.
6683         (vect_schedule_slp_instance): Likewise
6684         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
6685         (vect_slp_analyze_instance_dependence): Likewise.
6686         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
6688 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6690         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
6691         (stmt_info_for_cost::stmt_info): ...this new field.
6692         (add_stmt_costs): Update accordingly.
6693         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6694         (vect_get_known_peeling_cost): Likewise.
6695         (vect_estimate_min_profitable_iters): Likewise.
6696         * tree-vect-stmts.c (record_stmt_cost): Likewise.
6698 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6700         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
6701         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6702         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6703         accordingly.
6704         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
6706 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6708         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
6709         a gimple stmt to a stmt_vec_info.
6710         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6712 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6714         * tree-vectorizer.h (vec_info::grouped_stores): Change from
6715         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6716         (_loop_vec_info::reduction_chains): Likewise.
6717         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
6718         accordingly.
6719         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6721 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6723         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
6724         a gimple stmt to a stmt_vec_info.
6725         (_stmt_vec_info::next_element): Likewise.
6726         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
6727         (vect_slp_analyze_and_verify_node_alignment)
6728         (vect_analyze_group_access_1, vect_analyze_group_access)
6729         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
6730         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
6731         (vect_supportable_dr_alignment): Update accordingly.
6732         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
6733         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
6734         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
6735         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6736         * tree-vect-slp.c (vect_build_slp_tree_1)
6737         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
6738         (vect_split_slp_store_group, vect_analyze_slp_instance)
6739         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
6740         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
6741         (get_group_load_store_type, get_load_store_type)
6742         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
6743         (vect_transform_stmt, vect_remove_stores): Likewise.
6745 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6747         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
6748         than a gimple stmt.
6749         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6750         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
6751         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
6752         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
6753         (vector_alignment_reachable_p, vect_get_data_access_cost)
6754         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
6755         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
6756         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6757         (vect_analyze_group_access_1, vect_analyze_group_access)
6758         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
6759         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
6760         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
6761         result of vect_dr_stmt and use the stmt_vec_info instead of
6762         the associated gimple stmt.
6763         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6764         (vect_gen_prolog_loop_niters): Likewise.
6765         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6767 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6769         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
6770         to a vec<stmt_vec_info>.
6771         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
6772         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
6773         vec<stmt_vec_info>.
6774         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
6775         to a vec<stmt_vec_info>.
6776         (bst_traits::value_type, bst_traits::value_type): Likewise.
6777         (bst_traits::hash): Update accordingly.
6778         (vect_get_and_check_slp_defs): Change the stmts parameter from
6779         a vec<gimple *> to a vec<stmt_vec_info>.
6780         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
6781         (vect_build_slp_tree): Likewise.
6782         (vect_build_slp_tree_2): Likewise.  Update uses of
6783         SLP_TREE_SCALAR_STMTS.
6784         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
6785         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
6786         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
6787         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
6788         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
6789         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
6790         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
6791         (vect_get_constant_vectors, vect_get_slp_defs)
6792         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
6793         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
6794         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
6795         instead of gimple stmts.
6796         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
6797         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
6798         (vect_slp_analyze_instance_dependence): Update uses of
6799         SLP_TREE_SCALAR_STMTS.
6800         (vect_slp_analyze_and_verify_node_alignment): Likewise.
6801         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
6802         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
6803         (get_initial_defs_for_reduction): Likewise.
6804         (vect_create_epilog_for_reduction): Likewise.
6805         (vectorize_fold_left_reduction): Likewise.
6806         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
6807         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
6808         (can_vectorize_live_stmts): Likewise.
6810 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6812         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
6813         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6814         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
6815         than gimple stmts.
6816         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
6817         of a gimple stmt.
6818         (gather_scalar_reductions): Update after above interface changes.
6819         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
6820         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
6821         than gimple stmts.
6822         (vect_force_simple_reduction): Likewise.
6823         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
6824         LOOP_VINFO_REDUCTIONS.
6825         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6827 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6829         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
6830         a gimple stmt to a stmt_vec_info.
6831         * tree-vect-loop.c (vect_active_double_reduction_p)
6832         (vect_force_simple_reduction, vectorizable_reduction): Update
6833         accordingly.
6835 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6837         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
6838         vec<gimple *> to a vec<stmt_vec_info>.
6839         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
6840         the reduction_phis argument from a vec<gimple *> to a
6841         vec<stmt_vec_info>.
6842         (vectorizable_reduction): Likewise the phis local variable that
6843         is passed to vect_create_epilog_for_reduction.  Update for new type
6844         of SLP_TREE_VEC_STMTS.
6845         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
6846         (vectorizable_live_operation): Likewise.
6847         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
6848         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
6850 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6852         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
6853         a gimple stmt to a stmt_vec_info.
6854         (vectorizable_condition, vectorizable_live_operation)
6855         (vectorizable_reduction, vectorizable_induction): Pass back the
6856         vectorized statement as a stmt_vec_info.
6857         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
6858         use of STMT_VINFO_VEC_STMT.
6859         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
6860         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
6861         as stmt_vec_infos rather than gimple stmts.
6862         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
6863         to a stmt_vec_info.
6864         (vectorizable_live_operation): Likewise.
6865         (vectorizable_reduction, vectorizable_induction): Likewise,
6866         updating use of STMT_VINFO_VEC_STMT.
6867         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
6868         of STMT_VINFO_VEC_STMT.
6869         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
6870         (vectorizable_simd_clone_call, vectorizable_conversion)
6871         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6872         (vectorizable_store, vectorizable_load, vectorizable_condition)
6873         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
6874         from a gimple stmt to a stmt_vec_info.
6875         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
6876         pointer to a stmt_vec_info to the vectorizable_* routines.
6878 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6880         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
6881         a gimple stmt to a stmt_vec_info.
6882         (is_pattern_stmt_p): Update accordingly.
6883         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
6884         (vect_record_grouped_load_vectors): Likewise.
6885         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6886         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
6887         (vect_model_reduction_cost): Likewise.
6888         (vect_create_epilog_for_reduction): Likewise.
6889         (vectorizable_reduction, vectorizable_induction): Likewise.
6890         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6891         Return the stmt_vec_info for the pattern statement.
6892         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
6893         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
6894         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
6895         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
6896         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6897         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
6898         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
6899         (free_stmt_vec_info, vect_is_simple_use): Likewise.
6901 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6903         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
6904         (vect_finish_stmt_generation): Likewise.
6905         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6906         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
6907         (vect_build_gather_load_calls): Use the return value of the above
6908         functions instead of a separate call to vinfo_for_stmt.  Use narrow
6909         scopes for the input gimple stmt and wider scopes for the associated
6910         stmt_vec_info.  Use vec_info::lookup_def when setting these
6911         stmt_vec_infos from an SSA_NAME definition.
6912         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6913         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6914         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6915         (vectorizable_store, vectorizable_load, vectorizable_condition)
6916         (vectorizable_comparison): Likewise.
6917         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
6918         (vectorizable_reduction): Likewise.
6920 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6922         * tree-vectorizer.h (vect_is_simple_use): Add an optional
6923         stmt_vec_info * parameter before the optional gimple **.
6924         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6925         (process_use, vect_get_vec_def_for_operand_1): Update callers.
6926         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
6927         * tree-vect-loop.c (vectorizable_reduction): Likewise.
6928         (vectorizable_live_operation): Likewise.
6929         * tree-vect-patterns.c (type_conversion_p): Likewise.
6930         (vect_look_through_possible_promotion): Likewise.
6931         (vect_recog_rotate_pattern): Likewise.
6932         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6934 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6936         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
6937         a typedef to a wrapper class.
6938         (NULL_STMT_VEC_INFO): New macro.
6939         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
6940         (stmt_vec_info::operator*): New function.
6941         (stmt_vec_info::operator gimple *): Likewise.
6942         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
6943         (add_stmt_costs): Likewise.
6944         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
6945         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6946         (vect_get_known_peeling_cost): Likewise.
6947         (vect_estimate_min_profitable_iters): Likewise.
6948         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6949         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
6950         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6951         (vectorizable_store, free_stmt_vec_infos): Likewise.
6952         (new_stmt_vec_info): Change return type of xcalloc to
6953         _stmt_vec_info *.
6955 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6957         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
6958         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
6959         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
6960         a single_imm_use-based sequence.
6961         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
6963 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6965         * tree-vectorizer.h (vec_info::lookup_def): Declare.
6966         * tree-vectorizer.c (vec_info::lookup_def): New function.
6967         * tree-vect-patterns.c (vect_get_internal_def): Use it.
6968         (vect_widened_op_tree): Likewise.
6969         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6970         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
6971         (vectorizable_reduction): Likewise.
6972         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
6973         of a gimple *.
6974         (vect_is_slp_reduction): Update calls accordingly.  Use
6975         vec_info::lookup_def.
6976         (vect_is_simple_reduction): Likewise
6977         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
6979 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6981         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
6982         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
6983         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
6984         of vinfo_for_stmt.
6985         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
6986         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
6987         (vect_update_vf_for_slp, vect_analyze_loop_operations)
6988         (vect_is_slp_reduction, vectorizable_induction)
6989         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
6990         * tree-vect-patterns.c (vect_init_pattern_stmt):
6991         (vect_determine_min_output_precision_1, vect_determine_precisions)
6992         (vect_pattern_recog): Likewise.
6993         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
6994         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
6995         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
6996         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
6997         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
6998         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
6999         info field from a loop to a loop_vec_info.
7001 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7003         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
7004         (vec_info::add_stmt): Declare.
7005         * tree-vectorizer.c (vec_info::add_stmt): New function.
7006         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
7007         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
7008         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7009         (vectorizable_induction): Likewise.
7010         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
7011         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7012         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
7013         (vectorizable_load): Likewise.
7014         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7015         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
7016         (vect_recog_gather_scatter_pattern): Likewise.
7017         (append_pattern_def_seq): Likewise.  Remove a check that is
7018         performed by add_stmt itself.
7020 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7022         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
7023         which make_ssa_name was called with new_stmt before new_stmt
7024         had been created.
7026 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7028         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
7029         split out from...
7030         (vect_is_slp_reduction): ...here...
7031         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
7032         that are already known to be false.
7034 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7036         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
7037         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
7038         STMT_VINFO_NUM_SLP_USES when it's true.
7039         (vect_free_slp_instance): Add a final_p parameter and pass it to
7040         vect_free_slp_tree.
7041         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
7042         (vect_analyze_slp_instance): Likewise.
7043         (vect_slp_analyze_operations): Likewise.
7044         (vect_slp_analyze_bb_1): Likewise.
7045         * tree-vectorizer.c (vec_info): Likewise.
7046         * tree-vect-loop.c (vect_transform_loop): Likewise.
7048 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7050         * tree-vect-loop.c (vectorizable_reduction): Assert that the
7051         function is not called for second and subsequent members of
7052         a reduction group.
7054 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7056         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
7057         cases for nested loops from here to ...
7058         (vect_create_epilog_for_reduction): ...here.  Only call
7059         vect_is_simple_use for inner-loop reductions.
7061 2018-07-31  Martin Liska  <mliska@suse.cz>
7063         PR gcov-profile/85338
7064         PR gcov-profile/85350
7065         PR gcov-profile/85372
7066         * profile.c (struct location_triplet): New.
7067         (struct location_triplet_hash): Likewise.
7068         (output_location): Do not output a BB that
7069         is already recorded for a line.
7070         (branch_prob): Use streamed_locations.
7072 2018-07-31  Martin Liska  <mliska@suse.cz>
7074         PR gcov-profile/85370
7075         * coverage.c (coverage_begin_function): Do not mark target
7076         clones as artificial functions.
7078 2018-07-31  Martin Liska  <mliska@suse.cz>
7080         PR gcov-profile/83813
7081         PR gcov-profile/84758
7082         PR gcov-profile/85217
7083         PR gcov-profile/85332
7084         * profile.c (branch_prob): Do not record GOTO expressions
7085         for GIMPLE statements which locations are already streamed.
7087 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7089         * gcc.c (handle_spec_function): Accept a soft_matched_part
7090         argument, as do_spec_1.  Pass it down to ...
7091         (eval_spec_function): Accept a soft_matched_part argument,
7092         and pass it down to ...
7093         (do_spec_2): Accept a soft_matched_part argument, and pass
7094         it down to do_spec_1.
7095         (do_spec_1): Pass soft_matched_part to handle_spec_function.
7096         (handle_braces): Update call to handle_spec_function.
7097         (driver::set_up_specs): Update calls to do_spec_2.
7098         (compare_debug_dump_opt_spec_function): Likewise.
7099         (compare_debug_self_opt_spec_function): Likewise.
7101 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7103         * common.opt (nolibc): New option.
7104         * doc/invoke.texi (Link Options): Document it.
7105         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
7106         * config/alpha/linux.h: Likewise.
7107         * config/arc/elf.h: Likewise.
7108         * config/arm/uclinux-elf.h: Likewise.
7109         * config/arm/unknown-elf.h: Likewise.
7110         * config/avr/avrlibc.h: Likewise.
7111         * config/bfin/bfin.h: Likewise.
7112         * config/bfin/linux.h: Likewise.
7113         * config/bfin/uclinux.h: Likewise.
7114         * config/darwin.h: Likewise.
7115         * config/darwin10.h: Likewise.
7116         * config/darwin12.h: Likewise.
7117         * config/gnu-user.h: Likewise.
7118         * config/lm32/uclinux-elf.h: Likewise.
7119         * config/pa/pa-hpux11.h: Likewise.
7120         * config/pa/pa64-hpux.h: Likewise.
7121         * config/sparc/sparc.h: Likewise.
7123 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7125         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
7126         undefined variables.
7128 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
7130         PR target/86640
7131         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
7132         instead of GEN_INT.
7134 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7136         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7137         terminated string literal.
7139 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
7141         PR rtl-optimization/85160
7142         * combine.c (is_just_move): New function.
7143         (try_combine): Allow combining two instructions into two if neither of
7144         the original instructions was a move.
7146 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
7148         PR target/86673
7149         * doc/extend.texi (Global Register Variables): Discourage use of type
7150         qualifiers.
7151         (Local Register Variables): Likewise.
7153 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
7155         PR tree-optimization/86506
7156         * hwint.h (ceil_log2): Resync with hwint.c implementation.
7158 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
7160         PR target/86547
7161         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
7162         hard_regno, make sure no insn between `from` and `to` clobbers it.
7164 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
7165             Tom de Vries  <tdevries@suse.de>
7167         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
7168         (PTX_DEFAULT_RUNTIME_DIM): ... this.
7169         (nvptx_goacc_validate_dims): Set default worker and gang dims to
7170         PTX_DEFAULT_RUNTIME_DIM.
7171         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
7173 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
7175         * config/pa/pa.c (pa_output_addr_vec): Align address table.
7176         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
7177         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
7179 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
7181         * config/rs6000/constraints.md (wG constraint): Delete, no longer
7182         used.
7183         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
7184         predicate to reflect toc fusion has been deleted.
7185         (toc_fusion_mem_raw): Delete, no longer used.
7186         (toc_fusion_mem_wrapped): Likewise.
7187         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
7188         fusion mask bit.
7189         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
7190         Delete, no longer used.
7191         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
7192         meant to be used for toc fusion.
7193         (rs6000_debug_print_mode): Delete toc fusion debugging.
7194         (rs6000_debug_reg_global): Likewise.
7195         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
7196         fusion and secondary reload support that were never used.
7197         (rs6000_option_override_internal): Delete TOC fusion, that was only
7198         partially defined, and it did not work unless you also used the
7199         -mcmodel= switch.
7200         (rs6000_legitimate_address_p): Delete TOC fusion support.
7201         (rs6000_opt_masks): Likewise.
7202         (fusion_wrap_memory_address): Delete function, no longer used.
7203         (fusion_split_address); Delete TOC fusion support.
7204         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
7205         longer used with toc fusion being deleted.
7206         (TARGET_TOC_FUSION_FP): Likewise.
7207         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
7208         UNSPEC.
7209         (toc fusion spliter): Delete TOC fusion support.
7210         (toc_fusionload_<mode>): Likewise.
7211         (toc_fusionload_di): Likewise.
7212         (fusion_gpr_load_<mode>): Delete generator function, this insn no
7213         longer needs to be named.  Rename predicate to delete TOC fusion.
7214         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7215         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7216         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7217         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7218         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
7220 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7222         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
7223         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
7224         __int128 in built-in function prototypes.
7225         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
7226         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
7228 2018-07-27  Martin Sebor  <msebor@redhat.com>
7230         PR tree-optimization/86696
7231         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
7232         types, including enums.
7233         (handle_char_store): Be prepared for the above function to fail.
7235 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
7237         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
7238         when optimization level is lower than 2 or optimize for size.
7240 2018-07-26  Martin Sebor  <msebor@redhat.com>
7242         PR tree-optimization/86043
7243         PR tree-optimization/86042
7244         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
7245         (get_string_cst_length): Rename...
7246         (get_min_string_length): ...to this.  Add argument.
7247         (handle_char_store): Extend to handle multi-character stores by
7248         MEM_REF.
7249         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
7250         * tree.h (initializer_zerop): Add argument.
7252 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
7254         PR middle-end/86660
7255         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
7256         declare target to variables if they have always,{to,from,tofrom} map
7257         kinds.
7259 2018-07-26  Martin Liska  <mliska@suse.cz>
7261         PR lto/86548
7262         * lto-wrapper.c: Add linker_output as prefix
7263         for ltrans_output_file.
7265 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
7267         PR rtl-optimization/85805
7268         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
7269         value for hard registers if that was written in the same mode.
7271 2018-07-26  Martin Liska  <mliska@suse.cz>
7273         PR gcov-profile/86536
7274         * gcov.c (format_gcov): Use printf format %.*f directly
7275         and do not handle special values.
7277 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7279         * common/config/arc/arc-common.c (arc_option_optimization_table):
7280         Update default optimizations for size.
7282 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7284         * config/arc/arc.md (movsf_insn): Add short instruction selection.
7285         * config/arc/constraints.md (CfZ): New constraint.
7286         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
7287         (subsf3_fpu): Likewise.
7288         (cmpsf_fpu): Likewise.
7289         (cmpsf_fpu_uneq): Likewise.
7291 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7293         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
7294         accesses as well.
7295         (arc_is_uncached_mem_p): uncached applies to both the variable and
7296         the pointer.
7298 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7300         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
7301         register names.
7303 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
7305         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
7306         field "m_scopes" from vec to auto_vec.
7308 2018-07-25  Martin Liska  <mliska@suse.cz>
7310         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
7311         return type.
7313 2018-07-25  Richard Biener  <rguenther@suse.de>
7315         PR debug/86654
7316         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
7317         special wrt context_die late.
7318         (gen_subprogram_die): Re-use DIEs in local scope.
7320 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
7322         PR tree-optimization/86644
7323         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
7325 2018-07-25  Martin Liska  <mliska@suse.cz>
7327         PR middle-end/86645
7328         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
7329         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
7331 2018-07-25  Martin Liska  <mliska@suse.cz>
7333         PR sanitizer/79635
7334         * params.def: Explain ASan abbreviation and provide
7335         a documentation link.
7337 2018-07-24  Martin Sebor  <msebor@redhat.com>
7339         PR tree-optimization/86622
7340         PR tree-optimization/86532
7341         * builtins.h (string_length): Declare.
7342         * builtins.c (c_strlen): Correct handling of non-constant offsets.
7343         (check_access): Be prepared for non-constant length ranges.
7344         (string_length): Make extern.
7345         * expr.c (string_constant): Only handle the minor non-constant
7346         array index.  Use string_constant to compute the length of
7347         a generic string constant.
7349 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
7351         PR tree-optimization/86618
7352         * tree-vect-stmts.c (vectorizable_call): Don't take the address
7353         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
7355 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
7357         PR tree-optimization/86636
7358         * json.cc (json::object::set): Fix comment.  Add assertions.
7359         (json::array::append): Move here from json.h.  Add comment and an
7360         assertion.
7361         (json::string::string): Likewise.
7362         * json.h (json::array::append): Move to json.cc.
7363         (json::string::string): Likewise.
7364         * optinfo-emit-json.cc
7365         (optrecord_json_writer::impl_location_to_json): Assert that we
7366         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
7367         wrapper around it.  Expand the location once, rather than three
7368         times.
7369         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
7370         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
7371         wrappers.
7372         (optrecord_json_writer::optinfo_to_json): Likewise, in four
7373         places.  Fix some overlong lines.
7375 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
7377         * config/aarch64/aarch64-simd.md
7378         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
7379         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
7380         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
7381         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
7382         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
7383         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
7384         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
7385         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
7386         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
7388 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
7390         PR middle-end/86627
7391         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
7392         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
7393         and abs_d == d, do the power of two handling if profitable.
7395 2018-07-24  Richard Biener  <rguenther@suse.de>
7397         * match.pd: Add BIT_FIELD_REF canonicalizations.
7399 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7401         PR c/86617
7402         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
7404 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7406         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
7407         terminated STRING_CST object.
7409 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7411         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
7413 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
7415         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
7416         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
7417         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
7418         the elements into a register.
7419         (rs6000_split_v4si_init_di_reg): Delete.
7420         (rs6000_split_v4si_init): Delete.
7421         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
7422         (vsx_init_v4si): Rewrite as a define_expand.
7424 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
7426         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
7427         zero_extend argument from memory): New.
7429 2018-07-22  Martin Sebor  <msebor@redhat.com>
7431         PR bootstrap/86621
7432         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
7433         diagnosing calls with unknown arguments unless -Walloca-larger-than
7434         is restricted to less than PTRDIFF_MAX bytes.
7436 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
7438         * doc/gcov.texi (Invoking Gcov): Editorial changes.
7440 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
7442         * pretty-print.c (text_info::set_location): Remove redundant
7443         "line_table" parameter from call to rich_location::set_range.
7445 2018-07-20  Martin Sebor  <msebor@redhat.com>
7447         PR middle-end/82063
7448         * builtins.c (expand_builtin_alloca): Adjust.
7449         * calls.c (alloc_max_size): Simplify.
7450         * cgraphunit.c (cgraph_node::expand): Adjust.
7451         * common.opt (larger_than_size, warn_frame_larger_than): Remove
7452         variables.
7453         (frame_larger_than_size): Same.
7454         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
7455         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
7456         Initialize.
7457         * doc/invoke.texi (GCC Command Options): Document option arguments.
7458         Explain byte-size arguments and suffixes.
7459         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
7460         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
7461         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
7462         * doc/options.texi (UInteger): Expand.
7463         (Host_Wide_Int, ByteSize): Document new properties.
7464         * final.c (final_start_function_1): Include sizes in an error message.
7465         * function.c (frame_offset_overflow): Same.
7466         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
7467         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
7468         Diagnose unbounded alloca calls only for limits of less than
7469         PTRDIFF_MAX.
7470         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
7471         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
7472         for alloca(0).
7473         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
7474         only for limits of less than PTRDIFF_MAX.
7475         * langhooks-def.h (lhd_handle_option): Change function argument
7476         to HOST_WIDE_INT.
7477         * langhooks.c (lhd_handle_option): Same.
7478         * langhooks.h (handle_option): Same.
7479         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
7480         ByteSize flags.
7481         (var_type, var_type_struct): Same.
7482         (var_set): Handle ByteSize flag.
7483         * optc-gen.awk: Add comments to output to ease debugging.  Make
7484         use of HOST_WIDE_INT where appropriate.
7485         * opts-gen-save.awk:  Use %lx to format unsigned long.
7486         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
7487         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
7488         arguments.  Parse bytes-size suffixes.
7489         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
7490         (enum_value_to_arg): Same.
7491         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
7492         (handle_option): Adjust.
7493         (generate_option): Change function argument to HOST_WIDE_INT.
7494         (cmdline_handle_error): Adjust.
7495         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
7496         (set_option): Change function argument to HOST_WIDE_INT.
7497         (option_enabled): Handle cl_host_wide_int.
7498         (get_option_state): Handle CLVC_SIZE.
7499         (control_warning_option): Same.
7500         * opts.c (common_handle_option): Change function argument to
7501         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
7502         OPT_Wvla_larger_than_.
7503         * opts.h (enum cl_var_type): Add an enumerator.
7504         * stor-layout.c (layout_decl): Print a more meaningful warning.
7505         * toplev.c (output_stack_usage): Adjust.
7507 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
7509         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
7510         call to inline_expand_builtin_string_cmp.
7511         (expand_builtin_strcmp): Likewise.
7512         (expand_builtin_strncmp): Likewise.
7513         (inline_string_cmp): Delete the last parameter, change char_type_node
7514         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
7515         two operands.
7516         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
7517         the inlining expansion on target where the type of the call has same or
7518         narrower precision than unsigned char.
7520 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
7522         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
7523         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
7524         * common.opt (fsave-optimization-record): New option.
7525         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
7526         * doc/invoke.texi (-fsave-optimization-record): New option.
7527         * dumpfile.c: Include "optinfo-emit-json.h".
7528         (struct kv_pair): Move to coretypes.h.
7529         (optgroup_options): Make non-static.
7530         (dump_context::end_scope): Call
7531         optimization_records_maybe_pop_dump_scope.
7532         * dumpfile.h (optgroup_options): New decl.
7533         * json.cc: New file.
7534         * json.h: New file.
7535         * optinfo-emit-json.cc: New file.
7536         * optinfo-emit-json.h: New file.
7537         * optinfo.cc: Include "optinfo-emit-json.h".
7538         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
7539         (optinfo_enabled_p): Check optimization_records_enabled_p.
7540         (optinfo_wants_inlining_info_p): Likewise.
7541         * optinfo.h: Update comment.
7542         * profile-count.c (profile_quality_as_string): New function.
7543         * profile-count.h (profile_quality_as_string): New decl.
7544         (profile_count::quality): New accessor.
7545         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
7546         and optinfo_emit_json_cc_tests.
7547         * selftest.h (selftest::json_cc_tests): New decl.
7548         (selftest::optinfo_emit_json_cc_tests): New decl.
7549         * toplev.c: Include "optinfo-emit-json.h".
7550         (compile_file): Call optimization_records_finish.
7551         (do_compile): Call optimization_records_start.
7552         * tree-ssa-live.c: Include optinfo.h.
7553         (remove_unused_scope_block_p): Retain inlining information if
7554         optinfo_wants_inlining_info_p returns true.
7556 2018-07-20  Richard Biener  <rguenther@suse.de>
7558         PR debug/86585
7559         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
7560         to cover -flto-partition=none.
7562 2018-07-20  Martin Liska  <mliska@suse.cz>
7564         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
7565         (get_decl_source_range): Remove unused function.
7567 2018-07-20  Richard Biener  <rguenther@suse.de>
7569         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
7570         (struct vn_phi_s): Likewise.
7571         (struct vn_reference_s): Likewise.
7572         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
7573         for searching the slot of an entry known to be in the hash itself.
7574         (vn_phi_hasher::equal): Likewise.
7575         (vn_reference_hasher::equal): Likewise.
7576         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
7577         globals.
7578         (optimistic_info, current_info): Remove, keeping only valid_info.
7579         (vn_reference_lookup_1): Remove fallback lookup.
7580         (vn_reference_lookup_2): Likewise.
7581         (vn_nary_op_lookup_1): Likewise.
7582         (vn_phi_lookup): Likewise.
7583         (vn_nary_build_or_lookup_1): Make sure to not chain the built
7584         hash element.
7585         (vn_reference_insert): Adjust, chain the inserted hash element
7586         at last_inserted_ref.
7587         (vn_reference_insert_pieces): Likewise.
7588         (visit_reference_op_call): Likewise.
7589         (vn_nary_op_insert_into): Chain the inserted hash element at
7590         last_inserted_nary.
7591         (vn_nary_op_insert_pieces): Adjust.
7592         (vn_nary_op_insert): Likewise.
7593         (vn_nary_op_insert_stmt): Likewise.
7594         (vn_phi_insert): Adjust, chain the inserted hash element at
7595         last_inserted_phi.
7596         (process_scc): Remove clearing and copying the optimistic
7597         table.  Instead remove elements inserted during an optimistic
7598         iteration from the single table we maintain.
7599         (init_scc_vn): Adjust.
7600         (free_scc_vn): Likewise.
7601         (sccvn_dom_walker::record_cond): Likewise.
7602         (sccvn_dom_walker::after_dom_children): Likewise.
7604 2018-07-19  Martin Sebor  <msebor@redhat.com>
7606         PR tree-optimization/84047
7607         PR tree-optimization/83776
7608         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
7609         (check_array_bounds): Call it.
7611 2018-07-19  Martin Sebor  <msebor@redhat.com>
7613         * align.h (align_flags): Use member initialization.
7615 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
7617         * Makefile.in (OBJS): Add optinfo.o.
7618         * coretypes.h (class symtab_node): New forward decl.
7619         (struct cgraph_node): New forward decl.
7620         (class varpool_node): New forward decl.
7621         * dump-context.h: New file.
7622         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
7623         "tree-pass.h".
7624         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
7625         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
7626         (set_alt_dump_file): Likewise.
7627         (dump_context::~dump_context): New dtor.
7628         (dump_gimple_stmt): Move implementation to...
7629         (dump_context::dump_gimple_stmt): ...this new member function.
7630         Add the stmt to any pending optinfo, creating one if need be.
7631         (dump_gimple_stmt_loc): Move implementation to...
7632         (dump_context::dump_gimple_stmt_loc): ...this new member function.
7633         Start a new optinfo and add the stmt to it.
7634         (dump_gimple_expr): Move implementation to...
7635         (dump_context::dump_gimple_expr): ...this new member function.
7636         Add the stmt to any pending optinfo, creating one if need be.
7637         (dump_gimple_expr_loc): Move implementation to...
7638         (dump_context::dump_gimple_expr_loc): ...this new member function.
7639         Start a new optinfo and add the stmt to it.
7640         (dump_generic_expr): Move implementation to...
7641         (dump_context::dump_generic_expr): ...this new member function.
7642         Add the tree to any pending optinfo, creating one if need be.
7643         (dump_generic_expr_loc): Move implementation to...
7644         (dump_context::dump_generic_expr_loc): ...this new member
7645         function.  Add the tree to any pending optinfo, creating one if
7646         need be.
7647         (dump_printf): Move implementation to...
7648         (dump_context::dump_printf_va): ...this new member function.  Add
7649         the text to any pending optinfo, creating one if need be.
7650         (dump_printf_loc): Move implementation to...
7651         (dump_context::dump_printf_loc_va): ...this new member function.
7652         Start a new optinfo and add the stmt to it.
7653         (dump_dec): Move implementation to...
7654         (dump_context::dump_dec): ...this new member function.  Add the
7655         value to any pending optinfo, creating one if need be.
7656         (dump_context::dump_symtab_node): New member function.
7657         (dump_context::get_scope_depth): New member function.
7658         (dump_context::begin_scope): New member function.
7659         (dump_context::end_scope): New member function.
7660         (dump_context::ensure_pending_optinfo): New member function.
7661         (dump_context::begin_next_optinfo): New member function.
7662         (dump_context::end_any_optinfo): New member function.
7663         (dump_context::s_current): New global.
7664         (dump_context::s_default): New global.
7665         (dump_scope_depth): Delete global.
7666         (dumpfile_ensure_any_optinfo_are_flushed): New function.
7667         (dump_symtab_node): New function.
7668         (get_dump_scope_depth): Reimplement in terms of dump_context.
7669         (dump_begin_scope): Likewise.
7670         (dump_end_scope): Likewise.
7671         (selftest::temp_dump_context::temp_dump_context): New ctor.
7672         (selftest::temp_dump_context::~temp_dump_context): New dtor.
7673         (selftest::verify_item): New function.
7674         (ASSERT_IS_TEXT): New macro.
7675         (ASSERT_IS_TREE): New macro.
7676         (ASSERT_IS_GIMPLE): New macro.
7677         (selftest::test_capture_of_dump_calls): New test.
7678         (selftest::dumpfile_c_tests): Call it.
7679         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
7680         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
7681         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
7682         descriptive comment.
7683         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
7684         (dump_node, dump_bb): Move these unrelated decls.
7685         (class dump_manager): Add leading comment.
7686         * optinfo.cc: New file.
7687         * optinfo.h: New file.
7689 2018-07-19  Michael Collison  <michael.collison@arm.com>
7690             Richard Henderson <rth@redhat.com>
7692         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
7693         (subti): Handle op1 zero.
7694         (subvti4, usub4ti4): New.
7695         (*sub<GPI>3_compare1_imm): New.
7696         (sub<GPI>3_carryinCV): New.
7697         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
7698         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
7700 2018-07-19  Michael Collison  <michael.collison@arm.com>
7701             Richard Henderson <rth@redhat.com>
7703         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
7704         (addti3): Create simpler code if low part is already known to be 0.
7705         (addvti4, uaddvti4): New.
7706         (*add<GPI>3_compareC_cconly_imm): New.
7707         (*add<GPI>3_compareC_cconly): New.
7708         (*add<GPI>3_compareC_imm): New.
7709         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
7710         handle constants within this pattern..
7711         (*add<GPI>3_compareV_cconly_imm): New.
7712         (*add<GPI>3_compareV_cconly): New.
7713         (*add<GPI>3_compareV_imm): New.
7714         (add<GPI>3_compareV): New.
7715         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
7716         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
7717         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
7718         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
7719         with 'comparison' operator.
7720         (*add<GPI>3_compareV_cconly_imm): Ditto.
7721         (*add<GPI>3_compareV_cconly): Ditto.
7722         (*add<GPI>3_compareV_imm): Ditto.
7723         (add<GPI>3_compareV): Ditto.
7724         (add<mode>3_carryinC): Ditto.
7725         (*add<mode>3_carryinC_zero): Ditto.
7726         (*add<mode>3_carryinC): Ditto.
7727         (add<mode>3_carryinV): Ditto.
7728         (*add<mode>3_carryinV_zero): Ditto.
7729         (*add<mode>3_carryinV): Ditto.
7731 2018-07-19  Michael Collison  <michael.collison@arm.com>
7732             Richard Henderson <rth@redhat.com>
7734         * config/aarch64/aarch64-modes.def (CC_V): New.
7735         * config/aarch64/aarch64-protos.h
7736         (aarch64_addti_scratch_regs): Declare
7737         (aarch64_subvti_scratch_regs): Declare.
7738         (aarch64_expand_subvti): Declare.
7739         (aarch64_gen_unlikely_cbranch): Declare
7740         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
7741         for signed overflow using CC_Vmode.
7742         (aarch64_get_condition_code_1): Handle CC_Vmode.
7743         (aarch64_gen_unlikely_cbranch): New function.
7744         (aarch64_addti_scratch_regs): New function.
7745         (aarch64_subvti_scratch_regs): New function.
7746         (aarch64_expand_subvti): New function.
7748 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7750         * config/aarch64/aarch64-option-extensions.def: New entry for profile
7751         extension.
7752         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
7753         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
7754         extension.
7756 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7758         PR target/83009
7759         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7760         address check not strict.
7762 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7764         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
7765         Umq with Umn.
7766         (store_pair_lanes<mode>): Likewise.
7767         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
7768         enum value 'ADDR_QUERY_LDP_STP_N'.
7769         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
7770         (aarch64_print_address_internal): Add declaration.
7771         (aarch64_print_ldpstp_address): Remove.
7772         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
7773         (aarch64_print_operand): Change printing of 'y'.
7774         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
7775         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
7776         'true' rather than '1'.
7777         * config/aarch64/constraints.md (Uml): Likewise.
7778         (Uml): Rename to Umn.
7779         (Umq): Remove.
7781 2018-07-19  Richard Biener  <rguenther@suse.de>
7783         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
7784         a trailing array.
7785         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
7786         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
7787         (vn_reference_hasher): Likewise.
7788         (struct vn_tables_s): Remove obstack and alloc-pool members.
7789         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
7790         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
7791         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
7792         (vn_reference_insert_pieces): Likewise.
7793         (alloc_vn_nary_op_noinit): Adjust.
7794         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
7795         (vn_phi_eq): Adjust.
7796         (shared_lookup_phiargs): Remove.
7797         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
7798         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
7799         (visit_reference_op_call): Likewise.
7800         (copy_nary, copy_phi, copy_reference): Remove.
7801         (process_scc): Rewind the obstack when iterating.  Do not
7802         copy the elements to valid_info but just move them from one
7803         hashtable to the other.
7804         (allocate_vn_table): Adjust.
7805         (free_vn_table): Likewise.
7806         (init_scc_vn): Likewise.
7807         (free_scc_vn): Likewise.
7809 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
7811         PR target/86560
7812         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
7813         indirect_return as function type attribute.
7814         (ix86_attribute_table): Change indirect_return to function
7815         type attribute.
7816         * doc/extend.texi: Update indirect_return attribute.
7818 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
7820         * wide-int.h (widest2_int): New.
7821         * gimple-fold.c (arith_overflowed_p): Use it.
7822         * tree.h (widest2_int_cst): New.
7823         * tree-vrp.c (wide_int_binop_overflow): Rename from
7824         vrp_int_const_binop.
7825         Rewrite to work on trees.
7826         (extract_range_from_multiplicative_op_1): Abstract code to...
7827         (wide_int_range_min_max): ...here.
7828         (wide_int_range_cross_product): ...and here.
7829         (extract_range_from_binary_expr_1): Abstract overflow code to...
7830         (wide_int_range_mult_wrapping): ...here.
7831         * tree-vrp.h (wide_int_range_cross_product): New.
7832         (wide_int_range_mult_wrapping): New.
7834 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
7835             Julia Koval  <julia.koval@intel.com>
7837         * config/i386/x86-tune-costs.h (skylake_memcpy,
7838         skylake_memset): Replace rep_prefix with unrolling for size 512.
7840 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
7842         PR middle-end/86544
7843         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
7844         comparision with EQ_EXPR in last stmt.
7846 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7848         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
7849         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
7850         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
7851         previously known as "PowerPC AltiVec Built-in Functions".  Move
7852         some material to new subsubsections "PowerPC AltiVec Built-in
7853         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
7854         ISA 2.07".
7855         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
7856         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
7857         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
7858         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
7860 2018-07-18  Richard Biener  <rguenther@suse.de>
7862         PR tree-optimization/86557
7863         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
7864         EXACT_DIV_EXPR.
7866 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
7868         * config/s390/s390.c (s390_function_profiler): Generate CFI.
7870 2018-07-17  Jeff Law  <law@redhat.com>
7872         * config/arm/arm.c (get_label_padding): Update for recent
7873         changes to label_to_alignment.
7875         PR tree-optimization/86010
7876         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
7878         * config/mips/mips.c (vr4130_align_insns): Update for recent
7879         changes to label_to_alignment.
7881         * config/frv/frv.c (frv_label_align): Update for recent changes
7882         to label_to_alignment.
7884         * config/nios2/nios2.c (nios2_label_align): Update for recent
7885         changes which dropped ALIGN_LABELS_LOG.
7887 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
7889         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
7890         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
7892 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
7894         * config/arc/arc.c (arc_label_align): Use align_labels instead of
7895         deprecated align_labels_log.
7897 2018-07-17  Richard Biener  <rguenther@suse.de>
7899         PR lto/86456
7900         * dwarf2out.c (init_sections_and_labels): Always generate
7901         a debug_line_str_section for early LTO debug.
7902         (dwarf2out_finish): Reset debug_line_str_hash output early.
7903         Bump counter for extra dwarf5 .debug_loc labels to not conflict
7904         with fat LTO part.
7905         (dwarf2out_early_finish): Output debug_line_str.
7907 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
7909         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
7910         index register on z196 or later.
7912 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
7914         * config/s390/s390.c (s390_default_align): Set default function
7915         alignment to 16.
7916         (s390_override_options_after_change): Call s390_default align.
7917         (s390_option_override_internal): Call s390_default_align.
7918         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
7920 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
7922         PR middle-end/86542
7923         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
7924         to _looptemp_ clauses, other than the first two.
7926 2018-07-17  Martin Liska  <mliska@suse.cz>
7928         * opts.c: Do not enable OPT_falign_* for -Os.
7930 2018-07-17  Martin Liska  <mliska@suse.cz>
7932         * align.h (MAX_CODE_ALIGN): New.
7933         (MAX_CODE_ALIGN_VALUE): New.
7934         * common/config/i386/i386-common.c (ix86_handle_option):
7935         (MAX_CODE_ALIGN): Moved to align.h.
7936         * final.c (MAX_CODE_ALIGN): Likewise.
7937         * opts.c (parse_and_check_align_values):
7938         (MAX_CODE_ALIGN): Likewise.
7939         (MAX_CODE_ALIGN_VALUE): Likewise.
7941 2018-07-17  Martin Liska  <mliska@suse.cz>
7943         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
7944         in order to fulfil coding style.
7945         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
7946         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7947         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7948         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
7949         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
7950         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
7951         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
7952         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
7953         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7955 2018-07-17  Martin Liska  <mliska@suse.cz>
7957         * align.h: New file.
7958         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
7959         directly.
7960         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
7961         align_flags of label_to_alignment.
7962         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
7963         align_flags class.
7964         * config/m68k/m68k.c: Do not use removed align_labels_value and
7965         align_loops_value.
7966         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
7967         (LOOP_ALIGN): Likewise.
7968         (LABEL_ALIGN): Likewise.
7969         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
7970         Remove not used macro.
7971         (rs6000_loop_align): Change return type to align_flags.
7972         (rs6000_loop_align_max_skip): Remove.
7973         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
7974         Change return type to align_flags.
7975         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
7976         Remove not used macro.
7977         (rs6000_loop_align):  Change return type to align_flags.
7978         (rs6000_loop_align_max_skip): Remove.
7979         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
7980         * config/rx/rx-protos.h (rx_align_for_label): Make it
7981         static function.
7982         * config/rx/rx.c (rx_align_for_label): Change return type
7983         to align_flags.
7984         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
7985         macro definitions.
7986         into align_flags class.
7987         (LABEL_ALIGN): Likewise.
7988         (LOOP_ALIGN): Likewise.
7989         * config/s390/s390.c (s390_label_align): Use align_flags
7990         class member.
7991         (s390_asm_output_function_label): Likewise.
7992         * config/sh/sh.c (sh_override_options_after_change):
7993         Use align_flags class directly without macros.
7994         (find_barrier): Likewise.
7995         (barrier_align): Likewise.
7996         (sh_loop_align): Likewise.
7997         * config/spu/spu.c (spu_option_override):
7998         Use align_flags_tuple::get_value instead of removed macros.
7999         (spu_sched_init): Likewise.
8000         * config/spu/spu.h (GTY): Likewise.
8001         * config/visium/visium.c (visium_option_override):
8002         Set "8" as default secondary alignment.
8003         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
8004         in order to guarantee secondary alignment of 8.
8005         * coretypes.h: Include align.h header file.
8006         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
8007         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
8008         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
8009         * doc/tm.texi.in: Likewise.
8010         * final.c (struct label_alignment): Remove not used structure.
8011         (LABEL_ALIGN): Change type to align_flags.
8012         (LOOP_ALIGN): Likewise.
8013         (JUMP_ALIGN): Likewise.
8014         (default_loop_align_max_skip): Remove.
8015         (default_label_align_max_skip): Likewise.
8016         (default_jump_align_max_skip): Likewise.
8017         (default_label_align_after_barrier_max_skip):
8018         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
8019         (LABEL_TO_MAX_SKIP): Remove.
8020         (label_to_alignment): Return align_flags type instead of integer.
8021         (label_to_max_skip): Remove.
8022         (align_fuzz): Use align_flags type.
8023         (compute_alignments): Use align_flags type and use align_flags::max
8024         to combine multiple alignments.
8025         (grow_label_align): Grow vec instead of C array.
8026         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
8027         (shorten_branches):  Use align_flags type and use align_flags::max
8028         to combine multiple alignments.
8029         (final_scan_insn_1): Remove usage of secondary alignment that comes
8030         from label alignment, but instead use proper secondary alignment
8031         which is computed in grow_label_align.
8032         * flags.h (struct align_flags_tuple): Move to align.h.
8033         (struct align_flags): Likewise.
8034         (state_align_loops): Rename to align_loops.
8035         (state_align_jumps): Rename to align_jumps.
8036         (state_align_labels): Rename to align_labels.
8037         (state_align_functions): Rename to align_functions.
8038         (align_loops_log): Remove.
8039         (align_jumps_log): Remove.
8040         (align_labels_log): Remove.
8041         (align_functions_log): Remove.
8042         (align_loops_max_skip): Remove.
8043         (align_jumps_max_skip): Remove.
8044         (align_labels_max_skip): Remove.
8045         (align_functions_max_skip): Remove.
8046         (align_loops_value): Remove.
8047         (align_jumps_value): Remove.
8048         (align_labels_value): Remove.
8049         (align_functions_value): Remove.
8050         * output.h (label_to_alignment): Change return type to align_flags.
8051         (label_to_max_skip): Remove.
8052         * target.def: Remove loop_align_max_skip, label_align_max_skip,
8053         jump_align_max_skip macros.
8054         * targhooks.h (default_loop_align_max_skip): Remove.
8055         (default_label_align_max_skip): Likewise.
8056         (default_jump_align_max_skip): Likewise.
8057         (default_label_align_after_barrier_max_skip): Remove.
8058         * toplev.c (read_log_maxskip): Use ::normalize function.
8059         (parse_N_M): Remove not used argument and also call ::normalize.
8060         (parse_alignment_opts): Do not pass unused arguments.
8061         * varasm.c (assemble_start_function): Use directly align_functions
8062         instead of removed macros.
8063         * system.h: Do not poison removed macros.
8065 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
8067         PR middle-end/86539
8068         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
8069         and cond temporaries don't have reference type if iterator has
8070         pointer type.  For init use &for_pre_body instead of pre_p if
8071         for_pre_body is non-empty.
8073 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8075         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
8076         double-double modes to SFmode directly directly.
8077         (trunc<mode>sf2_fprs): Delete.
8079 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8081         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
8082         for conversions between IFmode and the decimal floating point modes.
8083         (init_float128_ieee): Use the correct names for conversions between
8084         KFmode and the decimal floating point modes.
8086 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8088         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
8089         for the conversions between TDmode and IFmode.
8090         (init_float128_ieee): Use more correct names for the conversions
8091         between TDmode and KFmode.
8093 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
8095         PR tree-optimization/86526
8096         * builtins.c (expand_builtin_memcmp): Formatting fixes.
8097         (inline_expand_builtin_string_cmp): Likewise.
8098         (inline_string_cmp): Likewise.  Use c_readstr instead of
8099         builtin_memcpy_read_str.  Add unit_mode temporary.
8101 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8103         PR middle-end/86528
8104         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
8105         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
8107 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8109         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
8110         Alphabetize prototypes of built-in functions, separating out
8111         built-in functions that are listed in this section but should be
8112         described elsewhere.
8114 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
8116         PR target/86511
8117         * expmed.c (emit_store_flag): Do not emit setcc followed by a
8118         conditional move when trapping comparison was split to a
8119         non-trapping one (and vice versa).
8121 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8123         * config/s390/s390.c (s390_function_profiler): Generate nops
8124         instead of profiler call sequences.
8125         * config/s390/s390.opt: Add the new option.
8127 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8129         * config/s390/s390.c (s390_function_profiler): Generate
8130         __mcount_loc section.
8131         * config/s390/s390.opt: Add the new option.
8133 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8135         * common.opt: Add the new warning.
8136         * config/s390/s390.c (s390_function_profiler): Emit "brasl
8137         %r0,__fentry__" when -mfentry is specified.
8138         (s390_option_override_internal): Disallow -mfentry for 31-bit
8139         CPUs.
8140         * config/s390/s390.opt: Add the new option.
8142 2018-07-16  Richard Biener  <rguenther@suse.de>
8144         PR lto/86523
8145         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
8146         for function-local FUNCTION_DECL and RESULT_DECL immediately.
8148 2018-07-16  Martin Liska  <mliska@suse.cz>
8150         PR ipa/86529
8151         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
8152         to ::get_create.
8154 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
8156         * config/arc/arcHS.md: Update ARCHS scheduling rules.
8158 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
8160         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
8161         for ARCHS4x.
8162         * config/arc/arc-cpus.def (hs4x): New cpu.
8163         (hs4xd): Likewise.
8164         * config/arc/arc-tables.opt: Regenerate.
8165         * config/arc/arc.c (arc_sched_issue_rate): New function.
8166         (TARGET_SCHED_ISSUE_RATE): Define.
8167         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
8168         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
8169         fpu_cvt.
8170         (attr tune): Add ARCHS4x tune values.
8171         (attr tune_dspmpy): Define.
8172         (*tst): Correct instruction type.
8173         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
8174         * config/arc/arcHS4x.md: New file.
8175         * config/arc/fpu.md: Update instruction type attributes.
8176         * config/arc/t-multilib: Regenerate.
8178 2018-07-16  Tom de Vries  <tdevries@suse.de>
8180         PR debug/86455
8181         * var-tracking.c (vt_initialize): Fix pre_dec handling.
8183 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8185         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
8186         early clobber.
8188 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
8190         PR tree-optimization/86514
8191         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
8192         conversion to a boolean type from a type with greater precision.
8194 2018-07-16  Tom de Vries  <tdevries@suse.de>
8196         * var-tracking.c (vt_initialize): Print adjusted insn slim if
8197         dump_flags request TDF_SLIM.
8199 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
8201         * fold-const.c (int_const_binop_1): Abstract...
8202         (wide_int_binop): ...wide int code here.
8203         (poly_int_binop): ...poly int code here.
8204         Abstract the rest of int_const_binop_1 into int_const_binop.
8205         * fold-const.h (wide_int_binop): New.
8206         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
8207         Remove useless PLUS/MINUS_EXPR case.
8208         (zero_nonzero_bits_from_vr): Move wide int code...
8209         (zero_nonzero_bits_from_bounds): ...here.
8210         (extract_range_from_binary_expr_1): Move mask optimization code...
8211         (range_easy_mask_min_max): ...here.
8212         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
8213         (range_easy_mask_min_max): New.
8215 2018-07-15  Jeff Law  <law@redhat.com>
8217         PR target/85993
8218         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
8219         block.
8221 2018-07-14  Jim Wilson  <jimw@sifive.com>
8223         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
8225 2018-07-14  Paul Koning  <ni1d@arrl.net>
8227         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
8229 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
8231         * lto-streamer-out.c (copy_function_or_variable): Dump info about
8232         copying section.
8234 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
8235             Steve Munroe  <munroesj52@gmail.com>
8237         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
8238         (_mm_andnot_si128): Likewise.
8239         (_mm_or_si128): Likewise.
8240         (_mm_xor_si128): Likewise.
8242 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
8244         PR middle-end/78809
8245         * builtins.c (expand_builtin_memcmp): Inline the calls first
8246         when result_eq is false.
8247         (expand_builtin_strcmp): Inline the calls first.
8248         (expand_builtin_strncmp): Likewise.
8249         (inline_string_cmp): New routine. Expand a string compare
8250         call by using a sequence of char comparison.
8251         (inline_expand_builtin_string_cmp): New routine. Inline expansion
8252         a call to str(n)cmp/memcmp.
8253         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
8254         New option.
8255         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
8257 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
8259         * config/arm/driver-arm.c: Include arm-native.h.
8260         (host_detect_local_cpu): Use auto-generated data tables.
8261         (vendors, arm_cpu_table): Delete.  Move part information to ...
8262         * config/arm/arm-cpus.in: ... here.
8263         * config/arm/parsecpu.awk (gen_native): New function.
8264         (vendor, part): New CPU fields.
8265         (END): Add support for building the native CPU detection tables.
8266         * config/arm/t-arm (arm-native.h): Add build rule.
8267         (driver-arm.o): Add dependency on arm-native.h.
8269 2018-07-13  Richard Biener  <rguenther@suse.de>
8271         PR middle-end/85974
8272         * match.pd (addr1 - addr2): Allow either of the operand to
8273         have a conversion.
8275 2018-07-13  Tom de Vries  <tdevries@suse.de>
8277         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
8278         in remap_ssa_name.
8280 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
8282         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
8283         arrays instead of numbered variables.
8285 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
8287         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
8288         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
8290 2018-07-13  Richard Biener  <rguenther@suse.de>
8292         PR debug/86452
8293         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
8294         instead of get_context_die.
8296 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
8297             Richard Biener  <rguenther@suse.de>
8299         PR middle-end/86489
8300         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
8301         that the loop latch destination where phi is defined.
8303 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
8305         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
8306         (riscv_expand_epilogue): Add assertion to check interrupt mode.
8307         (riscv_set_current_function): Extract getting interrupt type to new
8308         function.
8309         (riscv_get_interrupt_type): New function.
8310         (riscv_merge_decl_attributes): New function, checking interrupt type is
8311         same.
8312         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
8314 2018-07-12  Paul Koning  <ni1d@arrl.net>
8316         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
8317         directive.
8319 2018-07-12  Paul Koning  <ni1d@arrl.net>
8321         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
8322         zero reference, add doloop_end instead.
8323         * doc/md.texi (decrement_and_branch_until_zero): Remove.
8324         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
8325         detail for doloop_end.
8327 2018-07-12  Martin Sebor  <msebor@redhat.com>
8329         PR c/86453
8330         * attribs.c (decl_attributes): Reject conflicting attributes before
8331         calling attribute handlers.
8333 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
8335         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
8336          parameter.
8337         (gcc::dump_manager::get_dump_file_name): likewise.
8338         (dump_begin): Likewise.
8339         * dumpfile.h (dump_begin): Update prototype.
8340         (gcc::dump_manager::get_dump_file_name,
8341         gcc::dump_manager::get_dump_file_name): Update prototype.
8343 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8345         * internal-fn.h (vectorizable_internal_fn_p): New function.
8346         * tree-vect-slp.c (compatible_calls_p): Likewise.
8347         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
8348         to internal functions.
8349         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
8351 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8353         * fold-const.h (inverse_conditions_p): Declare.
8354         * fold-const.c (inverse_conditions_p): New function.
8355         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
8356         that test the inverse condition of a conditional internal function.
8357         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
8358         * internal-fn.c (internal_fn_mask_index): Handle conditional
8359         internal functions.
8360         (vectorized_internal_fn_supported_p): New function.
8361         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
8362         (any_pred_load_store): Replace with...
8363         (need_to_predicate): ...this new variable.
8364         (redundant_ssa_names): New variable.
8365         (ifcvt_can_use_mask_load_store): Move initial checks to...
8366         (ifcvt_can_predicate): ...this new function.  Handle tree codes
8367         for which a conditional internal function exists.
8368         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
8369         instead of ifcvt_can_use_mask_load_store.  Update after variable
8370         name change.
8371         (predicate_load_or_store): New function, split out from
8372         predicate_mem_writes.
8373         (check_redundant_cond_expr): New function.
8374         (value_available_p): Likewise.
8375         (predicate_rhs_code): Likewise.
8376         (predicate_mem_writes): Rename to...
8377         (predicate_statements): ...this.  Use predicate_load_or_store
8378         and predicate_rhs_code.
8379         (combine_blocks, tree_if_conversion): Update after above name changes.
8380         (ifcvt_local_dce): Handle redundant_ssa_names.
8381         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
8382         general conditional functions.
8383         * tree-vect-stmts.c (vectorizable_call): Likewise.
8385 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8386             Alan Hayward  <alan.hayward@arm.com>
8387             David Sherwood  <david.sherwood@arm.com>
8389         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
8390         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
8391         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
8392         plus and minus and convert them into IFN_COND_FMA-based sequences.
8393         (convert_mult_to_fma): Handle conditional plus and minus.
8395 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8397         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
8398         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
8399         (cond_fnms_optab): New optabs.
8400         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
8401         internal functions.
8402         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
8403         * internal-fn.h (get_conditional_internal_fn): Declare.
8404         (get_unconditional_internal_fn): Likewise.
8405         * internal-fn.c (cond_ternary_direct): New macro.
8406         (expand_cond_ternary_optab_fn): Likewise.
8407         (direct_cond_ternary_optab_supported_p): Likewise.
8408         (FOR_EACH_COND_FN_PAIR): Likewise.
8409         (get_conditional_internal_fn): New function.
8410         (get_unconditional_internal_fn): Likewise.
8411         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
8412         (gimple_match_op::gimple_match_op): Add a new overload for 5
8413         operands.
8414         (gimple_match_op::set_op): Likewise.
8415         (gimple_resimplify5): Declare.
8416         * genmatch.c (decision_tree::gen): Generate simplifications for
8417         5 operands.
8418         * gimple-match-head.c (gimple_simplify): Define an overload for
8419         5 operands.  Handle calls with 5 arguments in the top-level overload.
8420         (convert_conditional_op): Handle conversions from unconditional
8421         internal functions to conditional ones.
8422         (gimple_resimplify5): New function.
8423         (build_call_internal): Pass a fifth operand.
8424         (maybe_push_res_to_seq): Likewise.
8425         (try_conditional_simplification): Try converting conditional
8426         internal functions to unconditional internal functions.
8427         Handle 3-operand unconditional forms.
8428         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
8429         Define ternary equivalents of the current rules for binary conditional
8430         internal functions.
8431         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
8432         ternary operations.
8433         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
8434         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
8435         (optab): Handle them.
8436         (SVE_COND_FP_TERNARY): New int iterator.
8437         (sve_fmla_op, sve_fmad_op): New int attributes.
8438         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
8439         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
8440         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
8442 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8444         * target.def (preferred_else_value): New target hook.
8445         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
8446         * doc/tm.texi: Regenerate.
8447         * targhooks.h (default_preferred_else_value): Declare.
8448         * targhooks.c (default_preferred_else_value): New function.
8449         * internal-fn.h (conditional_internal_fn_code): Declare.
8450         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
8451         (get_conditional_internal_fn): Use it.
8452         (conditional_internal_fn_code): New function.
8453         * gimple-match.h (gimple_match_cond): New struct.
8454         (gimple_match_op): Add a cond member function.
8455         (gimple_match_op::gimple_match_op): Update all forms to take a
8456         gimple_match_cond.
8457         * genmatch.c (expr::gen_transform): Use the same condition as res_op
8458         for the suboperation, but don't specify a particular else_value.
8459         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
8460         (visit_nary_op, visit_reference_op_load): Pass
8461         gimple_match_cond::UNCOND to the gimple_match_op constructor.
8462         * gimple-match-head.c: Include tree-eh.h
8463         (convert_conditional_op): New function.
8464         (maybe_resimplify_conditional_op): Likewise.
8465         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
8466         (gimple_resimplify2): Likewise.
8467         (gimple_resimplify3): Likewise.
8468         (gimple_resimplify4): Likewise.
8469         (maybe_push_res_to_seq): Return null for conditional operations.
8470         (try_conditional_simplification): New function.
8471         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
8472         constructor.
8473         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
8474         IFN_COND_* call.
8475         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
8476         function.
8477         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
8479 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
8481         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8482         DECL_FCONTEXT
8483         (hash_tree): Do not hash DECL_FCONTEXT
8484         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
8485         Do not stream DECL_FCONTEXT.
8486         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
8487         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
8489 2018-07-12  Richard Biener  <rguenther@suse.de>
8491         PR debug/86462
8492         * dwarf2out.c (gen_block_die): Only output blocks when they have
8493         at least one !DECL_IGNORED_P variable.
8495 2018-07-12  Richard Biener  <rguenther@suse.de>
8497         PR target/84829
8498         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
8499         Remove -mieee-fp handling.
8501 2018-07-12  Richard Biener  <rguenther@suse.de>
8503         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
8504         left-over from last patch.
8506 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
8508         PR tree-optimization/86492
8509         * gimple-ssa-store-merging.c
8510         (imm_store_chain_info::coalesce_immediate_stores): Call
8511         check_no_overlap even for the merge_overlapping case.  Formatting fix.
8513 2018-07-12  Richard Biener  <rguenther@suse.de>
8515         PR middle-end/86479
8516         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
8517         move possibly trapping operations into the conditional.
8519 2018-07-12  Richard Biener  <rguenther@suse.de>
8521         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
8522         (vn_lookup_simplify_result): Remove recursion limit applied
8523         here.
8524         (vn_nary_build_or_lookup_1): Adjust.
8525         (try_to_simplify): Likewise.
8526         * gimple-match-head.c (gimple_resimplify1): Instead apply one
8527         here.
8528         (gimple_resimplify2): Likewise.
8529         (gimple_resimplify3): Likewise.
8530         (gimple_resimplify4): Likewise.
8532 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
8534         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
8535         Use __mmask64 type instead of __mmask8 for __M argument.
8536         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
8537         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
8538         __U argument.
8539         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
8540         __mmask16 for __M argument.
8541         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
8542         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
8543         to __mmask16 instead of __mmask8.
8544         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
8545         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
8546         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
8547         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
8548         instead of __mmask16 for __U argument.
8549         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
8550         __mmask16 instead of __mmask8 for __U argument.
8551         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
8552         __U argument.
8553         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
8554         __mmask16.
8555         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
8556         argument.
8557         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
8558         __U argument.
8559         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
8560         __mmask16.
8561         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
8562         of __mmask16.
8563         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
8564         __U argument.
8565         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
8566         __U argument.
8567         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
8568         __U argument.
8569         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
8570         __U argument.
8571         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
8572         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
8573         return type as well as __M argument type and all casts from __mmask8
8574         to __mmask32.
8575         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
8576         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
8577         return type as well as __M argument type and all casts from __mmask8
8578         to __mmask16.
8579         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
8580         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
8581         return type as well as __M argument type and all casts from __mmask8
8582         to __mmask32.
8583         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
8584         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
8585         return type as well as __M argument type and all casts from __mmask8
8586         to __mmask16.
8587         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
8588         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
8589         __mmask16.
8591 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
8593         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
8594         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
8595         for __U argument.
8597 2018-07-11  Paul Koning  <ni1d@arrl.net>
8599         * doc/md.texi (define_subst): Document how multiple occurrences of
8600         the same argument in the replacement pattern are handled.
8602 2018-07-11  Paul Koning  <ni1d@arrl.net>
8604         * doc/extend.texi (Common Variable Attributes): Move "mode" into
8605         alphabetical order.
8606         (Common Type Attributes): Add "mode" attribute.
8608 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
8610         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
8611         stream DECL_ORIGINAL_TYPE.
8612         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
8613         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
8614         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
8615         Do not walk original type.
8616         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
8617         external decls.
8618         (write_ts_decl_non_common_tree_pointers): Do not stream
8619         DECL_ORIGINAL_TYPE
8620         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
8621         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
8623 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
8625         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
8626         thread twice from the same starting edge.
8628 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
8630         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
8631         * gimple.c (gimple_call_nonnull_result_p): ...here...
8632         (gimple_call_nonnull_arg): ...and here.
8633         * gimple.h (gimple_call_nonnull_result_p): New.
8634         (gimple_call_nonnull_arg): New.
8636 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
8638         * config/arm/arm-cpus.in: Move information from fpu field of each
8639         cpu definition to the isa field.
8640         * config/arm/parsecpu.awk (fpu): Delete match rule.
8641         (gen_comm_data): Don't add bits from the CPU's FPU entry.
8643 2018-07-11  Richard Biener  <rguenther@suse.de>
8645         PR debug/86457
8646         * dwarf2out.c (init_sections_and_labels): Use
8647         output_asm_line_debug_info consistently.
8648         (dwarf2out_early_finish): Likewise.
8649         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
8650         type units.
8652 2018-07-11  Richard Biener  <rguenther@suse.de>
8654         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
8655         Rework father_bb setting in a way to avoid propagating constants
8656         multiple times on a loop body.
8658 2018-07-10  Mark Wielaard  <mark@klomp.org>
8660         PR debug/86459
8661         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
8663 2018-07-10  Richard Biener  <rguenther@suse.de>
8665         * hash-map.h (hash_map::iterator::operator*): Return
8666         references to key and value.
8668 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
8670         PR c++/86443
8671         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
8672         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
8673         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
8674         (gimplify_omp_for): For composite loops, move outer
8675         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
8676         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
8677         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
8678         TREE_LIST for both the original class iterator and the "last" helper
8679         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
8680         loop, remember has_decl_expr from outer composite loops for the
8681         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
8683 2018-07-09  Martin Sebor  <msebor@redhat.com>
8685         PR middle-end/77357
8686         PR middle-end/86428
8687         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
8688         accessing implicitly initialized array elements.
8689         * expr.c (string_constant): Handle string initializers of
8690         character arrays within aggregates.
8691         * gimple-fold.c (fold_array_ctor_reference): Add argument.
8692         Store element offset.  As a special case, handle zero size.
8693         (fold_nonarray_ctor_reference): Same.
8694         (fold_ctor_reference): Add argument.  Store subobject offset.
8695         * gimple-fold.h (fold_ctor_reference): Add argument.
8697 2018-07-09  Paul Koning  <ni1d@arrl.net>
8699         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
8700         (pdp11_insn_cost): New function.
8701         (pdp11_md_asm_adjust): New function.
8702         (TARGET_INVALID_WITHIN_DOLOOP): Define.
8703         (pdp11_rtx_costs): Update to match machine better.
8704         (output_addr_const_pdp11): Correct format mismatch warnings.
8705         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
8706         * config/pdp11/pdp11.md: General change to add base_cost and/or
8707         length attributes for use by new pdp11_insn_cost function.
8708         (MIN_BRANCH): Correct definition.
8709         (MIN_SOB): Ditto.
8710         (doloop_end): Use standard pattern name for looping pattern.
8711         (doloop_end_nocc): New.
8712         (movsf): Add another constraint alternative.
8713         (zero_extendqihi2): Add constraint alternatives for not in place
8714         extend.
8715         (zero_extendhisi2): Remove.
8716         (shift patterns): Add CC handling variants.
8717         (bswaphi2): New.
8718         (bswapsi2): New.
8719         (rothi3): New.
8720         (define_peephole2): New peephole to recognize mov that sets CC for
8721         subsequent test.
8723 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8725         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
8726         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
8727         wi::add.
8729 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
8731         PR c/86420
8732         * real.c (real_nextafter): Return true if result is denormal.
8734 2018-07-09  Martin Liska  <mliska@suse.cz>
8736         * common.opt: Add back wrongly removed attribute.
8738 2018-07-09  Richard Biener  <rguenther@suse.de>
8740         PR debug/86413
8741         * dwarf2out.c (gen_block_die): For an early generated DIE
8742         always output high/low PC attributes.
8744 2018-07-09  Tom de Vries  <tdevries@suse.de>
8746         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
8747         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
8748         onto VAR_DECL with abstract origin.
8750 2018-07-07  Jim Wilson  <jimw@sifive.com>
8752         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
8754 2018-07-07  Tom de Vries  <tdevries@suse.de>
8756         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
8758 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
8760         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
8761         overflow_type.
8762         (combine_bound): Use wide-int overflow calculation instead of
8763         rolling our own.
8764         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
8765         overflow_type.
8766         * fold-const.c (int_const_binop_2): Same.
8767         (extract_muldiv_1): Same.
8768         (fold_div_compare): Same.
8769         (fold_abs_const): Same.
8770         * match.pd: Same.
8771         * poly-int.h (add): Same.
8772         (sub): Same.
8773         (neg): Same.
8774         (mul): Same.
8775         * predict.c (predict_iv_comparison): Same.
8776         * profile-count.c (slow_safe_scale_64bit): Same.
8777         * simplify-rtx.c (simplify_const_binary_operation): Same.
8778         * tree-chrec.c (tree_fold_binomial): Same.
8779         * tree-data-ref.c (split_constant_offset_1): Same.
8780         * tree-if-conv.c (idx_within_array_bound): Same.
8781         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
8782         * tree-ssa-phiopt.c (minmax_replacement): Same.
8783         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
8784         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
8785         * vr-values.c (vr_values::adjust_range_with_scev): Same.
8786         * wide-int.cc (wi::add_large): Same.
8787         (wi::mul_internal): Same.
8788         (wi::sub_large): Same.
8789         (wi::divmod_internal): Same.
8790         * wide-int.h: Change overflow type to overflow_type for neg, add,
8791         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
8792         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
8793         mul_internal, divmod_internal.
8794         (overflow_type): New enum.
8795         (accumulate_overflow): New.
8797 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
8799         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
8800         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
8802 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
8804         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
8805         argument is checked for zero before entering loop, avoid checking again.
8807 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
8809         * gimplify.h (generic_expr_could_trap_p): Set as global function.
8810         * gimplify.h (generic_expr_could_trap_p): Likwise.
8811         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
8813 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
8815         PR tree-optimization/86401
8816         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
8817         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
8818         (fold_bit_and_mask): ... here.  New helper function for match.pd.
8819         * fold-const.h (fold_bit_and_mask): Declare.
8820         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
8822 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
8824         PR target/86324
8825         * target.def (translate_mode_attribute): New hook.
8826         * targhooks.h (default_translate_mode_attribute): Declare.
8827         * targhooks.c (default_translate_mode_attribute): New function.
8828         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
8829         * doc/tm.texi: Regenerate.
8830         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
8831         (rs6000_translate_mode_attribute): New function.
8833 2018-07-06  Paul Koning  <ni1d@arrl.net>
8835         * doc/md.texi (define_split): Document DONE and FAIL.
8836         (define_peephole2): Ditto.
8838 2018-07-05  Jeff Law  <law@redhat.com>
8840         PR tree-optimization/86010
8841         * tree-ssa-dse.c (compute_trims): More aggressively trim at
8842         both the head and tail of mem* and str* calls.
8844 2018-07-05  Jim Wilson  <jimw@sifive.com>
8846         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
8848 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
8850         * config/aarch64/aarch64-simd.md: correct flags text for
8851         MIN_EXPR replacement.
8853 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
8855         * configure: Regenerated.
8857 2018-07-05  Carl Love  <cel@us.ibm.com>
8859         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
8860         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
8861         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
8862         VSX_BUILTIN_DOUBLEL_V4SF.
8864 2018-07-05  Martin Sebor  <msebor@redhat.com>
8866         PR c++/86400
8867         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
8868         than its domain to compute its the upper bound of a char array.
8870 2018-07-05  Nathan Sidwell  <nathan@acm.org>
8872         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
8873         * doc/cpp.texi: Update comment.
8874         * doc/tm.texi: Rebuilt.
8875         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
8876         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
8877         * doc/extend.texi (Backwards Compatibility): Clarify it is system
8878         headers affected by extern "C".
8879         * system.h: Poison NO_IMPLICIT_EXTERN_C.
8880         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
8881         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
8882         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
8883         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
8884         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
8885         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
8886         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
8887         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
8888         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
8889         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
8890         config/sparc/sp64-elf.h, config/spu/spu.h,
8891         config/stormy16/stormy16.h, config/v850/v850.h,
8892         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
8893         define NO_IMPLICIT_EXTERN_C.
8894         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
8896 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
8898         PR target/84711
8899         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
8900         instead of GET_MODE_SIZE when comparing Units.
8902 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
8904         PR target/84711
8905         * rtlanal.c (set_noop_p): Constrain on mode change,
8906         include hard-reg-set.h
8908 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
8910         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
8912 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
8914         Revert
8915         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
8917         PR sanitizer/84250
8918         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
8919         libasan.
8920         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
8922 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
8924         PR sanitizer/84250
8925         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
8926         libasan.
8927         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
8929 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
8931         PR middle-end/86380
8932         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
8934 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
8936         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
8937         neg_*_op* variables.
8939 2018-07-04  Martin Liska  <mliska@suse.cz>
8941         * tree-switch-conversion.c: Define
8942         max_ratio_for_speed and max_ratio_for_size constants.
8944 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
8945             Martin Liska  <mliska@suse.cz>
8947         PR middle-end/66240
8948         PR target/45996
8949         PR c/84100
8950         * common.opt: Rename align options with 'str_' prefix.
8951         * common/config/i386/i386-common.c (set_malign_value): New
8952         function.
8953         (ix86_handle_option): Use it to set -falign-* options/
8954         * config/aarch64/aarch64-protos.h (struct tune_params): Change
8955         type from int to string.
8956         * config/aarch64/aarch64.c: Update default values from int
8957         to string.
8958         * config/alpha/alpha.c (alpha_override_options_after_change):
8959         Likewise.
8960         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
8961         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8962         max skip conditionally.
8963         * config/i386/freebsd.h (SUBALIGN_LOG): New.
8964         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8965         max skip conditionally.
8966         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8967         max skip conditionally.
8968         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
8969         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8970         max skip conditionally.
8971         * config/i386/i386.c (struct ptt): Change type from int to
8972         string.
8973         (ix86_default_align): Set default values.
8974         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
8975         max skip conditionally.
8976         * config/i386/iamcu.h (SUBALIGN_LOG): New.
8977         (ASM_OUTPUT_MAX_SKIP_ALIGN):
8978         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
8979         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8980         max skip conditionally.
8981         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
8982         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
8983         * config/i386/x86-64.h (SUBALIGN_LOG): New.
8984         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8985         max skip conditionally.
8986         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8987         * config/ia64/ia64.c (ia64_option_override): Set default values
8988         for alignment options.
8989         * config/m68k/m68k.c: Handle new str_align_* options.
8990         * config/mips/mips.c (mips_set_compression_mode): Change
8991         type of constants.
8992         (mips_option_override): Set default values for options.
8993         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
8994         Likewise.
8995         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8996         Likewise.
8997         * config/rx/rx.c (rx_option_override): Likewise.
8998         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
8999         (LABEL_ALIGN): Use align_labels_log.
9000         (LOOP_ALIGN): Use align_loops_align.
9001         * config/s390/s390.c (s390_asm_output_function_label): Use new
9002         macros.
9003         * config/sh/sh.c (sh_override_options_after_change):
9004         Change type of constants.
9005         * config/spu/spu.c (spu_sched_init): Likewise.
9006         * config/sparc/sparc.c (sparc_option_override): Set default
9007         values for options.
9008         * config/visium/visium.c (visium_option_override): Likewise.
9009         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
9010         emit p2align format with last argument if it's not needed.
9011         * doc/invoke.texi: Document extended format of -falign-*.
9012         * final.c: Use align_labels alignment.
9013         * flags.h (struct target_flag_state): Change type to use
9014         align_flags.
9015         (struct align_flags_tuple): New.
9016         (struct align_flags): Likewise.
9017         (align_loops_log): Redefine macro to use new types.
9018         (align_loops_max_skip): Redefine macro to use new types.
9019         (align_jumps_log): Redefine macro to use new types.
9020         (align_jumps_max_skip): Redefine macro to use new types.
9021         (align_labels_log): Redefine macro to use new types.
9022         (align_labels_max_skip): Redefine macro to use new types.
9023         (align_functions_log): Redefine macro to use new types.
9024         (align_loops): Redefine macro to use new types.
9025         (align_jumps): Redefine macro to use new types.
9026         (align_labels): Redefine macro to use new types.
9027         (align_functions): Redefine macro to use new types.
9028         (align_functions_max_skip): Redefine macro to use new types.
9029         (align_loops_value): New macro.
9030         (align_jumps_value): New macro.
9031         (align_labels_value): New macro.
9032         (align_functions_value): New macro.
9033         * function.c (invoke_set_current_function_hook): Propagate
9034         alignment values from flags to global variables default in
9035         topleev.h.
9036         * ipa-icf.c (sem_function::equals_wpa): Use
9037         cl_optimization_option_eq instead of memcmp.
9038         * lto-streamer.h (cl_optimization_stream_out): Support streaming
9039         of string types.
9040         (cl_optimization_stream_in): Likewise.
9041         * optc-save-gen.awk: Support strings in cl_optimization.
9042         * opth-gen.awk: Likewise.
9043         * opts.c (finish_options): Remove error checking of invalid
9044         value ranges.
9045         (MAX_CODE_ALIGN): Remove.
9046         (MAX_CODE_ALIGN_VALUE): Likewise.
9047         (parse_and_check_align_values): New function.
9048         (check_alignment_argument): Likewise.
9049         (common_handle_option): Use check_alignment_argument.
9050         * opts.h (parse_and_check_align_values): Declare.
9051         * toplev.c (init_alignments): Remove.
9052         (read_log_maxskip): New.
9053         (parse_N_M): Likewise.
9054         (parse_alignment_opts): Likewise.
9055         (backend_init_target): Remove usage of init_alignments.
9056         * toplev.h (parse_alignment_opts): Declare.
9057         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
9058         argument.
9059         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
9060         * tree.c (cl_option_hasher::equal): New.
9061         * varasm.c: Use new global macros.
9063 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
9065         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
9066         Use a simpler align directive also if MAXSKIP = ALIGN-1.
9067         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9068         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9069         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9070         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9071         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
9072         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
9073         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
9074         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9075         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9076         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9077         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9079 2018-07-04  Martin Liska  <mliska@suse.cz>
9080             Jonathan Wakely  <jwakely@redhat.com>
9082         * coverage.c: Use correct type.
9083         * doc/invoke.texi: Language correction.
9085 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
9087         PR target/85620
9088         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
9089         ENDBRANCH for non-tail call which may return via indirect branch.
9090         * doc/extend.texi: Document indirect_return attribute.
9092 2018-07-03  Martin Sebor  <msebor@redhat.com>
9094         PR tree-optimization/86274
9095         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
9096         precondition.
9097         (format_floating): Correct handling of infinities and NaNs.
9099 2018-07-03  Martin Sebor  <msebor@redhat.com>
9101         * print-tree.c (print_real_cst): New function.
9102         (print_node_brief): Call it.
9103         (print_node): Ditto.
9105 2018-07-03  Jeff Law  <law@redhat.com>
9107         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
9108         into a single pattern.
9110         * config/h8300/h8300.md (ors code_iterator): New.
9111         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
9112         a single pattern and single splitter.
9113         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
9114         (iorqi3_1, xorqi3_1): Likewise.
9115         (iorqi3, xorqi3 expanders): Similarly.
9117         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
9118         (movmd_internal) into a single pattern using the P mode iterator.
9119         (movmd splitters): Similarly.
9120         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
9121         (movsd splitters): Similarly.
9123         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
9124         ADDB, ADDW and ADDL into a single ADD attribute which selects the
9125         right table based on the size of the operand.
9126         * config/h8300/h8300.md (length_table): Corresponding changes. All
9127         references to "addb", "addw" and "addl" changed to "add".
9128         (btst patterns): Merge two variants into a single pattern.
9129         (tstqi, tsthi): Likewise.
9130         (addhi3_incdec, addsi3_incdec): Likewise.
9131         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
9132         (mulhi3, mulsi3): Likewise.
9133         (udivhi3, udivsi3): Likewise.
9134         (divhi3, divsi3): Likewise.
9135         (andorqi3, andorhi3, andorsi3): Likewise.
9137 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
9139         PR target/85694
9140         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
9141         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
9143 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9145         PR tree-optimization/85694
9146         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
9147         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
9148         UNSPEC_URHADD.
9149         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
9150         (<u>avg<mode>3_ceil): New patterns.
9152 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
9154         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
9155         scan-tree-dump directive.
9156         * gcc.dg/vect/slp-perm-2.c: Likewise.
9157         * gcc.dg/vect/slp-perm-3.c: Likewise.
9158         * gcc.dg/vect/slp-perm-5.c: Likewise.
9159         * gcc.dg/vect/slp-perm-6.c: Likewise.
9160         * gcc.dg/vect/slp-perm-7.c: Likewise.
9161         * gcc.dg/vect/slp-perm-8.c: Likewise.
9163 2018-07-03  Marek Polacek  <polacek@redhat.com>
9165         PR middle-end/86202
9166         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
9168 2018-07-03  Richard Biener  <rguenther@suse.de>
9170         PR ipa/86389
9171         * tree-ssa-structalias.c (find_func_clobbers): Properly
9172         handle indirect calls.
9174 2018-07-03  Jeff Law  <law@redhat.com>
9176         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
9177         (shifts): New code iterator.
9178         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
9179         expander.  Fix HImode handling on H8/SX.
9180         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
9181         (subqi3, subhi3, subsi3 expanders): Likewise.
9182         (andqi3, andhi3, andsi3 expanders): Likewise.
9183         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
9184         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
9185         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
9186         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
9187         (zero_extendqihi2, zero_extendqisi2): Likewise.
9188         (extendqihi2, extendqisi2): Likewise.
9189         (rotlqi3, rotlhi3, rotlsi3): Likewise.
9190         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
9191         (rotlqi3_1, rotlhi3_1): Likewise.
9192         (logicalhi3_sn, logicalsi3_sn): Likewise.
9193         (logicalhi3, logicalsi3): Likewise.
9195 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9197         * tree-vect-patterns.c (vect_recog_rotate_pattern)
9198         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9199         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
9200         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
9201         type to append_pattern_def_seq instead of creating a stmt_vec_info
9202         directly.
9203         (build_mask_conversion): Likewise.  Remove vinfo argument.
9204         (vect_add_conversion_to_patterm): Likewise, renaming to...
9205         (vect_add_conversion_to_pattern): ...this.
9206         (vect_recog_mask_conversion_pattern): Update call to
9207         build_mask_conversion.  Pass the vector type to
9208         append_pattern_def_seq here too.
9209         (vect_recog_gather_scatter_pattern): Update call to
9210         vect_add_conversion_to_pattern.
9212 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9214         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
9215         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9216         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
9217         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
9218         STMT_VINFO_PATTERN_DEF_SEQ to null here.
9219         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
9220         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
9221         append_pattern_def_seq instead of new_pattern_def_seq.
9222         (vect_recog_divmod_pattern): Do both of the above.
9223         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
9224         is null.
9226 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9228         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
9229         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
9230         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
9231         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
9232         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
9233         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9234         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
9235         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9236         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9237         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
9238         parameter with a single stmt_vec_info.
9239         (vect_recog_func_ptr): Likewise.
9240         (vect_recog_gather_scatter_pattern): Likewise, folding in...
9241         (vect_try_gather_scatter_pattern): ...this.
9242         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
9243         the stmt_vec_info of the statement to be matched.  Don't clear
9244         STMT_VINFO_RELATED_STMT.
9245         (vect_pattern_recog): Update call accordingly.
9247 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9249         PR tree-optimization/85694
9250         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
9251         (uavgM3_ceil): Document new optabs.
9252         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
9253         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
9254         functions.
9255         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
9256         (savg_ceil_optab): New optabs.
9257         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
9258         (vect_vect_recog_func_ptrs): Add it.
9259         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
9260         constant directly from the associated lhs.
9262 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9264         * tree-vect-patterns.c (vect_split_statement): New function.
9265         (vect_convert_input): Use it to try to split an existing cast.
9267 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9269         * poly-int.h (print_hex): New function.
9270         * dumpfile.h (dump_dec, dump_hex): Declare.
9271         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
9272         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
9273         min_input_precision, operation_precision and operation_sign.
9274         * tree-vect-patterns.c (vect_get_range_info): New function.
9275         (vect_same_loop_or_bb_p, vect_single_imm_use)
9276         (vect_operation_fits_smaller_type): Delete.
9277         (vect_look_through_possible_promotion): Add an optional
9278         single_use_p parameter.
9279         (vect_recog_over_widening_pattern): Rewrite to use new
9280         stmt_vec_info infomration.  Handle one operation at a time.
9281         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
9282         (vect_truncatable_operation_p, vect_set_operation_type)
9283         (vect_set_min_input_precision): New functions.
9284         (vect_determine_min_output_precision_1): Likewise.
9285         (vect_determine_min_output_precision): Likewise.
9286         (vect_determine_precisions_from_range): Likewise.
9287         (vect_determine_precisions_from_users): Likewise.
9288         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
9289         (vect_vect_recog_func_ptrs): Put over_widening first.
9290         Add cast_forwprop.
9291         (vect_pattern_recog): Call vect_determine_precisions.
9293 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9295         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
9296         statements that have been replaced by further pattern statements.
9297         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
9299 2018-07-03  Richard Biener  <rguenther@suse.de>
9301         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
9302         always set *dt.  Dump vectype in vectype overload.
9303         * dumpfile.h (dump_gimple_expr): New function.
9304         (dump_gimple_expr_loc): Likewise.
9305         * dumpfile.c (dump_gimple_expr): New function.
9306         (dump_gimple_expr_loc): Likewise.
9308 2018-07-02  Jeff Law  <law@redhat.com>
9310         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
9311         the H8/300, H8/300H and H8/S variants into a single pattern.
9312         (movhi_h8300, movqi_h8300hs): Similarly.
9313         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
9314         (QHI mode iterator): New.
9316         * config/h8300/h8300.md: Remove trailing whitespace.
9318 2018-07-02  Jim Wilson  <jimw@sifive.com>
9320         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
9321         instead of emit_insn for interrupt returns.
9322         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
9323         (riscv_sret, riscv_uret): Likewise.
9325 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
9327         * pretty-print.c (selftest::test_pp_format): Move save and restore
9328         of quotes to class auto_fix_quotes, and add an instance.
9329         * selftest.c: Include "intl.h".
9330         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
9331         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
9332         * selftest.h (selftest::auto_fix_quotes): New class.
9334 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
9336         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
9337         (aarch64_sve_prepare_conditional_op): Remove.
9338         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
9339         Allow aarch64_simd_reg_or_zero as select operand; remove
9340         the aarch64_sve_prepare_conditional_op call.
9341         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
9342         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9343         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
9344         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
9345         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
9346         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
9347         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
9348         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
9349         and a splitters to match all of the *_any patterns.
9350         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
9352         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
9353         (SVE_COND_FP_BINARY_REV): Remove.
9354         (sve_int_op_rev, sve_fp_op_rev): New.
9355         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
9356         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
9357         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
9358         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
9359         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
9360         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
9361         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
9362         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
9363         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
9365         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
9366         Remove match_dup 1 from the inner unspec.
9367         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9369         * config/aarch64/aarch64.md (movprfx): New attr.
9370         (length): Default movprfx to 8.
9371         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
9372         (*madd<SVE_I>, *msub<SVE_I): Likewise.
9373         (*<su>mul<SVE_I>3_highpart): Likewise.
9374         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
9375         (*v<ASHIFT><SVE_I>3): Likewise.
9376         (*<su><MAXMIN><SVE_I>3): Likewise.
9377         (*<su><MAXMIN><SVE_F>3): Likewise.
9378         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
9379         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
9380         (*div<SVE_F>4): Likewise.
9382 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
9384         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
9385         in dump string.
9387 2018-07-02  Richard Biener  <rguenther@suse.de>
9389         PR tree-optimization/86363
9390         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
9391         memset argument refers to a non-variable address.
9393 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
9395         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
9396         {PLUS,MINUS}_EXPR code to...
9397         (adjust_symbolic_bound): ...here,
9398         (combine_bound): ...here,
9399         (set_value_range_with_overflow): ...and here.
9401 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
9403         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
9404         code...
9405         (extract_range_from_abs_expr): ...here.
9407 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
9409         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
9410         -fno-omit-frame-pointer when not optimizing.
9412 2018-07-02  Martin Liska  <mliska@suse.cz>
9414         PR ipa/86279
9415         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
9416         (propagate_nothrow): Likewise.
9418 2018-07-02  Martin Liska  <mliska@suse.cz>
9420         PR ipa/86323
9421         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
9423 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
9425         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
9426         function in r262149, changing "loc" param from source_location to
9427         const dump_location_t &.
9428         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
9429         declaration, as above.
9431 2018-07-01  Paul Koning  <ni1d@arrl.net>
9433         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9434         -munit-asm, -mgnu-asm, -mdec-asm.
9435         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
9436         (pdp11_output_labelref): New.
9437         (pdp11_output_def): New.
9438         (pdp11_output_addr_vec_elt): New.
9439         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
9440         %# and %@ format codes.
9441         (pdp11_option_override): New.
9442         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
9443         (pdp11_output_ident): New.
9444         (pdp11_asm_named_section): New.
9445         (pdp11_asm_init_sections): New.
9446         (pdp11_file_start): New.
9447         (pdp11_file_end): New.
9448         (output_ascii): Use .ascii/.asciz for -mdec-asm.
9449         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
9450         %o, like %c but octal.
9451         (pdp11_option_override): New.
9452         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
9453         -mdec-asm.
9454         (DATA_SECTION_ASM_OP): Ditto.
9455         (READONLY_DATA_SECTION_ASM_OP): New.
9456         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
9457         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
9458         (ASM_OUTPUT_LABELREF): Ditto.
9459         (ASM_OUTPUT_DEF): Ditto.
9460         (ASM_OUTPUT_EXTERNAL): New.
9461         (ASM_OUTPUT_SOURCE_FILENAME): New.
9462         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
9463         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
9464         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
9465         %# and %@ format codes.
9466         * config/pdp11/pdp11.opt (mgnu-asm): New.
9467         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
9468         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
9469         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
9471 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
9473         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
9474         dereferencing path[] beyond its length.
9475         (debug_path): New.
9476         (debug_all_paths): New.
9477         (rewire_first_differing_edge): New.
9478         (adjust_paths_after_duplication): New.
9479         (duplicate_thread_path): Call adjust_paths_after_duplication.
9480         Add new argument.
9481         (thread_through_all_blocks): Add new argument to
9482         duplicate_thread_path.
9484 2018-06-30  Jim Wilson  <jimw@sifive.com>
9486         * config/riscv/predicates.md (p2m1_shift_operand): New.
9487         (high_mask_shift_operand): New.
9488         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
9489         pattern using p2m1_shift_operand.
9490         (lshsi3_zero_extend_3+2): New combiner pattern using
9491         high_mask_shift_operand.
9493 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9495         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
9496         split out from...
9497         (vect_recog_rotate_pattern): ...here.
9498         (vect_convert_input): Try to insert casts of invariants in the
9499         preheader.
9500         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
9501         preheader to be empty.
9503 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9505         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
9506         vector type.  If given, install it in the new statement's
9507         STMT_VINFO_VECTYPE.
9508         (vect_element_precision): New function.
9509         (vect_unpromoted_value): New struct.
9510         (vect_unpromoted_value::vect_unpromoted_value): New function.
9511         (vect_unpromoted_value::set_op): Likewise.
9512         (vect_look_through_possible_promotion): Likewise.
9513         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
9514         (vect_widened_op_tree, vect_convert_input): Likewise.
9515         (vect_convert_inputs, vect_convert_output): Likewise.
9516         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
9517         to handle the optional cast of the multiplication result and
9518         vect_widened_op_tree to detect the widened multiplication itself.
9519         Do not require the input and output of promotion casts to have
9520         the same sign, but base the signedness of the operation on the
9521         input rather than the result.  If the pattern includes two
9522         promotions, check that those promotions have the same sign.
9523         Do not restrict the MULT_EXPR handling to a double-width result;
9524         handle quadruple-width results and wider.  Use vect_convert_inputs
9525         to convert the inputs to the common type.
9526         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
9527         to handle the optional cast of the ABS result.  Also allow a sign
9528         change or a sign extension between the ABS and MINUS.
9529         Use vect_widened_op_tree to detect the widened subtraction and use
9530         vect_convert_inputs to convert the inputs to the common type.
9531         (vect_handle_widen_op_by_const): Delete.
9532         (vect_recog_widen_op_pattern): New function.
9533         (vect_recog_widen_mult_pattern): Use it.
9534         (vect_recog_widen_shift_pattern): Likewise.
9535         (vect_recog_widen_sum_pattern): Use
9536         vect_look_through_possible_promotion to handle the promoted
9537         PLUS_EXPR operand.
9539 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9541         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
9542         the containing gimple_seq *.
9543         * gimple-iterator.h (gsi_for_stmt): Declare it.
9544         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
9545         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
9546         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9547         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9548         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
9549         checks.
9550         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
9551         split out from...
9552         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
9553         statement being replaced is part of an existing pattern
9554         definition sequence, inserting the new pattern statements before
9555         the original one.
9556         (vect_pattern_recog_1): Don't return a bool.  If the statement
9557         is already part of a pattern, instead apply pattern matching
9558         to the pattern definition statements.  Don't clear the
9559         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
9560         (vect_pattern_recog): Don't break after the first match;
9561         continue processing the pattern definition statements instead.
9562         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
9564 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9566         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9567         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9568         (vect_recog_widen_sum_pattern): Use it.
9570 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9572         * tree-vect-loop.c (vectorizable_reduction): Assert that the
9573         phi is not a pattern statement and has not been replaced by
9574         a pattern statement.
9575         * tree-vect-patterns.c (type_conversion_p): Don't check
9576         STMT_VINFO_IN_PATTERN_P.
9577         (vect_recog_vector_vector_shift_pattern): Likewise.
9578         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
9579         the pattern statement rather than the original statement; check
9580         directly for a WIDEN_MULT_EXPR here.
9581         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
9582         vect_is_simple_use to return the pattern statement rather
9583         than the original statement; use is_pattern_stmt_p to check
9584         for such a pattern statement.
9585         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
9586         to return the pattern statement rather than the original statement;
9587         don't do the same transformation here.
9588         (vect_is_simple_use): If the defining statement has been replaced
9589         by a pattern statement, return the pattern statement instead.
9590         Remove the corresponding (local) transformation from the vectype
9591         overload.
9593 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9595         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
9596         end and default to null.
9597         * tree-vect-loop.c (vect_create_epilog_for_reduction)
9598         (vectorizable_reduction): Update calls accordingly, dropping the
9599         gimple ** argument if the passed-back statement isn't needed.
9600         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
9601         (vect_recog_rotate_pattern): Likewise.
9602         (vect_recog_mask_conversion_pattern): Likewise.
9603         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9604         (vect_mask_constant_operand_p): Likewise.
9605         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
9606         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
9607         (get_group_load_store_type, get_load_store_type): Likewise.
9608         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
9609         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
9610         (vectorizable_conversion, vectorizable_assignment): Likewise.
9611         (vectorizable_shift, vectorizable_operation): Likewise.
9612         (vectorizable_store, vect_is_simple_cond): Likewise.
9613         (vectorizable_condition, vectorizable_comparison): Likewise.
9614         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
9615         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
9616         and move it to the end.  Cope with null def_stmt_outs.
9618 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9620         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
9622 2018-06-29  Jeff Law  <law@redhat.com>
9624         * config/v850/v850.c (v850_legitimate_address_p): Handle large
9625         displacements for TARGET_V850E2V3 and newer.
9626         (TARGET_LRA_P): Remove.  Defaults to LRA now.
9627         * config/v850/v850.md (sign23byte_load): Remove.
9628         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
9629         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
9631 2018-06-29  Martin Liska  <mliska@suse.cz>
9633         PR lto/85759
9634         * coverage.c (coverage_init): Mangle full path name.
9635         * doc/invoke.texi: Document the change.
9636         * gcov-io.c (mangle_path): New.
9637         * gcov-io.h (mangle_path): Likewise.
9638         * gcov.c (mangle_name): Use mangle_path for path mangling.
9640 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9642         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
9643         if starting source register is not even.
9645 2018-06-29  Martin Liska  <mliska@suse.cz>
9647         PR tree-optimization/86263
9648         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
9649         Make edge redirection.
9651 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
9653         * dumpfile.c (dump_loc): Add indentation based on scope depth.
9654         (dump_scope_depth): New variable.
9655         (get_dump_scope_depth): New function.
9656         (dump_begin_scope): New function.
9657         (dump_end_scope): New function.
9658         * dumpfile.h (get_dump_scope_depth): New declaration.
9659         (dump_begin_scope): New declaration.
9660         (dump_end_scope): New declaration.
9661         (class auto_dump_scope): New class.
9662         (AUTO_DUMP_SCOPE): New macro.
9663         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
9664         AUTO_DUMP_SCOPE.
9666 2018-06-29  Richard Biener  <rguenther@suse.de>
9668         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
9669         compute_all_dependences succeeds.
9670         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
9671         exceed --param loop-max-datarefs-for-datadeps.
9673 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
9675         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
9677 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
9679         PR target/86348
9680         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
9681         alternative 0 in preferred_for_speed attribute.
9683 2018-06-28  Paul Koning  <ni1d@arrl.net>
9685         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
9686         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
9687         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
9688         * config/pdp11/pdp11.md: Correct "length" attribute calculation
9689         for shift insn patterns.
9691 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
9693         * cgraph.c (cgraph_node::get_body): Replace assignments to
9694         "dump_file" with calls to set_dump_file.
9695         * dumpfile.c (alt_dump_file): Make static, and group with...
9696         (alt_flags): ...this definition.
9697         (dumps_are_enabled): New variable.
9698         (refresh_dumps_are_enabled): New function.
9699         (set_dump_file): New function.
9700         (set_alt_dump_file): New function.
9701         (gcc::dump_manager::dump_start): Replace assignments to
9702         "dump_file" and "alt_dump_file" with calls to set_dump_file and
9703         set_alt_dump_file.
9704         (gcc::dump_manager::dump_finish): Likewise.
9705         * dumpfile.h (alt_dump_file): Delete decl.
9706         (dumps_are_enabled): New variable decl.
9707         (set_dump_file): New function decl.
9708         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
9709         global.
9710         * tree-nested.c (lower_nested_functions): Replace assignments to
9711         "dump_file" with calls to set_dump_file.
9713 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
9715         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
9716         goto_locus of each outgoing edge of each basic block.
9718 2018-06-28  Richard Biener  <rguenther@suse.de>
9720         * dwarf2out.c (decl_scope_table): Remove.
9721         (push_decl_scope): Likewise.
9722         (pop_decl_scope): Likewise.
9723         (gen_type_die_for_member): Do not call push/pop_decl_scope.
9724         (gen_struct_or_union_type_die): Likewise.
9725         (gen_tagged_type_die): Likewise.
9726         (dwarf2out_init): Do not initialize decl_scope_table.
9727         (dwarf2out_c_finalize): Do not free it.
9729 2018-06-28  Richard Biener  <rguenther@suse.de>
9731         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
9732         deciding whether to not re-use a DIE.
9734 2018-06-28  Richard Biener  <rguenther@suse.de>
9736         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
9737         DW_AT_abstract_origin attribute.
9739 2018-06-28  Martin Liska  <mliska@suse.cz>
9741         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
9742         Use newly introduced constants.
9743         * tree-switch-conversion.h (struct jump_table_cluster):
9744         Define max_ratio_for_size and max_ratio_for_speed.
9746 2018-06-28  Martin Liska  <mliska@suse.cz>
9748         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9749         Add new checking assert to catch invalid state.
9750         (jump_table_cluster::can_be_handled): Handle single case
9751         clusters.
9752         (jump_table_cluster::is_beneficial): Bail out for such case.
9753         (bit_test_cluster::find_bit_tests):
9754         Add new checking assert to catch invalid state.
9755         (bit_test_cluster::can_be_handled): Handle single case
9756         clusters.
9757         (bit_test_cluster::is_beneficial): Bail out for such case.
9758         (switch_decision_tree::analyze_switch_statement):
9759         Fix comment.
9761 2018-06-28  Martin Liska  <mliska@suse.cz>
9763         * common.opt: Introduce -completion option.
9764         * gcc.c (driver_handle_option): Handle it.
9765         (driver::main): Print completions if completion
9766         is set.
9767         * opt-suggestions.c (option_proposer::get_completions):
9768         New function.
9769         (option_proposer::suggest_completion): Likewise.
9770         (option_proposer::find_param_completions): Likewise.
9771         (verify_autocompletions): Likewise.
9772         (test_completion_valid_options): Likewise.
9773         (test_completion_valid_params): Likewise.
9774         (in_completion_p): Likewise.
9775         (empty_completion_p): Likewise.
9776         (test_completion_partial_match): Likewise.
9777         (test_completion_garbage): Likewise.
9778         (opt_proposer_c_tests): Likewise.
9779         * opt-suggestions.h: Declare new functions.
9780         * opts.c (common_handle_option): Handle OPT__completion_.
9781         * selftest-run-tests.c (selftest::run_tests): Add
9782         opt_proposer_c_tests.
9783         * selftest.c (assert_str_startswith): New.
9784         * selftest.h (assert_str_startswith): Likewise.
9785         (opt_proposer_c_tests): New.
9786         (ASSERT_STR_STARTSWITH): Likewise.
9788 2018-06-28  Martin Liska  <mliska@suse.cz>
9790         * Makefile.in: Add opt-suggestions.o.
9791         * gcc-main.c: Include opt-suggestions.h.
9792         * gcc.c (driver::driver): Likewise.
9793         (driver::~driver): Remove m_option_suggestions.
9794         (driver::build_option_suggestions): Moved to option_proposer.
9795         (driver::suggest_option): Likewise.
9796         (driver::handle_unrecognized_options): Use option_proposer.
9797         * gcc.h (class driver): Add new memver m_option_proposer.
9798         * opt-suggestions.c: New file.
9799         * opt-suggestions.h: New file.
9801 2018-06-28  Martin Liska  <mliska@suse.cz>
9803         * vec.h (class auto_string_vec): New (moved from auto_argvec).
9804         (auto_string_vec::~auto_string_vec): Likewise.
9806 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
9808         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
9809         prevent_decl_creation_for_types fields up and add reset_location field.
9810         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
9811         statement if id->reset_location is true.
9812         (copy_edges_for_bb): Do not set goto_locus on the new edges if
9813         id->reset_location is true.
9814         (copy_phis_for_bb): Force input_location on the arguments if
9815         id->reset_location is true.
9816         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
9817         is set on the function to be inlined.
9819 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
9821         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
9823 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
9825         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
9826         registers for Pmode.
9827         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
9828         hard registers for the clobbered pseudo.
9830 2018-06-27  Paul Koning  <ni1d@arrl.net>
9832         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9833         mutually exclusive options.
9834         * config/pdp11/constraints.md (h): New constraint.
9835         (O): Update definition to match shift code generation.
9836         (D): New constraint.
9837         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
9838         (CCFP): Remove.
9839         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
9840         function.
9841         (output_jump): Change arguments.
9842         (pdp11_fixed_cc_regs): New function.
9843         (pdp11_cc_mode): Ditto.
9844         (pdp11_expand_shift): Ditto.
9845         (pdp11_assemble_shift): Ditto.
9846         (pdp11_small_shift): Ditto.
9847         (pdp11_branch_cost): Remove.
9848         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
9849         from output.
9850         (pdp11_register_move_cost): Update for CC registers.
9851         (pdp11_rtx_costs): Add case for LSHIFTRT.
9852         (pdp11_output_jump): Add CCNZ mode conditional branches.
9853         (notice_update_cc_on_set): Remove.
9854         (pdp11_cc_mode): New function.
9855         (simple_memory_operand): Correct pre/post decrement case.
9856         (no_side_effect_operand): New function.
9857         (pdp11_regno_reg_class): Add CC_REGS class.
9858         (pdp11_fixed_cc_regs): New function.
9859         (pdp11_small_shift): New function.
9860         (pdp11_expand_shift): New function to expand shift insns.
9861         (pdp11_assemble_shift): New function to output shifts.
9862         (pdp11_branch_cost): Remove.
9863         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
9864         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
9865         (WCHAR_TYPE): Ditto.
9866         (PTRDIFF_TYPE): Ditto.
9867         (ADJUST_INSN_LENGTH): New macro.
9868         (FIXED_REGISTERS): Add CC registers.
9869         (CALL_USED_REGISTERS): Ditto.
9870         (reg_class): Ditto.
9871         (REG_CLASS_NAMES): Ditto.
9872         (REG_CLASS_CONTENTS): Ditto.
9873         (SELECT_CC_MODE): Use new function.
9874         (TARGET_FLAGS_REGNUM): New macro.
9875         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
9876         (cc0_reg_rtx): Remove.
9877         (CC_STATUS_MDEP): Remove.
9878         (CC_STATUS_MDEFP_INIT): Remove.
9879         (CC_IN_FPU): Remove.
9880         (NOTICE_UPDATE_CC): Remove.
9881         (REGISTER_NAMES): Add CC registers.
9882         (BRANCH_COST): Change to constant 1.
9883         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
9884         handling.
9885         * config/pdp11/pdp11.opt (mbcopy): Remove.
9886         (mbcopy-builtin): Remove.
9887         (mbranch-cheap): Remove.
9888         (mbranch-expensive): Remove.
9889         * config/pdp11/predicates.md (expand_shift_operand): Update to
9890         match shift code generation.
9891         (ccnz_operator): New predicate.
9892         * doc/invoke.texi (PDP-11 Options): Remove deleted options
9893         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
9894         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
9895         exclusive options.
9896         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
9897         description of O constraint.
9899 2018-06-27  Jeff Law  <law@redhat.com>
9900             Austin Law  <austinklaw@gmail.com>
9902         * config/v850/v850.md (addsi3_set_flags): New pattern.
9903         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
9904         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
9905         (zero_extendhisi2_v850_set_flags): Likewise.
9906         (zero_extendqisi2_v850_set_flags): Likewise.
9907         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
9908         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
9909         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
9911         * config/v850/v850-protos.h (notice_update_cc): Remove.
9912         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
9913         (v850_print_operand): Handle 'D' and "d".
9914         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
9915         Add handling of arithmetic/logical operations compared against zero.
9916         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
9917         Do not look at v850_compare_op, instead get mode from last argument.
9918         (v850_gen_compare): Remove
9919         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
9920         after reload for prologue insns.
9921         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
9922         patterns.
9923         (construct_save_jarl): Likewise.
9924         (TARGET_FLAGS_REGNUM): Define.
9925         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
9926         (NOTICE_UPDATE_CC): Remove.
9927         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
9928         than cc0.  Conditionalize on reload_completed.
9929         (cmpsi_insn, setfcc_insn): Likewise.
9930         (tst1 splitter): Turn into define_and_split which sets the flags
9931         after reload.
9932         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
9933         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
9934         (cstoresf4, cstoredf4): Clobber the flags.
9935         (cmpsi, cmpsf, cmpdf): Remove expanders.
9936         (setf_insn): Remove pattern.
9937         (addsi3): Turn into define_and_split which clobbers the flags after
9938         reload and a suitable pattern (addsi3_clobber_flags) for use after
9939         reload.
9940         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
9941         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
9942         (ashrsi3, ashrsi3_v850e2): Likewise.
9943         (bins): Clobber the flags.
9944         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
9945         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
9946         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
9947         (call_value_internal_short, call_value_internal_long): Likewise.
9948         (callt_save_interrupt, callt_return_interrupt): Likewise.
9949         (save_interrupt, return_interrupt): Likewise.
9950         (callt_save_all_interrupt, save_all_interrupt): Likewise.
9951         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
9952         (restore_all_interrupt, _restore_all_interrupt): Likewise.
9953         (All FP comparisons): Only allow after reload has completed.
9954         (trfsr): Likewise.
9955         (divh, divhu): Tweak output template.
9956         (branch_z_normal, branch_z_invert): Remove
9957         (branch_nz_normal, branch_nz_invert): Likewise.
9958         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
9960         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
9961         * config/v850/v850.c (notice_update_cc): Remove.
9962         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
9963         (CC_NO_CARRY): Likewise.
9964         (NOTICE_UPDATE_CC): Define to nothing.
9965         * config/v850/v850.md: Remove block comment on cc0 handling
9966         Remove "cc" attribute from all patterns.  Remove cc_status handling
9967         from all patterns.  Minor formatting fixes.
9969 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9971         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
9972         (cortex-a76.cortex-a55): Likewise.
9973         * config/aarch64/aarch64-tune.md: Regenerate.
9974         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
9975         cortex-a76.cortex-a55.
9977 2018-06-27  Jeff Law  <law@redhat.com>
9979         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
9980         (MULTILIB_DIRNAMES): Similarly.
9982 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
9984         * gimple.h (gimple_return_retbnd): Delete.
9985         (gimple_return_set_retbnd): Likewise.
9986         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
9987         gimple_return_set_retbnd.
9988         * gimple-pretty-print.c (dump_gimple_return): Remove call to
9989         gimple_return_retbnd and adjust.
9990         * tree-inline.h (struct copy_body_data): Remove retbnd field.
9991         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
9992         Explicitly return NULL in a couple more cases.  Move assertion
9993         on debug statements and remove unreachable code.
9994         (reset_debug_binding): Do not test id->retbnd.
9995         (expand_call_inline): Do not set it.
9997 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
9999         * configure.ac: Add --disable-gcov option.
10000         * configure: Regenerate.
10001         * Makefile.in: Honour @enable_gcov@.
10002         * doc/install.texi: Document --disable-gcov.
10004 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10006         * config/arm/arm-cpus.in (cortex-a76): New entry.
10007         (cortex-a76.cortex-a55): Likewise.
10008         * config/arm/arm-tables.opt: Regenerate.
10009         * config/arm/arm-tune.md: Likewise.
10010         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
10011         * doc/invoke.texi (ARM Options): Document cortex-a76 and
10012         cortex-a76.cortex-a55.
10014 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
10016         PR target/85769
10017         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
10019 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
10021         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
10022         comment.
10023         (EPILOGUE_USES): Likewise.
10025 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
10027         * tree-inline.c (remap_location): New function extracted from...
10028         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
10029         (copy_phis_for_bb): ...here.  Call remap_location.
10030         (copy_cfg_body): Adjust call to copy_edges_for_bb.
10032 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
10034         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
10035         unaligned vsx for 16B memset.
10037 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
10039         PR target/86285
10040         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
10041         ieee128_float_type_node to long_double_type_node unless
10042         TARGET_LONG_DOUBLE_128 is set.
10044 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
10046         * cfgloop.c (get_loop_location): Convert return type from
10047         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
10048         by implicit construction from rtx_insn *, and using
10049         dump_user_location_t::from_function_decl for the fallback case.
10050         * cfgloop.h (get_loop_location): Convert return type from
10051         location_t to dump_user_location_t.
10052         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
10053         dump_printf_loc to pass in a dump_location_t rather than a
10054         location_t, via the gimple stmt.
10055         * coverage.c (get_coverage_counts): Update calls to
10056         dump_printf_loc to pass in dump_location_t rather than a
10057         location_t.
10058         * doc/optinfo.texi (Dump types): Convert example of
10059         dump_printf_loc from taking "locus" to taking "insn".  Update
10060         description of the "_loc" calls to cover dump_location_t.
10061         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
10062         "selftest.h".
10063         (dump_user_location_t::dump_user_location_t): New constructors,
10064         from gimple *stmt and rtx_insn *.
10065         (dump_user_location_t::from_function_decl): New function.
10066         (dump_loc): Make static.
10067         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
10068         const dump_location_t &.
10069         (dump_generic_expr_loc): Delete.
10070         (dump_printf_loc): Convert param "loc" from location_t to
10071         const dump_location_t &.
10072         (selftest::test_impl_location): New function.
10073         (selftest::dumpfile_c_tests): New function.
10074         * dumpfile.h: Include "profile-count.h".
10075         (class dump_user_location_t): New class.
10076         (struct dump_impl_location_t): New struct.
10077         (class dump_location_t): New class.
10078         (dump_printf_loc): Convert 2nd param from source_location to
10079         const dump_location_t &.
10080         (dump_generic_expr_loc): Delete.
10081         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
10082         const dump_location_t &.
10083         * gimple-fold.c (fold_gimple_assign): Update call to
10084         dump_printf_loc to pass in a dump_location_t rather than a
10085         location_t, via the gimple stmt.
10086         (gimple_fold_call): Likewise.
10087         * gimple-loop-interchange.cc
10088         (loop_cand::analyze_iloop_reduction_var): Update for change to
10089         check_reduction_path.
10090         (tree_loop_interchange::interchange): Update for change to
10091         find_loop_location.
10092         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
10093         change in return-type of find_loop_location.
10094         (graphite_regenerate_ast_isl): Likewise.
10095         * graphite-optimize-isl.c (optimize_isl): Likewise.
10096         * graphite.c (graphite_transform_loops): Likewise.
10097         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
10098         pass in a dump_location_t rather than a location_t, via the
10099         gimple stmt.
10100         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10101         * ipa.c (walk_polymorphic_call_targets): Likewise.
10102         * loop-unroll.c (report_unroll): Convert "locus" param from
10103         location_t to dump_location_t.
10104         (decide_unrolling): Update for change to get_loop_location's
10105         return type.
10106         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
10107         location_t to dump_user_location_t.
10108         (grid_find_single_omp_among_assignments_1): Updates calls to
10109         dump_printf_loc to pass in a dump_location_t rather than a
10110         location_t, via the gimple stmt.
10111         (grid_parallel_clauses_gridifiable): Convert "tloc" from
10112         location_t to dump_location_t.  Updates calls to dump_printf_loc
10113         to pass in a dump_location_t rather than a location_t, via the
10114         gimple stmt.
10115         (grid_inner_loop_gridifiable_p): Likewise.
10116         (grid_dist_follows_simple_pattern): Likewise.
10117         (grid_gfor_follows_tiling_pattern): Likewise.
10118         (grid_target_follows_gridifiable_pattern): Likewise.
10119         (grid_attempt_target_gridification): Convert initialization
10120         of local "grid" from memset to zero-initialization; FIXME: does
10121         this require C++11?  Update call to dump_printf_loc to pass in a
10122         optinfo_location rather than a location_t, via the gimple stmt.
10123         * profile.c (read_profile_edge_counts): Updates call to
10124         dump_printf_loc to pass in a dump_location_t rather than a
10125         location_t
10126         (compute_branch_probabilities): Likewise.
10127         * selftest-run-tests.c (selftest::run_tests): Call
10128         dumpfile_c_tests.
10129         * selftest.h (dumpfile_c_tests): New decl.
10130         * tree-loop-distribution.c (pass_loop_distribution::execute):
10131         Update for change in return type of find_loop_location.
10132         * tree-parloops.c (parallelize_loops): Likewise.
10133         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
10134         "locus" from location_t to dump_user_location_t.
10135         (canonicalize_loop_induction_variables): Likewise.
10136         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
10137         for change in return type of find_loop_location.
10138         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
10139         to dump_printf_loc to pass in a dump_location_t rather than a
10140         location_t, via the stmt.
10141         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
10142         Likewise.
10143         * tree-vect-loop-manip.c (find_loop_location): Convert return
10144         type from source_location to dump_user_location_t.
10145         (vect_do_peeling): Update for above change.
10146         (vect_loop_versioning): Update for change in type of
10147         vect_location.
10148         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
10149         from location_t to dump_user_location_t.
10150         (vect_estimate_min_profitable_iters): Update for change in type
10151         of vect_location.
10152         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
10153         location_t to dump_location_t.
10154         (vect_slp_bb): Update for change in type of vect_location.
10155         * tree-vectorizer.c (vect_location): Convert from source_location
10156         to dump_user_location_t.
10157         (try_vectorize_loop_1): Update for change in vect_location's type.
10158         (vectorize_loops): Likewise.
10159         (increase_alignment): Likewise.
10160         * tree-vectorizer.h (vect_location): Convert from source_location
10161         to dump_user_location_t.
10162         (find_loop_location): Convert return type from source_location to
10163         dump_user_location_t.
10164         (check_reduction_path): Convert 1st param from location_t to
10165         dump_user_location_t.
10166         * value-prof.c (check_counter): Update call to dump_printf_loc to
10167         pass in a dump_user_location_t rather than a location_t; update
10168         call to error_at for change in type of "locus".
10169         (check_ic_target): Update call to dump_printf_loc to
10170         pass in a dump_user_location_t rather than a location_t, via the
10171         call_stmt.
10173 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
10175         * config/s390/s390.h (enum processor_flags): Do not use
10176         default tune parameter when -march was specified.
10178 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
10180         PR target/86314
10181         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
10182         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
10183         operands.
10185 2018-06-26  Richard Biener  <rguenther@suse.de>
10187         PR tree-optimization/86287
10188         PR bootstrap/86316
10189         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
10190         (vect_analyze_loop): Initialize n_stmts.
10192 2018-06-26  Richard Biener  <rguenther@suse.de>
10194         PR middle-end/86271
10195         * fold-const.c (fold_convertible_p): Pointer extension
10196         isn't valid.
10198 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
10200         PR debug/86064
10201         * dwarf2out.c (loc_list_has_views): Adjust comments.
10202         (dw_loc_list): Split single cross-partition range with
10203         nonzero locview.
10205 2018-06-25  Jeff Law  <law@redhat.com>
10207         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
10208         on -mbig-switch by default.
10210         * config/v850/predicates.md (const_float_1_operand): Fix match_code
10211         test.
10212         (const_float_0_operand): Remove unused predicate.
10213         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
10214         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
10215         (recipsf2): New expander.  Original pattern now called
10216         (recipsf2_insn).
10217         (recipdf2, recipdf2_insn): Similarly.
10218         (rsqrtsf2, rsqrtsf2_insn): Similarly
10219         (rsqrtdf2, rsqrtdf2_insn): Similarly
10221 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
10223         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
10224         Simplify logic for FreeBSD (twice).
10226 2018-06-25  Martin Sebor  <msebor@redhat.com>
10228         PR tree-optimization/86204
10229         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
10230         a strnlen result if it's less than the length of the string.
10232 2018-06-25  Martin Sebor  <msebor@redhat.com>
10234         PR tree-optimization/85700
10235         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
10236         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
10237         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
10239 2018-06-25  Martin Sebor  <msebor@redhat.com>
10241         * doc/extend.texi (Zero-length arrays): Update and clarify.
10243 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
10245         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
10246         added IEEE/IBM long double multilib support on PowerPC little
10247         endian Linux systems.
10248         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
10249         (MULTILIB_DEFAULTS): Likewise.
10250         * config/rs6000/rs6000.c (rs6000_option_override_internal):
10251         Likewise.
10252         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
10253         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
10254         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
10256 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
10258         PR middle-end/86311
10259         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
10260         (REORDER_45): Likewise.
10262 2018-06-25  Jeff Law  <law@redhat.com>
10264         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
10265         dividend to 32 bits.  Adjust length.
10266         (udivmodhi4): Cleanup output template.  Fix length.
10268 2018-06-25  Carl Love  <cel@us.ibm.com>
10270         * config/rs6000/vsx.md: Change word selector to prefered location.
10272 2018-06-25  Richard Biener  <rguenther@suse.de>
10274         PR tree-optimization/86304
10275         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
10276         epilogue-if-converted loops as well.
10278 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
10280         * lto-section-out.c (lto_begin_section): Do not print section
10281         name for noaddr and unnumbered dumps.
10283 2018-06-25  Richard Biener  <rguenther@suse.de>
10285         * tree-vectorizer.h (struct vec_info_shared): New structure
10286         with parts split out from struct vec_info and loop_nest from
10287         struct _loop_vec_info.
10288         (struct vec_info): Adjust accordingly.
10289         (struct _loop_vec_info): Likewise.
10290         (LOOP_VINFO_LOOP_NEST): Adjust.
10291         (LOOP_VINFO_DATAREFS): Likewise.
10292         (LOOP_VINFO_DDRS): Likewise.
10293         (struct _bb_vec_info): Likewise.
10294         (BB_VINFO_DATAREFS): Likewise.
10295         (BB_VINFO_DDRS): Likewise.
10296         (struct _stmt_vec_info): Add dr_aux member.
10297         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
10298         (DR_MISALIGNMENT_UNINITIALIZED): New.
10299         (set_dr_misalignment): Adjust.
10300         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
10301         (vect_analyze_loop): Adjust prototype.
10302         (vect_analyze_loop_form): Likewise.
10303         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10304         Compute dependences lazily.
10305         (vect_record_base_alignments): Use shared datarefs/ddrs.
10306         (vect_verify_datarefs_alignment): Likewise.
10307         (vect_analyze_data_refs_alignment): Likewise.
10308         (vect_analyze_data_ref_accesses): Likewise.
10309         (vect_analyze_data_refs): Likewise.
10310         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
10311         constructor parameter for shared part.
10312         (vect_analyze_loop_form): Pass in shared part and adjust.
10313         (vect_analyze_loop_2): Pass in storage for the number of
10314         stmts.  Move loop nest finding to the caller.  Compute
10315         datarefs lazily.
10316         (vect_analyze_loop): Pass in shared part.
10317         (vect_transform_loop): Verify shared datarefs are unchanged.
10318         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
10319         constructor parameter for shared part.
10320         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
10321         (vect_slp_bb): Verify shared datarefs are unchanged before
10322         transform.
10323         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
10324         change.
10325         (new_stmt_vec_info): Initialize DR_AUX misalignment to
10326         DR_MISALIGNMENT_UNINITIALIZED.
10327         * tree-vectorizer.c (vec_info::vec_info): Add constructor
10328         parameter for shared part.
10329         (vec_info::~vec_info): Adjust.
10330         (vec_info_shared::vec_info_shared): New.
10331         (vec_info_shared::~vec_info_shared): Likewise.
10332         (vec_info_shared::save_datarefs): Likewise.
10333         (vec_info_shared::check_datarefs): Likewise.
10334         (try_vectorize_loop_1): Construct shared part live for analyses
10335         of a single loop for multiple vector sizes.
10336         * tree-parloops.c (gather_scalar_reductions): Adjust.
10338 2018-06-25  Richard Biener  <rguenther@suse.de>
10340         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
10341         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
10342         (vect_analyze_data_refs): Remove similar code from here and
10343         simplify accordingly.
10345 2018-06-25  Richard Biener  <rguenther@suse.de>
10347         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
10348         for reverse storage order accesses rather than asserting
10349         they cannot happen here.
10351 2018-06-25  Tom de Vries  <tdevries@suse.de>
10353         PR debug/86257
10354         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
10355         Use data16 instead of .byte for insn prefix.
10357 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
10359         PR C++/86082
10360         * parser.c (make_char_string_pack): Pass this literal chars
10361         through cpp_interpret_string.
10362         (cp_parser_userdef_numeric_literal): Check the result of
10363         make_char_string_pack.
10365 2018-06-24  Maya Rashish  <coypu@sdf.org>
10367         * ginclude/stddef.h: Simplify conditions around avoiding
10368         re-definition of __size_t.
10370 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
10372         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
10373         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
10375 2018-06-22  Maya Rashish  <coypu@sdf.org>
10377         * doc/invoke.texi (mno-fancy-math-387): Update for changes
10378         made to OpenBSD and NetBSD through the years.
10380 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10382         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10383         behavior of vec_pack (vector double, vector double) to match
10384         behavior of vec_float2 (vector double, vector double).
10386 2018-06-22  Olivier Hainque  <hainque@adacore.com>
10388         * gimplify.c (gimplify_function_tree): Prevent creation
10389         of a trampoline for the address of the current function
10390         passed to entry/exit instrumentation hooks.
10392 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
10394         PR target/86222
10395         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
10396         correctly.
10398 2018-06-22  Martin Liska  <mliska@suse.cz>
10400         PR tree-optimization/86263
10401         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10402         Bail out if is_enabled is false.
10403         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
10404         New declaration.
10405         (jump_table_cluster::is_enabled): New function.
10407 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
10409         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10410         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
10411         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
10412         (lto_input_ts_binfo_tree_pointers): Likewise.
10413         * tree-streamer-out.c (streamer_write_tree_bitfields,
10414         write_ts_binfo_tree_pointers): Likewise.
10415         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
10417 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
10419         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
10421 2018-06-22  Martin Liska  <mliska@suse.cz>
10423         * symbol-summary.h (get): Make it pure and inline move
10424         functionality from ::get function.
10425         (get): Remove and inline into ::get and ::get_create.
10426         (get_create): Move code from ::get function.
10428 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10430         PR target/85994
10431         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
10432         -x assembler-with-cpp.
10434 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10436         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
10437         _FILE_OFFSET_BITS=64 for C++.
10439 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
10441         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
10442         conversion insn that shows up when pr85657-3.c is compiled using
10443         IEEE 128-bit long double.
10444         (neg<mode>2_internal): Use the correct mode to check whether the
10445         mode is IBM extended.
10446         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
10447         multiply and divide external functions from being created more
10448         than once.
10450 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10452         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
10453         functions.
10454         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
10455         the edge can be forwarded.
10456         (cfg_layout_merge_blocks): Likewise.
10458 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10460         * except.c (finish_eh_generation): Commit edge insertions only after
10461         the EH edges have been redirected from post-landing to landing pads.
10463 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10465         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
10466         create_tmp_var_for to create the FRAME decl.
10467         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
10469 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10471         * tree-inline.c (copy_edges_for_bb): Minor tweak.
10472         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
10473         debug statement when resetting its value.
10474         (expand_call_inline): Copy the locus of the call onto the assignment
10475         of the return value, if any.  Use local variable in more cases.
10477 2018-06-21  Martin Liska  <mliska@suse.cz>
10479         * ipa-pure-const.c (propagate_nothrow): Use
10480         funct_state_summaries->get.
10481         (dump_malloc_lattice): Likewise.
10482         (propagate_malloc): Likewise.
10484 2018-06-21  Richard Biener  <rguenther@suse.de>
10486         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
10487         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
10488         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
10489         comment.
10490         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
10491         BLOCK_ABSTRACT_ORIGIN unconditionally.
10493 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
10495         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
10496         deleting it.
10497         * ipa-reference.c (ipa_reference_c_finalize): Delete
10498         ipa_ref_opt_sum_summaries and set it to NULL.
10500 2018-06-21  Tom de Vries  <tdevries@suse.de>
10502         PR tree-optimization/85859
10503         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
10504         test with comment from bb_no_side_effects_p.
10506 2018-06-21  Richard Biener  <rguenther@suse.de>
10508         PR tree-optimization/86232
10509         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
10510         max for constant niter.
10512 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10514         * config/aarch64/aarch64-simd.md
10515         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
10517 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10519         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
10520         Make opernads of the unspec commutative.
10522 2018-06-21  Richard Biener  <rguenther@suse.de>
10524         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
10525         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
10526         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
10527         (vect_analyze_data_ref_dependence): Re-order checks to deal with
10528         NULL DR_STEP.
10529         (vect_record_base_alignments): Do not record base alignment
10530         for gathers or scatters.
10531         (vect_compute_data_ref_alignment): Drop return value that is always
10532         true.  Bail out early for gathers or scatters.
10533         (vect_enhance_data_refs_alignment): Bail out early for gathers
10534         or scatters.
10535         (vect_find_same_alignment_drs): Likewise.
10536         (vect_analyze_data_refs_alignment): Remove dead code.
10537         (vect_slp_analyze_and_verify_node_alignment): Likewise.
10538         (vect_analyze_data_refs): For possible gathers or scatters do
10539         not create an alternate DR, just check their possible validity
10540         and mark them.  Adjust DECL_NONALIASED handling to not rely
10541         on DR_BASE_ADDRESS.
10542         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
10543         update inits of gathers or scatters.
10544         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
10545         Also copy gather/scatter flag to pattern vinfo.
10547 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10549         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10550         behavior of vec_packsu (vector unsigned long long, vector unsigned
10551         long long) to match behavior of vec_packs with same signature.
10553 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
10554             Thomas Schwinge <thomas@codesourcery.com>
10555             Cesar Philippidis  <cesar@codesourcery.com>
10557         * gimplify.c (gimplify_scan_omp_clauses): Add support for
10558         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10559         (gimplify_adjust_omp_clauses): Likewise.
10560         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
10561         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
10562         (gimplify_omp_target_update): Update handling of acc update and
10563         enter/exit data.
10564         * omp-low.c (install_var_field): Remove unused parameter
10565         base_pointers_restrict.
10566         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
10567         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
10568         FINALIZE}
10569         (omp_target_base_pointers_restrict_p): Delete.
10570         (scan_omp_target): Update call to scan_sharing_clauses.
10571         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
10572         FINALIZE}.
10573         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
10574         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10575         (convert_local_omp_clauses): Likewise.
10576         * tree-pretty-print.c (dump_omp_clause): Likewise.
10577         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
10578         FINALIZE}.
10579         (omp_clause_code_name): Likewise.
10581 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
10583         PR debug/86194
10584         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
10585         be narrowed.
10587         PR tree-optimization/86231
10588         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
10589         anti-range don't overwrite *vr0min before using it to compute *vr0max.
10591 2018-06-20  Tom de Vries  <tdevries@suse.de>
10593         PR tree-optimization/86097
10594         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
10595         iv type if signedness of iv type is not the same as that of *nit.
10597 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
10599         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
10600         EDGE_EH edges, verify they are all EDGE_EH.
10602 2018-06-20  Maya Rashish  <coypu@sdf.org>
10604         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
10606 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10608         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
10609         * config/aarch64/aarch64.c (xgene1_tunings): Add
10610         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
10611         (aarch64_mode_valid_for_sched_fusion_p):
10612         Allow 16-byte modes.
10613         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
10614         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
10615         128-bit modes.
10616         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
10617         New pattern.
10618         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
10619         * config/aarch64/iterators.md (VQ2): New mode iterator.
10621 2018-06-20  Martin Liska  <mliska@suse.cz>
10623         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10624         Change default ratio from 10 to 8.
10626 2018-06-20  Martin Liska  <mliska@suse.cz>
10628         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10629         New.
10630         (bit_test_cluster::find_bit_tests): Likewise.
10631         (switch_decision_tree::analyze_switch_statement): Find clusters.
10632         * tree-switch-conversion.h (struct jump_table_cluster): Document
10633         hierarchy.
10635 2018-06-20  Martin Liska  <mliska@suse.cz>
10637         * tree-switch-conversion.c (switch_conversion::collect):
10638         Record m_uniq property.
10639         (switch_conversion::expand): Bail out for special conditions.
10640         (group_cluster::~group_cluster): New.
10641         (group_cluster::group_cluster): Likewise.
10642         (group_cluster::dump): Likewise.
10643         (jump_table_cluster::emit): New.
10644         (switch_decision_tree::fix_phi_operands_for_edges): New.
10645         (struct case_node): Remove struct.
10646         (jump_table_cluster::can_be_handled): New.
10647         (case_values_threshold): Moved to header.
10648         (reset_out_edges_aux): Likewise.
10649         (jump_table_cluster::is_beneficial): New.
10650         (bit_test_cluster::can_be_handled): Likewise.
10651         (add_case_node): Remove.
10652         (bit_test_cluster::is_beneficial): New.
10653         (case_bit_test::cmp): New.
10654         (bit_test_cluster::emit): New.
10655         (expand_switch_as_decision_tree_p): Remove.
10656         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
10657         (fix_phi_operands_for_edge): Likewise.
10658         (switch_decision_tree::analyze_switch_statement): New.
10659         (compute_cases_per_edge): Move ...
10660         (switch_decision_tree::compute_cases_per_edge): ... here.
10661         (try_switch_expansion): Likewise.
10662         (switch_decision_tree::try_switch_expansion): Likewise.
10663         (record_phi_operand_mapping): Likewise.
10664         (switch_decision_tree::record_phi_operand_mapping): Likewise.
10665         (emit_case_decision_tree): Likewise.
10666         (switch_decision_tree::emit): Likewise.
10667         (balance_case_nodes): Likewise.
10668         (switch_decision_tree::balance_case_nodes): Likewise.
10669         (dump_case_nodes): Likewise.
10670         (switch_decision_tree::dump_case_nodes): Likewise.
10671         (emit_jump): Likewise.
10672         (switch_decision_tree::emit_jump): Likewise.
10673         (emit_cmp_and_jump_insns): Likewise.
10674         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
10675         (emit_case_nodes): Likewise.
10676         (switch_decision_tree::emit_case_nodes): Likewise.
10677         (conditional_probability): Remove.
10678         * tree-switch-conversion.h (enum cluster_type): New.
10679         (PRINT_CASE): New.
10680         (struct cluster): Likewise.
10681         (cluster::cluster): Likewise.
10682         (struct simple_cluster): Likewise.
10683         (simple_cluster::simple_cluster): Likewise.
10684         (struct group_cluster): Likewise.
10685         (struct jump_table_cluster): Likewise.
10686         (struct bit_test_cluster): Likewise.
10687         (struct min_cluster_item): Likewise.
10688         (struct case_tree_node): Likewise.
10689         (case_tree_node::case_tree_node): Likewise.
10690         (jump_table_cluster::case_values_threshold): Likewise.
10691         (struct case_bit_test): Likewise.
10692         (struct switch_decision_tree): Likewise.
10693         (struct switch_conversion): Likewise.
10694         (switch_decision_tree::reset_out_edges_aux): Likewise.
10696 2018-06-20  Martin Liska  <mliska@suse.cz>
10698         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
10699         (hoist_edge_and_branch_if_true): Likewise.
10700         (expand_switch_using_bit_tests_p): Likewise.
10701         (struct case_bit_test): Likewise.
10702         (case_bit_test_cmp): Likewise.
10703         (emit_case_bit_tests): Likewise.
10704         (switch_conversion::switch_conversion): New class.
10705         (struct switch_conv_info): Remove old struct.
10706         (collect_switch_conv_info): More to ...
10707         (switch_conversion::collect): ... this.
10708         (check_range): Likewise.
10709         (switch_conversion::check_range): Likewise.
10710         (check_all_empty_except_final): Likewise.
10711         (switch_conversion::check_all_empty_except_final): Likewise.
10712         (check_final_bb): Likewise.
10713         (switch_conversion::check_final_bb): Likewise.
10714         (create_temp_arrays): Likewise.
10715         (switch_conversion::create_temp_arrays): Likewise.
10716         (free_temp_arrays): Likewise.
10717         (gather_default_values): Likewise.
10718         (switch_conversion::gather_default_values): Likewise.
10719         (build_constructors): Likewise.
10720         (switch_conversion::build_constructors): Likewise.
10721         (constructor_contains_same_values_p): Likewise.
10722         (switch_conversion::contains_same_values_p): Likewise.
10723         (array_value_type): Likewise.
10724         (switch_conversion::array_value_type): Likewise.
10725         (build_one_array): Likewise.
10726         (switch_conversion::build_one_array): Likewise.
10727         (build_arrays): Likewise.
10728         (switch_conversion::build_arrays): Likewise.
10729         (gen_def_assigns): Likewise.
10730         (switch_conversion::gen_def_assigns): Likewise.
10731         (prune_bbs): Likewise.
10732         (switch_conversion::prune_bbs): Likewise.
10733         (fix_phi_nodes): Likewise.
10734         (switch_conversion::fix_phi_nodes): Likewise.
10735         (gen_inbound_check): Likewise.
10736         (switch_conversion::gen_inbound_check): Likewise.
10737         (process_switch): Use the newly created class.
10738         (switch_conversion::expand): New.
10739         (switch_conversion::~switch_conversion): New.
10740         * tree-switch-conversion.h: New file.
10742 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10744         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
10745         tree-vect-patterns.c.
10746         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
10747         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
10748         (vect_recog_sad_pattern): Likewise.
10749         (vect_recog_widen_sum_pattern): Likewise.
10750         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
10751         (vect_recog_widen_shift_pattern): Remove the type_in argument.
10752         (vect_recog_rotate_pattern): Likewise.
10753         (vect_recog_mult_pattern): Likewise.
10754         (vect_recog_vector_vector_shift_pattern): Likewise.
10755         (vect_recog_divmod_pattern): Likewise.
10756         (vect_recog_mixed_size_cond_pattern): Likewise.
10757         (vect_recog_bool_pattern): Likewise.
10758         (vect_recog_mask_conversion_pattern): Likewise.
10759         (vect_try_gather_scatter_pattern): Likewise.
10760         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
10761         (vect_recog_over_widening_pattern): Likewise.
10762         (vect_recog_gather_scatter_pattern): Likewise.
10763         (vect_recog_func_ptr): Move from tree-vectorizer.h
10764         (vect_vect_recog_func_ptrs): Move further down the file.
10765         (vect_recog_func): Likewise.  Remove the third argument.
10766         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
10767         (vect_pattern_recog_1): Expect the pattern function to do any
10768         necessary target tests.  Also expect it to provide a vector type.
10769         Remove the type_in handling.
10771 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10773         * tree-vect-patterns.c (vect_pattern_detected): New function.
10774         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
10775         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
10776         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
10777         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
10778         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10779         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10780         (vect_recog_mask_conversion_pattern)
10781         (vect_try_gather_scatter_pattern): Likewise.
10783 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10785         * tree-vect-patterns.c (vect_get_internal_def): New function.
10786         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10787         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
10788         (search_type_for_mask_1): Use it.
10790 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10792         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10793         redundant WIDEN_SUM_EXPR handling.
10794         (vect_recog_sad_pattern): Likewise.
10796 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10798         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10799         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
10800         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
10801         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
10802         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
10804 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10806         * tree-vect-stmts.c (vectorizable_call): Make sure that we
10807         use the stmt_vec_info of the original bb statement for the
10808         new zero assignment, even if the call is part of a pattern.
10810 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10812         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
10813         that the sequence is attached to the original statement rather
10814         than the pattern statement.
10815         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
10816         PATTERN_DEF_SEQ from the original statement rather than
10817         the main pattern statement.
10818         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
10819         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
10820         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
10822 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10824         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
10825         definition statements before the early exit for statements that aren't
10826         live or relevant.
10827         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
10828         split out from...
10829         (vect_transform_loop): ...here.  Process pattern definition
10830         statements without first checking whether the main pattern
10831         statement is live or relevant.
10833 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
10835         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
10836         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
10838 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
10840         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
10841         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
10842         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
10843         (expand_block_compare): Change select_block_compare_mode call.
10844         (expand_strncmp_align_check): Use new functions, fix comment.
10845         (emit_final_str_compare_gpr): New function.
10846         (expand_strn_compare): Refactor and clean up code.
10847         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
10849 2018-06-19  Tony Reix  <tony.reix@atos.com>
10850             Damien Bergamini  <damien.bergamini@atos.com>
10851             David Edelsohn  <dje.gcc@gmail.com>
10853         * collect2.c (static_obj): New variable.
10854         (static_libs): New variable.
10855         (is_in_list): Uncomment declaration.
10856         (main): Track AIX libraries linked statically.
10857         (is_in_list): Uncomment definition.
10858         (scan_prog_file): Don't add AIX shared libraries initializer
10859         to constructor list if linking statically.
10861 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
10863         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
10864         constant.
10865         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
10867 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
10869         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
10870         blocks.
10872 2018-06-19  Martin Liska  <mliska@suse.cz>
10874         * config/i386/i386.c (ix86_can_inline_p): Do not use
10875         ipa_fn_summaries::get_create.
10876         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
10877         get.
10878         (devirtualization_time_bonus): Likewise.
10879         (ipcp_propagate_stage): Likewise.
10880         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10881         (edge_set_predicate): Likewise.
10882         (evaluate_conditions_for_known_args): Likewise.
10883         (evaluate_properties_for_edge): Likewise.
10884         (ipa_call_summary::reset): Tranform to ...
10885         (ipa_call_summary::~ipa_call_summary): ... this.
10886         (ipa_fn_summary::reset): Transform to ...
10887         (ipa_fn_summary::~ipa_fn_summary): ... this.
10888         (ipa_fn_summary_t::remove): Rename to ...
10889         (ipa_fn_summary_t::remove_callees): ... this.
10890         (ipa_fn_summary_t::duplicate): Use placement new
10891         instead of memory copy.
10892         (ipa_call_summary_t::duplicate): Likewise.
10893         (ipa_call_summary_t::remove): Remove.
10894         (dump_ipa_call_summary): Change get_create to get.
10895         (ipa_dump_fn_summary): Dump only when summary exists.
10896         (analyze_function_body): Use symbol_summary::get instead
10897         of get_create.
10898         (compute_fn_summary): Likewise.
10899         (estimate_edge_devirt_benefit): Likewise.
10900         (estimate_edge_size_and_time): Likewise.
10901         (inline_update_callee_summaries): Likewise.
10902         (remap_edge_change_prob): Likewise.
10903         (remap_edge_summaries): Likewise.
10904         (ipa_merge_fn_summary_after_inlining): Likewise.
10905         (write_ipa_call_summary): Likewise.
10906         (ipa_fn_summary_write): Likewise.
10907         (ipa_free_fn_summary): Likewise.
10908         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
10909         (struct ipa_call_summary): Likewise.
10910         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
10911         of get_create.
10912         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
10913         (estimate_size_after_inlining): Likewise.
10914         (estimate_growth): Likewise.
10915         (growth_likely_positive): Likewise.
10916         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10917         (inline_call): Likewise.
10918         * ipa-inline.c (caller_growth_limits): Likewise.
10919         (can_inline_edge_p): Likewise.
10920         (can_inline_edge_by_limits_p): Likewise.
10921         (compute_uninlined_call_time): Likewise.
10922         (compute_inlined_call_time): Likewise.
10923         (want_inline_small_function_p): Likewise.
10924         (edge_badness): Likewise.
10925         (update_caller_keys): Likewise.
10926         (update_callee_keys): Likewise.
10927         (inline_small_functions): Likewise.
10928         (inline_to_all_callers_1): Likewise.
10929         (dump_overall_stats): Likewise.
10930         (early_inline_small_functions): Likewise.
10931         (early_inliner): Likewise.
10932         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
10933         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10934         * ipa-pure-const.c (malloc_candidate_p): Likewise.
10935         * ipa-split.c (execute_split_functions): Likewise.
10936         * symbol-summary.h: Likewise.
10937         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
10939 2018-06-19  Richard Biener  <rguenther@suse.de>
10941         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
10942         (vectorize_loops): ... here.  Fix dbgcnt handling.
10943         (try_vectorize_loop): Wrap try_vectorize_loop_1.
10945 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
10947         PR target/86197
10948         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
10949         ieee128 argument takes up only one (vector) register, not two (floating
10950         point) registers.
10952 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
10954         * gimplify.c (gimplify_init_constructor): Really never clear for an
10955         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
10957 2018-06-19  Richard Biener  <rguenther@suse.de>
10959         PR tree-optimization/86179
10960         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
10961         after failed recognition.
10963 2018-06-18  Martin Sebor  <msebor@redhat.com>
10965         PR middle-end/85602
10966         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
10967         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
10968         Handle integer subtraction.
10969         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
10970         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
10972 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
10974         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
10975         param from rtx to rtx_insn *.
10976         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
10977         param.
10978         (frv_ifcvt_modify_insn): Likwise.
10979         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
10980         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
10981         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
10982         as_a <rtx_insn *> cast to local "unprotected_region" once
10983         it's been established that it's not NULL or pc_rtx.
10984         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
10985         param "sethi" from rtx to rtx_insn *.
10986         (nds32_group_float_insns): Likewise for param "insn".
10987         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
10988         param.
10989         (vax_output_int_subtract): Likewise.
10990         * config/vax/vax.c (vax_output_int_add): Likewise for param
10991         "insn".
10992         (vax_output_int_subtract): Likewise.
10993         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
10994         (emit_pattern_after): Likewise for param "after".
10995         (emit_insn_after): Likewise.
10996         (emit_jump_insn_after): Likewise.
10997         (emit_call_insn_after): Likewise.
10998         (emit_debug_insn_after): Likewise.
10999         (emit_pattern_before): Likewise for param "before".
11000         (emit_insn_before): Likewise.
11001         (emit_jump_insn_before): Likewise.
11002         * final.c (get_insn_template): Likewise for param "insn", removing
11003         a cast.
11004         * output.h (get_insn_template): Likewise for 2nd param.
11005         * rtl.h (emit_insn_before): Likewise.
11006         (emit_jump_insn_before): Likewise.
11007         (emit_debug_insn_before_noloc): Likewise.
11008         (emit_insn_after): Likewise.
11009         (emit_jump_insn_after): Likewise.
11010         (emit_call_insn_after): Likewise.
11011         (emit_debug_insn_after): Likewise.
11012         (set_insn_deleted): Likewise for param.
11014 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
11016         PR target/85358
11017         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
11018         floating point modes, so that IFmode is numerically greater than
11019         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
11020         to declare the ordering.  This prevents IFmode from being
11021         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
11022         machine.  Include rs6000-modes.h to share the fractional values
11023         between genmodes* and the rest of the compiler.
11024         (IFmode): Likewise.
11025         (KFmode): Likewise.
11026         (TFmode): Likewise.
11027         * config/rs6000/rs6000-modes.h: New file.
11028         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
11029         meaning of rs6000_long_double_size so that 126..128 selects an
11030         appropriate 128-bit floating point type.
11031         (rs6000_option_override_internal): Likewise.
11032         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
11033         (TARGET_LONG_DOUBLE_128): Change the meaning of
11034         rs6000_long_double_size so that 126..128 selects an appropriate
11035         128-bit floating point type.
11036         (LONG_DOUBLE_TYPE_SIZE): Update comment.
11037         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
11038         source and destination to match the standard usage.
11039         (truncifkf2): Likewise.
11040         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
11041         ISA 2.07 to use an explicit clobber, instead of passing in a
11042         temporary.
11043         (copysign<mode>3_soft): Likewise.
11045 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
11047         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11048         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
11049         (vect_slp_analyze_instance_dependence): Likewise.
11050         (vect_enhance_data_refs_alignment): Likewise.
11051         (vect_analyze_data_refs_alignment): Likewise.
11052         (vect_slp_analyze_and_verify_instance_alignment
11053         (vect_analyze_data_ref_accesses): Likewise.
11054         (vect_prune_runtime_alias_test_list): Likewise.
11055         (vect_analyze_data_refs): Likewise.
11056         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
11057         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11058         (vect_analyze_scalar_cycles_1): Likewise.
11059         (vect_get_loop_niters): Likewise.
11060         (vect_analyze_loop_form_1): Likewise.
11061         (vect_update_vf_for_slp): Likewise.
11062         (vect_analyze_loop_operations): Likewise.
11063         (vect_analyze_loop): Likewise.
11064         (vectorizable_induction): Likewise.
11065         (vect_transform_loop): Likewise.
11066         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
11067         * tree-vect-slp.c (vect_analyze_slp): Likewise.
11068         (vect_make_slp_decision): Likewise.
11069         (vect_detect_hybrid_slp): Likewise.
11070         (vect_slp_analyze_operations): Likewise.
11071         (vect_slp_bb): Likewise.
11072         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
11073         (vectorizable_bswap): Likewise.
11074         (vectorizable_call): Likewise.
11075         (vectorizable_simd_clone_call): Likewise.
11076         (vectorizable_conversion): Likewise.
11077         (vectorizable_assignment): Likewise.
11078         (vectorizable_shift): Likewise.
11079         (vectorizable_operation): Likewise.
11080         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
11082 2018-06-18  Martin Sebor  <msebor@redhat.com>
11084         PR tree-optimization/81384
11085         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
11086         * builtins.c (expand_builtin_strnlen): New function.
11087         (expand_builtin): Call it.
11088         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
11089         * builtins.def (BUILT_IN_STRNLEN): New.
11090         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
11091         Warn for bounds in excess of maximum object size.
11092         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
11093         single-value ranges.  Handle strnlen.
11094         (handle_builtin_strlen): Handle strnlen.
11095         (strlen_check_and_optimize_stmt): Same.
11096         * doc/extend.texi (Other Builtins): Document strnlen.
11098 2018-06-18  Maya Rashish  <coypu@sdf.org>
11100         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
11101         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
11102         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
11104         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
11105         here to ...
11106         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
11108 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11110         * tree.c (escaped_string::escape): Replace cast to char * by
11111         const_cast<char *> (unescaped).
11113 2018-06-18  Nick Clifton  <nickc@redhat.com>
11115         PR 84195
11116         * tree.c (escaped_string): New class.  Converts an unescaped
11117         string into its escaped equivalent.
11118         (warn_deprecated_use): Use the new class to convert the
11119         deprecation message, if present.
11120         (test_escaped_strings): New self test.
11121         (test_c_tests): Add test_escaped_strings.
11122         * doc/extend.texi (deprecated): Add a note that the
11123         deprecation message is affected by the -fmessage-length
11124         option, and that control characters will be escaped.
11125         (#pragma GCC error): Document this pragma.
11126         (#pragma GCC warning): Likewise.
11127         * doc/invoke.texi (-fmessage-length): Document this option's
11128         effect on the #warning and #error preprocessor directives and
11129         the deprecated attribute.
11131 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11133         * tree.c (decl_value_expr_lookup): Revert latest change.
11134         (decl_value_expr_insert): Likewise.
11136 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
11138         * gimplify.c (nonlocal_vlas): Delete.
11139         (nonlocal_vla_vars): Likewise.
11140         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
11141         referenced VLAs.
11142         (gimplify_body): Do not create and destroy nonlocal_vlas.
11143         * tree-nested.c: Include diagnostic.h.
11144         (use_pointer_in_frame): Tweak.
11145         (lookup_field_for_decl): Add assertion and declare the transformation.
11146         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
11147         internal error when the reference is in a wrong context.  Do not
11148         create a debug decl by default.
11149         (note_nonlocal_block_vlas): Delete.
11150         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
11151         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
11152         create a debug decl by default.
11153         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
11154         call is in a wrong context.
11155         (fixup_vla_decls): New function.
11156         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
11157         debug variables were created.
11158         * tree.c (decl_value_expr_lookup): Add checking assertion.
11159         (decl_value_expr_insert): Likewise.
11161 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
11163         PR middle-end/82479
11164         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
11165         * tree-scalar-evolution.c (interpret_expr): Likewise.
11166         (expression_expensive_p): Likewise.
11167         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
11168         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
11169         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
11170         (ssa_defined_by_minus_one_stmt_p): New.
11172 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
11174         PR middle-end/64946
11175         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
11176         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
11177         * dojump.c (do_jump): Likewise.
11178         * expr.c (expand_expr_real_2): Check operand type's sign.
11179         * fold-const.c (const_unop): Handle ABSU_EXPR.
11180         (fold_abs_const): Likewise.
11181         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
11182         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
11183         (strip_sign_op_1): Likesise.
11184         * match.pd: Add new pattern to generate ABSU_EXPR.
11185         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
11186         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11187         * tree-eh.c (operation_could_trap_helper_p): Likewise.
11188         * tree-inline.c (estimate_operator_cost): Likewise.
11189         * tree-pretty-print.c (dump_generic_node): Likewise.
11190         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
11191         * tree.def (ABSU_EXPR): New.
11193 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
11195         PR middle-end/86095
11196         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
11197         documented as preserved for backward compatibility only.
11198         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
11200         PR rtl-optimization/86108
11201         * bb-reorder.c (create_forwarder_block): Renamed to ...
11202         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
11203         jump from new landing pad to the second part.
11204         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
11205         Adjust callers.
11207 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
11209         PR middle-end/85878
11210         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
11211         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
11212         Only call store_expr for halves if the mode is the same.
11214         PR middle-end/86123
11215         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
11216         Fix up comment formatting.
11218 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11220         * typed-splay-tree.h (typed_splay_tree::remove): New function.
11221         (typed_splay_tree::closure,
11222         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
11223         (typed_splay_tree::typed_splay_tree,
11224         typed_splay_tree::operator =): Declared private.
11225         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
11226         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
11227         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
11228         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
11229         typed_splay_tree::splay_tree_splay,
11230         typed_splay_tree::splay_tree_foreach_helper,
11231         typed_splay_tree::splay_tree_insert,
11232         typed_splay_tree::splay_tree_remove,
11233         typed_splay_tree::splay_tree_lookup,
11234         typed_splay_tree::splay_tree_predecessor,
11235         typed_splay_tree::splay_tree_successor,
11236         typed_splay_tree::splay_tree_min,
11237         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
11238         (typed_splay_tree::root, typed_splay_tree::comp,
11239         typed_splay_tree::delete_key,
11240         typed_splay_tree::delete_value): New data members.
11241         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
11242         typed_splay_tree::remove.
11244 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
11246         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
11247         -mginv and -mno-ginv to the assembler.
11248         * config/mips/mips.opt (-mcrc): New option.
11249         (-mginv): Likewise.
11250         * doc/invoke.text (-mcrc): Document.
11251         (-mginv): Likewise.
11253 2018-06-15  Nick Clifton  <nickc@redhat.com>
11255         PR 84195
11256         * tree.c (escaped_string): New class.  Converts an unescaped
11257         string into its escaped equivalent.
11258         (warn_deprecated_use): Use the new class to convert the
11259         deprecation message, if present.
11260         (test_escaped_strings): New self test.
11261         (test_c_tests): Add test_escaped_strings.
11262         * doc/extend.texi (deprecated): Add a note that the
11263         deprecation message is affected by the -fmessage-length
11264         option, and that control characters will be escaped.
11265         (#pragma GCC error): Document this pragma.
11266         (#pragma GCC warning): Likewise.
11267         * doc/invoke.texi (-fmessage-length): Document this option's
11268         effect on the #warning and #error preprocessor directives and
11269         the deprecated attribute.
11271 2018-06-15  Richard Biener  <rguenther@suse.de>
11273         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
11274         here, also noting vector size used.
11275         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
11276         size used in MSG_OPTIMIZED_LOCATIONS dump.
11277         (pass_slp_vectorize::execute): Adjust.
11279 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
11281         PR target/85968
11282         * config/arc/arc.c (arc_return_address_register): Fix
11283         if-condition.
11285 2018-06-15  Richard Biener  <rguenther@suse.de>
11287         PR middle-end/86159
11288         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
11289         leave useless conversion stripping to force_gimple_operand_gsi.
11290         (gimplify_build2): Likewise.
11291         (gimplify_build1): Likewise.
11293 2018-06-15  Richard Biener  <rguenther@suse.de>
11295         PR middle-end/86076
11296         * tree-cfg.c (move_stmt_op): unshare invariant addresses
11297         before adjusting their block.
11299 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11301         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
11302         multilibs for *-*-rtems*.
11303         * config/riscv/t-rtems: New file.
11305 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
11307         PR middle-end/86122
11308         * match.pd ((A +- CST1) +- CST2): Punt if last resort
11309         unsigned_type_for returns NULL.
11311         PR target/85945
11312         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
11313         subregs of multi-word pseudos unless the float mode has word size.
11315 2018-06-14  Richard Biener  <rguenther@suse.de>
11317         PR middle-end/86139
11318         * tree-vect-generic.c (build_word_mode_vector_type): Remove
11319         duplicate and harmful type_hash_canon.
11320         * tree.c (type_hash_canon): Assert we didn't find ourselves.
11322 2018-06-14  Richard Biener  <rguenther@suse.de>
11324         PR ipa/86124
11325         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
11326         NULL cgraph_node.
11328 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11330         * config/rtems.h (STDINT_LONG32): Define.
11332 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
11333             Prachi Godbole  <prachi.godbole@imgtec.com>
11335         * config/mips/mips-cpus.def: Define P6600.
11336         * config/mips/mips-tables.opt: Regenerate.
11337         * config/mips/mips.c (mips_ucbranch_type): New enum.
11338         (mips_rtx_cost_data): Add support for P6600.
11339         (mips_issue_rate): Likewise.
11340         (mips_multipass_dfa_lookahead): Likewise.
11341         (mips_avoid_hazard): Likewise.
11342         (mips_reorg_process_insns): Likewise.
11343         (mips_classify_branch_p6600): New function.
11344         * config/mips/mips.h (TUNE_P6600): New define.
11345         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
11346         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
11347         * config/mips/mips.md: Include p6600.md.
11348         (processor): Add p6600.
11349         * config/mips/p6600.md: New file.
11350         * doc/invoke.texi: Add p6600 to supported architectures.
11352 2018-06-13  Martin Sebor  <msebor@redhat.com>
11354         PR tree-optimization/86114
11355         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
11356         of integer types.
11357         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
11359 2018-06-13  Richard Biener  <rguenther@suse.de>
11361         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
11362         Properly set vector type of the intermediate stmt.
11363         * tree-vect-stmts.c (vectorizable_operation): The destination
11364         var always has vectype_out type.
11366 2018-06-13  Jeff Law  <law@redhat.com>
11368         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
11369         integer 0 for argument to print_rtl_with_bb.
11370         (rl78_reorg): Likewise.
11372 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
11374         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
11375         from rtx to rtx_insn *.
11376         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
11377         "label".
11378         (add_sched_insns_for_speculation): Likewise for local "target",
11379         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11380         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
11381         from rtx_insn ** to rtx_code_label **.
11382         (reorg_emit_nops): Likewise.
11383         (c6x_reorg): Likewise for local "call_labels".
11384         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
11385         rtx to rtx_insn *.
11386         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
11387         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
11388         the loops over LABEL_REFS.
11389         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
11390         braf_label.
11391         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11392         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
11393         (split_branches): Strengthen local "olabel" from rtx to
11394         rtx_insn *, adding a safe_as_a cast.
11395         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
11396         to "rtx_insn *".
11397         (add_insn_after): Likewise for first two params.
11398         (add_insn_before): Likewise.
11399         (remove_insn): Likewise for param.
11400         (emit_pattern_before_noloc): Likewise for second and third params.
11401         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
11402         (emit_call_insn_before_noloc): Likewise.
11403         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
11404         to "rtx_insn *".
11405         (emit_barrier_before): Likewise.
11406         (emit_label_before): Strengthen "label" param from "rtx" to
11407         "rtx_code_label *".  Strengthen "before" param from "rtx" to
11408         "rtx_insn *".
11409         (emit_insn_after_1): Strengthen "after" param from "rtx" to
11410         "rtx_insn *".
11411         (emit_pattern_after_noloc): Likewise.
11412         (emit_insn_after_noloc): Likewise.
11413         (emit_jump_insn_after_noloc): Likewise.
11414         (emit_call_insn_after_noloc): Likewise.
11415         (emit_debug_insn_after_noloc): Likewise.
11416         (emit_barrier_after): Likewise.
11417         (emit_label_after): Likewise for both params.
11418         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
11419         "loc" param from "int" to "location_t".
11420         (emit_insn_after_setloc): Likewise.
11421         (emit_jump_insn_after_setloc): Likewise.
11422         (emit_call_insn_after_setloc): Likewise.
11423         (emit_debug_insn_after_setloc): Likewise.
11424         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
11425         "loc" param from "int" to "location_t".
11426         (emit_pattern_before): Convert NULL_RTX to NULL.
11427         (emit_insn_before_setloc): Convert "loc" param from "int" to
11428         "location_t".
11429         (emit_jump_insn_before_setloc): Likewise.
11430         (emit_call_insn_before_setloc): Likewise.
11431         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
11432         rtx_insn *.  Convert "loc" param from "int" to "location_t".
11433         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
11434         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
11435         Convert 3rd param from "int" to "location_t".
11436         (emit_barrier_before, emit_barrier_after, next_real_insn):
11437         Strengthen param from rtx to rtx_insn *.
11438         (emit_label_before): Strengthen 1st param from "rtx" to
11439         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
11440         "rtx_insn *".
11441         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
11442         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
11443         Strengthen 2nd param from "rtx" to "rtx_insn *".
11444         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
11445         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
11446         Likewise. Convert 3rd param from "int" to "location_t".
11447         (emit_label_after): Strengthen 1st param from "rtx" to
11448         "rtx_code_label *".
11449         (next_real_insn, remove_insn): Strengthen param from "rtx" to
11450         "rtx_insn *".
11451         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
11452         from "rtx" to "rtx_insn *".
11454 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
11456         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
11457         bodies streamed in with -Q.
11458         * dumpfile.c (dump_files): Add lto-stream-out dump file.
11459         * dumpfile.h (tree_dump_index): Add lto_stream_out.
11460         * gimple-streamer-out.c: Include gimple-pretty-print.h
11461         (output_bb): Dump stmts streamed.
11462         * lto-section-out.c: Include print-tree.h
11463         (lto_begin_section): Dump sections created.
11464         (lto_output_decl_index): Dump decl encoded.
11465         * lto-streamer-out.c: Include print-tree.h
11466         (create_output_block): Dump output block created.
11467         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
11468         (output_function): Dump function output.
11469         (output_constructor): Dump constructor streamed.
11470         (write_global_stream): Output indexes encoded.
11471         (produce_asm_for_decls): Dump streams encoded.
11472         * lto-streamer.c (streamer_dump_file): New global var.
11473         * lto-streamer.h (streamer_dump_file): Declare.
11474         * passes.c (ipa_write_summaries): Initialize streamer dump.
11475         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
11476         in.
11478 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
11480         PR target/86048
11481         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
11482         offsets for register save directives.  Emit a second batch of save
11483         directives, if need be, when the function accesses prior frames.
11485 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11487         * config/arc/fpu.md (fmasf4): Force operand to register.
11488         (fnmasf4): Likewise.
11490 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11492         * config/arc/arc-protos.h (arc_pad_return): Remove.
11493         * config/arc/arc.c (machine_function): Remove force_short_suffix
11494         and size_reason.
11495         (arc_print_operand): Adjust printing of '&'.
11496         (arc_verify_short): Remove conditional printing of short suffix.
11497         (arc_final_prescan_insn): Remove reference to size_reason.
11498         (pad_return): New function.
11499         (arc_reorg): Call pad_return.
11500         (arc_pad_return): Remove.
11501         (arc_init_machine_status): Remove reference to force_short_suffix.
11502         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
11503         (attr length): When attribute iscompact is true force to 2
11504         regardless; in the case of maybe check if we want to force the
11505         instruction to have 4 bytes length.
11506         (nopv): Change it to generate 4 byte long nop as well.
11507         (blockage): New pattern.
11508         (simple_return): Remove call to arc_pad_return.
11509         (p_return_i): Likewise.
11511 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11513         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
11515 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11517         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
11518         ARC cores.
11520 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11522         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
11523         for ARC700 and ARCv2.
11525 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
11527         PR target/86076
11528         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
11529         operands[2] instead of operands[1].
11532 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
11534         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
11535         case, check whether the outer register overlaps an unallocatable
11536         register, not just whether it fits the required class.
11538 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
11540         * poly-int.h (can_div_trunc_p): Add new overload in which all values
11541         are poly_ints.
11542         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
11543         (memrefs_conflict_p): Likewise.
11544         (init_alias_analysis): Likewise.
11545         * cfgexpand.c (expand_debug_expr): Likewise.
11546         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
11547         * cse.c (fold_rtx): Likewise.
11548         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
11549         * expr.c (emit_block_move_hints): Likewise.
11550         (clear_storage_hints, push_block, emit_push_insn): Likewise.
11551         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
11552         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
11553         (emit_group_store): Likewise.
11554         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
11555         to read the PRE/POST_MODIFY increment.
11556         * calls.c (store_one_arg): Use strip_offset.
11557         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
11558         poly_int_rtx_p.
11559         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
11560         by a VEC_SELECT.
11561         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
11562         (simplify_binary_operation_1): Extend CONST_INT handling to
11563         poly_int_rtx_p.
11564         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
11565         than a HOST_WIDE_INT.
11566         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
11567         poly_int64.
11568         (adjust_mems, add_stores): Update accodingly.
11569         (vt_canonicalize_addr): Track polynomial offsets.
11570         (emit_note_insn_var_location): Likewise.
11571         (vt_add_function_parameter): Likewise.
11572         (vt_initialize): Likewise.
11574 2018-06-12  Jeff Law  <law@redhat.com>
11576         * config.gcc (alpha*-*-freebsd*): Remove.
11577         * config/alpha/freebsd.h: Remove.
11579 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
11581         PR other/69968
11582         * spellcheck-tree.c (levenshtein_distance): Rename to...
11583         (get_edit_distance): ...this, and update for underlying renaming.
11584         * spellcheck-tree.h (levenshtein_distance): Rename to...
11585         (get_edit_distance): ...this.
11586         * spellcheck.c (levenshtein_distance): Rename to...
11587         (get_edit_distance): ...this.  Convert from Levenshtein distance
11588         to Damerau-Levenshtein distance by supporting transpositions of
11589         adjacent characters.  Rename "v1" to "v_next" and "v0" to
11590         "v_one_ago".
11591         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
11592         (selftest::test_edit_distance_unit_test_oneway): ...this, and
11593         update for underlying renaming.
11594         (selftest::levenshtein_distance_unit_test): Rename to...
11595         (selftest::test_get_edit_distance_unit): ...this, and update for
11596         underlying renaming.
11597         (selftest::test_find_closest_string): Add example from PR 69968
11598         where transposition helps
11599         (selftest::test_metric_conditions): Update for renaming.
11600         (selftest::test_metric_conditions): Likewise.
11601         (selftest::spellcheck_c_tests): Likewise.
11602         * spellcheck.h (levenshtein_distance): Rename both overloads to...
11603         (get_edit_distance): ...this.
11604         (best_match::consider): Update for renaming.
11606 2018-06-12  Martin Sebor  <msebor@redhat.com>
11608         PR tree-optimization/85259
11609         * builtins.c (compute_objsize): Handle constant offsets.
11610         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
11611         true iff a warning has been issued.
11612         * gimple.h (gimple_nonartificial_location): New function.
11613         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
11614         gimple_nonartificial_location and handle -Wno-system-headers.
11615         (handle_builtin_stxncpy): Same.
11617 2018-06-12  Martin Sebor  <msebor@redhat.com>
11619         PR c/85931
11620         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
11622 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
11624         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
11625         BUILTIN_VEC_XST entries for pointer to double and long long.
11627 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
11629         PR target/85990
11630         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11631         Update comments.
11632         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11633         Likewise.
11635 2018-06-12  Martin Liska  <mliska@suse.cz>
11637         * doc/options.texi: Document IntegerRange.
11639 2018-06-12  Martin Liska  <mliska@suse.cz>
11641         * config/i386/i386.opt: Make MPX-related options as Deprecated.
11642         * opt-functions.awk: Handle Deprecated flag.
11643         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
11644         and report error.
11645         (read_cmdline_option): Report warning for a deprecated option.
11646         * opts.h (struct cl_option): Add new field cl_deprecated.
11647         (CL_ERR_DEPRECATED): New.
11649 2018-06-12  Martin Liska  <mliska@suse.cz>
11651         * doc/options.texi: Document Deprecated option flag.
11653 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11655         * config/arc/arc-arch.h (arc_extras): New enum.
11656         (arc_cpu_t):Add field extra.
11657         (arc_cpu_types): Consider the extras.
11658         * config/arc/arc-cpus.def: Add extras info.
11659         * config/arc/arc-opts.h (processor_type): Consider extra field.
11660         * config/arc/arc.c (arc_override_options): Handle extra field.
11662 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11664         * config/arc/arc-arch.h: Update ARC_OPTX macro.
11665         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
11666         field.
11667         * config/arc/arc.c (arc_init): Update pic warning.
11668         (irq_range): Update irq range parsing warnings.
11669         (arc_override_options): Update various warning messages.
11670         (arc_handle_aux_attribute): Likewise.
11672 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
11674         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
11676 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11678         * doc/sourcebuild.texi: Document usage of line number 0 in verify
11679         compiler messages directives.
11681 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
11683         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
11684         * config/mips/mips-tables.opt: Regenerate.
11685         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
11686         mips64r6.
11687         * doc/invoke.texi: Document -march=i6500.
11689 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
11691         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
11692         (i6400_gpmul): Add cpu_unit.
11693         (i6400_gpdiv): Likewise.
11694         (i6400_msa_add_d): Update reservations.
11695         (i6400_msa_int_add) Likewise.
11696         (i6400_msa_short_logic3) Likewise.
11697         (i6400_msa_short_logic2) Likewise.
11698         (i6400_msa_short_logic) Likewise.
11699         (i6400_msa_move) Likewise.
11700         (i6400_msa_cmp) Likewise.
11701         (i6400_msa_short_float2) Likewise.
11702         (i6400_msa_div_d) Likewise.
11703         (i6400_msa_long_logic1) Likewise.
11704         (i6400_msa_long_logic2) Likewise.
11705         (i6400_msa_mult) Likewise.
11706         (i6400_msa_long_float2) Likewise.
11707         (i6400_msa_long_float4) Likewise.
11708         (i6400_msa_long_float5) Likewise.
11709         (i6400_msa_long_float8) Likewise.
11710         (i6400_fpu_fadd): Include frint type.
11711         (i6400_fpu_store): New define_insn_reservation.
11712         (i6400_fpu_load): Likewise.
11713         (i6400_fpu_move): Likewise.
11714         (i6400_fpu_fcmp): Likewise.
11715         (i6400_fpu_fmadd): Likewise.
11716         (i6400_int_mult): Include imul3nc type and update reservation.
11717         (i6400_int_div): Include idiv3 type and update reservation.
11718         (i6400_int_load): Update to check type not move_type.
11719         (i6400_int_store): Likewise.
11720         (i6400_int_prefetch): Set zero latency.
11722 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
11724         * gcc.c: Document new %@{...} sequence.
11725         (LINK_COMMAND_SPEC): Use it for the -L switches.
11726         (cpp_unique_options): Use it for the -I switches.
11727         (at_file_argbuf): New global variable.
11728         (in_at_file): Likewise.
11729         (alloc_args): Create at_file_argbuf.
11730         (clear_args): Truncate at_file_argbuf.
11731         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
11732         (open_at_file): New function.
11733         (close_at_file): Likewise.
11734         (create_at_file): Delete.
11735         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
11736         <'o'>: Likewise.
11737         <'@'>: New case.
11738         (validate_switches_from_spec): Deal with %@{...} sequence.
11739         (validate_switches): Likewise.
11740         (driver::finalize): Call clear_args.
11742 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
11744         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
11746 2018-06-11  Martin Sebor  <msebor@redhat.com>
11748         * doc/invoke.texi (-Wall): List -Wc++17-compat.
11749         (Wno-class-memaccess): Add @opindex.
11750         (Wno-templates, Wno-multiple-inheritance): Same.
11751         (Wno-virtual-inheritance, Wno-namespaces): Same.
11752         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
11753         (Wno-format-overflow, Wno-format-truncation): Same.
11754         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
11755         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
11756         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
11757         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
11758         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
11759         (Wno-misspelled-isr): Same.
11761 2018-06-11  Martin Sebor  <msebor@redhat.com>
11763         * PR tree-optimization/86083
11764         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
11766 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
11768         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
11770 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
11772         PR target/85755
11773         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
11774         on the correct operand.
11775         (*movdi_internal64): Ditto.
11777 2018-06-11  Martin Liska  <mliska@suse.cz>
11779         PR tree-optimization/86089
11780         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
11782 2018-06-11  Julia Koval  <julia.koval@intel.com>
11784         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
11785         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
11786         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
11788 2018-06-11  Olivier Hainque  <hainque@adacore.com>
11790         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
11791         for Ada with strict dwarf2.
11793 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
11795         PR target/85755
11796         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
11797         addresses.
11799 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
11801         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
11803 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
11805         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
11806         TARGET_ELF.
11808 2018-06-08  Martin Liska  <mliska@suse.cz>
11810         * tree-cfg.h (debug_function): Fix argument type to match
11811         implementation.
11813 2018-06-08  Martin Liska  <mliska@suse.cz>
11815         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
11816         Remove usage of MPX-related (and removed) fields.
11817         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
11819 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
11821         * cfg.c (debug): Use TDF_NONE rather than 0.
11822         * cfghooks.c (debug): Likewise.
11823         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
11824         (struct dump_option_value_info): Convert to...
11825         (struct kv_pair): ...this template type.
11826         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
11827         rather than 0.
11828         (optinfo_verbosity_options): Likewise.
11829         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
11830         OPTGROUP_NONE.
11831         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
11832         than int for "optgroup_flags" param.
11833         (dump_generic_expr_loc): Use dump_flags_t rather than int for
11834         "dump_kind" param.
11835         (dump_dec): Likewise.
11836         (dump_finish): Use TDF_NONE rather than 0.
11837         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
11838         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
11839         than 0.  Update for change to option_ptr.
11840         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
11841         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
11842         0.  Update for changes to optinfo_verbosity_options and
11843         optgroup_options.
11844         (opt_info_switch_p): Convert optgroup_flags from int to
11845         optgroup_flags_t.
11846         (dump_basic_block): Use dump_flags_t rather than int
11847         for "dump_kind" param.
11848         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
11849         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
11850         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
11851         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
11852         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
11853         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
11854         TDF_NONE): Convert from macros to...
11855         (enum dump_flag): ...this new enum.
11856         (dump_flags_t): Update to use enum.
11857         (operator|, operator&, operator~, operator|=, operator&=):
11858         Implement for dump_flags_t.
11859         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
11860         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
11861         Convert from macros to...
11862         (enum optgroup_flag): ...this new enum.
11863         (optgroup_flags_t): New typedef.
11864         (operator|, operator|=): Implement for optgroup_flags_t.
11865         (struct dump_file_info): Convert field "alt_flags" to
11866         dump_flags_t.  Convert field "optgroup_flags" to
11867         optgroup_flags_t.
11868         (dump_basic_block): Use dump_flags_t rather than int for param.
11869         (dump_generic_expr_loc): Likewise.
11870         (dump_dec): Likewise.
11871         (dump_register): Convert param "optgroup_flags" to
11872         optgroup_flags_t.
11873         (opt_info_enable_passes): Likewise.
11874         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
11875         than 0.
11876         * gimple-pretty-print.c (debug): Likewise.
11877         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
11878         (merged_store_group::apply_stores): Likewise.
11879         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
11880         * gimple.c (verify_gimple_pp): Likewise.
11881         * graphite-poly.c (print_pbb_body): Likewise.
11882         * passes.c (pass_manager::register_one_dump_file): Convert
11883         local "optgroup_flags" to optgroup_flags_t.
11884         * print-tree.c (print_node): Use TDF_NONE rather than 0.
11885         (debug): Likewise.
11886         (debug_body): Likewise.
11887         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
11888         to optgroup_flags_t.
11889         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
11890         than 0.
11891         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
11892         (convert_mult_to_fma): Likewise.
11893         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
11894         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
11895         * tree-vect-data-refs.c (dump_lower_bound): Convert param
11896         "dump_kind" to dump_flags_t.
11898 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
11900         * config/rs6000/rs6000.c (min, max): Delete.
11902 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
11904         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
11905         -mabi=spe and -mabi=no-spe.
11907 2018-06-08  Martin Liska  <mliska@suse.cz>
11909         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
11910         where we expect an existing summary.
11912 2018-06-08  Martin Liska  <mliska@suse.cz>
11914         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
11915         * ipa-inline.h (estimate_edge_growth): Likewise.
11917 2018-06-08  Martin Liska  <mliska@suse.cz>
11919         * cgraph.c (function_version_hasher::hash): Use
11920         cgraph_node::get_uid ().
11921         (function_version_hasher::equal):
11922         * cgraph.h (cgraph_node::get_uid): New method.
11923         * ipa-inline.c (update_caller_keys): Use
11924         cgraph_node::get_uid ().
11925         (update_callee_keys): Likewise.
11926         * ipa-utils.c (searchc): Likewise.
11927         (ipa_reduced_postorder): Likewise.
11928         * lto-cgraph.c (input_node): Likewise.
11929         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
11930         * symbol-summary.h (symtab_insertion): Likewise.
11931         (symtab_removal): Likewise.
11932         (symtab_duplication): Likewise.
11933         * tree-pretty-print.c (dump_function_header): Likewise.
11934         * tree-sra.c (convert_callers_for_node): Likewise.
11936 2018-06-08  Martin Liska  <mliska@suse.cz>
11938         * cgraph.c (symbol_table::create_edge): Always assign a new
11939         unique number.
11940         (symbol_table::free_edge): Do not recycle numbers.
11941         * cgraph.h (cgraph_edge::get): New method.
11942         * symbol-summary.h (symtab_removal): Use it.
11943         (symtab_duplication): Likewise.
11944         (call_summary::hashable_uid): Remove.
11946 2018-06-08  Martin Liska  <mliska@suse.cz>
11948         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
11949         (initialize_growth_caches): Remove.
11950         (free_growth_caches): Likewise.
11951         (do_estimate_edge_time): Use edge_growth_cache.
11952         (do_estimate_edge_size): Likewise.
11953         (do_estimate_edge_hints): Likewise.
11954         * ipa-inline.c (reset_edge_caches): Likewise.
11955         (recursive_inlining): Likewise.
11956         (inline_small_functions): Likewise.
11957         * ipa-inline.h (initialize_growth_caches): Remove.
11958         (estimate_edge_size): Likewise.
11959         (estimate_edge_time): Likewise.
11960         (estimate_edge_hints): Likewise.
11961         (reset_edge_growth_cache): Likewise.
11962         * symbol-summary.h (call_summary::remove): New method.
11964 2018-06-08  Martin Liska  <mliska@suse.cz>
11966         * ipa-cp.c (class edge_clone_summary): New summary.
11967         (grow_edge_clone_vectors): Remove.
11968         (ipcp_edge_duplication_hook): Remove.
11969         (class edge_clone_summary_t): New call_summary class.
11970         (ipcp_edge_removal_hook): Remove.
11971         (edge_clone_summary_t::duplicate): New function.
11972         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
11973         (create_specialized_node): Likewise.
11974         (ipcp_driver): Initialize edge_clone_summaries and do not
11975         register hooks.
11977 2018-06-08  Martin Liska  <mliska@suse.cz>
11979         * symbol-summary.h (get): New function.
11980         (call_summary::m_initialize_when_cloning): New class member.
11982 2018-06-08  Martin Liska  <mliska@suse.cz>
11984         * cgraph.c (cgraph_node::remove): Do not recycle uid.
11985         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
11986         (symbol_table::allocate_cgraph_symbol): Do not set uid.
11987         * passes.c (uid_hash_t): Record removed_nodes by their uids.
11988         (remove_cgraph_node_from_order): Use the removed_nodes set.
11989         (do_per_function_toporder): Likwise.
11990         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
11991         instead of summary_uid.
11992         (symtab_removal): Likewise.
11993         (symtab_duplication): Likewise.
11995 2018-06-08  Martin Liska  <mliska@suse.cz>
11997         * ipa-cp.c (ipcp_store_bits_results): Use
11998         ipcp_transformation_sum.
11999         (ipcp_store_vr_results): Likewise.
12000         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
12001         to ...
12002         (ipcp_transformation_initialize): ... this.
12003         (ipa_set_node_agg_value_chain):
12004         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
12005         (write_ipcp_transformation_info): Likewise.
12006         (read_ipcp_transformation_info): Likewise.
12007         (ipcp_update_bits): Likewise.
12008         (ipcp_update_vr): Likewise.
12009         (ipcp_transform_function): Likewise.
12010         * ipa-prop.h: Rename ipcp_transformation_summary to
12011         ipcp_transformation.
12012         (class ipcp_transformation_t): New function summary.
12013         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
12014         (ipa_get_agg_replacements_for_node): Likewise.
12016 2018-06-08  Martin Liska  <mliska@suse.cz>
12018         * ipa-pure-const.c (struct funct_state_d): Do it class instead
12019         of struct.
12020         (class funct_state_summary_t): New function_summary class.
12021         (has_function_state): Remove.
12022         (get_function_state): Likewise.
12023         (set_function_state): Likewise.
12024         (add_new_function): Likewise.
12025         (funct_state_summary_t::insert): New function.
12026         (duplicate_node_data): Remove.
12027         (remove_node_data): Remove.
12028         (funct_state_summary_t::duplicate): New function.
12029         (register_hooks): Create new funct_state_summaries.
12030         (pure_const_generate_summary): Use it.
12031         (pure_const_write_summary): Likewise.
12032         (pure_const_read_summary): Likewise.
12033         (propagate_pure_const): Likewise.
12034         (propagate_nothrow): Likewise.
12035         (dump_malloc_lattice): Likewise.
12036         (propagate_malloc): Likewise.
12037         (execute): Do not register hooks, just remove summary
12038         instead.
12039         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
12040         constructor.
12042 2018-06-08  Martin Liska  <mliska@suse.cz>
12044         * ipa-reference.c (remove_node_data): Remove.
12045         (duplicate_node_data): Likewise.
12046         (class ipa_ref_var_info_summary_t): New class.
12047         (class ipa_ref_opt_summary_t): Likewise.
12048         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
12049         (get_reference_optimization_summary): Use
12050         ipa_ref_opt_sum_summaries.
12051         (set_reference_vars_info): Remove.
12052         (set_reference_optimization_summary): Likewise.
12053         (ipa_init): Create summaries.
12054         (init_function_info): Use function summary.
12055         (ipa_ref_opt_summary_t::duplicate): New function.
12056         (ipa_ref_opt_summary_t::remove): New function.
12057         (get_read_write_all_from_node): Fix GNU coding style.
12058         (propagate): Use function summary.
12059         (write_node_summary_p): Fix GNU coding style.
12060         (stream_out_bitmap): Likewise.
12061         (ipa_reference_read_optimization_summary): Use function summary.
12062         (ipa_reference_c_finalize): Do not release hooks.
12064 2018-06-08  Martin Liska  <mliska@suse.cz>
12066         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
12067         (analyze_function_body): Extract multiple calls of get_create.
12068         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12069         * ipa-inline.c (recursive_inlining): Use ::get method.
12070         * ipa-inline.h (estimate_edge_growth): Likewise.
12072 2018-06-08  Martin Liska  <mliska@suse.cz>
12074         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
12075         HSA_INVALID.
12076         (hsa_function_summary::hsa_function_summary): Use the new enum
12077         value.
12078         (hsa_gpu_implementation_p): Use hsa_summaries::get.
12079         * hsa-gen.c (hsa_get_host_function): Likewise.
12080         (get_brig_function_name): Likewise.
12081         * ipa-hsa.c (process_hsa_functions): Likewise.
12082         (ipa_hsa_write_summary): Likewise.
12083         * symbol-summary.h (symtab_duplication): Use ::get function/
12084         (get): New function.
12086 2018-06-08  Martin Liska  <mliska@suse.cz>
12088         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
12089         of get.
12090         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
12091         (hsa_register_kernel): Likewise.
12092         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
12093         * hsa-gen.c (hsa_get_host_function): Likewise.
12094         (get_brig_function_name): Likewise.
12095         (generate_hsa): Likewise.
12096         (pass_gen_hsail::execute): Likewise.
12097         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
12098         (devirtualization_time_bonus): Likewise.
12099         (ipcp_propagate_stage): Likewise.
12100         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12101         (edge_set_predicate): Likewise.
12102         (evaluate_conditions_for_known_args): Likewise.
12103         (evaluate_properties_for_edge): Likewise.
12104         (ipa_fn_summary::reset): Likewise.
12105         (ipa_fn_summary_t::duplicate): Likewise.
12106         (dump_ipa_call_summary): Likewise.
12107         (ipa_dump_fn_summary): Likewise.
12108         (analyze_function_body): Likewise.
12109         (compute_fn_summary): Likewise.
12110         (estimate_edge_devirt_benefit): Likewise.
12111         (estimate_edge_size_and_time): Likewise.
12112         (estimate_calls_size_and_time): Likewise.
12113         (estimate_node_size_and_time): Likewise.
12114         (inline_update_callee_summaries): Likewise.
12115         (remap_edge_change_prob): Likewise.
12116         (remap_edge_summaries): Likewise.
12117         (ipa_merge_fn_summary_after_inlining): Likewise.
12118         (ipa_update_overall_fn_summary): Likewise.
12119         (read_ipa_call_summary): Likewise.
12120         (inline_read_section): Likewise.
12121         (write_ipa_call_summary): Likewise.
12122         (ipa_fn_summary_write): Likewise.
12123         (ipa_free_fn_summary): Likewise.
12124         * ipa-hsa.c (process_hsa_functions): Likewise.
12125         (ipa_hsa_write_summary): Likewise.
12126         (ipa_hsa_read_section): Likewise.
12127         * ipa-icf.c (sem_function::merge): Likewise.
12128         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12129         (do_estimate_edge_time): Likewise.
12130         (estimate_size_after_inlining): Likewise.
12131         (estimate_growth): Likewise.
12132         (growth_likely_positive): Likewise.
12133         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12134         (inline_call): Likewise.
12135         * ipa-inline.c (caller_growth_limits): Likewise.
12136         (can_inline_edge_p): Likewise.
12137         (can_inline_edge_by_limits_p): Likewise.
12138         (compute_uninlined_call_time): Likewise.
12139         (compute_inlined_call_time): Likewise.
12140         (want_inline_small_function_p): Likewise.
12141         (edge_badness): Likewise.
12142         (update_caller_keys): Likewise.
12143         (update_callee_keys): Likewise.
12144         (recursive_inlining): Likewise.
12145         (inline_small_functions): Likewise.
12146         (inline_to_all_callers_1): Likewise.
12147         (dump_overall_stats): Likewise.
12148         (early_inline_small_functions): Likewise.
12149         (early_inliner): Likewise.
12150         * ipa-inline.h (estimate_edge_growth): Likewise.
12151         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12152         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12153         * ipa-prop.h (IPA_NODE_REF): Likewise.
12154         (IPA_EDGE_REF): Likewise.
12155         * ipa-pure-const.c (malloc_candidate_p): Likewise.
12156         (propagate_malloc): Likewise.
12157         * ipa-split.c (execute_split_functions): Likewise.
12158         * symbol-summary.h: Rename get to get_create.
12159         (get): Likewise.
12160         (get_create): Likewise.
12161         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12163 2018-06-08  Martin Liska  <mliska@suse.cz>
12165         * symbol-summary.h (release): Move definition out of class
12166         declaration.
12167         (symtab_removal): Likewise.
12168         (symtab_duplication): Likewise.
12170 2018-06-08  Martin Liska  <mliska@suse.cz>
12172         * symbol-summary.h (function_summary): Move constructor
12173         implementation out of class declaration.
12174         (release): Likewise.
12175         (symtab_insertion): Likewise.
12176         (symtab_removal): Likewise.
12177         (symtab_duplication): Likewise.
12178         (get): Likewise.
12180 2018-06-08  Martin Liska  <mliska@suse.cz>
12182         * Makefile.in: Remove support for MPX (macros, related functions,
12183         fields in cgraph_node, ...).
12184         * builtin-types.def (BT_BND): Likewise.
12185         (BT_FN_BND_CONST_PTR): Likewise.
12186         (BT_FN_CONST_PTR_BND): Likewise.
12187         (BT_FN_VOID_PTR_BND): Likewise.
12188         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
12189         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
12190         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
12191         (expand_builtin_mempcpy_with_bounds): Likewise.
12192         (expand_builtin_memset_with_bounds): Likewise.
12193         (expand_builtin_memset_args): Likewise.
12194         (std_expand_builtin_va_start): Likewise.
12195         (expand_builtin): Likewise.
12196         (expand_builtin_with_bounds): Likewise.
12197         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
12198         (DEF_LIB_BUILTIN_CHKP): Likewise.
12199         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
12200         (DEF_CHKP_BUILTIN): Likewise.
12201         (BUILT_IN_MEMCPY): Likewise.
12202         (BUILT_IN_MEMMOVE): Likewise.
12203         (BUILT_IN_MEMPCPY): Likewise.
12204         (BUILT_IN_MEMSET): Likewise.
12205         (BUILT_IN_STPCPY): Likewise.
12206         (BUILT_IN_STRCAT): Likewise.
12207         (BUILT_IN_STRCHR): Likewise.
12208         (BUILT_IN_STRCPY): Likewise.
12209         (BUILT_IN_STRLEN): Likewise.
12210         (BUILT_IN_MEMCPY_CHK): Likewise.
12211         (BUILT_IN_MEMMOVE_CHK): Likewise.
12212         (BUILT_IN_MEMPCPY_CHK): Likewise.
12213         (BUILT_IN_MEMSET_CHK): Likewise.
12214         (BUILT_IN_STPCPY_CHK): Likewise.
12215         (BUILT_IN_STRCAT_CHK): Likewise.
12216         (BUILT_IN_STRCPY_CHK): Likewise.
12217         * calls.c (store_bounds): Likewise.
12218         (emit_call_1): Likewise.
12219         (special_function_p): Likewise.
12220         (maybe_warn_nonstring_arg): Likewise.
12221         (initialize_argument_information): Likewise.
12222         (finalize_must_preallocate): Likewise.
12223         (compute_argument_addresses): Likewise.
12224         (expand_call): Likewise.
12225         * cfgexpand.c (expand_call_stmt): Likewise.
12226         (expand_return): Likewise.
12227         (expand_gimple_stmt_1): Likewise.
12228         (pass_expand::execute): Likewise.
12229         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
12230         (cgraph_node::remove): Likewise.
12231         (cgraph_node::dump): Likewise.
12232         (cgraph_node::verify_node): Likewise.
12233         * cgraph.h (chkp_function_instrumented_p): Likewise.
12234         (symtab_node::get_alias_target): Likewise.
12235         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
12236         (cgraph_local_p): Likewise.
12237         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
12238         (cgraph_edge::rebuild_references): Likewise.
12239         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
12240         (walk_polymorphic_call_targets): Likewise.
12241         (cgraph_node::expand_thunk): Likewise.
12242         (symbol_table::output_weakrefs): Likewise.
12243         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
12244         (ix86_handle_option): Likewise.
12245         * config/i386/constraints.md: Likewise.
12246         * config/i386/i386-builtin-types.def (BND): Likewise.
12247         (VOID): Likewise.
12248         (PVOID): Likewise.
12249         (ULONG): Likewise.
12250         * config/i386/i386-builtin.def (BDESC_END): Likewise.
12251         (BDESC_FIRST): Likewise.
12252         (BDESC): Likewise.
12253         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
12254         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
12255         * config/i386/i386.c (enum reg_class): Likewise.
12256         (ix86_target_string): Likewise.
12257         (ix86_option_override_internal): Likewise.
12258         (ix86_conditional_register_usage): Likewise.
12259         (ix86_valid_target_attribute_inner_p): Likewise.
12260         (ix86_set_indirect_branch_type): Likewise.
12261         (ix86_set_current_function): Likewise.
12262         (ix86_function_arg_regno_p): Likewise.
12263         (init_cumulative_args): Likewise.
12264         (ix86_function_arg_advance): Likewise.
12265         (ix86_function_arg): Likewise.
12266         (ix86_pass_by_reference): Likewise.
12267         (ix86_function_value_regno_p): Likewise.
12268         (ix86_function_value_1): Likewise.
12269         (ix86_function_value_bounds): Likewise.
12270         (ix86_return_in_memory): Likewise.
12271         (ix86_setup_incoming_vararg_bounds): Likewise.
12272         (ix86_va_start): Likewise.
12273         (indirect_thunk_need_prefix): Likewise.
12274         (print_reg): Likewise.
12275         (ix86_print_operand): Likewise.
12276         (ix86_expand_call): Likewise.
12277         (ix86_output_function_return): Likewise.
12278         (reg_encoded_number): Likewise.
12279         (BDESC_VERIFYS): Likewise.
12280         (ix86_init_mpx_builtins): Likewise.
12281         (ix86_init_builtins): Likewise.
12282         (ix86_emit_cmove): Likewise.
12283         (ix86_emit_move_max): Likewise.
12284         (ix86_expand_builtin): Likewise.
12285         (ix86_builtin_mpx_function): Likewise.
12286         (ix86_get_arg_address_for_bt): Likewise.
12287         (ix86_load_bounds): Likewise.
12288         (ix86_store_bounds): Likewise.
12289         (ix86_load_returned_bounds): Likewise.
12290         (ix86_store_returned_bounds): Likewise.
12291         (ix86_class_likely_spilled_p): Likewise.
12292         (ix86_hard_regno_mode_ok): Likewise.
12293         (x86_order_regs_for_local_alloc): Likewise.
12294         (ix86_mitigate_rop): Likewise.
12295         (ix86_bnd_prefixed_insn_p): Likewise.
12296         (ix86_mpx_bound_mode): Likewise.
12297         (ix86_make_bounds_constant): Likewise.
12298         (ix86_initialize_bounds): Likewise.
12299         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
12300         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
12301         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
12302         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
12303         (TARGET_CHKP_BOUND_MODE): Likewise.
12304         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
12305         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
12306         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
12307         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
12308         * config/i386/i386.h (TARGET_MPX): Likewise.
12309         (TARGET_MPX_P): Likewise.
12310         (VALID_BND_REG_MODE): Likewise.
12311         (FIRST_BND_REG): Likewise.
12312         (LAST_BND_REG): Likewise.
12313         (enum reg_class): Likewise.
12314         (BND_REG_P): Likewise.
12315         (BND_REGNO_P): Likewise.
12316         (BNDmode): Likewise.
12317         (ADJUST_INSN_LENGTH): Likewise.
12318         * config/i386/i386.md: Likewise.
12319         * config/i386/i386.opt: Likewise.
12320         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
12321         (defined): Likewise.
12322         (LINK_MPX): Likewise.
12323         (MPX_SPEC): Likewise.
12324         (LIBMPX_SPEC): Likewise.
12325         (LIBMPXWRAPPERS_SPEC): Likewise.
12326         (CHKP_SPEC): Likewise.
12327         * config/i386/predicates.md: Likewise.
12328         * dbxout.c (dbxout_type): Likewise.
12329         * doc/extend.texi: Likewise.
12330         * doc/invoke.texi: Likewise.
12331         * doc/md.texi: Likewise.
12332         * doc/tm.texi: Likewise.
12333         * doc/tm.texi.in: Likewise.
12334         * dwarf2out.c (is_base_type): Likewise.
12335         (gen_formal_types_die): Likewise.
12336         (gen_subprogram_die): Likewise.
12337         (gen_type_die_with_usage): Likewise.
12338         (gen_decl_die): Likewise.
12339         (dwarf2out_late_global_decl): Likewise.
12340         * expr.c (expand_assignment): Likewise.
12341         (emit_storent_insn): Likewise.
12342         (store_expr_with_bounds): Likewise.
12343         (store_expr): Likewise.
12344         (expand_expr_real_1): Likewise.
12345         * expr.h (store_expr_with_bounds): Likewise.
12346         * function.c (use_register_for_decl): Likewise.
12347         (struct bounds_parm_data): Likewise.
12348         (assign_parms_augmented_arg_list): Likewise.
12349         (assign_parm_find_entry_rtl): Likewise.
12350         (assign_parm_is_stack_parm): Likewise.
12351         (assign_parm_load_bounds): Likewise.
12352         (assign_bounds): Likewise.
12353         (assign_parms): Likewise.
12354         (expand_function_start): Likewise.
12355         * gcc.c (CHKP_SPEC): Likewise.
12356         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
12357         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
12358         (wrestrict_dom_walker::check_call): Likewise.
12359         * gimple.c (gimple_build_call_from_tree): Likewise.
12360         * gimple.h (enum gf_mask): Likewise.
12361         (gimple_call_with_bounds_p): Likewise.
12362         (gimple_call_set_with_bounds): Likewise.
12363         * gimplify.c (gimplify_init_constructor): Likewise.
12364         * ipa-cp.c (initialize_node_lattices): Likewise.
12365         (propagate_constants_across_call): Likewise.
12366         (find_more_scalar_values_for_callers_subset): Likewise.
12367         * ipa-hsa.c (process_hsa_functions): Likewise.
12368         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
12369         * ipa-icf.c (sem_function::merge): Likewise.
12370         * ipa-inline.c (early_inliner): Likewise.
12371         * ipa-pure-const.c (warn_function_noreturn): Likewise.
12372         (warn_function_cold): Likewise.
12373         (propagate_pure_const): Likewise.
12374         * ipa-ref.h (enum GTY): Likewise.
12375         * ipa-split.c (find_retbnd): Likewise.
12376         (consider_split): Likewise.
12377         (split_function): Likewise.
12378         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
12379         * ipa.c (walk_polymorphic_call_targets): Likewise.
12380         (symbol_table::remove_unreachable_nodes): Likewise.
12381         (process_references): Likewise.
12382         (cgraph_build_static_cdtor_1): Likewise.
12383         * lto-cgraph.c (lto_output_node): Likewise.
12384         (output_refs): Likewise.
12385         (compute_ltrans_boundary): Likewise.
12386         (input_overwrite_node): Likewise.
12387         (input_node): Likewise.
12388         (input_cgraph_1): Likewise.
12389         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
12390         * passes.c (pass_manager::execute_early_local_passes): Likewise.
12391         (class pass_chkp_instrumentation_passes): Likewise.
12392         (make_pass_chkp_instrumentation_passes): Likewise.
12393         * passes.def: Likewise.
12394         * rtl.h (struct GTY): Likewise.
12395         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
12396         * stor-layout.c (layout_type): Likewise.
12397         * symtab.c: Likewise.
12398         * target.def: Likewise.
12399         * targhooks.c (default_chkp_bound_type): Likewise.
12400         (default_chkp_bound_mode): Likewise.
12401         (default_builtin_chkp_function): Likewise.
12402         (default_chkp_function_value_bounds): Likewise.
12403         (default_chkp_make_bounds_constant): Likewise.
12404         (default_chkp_initialize_bounds): Likewise.
12405         * targhooks.h (default_chkp_bound_type): Likewise.
12406         (default_chkp_bound_mode): Likewise.
12407         (default_builtin_chkp_function): Likewise.
12408         (default_chkp_function_value_bounds): Likewise.
12409         (default_chkp_make_bounds_constant): Likewise.
12410         (default_chkp_initialize_bounds): Likewise.
12411         * toplev.c (compile_file): Likewise.
12412         (process_options): Likewise.
12413         * tree-core.h (DEF_BUILTIN): Likewise.
12414         (DEF_BUILTIN_CHKP): Likewise.
12415         * tree-inline.c (declare_return_variable): Likewise.
12416         (remap_gimple_stmt): Likewise.
12417         (copy_bb): Likewise.
12418         (initialize_inlined_parameters): Likewise.
12419         (expand_call_inline): Likewise.
12420         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
12421         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
12422         (make_pass_ipa_chkp_produce_thunks): Likewise.
12423         (make_pass_chkp): Likewise.
12424         (make_pass_chkp_opt): Likewise.
12425         (make_pass_chkp_instrumentation_passes): Likewise.
12426         * tree-pretty-print.c (dump_generic_node): Likewise.
12427         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
12428         * tree-ssa-dce.c (propagate_necessity): Likewise.
12429         (eliminate_unnecessary_stmts): Likewise.
12430         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
12431         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
12432         * tree-ssa-sccvn.h: Likewise.
12433         * tree-ssa-strlen.c (get_string_length): Likewise.
12434         (valid_builtin_call): Likewise.
12435         (adjust_last_stmt): Likewise.
12436         (handle_builtin_strchr): Likewise.
12437         (handle_builtin_strcpy): Likewise.
12438         (handle_builtin_stxncpy): Likewise.
12439         (handle_builtin_memcpy): Likewise.
12440         (handle_builtin_strcat): Likewise.
12441         (strlen_check_and_optimize_stmt): Likewise.
12442         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
12443         * tree-streamer-in.c: Likewise.
12444         * tree-streamer.c (record_common_node): Likewise.
12445         * tree.c (tree_code_size): Likewise.
12446         (wide_int_to_tree_1): Likewise.
12447         (type_contains_placeholder_1): Likewise.
12448         (build_common_tree_nodes): Likewise.
12449         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
12450         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
12451         (POINTER_BOUNDS_P): Likewise.
12452         (BOUNDED_TYPE_P): Likewise.
12453         (BOUNDED_P): Likewise.
12454         (CALL_WITH_BOUNDS_P): Likewise.
12455         (pointer_bounds_type_node): Likewise.
12456         * value-prof.c (gimple_ic): Likewise.
12457         * var-tracking.c (vt_add_function_parameters): Likewise.
12458         * varasm.c (make_decl_rtl): Likewise.
12459         (assemble_start_function): Likewise.
12460         (output_constant): Likewise.
12461         (maybe_assemble_visibility): Likewise.
12462         * varpool.c (ctor_for_folding): Likewise.
12463         * chkp-builtins.def: Remove.
12464         * ipa-chkp.c: Remove.
12465         * ipa-chkp.h: Remove.
12466         * rtl-chkp.c: Remove.
12467         * rtl-chkp.h: Remove.
12468         * tree-chkp-opt.c: Remove.
12469         * tree-chkp.c: Remove.
12470         * tree-chkp.h: Remove.
12472 2018-06-07  Carl Love  <cel@us.ibm.com>
12474         * config/rs6000/vsx.md (vextract_fp_from_shorth,
12475         vextract_fp_from_shortl): Add BE support.
12477 2018-06-07  Paul Koning  <ni1d@arrl.net>
12479         * compare-elim.c (try_merge_compare): Don't merge compare if
12480         address contains a side effect.
12481         (try_eliminate_compare): Likewise.
12483 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
12485         * config.gcc: Support "tremont".
12486         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
12487         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12488         PROCESSOR_TREMONT.
12489         * config/i386/i386.c (m_TREMONT): Define.
12490         (processor_target_table): Add "tremont".
12491         (PTA_TREMONT): Define.
12492         (ix86_lea_outperforms): Add TARGET_TREMONT.
12493         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
12494         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
12495         and M_INTEL_GOLDMONT_PLUS.
12496         (fold_builtin_cpu): Add "tremont".
12497         (ix86_add_stmt_cost): Add TARGET_TREMONT.
12498         (ix86_option_override_internal): Add "tremont".
12499         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
12500         (processor_type): Add PROCESSOR_TREMONT.
12501         * config/i386/x86-tune.def: Add m_TREMONT.
12502         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
12504 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12506         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
12507         symbol defined for msp430i* devices to be lower case.
12509 2018-06-07  Richard Biener  <rguenther@suse.de>
12511         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
12512         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
12513         Properly wrap signed arithmetic if overflow wraps.
12515 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
12517         PR tree-optimization/69615
12518         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
12519         of a cast from a same precision integral SSA_NAME in a bb dominated
12520         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
12521         cast to utype if rhs2 has already a compatible type.
12523 2018-06-07  Richard Biener  <rguenther@suse.de>
12525         PR tree-optimization/85935
12526         * graphite-scop-detection.c (find_params_in_bb): Analyze
12527         condition operands with respect to the correct loop.  Assert
12528         the analysis doesn't fail.
12530 2018-06-04  Carl Love  <cel@us.ibm.com>
12532         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
12533         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
12534         as it is slightly cheaper.
12535         (first_match_or_eos_index_<mode>):
12536         Calculate index using natural element order.
12537         (first_match_index_<mode>):
12538         Calculate index using natural element order.
12539         (first_match_or_eos_index_<mode>):
12540         Calculate index using natural order.
12541         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
12542         for BE and LE modes.
12543         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
12544         P9V_BUILTIN_VCLZLSBB_V16QI.
12545         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
12546         specific.
12548 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12550         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
12551         indentation and line wrap for many prototypes.  Add missing
12552         @smallexample directives around block of prototypes for vec_xl and
12553         vec_xst.
12555 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
12557         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
12558         track if we pass or return IEEE 128-bit floating point.
12559         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
12560         C++ mangling that is compatible with GCC 8.1.
12561         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
12562         (init_cumulative_args): Note if we pass or return IEEE 128-bit
12563         floating point types.
12564         (rs6000_function_arg_advance_1): Likewise.
12565         (rs6000_mangle_type): Optionally generate mangled names that match
12566         what GCC 8.1 generated for IEEE 128-bit floating point types.
12567         (rs6000_globalize_decl_name): If we have an external function that
12568         passes or returns IEEE 128-bit types, generate a weak reference
12569         from the mangled name used in GCC 8.1 to the current mangled
12570         name.
12571         (rs6000_init_builtins): Make __ibm128 use the long double type if
12572         long double is IBM extended double.  Make __float128 use the long
12573         double type if long double is IEEE 128-bit.
12575         PR target/85657
12576         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
12577         macro for __ibm128 built-in functions.
12578         (PACK_IF): Add __ibm128 pack/unpack functions.
12579         (UNPACK_IF): Likewise.
12580         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
12581         enable long double built-in functions if long double is IEEE
12582         128-bit floating point.
12583         (rs6000_invalid_builtin): Update long double built-in function
12584         error message.
12585         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
12586         functions, adjust the built-in function to use the long double
12587         built-in function if __ibm128 and long double are the same type.
12588         * doc/extend.texi (PowerPC builtins): Update documention for
12589         __builtin_{,un}pack_longdouble.  Add documentation for
12590         __builtin_{,un}pack_ibm128.
12592 2018-06-06  Jim Wilson  <jimw@sifive.com>
12594         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
12595         (struct machine_function): New field interrupt_mode.
12596         (riscv_handle_type_attribute): New function.  Add forward declaration.
12597         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
12598         (riscv_expand_epilogue): Check interrupt_mode field.
12599         (riscv_set_current_function): Check interrupt attribute args and
12600         set interrupt_mode field.
12601         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
12602         (riscv_sret, riscv_uret): New.
12603         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
12604         new arguments to interrupt attribute.
12606 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
12608         PR target/63177
12609         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
12610         Don't handle -mcpu=power8 if -mpower9-vector is also used.
12612 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12614         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
12615         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
12616         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12617         several redundant entries.
12619 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
12621         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
12622         type from "rtx" to "rtx_insn *".
12623         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
12624         for local "call_insn", removing cast.
12625         (ix86_expand_call): Likewise, introducing a "call_insn" local.
12627 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12629         PR tree-optimization/86066
12630         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
12631         for BIT_INSERT_EXPR stores.
12633 2018-06-06  Richard Biener  <rguenther@suse.de>
12635         PR tree-optimization/86062
12636         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12637         component refs ontop
12638         of to be offsetted base.
12640 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12642         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
12643         to be static and remove check on interrupt attribute name.
12645 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12647         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
12648         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
12650 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
12652         PR target/79924
12653         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
12654         second argument.
12655         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
12656         Remove second argument, change how error is called.
12657         (aarch64_layout_arg): Remove second argument from
12658         aarch64_err_no_fpadvsimd call.
12659         (aarch64_init_cumulative_args): Ditto.
12660         (aarch64_gimplify_va_arg_expr): Ditto.
12661         * config/aarch64/aarch64.md (mov<mode>): Ditto.
12663 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
12665         * config/i386/i386.md (simple_return_indirect_internal): New expander.
12666         (*simple_return_indirect_internal<mode>): Rename from
12667         simple_return_indirect_internal.  Use W mode iterator.
12668         (rstorssp): New expander.
12669         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
12670         (clrssbsy): New expander.
12671         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
12673 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12675         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
12676         __typeof__.
12677         (cmse_check_pointed_object): Likewise.
12679 2018-06-05  Martin Liska  <mliska@suse.cz>
12681         PR gcov-profile/47618
12682         * doc/invoke.texi: Document how -fprofile-dir format
12683         is extended.
12685 2018-06-05  Richard Biener  <rguenther@suse.de>
12687         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
12688         removal pretend DOM info isn't available so we do not update
12689         it and only remove edges, not dominated blocks.  Actually free
12690         DOM info in case we removed something.  Remove unreachable blocks.
12691         (mfb_keep_latches): Work with either DOM info or marked backedges.
12692         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
12693         first.  Mark backedges if DOM info isn't available.
12694         (Re-)compute DOM info after cleanup_control_flow_pre.
12696 2018-06-05  Richard Biener  <rguenther@suse.de>
12698         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
12699         (locus_discrim_hasher::hash): Adjust.
12700         (locus_discrim_hasher::equal): Likewise.
12701         (next_discriminator_for_locus): Work on line directly.
12702         (same_line_p): Pass in expanded locus1 as well.
12703         (assign_discriminators): Avoid redundant location expansions.
12705 2018-06-05  Richard Biener  <rguenther@suse.de>
12707         PR tree-optimization/86046
12708         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
12709         if required after clearing TREE_ADDRESSABLE.
12711 2018-06-05  Richard Biener  <rguenther@suse.de>
12713         PR tree-optimization/86047
12714         * tree-ssa-loop.c (for_each_index): Glob handling of all
12715         decls and constants and really handle all of them.
12717 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12719         PR target/81497
12720         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
12721         qualifier_void_pointer and qualifier_const_void_pointer.
12722         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
12723         (arm_init_builtins): Handle the above.
12724         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
12725         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
12726         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
12727         void intrinsics.
12729 2018-06-05  Martin Liska  <mliska@suse.cz>
12731         * auto-profile.c (read_autofdo_file): Do not use
12732         gcov_ctr_summary struct.
12733         (afdo_callsite_hot_enough_for_early_inline): Likewise.
12734         * coverage.c (struct counts_entry): Likewise.
12735         (read_counts_file): Read just single summary entry.
12736         (get_coverage_counts): Use gcov_summary struct.
12737         * coverage.h (get_coverage_counts): Likewise.
12738         * gcov-dump.c (dump_working_sets): Likewise.
12739         (tag_summary): Dump just single summary.
12740         * gcov-io.c (gcov_write_summary): Write just histogram
12741         summary.
12742         (gcov_read_summary): Read just single summary.
12743         (compute_working_sets): Use gcov_summary struct.
12744         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
12745         of GCOV_COUNTERS_SUMMABLE.
12746         (GCOV_COUNTERS_SUMMABLE): Remove.
12747         (GCOV_FIRST_VALUE_COUNTER): Replace with
12748         GCOV_COUNTER_V_INTERVAL.
12749         (struct gcov_ctr_summary): Remove.
12750         (struct gcov_summary): Directly use fields of former
12751         gcov_ctr_summary.
12752         (compute_working_sets): Use gcov_summary struct.
12753         * gcov.c (read_count_file): Do not use ctrs fields.
12754         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
12755         struct.
12756         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
12757         struct.
12758         * profile.c: Likewise.
12759         * profile.h: Likewise.
12761 2018-06-05  Martin Liska  <mliska@suse.cz>
12763         PR gcov-profile/84846
12764         * gcov.c (output_lines): Print working directory only
12765         in intermediate format.
12767 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
12769         * config/s390/s390-builtin-types.def: Add void function type.
12770         * config/s390/s390-builtins.def: Use the function type for the
12771         tbeginc builtin.
12773 2018-06-04  Jim Wilson  <jimw@sifive.com>
12775         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
12776         to int.
12777         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
12778         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
12779         handle EH_RETURN_DATA_REGNO registers properly.
12780         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
12781         (riscv_expand_epilogue): Update comment.  Change argument name and
12782         type.  Update code to use new name and type.  Pass new args to
12783         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
12784         EXCEPTION_RETURN.
12785         * config/riscv/riscv.md (NORMAL_RETURN): New.
12786         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
12787         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
12788         (eh_return): Call gen_eh_return_internal and emit barrier.
12789         (eh_return_internal): Call riscv_expand_epilogue.
12791 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
12793         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
12794         bit_insertion field and declare can_be_merged_into method.
12795         (merged_store_group::can_be_merged_into): New method.
12796         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
12797         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
12798         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
12800 2018-06-04  Richard Biener  <rguenther@suse.de>
12802         PR tree-optimization/85955
12803         * builtins.c (fold_builtin_sincos): Convert pointers to
12804         destination to appropriate type before dereferencing.
12806 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
12808         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
12810 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
12812         * expr.c (expand_expr_real_1): Force the operand into memory if
12813         its TYPE_MODE is BLKmode and if there is no integer mode for
12814         the number of bits being extracted.
12816 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
12818         PR target/85832
12819         PR target/86036
12820         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12821         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
12823 2018-06-04  Richard Biener  <rguenther@suse.de>
12825         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
12826         (cleanup_tree_cfg_noloop): ... single caller.  Do
12827         start_recording_case_labels later.
12829 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
12831         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
12832         to _IMMINTRIN_H_INCLUDED.
12833         * config/i386/pconfigintrin.h: Ditto.
12834         * config/i386/waitpkgintrin.h: Ditto.
12835         * config/i386/immintrin.h: Add includes for sgxintrin.h,
12836         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
12837         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
12838         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
12839         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
12840         waitpkgintrin.h and cldemoteintrin.h.
12842 2018-06-04  Richard Biener  <rguenther@suse.de>
12844         PR tree-optimization/86038
12845         * tracer.c (find_best_successor): Check probability for
12846         being initialized, bail out if not.
12848 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
12850         PR target/86003
12851         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
12852         of bits to ignore when comparing architectures.
12854 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
12856         PR tree-optimization/69615
12857         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
12858         maximum or minimum of the type, try to merge it also as if
12859         range1 is + [-, x - 1] or + [x + 1, -].
12861         PR c++/86025
12862         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
12864 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
12866         PR tree-optimization/86034
12867         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
12868         the unsigned bitfield type in a bit insertion sequence if it does not
12869         have a larger precision than the bitfield size.
12870         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
12872 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
12874         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
12876 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
12878         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
12879         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
12880         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
12881         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
12883 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
12885         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
12886         Disable -fdelete-null-pointer-checks for ELF toolchain.
12888 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
12889             Kito Cheng  <kito.cheng@gmail.com>
12891         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
12892         (nds32le-*-*, nds32be-*-*): Integrate checking process.
12893         (nds32*-*-*): Add glibc and uclibc conditions.
12894         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
12895         (TARGET_EXCEPT_UNWIND_INFO): Define.
12896         * config/nds32/elf.h: New file.
12897         * config/nds32/linux.h: New file.
12898         * config/nds32/nds32-elf.opt: New file.
12899         * config/nds32/nds32-linux.opt: New file.
12900         * config/nds32/nds32-fp-as-gp.c
12901         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
12902         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
12903         TARGET_LINUX_ABI.
12904         (nds32_asm_file_end): Ditto.
12905         (nds32_print_operand): Ditto.
12906         (nds32_insert_attributes): Ditto.
12907         (nds32_init_libfuncs): New function.
12908         (TARGET_HAVE_TLS): Define.
12909         (TARGET_INIT_LIBFUNCS): Define.
12910         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
12911         spec content.
12912         (TARGET_ELF): Apply different mcmodel setting.
12913         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
12914         been migrated into elf.h and linux.h files.
12915         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
12916         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
12917         (mcmodel): The content has been migrated into nds32-elf.opt and
12918         nds32-linux.opt files.
12919         * config/nds32/t-elf: New file.
12920         * config/nds32/t-linux: New file.
12922 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
12923             Shiva Chen  <shiva0217@gmail.com>
12925         * config/nds32/constants.md (unspec_volatile_element): Add
12926         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
12927         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
12928         optimization.
12929         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
12930         (make_pass_nds32_fp_as_gp): Declare.
12931         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
12932         optmization pass.
12933         (nds32_asm_function_end_prologue): Remove unused asm output.
12934         (nds32_asm_function_begin_epilogue): Remove unused asm output.
12935         (nds32_asm_file_start): Output necessary fp_as_gp information.
12936         (nds32_option_override): Adjust register usage.
12937         (nds32_expand_prologue): Consider fp_as_gp situation.
12938         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
12939         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
12940         (epilogue): Ditto.
12941         (return): Ditto.
12942         (simple_return): Ditto.
12943         (omit_fp_begin): Output special directive for fp_as_gp.
12944         (omit_fp_end): Output special directive for fp_as_gp.
12945         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
12946         mforbid-fp-as-gp): New options.
12948 2018-06-01  Mark Wielaard  <mark@klomp.org>
12950         * dwarf2out.c (dwarf2out_finish): Remove generation of
12951         DW_AT_loclists_base.
12953 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
12955         * gimple-ssa-store-merging.c: Include gimple-fold.h.
12956         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
12957         (struct merged_store_group): Add bit_insertion field.
12958         (dump_char_array): Use standard hexadecimal format.
12959         (merged_store_group::merged_store_group): Set bit_insertion to false.
12960         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
12961         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
12962         also print the mask in the dump file.
12963         (pass_store_merging::gate): Minor tweak.
12964         (imm_store_chain_info::coalesce_immediate): Fix wrong association
12965         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
12966         stores with INTEGER_CST stores.
12967         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
12968         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
12969         and use it throughout.  Generate bit insertion sequences if need be.
12970         (pass_store_merging::process_store): Remove redundant condition.
12971         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
12973 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
12975         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
12976         the 128-bit floating point types.  Fix function comment.
12978 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12980         * config/aarch64/aarch64-simd.md
12981         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
12982         mnemonics.
12983         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
12984         mnemonics.
12986 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
12988         PR tree-optimization/85989
12989         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
12990         variable.
12991         (backprop::intersect_uses): Check it when deciding whether this
12992         is a backedge reference.
12993         (backprop::process_block): Add each phi to m_visited_phis
12994         after visiting it, then clear it at the end.
12996 2018-06-01  Richard Biener  <rguenther@suse.de>
12998         * tree-vectorizer.h (vect_dr_stmt): New function.
12999         (vect_get_load_cost): Adjust.
13000         (vect_get_store_cost): Likewise.
13001         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
13002         Use vect_dr_stmt instead of DR_SMTT.
13003         (vect_record_base_alignments): Likewise.
13004         (vect_calculate_target_alignment): Likewise.
13005         (vect_compute_data_ref_alignment): Likewise and make static.
13006         (vect_update_misalignment_for_peel): Likewise.
13007         (vect_verify_datarefs_alignment): Likewise.
13008         (vector_alignment_reachable_p): Likewise.
13009         (vect_get_data_access_cost): Likewise.  Pass down
13010         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
13011         (vect_get_peeling_costs_all_drs): Likewise.
13012         (vect_peeling_hash_get_lowest_cost): Likewise.
13013         (vect_enhance_data_refs_alignment): Likewise.
13014         (vect_find_same_alignment_drs): Likewise.
13015         (vect_analyze_data_refs_alignment): Likewise.
13016         (vect_analyze_group_access_1): Likewise.
13017         (vect_analyze_group_access): Likewise.
13018         (vect_analyze_data_ref_access): Likewise.
13019         (vect_analyze_data_ref_accesses): Likewise.
13020         (vect_vfa_segment_size): Likewise.
13021         (vect_small_gap_p): Likewise.
13022         (vectorizable_with_step_bound_p): Likewise.
13023         (vect_prune_runtime_alias_test_list): Likewise.
13024         (vect_analyze_data_refs): Likewise.
13025         (vect_supportable_dr_alignment): Likewise.
13026         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13027         (vect_gen_prolog_loop_niters): Likewise.
13028         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13029         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
13030         modify DR_STMT.
13031         (vect_recog_mask_conversion_pattern): Likewise.
13032         (vect_try_gather_scatter_pattern): Likewise.
13033         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
13034         to vect_get_store_cost.
13035         (vect_get_store_cost): Get stmt_info instead of DR.
13036         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
13037         (vect_get_load_cost): Get stmt_info instead of DR.
13039 2018-06-01  Richard Biener  <rguenther@suse.de>
13041         PR middle-end/86017
13042         * gimple-fold.c (var_decl_component_p): Also allow offsetted
13043         vars wrapped in MEM_REFs.
13045 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
13047         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13048         Fix subreg tests so that we only return a choice between
13049         GENERAL_REGS and FP_REGS if the original classes included both.
13051 2018-06-01  Richard Biener  <rguenther@suse.de>
13053         PR ipa/85960
13054         * tree-ssa-structalias.c (get_function_part_constraint):
13055         Handle NULL fi->decl.
13056         (find_func_aliases_for_call): Properly handle indirect
13057         fi from direct call.
13058         (find_func_clobbers): Likewise.
13059         (ipa_pta_execute): Likewise.
13060         (create_variable_info_for): For functions that are ifunc_resolver
13061         resolve to a varinfo that contains the result of the resolver call.
13062         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
13063         aliases.
13065 2018-05-31  Michael Collison  <michael.collison@arm.com>
13067         * config/aarch64/aarch64.md:
13068         (*fix_to_zero_extenddfdi2): New pattern.
13069         * gcc.target/aarch64/fix_extend1.c: New testcase.
13071 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
13073         PR middle-end/78809
13074         PR middle-end/83026
13075         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
13076         and BUILT_IN_STRNCMP_EQ.
13077         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
13078         BUILT_IN_STRNCMP_EQ.
13079         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
13080         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13081         (gimple_fold_builtin): Likewise.
13082         * tree-ssa-strlen.c (compute_string_length): New function.
13083         (determine_min_obsize): New function.
13084         (handle_builtin_string_cmp): New function to handle calls to
13085         string compare functions.
13086         (strlen_optimize_stmt): Add handling to builtin string compare
13087         calls.
13088         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
13089         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13090         * tree.c (build_common_builtin_nodes): Add new defines of
13091         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
13093 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
13095         PR target/85984
13096         * bb-reorder.c (pass_partition_blocks::gate): Return false for
13097         functions with naked attribute.
13099 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
13101         * config/i386/sse.md (avx_vec_concat<mode>):
13102         Substitute concat_tg_mode mode attribute with xtg_mode.
13103         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
13104         (concat_tg_mode): Remove mode attribute.
13106 2018-05-31  Martin Sebor  <msebor@redhat.com>
13108         PR c/82063
13109         * calls.c (alloc_max_size): Correct a logic error/typo.
13110         Treat excessive arguments as infinite.  Warn for invalid arguments.
13111         * doc/invoke.texi (-Walloc-size-larger-than): Update.
13113 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
13115         PR target/85829
13116         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
13117         and movx for Haswell.
13119 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
13120             Cesar Philippidis  <cesar@codesourcery.com>
13122         PR middle-end/85879
13123         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
13124         when emitting error on private/firstprivate reductions.
13125         * omp-low.c (lower_omp_target): Avoid reference-type processing
13126         on pointers for firstprivate clause.
13128 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
13130         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
13131         (st1x2): Likewise.
13132         (st1x3): Likewise.
13133         * config/aarch64/aarch64-simd.md
13134         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
13135         (aarch64_ld1_x3_<mode>): Likewise
13136         (aarch64_st1x2<VALLDIF:mode>): Likewise
13137         (aarch64_st1_x2_<mode>): Likewise
13138         (aarch64_st1x3<VALLDIF:mode>): Likewise
13139         (aarch64_st1_x3_<mode>): Likewise
13140         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
13141         (vld1_s8_x3): Likewise.
13142         (vld1_u16_x3): Likewise.
13143         (vld1_s16_x3): Likewise.
13144         (vld1_u32_x3): Likewise.
13145         (vld1_s32_x3): Likewise.
13146         (vld1_u64_x3): Likewise.
13147         (vld1_s64_x3): Likewise.
13148         (vld1_f16_x3): Likewise.
13149         (vld1_f32_x3): Likewise.
13150         (vld1_f64_x3): Likewise.
13151         (vld1_p8_x3): Likewise.
13152         (vld1_p16_x3): Likewise.
13153         (vld1_p64_x3): Likewise.
13154         (vld1q_u8_x3): Likewise.
13155         (vld1q_s8_x3): Likewise.
13156         (vld1q_u16_x3): Likewise.
13157         (vld1q_s16_x3): Likewise.
13158         (vld1q_u32_x3): Likewise.
13159         (vld1q_s32_x3): Likewise.
13160         (vld1q_u64_x3): Likewise.
13161         (vld1q_s64_x3): Likewise.
13162         (vld1q_f16_x3): Likewise.
13163         (vld1q_f32_x3): Likewise.
13164         (vld1q_f64_x3): Likewise.
13165         (vld1q_p8_x3): Likewise.
13166         (vld1q_p16_x3): Likewise.
13167         (vld1q_p64_x3): Likewise.
13168         (vst1_s64_x2): Likewise.
13169         (vst1_u64_x2): Likewise.
13170         (vst1_f64_x2): Likewise.
13171         (vst1_s8_x2): Likewise.
13172         (vst1_p8_x2): Likewise.
13173         (vst1_s16_x2): Likewise.
13174         (vst1_p16_x2): Likewise.
13175         (vst1_s32_x2): Likewise.
13176         (vst1_u8_x2): Likewise.
13177         (vst1_u16_x2): Likewise.
13178         (vst1_u32_x2): Likewise.
13179         (vst1_f16_x2): Likewise.
13180         (vst1_f32_x2): Likewise.
13181         (vst1_p64_x2): Likewise.
13182         (vst1q_s8_x2): Likewise.
13183         (vst1q_p8_x2): Likewise.
13184         (vst1q_s16_x2): Likewise.
13185         (vst1q_p16_x2): Likewise.
13186         (vst1q_s32_x2): Likewise.
13187         (vst1q_s64_x2): Likewise.
13188         (vst1q_u8_x2): Likewise.
13189         (vst1q_u16_x2): Likewise.
13190         (vst1q_u32_x2): Likewise.
13191         (vst1q_u64_x2): Likewise.
13192         (vst1q_f16_x2): Likewise.
13193         (vst1q_f32_x2): Likewise.
13194         (vst1q_f64_x2): Likewise.
13195         (vst1q_p64_x2): Likewise.
13196         (vst1_s64_x3): Likewise.
13197         (vst1_u64_x3): Likewise.
13198         (vst1_f64_x3): Likewise.
13199         (vst1_s8_x3): Likewise.
13200         (vst1_p8_x3): Likewise.
13201         (vst1_s16_x3): Likewise.
13202         (vst1_p16_x3): Likewise.
13203         (vst1_s32_x3): Likewise.
13204         (vst1_u8_x3): Likewise.
13205         (vst1_u16_x3): Likewise.
13206         (vst1_u32_x3): Likewise.
13207         (vst1_f16_x3): Likewise.
13208         (vst1_f32_x3): Likewise.
13209         (vst1_p64_x3): Likewise.
13210         (vst1q_s8_x3): Likewise.
13211         (vst1q_p8_x3): Likewise.
13212         (vst1q_s16_x3): Likewise.
13213         (vst1q_p16_x3): Likewise.
13214         (vst1q_s32_x3): Likewise.
13215         (vst1q_s64_x3): Likewise.
13216         (vst1q_u8_x3): Likewise.
13217         (vst1q_u16_x3): Likewise.
13218         (vst1q_u32_x3): Likewise.
13219         (vst1q_u64_x3): Likewise.
13220         (vst1q_f16_x3): Likewise.
13221         (vst1q_f32_x3): Likewise.
13222         (vst1q_f64_x3): Likewise.
13223         (vst1q_p64_x3): Likewise.
13225 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13227         * config/msp430/msp430.c (msp430_output_labelref): Prepend
13228         user_label_prefix to name.
13230         * tree-core.h: Update comment about the format of NAME string
13231         passed to handler in attribute_spec.
13233         * config/msp430/msp430.md: Remove erroneous subreg expression from
13234         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
13235         zero_extend{q,h}isi2.
13237 2018-05-30  Borislav Petkov  <bp@suse.de>
13239         * doc/extend.texi: Document some architecture specific
13240         constraints and sort entries.
13242 2018-05-30  Martin Sebor  <msebor@redhat.com>
13244         PR middle-end/85369
13245         * builtins.c (expand_builtin_stpcpy_1): New function.
13246         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
13247         only if the former succeeds.
13249 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
13251         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
13252         in saphira.
13254 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13256         * doc/invoke.texi (-flinker-output): Document
13258 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13260         * passes.c (ipa_write_summaries): Only modify statements if body
13261         is in memory.
13262         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
13263         incrementally linking.
13264         (ipa_passes): Likewise.
13265         * lto-cgraph.c (lto_output_node): When incrementally linking do not
13266         pass down resolution info.
13267         * common.opt (flag_incremental_link): Update info.
13268         * gcc.c (plugin specs): Turn flinker-output=* to
13269         -plugin-opt=-linker-output-known
13270         * toplev.c (compile_file): Also cut compilation when doing incremental
13271         link.
13272         * flag-types. (enum lto_partition_model): Add
13273         LTO_LINKER_OUTPUT_NOLTOREL.
13274         (invoke.texi): Add -flinker-output docs.
13275         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
13276         link same way as WPA; do not stream in dead initializers.
13278         * dwarf2out.c (dwarf2out_die_ref_for_decl,
13279         darf2out_register_external_decl): Support incremental link.
13281 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13283         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
13285 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13287         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
13288         it down to simple_object_copy_lto_debug_sections.
13289         (run_gcc): Determine incremental LTO link time and configure
13290         lto1 into non-wpa mode, disable renaming of debug sections.
13292 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13294         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13295         descriptions of various incorrectly documented functions.
13297 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13299         Revert:
13300         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13301         address check not strict.
13303 2018-05-30  Richard Biener  <rguenther@suse.de>
13305         PR tree-optimization/85964
13306         * tracer.c (better_p): Drop initialized count check, we only
13307         call the function with initialized counts now.
13308         (find_best_successor): Do find a best edge if one
13309         has uninitialized count.
13310         (find_best_predecessor): Likewise.  Do BB frequency check only
13311         if count is initialized.
13313 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
13315         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
13316         (aarch64_ldrstr_offset_compare): New.
13317         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
13318         load/store orderings.
13319         (aarch64_gen_adjusted_ldpstp): Likewise.
13321 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
13323         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13324         Check for subset of GENERAL_REGS and FP_REGS.
13325         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
13326         r=w alternative.
13328 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
13330         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
13331         and wi::to_poly_offset.  Add the current offset and then check
13332         whether the sum fits, rather than using an unchecked addition of
13333         a checked term.  Check for a shwi rather than a uhwi.
13334         * expr.c (get_bit_range): Use tree_to_poly_uint64.
13335         (store_constructor): Use poly_int_tree_p.
13336         (expand_expr_real_1): Likewise.
13337         * function.c (assign_temp): Likewise.
13338         * fold-const.c (const_binop): Use poly_int_tree_p and
13339         wi::to_poly_offset.
13340         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
13341         division.
13342         * ipa-icf-gimple.c (func_checker::compare_operand): Use
13343         to_poly_offset for MEM offsets.
13344         * ipa-icf.c (sem_variable::equals): Likewise.
13345         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
13346         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
13347         wi::to_poly_offset for BIT_FIELD_REF offsets.
13348         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
13349         wi::to_poly_offset.
13350         * var-tracking.c (emit_note_insn_var_location): Use
13351         tree_to_poly_uint64.
13353 2018-05-29  Jim Wilson  <jimw@sifive.com>
13355         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
13357 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
13359         PR target/85950
13360         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
13361         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
13362         sequence.
13363         (sse4_1_round<mode>2): Use nonimmediate_operand
13364         for operand 1 predicate.
13366 2018-05-29  Martin Sebor  <msebor@redhat.com>
13367             Richard Biener  <rguenther@suse.de>
13369         PR testsuite/85888
13370         * calls.c (get_size_range): Call determine_value_range instead
13371         of get_value_range..
13372         * tree-vrp.h (determine_value_range): Declared new function.
13373         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
13375 2018-05-29  Richard Biener  <rguenther@suse.de>
13377         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
13378         sure to use non-pattern stmts for get_earlier_stmt arguments.
13379         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
13380         called on pattern stmts.
13381         (get_later_stmt): Likewise.
13383 2018-05-29  Martin Liska  <mliska@suse.cz>
13385         PR gcov-profile/85759
13386         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
13387         env variables.
13389 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
13391         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
13392         VEC_UNPACK_*_EXPR.
13393         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
13394         VEC_PACK_*_EXPR.
13396         PR target/85918
13397         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13398         VEC_PACK_FLOAT_EXPR): New tree codes.
13399         * tree-pretty-print.c (op_code_prio): Handle
13400         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13401         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13402         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13403         * tree-inline.c (estimate_operator_cost): Likewise.
13404         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
13405         * fold-const.c (const_binop): Likewise.
13406         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
13407         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13408         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13409         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
13410         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13411         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13412         * expr.c (expand_expr_real_2): Likewise.
13413         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
13414         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
13415         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
13416         optabs.
13417         * optabs.c (expand_widen_pattern_expr): For
13418         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
13419         sign from result type rather than operand's type.
13420         (expand_binop_directly): For vec_packu_float_optab and
13421         vec_packs_float_optab allow result type to be different from operand's
13422         type.
13423         * optabs-tree.c (optab_for_tree_code): Handle
13424         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13425         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
13426         * tree-vect-generic.c (expand_vector_operations_1):  Handle
13427         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13428         VEC_PACK_FLOAT_EXPR.
13429         * tree-vect-stmts.c (supportable_widening_operation): Handle
13430         FIX_TRUNC_EXPR.
13431         (supportable_narrowing_operation): Handle FLOAT_EXPR.
13432         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
13433         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
13434         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
13435         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
13436         mode attributes.
13437         (vec_pack<floatprefix>_float_<mode>): New expander.
13438         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
13439         attributes.
13440         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
13441         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
13442         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
13443         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
13444         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
13445         Document.
13446         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
13447         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
13448         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13449         VEC_PACK_FLOAT_EXPR): Document.
13451 2018-05-29  Richard Biener  <rguenther@suse.de>
13453         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
13454         member.
13455         (stmt_vec_info_vec): Make pointer.
13456         (init_stmt_vec_info_vec): Remove.
13457         (free_stmt_vec_info_vec): Likewise.
13458         (set_stmt_vec_info_vec): New function.
13459         (free_stmt_vec_infos): Likewise.
13460         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
13461         (set_vinfo_for_stmt): Likewise.
13462         (get_earlier_stmt): Likewise.
13463         (get_later_stmt): Likewise.
13464         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
13465         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
13466         (vec_info::~vec_info): Free stmt_vec_infos.
13467         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
13468         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
13469         (pass_slp_vectorize::execute): Likewise.
13470         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
13471         (free_stmt_vec_info_vec): Likewise.
13472         (set_stmt_vec_info_vec): New function.
13473         (free_stmt_vec_infos): Likewise.
13474         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
13475         the global stmt_vec_info_vec.
13476         * tree-parloops.c (gather_scalar_reductions): Use
13477         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
13478         vector.
13480 2018-05-29  Richard Biener  <rguenther@suse.de>
13482         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
13484 2018-05-29  Martin Liska  <mliska@suse.cz>
13485             David Malcolm  <dmalcolm@redhat.com>
13487         * vec.c (test_reverse): New.
13488         (vec_c_tests): Add new test.
13489         * vec.h (vl_ptr>::reverse): New function.
13491 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
13493         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
13495         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
13496         and later.
13498 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13500         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
13502 2018-05-28  Richard Biener  <rguenther@suse.de>
13504         PR tree-optimization/85933
13505         * tree-vect-data-refs.c (vect_record_base_alignments): Only
13506         look at stmts marked as vectorizable.
13508 2018-05-28  Richard Biener  <rguenther@suse.de>
13510         PR tree-optimization/85934
13511         * tree-vect-generic.c (expand_vector_operations_1): Hoist
13512         vector boolean check before scalar optimization.
13514 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
13516         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
13517         for armv5te.
13519 2018-05-28  Mark Wielaard  <mark@klomp.org>
13521         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
13522         if it is an expression containing a minus sign.
13524 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
13526         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
13528 2018-05-27  Paul Koning  <ni1d@arrl.net>
13530         * config/pdp11/pdp11.md (truncsihi2): Remove.
13532 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
13533             Chung-Ju Wu  <jasonwucj@gmail.com>
13535         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
13536         implementation.
13537         (unaligned_store_dw): Ditto.
13538         * config/nds32/nds32-memory-manipulation.c
13539         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
13540         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
13541         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
13542         (emit_setmem_word_loop): Rename to ...
13543         (emit_setmem_doubleword_loop): ... this.
13544         (nds32_gen_dup_4_byte_to_word_value): New function.
13545         (nds32_gen_dup_8_byte_to_double_word_value): New function.
13546         (nds32_expand_setmem_loop): Refine implementation.
13547         (nds32_expand_setmem_loop_v3m): Ditto.
13548         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
13549         pattern.
13551 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13553         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
13555 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13557         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
13558         (nds32_init_machine_status): Initialize machine->attr_naked_p and
13559         machine->attr_no_prologue_p.
13560         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
13561         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
13562         (nds32_expand_epilogue): Consider attr_naked_p.
13563         (nds32_expand_epilogue_v3pop): Likewise.
13564         (nds32_can_use_return_insn): Likewise.
13565         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
13566         attr_no_prologue_p fields.
13567         * config/nds32/nds32.opt (mret-in-naked-func): New option.
13569 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
13571         PR target/85918
13572         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
13573         attributes.
13574         * config/i386/sse.md
13575         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
13576         Rename to ...
13577         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
13578         ... this.
13579         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
13580         Rename to ...
13581         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
13582         ... this.
13583         (*<floatsuffix>floatv2div2sf2): Rename to ...
13584         (*float<floatunssuffix>v2div2sf2): ... this.
13585         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
13586         (float<floatunssuffix>v2div2sf2_mask): ... this.
13587         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
13588         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
13589         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
13590         to ...
13591         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
13592         ... this.
13593         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13594         Rename to ...
13595         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13596         ... this.
13597         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13598         Rename to ...
13599         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13600         ... this.
13601         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
13602         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
13603         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
13604         gen_ufix_truncv8dfv8si2.
13605         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
13606         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
13607         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
13608         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
13609         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
13610         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
13611         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
13612         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
13614 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
13616         PR target/85900
13617         PR target/85345
13618         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
13620 2018-05-25  Jim Wilson  <jimw@sifive.com>
13622         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
13623         * config/riscv/riscv.c (struct machine_function): Add
13624         interrupt_handler_p and attribute_checked_p fields.
13625         (riscv_attribute_table): Add interrupt.
13626         (riscv_interrupt_type_p): New.
13627         (riscv_save_reg_p): Save extra regs for interrupt handler.
13628         (riscv_use_save_libcall): Return false  for interrupt handler.
13629         (riscv_first_stack_step): Add forward declaration.
13630         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
13631         for interrupt handler with large frame.  Use it for saved reg list.
13632         (riscv_expand_prologue): Move flag_stack_usage_info support to
13633         eliminate duplication.
13634         (riscv_expand_epilogue): Generate mret for interrupt handler.
13635         (riscv_epilogue_uses): New.
13636         (riscv_can_use_return_insn): Return false for interrupt handler.
13637         (riscv_function_ok_for_sibcall): Likewise.
13638         (riscv_set_current_function): Add interrupt handler support.
13639         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
13640         * config/riscv/riscv.md (UNSPECV_MRET): New.
13641         (GP_REGNUM): New.
13642         (riscv_frflags, riscv_fsflags): Use tab after opcode.
13643         (riscv_mret): New.
13644         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
13646 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
13648         PR tree-optimization/85712
13649         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
13650         this candidate has already been replaced in-situ by a copy.
13652 2018-05-25  Jason Merrill  <jason@redhat.com>
13654         PR c++/80485 - inline function non-zero address.
13655         * symtab.c (nonzero_address): Check DECL_COMDAT.
13657 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
13659         PR target/83628
13660         * config/alpha/alpha.md (ashlsi3): New insn pattern.
13661         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
13662         extension of SImode operation.  Use const123_operand predicate.
13663         (*saddsi_1): Remove.
13664         (*saddl_se_1): Ditto.
13665         (*ssubsi_1): Ditto.
13666         (*ssubl_se_1): Ditto.
13667         * config/alpha/predicates.md (const123_operand): New predicate.
13668         * config/alpha/constraints.md (P): Use IN_RANGE.
13670 2018-05-25  Richard Biener  <rguenther@suse.de>
13672         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
13673         defaulted to true.
13674         (ref_maybe_used_by_stmt_p): Likewise.
13675         (stmt_may_clobber_ref_p): Likewise.
13676         (stmt_may_clobber_ref_p_1): Likewise.
13677         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
13678         and pass it along.
13679         (ref_maybe_used_by_stmt_p): Likewise.
13680         (stmt_may_clobber_ref_p): Likewise.
13681         (stmt_may_clobber_ref_p_1): Likewise.
13682         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
13683         the alias oracle to disambiguate DRs with stmts DR analysis
13684         couldn't handle.
13685         (vect_analyze_data_refs): Do not give up on not analyzable
13686         DRs for BB vectorization.  Remove code truncating the dataref
13687         vector.
13689 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
13691         PR target/85832
13692         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13693         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
13694         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
13696 2018-05-25  Richard Biener  <rguenther@suse.de>
13698         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
13699         function, combining stmt data ref gathering and fatal analysis
13700         parts.
13701         (vect_analyze_data_refs): Remove now redudnant code and simplify.
13702         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
13703         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
13704         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
13705         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
13707 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
13709         PR tree-optimization/85720
13710         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
13711         SCC if all partitions are builtins.
13712         (version_loop_by_alias_check): New parameter.  Generate cancelable
13713         runtime alias check if all partitions are builtins.
13714         (distribute_loop): Update call to above function.
13716 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
13718         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
13719         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
13720         (parm_default_def_partition_arg): Ditto.
13721         (set_parm_default_def_partition): Ditto.
13722         (get_parm_default_def_partitions): Ditto and make it static.
13723         (get_undefined_value_partitions): Ditto and make it static.
13724         (remove_ssa_form): Refactor call to init_var_map here.
13725         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
13726         computation for loop region.
13727         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
13728         (register_default_def): Delete.
13729         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
13730         (parm_default_def_partition_arg): Ditto.
13731         (set_parm_default_def_partition): Ditto.
13732         (get_parm_default_def_partitions): Ditto and make it static.
13733         (get_undefined_value_partitions): Ditto and make it static.
13734         (coalesce_with_default, coalesce_with_default): Update comment.
13735         (create_coalesce_list_for_region): New func factored out from
13736         create_outofssa_var_map.
13737         (populate_coalesce_list_for_outofssa): New func factored out from
13738         create_outofssa_var_map and coalesce_ssa_name.
13739         (create_outofssa_var_map): Delete.
13740         (coalesce_ssa_name): Refactor to support live range computation.
13741         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
13742         (get_parm_default_def_partitions): Delete.
13743         (get_undefined_value_partitions): Ditto.
13744         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
13745         computation for loop region.
13746         (new_tree_live_info, loe_visit_block): Ditto.
13747         (live_worklist, set_var_live_on_entry): Ditto.
13748         (calculate_live_on_exit, verify_live_on_entry): Ditto.
13749         * tree-ssa-live.h (struct _var_map): New fields.
13750         (init_var_map): Change decl.
13751         (region_contains_p): New.
13753 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
13755         * tree-ssa-live.h (live_merge_and_clear): Delete.
13757 2018-05-25  Richard Biener  <rguenther@suse.de>
13759         PR c++/85912
13760         * tree-dump.c (dequeue_and_dump): Remove access to removed
13761         operand 2 of a SWITCH_EXPR.
13763 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13765         * doc/sourcebuild.texi (vect_double_cond_arith): Include
13766         multiplication and division.
13767         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
13768         (cond_udiv@var{m}, cond_umod@var{m}): Document.
13769         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
13770         (cond_udiv_optab, cond_umod_optab): New optabs.
13771         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
13772         (IFN_COND_RDIV): New internal functions.
13773         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
13774         TRUNC_MOD_EXPR and RDIV_EXPR.
13775         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
13776         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
13777         New unspecs.
13778         (SVE_INT_BINARY): Include mult.
13779         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
13780         (optab, sve_int_op): Handle mult.
13781         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
13782         UNSPEC_COND_DIV.
13783         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
13784         for SVE_INT_BINARY_SD.
13786 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13788         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
13789         (optab, sve_int_op): Handle div and udiv.
13790         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
13791         for SVE_INT_BINARY_SD.
13792         (*<optab><mode>3): New insn for the same.
13794 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13796         * tree-vect-patterns.c: Include predict.h.
13797         (vect_recog_divmod_pattern): Restrict check for division support
13798         to when optimizing for size.
13800 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13802         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
13803         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
13804         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
13805         (gimple_match_op::set_op): Likewise.
13806         (gimple_resimplify4): Declare.
13807         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
13808         (expr::gen_transform): Likewise.
13809         (decision_tree::gen): Generate a simplification routine for 4 operands.
13810         * gimple-match-head.c (gimple_simplify): Add an overload for
13811         4 operands.  In the top-level function, handle up to 4 call
13812         arguments and call gimple_resimplify4.
13813         (gimple_resimplify4): New function.
13814         (build_call_internal): Pass a fourth operand.
13815         (maybe_push_to_seq): Likewise.
13816         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
13817         Fold VEC_COND_EXPRs of an operation and a default value into
13818         an IFN_COND_* function if possible.
13819         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
13820         New unspecs.
13821         (SVE_COND_FP_BINARY): Include them.
13822         (optab, sve_fp_op): Handle them.
13823         (SVE_INT_BINARY_REV): New code iterator.
13824         (SVE_COND_FP_BINARY_REV): New int iterator.
13825         (commutative): New int attribute.
13826         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
13827         Declare.
13828         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
13829         function.
13830         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
13831         (*cond_<optab><mode>): New patterns for reversed operands.
13833 2018-05-25  Richard Biener  <rguenther@suse.de>
13835         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
13836         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
13837         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
13838         (STMT_VINFO_GROUPED_ACCESS): Adjust.
13839         * tree-vect-data-refs.c (everywhere): Adjust users.
13840         * tree-vect-loop.c (everywhere): Likewise.
13841         * tree-vect-slp.c (everywhere): Likewise.
13842         * tree-vect-stmts.c (everywhere): Likewise.
13843         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
13845 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13847         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
13848         Rename to...
13849         (gcc_cv_as_section_exclude): ... this.
13850         Try Solaris as #exclude syntax.
13851         * configure: Regenerate.
13852         * config.in: Regenerate.
13853         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
13854         SECTION_EXCLUDE.
13855         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
13856         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
13858         * varasm.c (default_elf_asm_named_section): Don't check if
13859         HAVE_GAS_SECTION_EXCLUDE is defined.
13861 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13863         * doc/md.texi: Update the documentation of the cond_* optabs
13864         to mention the new final operand.  Fix GET_MODE_NUNITS call.
13865         Describe the scalar case too.
13866         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
13867         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
13868         instead of 2.
13869         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
13870         (get_conditional_internal_fn): Update comment.
13871         * tree-vect-loop.c (vectorizable_reduction): Pass the original
13872         accumulator value as a final argument to conditional functions.
13873         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
13874         a define_expand and add an "else" operand.  Assert for now that
13875         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
13876         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
13877         (*cond_<optab><mode>): New patterns.
13878         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
13879         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
13880         (UNSPEC_COND_EOR): Delete.
13881         (optab): Remove associated mappings.
13882         (SVE_INT_BINARY): New code iterator.
13883         (sve_int_op): Remove int attribute and add "minus" to the code
13884         attribute.
13885         (SVE_COND_INT_OP): Delete.
13886         (SVE_COND_FP_OP): Rename to...
13887         (SVE_COND_FP_BINARY): ...this.
13889 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13891         * optabs.c (can_reuse_operands_p): New function.
13892         (maybe_legitimize_operands): Try to reuse the results for
13893         earlier operands.
13895 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
13897         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
13898         Add {q} suffix to insn mnemonic.
13900 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13902         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
13903         (msp430_warn_func_return): New.
13905 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
13907         * fold-const.c (tree_nonzero_bits): New function.
13908         * fold-const.h (tree_nonzero_bits): Likewise.
13909         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
13910         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
13912 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
13914         PR target/85900
13915         PR target/85345
13916         * varasm.c (assemble_alias): Check ifunc_resolver only on
13917         FUNCTION_DECL.
13919 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
13921         PR target/85903
13922         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
13923         when memory input operand is handled.
13925 2018-05-24  Luis Machado  <luis.machado@linaro.org>
13927         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
13928         global.
13929         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
13931 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
13933         * match.pd: Delay FMA folds until after vectorization.
13935 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13937         PR target/83009
13938         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13939         address check not strict.
13941 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
13943         * gimple-match.h (gimple_match_op): New class.
13944         (mprts_hook): Replace parameters with a gimple_match_op *.
13945         (maybe_build_generic_op): Likewise.
13946         (gimple_simplified_result_is_gimple_val): Replace parameters with
13947         a const gimple_match_op *.
13948         (gimple_simplify): Replace code_helper * and tree * parameters with
13949         a gimple_match_op * parameter.
13950         (gimple_resimplify1): Replace code_helper *, tree and tree *
13951         parameters with a gimple_match_op * parameter.
13952         (gimple_resimplify2): Likewise.
13953         (gimple_resimplify3): Likewise.
13954         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
13955         parameters with a gimple_match_op * parameter.
13956         * gimple-match-head.c (gimple_simplify): Change prototypes of
13957         auto-generated functions to take a gimple_match_op * instead of
13958         separate code_helper * and tree * parameters.  Make the same
13959         change in the top-level overload and update calls to the
13960         gimple_resimplify routines.  Update calls to the auto-generated
13961         functions and to maybe_push_res_to_seq in the publicly-facing
13962         operation-specific gimple_simplify overloads.
13963         (gimple_match_op::MAX_NUM_OPS): Define.
13964         (gimple_resimplify1): Replace rcode and ops with a single res_op
13965         parameter.  Update call to gimple_simplify.
13966         (gimple_resimplify2): Likewise.
13967         (gimple_resimplify3): Likewise.
13968         (mprts_hook): Replace parameters with a gimple_match_op *.
13969         (maybe_build_generic_op): Likewise.
13970         (build_call_internal): Replace type, nargs and ops with
13971         a gimple_match_op *.
13972         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
13973         with a single gimple_match_op *.  Update calls to mprts_hook,
13974         build_call_internal and gimple_simplified_result_is_gimple_val.
13975         Factor out code that is common to the tree_code and combined_fn cases.
13976         * genmatch.c (expr::gen_transform): Replace tem_code and
13977         tem_ops with a gimple_match_op called tem_op.  Update calls
13978         to the gimple_resimplify functions and maybe_push_res_to_seq.
13979         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
13980         res_ops.  Update call to the gimple_resimplify functions.
13981         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
13982         (decision_tree::gen): Make the functions take a gimple_match_op *
13983         called res_op instead of separate res_code and res_ops parameters.
13984         Update call accordingly.
13985         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
13986         and ops with a single res_op parameter.  Update calls to
13987         maybe_build_generic_op and maybe_push_res_to_seq.
13988         (fold_stmt_1): Update calls to gimple_simplify and
13989         replace_stmt_with_simplification.
13990         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
13991         and gimple_simplified_result_is_gimple_val.
13992         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
13993         gimple_simplify.
13994         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
13995         with a gimple_match_op *.
13996         (vn_nary_build_or_lookup): Likewise.  Update call to
13997         vn_nary_build_or_lookup_1.
13998         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
13999         gimple_match_op *.  Update calls to the gimple_resimplify routines
14000         and to gimple_simplified_result_is_gimple_val.
14001         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
14002         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
14003         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
14004         (visit_nary_op): Likewise.
14005         (visit_reference_op_load): Likewise.
14007 2018-05-23  Luis Machado  <luis.machado@linaro.org>
14009         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
14010         modifier for printing the step amount.
14012 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
14014         PR target/78849
14015         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
14016         types.
14018 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
14020         * doc/sourcebuild.texi (Endianness): New subsubsection.
14022 2018-05-23  Luis Machado  <luis.machado@linaro.org>
14024         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14025         <prefetch_dynamic_strides>: New const bool field.
14026         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14027         prefetch_dynamic_strides.
14028         (exynosm1_prefetch_tune): Likewise.
14029         (thunderxt88_prefetch_tune): Likewise.
14030         (thunderx_prefetch_tune): Likewise.
14031         (thunderx2t99_prefetch_tune): Likewise.
14032         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
14033         false.
14034         (aarch64_override_options_internal): Update to set
14035         PARAM_PREFETCH_DYNAMIC_STRIDES.
14036         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14037         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14038         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14039         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14040         prefetch-dynamic-strides setting.
14042 2018-05-23  Luis Machado  <luis.machado@linaro.org>
14044         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14045         <minimum_stride>: New const int field.
14046         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14047         minimum_stride field defaulting to -1.
14048         (exynosm1_prefetch_tune): Likewise.
14049         (thunderxt88_prefetch_tune): Likewise.
14050         (thunderx_prefetch_tune): Likewise.
14051         (thunderx2t99_prefetch_tune): Likewise.
14052         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
14053         <default_opt_level>: Set to 3.
14054         (aarch64_override_options_internal): Update to set
14055         PARAM_PREFETCH_MINIMUM_STRIDE.
14056         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14057         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14058         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14059         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14060         stride is constant and is below the minimum stride threshold.
14062 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14064         * config/arm/arm-cpus.in (mode26): Delete.
14065         (armv4): Delete mode26 reference.
14066         * config/arm/arm.c (arm_configure_build_target): Delete use of
14067         isa_bit_mode26.
14069 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
14071         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
14072         New insn pattern.
14073         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
14074         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
14075         for non-SSE modes.
14076         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
14077         (floatunsdidf2): Ditto.
14079 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
14081         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
14082         (fixuns_trunc<mode>si2_avx512f): Ditto.
14083         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
14084         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
14085         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
14087 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
14089         PR rtl-optimization/79985
14090         * df-scan.c (df_insn_refs_collect): Remove special case for
14091         global registers and asm statements.
14093 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
14095         * extend.texi (Global Register Variables): Rewrite the bullet list.
14096         Note that the register is available for allocation. Note that access
14097         via inline asm must use constraints. Add note about async-signal
14098         handlers. Remove paragraph about automagic register selection.
14100 2018-05-23  Richard Biener  <rguenther@suse.de>
14102         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
14103         of fixed offset from memset VN.
14105 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
14107         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
14108         first_interp field.
14109         (alloc_cand_and_find_basis): Initialize first_interp field.
14110         (slsr_process_mul): Modify first_interp field.
14111         (slsr_process_add): Likewise.
14112         (slsr_process_cast): Modify first_interp field for each new
14113         interpretation.
14114         (slsr_process_copy): Likewise.
14115         (dump_candidate): Dump first_interp field.
14116         (replace_mult_candidate): Process all interpretations, not just
14117         subsequent ones.
14118         (replace_rhs_if_not_dup): Likewise.
14119         (replace_one_candidate): Likewise.
14121 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
14123         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
14124         Add new boolean.
14125         (aarch64_needs_frame_chain): New function.
14126         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
14128 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
14130         PR target/84882
14131         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
14132         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
14133         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
14134         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
14135         as true for strict-align.
14136         (aarch64_can_inline_p): Perform checks even when callee has no
14137         attributes to check for strict alignment.
14138         * doc/extend.texi (AArch64 Function Attributes): Document
14139         no-strict-align.
14140         * doc/invoke.texi: (AArch64 Options): Likewise.
14142 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
14144         PR tree-optimization/85853
14145         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
14146         the handling of the root of the node to...
14147         (vect_slp_analyze_node_operations_1): ...this new function,
14148         and run the whole thing with the child nodes' def types
14149         set according to their SLP node's def type.
14151 2018-05-23  Richard Biener  <rguenther@suse.de>
14153         PR middle-end/85874
14154         * tree-data-ref.c (create_runtime_alias_checks): Defer
14155         and ignore overflow warnings.
14157 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
14159         PR tree-optimization/85822
14160         * tree-vrp.c (is_masked_range_test): Fix handling of negative
14161         constants.
14163 2018-05-23  Richard Biener  <rguenther@suse.de>
14165         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14166         memset constants via native_interpret_expr.
14168 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
14170         PR target/85345
14171         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
14172         attribute.
14173         (cgraph_node::create_alias): Likewise.
14174         (cgraph_node::get_availability): Check ifunc_resolver instead
14175         of looking up ifunc attribute.
14176         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
14177         * varasm.c (do_assemble_alias): Likewise.
14178         (assemble_alias): Likewise.
14179         (default_binds_local_p_3): Likewise.
14180         * cgraph.h (cgraph_node): Add ifunc_resolver.
14181         (cgraph_node::only_called_directly_or_aliased_p): Return false
14182         for IFUNC resolver.
14183         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
14184         attribute.
14185         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
14186         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
14187         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
14188         instead of looking up ifunc attribute.
14190 2018-05-22  Luis Machado  <luis.machado@linaro.org>
14192         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
14194 2018-05-22  Martin Sebor  <msebor@redhat.com>
14196         PR middle-end/85359
14197         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
14198         only when expasion succeeds.
14199         (expand_builtin_strcmp): Same.
14200         (expand_builtin_strncmp): Same.
14202 2018-05-22  Martin Sebor  <msebor@redhat.com>
14204         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
14206 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
14207             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14209         * config/aarch64/aarch64-ldpstp.md: Replace uses of
14210         aarch64_mem_pair_operand with memory_operand and delete operand swapping
14211         code.
14212         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14213         Add check for legitimate_address.
14214         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
14215         (aarch64_swap_ldrstr_operands): New.
14216         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
14217         Define prototype.
14219 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
14220             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14222         * config/aarch64/aarch64.md: New patterns to generate stp
14223         and ldp.
14224         (store_pair_sw, store_pair_dw): New patterns to generate stp for
14225         single words and double words.
14226         (load_pair_sw, load_pair_dw): Likewise.
14227         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
14228         Delete.
14229         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
14230         Delete.
14231         * config/aarch64/aarch64-ldpstp.md: Modify peephole
14232         for different mode ldpstp and add peephole for merged zero stores.
14233         Likewise for loads.
14234         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14235         Add size check.
14236         (aarch64_gen_store_pair): Rename calls to match new patterns.
14237         (aarch64_gen_load_pair): Rename calls to match new patterns.
14238         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
14239         (load_pair<DREG:mode><DREG2:mode>): ... This.
14240         (store_pair<mode>): Rename to...
14241         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
14242         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
14243         New mode iterators.
14244         (V_INT_EQUIV): Handle SImode.
14245         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
14246         New predicate.
14248 2018-05-22  Martin Sebor  <msebor@redhat.com>
14250         PR c/85623
14251         * calls.c (maybe_warn_nonstring_arg): Use string length to set
14252         or ajust the presumed bound on an operation to avoid unnecessary
14253         warnings.
14255 2018-05-22  Martin Sebor  <msebor@redhat.com>
14257         PR tree-optimization/85826
14258         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
14259         assuming that a DECL necesarily has a constant size.
14261 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
14263         PR middle-end/85862
14264         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
14266 2018-05-22  Richard Biener  <rguenther@suse.de>
14268         PR tree-optimization/85834
14269         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
14270         non-constant and non-zero memset arguments.
14272 2018-05-22  Martin Liska  <mliska@suse.cz>
14274         PR ipa/85607
14275         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
14277 2018-05-22  Richard Biener  <rguenther@suse.de>
14279         PR tree-optimization/85863
14280         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
14281         comparisons when vectype is specified.
14282         (vectorizable_condition): Do not specify vectype for
14283         vect_is_simple_cond when SLP vectorizing.
14285 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
14287         PR target/85657
14288         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
14289         define __ibm128 as long double.
14290         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
14291         as a distinct type when IEEE 128-bit support is enabled.
14292         (init_float128_ieee): Fix up conversions between IFmode and IEEE
14293         128-bit types to use the correct functions.
14294         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
14295         convert between 128-bit floating point types that have different
14296         modes but the same representation, instead of using gen_lowpart to
14297         makean alias.
14298         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
14299         KFmode.
14300         (IFKF_reg): New attributes to give the register constraints for
14301         IFmode and KFmode.
14302         (extend<mode>tf2_internal): New insns to mark an explicit
14303         conversion between 128-bit floating point types that have a
14304         different mode but share the same representation.
14306 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
14308         PR tree-optimization/85814
14309         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
14310         a null return from get_strinfo when unsharing the next
14311         strinfo in the chain.
14313 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14315         PR gcc/84923
14316         * varasm.c (weak_finish): Clean up weak_decls.
14318 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14320         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
14321         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
14322         UNSPEC_UADALP values.
14323         * config/aarch64/iterators.md (ABAL): New int iterator.
14324         (ABDL2): Likewise.
14325         (ADALP): Likewise.
14326         (sur): Add mappings for the above.
14327         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
14328         New define_insn.
14329         (aarch64_<sur>abal<mode>_4): Likewise.
14330         (aarch64_<sur>adalp<mode>_3): Likewise.
14331         (<sur>sadv16qi): New define_expand.
14333 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
14335         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
14336         (*movdf_internal): Ditto.
14337         (*rcpsf2_sse): Ditto.
14338         (*rsqrtsf2_sse): Ditto.
14339         (*sqrt<mode>2_sse): Ditto.
14341 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
14343         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
14344         eor3q<mode>4.
14345         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
14346         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
14347         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
14348         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
14349         vbcaxq_s64): New.
14350         * config/aarch64/arm_neon.h: Likewise.
14351         * config/aarch64/iterators.md (VQ_I): New.
14353 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
14355         * config.gcc: Add arc/t-multilib-linux to tmake_file for
14356         arc*-*-linux*.
14357         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
14358         MULTILIB_DIRNAMES
14360 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
14362         * config/nds32/constraints.md (S): New constraint.
14363         * config/nds32/nds32.md (call_internal): Use constraint S.
14364         (call_value_internal): Likewise.
14365         (sibcall_internal): Likewise.
14366         (sibcall_value_internal): Likewise.
14368 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
14369             Chung-Ju Wu  <jasonwucj@gmail.com>
14371         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
14372         into consideration.
14374 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
14375             Chung-Ju Wu  <jasonwucj@gmail.com>
14377         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
14378         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
14379         (nds32_rtx_costs_impl): Simplify.
14380         (nds32_address_cost_impl): Simplify.
14381         (nds32_init_rtx_costs): New function.
14382         (nds32_rtx_costs_speed_prefer): Likewise.
14383         (nds32_rtx_costs_size_prefer): Likewise.
14384         (nds32_address_cost_speed_prefer): Likewise.
14385         (nds32_address_cost_speed_fwprop): Likewise.
14386         (nds32_address_cost_size_prefer): Likewise.
14387         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
14388         * config/nds32/nds32.c (nds32_option_override): Use
14389         nds32_init_rtx_costs function.
14391 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
14393         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
14394         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
14395         (TARGET_PIPELINE_N8): Likewise.
14396         (TARGET_PIPELINE_N10): Likewise.
14397         (TARGET_PIPELINE_N13): Likewise.
14398         (TARGET_PIPELINE_GRAYWOLF): Likewise.
14400 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
14402         * config/nds32/nds32-fpu.md: Update copyright year.
14404 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14406         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
14408 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14410         * config/nds32/nds32.c
14411         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
14412         * config/nds32/nds32.opt (minline-asm-r15): New option.
14414 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14416         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
14417         MASK_HW_ABS.
14418         * config/nds32/nds32.md (abssi2): New pattern.
14420 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
14422         * config/i386/i386.md (rex64namesuffix): New mode attribute.
14423         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
14424         Merge insn pattern from sse_cvtsi2ss<round_name> and
14425         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
14426         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
14427         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
14428         using SWI48 mode iterator.
14429         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
14430         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
14431         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
14432         pattern from sse_cvttss2si<round_saeonly_name>
14433         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
14434         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
14435         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
14436         using SWI48 mode iterator.
14437         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
14438         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
14439         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
14440         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
14441         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
14442         using SWI48 mode iterator.
14443         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
14444         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
14445         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
14446         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
14447         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
14448         SWI48 mode iterator.
14449         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
14450         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
14451         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
14452         pattern from sse_cvttsd2si<round_saeonly_name>
14453         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
14455 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14457         * config/nds32/nds32-md-auxiliary.c
14458         (nds32_valid_smw_lwm_base_p): Refine.
14459         (nds32_output_smw_single_word): Refine.
14460         (nds32_output_smw_double_word): New.
14461         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
14463 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14465         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
14466         (nds32_output_stack_pop): Refine.
14467         (nds32_expand_unaligned_load): Refine.
14468         (nds32_expand_unaligned_store): Refine.
14470 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
14471             Chung-Ju Wu  <jasonwucj@gmail.com>
14473         * config/nds32/constants.md: Add TP_REGNUM constant.
14474         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
14475         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
14476         UNSPEC_ADD32.
14477         * config/nds32/nds32-doubleword.md: Consider flag_pic.
14478         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
14479         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
14480         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
14481         and PIC code generation.
14482         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
14483         code generation.
14484         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
14485         optimization.
14486         * config/nds32/nds32.md: Support TLS and PIC.
14487         * config/nds32/nds32.c: Support TLS and PIC.
14488         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
14489         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
14490         predicate.
14492 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14494         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
14495         mode with E_ prefix.
14497 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
14498             Chung-Ju Wu  <jasonwucj@gmail.com>
14500         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
14501         * config/nds32/nds32-md-auxiliary.c
14502         (symbolic_reference_mentioned_p): New.
14503         (nds32_legitimize_ict_address): New.
14504         (nds32_expand_ict_move): New.
14505         (nds32_indirect_call_referenced_p): New.
14506         (nds32_symbol_binds_local_p): Delete.
14507         (nds32_long_call_p): Modify.
14508         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
14509         * config/nds32/nds32-protos.h
14510         (symbolic_reference_mentioned_p): Declare.
14511         (nds32_legitimize_ict_address): Declare.
14512         (nds32_expand_ict_move): Declare.
14513         (nds32_indirect_call_referenced_p): Declare.
14514         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
14515         (nds32_relax_group): Use nds32_ict_const_p as condition.
14516         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
14517         (nds32_asm_file_start): Output ict_model directive in asm code.
14518         (nds32_legitimate_address_p): Consider indirect call.
14519         (nds32_print_operand): Consider indirect call.
14520         (nds32_print_operand_address): Consider indirect call.
14521         (nds32_insert_attributes): Handle "indirect_call" attribute.
14522         (TARGET_LEGITIMATE_ADDRESS_P): Define.
14523         (TARGET_LEGITIMATE_CONSTANT_P): Define.
14524         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
14525         (TARGET_DELEGITIMIZE_ADDRESS): Define.
14526         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
14527         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
14528         (TARGET_ICT_MODEL_SMALL): Define.
14529         (TARGET_ICT_MODEL_LARGE): Define.
14530         * config/nds32/nds32.md (movsi): Consider ict model.
14531         (call, call_value): Consider ict model.
14532         (sibcall, sibcall_value): Consider ict model.
14533         * config/nds32/nds32.opt (mict-model): New option.
14534         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
14535         model.
14537 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
14538             Monk Chiang  <sh.chiang04@gmail.com>
14539             Jim Wilson <jimw@sifive.com>
14541         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
14542         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
14543         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
14544         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
14545         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
14546         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
14547         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
14548         compute save_libcall_adjustment properly.
14549         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
14550         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
14551         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
14552         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
14553         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
14554         (ABI_SPEC): Handle mabi=ilp32e.
14555         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
14556         (RVE): Add RVE mask.
14557         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
14558         <-march>: Add rv32e as an example.
14560 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
14562         PR c++/82899
14563         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
14564         (intra_create_variable_infos): Handle C++ constructors.
14566 2018-05-18  Martin Liska  <mliska@suse.cz>
14568         * passes.def: Remove a redundant pass.
14570 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
14572         PR bootstrap/85838
14573         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
14575 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14577         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
14578         (ARMv4): Update.
14579         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
14580         (ARMv6m): Update.
14581         (armv2, armv2a, armv3, armv3m): Delete architectures.
14582         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
14583         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
14584         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
14585         Delete cpus.
14586         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
14587         (*mulsidi3adddi): Likewise.
14588         (mulsidi3): Likewise.
14589         (*mulsidi3_nov6): Likewise.
14590         (umulsidi3): Likewise.
14591         (umulsidi3_nov6): Likewise.
14592         (umaddsidi4): Likewise.
14593         (*umulsidi3adddi): Likewise.
14594         (smulsi3_highpart): Likewise.
14595         (*smulsi3_highpart_nov6): Likewise.
14596         (umulsi3_highpart): Likewise.
14597         (*umulsi3_highpart_nov6): Likewise.
14598         * config/arm/arm.h (arm_arch3m): Delete.
14599         * config/arm/arm.c (arm_arch3m): Delete.
14600         (arm_option_override_internal): Update armv3-related comment.
14601         (arm_configure_build_target): Delete use of isa_bit_mode32.
14602         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
14603         (arm_rtx_costs_internal): Delete check of arm_arch3m.
14604         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
14605         (mulsa3): Likewise.
14606         (mulusa3): Likewise.
14607         * config/arm/arm-protos.h (arm_arch3m): Delete.
14608         * config/arm/arm-tables.opt: Regenerate.
14609         * config/arm/arm-tune.md: Likewise.
14610         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
14611         deleted architectures.
14613 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14615         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
14616         (armv5t, armv5te): New features.
14617         (ARMv5, ARMv5e): Delete fgroups.
14618         (ARMv5t, ARMv5te): Adjust for above changes.
14619         (ARMv6m): Likewise.
14620         (armv5, armv5e): Delete arches.
14621         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
14622         arm_arch5.
14623         (*call_reg_arm): Likewise.
14624         (*call_value_reg_armv5): Likewise.
14625         (*call_value_reg_arm): Likewise.
14626         (*call_symbol): Likewise.
14627         (*call_value_symbol): Likewise.
14628         (*sibcall_insn): Likewise.
14629         (*sibcall_value_insn): Likewise.
14630         (clzsi2): Likewise.
14631         (prefetch): Likewise.
14632         (define_split and define_peephole2 dependent on arm_arch5):
14633         Likewise.
14634         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
14635         arm_arch5e.
14636         (TARGET_ARM_QBIT): Likewise.
14637         (TARGET_DSP_MULTIPLY): Likewise.
14638         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
14639         (arm_arch5, arm_arch5e): Delete.
14640         (arm_arch5t, arm_arch5te): Declare.
14641         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
14642         (arm_arch5t): Declare.
14643         (arm_option_reconfigure_globals): Update for the above.
14644         (arm_options_perform_arch_sanity_checks): Update comment, replace
14645         use of arm_arch5 with arm_arch5t.
14646         (use_return_insn): Likewise.
14647         (arm_emit_call_insn): Likewise.
14648         (output_return_instruction): Likewise.
14649         (arm_final_prescan_insn): Likewise.
14650         (arm_coproc_builtin_available): Likewise.
14651         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
14652         arm_arch5e with arm_arch5t and arm_arch5te.
14653         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
14654         (arm_arch5t, arm_arch5te): Declare.
14655         * config/arm/arm-tables.opt: Regenerate.
14656         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
14657         * config/arm/t-multilib: Likewise.
14658         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
14659         instead of arm_arch5.
14660         (*call_reg_thumb1): Likewise.
14661         (*call_value_reg_thumb1_v5): Likewise.
14662         (*call_value_reg_thumb1): Likewise.
14663         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
14664         unreachable path.
14665         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
14667 2018-05-18  Martin Liska  <mliska@suse.cz>
14669         PR gcov-profile/84846
14670         * doc/gcov.texi: Document -t option of gcov tool.
14672 2018-05-18  Martin Liska  <mliska@suse.cz>
14674         PR gcov-profile/84846
14675         * gcov.c (print_usage): Add new -t option.
14676         (process_args): Handle the option.
14677         (generate_results): Use stdout as output when requested by
14678         the option.
14680 2018-05-18  Martin Liska  <mliska@suse.cz>
14682         PR gcov-profile/84846
14683         * coverage.c (coverage_init): Write PWD to .gcno file.
14684         * doc/gcov.texi: Document how working directory is printed.
14685         * gcov-dump.c (dump_gcov_file): Print PWD.
14686         * gcov.c (output_intermediate_file): Likewise.
14687         (read_graph_file): Read PWD string.
14688         (output_lines): Print PWD.
14690 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
14692         PR middle-end/85817
14693         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
14694         for retval and return false if all args to phi are zero.
14696 2018-05-18  Richard Biener  <rguenther@suse.de>
14698         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
14699         method.
14700         (evrp_dom_walker::before_dom_children): Call it.
14702 2018-05-18  Richard Biener  <rguenther@suse.de>
14704         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
14705         results when processing array refs with variable index.
14707 2018-05-18  Toon Moene  <toon@moene.org>
14709         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
14710         directly after that of -floop-interchange. Indicate that both
14711         options are enabled by default when specifying -O3.
14713 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14715         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
14716         iterator.  Delete separate integer-mode vec_set<mode> expander.
14717         (aarch64_simd_vec_setv2di): Delete.
14718         (vec_setv2di): Delete.
14719         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
14720         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
14721         the "w, r" alternative.
14723 2018-05-18  Martin Liska  <mliska@suse.cz>
14725         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
14726         * tree-pass.h (make_pass_lower_switch_O0): New function.
14727         * tree-switch-conversion.c (node_has_low_bound): Remove.
14728         (node_has_high_bound): Likewise.
14729         (node_is_bounded): Likewise.
14730         (class pass_lower_switch): Make it a template type and create
14731         two instances.
14732         (pass_lower_switch::execute): Add template argument.
14733         (make_pass_lower_switch): New function.
14734         (make_pass_lower_switch_O0): New function.
14735         (do_jump_if_equal): Remove.
14736         (emit_case_nodes): Simplify to just handle all 3 cases and leave
14737         all the hard work to tree optimization passes.
14739 2018-05-18  Martin Liska  <mliska@suse.cz>
14741         * dbgcnt.c (limit_low): Renamed from limit.
14742         (limit_high): New variable.
14743         (dbg_cnt_is_enabled): Check for upper limit.
14744         (dbg_cnt): Adjust dumping.
14745         (dbg_cnt_set_limit_by_index): Add new argument for high
14746         value.
14747         (dbg_cnt_set_limit_by_name): Likewise.
14748         (dbg_cnt_process_single_pair): Parse new format.
14749         (dbg_cnt_process_opt): Use strtok.
14750         (dbg_cnt_list_all_counters): Remove 'value' and add
14751         'limit_high'.
14752         * doc/invoke.texi: Document changes.
14754 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
14756         * doc/sourcebuild.texi (scalar_all_fma): Document.
14757         * tree.def (FMA_EXPR): Delete.
14758         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
14759         * internal-fn.c (ternary_direct): New macro.
14760         (expand_ternary_optab_fn): Likewise.
14761         (direct_ternary_optab_supported_p): Likewise.
14762         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
14763         * builtins.c (fold_builtin_fma): Delete.
14764         (fold_builtin_3): Don't call it.
14765         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
14766         * expr.c (expand_expr_real_2): Likewise.
14767         * fold-const.c (operand_equal_p): Likewise.
14768         (fold_ternary_loc): Likewise.
14769         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
14770         * gimple.c (DEFTREECODE): Likewise.
14771         * gimplify.c (gimplify_expr): Likewise.
14772         * optabs-tree.c (optab_for_tree_code): Likewise.
14773         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
14774         * tree-eh.c (operation_could_trap_p): Likewise.
14775         (stmt_could_throw_1_p): Likewise.
14776         * tree-inline.c (estimate_operator_cost): Likewise.
14777         * tree-pretty-print.c (dump_generic_node): Likewise.
14778         (op_code_prio): Likewise.
14779         * tree-ssa-loop-im.c (stmt_cost): Likewise.
14780         * tree-ssa-operands.c (get_expr_operands): Likewise.
14781         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
14782         * fold-const-call.h (fold_fma): Delete.
14783         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
14784         CFN_FNMA and CFN_FNMS.
14785         (fold_fma): Delete.
14786         * genmatch.c (combined_fn): New enum.
14787         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
14788         (commutative_op): New function.
14789         (commutate): Use it.  Handle more than 2 operands.
14790         (dt_operand::gen_gimple_expr): Use commutative_op.
14791         (parser::parse_expr): Allow :c to be used with non-binary
14792         operators if the commutative operand is known.
14793         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
14794         CFN_FMS, CFN_FNMA and CFN_FNMS.
14795         (backprop::process_assign_use): Remove FMA_EXPR handling.
14796         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
14797         (gen_hsa_fma): New function.
14798         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
14799         IFN_FNMA and IFN_FNMS.
14800         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
14801         * gimple-fold.h (follow_all_ssa_edges): Declare.
14802         * gimple-fold.c (follow_all_ssa_edges): New function.
14803         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
14804         gimple_build interface and use follow_all_ssa_edges to fold the result.
14805         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
14806         instead of checking for optabs directly.
14807         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
14808         rather than FMA_EXPRs.
14809         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
14810         call to IFN_FMA instead of an FMA_EXPR.
14812 2018-05-17  Jim Wilson  <jimw@sifive.com>
14814         * expr.c (do_tablejump): When converting index to Pmode, if we have a
14815         sign extended promoted subreg, and the range does not have the sign bit
14816         set, then do a sign extend.
14818         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
14819         test, check for sign extended subreg and/or constant operands, and
14820         do a sign extend in that case.
14822 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
14824         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
14825         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
14826         Add untyped.
14827         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
14828         Change logics_shift_reg to logics_shift_imm.
14829         (thunderx2t99_fp_loadpair_basic): Delete.
14830         (thunderx2t99_fp_storepair_basic): Delete.
14831         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
14832         (thunderx2t99_asimd_polynomial): Delete.
14833         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
14834         and neon_fp_mul_d_scalar_q.
14835         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
14836         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
14837         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
14838         (thunderx2t99_asimd_lut): Add missing tbl types.
14839         (thunderx2t99_asimd_ext): Delete.
14840         (thunderx2t99_asimd_load1_1_mult): Delete.
14841         (thunderx2t99_asimd_load1_2_mult): Delete.
14842         (thunderx2t99_asimd_load1_ldp): New.
14843         (thunderx2t99_asimd_load1): New.
14844         (thunderx2t99_asimd_load2): Add missing *load2* types.
14845         (thunderx2t99_asimd_load3): New.
14846         (thunderx2t99_asimd_load4): New.
14847         (thunderx2t99_asimd_store1_1_mult): Delete.
14848         (thunderx2t99_asimd_store1_2_mult): Delete.
14849         (thunderx2t99_asimd_store2_mult): Delete.
14850         (thunderx2t99_asimd_store2_onelane): Delete.
14851         (thunderx2t99_asimd_store_stp): New.
14852         (thunderx2t99_asimd_store1): New.
14853         (thunderx2t99_asimd_store2): New.
14854         (thunderx2t99_asimd_store3): New.
14855         (thunderx2t99_asimd_store4): New.
14857 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
14859         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
14860         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
14862 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
14863             Segher Boessenkool  <segher@kernel.crashing.org>
14865         PR target/85698
14866         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
14867         operand.
14869 2018-05-17  Richard Biener  <rguenther@suse.de>
14871         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
14872         for pruning loop and prune defs feeding only already visited PHIs.
14874 2018-05-17  Richard Biener  <rguenther@suse.de>
14876         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
14878 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
14879             Richard Biener  <rguenther@suse.de>
14881         PR tree-optimization/85793
14882         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
14883         for VMAT_ELEMENTWISE.
14885 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
14887         * internal-fn.h (lookup_internal_fn): Declare
14888         * internal-fn.c (lookup_internal_fn): New function.
14889         * gimple.c (gimple_build_call_from_tree): Handle calls to
14890         internal functions.
14891         * gimple-pretty-print.c (dump_gimple_call): Print "." before
14892         internal function names.
14893         * tree-pretty-print.c (dump_generic_node): Likewise.
14894         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
14896 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
14898         * gimple-fold.h (gimple_build): Make the function forms take
14899         combined_fn rather than built_in_function.
14900         (gimple_simplify): Likewise.
14901         * gimple-match-head.c (gimple_simplify): Likewise.
14902         * gimple-fold.c (gimple_build): Likewise.
14903         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
14904         rather than gimple_build_call_internal.
14905         (get_initial_defs_for_reduction): Likewise.
14906         (vect_create_epilog_for_reduction): Likewise.
14907         (vectorizable_live_operation): Likewise.
14909 2018-05-17  Martin Liska  <mliska@suse.cz>
14911         * gimple-ssa-sprintf.c (format_directive): Do not use
14912         space in between 'G_' and '('.
14914 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
14916         PR target/85323
14917         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
14918         even if the mask is not all ones.
14920         PR target/85323
14921         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
14922         vector.
14923         (ix86_gimple_fold_builtin): Likewise.
14925         PR target/85323
14926         * config/i386/i386.c: Include tree-vector-builder.h.
14927         (ix86_vector_shift_count): New function.
14928         (ix86_fold_builtin): Fold shift builtins by scalar count.
14929         (ix86_gimple_fold_builtin): Likewise.
14931         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
14932         _mm512_setzero): New intrinsics.
14934 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
14935             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14937         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
14938         code generation for cases where splatting a value is not useful.
14939         * simplify-rtx.c (simplify_ternary_operation): Simplify
14940         vec_merge across a vec_duplicate and a paradoxical subreg forming
14941         a vector mode to a vec_concat.
14943 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
14945         * config.gcc: Support "goldmont-plus".
14946         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
14947         "goldmont-plus".
14948         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14949         PROCESSOR_GOLDMONT_PLUS.
14950         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
14951         (processor_target_table): Add "goldmont-plus".
14952         (PTA_GOLDMONT_PLUS): Define.
14953         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
14954         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
14955         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
14956         (fold_builtin_cpu): Add "goldmont-plus".
14957         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
14958         (ix86_option_override_internal): Add "goldmont-plus".
14959         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
14960         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
14961         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
14962         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
14964 2018-05-17  Richard Biener  <rguenther@suse.de>
14966         PR tree-optimization/85757
14967         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
14968         remove defs that only feed that PHI from further processing.
14970 2018-05-16  Jim Wilson  <jimw@sifive.com>
14972         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
14973         asterisk to name.
14974         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
14976 2018-05-16  Mark Wielaard  <mark@klomp.org>
14978         * dwarf2out.c (count_index_strings): New function.
14979         (output_indirect_strings): Call count_index_strings and generate
14980         header for dwarf_version >= 5.
14982 2018-05-16  Mark Wielaard  <mark@klomp.org>
14984         * dwarf2out.c (dwarf_FORM): New function.
14985         (set_indirect_string): Use dwarf_FORM.
14986         (reset_indirect_string): Likewise.
14987         (size_of_die): Likewise.
14988         (value_format): Likewise.
14989         (output_die): Likewise.
14990         (add_skeleton_AT_string): Likewise.
14991         (output_macinfo_op): Likewise.
14992         (index_string): Likewise.
14993         (output_index_string_offset): Likewise.
14994         (output_index_string): Likewise.
14995         (count_index_strings): Likewise.
14997 2018-05-16  Carl Love  <cel@us.ibm.com>
14999         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15000         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
15002 2018-05-16  Martin Jambor  <mjambor@suse.cz>
15004         * ipa-prop.c (ipa_free_all_edge_args): Remove.
15005         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
15007 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
15009         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
15010         (fnma<mode>4): Likewise.
15011         (fms<mode>4): Likewise.
15012         (fnms<mode>4): Likewise.
15013         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
15014         (aarch64_fnma<mode>4): Likewise.
15015         (aarch64_fms<mode>4): Likewise.
15016         (aarch64_fnms<mode>4): Likewise.
15017         (aarch64_fnmadd<mode>4): Likewise.
15019 2018-05-16  Jason Merrill  <jason@redhat.com>
15021         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
15023 2018-05-16  Richard Biener  <rguenther@suse.de>
15025         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
15026         (dump_stmt_cost): Declare.
15027         (add_stmt_cost): Dump cost we add.
15028         (add_stmt_costs): New function.
15029         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
15030         No longer exported.
15031         (vect_analyze_stmt): Adjust prototype.
15032         (vectorizable_condition): Likewise.
15033         (vectorizable_live_operation): Likewise.
15034         (vectorizable_reduction): Likewise.
15035         (vectorizable_induction): Likewise.
15036         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
15037         cost vector to pass to vectorizable_ and record afterwards.
15038         (vect_model_reduction_cost): Take cost vector argument and adjust.
15039         (vect_model_induction_cost): Likewise.
15040         (vectorizable_reduction): Likewise.
15041         (vectorizable_induction): Likewise.
15042         (vectorizable_live_operation): Likewise.
15043         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
15044         SLP_TREE_NUMBER_OF_VEC_STMTS.
15045         (vect_analyze_slp_cost_1): Remove.
15046         (vect_analyze_slp_cost): Likewise.
15047         (vect_slp_analyze_node_operations): Take visited args and
15048         a target cost vector.  Avoid processing already visited stmt sets.
15049         (vect_slp_analyze_operations): Use a local cost vector to gather
15050         costs and register those of non-discarded instances.
15051         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
15052         (vect_schedule_slp_instance): Remove copying of
15053         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
15054         zero.
15055         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
15056         adding cost.  Record cost entry location.
15057         (vect_prologue_cost_for_slp_op): Function to compute cost of
15058         a constant or invariant generated for SLP vect in the prologue,
15059         split out from vect_analyze_slp_cost_1.
15060         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
15061         (vect_model_promotion_demotion_cost): Likewise.
15062         (vect_model_store_cost): Likewise, make static.
15063         (vect_model_load_cost): Likewise.
15064         (vectorizable_bswap): Add cost vector arg and adjust.
15065         (vectorizable_call): Likewise.
15066         (vectorizable_simd_clone_call): Likewise.
15067         (vectorizable_conversion): Likewise.
15068         (vectorizable_assignment): Likewise.
15069         (vectorizable_shift): Likewise.
15070         (vectorizable_operation): Likewise.
15071         (vectorizable_store): Likewise.
15072         (vectorizable_load): Likewise.
15073         (vectorizable_condition): Likewise.
15074         (vectorizable_comparison): Likewise.
15075         (can_vectorize_live_stmts): Likewise.
15076         (vect_analyze_stmt): Likewise.
15077         (vect_transform_stmt): Adjust calls to vectorizable_*.
15078         * tree-vectorizer.c: Include gimple-pretty-print.h.
15079         (dump_stmt_cost): New function.
15081 2018-05-16  Richard Biener  <rguenther@suse.de>
15083         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
15084         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
15085         * tree-ssa-dse.c: Include tree-ssa-loop.h.
15086         (check_name): New callback.
15087         (dse_classify_store): Track cycles via a visited bitmap of PHI
15088         defs and simplify handling of in-loop and across loop dead stores
15089         and properly fail for loop-variant refs.  Handle byte-tracking with
15090         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
15091         limiting the walk.
15093 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
15095         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
15096         (vect_get_mask_type_for_stmt): Likewise.
15097         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
15098         split out from...
15099         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
15100         to determine the statement's vector type and the vector type that
15101         should be used for calculating nunits.  Deal with cases in which
15102         the type has to be deferred.
15103         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
15104         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
15105         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
15106         (vect_determine_vf_for_stmt): New functions, split out from...
15107         (vect_determine_vectorization_factor): ...here.
15108         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
15109         (vect_get_mask_type_for_stmt): New functions, split out from
15110         vect_determine_vectorization_factor.
15112 2018-05-16  Richard Biener  <rguenther@suse.de>
15114         * tree-cfg.c (verify_gimple_assign_ternary): Properly
15115         verify the [VEC_]COND_EXPR embedded comparison.
15117 2018-05-15  Martin Sebor  <msebor@redhat.com>
15119         PR tree-optimization/85753
15120         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
15121         RECORD_TYPE in addition to ARRAY_TYPE.
15123 2018-05-15  Martin Sebor  <msebor@redhat.com>
15125         PR middle-end/85643
15126         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
15128 2018-05-15  Richard Biener  <rguenther@suse.de>
15130         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
15131         add by_clobber_p one.  Change algorithm to collect all defs
15132         representing uses we need to walk and try reducing them to
15133         a single one before failing.
15134         (dse_dom_walker::dse_optimize_stmt): Adjust.
15136 2018-05-13  Mark Wielaard  <mark@klomp.org>
15138         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
15139         (size_of_loc_descr): Likewise.
15140         (output_loc_operands): Likewise.
15141         (output_loc_operands_raw): Likewise.
15142         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
15143         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
15144         (hash_loc_operands): Likewise.
15145         (compare_loc_operands): Likewise.
15147 2018-05-14  Mark Wielaard  <mark@klomp.org>
15149         * dwarf2out.c (count_index_addrs): New function.
15150         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
15152 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15154         PR tree-optimization/83648
15155         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
15156         return value as malloc candidate.
15158 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15160         PR ipa/85734
15161         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
15162         param as true in call to suggest_attribute.
15164 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
15166         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
15167         -mreadonly-in-sdata.
15169 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15171         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
15172         New pattern.
15173         (aarch64_crypto_aesd_fused): Likewise.
15175 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
15177         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
15178         (movsi_aarch64): Likewise.
15179         (load_pairsi): Likewise.
15180         (load_pairdi): Likewise.
15181         (store_pairsi): Likewise.
15182         (store_pairdi): Likewise.
15183         (load_pairsf): Likewise.
15184         (load_pairdf): Likewise.
15185         (store_pairsf): Likewise.
15186         (store_pairdf): Likewise.
15187         (zero_extend): Likewise.
15188         (trunc): Swap alternatives.
15189         (fcvt_target): Add '?' to prefer w over r.
15191 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
15193         PR target/85756
15194         * config/i386/i386.md: Disallow non-commutative arithmetics in
15195         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
15196         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
15197         in the peephole2 before it.
15199 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
15201         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
15202         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
15203         (ix86_handle_option): Handle -mcldemote.
15204         * config.gcc: New header.
15205         * config/i386/cldemoteintrin.h: New file.
15206         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
15207         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15208         -mcldemote.
15209         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15210         OPTION_MASK_ISA_CLDEMOTE.
15211         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
15212         (ix86_valid_target_attribute_inner_p): Ditto.
15213         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
15214         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
15215         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
15216         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
15217         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
15218         (cldemote): New.
15219         * config/i386/i386.opt: Add -mcldemote.
15220         * config/i386/x86intrin.h: New header.
15221         * doc/invoke.texi: Add -mcldemote.
15223 2018-05-14  Richard Biener  <rguenther@suse.de>
15225         * doc/match-and-simplify.texi: Adjust :s documentation.
15227 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
15229         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
15230         intended memcpy size.
15231         (REORDER_45): Likewise.
15233 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
15235         * sort.cc: New file.
15236         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
15237         * vec.c (qsort_chk): Use gcc_qsort.
15238         * Makefile.in (OBJS-libcommon): Add sort.o.
15239         (build/sort.o): New target.  Use it...
15240         (BUILD_RTL): ... here, and...
15241         (build/gencfn-macros): ... here, and...
15242         (build/genmatch): ... here.
15244 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
15245             Chung-Ju Wu  <jasonwucj@gmail.com>
15247         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
15248         * config/nds32/nds32-graywolf.md: New file.
15249         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
15250         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
15251         pipeline.
15252         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
15253         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
15254         * config/nds32/nds32.md (pipeline_model): Add graywolf.
15255         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
15256         * config/nds32/pipelines.md: Include n15 settings.
15258 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
15259             Chung-Ju Wu  <jasonwucj@gmail.com>
15261         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
15262         * config/nds32/nds32-n13.md: New file.
15263         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
15264         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
15265         pipeline.
15266         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
15267         * config/nds32/nds32.md (pipeline_model): Add n13.
15268         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
15269         * config/nds32/pipelines.md: Include n13 settings.
15271 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
15272             Chung-Ju Wu  <jasonwucj@gmail.com>
15274         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
15275         * config/nds32/nds32-n10.md: New file.
15276         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
15277         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
15278         pipeline.
15279         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
15280         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
15281         * config/nds32/nds32.md (pipeline_model): Add n10.
15282         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
15283         * config/nds32/pipelines.md: Include n10 settings.
15285 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
15286             Kito Cheng  <kito.cheng@gmail.com>
15287             Chung-Ju Wu  <jasonwucj@gmail.com>
15289         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
15290         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15291         Add enum values for DSP extension instructions.
15292         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
15293         New constraints.
15294         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
15295         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
15296         New code iterators.
15297         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
15298         * config/nds32/nds32-dspext.md: New file for DSP implementation.
15299         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
15300         * config/nds32/nds32-intrinsic.md: Likewise.
15301         * config/nds32/nds32_intrinsic.h: Likewise.
15302         * config/nds32/nds32-md-auxiliary.c: Likewise.
15303         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
15304         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
15305         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
15306         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
15307         * config/nds32/nds32-protos.h: New declarations for DSP extension.
15308         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
15309         TYPE_DMAC in switch statement.
15310         * config/nds32/nds32.c: New checking and implementation for DSP
15311         extension instructions.
15312         * config/nds32/nds32.h: Likewise.
15313         * config/nds32/nds32.md: Likewise.
15314         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
15315         * config/nds32/predicates.md: Implement new predicates for DSP
15316         extension.
15318 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
15320         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
15321         Reformat alternatives and attributes so it is easier to identify
15322         which constraints/attributes go with which instruction.
15323         (mov<mode>_hardfloat32, FMOVE64): Likewise.
15324         (mov<mode>_softfloat32, FMOVE64): Likewise.
15325         (mov<mode>_hardfloat64, FMOVE64): Likewise.
15326         (mov<mode>_softfloat64, FMOVE64): Likewise.
15328 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15330         * doc/extend.texi (PowerPC Built-in Functions): Rename this
15331         subsection.
15332         (Basic PowerPC Built-in Functions): The new name of the
15333         subsection previously known as "PowerPC Built-in Functions".
15334         (Basic PowerPC Built-in Functions Available on all Configurations):
15335         New subsubsection.
15336         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
15337         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
15338         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
15339         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
15341 2018-05-11  Martin Jambor  <mjambor@suse.cz>
15343         PR ipa/85655
15344         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
15345         single const.
15347 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
15349         PR target/85733
15350         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
15352 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
15354         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
15355         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
15356         (ix86_handle_option): Handle -mwaitpkg.
15357         * config.gcc: New header.
15358         * config/i386/cpuid.h (bit_WAITPKG): New bit.
15359         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
15360         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
15361         function type.
15362         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15363         OPTION_MASK_ISA_WAITPKG.
15364         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
15365         (ix86_option_override_internal): Add PTA_WAITPKG.
15366         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
15367         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
15368         IX86_BUILTIN_TPAUSE.
15369         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
15370         __builtin_ia32_umwait and __builtin_ia32_tpause.
15371         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
15372         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
15373         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
15374         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
15375         UNSPECV_TPAUSE): New.
15376         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
15377         * config/i386/i386.opt: Add -mwaitpkg.
15378         * config/i386/waitpkgintrin.h: New file.
15379         * config/i386/x86intrin.h: New header.
15380         * doc/invoke.texi: Add -mwaitpkg.
15382 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
15384         PR target/85606
15385         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
15386         equivalent.
15387         (cortex-m0): Use armv6s-m isa.
15388         (cortex-m0plus): Likewise.
15389         (cortex-m1): Likewise.
15390         (cortex-m0.small-multiply): Likewise.
15391         (cortex-m0plus.small-multiply): Likewise.
15392         (cortex-m1.small-multiply): Likewise.
15394 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
15395             Jakub Jelinek  <jakub@redhat.com>
15397         PR tree-optimization/85692
15398         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
15399         source permute as well.
15401 2018-05-11  Martin Liska  <mliska@suse.cz>
15403         PR sanitizer/85556
15404         * doc/extend.texi: Document LLVM style format for no_sanitize
15405         attribute.
15407 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
15409         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
15410         mode_supports_vsx_dform_quad to mode_supports_dq_form.
15411         (mode_supports_vsx_dform_quad): Likewise.
15412         (mode_supports_vmx_dform): Move these functions to be next to the
15413         other mode_supports functions.
15414         (mode_supports_dq_form): Likewise.
15415         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
15416         mode_supports_dq_form.
15417         (reg_offset_addressing_ok_p): Likewise.
15418         (offsettable_ok_by_alignment): Likewise.
15419         (rs6000_legitimate_offset_address_p): Likewise.
15420         (legitimate_lo_sum_address_p): Likewise.
15421         (rs6000_legitimize_address): Likewise.
15422         (rs6000_legitimize_reload_address): Likewise.
15423         (rs6000_secondary_reload_inner): Likewise.
15424         (rs6000_preferred_reload_class): Likewise.
15425         (rs6000_output_move_128bit): Likewise.
15427 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
15429         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
15430         Generate SImode target register for null target.
15431         <case IX86_BUILTIN_XGETBV>: Ditto.
15432         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
15433         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
15435 2018-05-10  Carl Love  <cel@us.ibm.com>
15437         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15438         dcbtt and dcbtstt if operands[2] is 0.
15440 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
15442         PR target/85693
15443         * config/i386/sse.md (usadv64qi): New expander.
15445 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
15447         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
15448         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
15449         -maltivec=be support.
15450         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
15451         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
15452         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
15453         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
15454         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
15455         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
15456         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
15457         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
15458         altivec_vsumsws): Adjust.
15459         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
15460         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
15461         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
15462         support.
15463         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
15464         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
15465         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
15466         (altivec_lve<VI_char>x): Delete expand.
15467         (*altivec_lve<VI_char>x_internal): Rename to...
15468         (altivec_lve<VI_char>x): ... this.
15469         (altivec_lvxl_<mode>): Delete expand.
15470         (*altivec_lvxl_<mode>_internal): Rename to ...
15471         (altivec_lvxl_<mode>): ... this.
15472         (altivec_stvxl_<mode>): Delete expand.
15473         (*altivec_stvxl_<mode>_internal): Rename to ...
15474         (altivec_stvxl_<mode>): ... this.
15475         (altivec_stve<VI_char>x): Delete expand.
15476         (*altivec_stve<VI_char>x_internal): Rename to ...
15477         (altivec_stve<VI_char>x): ... this.
15478         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
15479         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
15480         reduc_plus_scal_<mode>): Adjust.
15481         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
15482         comment.
15483         (rs6000_cpu_cpp_builtins): Adjust.
15484         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
15485         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
15486         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
15487         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
15488         -maltivec=be support.
15489         (rs6000_split_vec_extract_var): Adjust.
15490         (rs6000_split_v4si_init): Adjust.
15491         (swap_selector_for_mode): Delete.
15492         (altivec_expand_lvx_be, altivec_expand_stvx_be,
15493         altivec_expand_stvex_be): Delete.
15494         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
15495         -maltivec=be support.
15496         (rs6000_gimple_fold_builtin): Ditto.
15497         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
15498         Adjust.
15499         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
15500         (TARGET_DIRECT_MOVE_64BIT): Adjust.
15501         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
15502         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
15503         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
15504         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
15505         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
15506         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
15507         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
15508         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
15509         anonymous split): Adjust.
15510         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
15511         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
15513 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
15515         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
15516         when --with-gxx-include-dir is also specified.
15517         * configure: Regenerate.
15519 2018-05-09  Jim Wilson  <jimw@sifive.com>
15521         PR target/84797
15522         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
15523         * config/riscv/t-withmultilib: New.
15524         * config/riscv/withmultilib.h: New.
15525         * doc/install.texi: Document RISC-V --with-multilib-list support.
15527 2018-05-09  Richard Biener  <rguenther@suse.de>
15529         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
15530         vector.
15531         (vect_bb_vectorization_profitable_p): Adjust.  Compute
15532         actual scalar cost using the cost vector and the add_stmt_cost
15533         machinery.
15535 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15537         PR rtl-optimization/85645
15538         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
15539         in the REG_CFA_REGISTER note for LR, don't leave it empty.
15541 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15543         PR rtl-optimization/85645
15544         * shrink-wrap.c (spread_components): Return a boolean saying if
15545         anything was changed.
15546         (try_shrink_wrapping_separate): Iterate spread_components until
15547         nothing changes anymore.
15549 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15551         PR rtl-optimization/85645
15552         * regrename.c (build_def_use): Also kill the chains that include the
15553         destination of a REG_CFA_REGISTER note.
15555 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15557         PR rtl-optimization/85645
15558         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
15559         insn that has a REG_CFA_REGISTER note.
15561 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
15563         * cfgexpand.c (expand_clobber): New function.
15564         (expand_gimple_stmt_1): Use it.
15565         * tree-vect-stmts.c (vect_clobber_variable): New function,
15566         split out from...
15567         (vectorizable_simd_clone_call): ...here.
15568         (vectorizable_store): Emit a clobber either side of an
15569         IFN_STORE_LANES sequence.
15570         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
15572 2018-05-09  Tom de Vries  <tom@codesourcery.com>
15574         PR target/85626
15575         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
15576         (define_insn "trap_if_false"): Add exit after trap.
15578 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
15580         PR rtl-optimization/85638
15581         * bb-reorder.c: Include common/common-target.h.
15582         (create_forwarder_block): New function extracted from...
15583         (fix_up_crossing_landing_pad): ...here.  Rename into...
15584         (dw2_fix_up_crossing_landing_pad): ...this.
15585         (sjlj_fix_up_crossing_landing_pad): New function.
15586         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
15587         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
15588         from both partitions and exit the loop after one iteration.
15590 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15592         Revert:
15593         * doc/extend.texi (PowerPC Built-in Functions): Rename this
15594         subsection.
15595         (Basic PowerPC Built-in Functions): The new name of the
15596         subsection previously known as "PowerPC Built-in Functions".
15597         (Basic PowerPC Built-in Functions Available on all Configurations):
15598         New subsubsection.
15599         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15600         subsubsection.
15601         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15602         subsubsection.
15603         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15604         subsubsection.
15605         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15606         subsubsection.
15608 2018-05-08  Jim Wilson  <jimw@sifive.com>
15610         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
15611         (LD_EMUL_SUFFIX): New.
15612         (LINK_SPEC): Use it.
15614 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15616         * doc/extend.texi (PowerPC Built-in Functions): Rename this
15617         subsection.
15618         (Basic PowerPC Built-in Functions): The new name of the
15619         subsection previously known as "PowerPC Built-in Functions".
15620         (Basic PowerPC Built-in Functions Available on all Configurations):
15621         New subsubsection.
15622         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15623         subsubsection.
15624         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15625         subsubsection.
15626         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15627         subsubsection.
15628         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15629         subsubsection.
15631 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
15633         PR target/85683
15634         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
15635         after cmpelim optimization.
15637 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
15639         * config.gcc: Support "goldmont".
15640         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
15641         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15642         PROCESSOR_GOLDMONT.
15643         * config/i386/i386.c (m_GOLDMONT): Define.
15644         (processor_target_table): Add "goldmont".
15645         (PTA_GOLDMONT): Define.
15646         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
15647         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
15648         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
15649         (fold_builtin_cpu): Add "goldmont".
15650         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
15651         (ix86_option_override_internal): Add "goldmont".
15652         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
15653         (processor_type): Add PROCESSOR_GOLDMONT.
15654         * config/i386/i386.md: Add CPU "glm".
15655         * config/i386/glm.md: New file.
15656         * config/i386/x86-tune.def: Add m_GOLDMONT.
15657         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
15659 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
15661         PR target/85572
15662         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
15663         E_V4DImode.
15664         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
15665         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
15666         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
15668         PR target/85317
15669         * config/i386/i386.c (ix86_fold_builtin): Handle
15670         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
15672         PR target/85480
15673         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
15674         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
15676 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
15678         PR target/85658
15679         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
15680         (check_arch): Likewise.
15681         (check_fpu): Return the result rather than printing it.
15682         (end arch): Fix operator precedence.
15683         (end cpu): Likewise.
15684         (END): Print the result from check_fpu.
15686 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
15687             Alan Hayward  <alan.hayward@arm.com>
15688             David Sherwood  <david.sherwood@arm.com>
15690         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
15691         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
15692         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
15693         (*fcmuo<mode>_and): New patterns.
15695 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
15697         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
15698         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
15699         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
15700         (cmp_op, sve_imm_con): New code attributes.
15701         (SVE_COND_INT_CMP, imm_con): Delete.
15702         (cmp_op): Remove above unspecs from int attribute.
15703         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
15704         to...
15705         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
15706         comparison-specific unspecs.
15707         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
15708         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
15709         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
15710         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
15711         (*vec_fcm<cmp_op><mode>): Rename to...
15712         (*fcm<cmp_op><mode>): ...this and adjust likewise.
15713         (*vec_fcmuo<mode>): Rename to...
15714         (*fcmuo<mode>): ...this and adjust likewise.
15715         (*pred_fcm<cmp_op><mode>): New pattern.
15716         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
15717         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
15718         functions.
15719         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
15720         and UNORDERED.
15721         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
15722         (aarch64_emit_sve_predicated_cond): New function.
15723         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
15724         (aarch64_emit_unspec_cond_or): Replace with...
15725         (aarch64_emit_sve_or_conds): ...this new function.  Use
15726         aarch64_emit_sve_ptrue_op for the individual comparisons and
15727         aarch64_emit_binop to OR them together.
15728         (aarch64_emit_inverted_unspec_cond): Replace with...
15729         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
15730         aarch64_emit_sve_ptrue_op for the comparison and
15731         aarch64_emit_unop to invert the result.
15732         (aarch64_expand_sve_vec_cmp_float): Update after the above
15733         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
15735 2018-05-07  Nathan Sidwell  <nathan@acm.org>
15737         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
15738         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
15739         (Backwards Compatibility): Likewise.
15741 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15743         PR bootstrap/85681
15744         Revert:
15745         2018-05-07  Luis Machado  <luis.machado@linaro.org>
15747         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15748         <prefetch_dynamic_strides>: New const bool field.
15749         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15750         prefetch_dynamic_strides.
15751         (exynosm1_prefetch_tune): Likewise.
15752         (thunderxt88_prefetch_tune): Likewise.
15753         (thunderx_prefetch_tune): Likewise.
15754         (thunderx2t99_prefetch_tune): Likewise.
15755         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15756         to false.
15757         (aarch64_override_options_internal): Update to set
15758         PARAM_PREFETCH_DYNAMIC_STRIDES.
15759         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15760         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15761         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15762         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15763         prefetch-dynamic-strides setting.
15765         2018-05-07  Luis Machado  <luis.machado@linaro.org>
15767         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15768         <minimum_stride>: New const int field.
15769         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15770         minimum_stride field.
15771         (exynosm1_prefetch_tune): Likewise.
15772         (thunderxt88_prefetch_tune): Likewise.
15773         (thunderx_prefetch_tune): Likewise.
15774         (thunderx2t99_prefetch_tune): Likewise.
15775         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15776         (aarch64_override_options_internal): Update to set
15777         PARAM_PREFETCH_MINIMUM_STRIDE.
15778         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15779         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15780         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15781         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15782         stride is constant and is below the minimum stride threshold.
15784 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15786         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
15787         to 512.
15789 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15791         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15792         <prefetch_dynamic_strides>: New const bool field.
15793         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15794         prefetch_dynamic_strides.
15795         (exynosm1_prefetch_tune): Likewise.
15796         (thunderxt88_prefetch_tune): Likewise.
15797         (thunderx_prefetch_tune): Likewise.
15798         (thunderx2t99_prefetch_tune): Likewise.
15799         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15800         to false.
15801         (aarch64_override_options_internal): Update to set
15802         PARAM_PREFETCH_DYNAMIC_STRIDES.
15803         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15804         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15805         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15806         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15807         prefetch-dynamic-strides setting.
15809 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15811         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15812         <minimum_stride>: New const int field.
15813         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15814         minimum_stride field.
15815         (exynosm1_prefetch_tune): Likewise.
15816         (thunderxt88_prefetch_tune): Likewise.
15817         (thunderx_prefetch_tune): Likewise.
15818         (thunderx2t99_prefetch_tune): Likewise.
15819         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15820         (aarch64_override_options_internal): Update to set
15821         PARAM_PREFETCH_MINIMUM_STRIDE.
15822         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15823         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15824         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15825         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15826         stride is constant and is below the minimum stride threshold.
15828 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
15830         PR c++/85659
15831         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
15832         the type is addressable.  Don't force op into register if it has
15833         BLKmode.
15835 2018-05-05  Roland McGrath  <mcgrathr@google.com>
15837         PR other/77609
15838         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
15839         any section for which we don't know a specific type it should have,
15840         regardless of name.  Previously this was done only for the exact
15841         names ".init_array", ".fini_array", and ".preinit_array".
15842         (default_elf_asm_named_section): Add comment about
15843         relationship with default_section_type_flags and SECTION_NOTYPE.
15844         (get_section): Don't consider it a type conflict if one side has
15845         SECTION_NOTYPE and the other doesn't, as long as neither has the
15846         SECTION_BSS et al used in the default_section_type_flags logic.
15848 2018-05-05  Tom de Vries  <tom@codesourcery.com>
15850         PR target/85653
15851         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
15852         (workaround_barsyncs): New function.
15853         (nvptx_reorg): Use workaround_barsyncs.
15854         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15855         (define_expand "nvptx_membar_cta"): New define_expand.
15856         (define_insn "*nvptx_membar_cta"): New insn.
15858 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
15860         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
15861         To improve optimization opportunities.
15862         * builtin-types.def: The new needed builtin types for the above.
15864 2018-05-04  Richard Biener  <rguenther@suse.de>
15866         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
15867         * gimple-ssa-store-merging.c
15868         (imm_store_chain_info::output_merged_store): Remove redundant create,
15869         release split_store vector contents on failure.
15870         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
15871         scalar stmt vector on cache hit.
15873 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
15875         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
15876         Xilinx FP support.
15877         * config.gcc (powerpc-xilinx-eabi*): Remove.
15878         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
15879         support.
15880         (fusion_addis_mem_combo_load): Ditto.
15881         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
15882         FP support.
15883         (rs6000_cpu_cpp_builtins): Ditto.
15884         * config/rs6000/rs6000-linux.c
15885         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
15886         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
15887         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
15888         support.
15889         (rs6000_setup_reg_addr_masks): Ditto.
15890         (rs6000_init_hard_regno_mode_ok): Ditto.
15891         (rs6000_option_override_internal): Ditto.
15892         (legitimate_lo_sum_address_p): Ditto.
15893         (rs6000_legitimize_address): Ditto.
15894         (rs6000_legitimize_reload_address): Ditto.
15895         (rs6000_legitimate_address_p): Ditto.
15896         (abi_v4_pass_in_fpr): Ditto.
15897         (setup_incoming_varargs): Ditto.
15898         (rs6000_gimplify_va_arg): Ditto.
15899         (rs6000_split_multireg_move): Ditto.
15900         (rs6000_savres_strategy): Ditto.
15901         (rs6000_emit_prologue_components): Ditto.
15902         (rs6000_emit_epilogue_components): Ditto.
15903         (rs6000_emit_prologue): Ditto.
15904         (rs6000_emit_epilogue): Ditto.
15905         (rs6000_elf_file_end): Ditto.
15906         (rs6000_function_value): Ditto.
15907         (rs6000_libcall_value): Ditto.
15908         * config/rs6000/rs6000.h: Ditto.
15909         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
15910         (TARGET_MINMAX): ... this.  New.
15911         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
15912         * config/rs6000/rs6000.md: Remove Xilinx FP support.
15913         (*movsi_internal1_single): Delete.
15914         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
15915         mfpu=, mxilinx-fpu): Delete.
15916         * config/rs6000/singlefp.h: Delete.
15917         * config/rs6000/sysv4.h: Remove Xilinx FP support.
15918         * config/rs6000/t-rs6000: Ditto.
15919         * config/rs6000/t-xilinx: Delete.
15920         * config/rs6000/titan.md: Adjust for fp_type removal.
15921         * config/rs6000/vsx.md: Remove Xilinx FP support.
15922         (VStype_simple): Delete.
15923         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
15924         * config/rs6000/xfpu.h: Delete.
15925         * config/rs6000/xfpu.md: Delete.
15926         * config/rs6000/xilinx.h: Delete.
15927         * config/rs6000/xilinx.opt: Delete.
15928         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
15929         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
15931 2018-05-04  Tom de Vries  <tom@codesourcery.com>
15933         PR libgomp/85639
15934         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
15935         if ignore == 0.
15937 2018-05-04  Richard Biener  <rguenther@suse.de>
15939         PR middle-end/85627
15940         * tree-complex.c (update_complex_assignment): We are always in SSA form.
15941         (expand_complex_div_wide): Likewise.
15942         (expand_complex_operations_1): Likewise.
15943         (expand_complex_libcall): Preserve EH info of the original stmt.
15944         (tree_lower_complex): Handle removed blocks.
15945         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
15946         on complex multiplication and division libcall builtins.
15948 2018-05-04  Richard Biener  <rguenther@suse.de>
15950         PR middle-end/85574
15951         * fold-const.c (negate_expr_p): Restrict negation of operand
15952         zero of a division to when we know that can happen without
15953         overflow.
15954         (fold_negate_expr_1): Likewise.
15956 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
15958         PR libstdc++/85466
15959         * real.h (real_nextafter): Declare.
15960         * real.c (real_nextafter): New function.
15961         * fold-const-call.c (fold_const_nextafter): New function.
15962         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
15963         CASE_CFN_NEXTTOWARD.
15964         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
15965         even when arg1_mode is different from arg0_mode.
15967 2018-05-03  Nathan Sidwell  <nathan@acm.org>
15969         * doc/extend.texi (Deprecated Features): Remove
15970         -ffriend-injection.
15971         (Backwards Compatibility): Likewise.
15972         * doc/invoke.texi (C++ Language Options): Likewise.
15973         (C++ Dialect Options): Likewise.
15975 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
15977         PR target/85530
15978         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
15979         _mm512_mask_mullox_epi64): New intrinsics.
15981 2018-05-03  Tom de Vries  <tom@codesourcery.com>
15983         PR testsuite/85106
15984         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
15985         dump files): Add offload-tree.
15987 2018-05-03  Richard Biener  <rguenther@suse.de>
15989         PR tree-optimization/85615
15990         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
15991         to loops not nested in BBs loop father to avoid creating multi-entry
15992         loops.
15994 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15996         PR tree-optimization/70291
15997         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
15998         arguments.  Change return type to tree.  Emit libcall as a new
15999         statement rather than replacing existing one when inplace_p is true.
16000         (expand_complex_multiplication_components): New function.
16001         (expand_complex_multiplication): Expand floating-point complex
16002         multiplication using the above.
16003         (expand_complex_division): Rename inner_type parameter to type.
16004         Update expand_complex_libcall call-site.
16005         (expand_complex_operations_1): Update expand_complex_multiplication
16006         and expand_complex_division call-sites.
16008 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
16010         PR target/85582
16011         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16012         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16013         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
16014         the highest significant bit of the shift count mask is clear.  In
16015         check whether and[sq]i3 is needed verify that all significant bits
16016         of the shift count other than the highest are set.
16018 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16020         PR libgomp/82428
16021         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
16022         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
16023         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
16024         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
16025         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
16026         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
16027         __builtin_goacc_parlevel_size.
16029 2018-05-02  Richard Biener  <rguenther@suse.de>
16031         PR tree-optimization/85597
16032         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
16033         do not use split vect_get_vec_defs call but call vect_get_slp_defs
16034         directly.
16036 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16038         PR testsuite/85106
16039         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16040         dump files): Add ltrans-tree.
16042 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16044         PR testsuite/85106
16045         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16046         dump files): Add wpa-ipa.
16048 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
16050         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
16051         powerpc*-*-linux*paired* target.
16052         * config/rs6000/750cl.h: Delete.
16053         * config/rs6000/paired.h: Delete.
16054         * config/rs6000/paired.md: Delete.
16055         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
16056         float support.
16057         * config/rs6000/rs6000-builtin.def: Remove paired float support.
16058         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
16059         comment.  Remove paired float support.
16060         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
16061         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
16062         VECTOR_PAIRED.
16063         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
16064         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
16065         declarations.
16066         * config/rs6000/rs6000.c: Remove paired float support.
16067         (paired_expand_vector_init, paired_expand_vector_move,
16068         paired_emit_vector_compare, paired_emit_vector_cond_expr,
16069         (paired_expand_lv_builtin, paired_expand_stv_builtin,
16070         paired_expand_builtin, paired_expand_predicate_builtin,
16071         paired_init_builtins): Delete.
16072         * config/rs6000/rs6000.h: Remove paired float support.
16073         * config/rs6000/rs6000.md: Remove paired float support.
16074         (move_from_CR_ov_bit): Delete.
16075         * config/rs6000/rs6000.opt (mpaired): Delete.
16076         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
16077         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
16079 2018-05-02  Richard Biener  <rguenther@suse.de>
16081         PR middle-end/85567
16082         * gimplify.c (gimplify_save_expr): When in SSA form allow
16083         SAVE_EXPRs to compute to SSA vars.
16085 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
16087         PR target/85582
16088         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16089         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16090         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
16091         clobber operands[2], instead use a new pseudo.  Formatting fixes.
16093 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
16095         PR tree-optimization/85586
16096         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
16097         exit early for statements in the same group if the accesses are
16098         not strided.
16100 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16102         PR lto/85451
16103         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
16104         error message.
16106 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
16108         PR tree-optimization/85143
16109         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
16111 2018-05-01  Tom de Vries  <tom@codesourcery.com>
16113         PR lto/85451
16114         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
16115         not found" error message.
16117 2018-05-01  Tom de Vries  <tom@codesourcery.com>
16119         PR other/83786
16120         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
16121         * vec.c (test_ordered_remove_if): New function.
16122         (vec_c_tests): Call test_ordered_remove_if.
16123         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
16124         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
16125         * tree-vect-patterns.c (vect_pattern_recog_1): Use
16126         VEC_ORDERED_REMOVE_IF.
16128 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16130         PR tree-optimization/82665
16131         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
16132         pointer subtraction where arguments come from a memchr call.
16134 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
16136         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
16137         --push-state --as-needed and --pop-state instead of --as-needed and
16138         --no-as-needed if ld supports it.
16139         * configure: Regenerated.
16141         PR web/85578
16142         * doc/install.texi2html: Replace _002d with - and _002a with * in
16143         generated html files using sed.
16145 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16147         PR c++/85523
16148         * gcc-rich-location.c (blank_line_before_p): New function.
16149         (use_new_line): New function.
16150         (gcc_rich_location::add_fixit_insert_formatted): New function.
16151         * gcc-rich-location.h
16152         (gcc_rich_location::add_fixit_insert_formatted): New function.
16154 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16156         * selftest.c (assert_streq): Rename "expected" and "actual" to
16157         "val1" and "val2".  Extend NULL-handling to cover both inputs
16158         symmetrically, while still requiring both to be non-NULL for a pass.
16159         * selftest.h (assert_streq): Rename "expected" and "actual" to
16160         "val1" and "val2".
16161         (ASSERT_EQ): Likewise.
16162         (ASSERT_EQ_AT): Likewise.
16163         (ASSERT_KNOWN_EQ): Likewise.
16164         (ASSERT_KNOWN_EQ_AT): Likewise.
16165         (ASSERT_NE): Likewise.
16166         (ASSERT_MAYBE_NE): Likewise.
16167         (ASSERT_MAYBE_NE_AT): Likewise.
16168         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
16169         the assertion to pass.
16170         (ASSERT_STREQ_AT): Likewise.
16172 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
16174         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
16175         interaction with -pie.
16177 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16179         * selftest.h: Fix alphabetization of per-source-file selftest
16180         declarations.
16182 2018-04-30  Jason Merrill  <jason@redhat.com>
16184         PR c++/61982 - dead stores to destroyed objects.
16185         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
16186         of clobber.
16188 2018-04-30  Jason Merrill  <jason@redhat.com>
16190         * tree.c (build_clobber): New.
16191         * tree.h: Declare it.
16192         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
16194 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16196         * diagnostic-show-locus.c (layout::layout): Update for
16197         location_get_source_line returning a char_span.
16198         (struct char_span): Move to input.h.
16199         (struct correction): Update for fields in char_span becoming
16200         private.
16201         (struct source_line): Update for location_get_source_line
16202         returning a char_span.
16203         (layout::print_line): Likewise.
16204         * edit-context.c (edited_file::print_content): Likewise.
16205         (edited_file::print_diff_hunk): Likewise.
16206         (edited_file::print_run_of_changed_lines): Likewise.
16207         (edited_file::get_num_lines): Likewise.
16208         (edited_line::edited_line): Likewise.
16209         * final.c (asm_show_source): Likewise.
16210         * input.c (location_get_source_line): Convert return type
16211         from const char * to char_span, losing the final "line_len"
16212         param.
16213         (dump_location_info): Update for the above.
16214         (get_substring_ranges_for_loc): Likewise.  Use a char_span
16215         when handling the literal within the line.
16216         (test_reading_source_line): Update for location_get_source_line
16217         returning a char_span.
16218         * input.h (class char_span): Move here from
16219         diagnostic-show-locus.c, converting from a struct to a class.
16220         Make data members private.
16221         (char_span::operator bool): New.
16222         (char_span::length): New.
16223         (char_span::get_buffer): New.
16224         (char_span::operator[]): New.
16225         (char_span::subspan): Make const.
16226         (char_span::xstrdup): New.
16227         (location_get_source_line): Convert return type from const char *
16228         to char_span, losing the final "line_size" param.
16230 2018-04-30  Jan Hubicka  <jh@suse.cz>
16232         * lto-wrapper.c (ltrans_priorities): New static var.
16233         (cmp_priority): New.
16234         (run_gcc): Read priorities and if doing parallel build order
16235         the Makefile by them.
16237 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16239         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
16241 2018-04-30  Richard Biener  <rguenther@suse.de>
16243         * tree-cfg.c (verify_address): Remove base argument, add
16244         flag whether to check TREE_ADDRESSABLE and do that.
16245         (verify_expr): Remove.
16246         (verify_types_in_gimple_reference): Add pieces from verify_expr.
16247         (verify_gimple_assign_single): Likewise.
16248         (verify_gimple_switch): Likewise.
16249         (verify_expr_location_1): Dereference tp once.  Add (disabled)
16250         piece from verify_expr.
16251         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
16253 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
16255         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
16257 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
16259         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
16260         (small_data_pattern): Likewise.
16261         (arc_rewrite_small_data): Likewise.
16262         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
16263         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
16264         (get_symbol_alignment): New function.
16265         (legitimate_small_data_address_p): Likewise.
16266         (legitimate_scaled_address): Update, call
16267         legitimate_small_data_address_p.
16268         (output_sdata): New static variable.
16269         (arc_print_operand): Update how we handle small data operands.
16270         (arc_print_operand_address): Likewise.
16271         (arc_legitimate_address_p): Update, use
16272         legitimate_small_data_address_p.
16273         (arc_rewrite_small_data_p): Remove.
16274         (arc_rewrite_small_data_1): Likewise.
16275         (arc_rewrite_small_data): Likewise.
16276         (small_data_pattern): Likewise.
16277         (compact_sda_memory_operand): Update to use
16278         legitimate_small_data_address_p and get_symbol_alignment.
16279         (prepare_move_operands): Don't rewite sdata pattern.
16280         (prepare_extend_operands): Remove.
16281         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
16282         pattern.
16283         (zero_extendqisi2): Likewise.
16284         (zero_extendhisi2): Likewise.
16285         (extendqihi2): Likewise.
16286         (extendqisi2): Likewise.
16287         (extendhisi2): Likewise.
16288         (addsi3): Likewise.
16289         (subsi3): Likewise.
16290         (andsi3): Likewise.
16291         * config/arc/constraints.md (Usd): Change it to memory constraint.
16293 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
16295         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
16296         as source of std instructions.
16297         * config/arc/arc.md (movsi_insn): Update pattern predicate to
16298         allow 6-bit constants as source for store instructions.
16299         (movdi_insn): Update instruction pattern to allow 6-bit constants
16300         as source for store instructions.
16302 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
16304         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
16306 2018-04-30  Nathan Sidwell  <nathan@acm.org>
16307             Sandra Loosemore <sandra@codesourcery.com>
16309         * dumpfile.c (dump_open): Allow '-' for stdout.
16310         * doc/invoke.texi (Developer Options): Document dump filename
16311         determination early.  Document stdin/stdout selection.
16313 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
16315         Microblaze Target: PIC data text relative
16317         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
16318         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
16319         Add declaration.
16320         * config/microblaze/microblaze.h (microblaze_constant_address_p):
16321         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
16322         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
16323         New addressing mode for data-text relative position indepenedent code.
16324         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
16325         'ADDRESS_SYMBOLIC_TXT_REL'.
16326         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
16327         (microblaze_legitimate_pic_operand): Exclude function calls from
16328         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
16329         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
16330         addresses cases.
16331         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16332         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16333         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
16334         for 'address + offset'.
16335         (microblaze_expand_prologue): Add new function prologue call for
16336         'r20' assignation.
16337         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
16338         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
16339         table in case of TARGET_PIC_DATA_TEXT_REL.
16340         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
16341         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
16342         Add new macros 'UNSPEC_TEXT',
16343         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
16344         + exclude function calls from 'UNSPEC_PLT' in case of data text
16345         relative mode.
16346         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16347         new target hook for generating address diff vector tables in case of
16348         flag_pic.
16349         * doc/tm.texi : Regenerate.
16350         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
16351         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
16352         of addr diff vector generation.
16353         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16354         target hook definition.
16355         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
16356         Add default function for generate_pic_addr_diff_vec -> flag_pic.
16357         * doc/invoke.texi (Add new pic option): Add new microblaze pic
16358         option for data text relative.
16360 2018-04-30  Richard Biener  <rguenther@suse.de>
16362         * tree-chrec.h (evolution_function_is_constant_p): Remove
16363         redundant check.
16364         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
16366 2018-04-30  Richard Biener  <rguenther@suse.de>
16368         PR bootstrap/85571
16369         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
16371 2018-04-30  Richard Biener  <rguenther@suse.de>
16373         PR tree-optimization/28364
16374         PR tree-optimization/85275
16375         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
16376         copying first exit test.
16378 2018-04-28  Mark Wielaard  <mark@klomp.org>
16380         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
16381         dwarf_version >= 5.
16382         (dwarf_AT): Handle DW_AT_addr_base.
16383         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
16385 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
16387         PR target/84431
16388         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
16389         (*ashl<dwi>3_doubleword_mask_1): Ditto.
16390         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
16391         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
16393 2018-04-28  Richard Biener  <rguenther@suse.de>
16395         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
16396         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
16397         to reflect use.  Only add interesting stmts.
16399 2018-04-27  Martin Jambor  <mjambor@suse.cz>
16401         PR ipa/85549
16402         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
16403         the jump function allows for passing through aggregate values.
16405 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
16407         * input.h (in_system_header_at): Convert from macro to inline
16408         function.
16409         (from_macro_expansion_at): Likewise.
16410         (from_macro_definition_at): Likewise.
16412 2018-04-27  Jeff Law  <law@redhat.com>
16414         * config.gcc: Mark tile* targets as deprecated/obsolete.
16416 2018-04-27  Richard Biener  <rguenther@suse.de>
16418         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
16419         fix for ILP32.
16421 2018-04-27  Richard Biener  <rguenther@suse.de>
16423         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
16425 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
16427         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
16428         with Yd constraint. Set "preferred_for_speed" attribute from
16429         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
16430         with Yd constraint.
16431         (*movdi_internal): Ditto.
16432         (movti_interunit splitters): Remove
16433         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
16434         (movdi_interunit splitters): Ditto.
16435         * config/i386/constraints.md (Ye): Remove.
16436         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
16438 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16440         PR target/85512
16441         * config/aarch64/constraints.md (Usg): Limit to 31.
16442         (Usj): Limit to 63.
16444 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
16446         PR tree-optimization/85529
16447         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
16448         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
16449         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
16450         zero extension or masking of the MSB bit.
16451         (optimize_range_tests): Add FIRST_BB argument, pass it through
16452         to optimize_range_tests_var_bound.
16453         (maybe_optimize_range_tests, reassociate_bb): Adjust
16454         optimize_range_tests callers.
16456 2018-04-26  Richard Biener  <rguenther@suse.de>
16457             Jakub Jelinek  <jakub@redhat.com>
16459         * cgraph.h (symbol_table): Just declare debug method here.
16460         * symtab.c (symbol_table::debug): Define.
16462 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
16464         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
16466 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
16468         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
16469         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
16470         (*movdi_internal): Substitute Yi and Yj constraint with x
16471         and Ym and Yn constraint with y constraint.  Update "isa"
16472         attribute and set "preferred_for_speed" attribute from
16473         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
16474         (*movsi_internal): Ditto.
16475         (*movdf_internal): Ditto.
16476         (*movsf_internal): Ditto.
16477         (*zero_extendsidi2): Ditto.
16478         * config/i386/sse.md (vec_set<mode>_0): Ditto.
16479         (sse2_loadld): Ditto.
16480         (*vec_extract<ssevecmodelower>_0): Ditto.
16481         (*vec_extractv4si_0_zext_sse4): Ditto.
16482         (vec_concatv2di): Ditto.
16483         (*vec_dup<mode>): Ditto.
16484         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
16485         * config/i386/constraints.md (Yi): Remove.
16486         (Yj): Remove.
16487         (Ym): Remove.
16488         (Yn): Remove.
16490 2018-04-26  Nathan Sidwell  <nathan@acm.org>
16492         * dumpfile.c (dump_open): New.
16493         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
16494         (dump_finish): Detect stdio/stderr by value not name.
16496 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
16498         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
16500 2018-04-26  Tom de Vries  <tom@codesourcery.com>
16502         PR target/84952
16503         * config/nvptx/nvptx.c (verify_neutering_jumps)
16504         (verify_neutering_labels): New function
16505         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
16507 2018-04-26  Tom de Vries  <tom@codesourcery.com>
16509         PR target/84025
16510         * config/nvptx/nvptx.c (needs_neutering_p): New function.
16511         (nvptx_single): Use needs_neutering_p to skip over insns that do not
16512         need neutering.
16514 2018-04-26  Richard Biener <rguenther@suse.de>
16515             Tom de Vries  <tom@codesourcery.com>
16517         PR lto/85422
16518         * lto-streamer-out.c (output_function): Fixup loops if required to match
16519         discovery done in the reader.
16521 2018-04-26  Richard Biener  <rguenther@suse.de>
16523         PR tree-optimization/85116
16524         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
16525         have a loop exit from the single latch predecessor.  Remove
16526         case of header with just condition.
16527         (ch_base::copy_headers): Exclude infinite loops from any
16528         processing.
16529         (pass_ch::execute): Record exits.
16531 2018-04-26  Richard Biener  <rguenther@suse.de>
16533         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
16534         prologue cost vector and pass it to vect_get_load_cost.
16535         (vect_get_peeling_costs_all_drs): Likewise.
16536         (vect_peeling_hash_get_lowest_cost): Likewise.
16537         (vect_enhance_data_refs_alignment): Likewise.
16539 2018-04-26  Richard Biener  <rguenther@suse.de>
16541         PR middle-end/85450
16542         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
16543         checking of integer<->pointer conversions.
16544         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
16545         sign-/zero-extending pointer types.
16546         (expand_omp_for_static_chunk): Likewise.
16548 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
16549             Jean Lee  <xiaoyur347@gmail.com>
16551         * config/mips/mips.c (mips_asan_shadow_offset): New function.
16552         (TARGET_ASAN_SHADOW_OFFSET): Define.
16553         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
16554         true for -fsanitize=address.
16556 2018-04-25  Mark Wielaard  <mark@klomp.org>
16558         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
16559         shorter ones.
16561 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
16563         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
16564         than "alu", remove explicit "memory" and "imm_disp" attributes.
16565         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
16567         PR middle-end/85414
16568         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
16569         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
16570         gen_lowpart_no_emit.
16572 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
16574         PR target/85473
16575         * config/i386/i386.c (ix86_expand_builtin): Change memory
16576         operand to XI, extend p0 to Pmode.
16577         * config/i386/i386.md: Change unspec volatile and operand
16578         1 mode to XI, change operand 0 mode to P.
16580 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16582         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
16583         GET_MODE_MASK before any checking.
16584         (nds32_can_use_bset_p): Likewise.
16585         (nds32_can_use_btgl_p): Likewise.
16587 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16589         * config/nds32/nds32-doubleword.md: New define_split pattern for
16590         illegal register number.
16592 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16594         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
16596 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16598         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
16600 2018-04-25  Richard Biener  <rguenther@suse.de>
16602         * lto-streamer.h (LTO_major_version): Bump to 8.
16604 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
16606         * BASE-VER: Set to 9.0.0.
16608 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
16610         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
16611         in __abskf2 and __powikf2.
16613 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16615         PR target/85512
16616         * config/aarch64/constraints.md (Usg, Usj): New constraints.
16617         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
16618         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
16619         Use the above on operand 2.  Reindent.
16620         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
16622 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
16624         PR target/85485
16625         * common/config/i386/i386-common.c (ix86_handle_option): Don't
16626         handle OPT_mcet.
16627         * config/i386/i386.opt (mcet): Removed.
16628         * doc/install.texi: Remove -mcet documentation.
16629         * doc/invoke.texi: Likewise.
16631 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
16633         PR target/85485
16634         * doc/install.texi: Remove -mcet from bootstrap-cet.
16636 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
16638         PR target/85511
16639         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
16640         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
16641         if TARGET_64BIT.
16643         PR target/85503
16644         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
16645         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
16646         containing a CONST_VECTOR.
16648 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
16650         * doc/install.texi: Update newlib dependency for nvptx.
16652 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
16654         PR target/85508
16655         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
16656         instead of INTVAL when shifting x left.
16658 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
16660         PR tree-optimization/85478
16661         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
16662         vect_grouped_store_supported for single element vectors.
16664 2018-04-24  Richard Biener  <rguenther@suse.de>
16666         PR target/85491
16667         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
16668         load cost increase to the case of non-constant step.
16670 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
16672         PR target/84828
16673         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
16674         destination if any_malformed_asm.
16676 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
16678         PR middle-end/85496
16679         * expr.c (store_field): In the bitfield case, if the value comes from
16680         a function call and is returned in registers by means of a PARALLEL,
16681         do not change the mode of the temporary unless BLKmode and VOIDmode.
16683 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
16685         PR rtl-optimization/85423
16686         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
16687         dependencies to debug insns when the previous insn is non-debug.
16689 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
16691         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
16692         enums into a single definition.
16693         (fls): Fix predicates and printing.
16694         (seti): Likewise.
16696 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
16698         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
16699         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
16700         and short u6 immediate.
16701         (check_if_valid_sleep_operand): Remove.
16702         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
16704 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16706         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
16707         flag_always_save_lp condition.
16708         * config/nds32/nds32.opt (malways-save-lp): New option.
16710 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
16712         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
16713         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
16714         * config/nds32/nds32.h
16715         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
16716         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
16718 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
16720         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
16721         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
16723 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
16724             Chung-Ju Wu  <jasonwucj@gmail.com>
16726         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
16727         Declare.
16728         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
16729         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
16731 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16733         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
16735 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16737         * config/nds32/nds32-protos.h (nds32_data_alignment,
16738         nds32_local_alignment): Declare.
16739         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
16740         nds32_local_alignment): New functions.
16741         (TARGET_CONSTANT_ALIGNMENT): Define.
16742         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
16744 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16746         * config/nds32/nds32.c
16747         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
16748         (TARGET_MODES_TIEABLE_P): Likewise.
16750 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16752         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
16753         level Ofast and Og.
16755 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
16756             Chung-Ju Wu  <jasonwucj@gmail.com>
16758         * config/nds32/constants.md (unspec_volatile_element): Add enum values
16759         for unaligned access.
16760         * config/nds32/nds32-intrinsic.c: Implementation of expanding
16761         unaligned access.
16762         * config/nds32/nds32-intrinsic.md: Likewise.
16763         * config/nds32/nds32_intrinsic.h: Likewise.
16764         * config/nds32/nds32.h (nds32_builtins): Likewise.
16765         * config/nds32/nds32.opt (munaligned-access): New option.
16766         * config/nds32/nds32.c (nds32_asm_file_start): Display
16767         flag_unaligned_access status.
16769 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
16771         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
16772         -mno-relax is present.
16773         * config/riscv/linux.h (LINK_SPEC): Ditto.
16775 2018-04-20  Martin Sebor  <msebor@redhat.com>
16777         PR c/85365
16778         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
16779         for null pointers.
16780         (gimple_fold_builtin_stxcpy_chk): Same.
16781         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
16783 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
16785         PR target/85456
16786         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
16787         __powikf2 when long double is IEEE 128-bit.
16789 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
16791         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
16792         step to make sure stack always aligned.
16794 2018-04-20  Carl Love  <cel@us.ibm.com>
16796         PR target/83402
16797         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
16798         size check for arg0.
16800 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
16801             Tom de Vries  <tom@codesourcery.com>
16803         PR target/85445
16804         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
16805         Emit insns for calls too.
16806         (nvptx_find_par): Always look for worker-level predecessor insn.
16807         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
16808         calls.
16809         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
16810         (nvptx_process_pars): Propagate frames for calls.
16812 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
16814         PR target/85469
16815         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
16816         Removed.
16817         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
16818         (ix86_handle_option): Don't handle OPT_mibt.
16819         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
16820         __SHSTK__.
16821         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
16822         has_ibt and ibt.
16823         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
16824         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
16825         (ix86_target_macros): Define __CET__ with flag_cf_protection
16826         for -fcf-protection.
16827         * config/i386/i386.c (isa2_opts): Remove -mibt.
16828         * config/i386/i386.h (TARGET_IBT): Removed.
16829         (TARGET_IBT_P): Likewise.
16830         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
16831         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
16832         * config/i386/i386.opt (mcet): Update help message.
16833         (mshstk): Likewise.
16834         (mibt): Removed.
16835         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
16836         -mcet as an alias for -mshstk.
16838 2018-04-20  Richard Biener <rguenther@suse.de>
16840         PR middle-end/85475
16841         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
16842         complexity by forcing a single use of the multiply operand.
16844 2018-04-20  Martin Jambor  <mjambor@suse.cz>
16846         ipa/85449
16847         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
16848         recursion dependency to only apply to non-clones.
16850 2018-04-20  Martin Jambor  <mjambor@suse.cz>
16852         ipa/85447
16853         * ipa-cp.c (create_specialized_node): Check that clones of
16854         self-recursive edges exist during IPA-CP.
16856 2018-04-19  Toon Moene  <toon@moene.org>
16858         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
16859         by -O3.
16861 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
16863         PR tree-optimization/85467
16864         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
16865         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
16866         VECTOR_CST element to type.
16868 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
16870         PR target/85397
16871         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
16872         * config/i386/i386.md (builtin_setjmp_setup): Removed.
16873         (builtin_longjmp): Likewise.
16874         (save_stack_nonlocal): New pattern.
16875         (restore_stack_nonlocal): Likewise.
16877 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
16879         PR target/85404
16880         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16881         Replace ASM_OUTPUT_LABEL with fprintf.
16883 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
16885         PR target/85417
16886         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16887         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
16888         * config/i386/i386-c.c (ix86_target_macros_internal): Also
16889         define __IBT__ and __SHSTK__ for -fcf-protection.
16890         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
16891         TARGET_IBT.
16892         (ix86_trampoline_init): Likewise.
16893         (x86_output_mi_thunk): Likewise.
16894         (ix86_notrack_prefixed_insn_p): Likewise.
16895         (ix86_option_override_internal): Don't disallow -fcf-protection.
16896         * config/i386/i386.md (rdssp<mode>): Also enable for
16897         -fcf-protection.
16898         (incssp<mode>): Likewise.
16899         (nop_endbr): Likewise.
16900         * config/i386/i386.opt (mcet): Change help message to built-in
16901         functions only.
16902         (mibt): Likewise.
16903         (mshstk): Likewise.
16904         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
16905         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
16906         enable CET built-in functions.
16908 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
16910         * common/config/i386/i386-common.c
16911         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
16912         OPTION_MASK_ISA_MOVDIRI_UNSET,
16913         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
16914         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
16915         * config.gcc (movdirintrin.h): New header.
16916         * config/i386/cpuid.h (bit_MOVDIRI,
16917         bit_MOVDIR64B): New bits.
16918         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
16919         and -mmvodir64b.
16920         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
16921         (VOID, PVOID, PCVOID)): New function types.
16922         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
16923         __builtin_ia32_directstoreu_u64,
16924         __builtin_ia32_movdir64b): New builtins.
16925         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
16926         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
16927         and -mmovdiri.
16928         (ix86_valid_target_attribute_inner_p): Ditto.
16929         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
16930         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
16931         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
16932         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
16933         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
16934         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
16935         (movdiri<mode>, movdir64b_<mode>): New.
16936         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
16937         * config/i386/immintrin.h: Include movdirintrin.h.
16938         * config/i386/movdirintrin.h: New file.
16939         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
16941 2018-04-19  Richard Biener  <rguenther@suse.de>
16943         PR middle-end/85455
16944         * cfg.c (clear_bb_flags): When loop state says we have
16945         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
16947 2018-04-19  Richard Biener  <rguenther@suse.de>
16949         PR tree-optimization/84737
16950         * tree-vect-data-refs.c (vect_copy_ref_info): New function
16951         copying restrict info.
16952         (vect_setup_realignment): Use it.
16953         * tree-vectorizer.h (vect_copy_ref_info): Declare.
16954         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
16955         the first DR to all generated stores.
16956         (vectorizable_load): Likewise for loads.
16958 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
16960         PR tree-optimization/85446
16961         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
16962         the integral and pointer types to have the same precision.
16964         * doc/install.texi: Document --disable-cet being the default and
16965         --enable-cet=auto.
16967 2018-04-18  Martin Liska  <mliska@suse.cz>
16969         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
16970         style.
16972 2018-04-18  Martin Liska  <mliska@suse.cz>
16974         Revert
16975         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
16977         PR ipa/83983
16978         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16979         arguments if they are comparable.
16981 2018-04-18  Martin Liska  <mliska@suse.cz>
16983         Revert
16984         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
16986         PR lto/84805
16987         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16988         incomplete types.
16990 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
16992         PR target/85388
16993         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
16994         ENDBR after calling __morestack.
16996 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
16998         PR jit/85384
16999         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
17000         by using gcc_base_ver to generate a gcc_driver_version, and use
17001         it when generating GCC_DRIVER_NAME.
17002         * configure: Regenerate.
17004 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
17006         PR target/81084
17007         * config.gcc: Obsolete powerpc*-*-*spe*.
17009 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17011         PR debug/84637
17012         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
17013         (stabstr_D): Change type of unum from unsigned int to
17014         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
17015         type.
17017 2018-04-17  Jim Wilson  <jimw@sifive.com>
17019         PR 84856
17020         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
17021         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
17022         Set arg_pointer_offset after using pretend_args_size.
17024 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17026         PR rtl-optimization/85431
17027         * dse.c (record_store): Ignore zero width stores.
17029         PR sanitizer/85230
17030         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
17031         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
17032         __builtin_stack_restore rather than after it.
17033         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
17034         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
17035         argument instead of virtual_dynamic_stack_rtx.
17037 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17039         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
17040         New prototype.
17041         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
17042         Add note to error message to explain internal mapping of overloaded
17043         built-in function name to non-overloaded built-in function name.
17044         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
17045         function.
17047 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
17049         PR target/85424
17050         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
17051         where the inputs overlap with the output.
17053 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17055         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
17056         (=v, v) alternative and explicit "memory" attribute.
17057         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
17058         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17059         attributes.
17060         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
17061         "sselog1" type instead of "sselog".
17062         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
17063         "sselog".  Remove explicit "memory" attribute.
17064         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
17065         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17066         attributes.
17067         (vec_extract_hi_v32hi): Merge all alternatives into one, use
17068         "sselog1" type instead of "sselog".  Remove explicit "memory"
17069         attribute.
17070         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
17071         use "sselog1" type instead of "sselog".  Remove explicit "memory"
17072         attribute.
17073         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
17074         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17075         attributes.
17076         (vec_extract_hi_v64qi): Merge all alternatives into one, use
17077         "sselog1" type instead of "sselog".  Remove explicit "memory"
17078         attribute.
17079         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
17080         use "sselog1" type instead of "sselog".  Remove explicit "memory"
17081         attribute.
17083         PR target/85430
17084         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
17086         PR middle-end/85414
17087         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
17088         on a SUBREG.
17090 2018-04-17  Martin Jambor  <mjambor@suse.cz>
17092         PR ipa/85421
17093         * ipa-cp.c (create_specialized_node): Call
17094         expand_all_artificial_thunks if necessary.
17096 2018-04-17  Martin Liska  <mliska@suse.cz>
17098         PR lto/85405
17099         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
17100         in message, remote space in between '_G' and '('.
17102 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17104         PR target/85281
17105         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
17106         avx512f_vmcmp<mode>3<round_saeonly_name>,
17107         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
17108         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
17109         avx512f_rndscale<mode><round_saeonly_name>,
17110         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
17111         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
17112         Use %<iptr>2 instead of %2 for -masm=intel.
17113         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
17114         avx512f_vcvttss2usi<round_saeonly_name>,
17115         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
17116         -masm=intel.
17117         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
17118         avx512f_vcvttsd2usi<round_saeonly_name>,
17119         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
17120         Use %q1 instead of %1 for -masm=intel.
17121         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
17122         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
17123         of %3 for -masm=intel.
17124         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
17125         -masm=intel.
17126         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
17127         -masm=intel.
17128         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
17129         -masm=intel.
17130         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
17131         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
17132         %g1.
17133         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
17134         -masm=intel.
17135         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
17136         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
17137         %g1 and one with %0 and %1.
17138         (avx512er_vmrcp28<mode><round_saeonly_name>,
17139         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
17140         %1 for -masm=intel.
17141         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
17142         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
17143         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
17144         of %0 and %{%4%} for -masm=intel.
17145         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
17146         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
17147         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
17148         order of %0 and %{%5%}%{z%} for -masm=intel.
17150 2018-04-17  Jan Hubicka  <jh@suse.cz>
17152         PR lto/85405
17153         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
17155 2018-04-17  Martin Liska  <mliska@suse.cz>
17157         PR ipa/85329
17158         * multiple_target.c (create_dispatcher_calls): Set apostrophes
17159         for target_clone error message.  Make default implementation
17160         clone to be a local declaration.
17161         (separate_attrs): Add new argument and check for an empty
17162         string.
17163         (expand_target_clones): Handle it.
17164         (ipa_target_clone): Make redirection just for target_clones
17165         functions.
17167 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
17168             Tom de Vries  <tom@codesourcery.com>
17170         PR middle-end/84955
17171         * omp-expand.c (expand_oacc_for): Add dummy false branch for
17172         tiled basic blocks without omp continue statements.
17174 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
17176         PR target/83660
17177         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
17178         vec_extract expression as having side effects to make sure it gets
17179         a cleanup point.
17181 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
17183         PR target/85403
17184         * config/i386/i386.c (get_builtin_code_for_version): Check
17185         error_mark_node.
17187 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
17189         PR target/84331
17190         * config.gcc: Support "skylake".
17191         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17192         PROCESSOR_SKYLAKE.
17193         * config/i386/i386.c (m_SKYLAKE): Define.
17194         (processor_target_table): Add "skylake".
17195         (ix86_option_override_internal): Add "skylake".
17196         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
17197         PROCESSOR_CANNONLAKE.
17198         (get_builtin_code_for_version): Fix priority for
17199         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
17200         PROCESSOR_SKYLAKE-AVX512.
17201         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
17202         (processor_type): Add PROCESSOR_SKYLAKE.
17204 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
17205             Jason Merrill  <jason@redhat.com>
17207         PR c++/85112
17208         * convert.c (convert_to_integer_1): Use direct recursion for
17209         enumeral types and types with a precision less than the number
17210         of bits in their mode.
17212 2018-04-16  Julia Koval  <julia.koval@intel.com>
17214         PR target/84413
17215         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
17216         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
17218 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
17220         PR target/85293
17221         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
17222         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
17223         and -mno-direct-move.
17225 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
17227         PR target/83402
17228         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
17229         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
17230         Ensure negative shifts result in {0}.
17232 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
17234         PR rtl-optimization/79916
17235         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
17236         regs (if any) to define how to gnerate SD moves when LRA is in
17237         progress.
17239 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
17241         PR rtl-optimization/85393
17242         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
17243         * except.c (expand_dw2_landing_pad_for_region): Make static.
17244         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
17245         a label and unconditional jump to old_bb, rather than
17246         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
17247         basic block.
17249         PR rtl-optimization/85376
17250         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
17251         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
17252         instead of a specific value.
17254 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
17255             Bin Cheng  <bin.cheng@arm.com>
17257         PR tree-optimization/82965
17258         PR tree-optimization/83991
17259         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
17260         by_profile_only parameter.
17261         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
17262         information if the loop was predicted to iterate too many times.
17263         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
17265 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
17267         PR lto/71991
17268         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
17269         always inline.
17271 2018-04-13  Martin Liska  <mliska@suse.cz>
17272             Jakub Jelinek  <jakub@redhat.com>
17274         PR middle-end/81657
17275         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
17276         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
17277         * builtins.c (expand_builtin_memory_copy_args): Use
17278         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
17279         handle dest_addr == pc_rtx.
17281 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
17283         PR target/85291
17284         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
17285         asked to not generate direct moves.
17286         (fix_trunc<mode>si2_stfiwx): Similar.
17287         (fix_trunc<mode>si2_internal): Similar.
17289 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
17291         PR debug/83157
17292         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
17293         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
17294         lookup if dest in some wider mode is known to be const0_rtx and
17295         if so, record permanent equivalence for it to be ZERO_EXTEND of
17296         the narrower mode destination.
17298 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
17300         * lto-streamer-out.c (output_function): Revert 259346.
17301         * omp-expand.c (expand_oacc_for): Likewise.
17303 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
17305         PR rtl-optimization/85354
17306         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
17307         * sel-sched.c (sel_global_init): ... here.
17309 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
17311         PR target/85238
17312         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
17313         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
17314         mode for PE-COFF targets.
17315         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
17316         (i386_pe_asm_lto_end): Likewise.
17317         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
17318         (TARGET_ASM_LTO_END): Likewise.
17319         * config/i386/winnt.c (saved_debug_info_level): New static variable.
17320         (i386_pe_asm_lto_start): New function.
17321         (i386_pe_asm_lto_end): Likewise.
17323 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
17324             Richard Biener  <rguenther@suse.de>
17326         PR middle-end/84955
17327         * lto-streamer-out.c (output_function): Fix CFG loop state before
17328         streaming out.
17329         * omp-expand.c (expand_oacc_for): Handle calls to internal
17330         functions like regular functions.
17332 2018-04-12  Richard Biener  <rguenther@suse.de>
17334         PR lto/85371
17335         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
17336         for the early LTO debug to properly generate references to it
17337         during DIE emission.  Do not re-use that for the skeleton for
17338         split-dwarf.
17339         (dwarf2out_early_finish): Likewise.
17341 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
17343         PR target/85328
17344         * config/i386/sse.md
17345         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
17346         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
17347         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
17348         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
17349         and output is a reg, avoid creating invalid lowpart subreg, but
17350         instead split into a 512-bit move.  Don't split if not AVX512VL,
17351         input is xmm16+ reg and output is a mem.
17352         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
17353         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
17354         xmm16+ reg and output is a mem.
17356 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17358         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
17359         also for flag_dwarf2_cfi_asm.
17361 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
17363         PR rtl-optimization/85342
17364         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
17365         a bool scalar var inside of the loop instead.  Don't try to update
17366         recog_data.operand after failed apply_change_group.
17368 2018-04-12  Tom de Vries  <tom@codesourcery.com>
17370         PR target/85296
17371         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
17372         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
17373         array with flexible array member as array without given dimension.
17374         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
17375         argument for undefined param to true.
17377 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
17379         PR target/85321
17380         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17381         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
17382         from PowerPC section.
17383         * config/rs6000/sysv4.opt (mcall-): Improve help text.
17384         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
17385         help text that is too long.
17386         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
17387         help text that is too long.
17388         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
17389         help text that is too long.
17391 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
17393         * config/alpha/alpha.md (stack_probe_internal): Rename
17394         from "probe_stack".  Update all callers.
17396 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
17398         PR rtl-optimization/84566
17399         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
17400         sched_macro_fuse_insns.
17402 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
17404         PR target/84301
17405         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
17406         (compute_block_dependences): ... from here.
17408 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
17410         PR tree-optimization/85331
17411         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
17412         from int to HOST_WIDE_INT.
17414 2018-04-11  Martin Jambor  <mjambor@suse.cz>
17416         PR ipa/84149
17417         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
17418         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
17419         not the same as the source val.
17420         (cgraph_edge_brings_value_p): New parameter.
17421         (gather_edges_for_value): Pass destination value to
17422         cgraph_edge_brings_value_p.
17423         (perhaps_add_new_callers): Likewise.
17424         (get_info_about_necessary_edges): Likewise and exclude values brought
17425         only by self-recursive edges.
17426         (create_specialized_node): Redirect only clones of self-calling edges.
17427         (+self_recursive_pass_through_p): New function.
17428         (find_more_scalar_values_for_callers_subset): Use it.
17429         (find_aggregate_values_for_callers_subset): Likewise.
17430         (known_aggs_to_agg_replacement_list): Removed.
17431         (decide_whether_version_node): Re-calculate known constants for all
17432         remaining context clones.
17434 2018-04-11  Richard Biener  <rguenther@suse.de>
17436         PR lto/85339
17437         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
17438         from early DWARF output.
17439         (dwarf2out_early_finish): Output line info unconditionally into
17440         early DWARF and add reference to it.
17442 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
17444         PR target/85281
17445         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
17446         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
17447         other than V2DFmode using iptr mode attribute.
17448         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
17450 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
17452         PR rtl-optimization/84659
17453         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
17455 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
17457         PR debug/85302
17458         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
17459         SIZEP is NULL.
17460         (output_loc_list): Pass address of a dummy size variable even in the
17461         locview handling loop.
17462         (index_location_lists): Add comment on why skip_loc_list_entry can't
17463         call size_of_locs.
17465 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17467         PR target/85261
17468         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
17469         into register.
17471 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
17473         PR target/85321
17474         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17475         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
17476         and -mstring-compare-inline-limit.
17478 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
17480         PR target/85287
17481         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
17482         for stack clash protection in a register whenever we need it to be in
17483         a register.
17485 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
17487         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
17488         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
17490 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
17492         PR target/85321
17493         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
17494         the help text.
17495         (mlong-double-): Ditto.
17496         * config/rs6000/sysv4.opt (msdata=): Ditto.
17497         (mtls-size=): Ditto.
17499 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17501         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17502         erroneous entries for
17503         "vector int vec_ldl (int, long int *)", and
17504         "vector unsigned int vec_ldl (int, unsigned long int *)".
17505         Add comments and entries for
17506         "vector bool char vec_ldl (int, bool char *)",
17507         "vector bool short vec_ldl (int, bool short *)",
17508         "vector bool int vec_ldl (int, bool int *)",
17509         "vector bool long long vec_ldl (int, bool long long *)",
17510         "vector pixel vec_ldl (int, pixel *)",
17511         "vector long long vec_ldl (int, long long *)",
17512         "vector unsigned long long vec_ldl (int, unsigned long long *)".
17513         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
17514         type tree bool_long_long_type_node and correct definition of
17515         bool_V2DI_type_node to make reference to this new type tree.
17516         (rs6000_mangle_type): Replace erroneous reference to
17517         bool_long_type_node with bool_long_long_type_node.
17518         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
17519         comments to emphasize sign distinctions for char and int types and
17520         replace RS6000_BTI_bool_long constant with
17521         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
17522         use of RS6000_BTI_pixel.
17523         (bool_long_type_node): Remove this macro definition.
17524         (bool_long_long_type_node): New macro definition
17526 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
17528         PR rtl-optimization/85300
17529         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
17530         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
17531         simplify_unary_operation fails.
17533 2018-04-10  Martin Liska  <mliska@suse.cz>
17535         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
17536         cgraph_edge and ipa_ref.
17538 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
17540         PR target/85177
17541         PR target/85255
17542         * config/i386/sse.md
17543         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
17544         computation of the VEC_MERGE selector from mask.
17545         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
17546         Fix decoding of the VEC_MERGE selector into mask.
17548 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
17550         PR tree-optimization/85286
17551         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
17553 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
17555         * final.c (final_1): Set insn_last_address as well as
17556         insn_current_address.
17558 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17560         PR target/85173
17561         * explow.c (emit_stack_probe): Call validize_mem on memory location
17562         before passing it to gen_probe_stack.  Create address operand and
17563         legitimize it for the probe_stack_address case.
17565 2018-04-09  Jan Hubicka  <jh@suse.cz>
17567         PR lto/85078
17568         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
17569         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
17570         * tree.c (free_lang_data_in_type): Fix handling of binfos;
17571         walk basetypes.
17572         (free_lang_data): Rebuild type inheritance graph.
17574 2018-04-09  Martin Sebor  <msebor@redhat.com>
17576         * invoke.texi (-finline-small-functions): Mention other optimization
17577         options.
17578         (-findirect-inlining, -fpartial-inlining): Same.
17579         (-finline-functions-called-once): Same.
17580         (-freorder-blocks-and-partition): Same.
17582 2018-04-09  Jan Hubicka  <jh@suse.cz>
17584         PR rtl/84058
17585         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
17586         jumps; choose last target that matches the criteria (i.e.
17587         no partition changes for non-crossing jumps).
17588         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
17589         support for redirecting crossing jumps to non-crossing.
17591 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
17593         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
17594         also for naked functions.
17596 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
17598         * config/arc/arc.md (add_shift): New pattern.
17599         (add_shift2): Likewise.
17600         (sub_shift): Likewise.
17601         (sub_shift_cmp0_noout): Likewise.
17602         (compare_si_ashiftsi): Likewise.
17603         (xbfu_cmp0_noout): New combine pattern.
17604         (xbfu_cmp0"): Likewise.
17605         (movsi_set_cc_insn): Place the predicable variant first.
17606         (commutative_binary_cmp0_noout): Remove clobber.
17607         (commutative_binary_cmp0): New pattern.
17608         (noncommutative_binary_cmp0): Likewise.
17609         (noncommutative_binary_cmp0_noout): Likewise.
17610         (noncommutative_binary_comparison_result_used): Removed.
17611         (rsub_cmp0): New pattern.
17612         (rsub_cmp0_noout): Likewise.
17613         (extzvsi): Changed, keep only meaningful variants.
17614         (SQH, SEZ): New iterators.
17615         (SQH_postfix): New mode attribute.
17616         (SEZ_prefix): New code attribute.
17617         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
17618         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
17619         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
17620         of numerical value.
17621         (noncommutative_operator): Check the availability of barrel
17622         shifter option.
17624 2018-04-09  Richard Biener  <rguenther@suse.de>
17626         PR tree-optimization/85284
17627         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
17628         Only use the niter constraining form of simple_iv when the exit
17629         is always executed.
17631 2018-04-09  Tom de Vries  <tom@codesourcery.com>
17633         PR target/84041
17634         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17635         (define_expand "*memory_barrier"): New define_expand.
17636         (define_insn "memory_barrier"): New insn.
17638 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
17640         PR rtl-optimization/80463
17641         PR rtl-optimization/83972
17642         PR rtl-optimization/83480
17644         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
17645         correct producer for the insn.
17646         (tidy_control_flow): Fixup seqnos in case of debug insns.
17648 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
17650         PR rtl-optimization/83913
17652         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
17653         different sched-times when merging exprs.
17655 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
17657         PR rtl-optimization/83962
17659         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
17660         tidy_fallthru_edge and tidy_control_flow.
17662 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
17664         PR rtl-optimization/83530
17666         * sel-sched.c (force_next_insn): New global variable.
17667         (remove_insn_for_debug): When force_next_insn is true, also leave only
17668         next insn in the ready list.
17669         (sel_sched_region): When the region wasn't scheduled, make another pass
17670         over it with force_next_insn set to 1.
17672 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
17674         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
17675         into tm_file.
17676         * config/nds32/constants.md (unspec_volatile_element): Add enum values
17677         for interrupt control.
17678         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17679         functions for interrupt control.
17680         * config/nds32/nds32-intrinsic.md: Likewise.
17681         * config/nds32/nds32_intrinsic.h: Likewise.
17682         * config/nds32/nds32.h (nds32_builtins): Likewise.
17684 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
17686         * config/nds32/nds32.c (nds32_init_machine_status,
17687         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
17688         strict_aligned_p field.
17689         (nds32_expand_to_rtl_hook): New function.
17690         (TARGET_EXPAND_TO_RTL_HOOK): Define.
17691         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
17693 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17694             Chung-Ju Wu  <jasonwucj@gmail.com>
17696         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
17697         * config/nds32/nds32-n7.md: New file.
17698         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
17699         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
17700         pipeline.
17701         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
17702         * config/nds32/nds32.md (pipeline_model): Add n7.
17703         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
17704         * config/nds32/pipelines.md: Include n7 settings.
17706 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17707             Chung-Ju Wu  <jasonwucj@gmail.com>
17709         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
17710         * config/nds32/nds32-e8.md: New file.
17711         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
17712         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
17713         pipeline.
17714         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
17715         * config/nds32/nds32.md (pipeline_model): Add e8.
17716         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
17717         * config/nds32/pipelines.md: Include e8 settings.
17719 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17720             Chung-Ju Wu  <jasonwucj@gmail.com>
17722         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
17723         * config/nds32/nds32-n8.md: New file.
17724         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
17725         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
17726         pipeline.
17727         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
17728         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
17729         * config/nds32/nds32.md (pipeline_model): Add n8.
17730         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
17731         * config/nds32/pipelines.md: Include n8 settings.
17733 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17734             Chung-Ju Wu  <jasonwucj@gmail.com>
17736         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
17737         * config/nds32/nds32-n9-2r1w.md: New file.
17738         * config/nds32/nds32-n9-3r2w.md: New file.
17739         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
17740         nds32_register_ports): New or modify for cpu n9.
17741         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
17742         pipeline.
17743         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
17744         * config/nds32/nds32-utils.c: New file.
17745         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
17746         TARGET_MUL_SLOW): Define.
17747         * config/nds32/nds32.md (pipeline_model): New attribute.
17748         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
17749         New options that support cpu n9.
17750         * config/nds32/pipelines.md: Include n9 settings.
17751         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
17753 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
17755         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
17756         information if necessary.
17757         (output_cond_branch_compare_zero): Likewise.
17758         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
17759         (nds32_target_alignment): Refine for alignment.
17760         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
17761         (FUNCTION_BOUNDARY): Modify.
17762         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
17763         align case.
17764         * config/nds32/nds32.opt (malways-align, malign-functions): New.
17766 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
17768         * config/nds32/constants.md (unspec_volatile_element): Add values for
17769         TLB operation and data prefetch.
17770         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17771         functions for TLB operation and data prefetch.
17772         * config/nds32/nds32-intrinsic.md: Likewise.
17773         * config/nds32/nds32_intrinsic.h: Likewise.
17774         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
17775         (nds32_print_operand): Likewise.
17776         * config/nds32/nds32.h (nds32_builtins): Likewise.
17778 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
17779         Andrew Pinski <pinsika@gcc.gnu.org>
17781         PR middle-end/82976
17782         * match.pd: Use constant_boolean_node of correct type instead of
17783         boolean_true_node or boolean_false_node for simplifying
17784         pointer comparisons to zero.
17786 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
17788         PR tree-optimization/80021
17789         * tree.c (verify_type_variant): Make error call in verify_variant_match
17790         translatable and remove final full stop.
17792 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17794         * config/nds32/constants.md (unspec_volatile_element): Add
17795         UNSPEC_VOLATILE_EH_RETURN.
17796         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
17797         nds32_output_stack_pop): Support dwarf exception handling process.
17798         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
17799         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
17800         exception handling process.
17801         (nds32_compute_stack_frame): Likewise.
17802         (nds32_return_addr_rtx): Likewise.
17803         (nds32_initial_elimination_offset): Likewise.
17804         (nds32_expand_prologue): Likewise.
17805         (nds32_expand_epilogue): Likewise.
17806         (nds32_dynamic_chain_address): New function.
17807         * config/nds32/nds32.h (machine_function): Add fields for dwarf
17808         exception handling.
17809         (DYNAMIC_CHAIN_ADDRESS): Define.
17810         (EH_RETURN_DATA_REGNO): Define.
17811         (EH_RETURN_STACKADJ_RTX): Define.
17812         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
17813         patterns for dwarf exception handling.
17815 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17817         * config/nds32/nds32.h: Clean up obsolete macros.
17819 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17821         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17822         Add enum values for particular instructions.
17823         * config/nds32/nds32-intrinsic.c: Implementation of expanding
17824         particular intrinsic functions.
17825         * config/nds32/nds32-intrinsic.md: Likewise.
17826         * config/nds32/nds32_intrinsic.h: Likewise.
17827         * config/nds32/nds32.h (nds32_builtins): Likewise.
17828         * config/nds32/nds32.md (type): Add pbsad and pbsada.
17829         (btst, ave): New patterns for particular instructions.
17831 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17833         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17834         Add enum values for atomic load/store and memory sync.
17835         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
17836         and memory sync.
17837         * config/nds32/nds32-intrinsic.md: Likewise.
17838         * config/nds32/nds32_intrinsic.h: Likewise.
17839         * config/nds32/nds32.h (nds32_builtins): Likewise.
17841 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
17843         PR tree-optimization/85257
17844         * fold-const.c (native_encode_vector): If not all elts could fit
17845         and off is -1, return 0 rather than offset.
17846         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
17847         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
17848         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
17849         adjust buffer in native_interpret_expr call.
17851 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17853         * config/nds32/constants.md (unspec_volatile_element): Add cache
17854         control enum values.
17855         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
17856         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
17857         * config/nds32/nds32.c (nds32_cctl_names): New.
17858         (nds32_print_operand): Handle cache control register names.
17859         * config/nds32/nds32.h (nds32_builtins): New enum values.
17860         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
17861         macros.
17862         * config/nds32/nds32.md (type): Add mmu.
17863         * config/nds32/pipelines.md (simple_insn): Add mmu.
17865 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17867         * config/nds32/nds32.md (type): Remove call.
17868         * config/nds32/pipelines.md (simple_insn): Likewise.
17870 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17872         * config/nds32/constants.md (unspec_volatile_element): Add
17873         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
17874         UNSPEC_VOLATILE_FMFCFG.
17875         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
17876         description for fmfcfg and fmfcsr.
17877         (bdesc_1arg): Add fmtcsr.
17878         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
17879         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
17880         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
17881         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
17882         unspec_fmfcfg): New patterns.
17883         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
17884         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
17885         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
17886         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
17887         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
17888         __nds32__fmfcfg): Define.
17890 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17892         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
17893         intrinsic register names.
17894         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
17895         intrinsic register enum values and macros.
17897 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17899         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
17900         for load/store addressing form.
17901         (nds32_print_operand_address): Likewise.
17903 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
17905         PR target/85196
17906         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
17907         based on LABEL_REF.  Remove useless assertion.
17908         (pic_address_needs_scratch): Fix formatting.
17909         (sparc_legitimize_pic_address): Minor tweaks.
17910         (sparc_delegitimize_address): Adjust assertion accordingly.
17911         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
17912         into symbolic_operand.
17913         (movsi_high_pic_label_ref): Likewise.
17914         (movsi_lo_sum_pic_label_ref): Likewise.
17915         (movdi_pic_label_ref): Likewise.
17916         (movdi_high_pic_label_ref): Likewise.
17917         (movdi_lo_sum_pic_label_ref): Likewise.
17919 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
17921         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
17922         custom LIB_SPEC setup.
17924 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
17925             Kito Cheng  <kito.cheng@gmail.com>
17927         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
17928         * config/riscv/freebsd.h: New.
17930 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
17932         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
17933         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
17934         file.
17936 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
17937             Kito Cheng  <kito.cheng@gmail.com>
17939         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
17940         nds32_output_call, nds32_symbol_binds_local_p): New functions.
17941         * config/nds32/nds32-protos.h (nds32_output_call,
17942         nds32_output_return): Declare.
17943         * config/nds32/nds32.md: Refine all the call and return patterns.
17945 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
17947         PR debug/85252
17948         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
17949         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
17951         PR rtl-optimization/84872
17952         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
17953         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
17954         EDGE_CROSSING edge.
17956 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
17958         * expr.c (copy_blkmode_to_reg): Revert 254862.
17959         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
17961 2018-04-06  Richard Biener  <rguenther@suse.de>
17963         PR middle-end/85244
17964         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
17965         after seeing a component reference with an adjacent field.  Treat
17966         refs to arrays at struct end of external decls similar to
17967         refs to unconstrained commons.
17969 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
17971         PR sanitizer/85213
17972         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
17973         look through SAVE_EXPRs with non-side-effects argument.  Adjust
17974         recursive calls.
17975         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
17976         save_p here.
17978 2018-04-06  Richard Biener  <rguenther@suse.de>
17980         PR middle-end/85180
17981         * alias.c (find_base_term): New wrapper around find_base_term
17982         unwinding CSELIB_VAL_PTR changes.
17983         (find_base_term): Do not restore CSELIB_VAL_PTR during the
17984         recursion.
17986 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17988         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
17989         instructions.
17990         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
17991         constant definitions.
17992         ("nop"): lr 0,0 -> nopr r0
17993         ("nop_lr0", "nop_lr1"): New insn definitions.
17995 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
17997         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
17998         NDS32_V3PUSH_AVAILABLE_P macro.
18000 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
18001             Chung-Ju Wu  <jasonwucj@gmail.com>
18003         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
18004         (nds32*-*-*): Add float and fpu_config into supported_defaults.
18005         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
18006         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
18007         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
18008         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
18009         * config/nds32/constraints.md: New constraints and checking for hard
18010         float configuration.
18011         * config/nds32/iterators.md: New mode iterator and attribute for hard
18012         float configuration.
18013         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
18014         patterns.
18015         * config/nds32/nds32-fpu.md: New file.
18016         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
18017         deal with hard float code generation.
18018         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
18019         ARCH_V3S.
18020         (abi_type, float_reg_number): New enum type.
18021         * config/nds32/nds32-predicates.c: New predicates for hard float.
18022         * config/nds32/nds32-protos.h: Declare functions for hard float.
18023         * config/nds32/nds32.c: Implementation for hard float configuration.
18024         * config/nds32/nds32.h: Definitions for hard float configuration.
18025         * config/nds32/nds32.md: Include hard float machine description and
18026         modify patterns for hard float configuration.
18027         * config/nds32/nds32.opt: New options for hard float configuration.
18028         * config/nds32/predicates.md: New predicates for hard float
18029         configuration.
18031 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
18033         * common/config/nds32/nds32-common.c
18034         (nds32_option_optimization_table): Enable -mreleax-hint by default.
18036 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
18038         PR middle-end/85195
18039         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
18040         CONSTRUCTOR_ELT (ctor, ...)->value.
18042 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
18044         PR target/85193
18045         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
18047 2018-04-05  Tom de Vries  <tom@codesourcery.com>
18049         PR target/85204
18050         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
18051         cond jump.
18053 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
18054             Kito Cheng  <kito.cheng@gmail.com>
18056         * config/nds32/constraints.md (U33): Fine-tune checking condition.
18057         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
18058         * config/nds32/nds32.h (nds32_16bit_address_type): Add
18059         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
18061 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
18062             Kito Cheng  <kito.cheng@gmail.com>
18064         * config/nds32/constraints.md (Ufe): New memory constraint.
18065         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
18066         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
18067         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
18068         operands.
18069         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
18070         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
18072 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18074         * config/nds32/nds32.md: Use optimize_size in the condition for
18075         alu-shift instructions.
18077 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18079         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
18081 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18083         * config/nds32/nds32.md (negsi2): Refine pattern.
18085 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
18086             Chung-Ju Wu  <jasonwucj@gmail.com>
18088         * config/nds32/iterators.md (shift_rotate): New code iterator.
18089         (shift): New code attribute.
18090         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
18091         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
18092         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
18093         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
18094         bit-wise operations.
18095         (andsi3, *andsi3): Ditto.
18096         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
18097         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
18098         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
18099         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
18100         nds32_ior_operand, nds32_xor_operand): New predicates.
18102 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18104         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
18105         (addsi3, subsi3): ... this.
18107 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18109         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
18111 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18113         * config/nds32/nds32.md: Adjust indention.
18115 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
18117         * config/nds32/nds32.md (feature): New attribute.
18119 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18121         * config/nds32/nds32.md (subtype): New attribute.
18123 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18125         PR target/85203
18126         * config/arm/arm-builtins.c (arm_expand_builtin): Change
18127         expansion to perform a bitwise AND of the argument followed by a
18128         boolean negation of the result.
18130 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
18132         PR rtl-optimization/84878
18133         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
18134         the basic block.  Assert the use reference is not artificial and that
18135         it has an associated insn.
18137 2018-04-04  Michael Matz  <matz@suse.de>
18139         * builtins.c (compute_objsize): Pass correct operand
18140         to array_at_struct_end_p.
18142 2018-04-04  Richard Biener  <rguenther@suse.de>
18144         PR lto/85176
18145         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
18146         from contexts for DINFO_LEVEL_TERSE and below.
18148 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
18150         * config/nds32/nds32-doubleword.md (move_<mode>): Require
18151         resiter_operand condition.
18152         * config/nds32/nds32.md (*move<mode>): Ditto.
18154 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
18155             Monk Chiang  <sh.chiang04@gmail.com>
18157         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
18159 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18161         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
18163 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18164             Kito Cheng  <kito.cheng@gmail.com>
18166         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
18167         nds32_cond_code_str, output_cond_branch,
18168         output_cond_branch_compare_zero, nds32_expand_cbranch,
18169         nds32_expand_cstore, nds32_expand_movcc,
18170         nds32_output_cbranchsi4_equality_zero,
18171         nds32_output_cbranchsi4_equality_reg,
18172         nds32_output_cbranchsi4_equality_reg_or_const_int,
18173         nds32_output_cbranchsi4_greater_less_zero: New functions.
18174         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
18175         nds32_expand_cstore, nds32_expand_movcc,
18176         nds32_output_cbranchsi4_equality_zero,
18177         nds32_output_cbranchsi4_equality_reg,
18178         nds32_output_cbranchsi4_equality_reg_or_const_int,
18179         nds32_output_cbranchsi4_greater_less_zero): Declare.
18180         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
18181         nds32_rimm11s_operand): New predicates.
18182         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
18183         * config/nds32/nds32.md: Rewrite all the branch and conditional move
18184         patterns.
18186 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
18188         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
18189         * config/nds32/nds32.md: Ditto.
18190         * config/nds32/pipelines.md: Ditto.
18192 2018-04-04  Richard Biener  <rguenther@suse.de>
18194         PR tree-optimization/85168
18195         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
18196         propagating abnormals.
18198 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18200         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
18202 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18203             Kito Cheng  <kito.cheng@gmail.com>
18205         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
18206         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
18207         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
18208         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
18209         * config/nds32/nds32.md (sibcall_internal): New.
18210         (sibcall_register): Remove.
18211         (sibcall_immediate): Remove.
18212         (sibcall_value_internal): New.
18213         (sibcall_value_register): Remove.
18214         (sibcall_value_immediate): Remove.
18215         * config/nds32/predicates.md (nds32_general_register_operand): New.
18216         (nds32_call_address_operand): New.
18218 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
18220         PR rtl-optimization/85167
18221         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
18222         bb_defs if *split_p, instead preinitialize it to NULL.
18224         PR tree-optimization/85156
18225         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
18226         evaluating the argument multiple times.
18228 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
18230         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
18231         than vector.
18232         (_mm_cvtpd_ps): Likewise.
18233         (_mm_cvttpd_epi32): Likewise.
18234         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
18235         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
18236         vector, pixel, and bool following altivec.h include.
18238 2018-04-03  Martin Sebor  <msebor@redhat.com>
18240         * doc/extend.texi (Common Function Attributes): Clarify.
18241         (const attribute): Likewise.
18242         (pure attribute): Likewise.
18244 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
18246         PR target/85169
18247         * config/i386/i386.c (ix86_expand_vector_set): Use
18248         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
18250 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
18252         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
18253         instructions when changing rounding bits to preserve precision bits
18254         in the x87 control word.
18256 2018-04-03  Martin Liska  <mliska@suse.cz>
18258         PR tree-optimization/82491
18259         * rtl.h (strip_offset_and_add): Replace += suboffset with
18260         poly_uint64 () + suboffset.
18262 2018-03-29  Martin Liska  <mliska@suse.cz>
18263             Martin Jambor  <mjambor@suse.cz>
18265         PR ipa/84947
18266         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
18267         param_type is not an integral or pointer type.
18269 2018-04-03  Richard Biener  <rguenther@suse.de>
18271         * sese.h (recompute_all_dominators): Remove.
18273 2018-04-02  Martin Sebor  <msebor@redhat.com>
18275         * doc/invoke.texi (-Wrestrict): Fix typos.
18277 2018-04-02  Jim Wilson  <jimw@sifive.com>
18279         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
18280         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
18281         (<optab>di3, <optab>si3_extend): Likewise.
18282         (<optab>si3_mask, <optab>si3_mask_1): New.
18283         (<optab>di3_mask, <optab>di3_mask_1): New.
18284         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
18285         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
18286         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
18288 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
18290         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
18291         example.
18293 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
18295         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
18296         (nds32_canonicalize_comparison): New function.
18298 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
18299             Kito Cheng  <kito.cheng@gmail.com>
18300             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
18302         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
18303         * config/nds32/constants.md (unspec_volatile_element): Add
18304         UNSPEC_VOLATILE_RELAX_GROUP.
18305         * config/nds32/nds32-relax-opt.c: New file.
18306         * config/nds32/nds32-predicates.c
18307         (nds32_symbol_load_store_p): New function.
18308         * config/nds32/nds32-protos.h
18309         (nds32_symbol_load_store_p): Declare function.
18310         (make_pass_nds32_relax_opt): Declare new rtl pass function.
18311         * config/nds32/nds32.c
18312         (nds32_register_pass): New function to register pass.
18313         (nds32_register_passes): New function to register passes.
18314         * config/nds32/nds32.md (relax_group): New pattern.
18315         * config/nds32/nds32.opt (mrelax-hint): New option.
18316         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
18318 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
18320         * config/nds32/t-nds32: Modify files dependency.
18322 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
18324         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
18325         (PROFILE_HOOK): Define its implementation.
18327 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
18329         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
18330         type and 32-bit size.
18332 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
18334         PR middle-end/85090
18335         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
18336         (V_128_256): New mode iterator.
18337         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
18338         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
18339         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
18340         of V.
18341         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
18342         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
18344 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
18346         PR target/83315
18347         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
18348         NaN inputs correctly.
18350 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
18352         PR target/80546
18353         * config/rs6000/vsx.md (??r): New mode attribute.
18354         (*vsx_mov<mode>_64bit): Use it.
18355         (*vsx_mov<mode>_32bit): Likewise.
18357 2018-03-30  Martin Sebor  <msebor@redhat.com>
18359         PR tree-optimization/84818
18360         * builtins.c (check_access): Use warning_n.
18362 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18364         PR target/83822
18365         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
18366         condition.
18367         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
18368         condition.
18370 2018-03-30  Julia Koval  <julia.koval@intel.com>
18372         PR target/84413
18373         * x86-tune.def (movx, partial_reg_dependency): Enable for
18374         m_SKYLAKE_AVX512.
18376 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
18378         PR inline-asm/84985
18379         * lra-constraints.c (process_alt_operands): Move setting
18380         this_alternative_matches below.
18382 2018-03-29  Martin Liska  <mliska@suse.cz>
18384         PR lto/84995.
18385         * doc/invoke.texi: Document how LTO works with debug info.
18386         Describe auto-load support of binutils.  Mention 'x86-64'
18387         as valid option value of -march option.
18389 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
18391         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
18393         PR c/85094
18394         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
18395         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
18396         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
18397         checking.
18399 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
18401         PR target/84912
18402         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
18403         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
18404         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
18405         for RS6000_BTM_POWERPC64.
18406         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
18407         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
18408         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
18409         definition.
18410         (DIVDE): Use it.
18411         (DIVDEU): Likewise.
18413 2018-03-28  Carl Love  <cel@us.ibm.com>
18415         Revert
18416         2017-09-27  Carl Love  <cel@us.ibm.com>
18418         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
18419         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
18420         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
18421         fctiw instruction.
18423 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18425         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
18426         instead of __vector bool.
18427         (_mm_max_pu8): Likewise.
18428         (_mm_min_pi16): Likewise.
18430 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
18432         PR target/84912
18433         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
18434         (DIVWEUO): Likewise.
18435         (DIVDEO): Likewise.
18436         (DIVDEUO): Likewise.
18437         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
18438         DIVWEUO and DIVDEUO.
18439         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
18440         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
18441         (div_extend): Likewise.
18442         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
18443         builtin function.
18444         (__builtin_divweuo): Likewise.
18445         (__builtin_divdeo): Likewise.
18446         (__builtin_divdeuo): Likewise.
18448 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
18450         PR target/85095
18451         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
18452         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
18454         PR tree-optimization/82004
18455         * gimple-match-head.c (optimize_pow_to_exp): New function.
18456         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
18457         Don't fold to exp if optimize_pow_to_exp is false.
18459 2018-03-28  Martin Liska  <mliska@suse.cz>
18461         PR other/84819
18462         * calls.c (initialize_argument_information): Fix trailing space.
18463         * common.opt: Fix typo and provide better explanation for
18464         -fsanitize-coverage option.
18465         * config/i386/i386.opt: Fix typo.
18467 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
18468             Martin Liska  <mliska@suse.cz>
18470         PR sanitizer/85081
18471         * gimplify.c (asan_poison_variable): Don't do the check for
18472         gimplify_omp_ctxp here.
18473         (gimplify_decl_expr): Do it here.
18474         (gimplify_target_expr): Likewise.
18476 2018-03-28  Martin Liska  <mliska@suse.cz>
18478         PR target/84988
18479         * config/i386/i386.c (ix86_function_arg_advance): Do not call
18480         chkp_type_bounds_count if MPX is not enabled.
18482 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
18484         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
18486 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
18488         PR target/84914
18489         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
18490         function to create the function decl for complex long double
18491         multiply and divide for -mabi=ieeelongdouble.
18492         (init_float128_ieee): Call it.
18494 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
18496         PR target/85044
18497         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
18498         -fcf-protection=branch -mibt.
18499         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
18501 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
18503         PR target/81863
18504         * config/arm/arm.c (arm_valid_symbolic_address): Handle
18505         arm_word_relocations.
18507 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
18509         PR target/85056
18510         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
18511         extern array declarations.
18513 2018-03-27  Richard Biener  <rguenther@suse.de>
18515         PR middle-end/84067
18516         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
18517         explicit single_use checks.
18519 2018-03-27  Richard Biener  <rguenther@suse.de>
18521         PR tree-optimization/85082
18522         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
18523         Valueize the VUSE.
18525 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
18527         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
18528         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
18529         Turn on fasynchronous-unwind-tables and funwind-tables.
18531 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
18533         PR target/85073
18534         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
18535         (*bmi_blsr_<mode>_ccz): Ditto.
18537 2018-03-26  Tom de Vries  <tom@codesourcery.com>
18539         PR tree-optimization/85063
18540         * omp-general.c (offloading_function_p): New function.  Factor out
18541         of ...
18542         * omp-offload.c (pass_omp_target_link::gate): ... here.
18543         * omp-general.h (offloading_function_p): Declare.
18544         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
18545         with attribute omp declare target for offloading functions.
18547 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
18549         PR tree-optimization/84005
18550         * tree-data-ref.h (get_base_for_alignment): Declare.
18551         * tree-data-ref.c (get_base_for_alignment_1): New function.
18552         (get_base_for_alignment): Likewise.
18553         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
18554         get_base_for_alignment to find a suitable base object, instead
18555         of always using drb->base_address.
18557 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
18559         PR inline-asm/85022
18560         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
18561         known size by default.
18563 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
18565         PR inline-asm/85030
18566         * lra-constraints.c (process_alt_operands): Don't match BLKmode
18567         and non BLKmode operands.
18569 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18571         PR target/85026
18572         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
18573         Clean up attributes.
18575 2018-03-23  Richard Biener  <rguenther@suse.de>
18577         PR debug/85020
18578         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
18579         we are going to emit early debug for LTO.
18581 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
18583         PR inline-asm/85034
18584         * function.c (match_asm_constraints_1): Don't optimize if input
18585         doesn't satisfy general_operand predicate for output's mode.
18587         PR inline-asm/85022
18588         * alias.c (write_dependence_p): Don't require for x_canonicalized
18589         non-VOIDmode if x has VOIDmode.
18591         PR sanitizer/85029
18592         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
18593         just don't try to optimize it rather than assert it never happens.
18595 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18597         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
18598         macro expansions for definition of ST_INTERNAL_<mode> and
18599         LD_INTERNAL_<mode> builtins.
18600         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
18601         Remove prototype.
18602         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
18603         function.
18604         (altivec_expand_st_builtin): Likewise.
18605         (altivec_expand_builtin): Remove calls to deleted functions.
18606         (rs6000_address_for_altivec): Delete this function.
18607         * config/rs6000/vector.md: Remove expands for
18608         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
18610 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
18612         PR target/84826
18613         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
18614         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
18615         re-computing once computed.
18616         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
18617         (arm_init_machine_status): Initialize
18618         machine->static_chain_stack_bytes.
18620 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18622         PR target/84760
18623         * doc/extend.texi: Add four new prototypes for vec_ld.
18624         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
18625         definitions for more logical presentation.
18626         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
18627         entries for V1TI variants of __builtin_altivec_ld builtin.
18628         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
18629         handling of V1TI variant of LVX icode pattern.
18630         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
18631         (rs6000_gimple_fold_builtin): Likewise.
18632         (altivec_init_builtins): Add code to define
18633         __builtin_altivec_lvx_v1ti function.
18635 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
18637         PR inline-asm/84941
18638         * function.c (match_asm_constraints_1): Don't do the optimization
18639         if input isn't a REG, SUBREG, MEM or constant.
18641 2018-03-22  Tom de Vries  <tom@codesourcery.com>
18643         PR tree-optimization/84956
18644         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
18645         bb_has_abnormal_pred.
18647 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
18649         PR sanitizer/85018
18650         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
18651         DECL_INITIAL (decl) to decl at the end.
18652         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
18653         adjust the comment.
18655 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
18657         * doc/extend.texi (__builtin_tgmath): Document when complex
18658         integer types are treated as _Complex _Float64.
18660 2018-03-21  Tom de Vries  <tom@codesourcery.com>
18662         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
18664 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
18666         PR tree-optimization/84960
18667         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
18668         if it is ENTRY block, move them into single succ of ENTRY in that case.
18670 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
18672         PR tree-optimization/84811
18673         * poly-int.h (poly_span_traits): Remove the T3 parameter and
18674         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
18675         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
18676         (known_subrange_p): Update accordingly.  Cast each value involved
18677         in the size comparison, rather than casting the result of the
18678         subtraction.
18680 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
18682         PR tree-optimization/84982
18683         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
18684         by flipping the least significant bit rather than all bits from
18685         bitpos to bitpos + bitsize - 1.
18687 2018-03-21  Nathan Sidwell  <nathan@acm.org>
18689         * doc/extend.texi (Deprecated Features): Remove mention of
18690         long-deleted deprecations.
18692 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18694         PR jit/84288
18695         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
18696         * configure: Regenerate.
18698 2018-03-21  Tom de Vries  <tom@codesourcery.com>
18700         PR tree-optimization/83126
18701         * tree-parloops.c (num_phis): New function.
18702         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
18704 2018-03-21  Nathan Sidwell  <nathan@acm.org>
18706         * doc/extend.texi (Deprecated Features): Update deprecated flags,
18707         mention anon-struct/union members and trailing attributes.
18709 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
18711         PR tree-optimization/84969
18712         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
18713         builtin memset partitions if they set different rhs values.
18715 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
18717         PR rtl-optimization/84989
18718         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
18719         VEC_DUPLICATE with scalar result mode.
18721 2018-03-21  Martin Liska  <mliska@suse.cz>
18723         PR ipa/84963
18724         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
18725         not intended return statement.
18727 2018-03-21  Martin Liska  <mliska@suse.cz>
18729         PR target/84988
18730         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
18731         (chkp_find_bound_slots_1): Limit number of iterations.
18733 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
18735         PR target/84838
18736         * Minor grammar fixes for x86 options.
18738 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
18740         PR debug/84875
18741         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
18742         holding REG_CFA_RESTORE notes, instead turn them into a USE.
18744 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
18746         PR target/83789
18747         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
18748         (altivec_lvx_<mode>_1op): Likewise.
18749         (altivec_stvx_<mode>_2op): Likewise.
18750         (altivec_stvx_<mode>_1op): Likewise.
18751         (altivec_lvx_<VM2:mode>): New define_expand.
18752         (altivec_stvx_<VM2:mode>): Likewise.
18753         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
18754         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18755         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
18756         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18757         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
18758         (rs6000_gen_lvx): Likewise.
18759         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
18760         (altivec_expand_stv_builtin): Likewise.
18761         (altivec_expand_builtin): Likewise.
18762         * config/rs6000/vector.md: Likewise.
18764 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18766         PR target/82518
18767         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
18768         BYTES_BIG_ENDIAN.
18770 2018-03-20  Richard Biener  <rguenther@suse.de>
18772         PR target/84986
18773         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
18774         sign-conversions as zero, fall back to standard scalar_stmt
18775         cost for the rest.
18777 2018-03-20  Martin Liska  <mliska@suse.cz>
18779         PR ipa/84825
18780         * predict.c (rebuild_frequencies): Handle case when we have
18781         PROFILE_ABSENT, but flag_guess_branch_prob is false.
18783 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
18785         PR target/84990
18786         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
18787         flag_section_anchors.
18788         * varasm.c (use_blocks_for_decl_p): Remove hack for
18789         dw2_force_const_mem.
18791         PR target/84845
18792         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
18793         to ...
18794         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
18795         be created, use lowpart_subreg of operands[0] rather than operands[0]
18796         itself.
18797         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
18798         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
18799         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
18800         and n constraint instead of aarch64_shift_imm_di and Usd.
18801         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
18802         (*aarch64_<optab>_reg_minus<mode>3): ... this.
18804 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
18806         PR target/82989
18807         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
18808         to favor GPR over NEON registers.
18809         (<shift>di3_neon): Likewise.
18811 2018-03-20  Tom de Vries  <tom@codesourcery.com>
18813         PR target/84952
18814         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
18815         (nvptx_process_pars): Emit bar.sync asap and alap.
18817 2018-03-20  Tom de Vries  <tom@codesourcery.com>
18819         PR target/84954
18820         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
18821         seen_label if seen_label is already set.
18823 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
18825         PR target/84945
18826         * config/i386/i386.c (fold_builtin_cpu): For features above 31
18827         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
18828         Use 1U instead of 1.  Formatting fixes.
18830         PR c/84953
18831         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
18832         instead of TREE_TYPE (s1) for the return value.
18834 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
18836         PR tree-optimization/84946
18837         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
18838         bitsize + bitsize in poly_uint64 rather than poly_int64.
18840         PR sanitizer/78651
18841         * dwarf2asm.c: Include fold-const.c.
18842         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
18843         of decl rather than decl itself.
18845         PR rtl-optimization/84643
18846         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
18848 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
18850         PR sanitizer/78651
18851         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
18852         calling assemble_variable.
18854 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
18856         PR target/81647
18857         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
18858         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
18860 2018-03-19  Jim Wilson  <jimw@sifive.com>
18862         PR bootstrap/84856
18863         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
18864         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
18865         (riscv_first_stack_step): Likewise.
18866         (riscv_option_override): Use STACK_BOUNDARY instead of
18867         MIN_STACK_BOUNDARY.
18868         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
18869         MIN_STACK_BOUNDARY.
18870         (BIGGEST_ALIGNMENT): Set to 128.
18871         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
18872         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
18873         STACK_BOUNDARY.
18875 2018-03-19  Richard Biener  <rguenther@suse.de>
18877         PR tree-optimization/84933
18878         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
18879         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
18881 2018-03-19  Richard Biener  <rguenther@suse.de>
18883         PR tree-optimization/84859
18884         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
18885         (cond_if_else_store_replacement): Perform sinking operation on
18886         single-store BBs regardless of MAX_STORES_TO_SINK setting.
18887         Generalize what a BB with a single eligible store is.
18889 2018-03-19  Richard Biener  <rguenther@suse.de>
18891         PR tree-optimization/84929
18892         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
18893         chrec_is_positive against non-chrec arg.
18895 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
18897         PR target/84711
18898         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
18900 2018-03-18  Martin Liska  <mliska@suse.cz>
18902         PR rtl-optimization/84635
18903         * regrename.c (build_def_use): Use matches_mode only when
18904         matches >= 0.
18906 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
18908         PR tree-optimization/84913
18909         * tree-vect-loop.c (vectorizable_reduction): Don't try to
18910         vectorize chains of COND_EXPRs.
18912 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
18914         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
18916 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
18918         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
18920 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
18922         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
18924 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
18925             Kito Cheng  <kito.cheng@gmail.com>
18927         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
18928         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
18929         (nds32_adjust_reg_alloc_order): New function.
18930         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
18932 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
18934         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
18935         nds32_print_operand, nds32_print_operand_address): Use
18936         HOST_WIDE_INT_PRINT_DEC instead.
18938 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
18940         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
18942 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
18944         PR target/84902
18945         * config/i386/i386.c (initial_ix86_tune_features,
18946         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
18947         unsigned long long.
18948         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
18949         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
18950         rather than 1u << ix86_tune.  Formatting fix.
18951         (ix86_option_override_internal): Change ix86_arch_mask from
18952         unsigned int to unsigned HOST_WIDE_INT, initialize to
18953         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
18954         (ix86_function_specific_restore): Likewise.
18956 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
18958         PR target/84899
18959         * postreload.c (reload_combine_recognize_pattern): Perform
18960         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
18961         truncate_int_for_mode the result for the destination's mode.
18963         PR c/84909
18964         * hsa-gen.c (mem_type_for_type): Fix comment typo.
18965         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
18966         Likewise.
18967         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
18968         Likewise.
18970 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
18972         PR target/84876
18973         * lra-assigns.c (lra_split_hard_reg_for): Don't use
18974         regno_allocno_class_array and sorted_pseudos.
18975         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
18976         insns where regno is used.
18978 2018-03-16  Martin Liska  <mliska@suse.cz>
18980         PR ipa/84833
18981         * multiple_target.c (create_dispatcher_calls): Redirect
18982         reference in the symbol table.
18984 2018-03-16  Martin Liska  <mliska@suse.cz>
18986         PR ipa/84722
18987         * multiple_target.c (create_dispatcher_calls): Redirect also
18988         an alias.
18990 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
18992         PR c++/79937
18993         PR c++/82410
18994         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
18995         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
18996         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
18998 2018-03-16  Julia Koval  <julia.koval@intel.com>
19000         * doc/invoke.texi (Skylake Server): Add CLWB.
19001         Cannonlake): Remove CLWB.
19003 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
19005         PR tree-optimization/84841
19006         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
19007         1 << 3.
19008         (FLOAT_ONE_CONST_TYPE): Define.
19009         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
19010         (sort_by_operand_rank): Put entries with higher constant_type last
19011         rather than first to match comments.
19013 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
19015         * config/nios2/nios2.md (movsi_internal): Fix thinko in
19016         split predicate.
19018 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
19020         PR c++/79085
19021         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
19022         check and use address of target always.
19024 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
19026         PR target/84574
19027         * config/i386/i386.c (indirect_thunk_needed): Update comments.
19028         (indirect_thunk_bnd_needed): Likewise.
19029         (indirect_thunks_used): Likewise.
19030         (indirect_thunks_bnd_used): Likewise.
19031         (indirect_return_needed): New.
19032         (indirect_return_bnd_needed): Likewise.
19033         (output_indirect_thunk_function): Add a bool argument for
19034         function return.
19035         (output_indirect_thunk_function): Don't generate alias for
19036         function return thunk.
19037         (ix86_code_end): Call output_indirect_thunk_function to generate
19038         function return thunks.
19039         (ix86_output_function_return): Set indirect_return_bnd_needed
19040         and indirect_return_needed instead of indirect_thunk_bnd_needed
19041         and indirect_thunk_needed.
19043 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
19045         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
19046         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
19047         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
19049 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
19050             Paul Hua <paul.hua.gm@gmail.com>
19052         PR c/84852
19053         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
19055 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
19057         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
19058         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
19059         resp. SFmode cases.
19061 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
19063         PR target/84711
19064         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
19065         instead of GET_MODE_SIZE when comparing Units.
19067 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
19069         PR target/68256
19070         * varasm.c (hash_section): Return an unchangeble hash value
19071         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
19072         Return !aarch64_can_use_per_function_literal_pools_p ().
19074 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
19076         PR target/84860
19077         * optabs.c (emit_conditional_move): Pass address of cmode's copy
19078         rather than address of cmode as last argument to prepare_cmp_insn.
19080 2018-03-15  Julia Koval  <julia.koval@intel.com>
19082         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
19083         F_AVX512VNNI, F_AVX512BITALG): New.
19085 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
19087         PR target/83451
19088         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
19089         insn for floating-point loads and stores.
19091 2018-03-14  Carl Love  <cel@us.ibm.com>
19093         * config/rs6000/rs6000-c.c: Add macro definitions for
19094         ALTIVEC_BUILTIN_VEC_PERMXOR.
19095         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
19096         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
19097         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
19098         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
19099         UNSPEC_VPERMXOR.
19100         * config/doc/extend.texi: Add prototypes for vec_permxor.
19102 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
19104         PR c/84852
19105         * diagnostic-show-locus.c (class layout_point): Convert m_line
19106         from int to linenum_type.
19107         (line_span::comparator): Use linenum "compare" function when
19108         comparing line numbers.
19109         (test_line_span): New function.
19110         (layout_range::contains_point): Convert param "row" from int to
19111         linenum_type.
19112         (layout_range::intersects_line_p): Likewise.
19113         (layout::will_show_line_p): Likewise.
19114         (layout::print_source_line): Likewise.
19115         (layout::should_print_annotation_line_p): Likewise.
19116         (layout::print_annotation_line): Likewise.
19117         (layout::print_leading_fixits): Likewise.
19118         (layout::annotation_line_showed_range_p): Likewise.
19119         (struct line_corrections): Likewise for field m_row.
19120         (line_corrections::line_corrections): Likewise for param "row".
19121         (layout::print_trailing_fixits): Likewise.
19122         (layout::get_state_at_point): Likewise.
19123         (layout::get_x_bound_for_row): Likewise.
19124         (layout::print_line): Likewise.
19125         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
19126         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
19127         * input.c (selftest::test_linenum_comparisons): New function.
19128         (selftest::input_c_tests): Call it.
19129         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
19130         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
19131         * selftest.h (ASSERT_GT): New macro.
19132         (ASSERT_GT_AT): New macro.
19133         (ASSERT_LT): New macro.
19134         (ASSERT_LT_AT): New macro.
19136 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
19138         PR rtl-optimization/84780
19139         * combine.c (distribute_links): Don't make a link based on pc_rtx.
19141 2018-03-14  Martin Liska  <mliska@suse.cz>
19143         * tree.c (record_node_allocation_statistics): Use
19144         get_stats_node_kind.
19145         (get_stats_node_kind): New function extracted from
19146         record_node_allocation_statistics.
19147         (free_node): Use get_stats_node_kind.
19149 2018-03-14  Richard Biener  <rguenther@suse.de>
19151         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
19152         that the value-set of ANTIC_IN doesn't grow.
19154         Revert
19155         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19156         member.
19157         (BB_VISITED_WITH_VISITED_SUCCS): New define.
19158         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19160 2018-03-14  Julia Koval  <julia.koval@intel.com>
19162         * config.gcc (icelake-client, icelake-server): New.
19163         (icelake): Remove.
19164         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
19165         (initial_ix86_arch_features): Ditto.
19166         (PTA_SKYLAKE): Add SGX.
19167         (PTA_ICELAKE): Remove.
19168         (PTA_ICELAKE_CLIENT): New.
19169         (PTA_ICELAKE_SERVER): New.
19170         (ix86_option_override_internal): Split up icelake on icelake client and
19171         icelake server.
19172         (get_builtin_code_for_version): Ditto.
19173         (fold_builtin_cpu): Ditto.
19174         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
19175         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
19176         * config/i386/i386.h (processor_type): Ditto.
19177         * doc/invoke.texi: Ditto.
19179 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
19181         PR sanitizer/83392
19182         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
19183         INTEGER_CST offset, add it together with bitpos / 8 and
19184         sign extend based on POINTER_SIZE.
19186         PR target/84844
19187         Revert
19188         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
19190         PR target/78090
19191         * config/i386/constraints.md (Yc): New register constraint.
19192         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
19193         Use Yc constraint for alternative 2 of operand 0.  Remove
19194         preferred_for_speed attribute.
19196 2018-03-14  Richard Biener  <rguenther@suse.de>
19198         PR tree-optimization/84830
19199         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
19200         with the old one to avoid oscillations.
19202 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
19204         PR target/83712
19205         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
19206         pseudos.
19207         (assign_by_spills): Return a flag of reload assignment failure.
19208         Do not process the reload assignment failures.  Do not spill other
19209         reload pseudos if they has the same reg class.  Update n if
19210         necessary.
19211         (lra_assign): Add a return arg.  Set up from the result of
19212         assign_by_spills call.
19213         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19214         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
19215         usage_insns if it is not NULL.
19216         (spill_hard_reg_in_range): New function.
19217         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19218         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19219         function prototypes.
19220         (lra_assign): Change prototype.
19221         * lra.c (lra): Add code to deal with fails by splitting hard reg
19222         live ranges.
19224 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
19226         * config/riscv/riscv.opt (mrelax): New option.
19227         * config/riscv/riscv.c (riscv_file_start): Emit ".option
19228         "norelax" when riscv_mrelax is disabled.
19229         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
19231 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19233         PR target/84743
19234         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
19235         reassociation for int modes.
19237 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
19239         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
19240         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
19241         for big-endian.
19242         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
19243         * config/aarch64/aarch64-sve.md
19244         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
19245         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
19246         (*extend<mode><Vwide>2): Rename to...
19247         (aarch64_sve_extend<mode><Vwide>2): ...this.
19248         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
19249         renaming the old pattern to...
19250         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
19251         unsigned packs.
19252         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
19253         define_expand, renaming the old pattern to...
19254         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
19255         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
19256         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
19257         account when deciding which SVE instruction the optab should use.
19258         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
19260 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
19262         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
19263         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
19264         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
19265         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
19266         (tlsdesc_small_<mode>): Turn a define_expand and use
19267         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
19268         (tlsdesc_small_advsimd_<mode>): ...this.
19269         (tlsdesc_small_sve_<mode>): New pattern.
19271 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
19273         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
19274         (UNSPEC_UMUL_HIGHPART): New constants.
19275         (MUL_HIGHPART): New int iteraor.
19276         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
19277         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
19278         define_expand.
19279         (*<su>mul<mode>3_highpart): New define_insn.
19281 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
19283         PR lto/84805
19284         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19285         incomplete types.
19287 2018-03-13  Martin Liska  <mliska@suse.cz>
19289         PR ipa/84658.
19290         * (sem_item_optimizer::sem_item_optimizer): Initialize new
19291         vector.
19292         (sem_item_optimizer::~sem_item_optimizer): Release it.
19293         (sem_item_optimizer::merge_classes): Register variable aliases.
19294         (sem_item_optimizer::fixup_pt_set): New function.
19295         (sem_item_optimizer::fixup_points_to_sets): Likewise.
19296         * ipa-icf.h: Declare new variables and functions.
19298 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
19300         PR middle-end/84834
19301         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
19302         integer_pow2p@2 and test integer_pow2p in condition.
19303         (A < 0 ? C : 0): Similarly for @1.
19305         PR middle-end/84831
19306         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
19307         characters starting at p contain '\0' character, don't look beyond
19308         that.
19310         PR target/84827
19311         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
19312         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
19314         PR target/84828
19315         * reg-stack.c (change_stack): Change update_end var from int to
19316         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
19317         also call set_block_for_insn on the newly added insns and rescan.
19319         PR target/84786
19320         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
19321         on the last operand.
19323         PR c++/84704
19324         * tree.c (stabilize_reference_1): Return save_expr (e) for
19325         STATEMENT_LIST even if it doesn't have side-effects.
19327 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
19329         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
19331 2018-03-12  Renlin Li  <renlin.li@arm.com>
19333         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
19334         aarch64_output_scalar_simd_mov_immediate.
19336 2018-03-12  Martin Sebor  <msebor@redhat.com>
19338         PR tree-optimization/83456
19339         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
19340         for perfectly overlapping calls to memcpy.
19341         (gimple_fold_builtin_memory_chk): Same.
19342         (gimple_fold_builtin_strcpy): Handle no-warning.
19343         (gimple_fold_builtin_stxcpy_chk): Same.
19344         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
19346 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
19348         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
19349         parameter.  Use it for SFmode.
19350         (rs6000_function_arg_advance_1): Adjust.
19351         (rs6000_function_arg): Adjust.
19352         (rs6000_gimplify_va_arg): Pass false for that new parameter.
19354 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
19356         PR rtl-optimization/84169
19357         PR rtl-optimization/84780
19358         * combine.c (can_combine_p): Check for a 2-insn combination whether
19359         the destination register is used between the two insns, too.
19361 2018-03-12  Richard Biener  <rguenther@suse.de>
19363         PR tree-optimization/84803
19364         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
19365         for refs DR analysis didn't process.
19367 2018-03-12  Richard Biener  <rguenther@suse.de>
19369         PR tree-optimization/84777
19370         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
19371         force-vectorize loops ignore whether we are optimizing for size.
19373 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
19375         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
19376         (TARGET_MD_ASM_ADJUST): Define.
19378 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
19379             Kito Cheng  <kito.cheng@gmail.com>
19380             Chung-Ju Wu  <jasonwucj@gmail.com>
19382         * config/nds32/nds32.c (nds32_compute_stack_frame,
19383         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
19384         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
19385         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
19386         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
19387         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
19388         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
19389         * config/nds32/nds32.md (prologue, epilogue): Use macro
19390         NDS32_V3PUSH_AVAILABLE_P to do checking.
19392 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
19394         PR debug/58150
19395         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
19396         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
19397         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
19398         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
19399         addition of most attributes on !orig_type_die or the attribute not
19400         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
19402 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
19403             Chung-Ju Wu  <jasonwucj@gmail.com>
19405         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
19406         __NDS32_VH__ macro.
19407         * config/nds32/nds32.opt (mvh): New option.
19409 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
19410             Chung-Ju Wu  <jasonwucj@gmail.com>
19412         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
19413         function.
19414         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
19415         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
19416         definition.
19418 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
19419             Chung-Ju Wu  <jasonwucj@gmail.com>
19421         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
19422         function.
19423         * config/nds32/nds32-multiple.md (strlensi): New pattern.
19424         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
19426 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
19427             Kito Cheng  <kito.cheng@gmail.com>
19428             Chung-Ju Wu  <jasonwucj@gmail.com>
19430         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
19431         UNSPEC_FFMISM and UNSPEC_FLMISM.
19432         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
19433         for ffb, ffmism and flmism.
19434         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
19435         (unspec_ffmism): Ditto.
19436         (unspec_flmism): Ditto.
19437         (nds32_expand_builtin_impl): Check if string extension is available.
19438         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
19439         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
19441 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
19443         Reverting patch:
19444         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
19446         PR target/83712
19447         * lra-assigns.c (assign_by_spills): Return a flag of reload
19448         assignment failure.  Do not process the reload assignment
19449         failures.  Do not spill other reload pseudos if they has the same
19450         reg class.
19451         (lra_assign): Add a return arg.  Set up from the result of
19452         assign_by_spills call.
19453         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19454         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
19455         usage_insns if it is not NULL.
19456         (spill_hard_reg_in_range): New function.
19457         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19458         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19459         function prototypes.
19460         (lra_assign): Change prototype.
19461         * lra.c (lra): Add code to deal with fails by splitting hard reg
19462         live ranges.
19464 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
19466         PR target/84807
19467         * config/i386/i386.opt: Replace Enforcment with Enforcement.
19469 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
19471         PR debug/84620
19472         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
19473         (dw_val_node): Add val_symbolic_view.
19474         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
19475         (symview_upper_bound): New.
19476         (new_line_info_table): Initialize symviews_since_reset.
19477         (dwarf2out_source_line): Count symviews_since_reset and set
19478         symview_upper_bound.
19479         (dw_val_equal_p): Handle symview.
19480         (add_AT_symview): New.
19481         (print_dw_val): Handle symview.
19482         (attr_checksum, attr_checksum_ordered): Likewise.
19483         (same_dw_val_p, size_of_die): Likewise.
19484         (value_format, output_die): Likewise.
19485         (add_high_low_attributes): Use add_AT_symview for entry_view.
19486         (dwarf2out_finish): Reset symview_upper_bound, clear
19487         zero_view_p.
19489 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
19491         PR target/83969
19492         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
19493         Add strict argument and use it.
19494         (rs6000_split_multireg_move): Update for new strict argument.
19495         (mem_operand_gpr): Disallow all non-offsettable addresses.
19496         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
19498 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
19500         PR target/84772
19501         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
19502         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
19503         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
19505         PR c++/84767
19506         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
19507         decl, use remap_type if we want to use the type.
19509 2018-03-09  Martin Sebor  <msebor@redhat.com>
19511         PR tree-optimization/84526
19512         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19513         Remove dead code.
19514         (builtin_access::generic_overlap): Be prepared to handle non-array
19515         base objects.
19517 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
19519         PR rtl-optimization/84682
19520         * lra-constraints.c (process_address_1): Check is_address flag
19521         for address constraints.
19522         (process_alt_operands): Likewise.
19523         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
19524         preprocess_constraints.
19525         * recog.h (preprocess_constraints): Add oploc parameter.
19526         Adjust callers.
19527         * recog.c (preprocess_constraints): Test address_operand for
19528         CT_ADDRESS constraints.
19530 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
19532         PR target/83712
19533         * lra-assigns.c (assign_by_spills): Return a flag of reload
19534         assignment failure.  Do not process the reload assignment
19535         failures.  Do not spill other reload pseudos if they has the same
19536         reg class.
19537         (lra_assign): Add a return arg.  Set up from the result of
19538         assign_by_spills call.
19539         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19540         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
19541         usage_insns if it is not NULL.
19542         (spill_hard_reg_in_range): New function.
19543         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19544         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19545         function prototypes.
19546         (lra_assign): Change prototype.
19547         * lra.c (lra): Add code to deal with fails by splitting hard reg
19548         live ranges.
19550 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19552         PR target/83193
19553         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
19554         Accept complain bool parameter.  Only emit errors if it is true.
19555         (arm_parse_cpu_option_name): Likewise.
19556         (arm_target_thumb_only): Adjust callers of the above.
19557         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
19558         prototype to take a default true bool parameter.
19559         (arm_parse_arch_option_name): Likewise.
19561 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
19562             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
19564         PR jit/64089
19565         PR jit/84288
19566         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
19567         * configure: Regenerate.
19568         * configure.ac ("linker --version-script option"): New.
19569         ("linker soname option"): New.
19571 2018-03-09  Richard Biener  <rguenther@suse.de>
19573         PR tree-optimization/84775
19574         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
19575         immediate uses of predicate stmts and mark them modified.
19577         Revert
19578         PR tree-optimization/84178
19579         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19580         to caller.
19581         (version_loop_for_if_conversion): Delay update_ssa call.
19582         (tree_if_conversion): Delay update_ssa until after predicate
19583         insertion.
19585 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
19587         PR target/84763
19588         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
19589         when the function accesses prior frames.
19591 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
19593         PR debug/84456
19594         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
19595         gen_llsym, otherwise call maybe_gen_llsym.
19597         PR inline-asm/84742
19598         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
19599         has ',' character inside of it.
19601 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19603         PR target/84748
19604         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
19605         as clobbering CC_REGNUM.
19607 2018-03-08  Richard Biener  <rguenther@suse.de>
19609         PR middle-end/84552
19610         * tree-scalar-evolution.c: Include tree-into-ssa.h.
19611         (follow_copies_to_constant): Do not follow SSA names registered
19612         for update.
19614 2018-03-08  Richard Biener  <rguenther@suse.de>
19616         PR tree-optimization/84178
19617         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19618         to caller.
19619         (version_loop_for_if_conversion): Delay update_ssa call.
19620         (tree_if_conversion): Delay update_ssa until after predicate
19621         insertion.
19623 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
19625         PR tree-optimization/84178
19626         * tree-if-conv.c (release_bb_predicate): Remove the
19627         the assertion that the stmts have NULL use_ops.
19628         Discard the statements, asserting that they haven't
19629         yet been added to a BB.
19631 2018-03-08  Richard Biener  <rguenther@suse.de>
19633         PR tree-optimization/84746
19634         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
19635         (phi_translate): Pass in destination ANTIC_OUT set.
19636         (phi_translate_1): Likewise.  For a simplified result lookup
19637         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
19638         (phi_translate_set): Adjust.
19639         (do_pre_regular_insertion): Likewise.
19640         (do_pre_partial_partial_insertion): Likewise.
19642 2018-03-08  Martin Liska  <mliska@suse.cz>
19644         PR gcov-profile/84735
19645         * doc/gcov.texi: Document usage of profile files.
19646         * gcov-io.h: Document changes in the format.
19648 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
19650         PR debug/84404
19651         PR debug/84408
19652         * dwarf2out.c (struct dw_line_info_table): Update comments for
19653         view == -1.
19654         (FORCE_RESET_NEXT_VIEW): New.
19655         (FORCE_RESETTING_VIEW_P): New.
19656         (RESETTING_VIEW_P): Check for -1 too.
19657         (ZERO_VIEW_P): Likewise.
19658         (new_line_info_table): Force-reset next view.
19659         (dwarf2out_begin_function): Likewise.
19660         (dwarf2out_source_line): Simplify zero_view_p initialization.
19661         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
19662         view directly.  Omit view when omitting .loc at line 0.
19664 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
19666         PR tree-optimization/84740
19667         * tree-switch-conversion.c (process_switch): Call build_constructors
19668         only if info.phi_count is non-zero.
19670         PR tree-optimization/84739
19671         * tree-tailcall.c (find_tail_calls): Check call arguments against
19672         DECL_ARGUMENTS (current_function_decl) rather than
19673         DECL_ARGUMENTS (func) when checking for tail recursion.
19675 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
19677         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
19678         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
19679         Volker Reichelt's entry and add entries for people that perform
19680         GCC fuzzy testing and report numerous bugs.
19682 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
19684         PR target/82411
19685         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
19686         readonly data in sdata, if that is disabled.
19687         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
19688         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
19689         -mreadonly-in-sdata option.
19691 2018-03-07  Martin Sebor  <msebor@redhat.com>
19693         PR tree-optimization/84468
19694         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
19695         basic block when looking for nul assignment.
19697 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
19699         PR target/84277
19700         * except.h (output_function_exception_table): Adjust prototype.
19701         * except.c (output_function_exception_table): Remove FNNAME parameter
19702         and add SECTION parameter.  Ouput one part of the table at a time.
19703         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
19704         the first part of the exception table and emit unwind directives.
19705         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
19706         (i386_pe_seh_cold_init): Likewise.
19707         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
19708         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
19709         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
19710         (ix86_output_call_insn): Emit a nop in one more case for SEH.
19711         * config/i386/winnt.c: Include except.h.
19712         (struct seh_frame_state): Add reg_offset, after_prologue and
19713         in_cold_section fields.
19714         (i386_pe_seh_end_prologue): Set seh->after_prologue.
19715         (i386_pe_seh_cold_init): New function.
19716         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
19717         to seh->in_cold_section.
19718         (seh_emit_push): Record the offset of the push.
19719         (seh_emit_save): Record the offet of the save.
19720         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
19721         Test seh->after_prologue to disregard the epilogue.
19722         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
19723         (i386_pe_end_cold_function): New function.
19725 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
19727         PR fortran/84565
19728         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
19729         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
19731         PR c++/84704
19732         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
19733         on tmp_var.
19734         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
19735         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
19737         PR middle-end/84723
19738         * multiple_target.c: Include tree-inline.h and intl.h.
19739         (expand_target_clones): Diagnose and fail if node->definition and
19740         !tree_versionable_function_p (node->decl).
19742 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
19744         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
19745         sprint_ul.
19746         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
19747         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19748         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
19750 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
19752         PR target/84710
19753         * combine.c (try_combine): Use reg_or_subregno instead of handling
19754         just paradoxical SUBREGs and REGs.
19756 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
19758         * config/arc/arc.c (arc_finalize_pic): Remove function.
19759         (arc_must_save_register): We use single base PIC register, remove
19760         checks to save/restore the PIC register.
19761         (arc_expand_prologue): Likewise.
19762         * config/arc/arc-protos.h (arc_set_default_type_attributes):
19763         Remove.
19764         (arc_verify_short): Likewise.
19765         (arc_attr_type): Likewise.
19766         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
19767         (walk_stores): Likewise.
19768         (arc_address_cost): Make it static.
19769         (arc_verify_short): Likewise.
19770         (branch_dest): Likewise.
19771         (arc_attr_type): Likewise.
19772         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
19773         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
19774         (arc_final_prescan_insn): Remove inserting the nops due to
19775         hardware hazards.  It is done in reorg step.
19776         (insn_length_variant_t): Remove.
19777         (insn_length_parameters_t): Likewise.
19778         (arc_insn_length_parameters): Likewise.
19779         (arc_get_insn_variants): Likewise.
19780         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
19782 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
19784         PR inline-asm/84683
19785         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
19786         assertion failure.
19788         PR tree-optimization/84687
19789         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
19790         on new_node->decl.
19791         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
19793 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19795         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
19796         Rename to ppc_speculation_barrier.
19797         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
19798         __builtin_ppc_speculation_barrier.
19800 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
19802         PR target/84700
19803         * combine.c (combine_simplify_rtx): Don't try to simplify if
19804         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
19805         are equal to x.
19807 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
19809         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
19810         to 32 bytes when compiling for POWER9.
19812 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
19814         PR target/84564
19815         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
19816         regparm >= 3 with no arg reg available also for calls with
19817         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
19819         PR target/84524
19820         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
19821         orig,vex.
19822         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
19824 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
19826         PR target/84264
19827         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
19829 2018-03-05  Richard Biener  <rguenther@suse.de>
19831         PR tree-optimization/84486
19832         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
19833         When inserting a __builtin_assume_aligned call set the LHS
19834         SSA name alignment info accordingly.
19836 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
19838         PR tree-optimization/84114
19839         * config/aarch64/aarch64.c (aarch64_reassociation_width)
19840         Avoid reassociation of FLOAT_MODE addition.
19842 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
19844         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
19845         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
19846         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
19847         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
19848         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
19849         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
19850         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
19851         and -mwbnoinvd.
19852         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
19853         __builtin_ia32_wbinvd): New builtins.
19854         (SPECIAL_ARGS2): New.
19855         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
19856         (SPECIAL_ARGS2): New.
19857         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
19858         (ix86_valid_target_attribute_inner_p): Ditto.
19859         (ix86_init_mmx_sse_builtins): Add special_args2.
19860         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
19861         TARGET_WBNOINVD_P): New.
19862         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
19863         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
19864         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
19865         * config/i386/immintrin.h (_wbinvd): New intrinsic.
19866         * config/i386/pconfigintrin.h: New file.
19867         * config/i386/wbnoinvdintrin.h: Ditto.
19868         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
19869         wbnoinvdintrin.h.
19870         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
19872 2018-03-05  Richard Biener  <rguenther@suse.de>
19874         PR tree-optimization/84670
19875         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19876         member.
19877         (BB_VISITED_WITH_VISITED_SUCCS): New define.
19878         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19879         (compute_antic_aux): Only assert the number of values in ANTIC_IN
19880         doesn't grow if all successors (recursively) were visited at least
19881         once.
19883 2018-03-05  Richard Biener  <rguenther@suse.de>
19885         PR tree-optimization/84650
19886         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
19887         if executed in the loop pipeline.
19889 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
19891         * doc/configfiles.texi (Configuration Files): Move info about
19892         conditionalizing $target-protos.h to...
19893         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
19894         differs from $target-protos.h.
19896 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
19897             Chung-Ju Wu  <jasonwucj@gmail.com>
19899         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
19900         * config/nds32/nds32-multiple.md (setmemsi): Define.
19901         * config/nds32/nds32-memory-manipulation.c
19902         (nds32_gen_dup_4_byte_to_word_value): New.
19903         (emit_setmem_word_loop): New.
19904         (emit_setmem_byte_loop): New.
19905         (nds32_expand_setmem_loop): New.
19906         (nds32_expand_setmem_loop_v3m): New.
19907         (nds32_expand_setmem_unroll): New.
19908         (nds32_expand_setmem): New.
19910 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
19911             Chung-Ju Wu  <jasonwucj@gmail.com>
19913         * config/nds32/nds32-memory-manipulation.c
19914         (nds32_emit_load_store): New.
19915         (nds32_emit_post_inc_load_store): New.
19916         (nds32_emit_mem_move): New.
19917         (nds32_emit_mem_move_block): New.
19918         (nds32_expand_movmemsi_loop_unknown_size): New.
19919         (nds32_expand_movmemsi_loop_known_size): New.
19920         (nds32_expand_movmemsi_loop): New.
19921         (nds32_expand_movmemsi_unroll): New.
19922         (nds32_expand_movmemqi): Rename ...
19923         (nds32_expand_movmemsi): ... to this.
19924         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
19925         (movmemsi): ... to this.
19926         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
19927         (nds32_expand_movmemsi): ... to this.
19929 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
19930             Monk Chiang  <sh.chiang04@gmail.com>
19931             Chung-Ju Wu  <jasonwucj@gmail.com>
19933         * config/nds32/nds32-protos.h
19934         (nds32_expand_load_multiple): New arguments.
19935         (nds32_expand_store_multiple): Ditto.
19936         (nds32_valid_multiple_load_store): Rename ...
19937         (nds32_valid_multiple_load_store_p): ... to this.
19938         * config/nds32/nds32-memory-manipulation.c
19939         (nds32_expand_load_multiple): Refine implementation.
19940         (nds32_expand_store_multiple): Ditto.
19941         * config/nds32/nds32-multiple.md
19942         (load_multiple): Update nds32_expand_load_multiple interface.
19943         (store_multiple): Update nds32_expand_store_multiple interface.
19944         * config/nds32/nds32-predicates.c
19945         (nds32_valid_multiple_load_store): Rename ...
19946         (nds32_valid_multiple_load_store_p): ... to this and refine
19947         implementation.
19948         * config/nds32/predicates.md
19949         (nds32_load_multiple_and_update_address_operation): New predicate.
19950         (nds32_store_multiple_and_update_address_operation): New predicate.
19952 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
19953             Chung-Ju Wu  <jasonwucj@gmail.com>
19955         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
19956         (combo): New attribute.
19957         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
19959 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
19961         * config/nds32/nds32.opt: Change -mcmodel= default value.
19963 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
19964             Monk Chiang  <sh.chiang04@gmail.com>
19965             Chung-Ju Wu  <jasonwucj@gmail.com>
19967         * config/nds32/constants.md (unspec_element): New enum.
19968         * config/nds32/constraints.md (Umw): New constraint.
19969         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
19970         * config/nds32/nds32-intrinsic.md: Likewise.
19971         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
19972         (nds32_valid_smw_lwm_base_p): New.
19973         (nds32_output_smw_single_word): New.
19974         (nds32_output_lmw_single_word): New.
19975         (nds32_expand_unaligned_load): New.
19976         (nds32_expand_unaligned_store): New.
19977         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
19978         (nds32_output_smw_single_word): Declare.
19979         (nds32_output_lmw_single_word): Declare.
19980         (nds32_expand_unaligned_load): Declare.
19981         (nds32_expand_unaligned_store): Declare.
19982         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
19983         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
19984         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
19985         NDS32_BUILTIN_UASTORE_DW.
19986         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
19987         predicate.
19989 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
19990             Kito Cheng  <kito.cheng@gmail.com>
19991             Chung-Ju Wu  <jasonwucj@gmail.com>
19993         * config/nds32/nds32-intrinsic.c
19994         (nds32_expand_builtin_null_ftype_reg): Delete.
19995         (nds32_expand_builtin_reg_ftype_imm): Ditto.
19996         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
19997         (nds32_read_argument): New.
19998         (nds32_legitimize_target): Ditto.
19999         (nds32_legitimize_argument): Ditto.
20000         (nds32_check_constant_argument): Ditto.
20001         (nds32_expand_unop_builtin): Ditto.
20002         (nds32_expand_unopimm_builtin): Ditto.
20003         (nds32_expand_binop_builtin): Ditto.
20004         (nds32_builtin_decl_impl): Ditto.
20005         (builtin_description): Ditto.
20006         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
20007         (nds32_init_builtins_impl): Ditto.
20008         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
20009         (nds32_builtin_decl): New.
20010         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
20011         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
20013 2018-03-02  Jeff Law  <law@redhat.com>
20015         * reorg.c (stop_search_p): Handle DEBUG_INSN.
20016         (redundant_insn, fill_simple_delay_slots): Likewise.
20017         (fill_slots_from_thread): Likewise.
20018         * resource.c (mark_referenced_resources): Likewise.
20019         (mark_set_resources, find_dead_or_set_registers): Likewise.
20021 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20023         * substring-locations.h (format_warning_va): Formatting fix for
20024         ATTRIBUTE_GCC_DIAG.
20025         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
20026         argument.
20027         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
20028         * substring-locations.c: Include intl.h.
20029         (format_warning_va): Turned into small wrapper around
20030         format_warning_n_va, renamed to ...
20031         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
20032         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
20033         use ngettext.
20034         (format_warning_at_substring_n): New function.
20035         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
20036         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
20037         format_warning_at_substring with just a shorter name instead of
20038         const function pointer.
20039         (fmtwarn_n): New function.
20040         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
20041         appropriate, get rid of all the fmtstr temporaries, move conditionals
20042         with G_() wrapped string literals directly into fmtwarn arguments,
20043         cast dir.len to (int), formatting fixes.
20045 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
20047         * doc/invoke.texi: Remove "Cilk Plus" references.
20049 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20050             Richard Biener  <rguenther@suse.de>
20052         PR ipa/84628
20053         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
20054         for error or warning attributes if CALL_FROM_THUNK_P is set.
20055         Formatting fixes.
20057 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20059         PR target/56540
20060         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
20061         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
20063         PR target/56540
20064         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
20065         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
20067         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
20068         instead of -1U in last predictors element's probability member.
20070 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
20072         PR ipa/83983
20073         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20074         arguments if they are comparable.
20076 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
20078         PR tree-optimization/84634
20079         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
20080         masks and masked_loop_p with a single loop_masks, making sure it's
20081         null for bb vectorization.
20083 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
20085         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
20086         (vect_analyze_data_ref_access): Use loop->safe_len rather than
20087         loop->force_vectorize to check whether there is no alias.
20089 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20091         PR target/84614
20092         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
20093         prototypes.
20094         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
20095         comments.
20096         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
20097         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
20098         instead of a loop around prev_real_insn.
20099         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
20100         prev_real_insn.
20102         PR inline-asm/84625
20103         * config/i386/i386.c (ix86_print_operand): Use conditional
20104         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
20105         zero vector.
20107 2018-03-02  Richard Biener  <rguenther@suse.de>
20109         PR tree-optimization/84427
20110         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
20111         (bitmap_set_subtract_values): Rewrite to handle multiple
20112         exprs per value.
20113         (clean): Likewise.
20114         (prune_clobbered_mems): Likewise.
20115         (phi_translate): Take edge instead of pred/phiblock.
20116         (phi_translate_1): Likewise.
20117         (phi_translate_set): Likewise.  Insert all translated
20118         exprs for a value into the set, keeping possibly multiple
20119         expressions per value.
20120         (compute_antic_aux): Adjust for phi_translate changes.
20121         When intersecting union the expressions and prune those
20122         not in the final value set, keeping possibly multiple
20123         expressions per value.  Do not use value-insertion
20124         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
20125         all expressions.  Add verification that the value-sets
20126         only shrink during iteration.
20127         (compute_partial_antic_aux): Adjust for the phi_translate changes.
20128         (do_pre_regular_insertion): Likewise.
20129         (do_pre_partial_partial_insertion): Likewise.
20131 2018-03-02  Richard Biener  <rguenther@suse.de>
20133         PR target/82005
20134         * config/darwin.c (saved_debug_info_level): New static global.
20135         (darwin_asm_lto_start): Disable debug info generation for LTO out.
20136         (darwin_asm_lto_end): Restore debug info generation settings.
20138 2018-03-01  Martin Liska  <mliska@suse.cz>
20140         PR sanitizer/82484
20141         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
20142         volatile arguments.
20144 2018-03-01  Richard Biener  <rguenther@suse.de>
20146         PR debug/84645
20147         * dwarf2out.c (gen_variable_die): Properly handle late VLA
20148         type annotation with LTO when debug was disabled at compile-time.
20150 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
20152         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
20153         XINT with INTVAL.
20154         (mips_final_postscan_insn): Likewise.
20156 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
20158         PR rtl-optimization/84528
20159         * alias.c (init_alias_target): Add commentary.
20160         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
20161         a unique base value if the frame pointer is not eliminated
20162         to the stack pointer.
20164 2018-03-01  Tom de Vries  <tom@codesourcery.com>
20166         PR rtl-optimization/83327
20167         * lra-int.h (hard_regs_spilled_into): Declare.
20168         * lra.c (hard_regs_spilled_into): Define.
20169         (init_reg_info): Init hard_regs_spilled_into.
20170         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
20171         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
20172         (process_bb_lives): Handle hard_regs_spilled_into.
20173         (lra_create_live_ranges_1): Before doing liveness propagation, clear
20174         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
20176 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
20178         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
20179         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
20180         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
20181         * config/rs6000/aix72.h: New file.
20183 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
20185         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
20186         instead of warning_at with conditional singular and plural messages
20187         where possible.
20189         PR target/52991
20190         * stor-layout.c (update_alignment_for_field): For
20191         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
20192         && !DECL_PACKED (field), do the alignment update, just use
20193         only desired_align instead of MAX (type_align, desired_align)
20194         as the alignment.
20195         (place_field): Don't do known_align < desired_align handling
20196         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
20197         is non-NULL, instead do it after rli->prev_field handling and
20198         only if not within a bitfield word.  For DECL_PACKED (field)
20199         use type_align of BITS_PER_UNIT.
20201 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
20203         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
20204         superfluous parentheses and trailing spaces.
20206 2018-02-28  Richard Biener  <rguenther@suse.de>
20208         PR tree-optimization/84584
20209         * graphite-scop-detection.c (scop_detection::add_scop): Discard
20210         SCoPs with fake exit edge.
20212 2018-02-28  Martin Liska  <mliska@suse.cz>
20214         PR testsuite/84597
20215         * timevar.c (timer::print): Fix format to properly print 100%
20216         values.
20218 2018-02-28  Richard Biener  <rguenther@suse.de>
20220         PR middle-end/84607
20221         * genmatch.c (capture_info::walk_match): Do not mark
20222         captured expressions without operands as expr_p given
20223         they act more like predicates and should be subject to
20224         "lost tail" side-effect preserving.
20226 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
20228         PR rtl-optimization/81611
20229         * auto-inc-dec.c (attempt_change): Move dead note from
20230         mem_insn if it's the next use of regno
20231         (find_address): Take address use of reg holding
20232         non-incremented value.  Add parm to limit search to the named
20233         reg only.
20234         (merge_in_block): Attempt to use a mem insn that is the next
20235         use of the original regno.
20237 2018-02-27  Martin Sebor  <msebor@redhat.com>
20239         PR c++/83871
20240         * doc/invoke.texi (-Wmissing-attributes): New option.
20241         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
20243 2018-02-27  Martin Sebor  <msebor@redhat.com>
20245         PR translation/84207
20246         * diagnostic-core.h (warning_n, error_n, inform_n): Change
20247         n argument to unsigned HOST_WIDE_INT.
20248         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
20249         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
20250         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
20251         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
20253 2018-02-27  Richard Biener  <rguenther@suse.de>
20255         PR tree-optimization/84512
20256         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
20257         Do not use the estimate returned from record_stmt_cost for
20258         the scalar iteration cost but sum properly using add_stmt_cost.
20260 2018-02-27  Richard Biener  <rguenther@suse.de>
20262         PR tree-optimization/84466
20263         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20264         Adjust last change to less strictly validate use operands.
20266 2018-02-27  Martin Liska  <mliska@suse.cz>
20268         PR gcov-profile/84548
20269         * gcov.c (process_file): Allow partial overlap and consider it
20270         also as group functions.
20271         (output_lines): Properly calculate range of lines for a group.
20273 2018-02-27  Martin Liska  <mliska@suse.cz>
20275         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
20276         'ggc' suffixes.  Change first column width.
20277         (timer::print): Fix formatting of the column.
20279 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
20281         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
20282         preserve inline entry blocks for the sake of debug inline
20283         entry point markers alone.
20284         (remove_unused_locals): Suggest in comments a better place to
20285         force the preservation of inline entry blocks that are
20286         otherwise unused, but do not preserve them.
20288 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
20290         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
20292 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
20294         PR target/84039
20295         * config/i386/constraints.md (Bs): Replace
20296         ix86_indirect_branch_register with
20297         TARGET_INDIRECT_BRANCH_REGISTER.
20298         (Bw): Likewise.
20299         * config/i386/i386.md (indirect_jump): Likewise.
20300         (tablejump): Likewise.
20301         (*sibcall_memory): Likewise.
20302         (*sibcall_value_memory): Likewise.
20303         Peepholes of indirect call and jump via memory: Likewise.
20304         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
20305         (*sibcall_value_GOT_32): Likewise.
20306         * config/i386/predicates.md (indirect_branch_operand): Likewise.
20307         (GOT_memory_operand): Likewise.
20308         (call_insn_operand): Likewise.
20309         (sibcall_insn_operand): Likewise.
20310         (GOT32_symbol_operand): Likewise.
20311         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
20313 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
20315         PR rtl-optimization/83496
20316         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
20317         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
20318         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
20319         redundant insn, if any.
20320         (relax_delay_slots): Likewise.
20321         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
20323 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
20325         PR tree-optimization/83965
20326         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
20327         that grouped statements are part of a reduction chain.  Return
20328         true if the statement is not marked as a reduction itself but
20329         is part of a group.
20330         (vect_recog_dot_prod_pattern): Don't check whether the statement
20331         is part of a group here.
20332         (vect_recog_sad_pattern): Likewise.
20333         (vect_recog_widen_sum_pattern): Likewise.
20335 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
20337         PR debug/84545
20338         * final.c (rest_of_clean_state): Also look for calls inside sequences.
20340 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
20342         PR target/84530
20343         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
20344         the bool argument.
20345         (ix86_output_indirect_function_return): New prototype.
20346         (ix86_split_simple_return_pop_internal): Likewise.
20347         * config/i386/i386.c (indirect_return_via_cx): New.
20348         (indirect_return_via_cx_bnd): Likewise.
20349         (indirect_thunk_name): Handle return va CX_REG.
20350         (output_indirect_thunk_function): Create alias for
20351         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
20352         (ix86_output_indirect_jmp): Remove the bool argument.
20353         (ix86_output_indirect_function_return): New function.
20354         (ix86_split_simple_return_pop_internal): Likewise.
20355         * config/i386/i386.md (*indirect_jump): Don't pass false
20356         to ix86_output_indirect_jmp.
20357         (*tablejump_1): Likewise.
20358         (simple_return_pop_internal): Change it to define_insn_and_split.
20359         Call ix86_split_simple_return_pop_internal to split it for
20360         -mfunction-return=.
20361         (simple_return_indirect_internal): Call
20362         ix86_output_indirect_function_return instead of
20363         ix86_output_indirect_jmp.
20365 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
20367         PR bootstrap/84405
20368         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
20369         memset and value initialization afterwards.
20371 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
20373         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
20375 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
20377         PR target/84521
20378         * common/config/aarch64/aarch64-common.c
20379         (aarch_option_optimization_table[]): Switch
20380         off fomit-frame-pointer
20382 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
20383             Chung-Ju Wu  <jasonwucj@gmail.com>
20385         * config/nds32/nds32-multiple.md (load_multiple): Disallow
20386         volatile memory.
20387         (store_multiple): Ditto.
20389 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
20391         * config.gcc: Add --with-cpu support for nds32 target.
20392         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
20393         * config/nds32/nds32.opt: Add -mcpu= option.
20395 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
20397         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
20398         isel=yes): Warn for these deprecated options.
20400 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
20402         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
20403         ISA_2_5_MASKS_EMBEDDED.
20405 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
20407         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
20408         p->max as pointers rather than using iterative_hash_expr.
20410 2018-02-23  Carl Love  <cel@us.ibm.com>
20412         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
20413         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
20414         BU_P8V_OVERLOAD_2.
20415         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
20416         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
20417         P8V_BUILTIN_VEC_VUNSIGNED2.
20419 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
20421         PR target/81572
20422         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
20423         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
20424         LRA_UNKNOWN_ALT.
20425         * lra-constraints.c (curr_insn_transform): Set up
20426         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
20427         LRA_UNKNOWN_ALT.
20428         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
20429         * lra-eliminations.c (spill_pseudos): Ditto.
20430         (process_insn_for_elimination): Ditto.
20431         * lra-lives.c (reg_early_clobber_p): Use the new macros.
20432         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
20433         LRA_NON_CLOBBERED_ALT.
20435 2018-02-22  Martin Sebor  <msebor@redhat.com>
20437         PR tree-optimization/84480
20438         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
20439         to maybe_diag_stxncpy_trunc.  Call it.
20440         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
20441         from gimple_fold_builtin_strcpy.  Print inlining stack.
20442         (handle_builtin_stxncpy): Print inlining stack.
20443         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
20445 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
20447         PR target/84176
20448         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
20449         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
20450         and -fcheck-pointer-bounds are used together.
20451         (indirect_thunk_prefix): New enum.
20452         (indirect_thunk_need_prefix): New function.
20453         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
20454         "_nt" instead of "_bnd" for NOTRACK prefix.
20455         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
20456         (output_indirect_thunk_function): Likewise.
20457         (): Likewise.
20458         (ix86_code_end): Update output_indirect_thunk_function calls.
20459         (ix86_output_indirect_branch_via_reg): Replace
20460         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
20461         (ix86_output_indirect_branch_via_push): Likewise.
20462         (ix86_output_function_return): Likewise.
20463         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
20464         incompatible with -fcf-protection=branch and
20465         -fcheck-pointer-bounds.
20467 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
20469         PR target/83335
20470         * config/aarch64/aarch64.c (aarch64_print_address_internal):
20471         Change gcc_assert call to output_operand_lossage.
20473 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
20475         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
20477 2018-02-22  DJ Delorie  <dj@redhat.com>
20478             Sebastian Perta  <sebastian.perta@renesas.com>
20479             Oleg Endo  <olegendo@gcc.gnu.org>
20481         * config/rx/rx.c (rx_rtx_costs): New function.
20482         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
20484 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
20486         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
20488 2018-02-22  Martin Liska  <mliska@suse.cz>
20490         PR driver/83193
20491         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
20492         Add "native" as a possible value.
20494 2018-02-22  Martin Liska  <mliska@suse.cz>
20496         PR driver/83193
20497         * config/i386/i386.c (ix86_option_override_internal):
20498         Add "native" as a possible value for -march and -mtune.
20500 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
20502         PR target/84502
20503         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
20504         to all type variants.
20506         PR tree-optimization/84503
20507         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
20508         width as info->bitpos + info->bitsize - start.
20509         (merged_store_group::merge_overlapping): Simplify width computation.
20510         (check_no_overlap): New function.
20511         (imm_store_chain_info::try_coalesce_bswap): Compute expected
20512         start + width and last_order of the group, fail if check_no_overlap
20513         fails.
20514         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
20515         to group if check_no_overlap fails.
20517 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
20519         * config/rs6000/altivec.md: Delete contraint arguments to
20520         define_expand, define_split, and define_peephole2, and in
20521         define_insn_and_split if always unused.
20522         * config/rs6000/darwin.md: Ditto.
20523         * config/rs6000/dfp.md: Ditto.
20524         * config/rs6000/rs6000.md: Ditto.
20525         * config/rs6000/sync.md: Ditto.
20526         * config/rs6000/vector.md: Ditto.
20527         * config/rs6000/vsx.md: Ditto.
20529 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
20531         * config/rs6000/altivec.md: Write output control strings as braced
20532         blocks instead of double-quoted strings.
20533         * config/rs6000/darwin.md: Ditto.
20534         * config/rs6000/rs6000.md: Ditto.
20535         * config/rs6000/vector.md: Ditto.
20536         * config/rs6000/vsx.md: Ditto.
20538 2018-02-21  Jason Merrill  <jason@redhat.com>
20540         PR c++/84314 - ICE with templates and fastcall attribute.
20541         * attribs.c (build_type_attribute_qual_variant): Remove assert.
20543 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
20545         * ipa-cp.c (determine_versionability): Fix comment typos.
20547 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
20549         PR c/84229
20550         * ipa-cp.c (determine_versionability): Do not version functions caling
20551         va_arg_pack.
20553 2018-02-21  Martin Liska  <mliska@suse.cz>
20555         PR driver/83193
20556         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
20557         Add "native" as a possible value.
20558         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
20559         the macro when native cpu detection is available.
20561 2018-02-21  Martin Liska  <mliska@suse.cz>
20563         PR driver/83193
20564         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
20565         Add "native" as a possible value.
20566         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
20567         when native cpu detection is available.
20569 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
20570             Martin Sebor  <msebor@redhat.com>
20572         PR tree-optimization/84478
20573         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
20574         false.
20575         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
20576         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
20577         support which is conservatively correct, for 2 only stay conservative
20578         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
20579         argument to the 2 argument get_range_strlen, adjust 6 arg
20580         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
20581         false.
20582         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
20583         (gimple_fold_builtin_strlen): Pass true as last argument to
20584         get_range_strlen.
20586 2018-02-20  Martin Sebor  <msebor@redhat.com>
20588         PR middle-end/84095
20589         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
20590         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
20591         (builtin_memref::builtin_memref): Factor out parts into
20592         set_base_and_offset and call it.
20594 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
20596         PR middle-end/84406
20597         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
20598         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
20599         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
20600         search at the associated MODE_INT.
20602 2018-02-20  Jeff Law  <law@redhat.com>
20604         PR middle-end/82123
20605         PR tree-optimization/81592
20606         PR middle-end/79257
20607         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
20608         for range data rather than using global data.
20609         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
20610         range data rather than using global data.
20611         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
20612         pass it to children as needed.
20613         (struct directive::fmtresult): Similarly.
20614         (struct directive::set_width): Similarly.
20615         (struct directive::set_precision): Similarly.
20616         (format_integer, format_directive, parse_directive): Similarly.
20617         (format_none): Accept unnamed vr_values parameter.
20618         (format_percent, format_floating, format_character): Similarly.
20619         (format_string, format_plain): Similarly.
20620         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
20621         the EVRP range analyzer for range data rather than using global data.
20622         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
20623         gimple-ssa-evrp-analyze.h
20624         (class sprintf_dom_walker): Add after_dom_children member function.
20625         Add evrp_range_analyzer member.
20626         (sprintf_dom_walker::before_dom_children): Call into the EVRP
20627         range analyzer as needed.
20628         (sprintf_dom_walker::after_dom_children): New member function.
20629         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
20630         if not optimizing.
20631         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
20632         (evrp_range_analyzer::pop_to_marker): Likewise.
20634 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
20636         PR tree-optimization/84419
20637         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
20638         with the required type if its current type is compatible but
20639         different.
20641 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
20643         PR middle-end/82004
20644         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
20645         after vectorization.
20647 2018-02-20  Martin Liska  <mliska@suse.cz>
20649         PR driver/83193
20650         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
20651         possible values if we don't have a hint.
20653 2018-02-20  Martin Liska  <mliska@suse.cz>
20655         PR c/84310
20656         PR target/79747
20657         * final.c (shorten_branches): Build align_tab array with one
20658         more element.
20659         * opts.c (finish_options): Add alignment option limit check.
20660         (MAX_CODE_ALIGN): Likewise.
20661         (MAX_CODE_ALIGN_VALUE): Likewise.
20662         * doc/invoke.texi: Document maximum allowed option value for
20663         all -falign-* options.
20665 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
20667         PR target/84146
20668         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
20669         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
20670         * var-tracking.c (emit_note_insn_var_location): Remove all references
20671         to NOTE_INSN_CALL_ARG_LOCATION.
20672         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
20673         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
20674         Use copy_rtx_if_shared.
20675         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
20676         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
20677         (dwarf2out_var_location): Remove handling of
20678         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
20679         on call_insn.
20680         * final.c (final_scan_insn): Remove all references to
20681         NOTE_INSN_CALL_ARG_LOCATION.
20682         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
20683         before dumping final insns.
20684         * except.c (emit_note_eh_region_end): Remove all references to
20685         NOTE_INSN_CALL_ARG_LOCATION.
20686         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
20687         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
20688         * config/arc/arc.c (hwloop_optimize): Likewise.
20689         * config/arm/arm.c (create_fix_barrier): Likewise.
20690         * config/s390/s390.c (s390_chunkify_start): Likewise.
20691         * config/sh/sh.c (find_barrier): Likewise.
20692         * config/i386/i386.c (rest_of_insert_endbranch,
20693         ix86_seh_fixup_eh_fallthru): Likewise.
20694         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
20695         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
20696         * config/frv/frv.c (frv_function_prologue): Likewise.
20697         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
20698         reg note.
20699         (note_outside_basic_block_p): Remove all references to
20700         NOTE_INSN_CALL_ARG_LOCATION.
20701         * gengtype.c (adjust_field_rtx_def): Likewise.
20702         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
20703         Likewise.
20704         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
20705         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
20707         PR c++/84444
20708         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
20709         is ADDR_EXPR.
20711         PR tree-optimization/84452
20712         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
20713         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
20714         is NULL.
20716 2018-02-19  Martin Liska  <mliska@suse.cz>
20718         PR sanitizer/82183
20719         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
20721 2018-02-19  Martin Liska  <mliska@suse.cz>
20722             Richard Sandiford  <richard.sandiford@linaro.org>
20724         PR tree-optimization/82491
20725         * gimple-fold.c (get_base_constructor): Make earlier bail out
20726         to prevent ubsan.
20728 2018-02-19  Carl Love  <cel@us.ibm.com>
20730         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
20731         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
20732         BU_P8V_OVERLOAD_1.
20733         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
20734         P8V_BUILTIN_VEC_NEG.
20736 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
20738         * config/rl78/rl78.md (movdf): New define expand.
20740 2018-02-19  Martin Liska  <mliska@suse.cz>
20742         PR other/80589
20743         * doc/invoke.texi: Fix typo.
20744         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
20746 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
20748         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
20749         handle rs6000_single_float and rs6000_double_float specially for
20750         e500 family CPUs.
20752 2018-02-16  Jeff Law  <law@redhat.com>
20754         * config/rx/rx.c (add_pop_cfi_notes): New function.;
20755         (pop_regs): Use it.
20757 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
20759         PR ipa/84425
20760         * ipa-inline.c (inline_small_functions): Fix a typo.
20762 2018-02-16  Nathan Sidwell  <nathan@acm.org>
20764         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
20766 2018-02-16  Carl Love  <cel@us.ibm.com>
20768         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
20769         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
20770         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
20771         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
20772         expansion to P8V_BUILTIN_VEC_FLOAT2.
20774 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
20776         PR rtl-optimization/70023
20777         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
20778         src_regno into account.
20780 2018-02-16  Carl Love  <cel@us.ibm.com>
20782         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
20783         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
20784         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
20785         * config/rs6000/rs6000.c: Remove case statements for
20786         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
20787         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
20788         and P9V_BUILTIN_VEC_VINSERT4B.
20789         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
20790         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
20791         * config/rs6000/vsx.md:
20792         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
20793         vec_insert4b.
20795 2018-02-16  Carl Love  <cel@us.ibm.com>
20797         * config/rs6000/altivec.h: Add builtin names vec_extract4b
20798         vec_insert4b.
20799         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
20800         definitions.
20801         * config/rs6000/rs6000-c.c: Add the definitions for
20802         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
20803         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
20804         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
20805         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
20806         definition for insert4b and define insn *insert3b_internal.
20807         * doc/extend.texi: Add documentation for vec_extract4b.
20809 2018-02-16  Nathan Sidwell  <nathan@acm.org>
20811         * doc/extend.texi (Backwards Compatibility): Mention friend
20812         injection.  Note for-scope is deprecated.
20813         * doc/invoke.texi (-ffriend-injection): Deprecate.
20815 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
20817         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
20818         that moved to I2, also allow destinations that are a paradoxical
20819         subreg (instead of a normal reg).
20821 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
20823         PR target/83831
20824         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
20825         to QImode.
20827 2018-02-16  Richard Biener  <rguenther@suse.de>
20829         PR tree-optimization/84037
20830         PR tree-optimization/84016
20831         PR target/82862
20832         * config/i386/i386.c (ix86_builtin_vectorization_cost):
20833         Adjust vec_construct for the fact we need additional higher latency
20834         128bit inserts for AVX256 and AVX512 vector builds.
20835         (ix86_add_stmt_cost): Scale vector construction cost for
20836         elementwise loads.
20838 2018-02-16  Richard Biener  <rguenther@suse.de>
20840         PR tree-optimization/84417
20841         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
20842         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
20843         (non_rewritable_lvalue_p): Likewise, use poly-ints.
20845 2018-02-16  Martin Liska  <mliska@suse.cz>
20847         PR sanitizer/84307
20848         * internal-fn.def (ASAN_CHECK): Set proper flags.
20849         (ASAN_MARK): Likewise.
20851 2018-02-16  Julia Koval  <julia.koval@intel.com>
20853         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
20854         from PTA_CANNONLAKE.
20856 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
20858         PR target/84272
20859         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
20860         Use ++iter rather than iter++ for std::list iterators.
20861         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
20862         defer deleting them until all nodes in the forest are processed.  Do
20863         free even leaf nodes.  Change to_process into auto_vec.
20865         PR bootstrap/84405
20866         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
20867         * vec.h (vec_default_construct): Use memset instead of placement new
20868         if BROKEN_VALUE_INITIALIZATION is defined.
20869         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
20870         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
20871         is defined.
20873         PR rtl-optimization/83723
20874         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
20875         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
20876         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
20877         recursive calls.
20878         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
20879         callers.
20880         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
20882 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
20884         PR rtl-optimization/81443
20885         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
20886         from inner REGs to paradoxical SUBREGs.
20888 2018-02-16  Richard Biener  <rguenther@suse.de>
20890         PR tree-optimization/84399
20891         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20892         For operands we can analyze at their definition make sure we can
20893         analyze them at each use as well.
20895 2018-02-16  Richard Biener  <rguenther@suse.de>
20897         PR tree-optimization/84190
20898         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
20899         volatile accesses if the decl isn't volatile.
20901 2018-02-15  Jason Merrill  <jason@redhat.com>
20903         PR c++/84314 - ICE with templates and fastcall attribute.
20904         * attribs.c (build_type_attribute_qual_variant): Don't clobber
20905         TYPE_CANONICAL on an existing type.
20907 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
20909         PR tree-optimization/84383
20910         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
20911         dstoff nor call operand_equal_p if dstbase is NULL.
20913         PR tree-optimization/84334
20914         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
20915         also a CONSTANT_CLASS_P, punt.
20917 2018-02-14  Jim Wilson  <jimw@sifive.com>
20919         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
20920         first SMALL_OPERAND check.  New local min_second_step.  Move assert
20921         to where locals are set.  Add TARGET_RVC support.
20922         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
20924 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
20926         * doc/invoke.texi: Correct -Wformat-overflow code sample.
20928 2018-02-14  Martin Sebor  <msebor@redhat.com>
20930         PR tree-optimization/83698
20931         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
20932         arrays constrain the offset range to their bounds.
20933         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
20934         (builtin_access::overlap): Avoid setting the size of overlap if it's
20935         already been set.
20936         (maybe_diag_overlap): Also consider arrays when deciding what values
20937         of offsets to include in diagnostics.
20939 2018-02-14  Martin Sebor  <msebor@redhat.com>
20941         PR c/84108
20942         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
20943         that correspond to the kind of a declaration.
20945 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
20947         PR target/83984
20948         * config/pa/pa.md: Load address of PIC label using the linkage table
20949         if the label is nonlocal.
20951 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20953         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
20954         warning message if user requests -maltivec=be.
20955         * doc/invoke.texi: Document deprecation of -maltivec=be.
20957 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
20959         PR target/84220
20960         * config/rs6000/rs6000-c.c: Update definitions for
20961         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
20962         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
20964 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
20966         PR target/84239
20967         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
20968         add _get_ssp intrinsics. Remove argument from
20969         __builtin_ia32_rdssp[d|q].
20970         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
20971         * config/i386/i386-builtin.def: Remove argument from
20972         __builtin_ia32_rdssp[d|q].
20973         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
20974         ix86_expand_special_args_builtin for _rdssp[d|q].
20975         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
20976         Clear register before usage.
20977         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
20978         Add documentation for new _get_ssp and _inc_ssp intrinsics.
20980 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
20982         PR tree-optimization/84357
20983         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
20984         operand 1 of an ARRAY_REF too.
20986 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
20988         PR target/83831
20989         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
20990         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
20991         declarations.
20992         (set_of_reg): New struct.
20993         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
20994         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
20995         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
20996         functions.
20997         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
20998         Split into bitclr, bitset, bitinvert patterns if appropriate.
20999         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
21000         use rx_fuse_in_memory_bitop.
21001         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
21002         to named insn, correct maximum insn length.
21004 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
21006         PR target/79242
21007         * machmode.def: Define a complex mode for PARTIAL_INT.
21008         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
21009         MODE_PARTIAL_INT.
21010         * doc/rtl.texi: Document CSPImode.
21011         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
21012         handling.
21013         (msp430_hard_regno_nregs_with_padding): Likewise.
21015 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
21017         PR target/84279
21018         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
21020 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
21022         PR rtl-optimization/84169
21023         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
21024         we generated a parallel as new i3 and we split that to new i2 and i3
21025         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
21026         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
21027         those to i2, not i1.  Partially rewrite this scan code.
21029 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
21031         PR c/82210
21032         * stor-layout.c (place_field): For variable length fields, adjust
21033         offset_align afterwards not just based on the field's alignment,
21034         but also on the size.
21036         PR middle-end/84309
21037         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
21038         of exps and logs in the use_exp2 case.
21040 2018-02-13  Jeff Law  <law@redhat.com>
21042         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
21043         entry for "vector".
21045         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
21046         ARGS as unused.
21048 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
21050         PR debug/84342
21051         PR debug/84319
21052         * common.opt (gas-loc-support, gas-locview-support): New.
21053         (ginline-points, ginternal-reset-location-views): New.
21054         * doc/invoke.texi: Document them.  Use @itemx where intended.
21055         (gvariable-location-views): Adjust.
21056         * target.def (reset_location_view): New.
21057         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
21058         (TARGET_RESET_LOCATION_VIEW): New.
21059         * doc/tm.texi: Rebuilt.
21060         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
21061         (dwarf2out_default_as_locview_support): New.
21062         (output_asm_line_debug_info): Use option variables.
21063         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
21064         (output_loc_list): Likewise.
21065         (add_high_low_attributes): Check option variables.
21066         Don't output entry view attribute in strict mode.
21067         (gen_inlined_subroutine_die): Check option variables.
21068         (dwarf2out_inline_entry): Likewise.
21069         (init_sections_and_labels): Likewise.
21070         (dwarf2out_early_finish): Likewise.
21071         (maybe_reset_location_view): New, from...
21072         (dwarf2out_var_location): ... here.  Call it.
21073         * debug.h (dwarf2out_default_as_loc_support): Declare.
21074         (dwarf2out_default_as_locview_support): Declare.
21075         * hooks.c (hook_int_rtx_insn_0): New.
21076         * hooks.h (hook_int_rtx_insn_0): Declare.
21077         * toplev.c (process_options): Take -gas-loc-support and
21078         -gas-locview-support from dwarf2out.  Enable
21079         -gvariable-location-views by default only with locview
21080         assembler support.  Enable -ginternal-reset-location-views by
21081         default only if the target defines the corresponding hook.
21082         Enable -ginline-points by default if location views are
21083         enabled; force it disabled if statement frontiers are
21084         disabled.
21085         * tree-inline.c (expand_call_inline): Check option variables.
21086         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
21088 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
21090         PR tree-optimization/84321
21091         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
21092         handling.  Also check whether the anti-range contains any values
21093         that satisfy the mask; switch to a VR_RANGE if not.
21095 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
21097         PR sanitizer/84340
21098         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
21100 2018-02-13  Martin Jambor  <mjambor@suse.cz>
21102         PR c++/83990
21103         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
21104         of call statements, also set location of a load to a temporary.
21106 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
21108         * config/rl78/rl78.c (add_vector_labels): New function.
21109         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
21110         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
21111         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
21112         which checks that no arguments are passed.
21113         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
21114         * doc/extend.texi: Documentation for the new attribute.
21116 2018-02-13  Andreas Schwab  <schwab@suse.de>
21118         * config/riscv/linux.h (CPP_SPEC): Define.
21120 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
21122         PR target/84335
21123         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
21124         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
21125         OPTION_MASK_ISA_AES as first argument to def_builtin_const
21126         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
21127         instead of OPTION_MASK_ISA_PCLMUL as first argument to
21128         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
21129         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
21130         temporarily for AES and PCLMUL builtins.
21132         PR tree-optimization/84339
21133         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
21134         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
21135         Formatting fixes.
21137         PR middle-end/84309
21138         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
21139         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
21140         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
21141         inline function.
21142         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
21143         inline function.
21144         * omp-simd-clone.h: New file.
21145         * omp-simd-clone.c: Include omp-simd-clone.h.
21146         (expand_simd_clones): No longer static.
21147         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
21148         cgraph.h and omp-simd-clone.h.
21149         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
21150         (vect_recog_widen_shift_pattern): Formatting fix.
21151         (vect_pattern_recog_1): Don't check optab for calls.
21153         PR target/84336
21154         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
21155         operands[2] into a REG before using gen_lowpart on it.
21157 2018-02-12  Jeff Law  <law@redhat.com>
21159         PR target/83760
21160         * config/sh/sh.c (find_barrier): Consider a sibling call
21161         a barrier as well.
21163         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
21164         successfully back substituting a reg.
21166 2018-02-12  Richard Biener  <rguenther@suse.de>
21168         PR tree-optimization/84037
21169         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
21170         parameter, move visited init to caller.
21171         (vect_slp_analyze_operations): Separate cost from validity
21172         check, initialize visited once for all instances.
21173         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
21174         for all instances.
21175         * tree-vect-stmts.c (vect_model_simple_cost): Make early
21176         out an assert.
21177         (vect_model_promotion_demotion_cost): Likewise.
21178         (vectorizable_bswap): Guard cost modeling with !slp_node
21179         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
21180         SLP stmts.
21181         (vectorizable_call): Likewise.
21182         (vectorizable_conversion): Likewise.
21183         (vectorizable_assignment): Likewise.
21184         (vectorizable_shift): Likewise.
21185         (vectorizable_operation): Likewise.
21186         (vectorizable_store): Likewise.
21187         (vectorizable_load): Likewise.
21188         (vectorizable_condition): Likewise.
21189         (vectorizable_comparison): Likewise.
21191 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
21193         PR sanitizer/84307
21194         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
21195         (ASAN_MARK): Fix fnspec to account for return value, change pointer
21196         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
21198 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
21200         PR middle-end/83665
21201         * params.def (inline-min-speedup): Increase from 8 to 15.
21202         (max-inline-insns-auto): Decrease from 40 to 30.
21203         * ipa-split.c (consider_split): Add some buffer for function to
21204         be considered inlining candidate.
21205         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
21206         default values.
21208 2018-02-12  Richard Biener  <rguenther@suse.de>
21210         PR tree-optimization/84037
21211         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
21212         matched stmts if we cannot swap the non-matched ones.
21214 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
21216         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
21217         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
21218         _mm_maskz_scalef_round_ss): New intrinsics.
21219         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
21220         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
21221         __builtin_ia32_scalefss_round): Remove.
21222         (__builtin_ia32_scalefsd_mask_round,
21223         __builtin_ia32_scalefss_mask_round): New intrinsics.
21224         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
21225         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
21226         ((match_operand:VF_128 2 "<round_nimm_predicate>"
21227         "<round_constraint>")): Changed to ...
21228         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
21229         "<round_scalar_constraint>")): ... this.
21230         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
21231         %0, %1, %2<round_op3>}"): Changed to ...
21232         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
21233         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
21234         %2<round_scalar_mask_op3>}"): ... this.
21235         * config/i386/subst.md (round_scalar_nimm_predicate): New.
21237 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
21239         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
21240         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
21241         (_mm_maskz_sqrt_round_ss): New intrinsics.
21242         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
21243         (__builtin_ia32_sqrtsd_mask_round)
21244         (__builtin_ia32_sqrtss_mask_round): New builtins.
21245         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
21246         (__builtin_ia32_sqrtss_round): Remove.
21247         (__builtin_ia32_sqrtsd_mask_round)
21248         (__builtin_ia32_sqrtss_mask_round): New builtins.
21249         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
21250         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
21251         ((match_operand:VF_128 1 "vector_operand"
21252         "xBm,<round_constraint>")): Changed to ...
21253         ((match_operand:VF_128 1 "vector_operand"
21254         "xBm,<round_scalar_constraint>")): ... this.
21255         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
21256         %0, %2, %<iptr>1<round_op3>}): Changed to ...
21257         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
21258         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
21259         %<iptr>1<round_scalar_mask_op3>}): ... this.
21260         ((set_attr "prefix" "<round_prefix>")): Changed to ...
21261         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
21263 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
21265         PR target/84266
21266         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
21267         Cast vec_cmpeq result to correct type.
21268         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
21269         Cast vec_cmpgt result to correct type.
21271 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
21273         * final.c (final_scan_insn_1): Renamed from...
21274         (final_scan_insn): ... this.  New wrapper, to recover
21275         seen from the outermost call in recursive ones.
21276         * config/sparc/sparc.c (output_return): Drop seen from call.
21277         (output_sibcall): Likewise.
21278         * config/visium/visium.c (output_branch): Likewise.
21280 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
21282         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
21283         function label.
21285 2018-02-10  Alan Modra  <amodra@gmail.com>
21287         PR target/84300
21288         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
21289         Specify LR as an input.
21291 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
21293         PR sanitizer/83987
21294         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
21295         remove_member_access_dummy_vars): New functions.
21296         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
21297         lower_omp_1, execute_lower_omp): Use them.
21299         PR rtl-optimization/84308
21300         * shrink-wrap.c (spread_components): Release todo vector.
21302 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
21304         PR rtl-optimization/57193
21305         * ira-color.c (struct allocno_color_data): Add member
21306         conflict_allocno_hard_prefs.
21307         (update_conflict_allocno_hard_prefs): New.
21308         (bucket_allocno_compare_func): Add a preference based on
21309         conflict_allocno_hard_prefs.
21310         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
21311         (color_allocnos): Remove a dead code.  Initiate
21312         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
21314 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
21316         PR target/84226
21317         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
21318         constraint from =wa to wa.  Avoid a subreg on the output operand,
21319         instead use a pseudo and subreg it in a move.
21320         (p9_xxbrd_<mode>): Changed to ...
21321         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
21322         (p9_xxbrd_v2df): New expander.
21323         (p9_xxbrw_<mode>): Changed to ...
21324         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
21325         (p9_xxbrw_v4sf): New expander.
21327 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
21329         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
21331 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
21333         PR target/83926
21334         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
21335         multiply in 32-bit mode.
21336         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
21337         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
21338         mode.
21340 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
21342         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
21343         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
21344         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
21345         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
21347 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
21349         PR lto/84213
21350         * dwarf2out.c (is_trivial_indirect_ref): New function.
21351         (dwarf2out_late_global_decl): Do not generate a location
21352         attribute for variables that have a non-trivial DECL_VALUE_EXPR
21353         and that are not defined in the current unit.
21355 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
21357         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
21358         instead of a libcall for UNORDERED.
21360 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
21362         PR target/82641
21363         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
21364         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
21366 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21368         PR target/PR84295
21369         * config/s390/s390.c (s390_set_current_function): Invoke
21370         s390_indirect_branch_settings also if fndecl didn't change.
21372 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
21374         * config/rs6000/rs6000.md (blockage): Set length to zero.
21376 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
21378         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
21380 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
21382         PR sanitizer/84285
21383         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
21384         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
21385         -static-lib*san.
21387         PR debug/84252
21388         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
21389         PARALLEL incoming that failed vt_get_decl_and_offset check.
21391         PR middle-end/84237
21392         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
21393         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
21394         TREE_READONLY bit.
21395         (get_variable_section): For decls in named .bss* sections pass true as
21396         second argument to bss_initializer_p.
21398 2018-02-09  Marek Polacek  <polacek@redhat.com>
21399             Jakub Jelinek  <jakub@redhat.com>
21401         PR c++/83659
21402         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
21403         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
21404         Sync some changes from cxx_fold_indirect_ref.
21406 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
21408         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
21409         markers.
21410         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
21411         (BLOCK_INLINE_ENTRY_LABEL): New.
21412         (dwarf2out_var_location): Disregard inline entry markers.
21413         (inline_entry_data): New struct.
21414         (inline_entry_data_hasher): New hashtable type.
21415         (inline_entry_data_hasher::hash): New.
21416         (inline_entry_data_hasher::equal): New.
21417         (inline_entry_data_table): New variable.
21418         (add_high_low_attributes): Add DW_AT_entry_pc and
21419         DW_AT_GNU_entry_view attributes if a pending entry is found
21420         in inline_entry_data_table.  Add old entry_pc attribute only
21421         if debug nonbinding markers are disabled.
21422         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
21423         markers are enabled.
21424         (block_within_block_p, dwarf2out_inline_entry): New.
21425         (dwarf2out_finish): Check that no entries remained in
21426         inline_entry_data_table.
21427         * final.c (reemit_insn_block_notes): Handle inline entry notes.
21428         (final_scan_insn, notice_source_line): Likewise.
21429         (rest_of_clean_state): Skip inline entry markers.
21430         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
21431         markers.
21432         * gimple.c (gimple_build_debug_inline_entry): New.
21433         * gimple.h (enum gimple_debug_subcode): Add
21434         GIMPLE_DEBUG_INLINE_ENTRY.
21435         (gimple_build_debug_inline_entry): Declare.
21436         (gimple_debug_inline_entry_p): New.
21437         (gimple_debug_nonbind_marker_p): Adjust.
21438         * insn-notes.def (INLINE_ENTRY): New.
21439         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
21440         inline entry marker notes.
21441         (print_insn): Likewise.
21442         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
21443         (INSN_DEBUG_MARKER_KIND): Likewise.
21444         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
21445         * tree-inline.c (expand_call_inline): Build and insert
21446         debug_inline_entry stmt.
21447         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
21448         inline entry blocks early, if nonbind markers are enabled.
21449         (dump_scope_block): Dump fragment info.
21450         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
21451         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
21452         (gimple_build_debug_inline_entry): New.
21453         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
21454         Enable/disable inline entry points too.
21455         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
21456         (DEBUG_INSN): Describe inline entry markers.
21458         * common.opt (gvariable-location-views): New.
21459         (gvariable-location-views=incompat5): New.
21460         * config.in: Rebuilt.
21461         * configure: Rebuilt.
21462         * configure.ac: Test assembler for view support.
21463         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
21464         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
21465         * dwarf2out.c (var_loc_view): New typedef.
21466         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
21467         (dwarf2out_locviews_in_attribute): New.
21468         (dwarf2out_locviews_in_loclist): New.
21469         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
21470         (enum dw_line_info_opcode): Add LI_adv_address.
21471         (struct dw_line_info_table): Add view.
21472         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
21473         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
21474         (zero_view_p): New variable.
21475         (ZERO_VIEW_P): New macro.
21476         (output_asm_line_debug_info): New.
21477         (struct var_loc_node): Add view.
21478         (add_AT_view_list, AT_loc_list): New.
21479         (add_var_loc_to_decl): Add view param.  Test it against last.
21480         (new_loc_list): Add view params.  Record them.
21481         (AT_loc_list_ptr): Handle loc and view lists.
21482         (view_list_to_loc_list_val_node): New.
21483         (print_dw_val): Handle dw_val_class_view_list.
21484         (size_of_die): Likewise.
21485         (value_format): Likewise.
21486         (loc_list_has_views): New.
21487         (gen_llsym): Set vl_symbol too.
21488         (maybe_gen_llsym, skip_loc_list_entry): New.
21489         (dwarf2out_maybe_output_loclist_view_pair): New.
21490         (output_loc_list): Output view list or entries too.
21491         (output_view_list_offset): New.
21492         (output_die): Handle dw_val_class_view_list.
21493         (output_dwarf_version): New.
21494         (output_compilation_unit_header): Use it.
21495         (output_skeleton_debug_sections): Likewise.
21496         (output_rnglists, output_line_info): Likewise.
21497         (output_pubnames, output_aranges): Update version comments.
21498         (output_one_line_info_table): Output view numbers in asm comments.
21499         (dw_loc_list): Determine current endview, pass it to new_loc_list.
21500         Call maybe_gen_llsym.
21501         (loc_list_from_tree_1): Adjust.
21502         (add_AT_location_description): Create view list attribute if
21503         needed, check it's absent otherwise.
21504         (convert_cfa_to_fb_loc_list): Adjust.
21505         (maybe_emit_file): Call output_asm_line_debug_info for test.
21506         (dwarf2out_var_location): Reset views as needed.  Precompute
21507         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
21508         attribute.  Set view.
21509         (new_line_info_table): Reset next view.
21510         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
21511         (dwarf2out_source_line): Likewise.  Output view resets and labels to
21512         the assembler, or select appropriate line info opcodes.
21513         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
21514         (optimize_string_length): Catch it.  Adjust.
21515         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
21516         dw_val_class_view_list, and remove it if no longer needed.
21517         (hash_loc_list): Hash view numbers.
21518         (loc_list_hasher::equal): Compare them.
21519         (optimize_location_lists): Check whether a view list symbol is
21520         needed, and whether the locview attribute is present, and
21521         whether they match.  Remove the locview attribute if no longer
21522         needed.
21523         (index_location_lists): Call skip_loc_list_entry for test.
21524         (dwarf2out_finish): Call output_asm_line_debug_info for test.
21525         Use output_dwarf_version.
21526         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
21527         (struct dw_val_node): Add val_view_list.
21528         * final.c (SEEN_NEXT_VIEW): New.
21529         (set_next_view_needed): New.
21530         (clear_next_view_needed): New.
21531         (maybe_output_next_view): New.
21532         (final_start_function): Rename to...
21533         (final_start_function_1): ... this.  Take pointer to FIRST,
21534         add SEEN parameter.  Emit param bindings in the initial view.
21535         (final_start_function): Reintroduce SEEN-less interface.
21536         (final): Rename to...
21537         (final_1): ... this.  Take SEEN parameter.  Output final pending
21538         next view at the end.
21539         (final): Reintroduce seen-less interface.
21540         (final_scan_insn): Output pending next view before switching
21541         sections or ending a block.  Mark the next view as needed when
21542         outputting variable locations.  Notify debug backend of section
21543         changes, and of location view changes.
21544         (rest_of_handle_final): Adjust.
21545         * toplev.c (process_options): Autodetect value for debug variable
21546         location views option.  Warn on incompat5 without -gdwarf-5.
21547         * doc/invoke.texi (gvariable-location-views): New.
21548         (gvariable-location-views=incompat5): New.
21549         (gno-variable-location-views): New.
21551 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
21553         PR tree-optimization/84136
21554         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
21555         that the result of find_edge is non-NULL.
21557 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
21559         PR target/83008
21560         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
21561         storing integer register in SImode.  Fix cost of 256 and 512
21562         byte aligned SSE register store.
21564 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
21566         * config/i386/i386.c (ix86_multiplication_cost): Fix
21567         multiplication cost for TARGET_AVX512DQ.
21569 2018-02-08  Marek Polacek  <polacek@redhat.com>
21571         PR tree-optimization/84238
21572         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
21573         get_range_strlen.
21575 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
21577         PR tree-optimization/84265
21578         * tree-vect-stmts.c (vectorizable_store): Don't treat
21579         VMAT_CONTIGUOUS accesses as grouped.
21580         (vectorizable_load): Likewise.
21582 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
21584         PR tree-optimization/81635
21585         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
21586         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
21587         (test_round_for_mask): New functions.
21588         (wide_int_cc_tests): Call test_round_for_mask.
21589         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
21590         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
21591         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
21592         range returned by get_range_info.
21594 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
21596         PR ipa/81360
21597         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
21598         * symtab.c: Include builtins.h
21599         (symtab_node::output_to_lto_symbol_table_p): Move here
21600         from lto-streamer-out.c:output_symbol_p.
21601         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
21602         (output_symbol_p): Move all logic to symtab.c
21603         (produce_symtab): Update.
21605 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21607         * config/s390/s390-opts.h (enum indirect_branch): Define.
21608         * config/s390/s390-protos.h (s390_return_addr_from_memory)
21609         (s390_indirect_branch_via_thunk)
21610         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
21611         (enum s390_indirect_branch_type): Define.
21612         * config/s390/s390.c (struct s390_frame_layout, struct
21613         machine_function): Remove.
21614         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
21615         (indirect_branch_table_label_no, indirect_branch_table_name):
21616         Define variables.
21617         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
21618         (enum s390_indirect_branch_option): Define.
21619         (s390_return_addr_from_memory): New function.
21620         (s390_handle_string_attribute): New function.
21621         (s390_attribute_table): Add new attribute handler.
21622         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
21623         (s390_indirect_branch_via_thunk): New function.
21624         (s390_indirect_branch_via_inline_thunk): New function.
21625         (s390_function_ok_for_sibcall): When jumping via thunk disallow
21626         sibling call optimization for non z10 compiles.
21627         (s390_emit_call): Force indirect branch target to be a single
21628         register.  Add r1 clobber for non-z10 compiles.
21629         (s390_emit_epilogue): Emit return jump via return_use expander.
21630         (s390_reorg): Handle JUMP_INSNs as execute targets.
21631         (s390_option_override_internal): Perform validity checks for the
21632         new command line options.
21633         (s390_indirect_branch_attrvalue): New function.
21634         (s390_indirect_branch_settings): New function.
21635         (s390_set_current_function): Invoke s390_indirect_branch_settings.
21636         (s390_output_indirect_thunk_function):  New function.
21637         (s390_code_end): Implement target hook.
21638         (s390_case_values_threshold): Implement target hook.
21639         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
21640         macros.
21641         * config/s390/s390.h (struct s390_frame_layout)
21642         (struct machine_function): Move here from s390.c.
21643         (TARGET_INDIRECT_BRANCH_NOBP_RET)
21644         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
21645         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
21646         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
21647         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
21648         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
21649         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
21650         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
21651         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
21652         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
21653         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
21654         (mnemonic attribute): Add values which aren't recognized
21655         automatically.
21656         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
21657         pattern for branch conversion.  Fix mnemonic attribute.
21658         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
21659         indirect branch via thunk if requested.
21660         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
21661         ("*indirect_jump"): Disable for branch conversion using out of
21662         line thunks.
21663         ("indirect_jump_via_thunk<mode>_z10")
21664         ("indirect_jump_via_thunk<mode>")
21665         ("indirect_jump_via_inlinethunk<mode>_z10")
21666         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
21667         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
21668         ("casesi_jump_via_inlinethunk<mode>_z10")
21669         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
21670         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
21671         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
21672         ("*indirect2_jump"): Disable for branch conversion.
21673         ("casesi_jump"): Turn into expander and expand patterns for branch
21674         conversion.
21675         ("return_use"): New expander.
21676         ("*return"): Emit return via thunk and rename it to ...
21677         ("*return<mode>"): ... this one.
21678         * config/s390/s390.opt: Add new options and and enum for the
21679         option values.
21681 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
21683         * lra-constraints.c (match_reload): Unconditionally use
21684         gen_lowpart_SUBREG, rather than selecting between that
21685         and equivalent gen_rtx_SUBREG code.
21687 2018-02-08  Richard Biener  <rguenther@suse.de>
21689         PR tree-optimization/84233
21690         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
21691         changed flag instead of boguously re-using phi_inserted.
21693 2018-02-08  Martin Jambor  <mjambor@suse.cz>
21695         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
21696         static local variables.
21698 2018-02-08  Richard Biener  <rguenther@suse.de>
21700         PR tree-optimization/84278
21701         * tree-vect-stmts.c (vectorizable_store): When looking for
21702         smaller vector types to perform grouped strided loads/stores
21703         make sure the mode is supported by the target.
21704         (vectorizable_load): Likewise.
21706 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
21708         * config/aarch64/aarch64.c (aarch64_components_for_bb):
21709         Increase LDP/STP opportunities by adding adjacent callee-saves.
21711 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
21713         PR rtl-optimization/84068
21714         PR rtl-optimization/83459
21715         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
21717 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
21719         PR tree-optimization/84224
21720         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
21721         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
21722         non-zero arguments.
21724 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
21726         PR target/84113
21727         * config/rs6000/altivec.md (*restore_world): Remove LR use.
21728         * config/rs6000/predicates.md (restore_world_operation): Adjust op
21729         count, remove one USE.
21731 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
21733         * doc/install.texi (Configuration): Document the
21734         --with-long-double-format={ibm,ieee} PowerPC configuration
21735         options.
21737         PR target/84154
21738         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
21739         Convert from define_expand to be define_insn_and_split.  Rework
21740         float/double/_Float128 conversions to QI/HI/SImode to work with
21741         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
21742         conversions to QI/HImode types did a store and then a load to
21743         truncate the value.  For conversions to VSX registers, don't split
21744         the insn, instead emit the code directly.  Use the code iterator
21745         any_fix to combine signed and unsigned conversions.
21746         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
21747         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
21748         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21749         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
21750         (fix_<mode>di2_hw): Likewise.
21751         (fixuns_<mode>di2_hw): Likewise.
21752         (fix_<mode>si2_hw): Likewise.
21753         (fixuns_<mode>si2_hw): Likewise.
21754         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
21755         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21756         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
21757         fix<uns>_trunc<SFDF:mode>si2_p8.
21758         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
21759         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
21760         (fix<uns>_<mode>_mem): Likewise.
21761         (fctiw<u>z_<mode>_mem): Likewise.
21762         (fix<uns>_<mode>_mem): Likewise.
21763         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
21764         the register allocator from doing a direct move to the GPRs to do
21765         a store, and instead use the ISA 3.0 store byte/half-word from
21766         vector register instruction.  For IEEE 128-bit floating point,
21767         also optimize stores of 32-bit ints.
21768         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
21770 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
21772         * genextract.c (push_pathstr_operand): New function to support
21773         [a-zA-Z].
21774         (walk_rtx): Call push_pathstr_operand.
21775         (print_path): Support [a-zA-Z].
21777 2018-02-07  Richard Biener  <rguenther@suse.de>
21779         PR tree-optimization/84037
21780         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
21781         (cse_and_gimplify_to_preheader): Declare.
21782         (vect_get_place_in_interleaving_chain): Likewise.
21783         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21784         ivexpr_map.
21785         (_loop_vec_info::~_loop_vec_info): Delete it.
21786         (cse_and_gimplify_to_preheader): New function.
21787         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
21788         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
21789         (vectorizable_load): Likewise.  For grouped stores always base
21790         the IV on the first element.
21791         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
21792         condition before gimplifying.
21794 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
21796         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
21797         *DIV_EXPR and *MOD_EXPR.
21799 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
21801         PR target/84248
21802         * config/i386/i386.c (ix86_option_override_internal): Mask out
21803         the CF_SET bit when checking -fcf-protection.
21805 2018-02-07  Tom de Vries  <tom@codesourcery.com>
21807         PR libgomp/84217
21808         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
21809         enough.
21811 2018-02-07  Richard Biener  <rguenther@suse.de>
21813         PR tree-optimization/84204
21814         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
21815         this place.
21817         PR tree-optimization/84205
21818         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
21819         special-case isl_ast_op_zdiv_r.
21821         PR tree-optimization/84223
21822         * graphite-scop-detection.c (gather_bbs::before_dom_children):
21823         Only add conditions from within the region.
21824         (gather_bbs::after_dom_children): Adjust.
21826 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
21828         PR target/84209
21829         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
21830         * config/avr/avr.md: Only post-reload split REG-REG moves if
21831         either register is GENERAL_REG_P.
21833 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
21835         PR tree-optimization/84235
21836         * tree-ssa-scopedtables.c
21837         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
21838         if the subtraction is performed in floating point type where NaNs are
21839         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
21840         build 1.  Formatting fix.
21842 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
21844         PR target/84146
21845         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
21846         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
21847         and skip it regardless of bb boundaries.  Use CALL_P macro,
21848         don't test INSN_P (insn) together with CALL_P or JUMP_P check
21849         unnecessarily, formatting fix.
21851 2018-02-06  Michael Collison  <michael.collison@arm.com>
21853         * config/arm/thumb2.md:
21854         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
21855         (*thumb_mov_notscc): Ditto.
21857 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
21859         PR target/84154
21860         * config/rs6000/rs6000.md (su code attribute): Use "u" for
21861         unsigned_fix, not "s".
21863 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21865         * configure.ac (gcc_fn_eh_frame_ro): New function.
21866         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
21867         correct .eh_frame permissions.
21868         * configure: Regenerate.
21870 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
21872         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
21873         irrelevant options.
21875 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21877         * config/rs6000/rs6000.c (rs6000_option_override_internal):
21878         Display warning message for -mno-speculate-indirect-jumps.
21880 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
21882         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
21883         Undocumented.
21884         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
21886 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
21888         PR tree-optimization/84225
21889         * tree-eh.c (find_trapping_overflow): Only call
21890         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
21892 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
21894         PR target/84145
21895         * config/i386/i386.c: Reimplement the check of possible options
21896         -mibt/-mshstk conbination. Change error messages.
21897         * doc/invoke.texi: Fix a typo: remove extra '='.
21899 2018-02-06  Marek Polacek  <polacek@redhat.com>
21901         PR tree-optimization/84228
21902         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
21904 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
21906         PR target/82641
21907         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
21908         emitted arch directives.
21909         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
21910         __ARM_FEATURE_COPROC before changing architectures.
21912 2018-02-06  Richard Biener  <rguenther@suse.de>
21914         * config/i386/i386.c (print_reg): Fix typo.
21915         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
21917 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
21919         * configure: Regenerate.
21921 2018-02-05  Martin Sebor  <msebor@redhat.com>
21923         PR tree-optimization/83369
21924         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
21925         inlining context.
21927 2018-02-05  Martin Liska  <mliska@suse.cz>
21929         * doc/invoke.texi: Cherry-pick upstream r323995.
21931 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
21933         * ira.c (ira_init_register_move_cost): Adjust comment.
21935 2018-02-05  Martin Liska  <mliska@suse.cz>
21937         PR gcov-profile/84137
21938         * doc/gcov.texi: Fix typo in documentation.
21940 2018-02-05  Martin Liska  <mliska@suse.cz>
21942         PR gcov-profile/83879
21943         * doc/gcov.texi: Document necessity of --dynamic-list-data when
21944         using dlopen functionality.
21946 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
21948         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
21949         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
21950         _mm_maskz_range_ss, _mm_mask_range_round_ss,
21951         _mm_maskz_range_round_ss): New intrinsics.
21952         (__builtin_ia32_rangesd128_round)
21953         (__builtin_ia32_rangess128_round): Remove.
21954         (__builtin_ia32_rangesd128_mask_round,
21955         __builtin_ia32_rangess128_mask_round): New builtins.
21956         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
21957         __builtin_ia32_rangess128_round): Remove.
21958         (__builtin_ia32_rangesd128_mask_round,
21959         __builtin_ia32_rangess128_mask_round): New builtins.
21960         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
21961         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
21962         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
21963         "<round_saeonly_constraint>")): Changed to ...
21964         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
21965         "<round_saeonly_scalar_constraint>")): ... this.
21966         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
21967         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
21968         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
21969         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
21970         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
21972 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
21974         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
21975         options.
21976         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
21977         Remove all values except native, 8540 and 8548.
21979 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
21981         * config/i386/i386.c (ix86_output_function_return): Pass
21982         INVALID_REGNUM, instead of -1, as invalid register number to
21983         indirect_thunk_name and output_indirect_thunk.
21985 2018-02-02  Julia Koval  <julia.koval@intel.com>
21987         * config.gcc: Add -march=icelake.
21988         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
21989         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
21990         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
21991         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
21992         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
21993         (processor_target_table): Add icelake.
21994         (ix86_option_override_internal): Handle new PTAs.
21995         (get_builtin_code_for_version): Handle icelake.
21996         (M_INTEL_COREI7_ICELAKE): New.
21997         (fold_builtin_cpu): Handle icelake.
21998         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
21999         * doc/invoke.texi: Add -march=icelake.
22001 2018-02-02  Julia Koval  <julia.koval@intel.com>
22003         * config/i386/i386.c (ix86_option_override_internal): Change flags type
22004         to wide_int_bitmask.
22005         * wide-int-bitmask.h: New.
22007 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
22009         PR target/84066
22010         * config/i386/i386.md: Replace Pmode with word_mode in
22011         builtin_setjmp_setup and builtin_longjmp to support x32.
22013 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
22015         PR target/56010
22016         PR target/83743
22017         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
22018         #include "opts.h".
22019         (rs6000_supported_cpu_names): New static variable.
22020         (linux_cpu_translation_table): Likewise.
22021         (elf_platform) <cpu>: Define new static variable and use it.
22022         Translate kernel AT_PLATFORM name to canonical name if needed.
22023         Error if platform name is unknown.
22025 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
22027         PR target/84089
22028         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
22030 2018-02-01  Jeff Law  <law@redhat.com>
22032         PR target/84128
22033         * config/i386/i386.c (release_scratch_register_on_entry): Add new
22034         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
22035         the scratch if RELEASE_VIA_POP is false.
22036         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
22037         If we have to save a temporary register, decrement SIZE appropriately.
22038         Pass new arguments to release_scratch_register_on_entry.
22039         (ix86_adjust_stack_and_probe): Likewise.
22040         (ix86_emit_probe_stack_range): Pass new arguments to
22041         release_scratch_register_on_entry.
22043 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
22045         PR rtl-optimization/84157
22046         * combine.c (change_zero_ext): Use REG_P predicate in
22047         front of HARD_REGISTER_P predicate.
22049 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
22051         * config/avr/avr.c (avr_option_override): Move disabling of
22052         -fdelete-null-pointer-checks to...
22053         * common/config/avr/avr-common.c (avr_option_optimization_table):
22054         ...here.
22056 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22058         PR tree-optimization/81635
22059         * tree-data-ref.c (split_constant_offset_1): For types that
22060         wrap on overflow, try to use range info to prove that wrapping
22061         cannot occur.
22063 2018-02-01  Renlin Li  <renlin.li@arm.com>
22065         PR target/83370
22066         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
22067         TAILCALL_ADDR_REGS.
22068         (aarch64_register_move_cost): Likewise.
22069         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
22070         TAILCALL_ADDR_REGS.
22071         (REG_CLASS_NAMES): Likewise.
22072         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
22073         TAILCALL_ADDR_REGS. Remove IP registers.
22074         * config/aarch64/aarch64.md (Ucs): Update register constraint.
22076 2018-02-01  Richard Biener  <rguenther@suse.de>
22078         * domwalk.h (dom_walker::dom_walker): Add additional constructor
22079         for specifying RPO order and allow NULL for that.
22080         * domwalk.c (dom_walker::dom_walker): Likewise.
22081         (dom_walker::walk): Handle NULL RPO order.
22082         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
22083         in RPO order.
22084         (rewrite_update_dom_walker): Likewise.
22085         (mark_def_dom_walker): Likewise.
22087 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22089         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
22090         (aarch64_maybe_expand_sve_subreg_move): Declare.
22091         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
22092         * config/aarch64/predicates.md (aarch64_any_register_operand): New
22093         predicate.
22094         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
22095         that are semantically a reverse operation.
22096         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
22097         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
22098         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
22099         functions.
22100         (aarch64_can_change_mode_class): For big-endian, forbid changes
22101         between two SVE modes if they have different element sizes.
22103 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22105         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
22106         the TImode handling for big-endian targets.
22108 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22110         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
22111         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
22112         not just bytes.
22113         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
22114         Remove BSWAP handing for big-endian targets and use the form of
22115         LD1RQ appropariate for the mode.
22117 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22119         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
22120         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
22121         duplicated element.
22123 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22125         PR tearget/83845
22126         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
22127         check for operands that need to go through aarch64_sve_reload_be.
22129 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
22131         PR tree-optimization/81661
22132         PR tree-optimization/84117
22133         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
22134         * tree-eh.c: Include gimplify.h.
22135         (find_trapping_overflow, replace_trapping_overflow,
22136         rewrite_to_non_trapping_overflow): New functions.
22137         * tree-vect-loop.c: Include tree-eh.h.
22138         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
22139         * tree-data-ref.c: Include tree-eh.h.
22140         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
22142 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
22144         PR rtl-optimization/84123
22145         * combine.c (change_zero_ext): Check if hard register satisfies
22146         can_change_dest_mode before calling gen_lowpart_SUBREG.
22148 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
22150         PR target/82444
22151         * ira.c (ira_init_register_move_cost): Remove assert.
22153 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
22155         PR rtl-optimization/84071
22156         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
22157         * doc/tm.texi: Regenerate.
22159 2018-01-31  Richard Biener  <rguenther@suse.de>
22161         PR tree-optimization/84132
22162         * tree-data-ref.c (analyze_miv_subscript): Properly
22163         check whether evolution_function_is_affine_multivariate_p
22164         before calling gcd_of_steps_may_divide_p.
22166 2018-01-31  Julia Koval  <julia.koval@intel.com>
22168         PR target/83618
22169         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
22170         * config/i386/i386.md (rdpid_rex64) New.
22171         (rdpid): Make 32bit only.
22173 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
22175         PR lto/84105
22176         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
22177         an IDENTIFIER_NODE for FUNCTION_TYPE's.
22179 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
22181         Revert
22182         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22184         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22186 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
22188         PR rtl-optimization/84071
22189         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
22190         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
22192 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
22194         * config/arc/arc.c (arc_handle_aux_attribute): New function.
22195         (arc_attribute_table): Add 'aux' attribute.
22196         (arc_in_small_data_p): Consider aux like variables.
22197         (arc_is_aux_reg_p): New function.
22198         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
22199         (arc_get_aux_arg): New function.
22200         (prepare_move_operands): Handle aux-register access.
22201         (arc_handle_aux_attribute): New function.
22202         * doc/extend.texi (ARC Variable attributes): Add subsection.
22204 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
22206         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
22207         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
22208         (arc_attribute_table): Add 'uncached' attribute.
22209         (arc_print_operand): Print '.di' flag for uncached memory
22210         accesses.
22211         (arc_in_small_data_p): Do not consider for small data the uncached
22212         types.
22213         (arc_is_uncached_mem_p): New function.
22214         * config/arc/predicates.md (compact_store_memory_operand): Check
22215         for uncached memory accesses.
22216         (nonvol_nonimm_operand): Likewise.
22217         * doc/extend.texi (ARC Type Attribute): New subsection.
22219 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
22221         PR c/84100
22222         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
22223         falign-loops=): Add Optimization flag.
22225 2018-01-30  Jeff Law  <law@redhat.com>
22227         PR target/84064
22228         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
22229         INT_REGISTERS_SAVED.  Check it prior to calling
22230         get_scratch_register_on_entry.
22231         (ix86_adjust_stack_and_probe): Similarly.
22232         (ix86_emit_probe_stack_range): Similarly.
22233         (ix86_expand_prologue): Corresponding changes.
22235 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22237         PR target/40411
22238         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
22239         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
22241 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
22243         PR target/84112
22244         * lra-constraints.c (curr_insn_transform): Process AND in the
22245         address.
22247 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
22249         PR rtl-optimization/83986
22250         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
22251         dependence against last_pending_memory_flush in addition to
22252         pending_jump_insns.
22254 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
22256         PR tree-optimization/81611
22257         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
22258         copies.
22260 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22262         PR target/83758
22263         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
22264         a reg rtx.
22266 2018-01-30  Richard Biener  <rguenther@suse.de>
22267             Jakub Jelinek  <jakub@redhat.com>
22269         PR tree-optimization/84111
22270         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
22271         inner loops added during recursion, as they don't have up-to-date
22272         SSA form.
22274 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
22276         PR ipa/81360
22277         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
22278         (can_inline_edge_by_limits_p): ... here.
22279         (can_early_inline_edge_p, check_callers,
22280         update_caller_keys, update_callee_keys, recursive_inlining,
22281         add_new_edges_to_heap, speculation_useful_p,
22282         inline_small_functions,
22283         inline_small_functions, flatten_function,
22284         inline_to_all_callers_1): Update.
22286 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
22288         * profile-count.c (profile_count::combine_with_ipa_count): Handle
22289         zeros correctly.
22291 2018-01-30  Richard Biener  <rguenther@suse.de>
22293         PR tree-optimization/83008
22294         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
22295         invariant and constant vector uses in stmts when they need
22296         more than one stmt.
22298 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22300         PR bootstrap/84017
22301         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
22302         * configure: Regenerate.
22304 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
22306         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
22307         pattern.
22308         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
22309         Use gen_rtx_REG rather than gen_lowpart.
22311 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
22313         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
22314         rather than 0 when creating partial subregs.
22316 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
22318         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
22319         of usage.
22321 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
22323         PR target/81550
22324         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
22325         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
22326         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
22327         flags.  This restores the settings used before the 2017-07-24.
22328         Turning off pre increment/decrement/modify allows IVOPTS to
22329         optimize DF/SF loops where the index is an int.
22331 2018-01-29  Richard Biener  <rguenther@suse.de>
22332             Kelvin Nilsen  <kelvin@gcc.gnu.org>
22334         PR bootstrap/80867
22335         * tree-vect-stmts.c (vectorizable_call): Don't call
22336         targetm.vectorize_builtin_md_vectorized_function if callee is
22337         NULL.
22339 2018-01-22  Carl Love  <cel@us.ibm.com>
22341         * doc/extend.tex: Fix typo in second arg in
22342         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
22344 2018-01-29  Richard Biener  <rguenther@suse.de>
22346         PR tree-optimization/84086
22347         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
22348         (flush_ssaname_freelist): When SSA names were released reset
22349         the SCEV hash table.
22351 2018-01-29  Richard Biener  <rguenther@suse.de>
22353         PR tree-optimization/84057
22354         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
22355         removed paths when removing edges.
22357 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
22359         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
22360         -mfunction-return=@var{choice}.
22362 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
22364         PR diagnostic/84034
22365         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
22366         Handle CR like TAB.
22367         (layout::print_source_line): Likewise.
22368         (test_get_line_width_without_trailing_whitespace): Add test cases.
22370 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
22372         PR middle-end/84040
22373         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
22374         debug insns.
22376 2018-01-26  Jim Wilson  <jimw@sifive.com>
22378         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
22380         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
22381         specified.
22383 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22385         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
22386         and CMP + SUB-immediate -> SUBS.
22388 2018-01-26  Martin Sebor  <msebor@redhat.com>
22390         PR tree-optimization/83896
22391         * tree-ssa-strlen.c (get_string_len): Rename...
22392         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
22393         Avoid assuming length is constant.
22394         (handle_char_store): Use HOST_WIDE_INT for string length.
22396 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
22398         PR target/81763
22399         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
22400         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
22402 2018-01-26  Richard Biener  <rguenther@suse.de>
22404         PR rtl-optimization/84003
22405         * dse.c (record_store): Only record redundant stores when
22406         the earlier store aliases at least all accesses the later one does.
22408 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
22410         PR rtl-optimization/83985
22411         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
22412         REG_CFA_RESTORE insns.
22413         (delete_unmarked_insns): Don't ignore separate shrink wrapping
22414         REG_CFA_RESTORE insns here.
22416         PR c/83989
22417         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
22418         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
22420 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22422         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
22423         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
22424         (arc_init): Likewise.
22425         (arc_override_options): Likewise.
22426         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
22427         value.
22428         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
22429         support.
22430         * config/arc/arc.h (TARGET_DBNZ): Define.
22431         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
22432         properly set the tune attribute.
22433         (dbnz): Use TARGET_DBNZ guard.
22434         * config/arc/arc.opt (mtune): Add core3 option.
22436 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22438         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
22439         recognize new pic like addresses.
22440         (arc_delegitimize_address): Clean up.
22442 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22444         * config/arc/arc-arches.def: Option mrf16 valid for all
22445         architectures.
22446         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
22447         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
22448         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
22449         * config/arc/arc-tables.opt: Regenerate.
22450         * config/arc/arc.c (arc_conditional_register_usage): Handle
22451         reduced register file case.
22452         (arc_file_start): Set must have build attributes.
22453         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
22454         mrf16 option value.
22455         * config/arc/arc.opt (mrf16): Add new option.
22456         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
22457         * config/arc/genmultilib.awk: Handle new mrf16 option.
22458         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
22459         * config/arc/t-multilib: Regenerate.
22460         * doc/invoke.texi (ARC Options): Document mrf16 option.
22462 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22464         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
22465         * config/arc/arc.c (arc_handle_secure_attribute): New function.
22466         (arc_attribute_table): Add 'secure_call' attribute.
22467         (arc_print_operand): Print secure call operand.
22468         (arc_function_ok_for_sibcall): Don't optimize tail calls when
22469         secure.
22470         (arc_is_secure_call_p): New function.  * config/arc/arc.md
22471         (call_i): Add support for sjli instruction.
22472         (call_value_i): Likewise.
22473         * config/arc/constraints.md (Csc): New constraint.
22475 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22476             John Eric Martin  <John.Martin@emmicro-us.com>
22478         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
22479         * config/arc/arc.c (_arc_jli_section): New struct.
22480         (arc_jli_section): New type.
22481         (rc_jli_sections): New static variable.
22482         (arc_handle_jli_attribute): New function.
22483         (arc_attribute_table): Add jli_always and jli_fixed attribute.
22484         (arc_file_end): New function.
22485         (TARGET_ASM_FILE_END): Define.
22486         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
22487         (arc_add_jli_section): New function.
22488         (jli_call_scan): Likewise.
22489         (arc_reorg): Call jli_call_scan.
22490         (arc_output_addsi): Remove 'S' from printing asm operand.
22491         (arc_is_jli_call_p): New function.
22492         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
22493         operand.
22494         (movhi_insn): Likewise.
22495         (movsi_insn): Likewise.
22496         (movsi_set_cc_insn): Likewise.
22497         (loadqi_update): Likewise.
22498         (load_zeroextendqisi_update): Likewise.
22499         (load_signextendqisi_update): Likewise.
22500         (loadhi_update): Likewise.
22501         (load_zeroextendhisi_update): Likewise.
22502         (load_signextendhisi_update): Likewise.
22503         (loadsi_update): Likewise.
22504         (loadsf_update): Likewise.
22505         (movsicc_insn): Likewise.
22506         (bset_insn): Likewise.
22507         (bxor_insn): Likewise.
22508         (bclr_insn): Likewise.
22509         (bmsk_insn): Likewise.
22510         (bicsi3_insn): Likewise.
22511         (cmpsi_cc_c_insn): Likewise.
22512         (movsi_ne): Likewise.
22513         (movsi_cond_exec): Likewise.
22514         (clrsbsi2): Likewise.
22515         (norm_f): Likewise.
22516         (normw): Likewise.
22517         (swap): Likewise.
22518         (divaw): Likewise.
22519         (flag): Likewise.
22520         (sr): Likewise.
22521         (kflag): Likewise.
22522         (ffs): Likewise.
22523         (ffs_f): Likewise.
22524         (fls): Likewise.
22525         (call_i): Remove 'S' asm letter, add jli instruction.
22526         (call_value_i): Likewise.
22527         * config/arc/arc.op (mjli-always): New option.
22528         * config/arc/constraints.md (Cji): New constraint.
22529         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
22530         operand.
22531         (subsf3_fpx): Likewise.
22532         (mulsf3_fpx): Likewise.
22533         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
22534         asm operand.
22535         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
22536         function attrbutes.
22537         * doc/invoke.texi (ARC): Document mjli-always option.
22539 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
22541         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
22542         avoid addition with 0 and use incw and decw where possible.
22544 2018-01-26  Richard Biener  <rguenther@suse.de>
22546         PR tree-optimization/81082
22547         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
22548         association if it requires casting to unsigned.
22549         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
22550         from fold_plusminus_mult_expr to catch important cases late when
22551         range info is available.
22553 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22555         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
22556         * configure.ac (hidden_linkonce): New test.
22557         * configure: Regenerate.
22558         * config.in: Regenerate.
22560 2018-01-26  Julia Koval  <julia.koval@intel.com>
22562         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
22563         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
22564         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
22565         _mm_mask_bitshuffle_epi64_mask): Fix type.
22566         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
22567         USI_FTYPE_V4DI_V4DI_USI): Remove.
22568         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
22569         __builtin_ia32_vpshufbitqmb256_mask,
22570         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
22571         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
22572         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
22574 2018-01-26  Alan Modra  <amodra@gmail.com>
22576         PR target/84033
22577         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
22578         UNSPEC_VBPERMQ.  Sort other unspecs.
22580 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
22582         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
22584 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
22586         PR middle-end/83055
22587         * predict.c (drop_profile): Do not push/pop cfun; update also
22588         node->count.
22589         (handle_missing_profiles): Fix logic looking for zero profiles.
22591 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
22593         PR middle-end/83977
22594         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
22595         on functions with #pragma omp declare simd or functions with simd
22596         attribute.
22597         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
22598         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
22599         Remove trailing \n from warning_at calls.
22601 2018-01-25  Tom de Vries  <tom@codesourcery.com>
22603         PR target/84028
22604         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22605         for neutered workers.
22607 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
22609         PR target/68467
22610         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
22611         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
22613 2018-01-24  Jeff Law  <law@redhat.com>
22615         PR target/83994
22616         * i386.c (get_probe_interval): Move to earlier point.
22617         (ix86_compute_frame_layout): If -fstack-clash-protection and
22618         the frame is larger than the probe interval, then use pushes
22619         to save registers rather than reg->mem moves.
22620         (ix86_expand_prologue): Remove conditional for int_registers_saved
22621         assertion.
22623 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
22625         PR target/84014
22626         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
22627         min/max for never referenced object.
22629 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
22631         PR middle-end/83977
22632         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
22633         here.
22634         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
22635         attributes from DECL_ATTRIBUTES (decl) without affecting
22636         DECL_ATTRIBUTES (current_function_decl).
22637         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
22638         functions with non-NULL DECL_ABSTRACT_ORIGIN.
22640 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
22642         PR tree-optimization/83979
22643         * fold-const.c (fold_comparison): Use constant_boolean_node
22644         instead of boolean_{true,false}_node.
22646 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
22648         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
22649         with zero counts.
22651 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22653         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22654         Simplify the clause that sets the length attribute.
22655         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22656         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
22657         clause that sets the length attribute.
22658         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22660 2018-01-24  Tom de Vries  <tom@codesourcery.com>
22662         PR target/83589
22663         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
22664         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
22665         Add strict parameter.
22666         (prevent_branch_around_nothing): Insert dummy insn between branch to
22667         label and label with no ptx insn inbetween.
22668         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
22670 2018-01-24  Tom de Vries  <tom@codesourcery.com>
22672         PR target/81352
22673         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22674         for neutered threads in warp.
22675         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
22677 2018-01-24  Richard Biener  <rguenther@suse.de>
22679         PR tree-optimization/83176
22680         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
22681         operands.
22683 2018-01-24  Richard Biener  <rguenther@suse.de>
22685         PR tree-optimization/82819
22686         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
22687         code generating pluses that are no-ops in the target precision.
22689 2018-01-24  Richard Biener  <rguenther@suse.de>
22691         PR middle-end/84000
22692         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
22694 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
22696         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
22697         to merge probabilities.
22698         * predict.c (probably_never_executed): Also mark as cold functions
22699         with global 0 profile and guessed local profile.
22700         * profile-count.c (profile_probability::combine_with_count): New
22701         member function.
22702         * profile-count.h (profile_probability::operator*,
22703         profile_probability::operator*=, profile_probability::operator/,
22704         profile_probability::operator/=): Reduce precision to adjusted
22705         and set value to guessed on contradictory divisions.
22706         (profile_probability::combine_with_freq): Remove.
22707         (profile_probability::combine_wiht_count): Declare.
22708         (profile_count::force_nonzero):: Set to adjusted.
22709         (profile_count::probability_in):: Set quality to adjusted.
22710         * tree-ssa-tail-merge.c (replace_block_by): Use
22711         combine_with_count.
22713 2018-01-23  Andrew Waterman  <andrew@sifive.com>
22714             Jim Wilson  <jimw@sifive.com>
22716         * config/riscv/riscv.c (riscv_stack_boundary): New.
22717         (riscv_option_override): Set riscv_stack_boundary.  Handle
22718         riscv_preferred_stack_boundary_arg.
22719         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
22720         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
22721         (STACK_BOUNDARY): Set to riscv_stack_boundary.
22722         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
22723         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
22724         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
22726 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
22728         PR target/83905
22729         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
22730         of struct ix86_frame.
22731         (ix86_expand_epilogue): Likewise.  Add a local variable for
22732         the reg_save_offset field in struct ix86_frame.
22734 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
22736         PR tree-optimization/82604
22737         * tree-loop-distribution.c (enum partition_kind): New enum item
22738         PKIND_PARTIAL_MEMSET.
22739         (partition_builtin_p): Support above new enum item.
22740         (generate_code_for_partition): Ditto.
22741         (compute_access_range): Differentiate cases that equality can be
22742         proven at all loops, the innermost loops or no loops.
22743         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
22744         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
22745         (finalize_partitions, distribute_loop): Don't fuse partition of
22746         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
22747         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
22748         parloop is enabled.
22750 2018-01-23  Martin Liska  <mliska@suse.cz>
22752         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
22753         order to ignore the predictor.
22754         (PRED_POLYMORPHIC_CALL): Likewise.
22755         (PRED_RECURSIVE_CALL): Likewise.
22757 2018-01-23  Martin Liska  <mliska@suse.cz>
22759         * tree-profile.c (tree_profiling): Print function header to
22760         aware reader which function we are working on.
22761         * value-prof.c (gimple_find_values_to_profile): Do not print
22762         not interesting value histograms.
22764 2018-01-23  Martin Liska  <mliska@suse.cz>
22766         * profile-count.h (enum profile_quality): Add
22767         profile_uninitialized as the first value. Do not number values
22768         as they are zero based.
22769         (profile_count::verify): Update sanity check.
22770         (profile_probability::verify): Likewise.
22772 2018-01-23  Nathan Sidwell  <nathan@acm.org>
22774         * doc/invoke.texi (ffor-scope): Deprecate.
22776 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
22778         PR tree-optimization/83510
22779         * domwalk.c (set_all_edges_as_executable): New function.
22780         (dom_walker::dom_walker): Convert bool param
22781         "skip_unreachable_blocks" to enum reachability.  Move setup of
22782         edge flags to set_all_edges_as_executable and only do it when
22783         reachability is REACHABLE_BLOCKS.
22784         * domwalk.h (enum dom_walker::reachability): New enum.
22785         (dom_walker::dom_walker): Convert bool param
22786         "skip_unreachable_blocks" to enum reachability.
22787         (set_all_edges_as_executable): New decl.
22788         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
22789         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
22790         "reachability".
22791         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
22792         but converting true to REACHABLE_BLOCKS.
22793         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
22794         * tree-vrp.c
22795         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
22796         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
22797         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
22798         REACHABLE_BLOCKS.
22799         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
22800         if check_all_array_refs will be called.
22802 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
22804         * tree.c (selftest::test_location_wrappers): Add more test
22805         coverage.
22807 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
22809         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
22810         (selftest::test_bit_in_range): Likewise.
22812 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
22814         PR testsuite/83888
22815         * doc/sourcebuild.texi (vect_float): Say that the selector
22816         only describes the situation when -funsafe-math-optimizations is on.
22817         (vect_float_strict): Document.
22819 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
22821         PR tree-optimization/83965
22822         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
22823         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
22824         instead of checking only for a reduction.
22825         (vect_recog_widen_sum_pattern): Likewise.
22827 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
22829         * predict.c (probably_never_executed): Only use precise profile info.
22830         (compute_function_frequency): Skip after inlining hack since we now
22831         have quality checking.
22833 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
22835         * profile-count.h (profile_probability::very_unlikely,
22836         profile_probability::unlikely, profile_probability::even): Set
22837         precision to guessed.
22839 2018-01-23  Richard Biener  <rguenther@suse.de>
22841         PR tree-optimization/83963
22842         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
22843         Properly terminate dominator walk when crossing the exit edge not
22844         when visiting its source block.
22846 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
22848         PR c++/83918
22849         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
22850         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
22852 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
22854         PR tree-optimization/83957
22855         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
22856         semicolon after for body surrounded by braces.
22858         PR tree-optimization/83081
22859         * profile-count.h (profile_probability::split): New method.
22860         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
22861         Use profile_probability::split.
22862         (do_compare_rtx_and_jump): Fix adjustment of probabilities
22863         when splitting a single conditional jump into 2.
22865 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
22867         PR tree-optimization/69452
22868         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
22869         decl.
22871 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22873         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
22874         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
22875         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
22877 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22879         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
22880         declaration.
22881         * config/rl78/rl78.md (movdi): New define_expand.
22882         * config/rl78/rl78.c (rl78_split_movdi): New function.
22884 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
22886         PR target/83862
22887         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
22888         no longer used.
22889         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
22890         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
22891         128-bit to produce an UNSPEC move to get the double word with the
22892         signbit and then a shift directly to do signbit.
22893         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
22894         implementation with a new version that just does either a direct
22895         move or a regular move.  Move memory interface to separate insns.
22896         Move insns so they are next to the expander.
22897         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
22898         with signbit move.  Split big and little endian case.
22899         (signbit<mode>2_dm_mem_le): Likewise.
22900         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
22901         (signbit<mode>2_dm2): Likewise.
22903 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22905         * config/rl78/rl78.md (anddi3): New define_expand.
22907 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22909         * config/rl78/rl78.md (umindi3): New define_expand.
22911 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22913         * config/rl78/rl78.md (smindi3): New define_expand.
22915 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22917         * config/rl78/rl78.md (smaxdi3): New define_expand.
22919 2018-01-22  Carl Love  <cel@us.ibm.com>
22921         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
22922         LVX_V1TI): Add macro expansion.
22923         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
22924         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
22925         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
22926         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
22927         Change check to determine if the instruction is a byte reversing
22928         entry.  Fix typo in comment.
22929         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
22930         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
22931         Add def_builtin calls for new builtins.
22932         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
22933         Add define_insn expansion.
22935 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22937         * config/rl78/rl78.md (umaxdi3): New define_expand.
22939 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22941         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
22942         for non-QImode registers.
22944 2018-01-22  Richard Biener  <rguenther@suse.de>
22946         PR tree-optimization/83963
22947         * graphite-scop-detection.c (scop_detection::get_sese): Delay
22948         including the loop exit block.
22949         (scop_detection::merge_sese): Likewise.
22950         (scop_detection::add_scop): Do it here instead.
22952 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22954         * doc/sourcebuild.texi (arm_softfloat): Document.
22956 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
22958         PR gcc/77734
22959         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
22960         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
22961         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
22963 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22964             David Edelsohn  <dje.gcc@gmail.com>
22966         PR target/83946
22967         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22968         Change "crset eq" to "crset 2".
22969         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22970         (*call_indirect_aix<mode>_nospec): Likewise.
22971         (*call_value_indirect_aix<mode>_nospec): Likewise.
22972         (*call_indirect_elfv2<mode>_nospec): Likewise.
22973         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
22974         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
22975         change assembly output from . to $.
22976         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22977         (indirect_jump<mode>_nospec): Change assembly output from . to $.
22978         (*tablejump<mode>_internal1_nospec): Likewise.
22980 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
22982         PR target/80870
22983         * config/sh/sh_optimize_sett_clrt.cc:
22984         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
22986 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
22988         PR tree-optimization/83940
22989         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
22990         offset_dt to vect_constant_def rather than vect_unknown_def_type.
22991         (vect_check_load_store_mask): Add a mask_dt_out parameter and
22992         use it to pass back the definition type.
22993         (vect_check_store_rhs): Likewise rhs_dt_out.
22994         (vect_build_gather_load_calls): Add a mask_dt argument and use
22995         it instead of a call to vect_is_simple_use.
22996         (vectorizable_store): Update calls to vect_check_load_store_mask
22997         and vect_check_store_rhs.  Use the dt returned by the latter instead
22998         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
22999         instead of calls to vect_is_simple_use.  Pass the scalar rather
23000         than the vector operand to vect_is_simple_use when handling
23001         second and subsequent copies of an rhs value.
23002         (vectorizable_load): Update calls to vect_check_load_store_mask
23003         and vect_build_gather_load_calls.  Use the cached mask_dt and
23004         gs_info.offset_dt instead of calls to vect_is_simple_use.
23006 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
23008         PR middle-end/83945
23009         * tree-emutls.c: Include gimplify.h.
23010         (lower_emutls_2): New function.
23011         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
23012         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
23013         it before further processing.
23015         PR target/83930
23016         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
23017         UINTVAL (trueop1) instead of INTVAL (op1).
23019 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
23021         PR debug/81570
23022         PR debug/83728
23023         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
23024         INCOMING_FRAME_SP_OFFSET if not defined.
23025         (scan_trace): Add ENTRY argument.  If true and
23026         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
23027         emit a note to adjust the CFA offset.
23028         (create_cfi_notes): Adjust scan_trace callers.
23029         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
23030         INCOMING_FRAME_SP_OFFSET in the CIE.
23031         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
23032         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
23033         Likewise.
23034         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
23035         * doc/tm.texi: Regenerated.
23037 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23039         PR rtl-optimization/83147
23040         * lra-constraints.c (remove_inheritance_pseudos): Use
23041         lra_substitute_pseudo_within_insn.
23043 2018-01-19  Tom de Vries  <tom@codesourcery.com>
23044             Cesar Philippidis  <cesar@codesourcery.com>
23046         PR target/83920
23047         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
23049 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
23051         PR target/83790
23052         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
23053         spaces for function labels.
23055 2018-01-19  Martin Liska  <mliska@suse.cz>
23057         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
23058         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
23059         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
23060         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
23061         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
23062         (PRED_CONST_RETURN): Change from 69 to 65.
23063         (PRED_NULL_RETURN): Change from 91 to 71.
23064         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
23065         (PRED_LOOP_GUARD): Change from 66 to 73.
23067 2018-01-19  Martin Liska  <mliska@suse.cz>
23069         * predict.c (predict_insn_def): Add new assert.
23070         (struct branch_predictor): Change type to signed integer.
23071         (test_prediction_value_range): Amend test to cover
23072         PROB_UNINITIALIZED.
23073         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
23074         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
23075         (PRED_LOOP_ITERATIONS_MAX): Likewise.
23076         (PRED_LOOP_IV_COMPARE): Likewise.
23077         * predict.h (PROB_UNINITIALIZED): Define new constant.
23079 2018-01-19  Martin Liska  <mliska@suse.cz>
23081         * predict.c (dump_prediction): Add new format for
23082         analyze_brprob.py script which is enabled with -details
23083         suboption.
23084         * profile-count.h (precise_p): New function.
23086 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
23088         PR tree-optimization/83922
23089         * tree-vect-loop.c (vect_verify_full_masking): Return false if
23090         there are no statements that need masking.
23091         (vect_active_double_reduction_p): New function.
23092         (vect_analyze_loop_operations): Use it when handling phis that
23093         are not in the loop header.
23095 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
23097         PR tree-optimization/83914
23098         * tree-vect-loop.c (vectorizable_induction): Don't convert
23099         init_expr or apply the peeling adjustment for inductions
23100         that are nested within the vectorized loop.
23102 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23104         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
23105         instead of NEG.
23107 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
23109         PR sanitizer/81715
23110         PR testsuite/83882
23111         * function.h (gimplify_parameters): Add gimple_seq * argument.
23112         * function.c: Include gimple.h and options.h.
23113         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
23114         for the added local temporaries if needed.
23115         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
23116         if there are any parameter cleanups, wrap whole body into a
23117         try/finally with the cleanups.
23119 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
23121         PR target/82964
23122         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
23123         Use GET_MODE_CLASS for scalar floating point.
23125 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
23127         PR ipa/82256
23128         patch by PaX Team
23129         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
23130         Fix call of call_cgraph_insertion_hooks.
23132 2018-01-18  Martin Sebor  <msebor@redhat.com>
23134         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
23136 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
23138         PR ipa/83619
23139         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
23140         frequencies.
23142 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
23144         PR other/70268
23145         * common.opt: (-ffile-prefix-map): New option.
23146         * opts.c (common_handle_option): Defer it.
23147         * opts-global.c (handle_common_deferred_options): Handle it.
23148         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
23149         * file-prefix-map.h: New file.
23150         (remap_debug_filename, add_debug_prefix_map): ...here.
23151         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
23152         * final.c (debug_prefix_map, add_debug_prefix_map
23153         remap_debug_filename): Move to...
23154         * file-prefix-map.c: New file.
23155         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
23156         generalize, get rid of alloca(), use strrchr() instead of strchr().
23157         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
23158         Implement in terms of add_prefix_map().
23159         (remap_macro_filename, remap_debug_filename): Implement in term of
23160         remap_filename().
23161         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
23162         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
23163         * dbxout.c: Include file-prefix-map.h.
23164         * varasm.c: Likewise.
23165         * vmsdbgout.c: Likewise.
23166         * xcoffout.c: Likewise.
23167         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
23168         * doc/cppopts.texi (-fmacro-prefix-map): Document.
23169         * doc/invoke.texi (-ffile-prefix-map): Document.
23170         (-fdebug-prefix-map): Update description.
23172 2018-01-18  Martin Liska  <mliska@suse.cz>
23174         * config/i386/i386.c (indirect_thunk_name): Document that also
23175         lfence is emitted.
23176         (output_indirect_thunk): Document why both instructions
23177         (pause and lfence) are generated.
23179 2018-01-18  Richard Biener  <rguenther@suse.de>
23181         PR tree-optimization/83887
23182         * graphite-scop-detection.c
23183         (scop_detection::get_nearest_dom_with_single_entry): Remove.
23184         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
23185         (scop_detection::merge_sese): Re-implement with a flood-fill
23186         algorithm that properly finds a SESE region if it exists.
23188 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
23190         PR c/61240
23191         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
23192         pointer_diff optimizations use view_convert instead of convert.
23194 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23196         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23197         Generate different code for -mno-speculate-indirect-jumps.
23198         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23199         (*call_indirect_aix<mode>): Disable for
23200         -mno-speculate-indirect-jumps.
23201         (*call_indirect_aix<mode>_nospec): New define_insn.
23202         (*call_value_indirect_aix<mode>): Disable for
23203         -mno-speculate-indirect-jumps.
23204         (*call_value_indirect_aix<mode>_nospec): New define_insn.
23205         (*sibcall_nonlocal_sysv<mode>): Generate different code for
23206         -mno-speculate-indirect-jumps.
23207         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23209 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
23211         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
23212         long double type, set the flags for noting the default long double
23213         type, even if we don't pass or return a long double type.
23215 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
23217         PR ipa/83051
23218         * ipa-inline.c (flatten_function): Do not overwrite final inlining
23219         failure.
23221 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
23223         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
23224         support for merge[hl].
23225         (fold_mergehl_helper): New helper function.
23226         (tree-vector-builder.h): New #include for tree_vector_builder usage.
23227         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
23228         (altivec_vmrglw_direct): Add xxmrglw insn.
23230 2018-01-17  Andrew Waterman  <andrew@sifive.com>
23232         * config/riscv/riscv.c (riscv_conditional_register_usage): If
23233         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
23235 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
23237         PR lto/83121
23238         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
23239         call the lto_location_cache before reading the
23240         DECL_SOURCE_LOCATION of the types.
23242 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
23243             Richard Sandiford  <richard.sandiford@linaro.org>
23245         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
23246         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
23247         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
23248         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
23249         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
23250         Add declaration.
23251         * config/aarch64/constraints.md (aarch64_movti_operand):
23252         Limit immediates.
23253         * config/aarch64/predicates.md (Uti): Add new constraint.
23255 2018-01-17  Carl Love  <cel@us.ibm.com>
23257         * config/rs6000/vsx.md (define_expand xl_len_r,
23258         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
23259         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
23260         lxvll.
23261         (define_expand, define_insn): Move the shift left from  the
23262         define_insn to the define_expand for lxvl and stxvl instructions.
23263         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
23264         and XL_LEN_R definitions to PURE.
23266 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
23268         * config/i386/i386.c (indirect_thunk_name): Declare regno
23269         as unsigned int.  Compare regno with INVALID_REGNUM.
23270         (output_indirect_thunk): Ditto.
23271         (output_indirect_thunk_function): Ditto.
23272         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
23273         in the call to output_indirect_thunk_function.
23275 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
23277         PR middle-end/83884
23278         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
23279         rather than the size of inner_type to determine the stack slot size
23280         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
23282 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
23284         PR target/83546
23285         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
23286         to PTA_SILVERMONT.
23288 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
23290         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
23291         endian Linux systems to optionally enable multilibs for selecting
23292         the long double type if the user configured an explicit type.
23293         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
23294         have no long double multilibs if not defined.
23295         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
23296         warn if the user used -mabi={ieee,ibm}longdouble and we built
23297         multilibs for long double.
23298         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
23299         appropriate multilib option.
23300         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
23301         multilib options.
23302         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
23303         for building long double multilibs.
23304         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
23306 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
23308         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
23309         copies.
23311         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
23312         64 bits.
23313         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
23314         128 bits.
23316         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
23317         variables.
23319         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
23320         return value.
23322 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
23324         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
23325         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
23327 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23329         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
23330         different rtl trees depending on TARGET_64BIT.
23331         (rs6000_gen_lvx): Likewise.
23333 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
23335         * config/visium/visium.md (nop): Tweak comment.
23336         (hazard_nop): Likewise.
23338 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23340         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
23341         -mspeculate-indirect-jumps.
23342         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
23343         for -mno-speculate-indirect-jumps.
23344         (*call_indirect_elfv2<mode>_nospec): New define_insn.
23345         (*call_value_indirect_elfv2<mode>): Disable for
23346         -mno-speculate-indirect-jumps.
23347         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
23348         (indirect_jump): Emit different RTL for
23349         -mno-speculate-indirect-jumps.
23350         (*indirect_jump<mode>): Disable for
23351         -mno-speculate-indirect-jumps.
23352         (*indirect_jump<mode>_nospec): New define_insn.
23353         (tablejump): Emit different RTL for
23354         -mno-speculate-indirect-jumps.
23355         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
23356         (tablejumpsi_nospec): New define_expand.
23357         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
23358         (tablejumpdi_nospec): New define_expand.
23359         (*tablejump<mode>_internal1): Disable for
23360         -mno-speculate-indirect-jumps.
23361         (*tablejump<mode>_internal1_nospec): New define_insn.
23362         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
23363         option.
23365 2018-01-16  Artyom Skrobov tyomitch@gmail.com
23367         * caller-save.c (insert_save): Drop unnecessary parameter.  All
23368         callers updated.
23370 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
23371             Richard Biener  <rguenth@suse.de>
23373         PR libgomp/83590
23374         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
23375         return early, inline manually is_gimple_sizepos.  Make sure if we
23376         call gimplify_expr we don't end up with a gimple constant.
23377         * tree.c (variably_modified_type_p): Don't return true for
23378         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
23379         * gimplify.h (is_gimple_sizepos): Remove.
23381 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23383         PR tree-optimization/83857
23384         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
23385         vectorizable_live_operation for pure SLP statements.
23386         (vectorizable_live_operation): Handle PHIs.
23388 2018-01-16  Richard Biener  <rguenther@suse.de>
23390         PR tree-optimization/83867
23391         * tree-vect-stmts.c (vect_transform_stmt): Precompute
23392         nested_in_vect_loop_p since the scalar stmt may get invalidated.
23394 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
23396         PR c/83844
23397         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
23398         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
23399         If off is not INTEGER_CST, issue a may not be aligned warning
23400         rather than isn't aligned.  Use isn%'t rather than isn't.
23401         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
23402         into MULT_EXPR.
23403         <case MULT_EXPR>: Improve the case when bottom and one of the
23404         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
23405         operand, in that case check if the other operand is multiple of
23406         bottom divided by the INTEGER_CST operand.
23408 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23410         PR target/83858
23411         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
23412         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
23413         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
23414         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
23415         * config/pa/pa.c (pa_function_arg_advance): Likewise.
23416         (pa_function_arg, pa_arg_partial_bytes): Likewise.
23417         (pa_function_arg_size): New function.
23419 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23421         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
23422         in a separate statement.
23424 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23426         PR tree-optimization/83847
23427         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
23428         group gathers and scatters.
23430 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
23432         PR rtl-optimization/86620
23433         * params.def (max-sched-ready-insns): Bump minimum value to 1.
23435         PR rtl-optimization/83213
23436         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
23437         to last if both are JUMP_INSNs.
23439         PR tree-optimization/83843
23440         * gimple-ssa-store-merging.c
23441         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
23442         store_immediate_info for bswap/nop orig_stores.
23444 2018-01-15  Andrew Waterman  <andrew@sifive.com>
23446         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
23447         !TARGET_MUL.
23448         <UDIV>: Increase cost if !TARGET_DIV.
23450 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
23452         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
23453         (define_attr "cr_logical_3op"): New.
23454         (cceq_ior_compare): Adjust.
23455         (cceq_ior_compare_complement): Adjust.
23456         (*cceq_rev_compare): Adjust.
23457         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
23458         (is_cracked_insn): Adjust.
23459         (insn_must_be_first_in_group): Adjust.
23460         * config/rs6000/40x.md: Adjust.
23461         * config/rs6000/440.md: Adjust.
23462         * config/rs6000/476.md: Adjust.
23463         * config/rs6000/601.md: Adjust.
23464         * config/rs6000/603.md: Adjust.
23465         * config/rs6000/6xx.md: Adjust.
23466         * config/rs6000/7450.md: Adjust.
23467         * config/rs6000/7xx.md: Adjust.
23468         * config/rs6000/8540.md: Adjust.
23469         * config/rs6000/cell.md: Adjust.
23470         * config/rs6000/e300c2c3.md: Adjust.
23471         * config/rs6000/e500mc.md: Adjust.
23472         * config/rs6000/e500mc64.md: Adjust.
23473         * config/rs6000/e5500.md: Adjust.
23474         * config/rs6000/e6500.md: Adjust.
23475         * config/rs6000/mpc.md: Adjust.
23476         * config/rs6000/power4.md: Adjust.
23477         * config/rs6000/power5.md: Adjust.
23478         * config/rs6000/power6.md: Adjust.
23479         * config/rs6000/power7.md: Adjust.
23480         * config/rs6000/power8.md: Adjust.
23481         * config/rs6000/power9.md: Adjust.
23482         * config/rs6000/rs64.md: Adjust.
23483         * config/rs6000/titan.md: Adjust.
23485 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23487         * config/i386/predicates.md (indirect_branch_operand): Rewrite
23488         ix86_indirect_branch_register logic.
23490 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23492         * config/i386/constraints.md (Bs): Update
23493         ix86_indirect_branch_register check.  Don't check
23494         ix86_indirect_branch_register with GOT_memory_operand.
23495         (Bw): Likewise.
23496         * config/i386/predicates.md (GOT_memory_operand): Don't check
23497         ix86_indirect_branch_register here.
23498         (GOT32_symbol_operand): Likewise.
23500 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23502         * config/i386/predicates.md (constant_call_address_operand):
23503         Rewrite ix86_indirect_branch_register logic.
23504         (sibcall_insn_operand): Likewise.
23506 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23508         * config/i386/constraints.md (Bs): Replace
23509         ix86_indirect_branch_thunk_register with
23510         ix86_indirect_branch_register.
23511         (Bw): Likewise.
23512         * config/i386/i386.md (indirect_jump): Likewise.
23513         (tablejump): Likewise.
23514         (*sibcall_memory): Likewise.
23515         (*sibcall_value_memory): Likewise.
23516         Peepholes of indirect call and jump via memory: Likewise.
23517         * config/i386/i386.opt: Likewise.
23518         * config/i386/predicates.md (indirect_branch_operand): Likewise.
23519         (GOT_memory_operand): Likewise.
23520         (call_insn_operand): Likewise.
23521         (sibcall_insn_operand): Likewise.
23522         (GOT32_symbol_operand): Likewise.
23524 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
23526         PR middle-end/83837
23527         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
23528         type rather than type addr's type points to.
23529         (expand_omp_atomic_mutex): Likewise.
23530         (expand_omp_atomic): Likewise.
23532 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23534         PR target/83839
23535         * config/i386/i386.c (output_indirect_thunk_function): Use
23536         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
23537         for  __x86_return_thunk.
23539 2018-01-15  Richard Biener  <rguenther@suse.de>
23541         PR middle-end/83850
23542         * expmed.c (extract_bit_field_1): Fix typo.
23544 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23546         PR target/83687
23547         * config/arm/iterators.md (VF): New mode iterator.
23548         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
23549         Remove integer-related logic from pattern.
23550         (neon_vabd<mode>_3): Likewise.
23552 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
23554         PR middle-end/82694
23555         * common.opt (fstrict-overflow): No longer an alias.
23556         (fwrapv-pointer): New option.
23557         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
23558         also for pointer types based on flag_wrapv_pointer.
23559         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
23560         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
23561         opts->x_flag_wrapv got set.
23562         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
23563         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
23564         POINTER_TYPE_OVERFLOW_UNDEFINED.
23565         * match.pd: Likewise in address comparison pattern.
23566         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
23568 2018-01-15  Richard Biener  <rguenther@suse.de>
23570         PR lto/83804
23571         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
23572         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
23573         Reset type names to their identifier if their TYPE_DECL doesn't
23574         have linkage (and thus is used for ODR and devirt).
23575         (save_debug_info_for_decl): Remove.
23576         (save_debug_info_for_type): Likewise.
23577         (add_tree_to_fld_list): Adjust.
23578         * tree-pretty-print.c (dump_generic_node): Make dumping of
23579         type names more robust.
23581 2018-01-15  Richard Biener  <rguenther@suse.de>
23583         * BASE-VER: Bump to 8.0.1.
23585 2018-01-14  Martin Sebor  <msebor@redhat.com>
23587         PR other/83508
23588         * builtins.c (check_access): Avoid warning when the no-warning bit
23589         is set.
23591 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
23593         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
23594         * ira-color (allocno_hard_regs_compare): Likewise.
23596 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
23598         PR target/83013
23599         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
23600         Use .pushsection/.popsection.
23602 2018-01-14  Martin Sebor  <msebor@redhat.com>
23604         PR c++/81327
23605         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
23607 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
23609         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
23610         entry from extra_headers.
23611         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
23612         extra_headers, make the list bitwise identical to the i?86-*-* one.
23614 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23616         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
23617         -mcmodel=large with -mindirect-branch=thunk,
23618         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
23619         -mfunction-return=thunk-extern.
23620         * doc/invoke.texi: Document -mcmodel=large is incompatible with
23621         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
23622         -mfunction-return=thunk and -mfunction-return=thunk-extern.
23624 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23626         * config/i386/i386.c (print_reg): Print the name of the full
23627         integer register without '%'.
23628         (ix86_print_operand): Handle 'V'.
23629         * doc/extend.texi: Document 'V' modifier.
23631 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23633         * config/i386/constraints.md (Bs): Disallow memory operand for
23634         -mindirect-branch-register.
23635         (Bw): Likewise.
23636         * config/i386/predicates.md (indirect_branch_operand): Likewise.
23637         (GOT_memory_operand): Likewise.
23638         (call_insn_operand): Likewise.
23639         (sibcall_insn_operand): Likewise.
23640         (GOT32_symbol_operand): Likewise.
23641         * config/i386/i386.md (indirect_jump): Call convert_memory_address
23642         for -mindirect-branch-register.
23643         (tablejump): Likewise.
23644         (*sibcall_memory): Likewise.
23645         (*sibcall_value_memory): Likewise.
23646         Disallow peepholes of indirect call and jump via memory for
23647         -mindirect-branch-register.
23648         (*call_pop): Replace m with Bw.
23649         (*call_value_pop): Likewise.
23650         (*sibcall_pop_memory): Replace m with Bs.
23651         * config/i386/i386.opt (mindirect-branch-register): New option.
23652         * doc/invoke.texi: Document -mindirect-branch-register option.
23654 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23656         * config/i386/i386-protos.h (ix86_output_function_return): New.
23657         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
23658         set function_return_type.
23659         (indirect_thunk_name): Add ret_p to indicate thunk for function
23660         return.
23661         (output_indirect_thunk_function): Pass false to
23662         indirect_thunk_name.
23663         (ix86_output_indirect_branch_via_reg): Likewise.
23664         (ix86_output_indirect_branch_via_push): Likewise.
23665         (output_indirect_thunk_function): Create alias for function
23666         return thunk if regno < 0.
23667         (ix86_output_function_return): New function.
23668         (ix86_handle_fndecl_attribute): Handle function_return.
23669         (ix86_attribute_table): Add function_return.
23670         * config/i386/i386.h (machine_function): Add
23671         function_return_type.
23672         * config/i386/i386.md (simple_return_internal): Use
23673         ix86_output_function_return.
23674         (simple_return_internal_long): Likewise.
23675         * config/i386/i386.opt (mfunction-return=): New option.
23676         (indirect_branch): Mention -mfunction-return=.
23677         * doc/extend.texi: Document function_return function attribute.
23678         * doc/invoke.texi: Document -mfunction-return= option.
23680 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23682         * config/i386/i386-opts.h (indirect_branch): New.
23683         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
23684         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
23685         with local indirect jump when converting indirect call and jump.
23686         (ix86_set_indirect_branch_type): New.
23687         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
23688         (indirectlabelno): New.
23689         (indirect_thunk_needed): Likewise.
23690         (indirect_thunk_bnd_needed): Likewise.
23691         (indirect_thunks_used): Likewise.
23692         (indirect_thunks_bnd_used): Likewise.
23693         (INDIRECT_LABEL): Likewise.
23694         (indirect_thunk_name): Likewise.
23695         (output_indirect_thunk): Likewise.
23696         (output_indirect_thunk_function): Likewise.
23697         (ix86_output_indirect_branch_via_reg): Likewise.
23698         (ix86_output_indirect_branch_via_push): Likewise.
23699         (ix86_output_indirect_branch): Likewise.
23700         (ix86_output_indirect_jmp): Likewise.
23701         (ix86_code_end): Call output_indirect_thunk_function if needed.
23702         (ix86_output_call_insn): Call ix86_output_indirect_branch if
23703         needed.
23704         (ix86_handle_fndecl_attribute): Handle indirect_branch.
23705         (ix86_attribute_table): Add indirect_branch.
23706         * config/i386/i386.h (machine_function): Add indirect_branch_type
23707         and has_local_indirect_jump.
23708         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
23709         to true.
23710         (tablejump): Likewise.
23711         (*indirect_jump): Use ix86_output_indirect_jmp.
23712         (*tablejump_1): Likewise.
23713         (simple_return_indirect_internal): Likewise.
23714         * config/i386/i386.opt (mindirect-branch=): New option.
23715         (indirect_branch): New.
23716         (keep): Likewise.
23717         (thunk): Likewise.
23718         (thunk-inline): Likewise.
23719         (thunk-extern): Likewise.
23720         * doc/extend.texi: Document indirect_branch function attribute.
23721         * doc/invoke.texi: Document -mindirect-branch= option.
23723 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
23725         PR ipa/83051
23726         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
23728 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
23730         * ipa-inline.c (want_inline_small_function_p): Return false if
23731         inlining has already failed with CIF_FINAL_ERROR.
23732         (update_caller_keys): Call want_inline_small_function_p before
23733         can_inline_edge_p.
23734         (update_callee_keys): Likewise.
23736 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23738         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
23739         New function.
23740         (rs6000_quadword_masked_address_p): Likewise.
23741         (quad_aligned_load_p): Likewise.
23742         (quad_aligned_store_p): Likewise.
23743         (const_load_sequence_p): Add comment to describe the outer-most loop.
23744         (mimic_memory_attributes_and_flags): New function.
23745         (rs6000_gen_stvx): Likewise.
23746         (replace_swapped_aligned_store): Likewise.
23747         (rs6000_gen_lvx): Likewise.
23748         (replace_swapped_aligned_load): Likewise.
23749         (replace_swapped_load_constant): Capitalize argument name in
23750         comment describing this function.
23751         (rs6000_analyze_swaps): Add a third pass to search for vector loads
23752         and stores that access quad-word aligned addresses and replace
23753         with stvx or lvx instructions when appropriate.
23754         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
23755         New function prototype.
23756         (rs6000_quadword_masked_address_p): Likewise.
23757         (rs6000_gen_lvx): Likewise.
23758         (rs6000_gen_stvx): Likewise.
23759         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
23760         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
23761         when memory address is aligned.
23762         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
23763         this split to select lvx instruction when memory address is aligned.
23764         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
23765         instruction when memory address is aligned.
23766         (*vsx_le_perm_load_v16qi): Likewise.
23767         (four unnamed splitters): Modify to select the stvx instruction
23768         when memory is aligned.
23770 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
23772         * predict.c (determine_unlikely_bbs): Handle correctly BBs
23773         which appears in the queue multiple times.
23775 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23776             Alan Hayward  <alan.hayward@arm.com>
23777             David Sherwood  <david.sherwood@arm.com>
23779         * tree-vectorizer.h (vec_lower_bound): New structure.
23780         (_loop_vec_info): Add check_nonzero and lower_bounds.
23781         (LOOP_VINFO_CHECK_NONZERO): New macro.
23782         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
23783         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
23784         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
23785         fields.  Make seg_len the distance travelled, not including the
23786         access size.
23787         (dr_direction_indicator): Declare.
23788         (dr_zero_step_indicator): Likewise.
23789         (dr_known_forward_stride_p): Likewise.
23790         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
23791         tree-ssanames.h.
23792         (runtime_alias_check_p): Allow runtime alias checks with
23793         variable strides.
23794         (operator ==): Compare access_size and align.
23795         (prune_runtime_alias_test_list): Rework for new distinction between
23796         the access_size and seg_len.
23797         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
23798         segment lengths.
23799         (get_segment_min_max): New function.
23800         (create_intersect_range_checks): Use it.
23801         (dr_step_indicator): New function.
23802         (dr_direction_indicator): Likewise.
23803         (dr_zero_step_indicator): Likewise.
23804         (dr_known_forward_stride_p): Likewise.
23805         * tree-loop-distribution.c (data_ref_segment_size): Return
23806         DR_STEP * (niters - 1).
23807         (compute_alias_check_pairs): Update call to the dr_with_seg_len
23808         constructor.
23809         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
23810         (vect_preserves_scalar_order_p): New function, split out from...
23811         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
23812         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
23813         (vect_vfa_access_size): New function.
23814         (vect_vfa_align): Likewise.
23815         (vect_compile_time_alias): Take access_size_a and access_b arguments.
23816         (dump_lower_bound): New function.
23817         (vect_check_lower_bound): Likewise.
23818         (vect_small_gap_p): Likewise.
23819         (vectorizable_with_step_bound_p): Likewise.
23820         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
23821         depencies if the vectorization factor is 1.  Convert the checks
23822         for nonzero steps into checks on the bounds of DR_STEP.  Try using
23823         a bunds check for variable steps if the minimum required step is
23824         relatively small. Update calls to the dr_with_seg_len
23825         constructor and to vect_compile_time_alias.
23826         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
23827         function.
23828         (vect_loop_versioning): Call it.
23829         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
23830         when retrying.
23831         (vect_estimate_min_profitable_iters): Account for any bounds checks.
23833 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23834             Alan Hayward  <alan.hayward@arm.com>
23835             David Sherwood  <david.sherwood@arm.com>
23837         * doc/sourcebuild.texi (vect_scatter_store): Document.
23838         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
23839         optabs.
23840         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
23841         Document.
23842         * genopinit.c (main): Add supports_vec_scatter_store and
23843         supports_vec_scatter_store_cached to target_optabs.
23844         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
23845         IFN_MASK_SCATTER_STORE.
23846         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
23847         functions.
23848         * internal-fn.h (internal_store_fn_p): Declare.
23849         (internal_fn_stored_value_index): Likewise.
23850         * internal-fn.c (scatter_store_direct): New macro.
23851         (expand_scatter_store_optab_fn): New function.
23852         (direct_scatter_store_optab_supported_p): New macro.
23853         (internal_store_fn_p): New function.
23854         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
23855         IFN_MASK_SCATTER_STORE.
23856         (internal_fn_mask_index): Likewise.
23857         (internal_fn_stored_value_index): New function.
23858         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
23859         for scatter stores.
23860         * optabs-query.h (supports_vec_scatter_store_p): Declare.
23861         * optabs-query.c (supports_vec_scatter_store_p): New function.
23862         * tree-vectorizer.h (vect_get_store_rhs): Declare.
23863         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
23864         true for scatter stores.
23865         (vect_gather_scatter_fn_p): Handle scatter stores too.
23866         (vect_check_gather_scatter): Consider using scatter stores if
23867         supports_vec_scatter_store_p.
23868         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
23869         scatter stores too.
23870         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23871         internal_fn_stored_value_index.
23872         (check_load_store_masking): Handle scatter stores too.
23873         (vect_get_store_rhs): Make public.
23874         (vectorizable_call): Use internal_store_fn_p.
23875         (vectorizable_store): Handle scatter store internal functions.
23876         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
23877         when deciding whether the end of the group has been reached.
23878         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
23879         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
23880         (mask_scatter_store<mode>): New insns.
23882 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23883             Alan Hayward  <alan.hayward@arm.com>
23884             David Sherwood  <david.sherwood@arm.com>
23886         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
23887         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
23888         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
23889         function.
23890         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
23891         Use vect_truncate_gather_scatter_offset if we can't treat the
23892         operation as a normal gather load or scatter store.
23893         (get_group_load_store_type): Take the gather_scatter_info
23894         as argument.  Try using a gather load or scatter store for
23895         single-element groups.
23896         (get_load_store_type): Update calls to get_group_load_store_type
23897         and vect_use_strided_gather_scatters_p.
23899 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23900             Alan Hayward  <alan.hayward@arm.com>
23901             David Sherwood  <david.sherwood@arm.com>
23903         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
23904         optional tree argument.
23905         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
23906         null target hooks.
23907         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
23908         but continue to use the current value as a fallback.
23909         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
23910         to compare the updates.
23911         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
23912         (get_load_store_type): Use it when handling a strided access.
23913         (vect_get_strided_load_store_ops): New function.
23914         (vect_get_data_ptr_increment): Likewise.
23915         (vectorizable_load): Handle strided gather loads.  Always pass
23916         a step to vect_create_data_ref_ptr and bump_vector_ptr.
23918 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23919             Alan Hayward  <alan.hayward@arm.com>
23920             David Sherwood  <david.sherwood@arm.com>
23922         * doc/md.texi (gather_load@var{m}): Document.
23923         (mask_gather_load@var{m}): Likewise.
23924         * genopinit.c (main): Add supports_vec_gather_load and
23925         supports_vec_gather_load_cached to target_optabs.
23926         * optabs-tree.c (init_tree_optimization_optabs): Use
23927         ggc_cleared_alloc to allocate target_optabs.
23928         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
23929         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
23930         functions.
23931         * internal-fn.h (internal_load_fn_p): Declare.
23932         (internal_gather_scatter_fn_p): Likewise.
23933         (internal_fn_mask_index): Likewise.
23934         (internal_gather_scatter_fn_supported_p): Likewise.
23935         * internal-fn.c (gather_load_direct): New macro.
23936         (expand_gather_load_optab_fn): New function.
23937         (direct_gather_load_optab_supported_p): New macro.
23938         (direct_internal_fn_optab): New function.
23939         (internal_load_fn_p): Likewise.
23940         (internal_gather_scatter_fn_p): Likewise.
23941         (internal_fn_mask_index): Likewise.
23942         (internal_gather_scatter_fn_supported_p): Likewise.
23943         * optabs-query.c (supports_at_least_one_mode_p): New function.
23944         (supports_vec_gather_load_p): Likewise.
23945         * optabs-query.h (supports_vec_gather_load_p): Declare.
23946         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
23947         and memory_type field.
23948         (NUM_PATTERNS): Bump to 15.
23949         * tree-vect-data-refs.c: Include internal-fn.h.
23950         (vect_gather_scatter_fn_p): New function.
23951         (vect_describe_gather_scatter_call): Likewise.
23952         (vect_check_gather_scatter): Try using internal functions for
23953         gather loads.  Recognize existing calls to a gather load function.
23954         (vect_analyze_data_refs): Consider using gather loads if
23955         supports_vec_gather_load_p.
23956         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
23957         (vect_get_gather_scatter_offset_type): Likewise.
23958         (vect_convert_mask_for_vectype): Likewise.
23959         (vect_add_conversion_to_patterm): Likewise.
23960         (vect_try_gather_scatter_pattern): Likewise.
23961         (vect_recog_gather_scatter_pattern): New pattern recognizer.
23962         (vect_vect_recog_func_ptrs): Add it.
23963         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23964         internal_fn_mask_index and internal_gather_scatter_fn_p.
23965         (check_load_store_masking): Take the gather_scatter_info as an
23966         argument and handle gather loads.
23967         (vect_get_gather_scatter_ops): New function.
23968         (vectorizable_call): Check internal_load_fn_p.
23969         (vectorizable_load): Likewise.  Handle gather load internal
23970         functions.
23971         (vectorizable_store): Update call to check_load_store_masking.
23972         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
23973         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
23974         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
23975         (aarch64_gather_scale_operand_d): New predicates.
23976         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
23977         (mask_gather_load<mode>): New insns.
23979 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23980             Alan Hayward  <alan.hayward@arm.com>
23981             David Sherwood  <david.sherwood@arm.com>
23983         * optabs.def (fold_left_plus_optab): New optab.
23984         * doc/md.texi (fold_left_plus_@var{m}): Document.
23985         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
23986         * internal-fn.c (fold_left_direct): Define.
23987         (expand_fold_left_optab_fn): Likewise.
23988         (direct_fold_left_optab_supported_p): Likewise.
23989         * fold-const-call.c (fold_const_fold_left): New function.
23990         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
23991         * tree-parloops.c (valid_reduction_p): New function.
23992         (gather_scalar_reductions): Use it.
23993         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
23994         (vect_finish_replace_stmt): Declare.
23995         * tree-vect-loop.c (fold_left_reduction_fn): New function.
23996         (needs_fold_left_reduction_p): New function, split out from...
23997         (vect_is_simple_reduction): ...here.  Accept reductions that
23998         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
23999         (vect_force_simple_reduction): Also store the reduction type in
24000         the assignment's STMT_VINFO_REDUC_TYPE.
24001         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
24002         (merge_with_identity): New function.
24003         (vect_expand_fold_left): Likewise.
24004         (vectorize_fold_left_reduction): Likewise.
24005         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
24006         scalar phi in place for it.  Check for target support and reject
24007         cases that would reassociate the operation.  Defer the transform
24008         phase to vectorize_fold_left_reduction.
24009         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
24010         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
24011         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
24013 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24015         * tree-if-conv.c (predicate_mem_writes): Remove redundant
24016         call to ifc_temp_var.
24018 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24019             Alan Hayward  <alan.hayward@arm.com>
24020             David Sherwood  <david.sherwood@arm.com>
24022         * target.def (legitimize_address_displacement): Take the original
24023         offset as a poly_int.
24024         * targhooks.h (default_legitimize_address_displacement): Update
24025         accordingly.
24026         * targhooks.c (default_legitimize_address_displacement): Likewise.
24027         * doc/tm.texi: Regenerate.
24028         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
24029         as an argument, moving assert of ad->disp == ad->disp_term to...
24030         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
24031         Try calling targetm.legitimize_address_displacement before expanding
24032         the address rather than afterwards, and adjust for the new interface.
24033         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
24034         Match the new hook interface.  Handle SVE addresses.
24035         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
24036         new hook interface.
24038 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24040         * Makefile.in (OBJS): Add early-remat.o.
24041         * target.def (select_early_remat_modes): New hook.
24042         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
24043         * doc/tm.texi: Regenerate.
24044         * targhooks.h (default_select_early_remat_modes): Declare.
24045         * targhooks.c (default_select_early_remat_modes): New function.
24046         * timevar.def (TV_EARLY_REMAT): New timevar.
24047         * passes.def (pass_early_remat): New pass.
24048         * tree-pass.h (make_pass_early_remat): Declare.
24049         * early-remat.c: New file.
24050         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
24051         function.
24052         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
24054 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24055             Alan Hayward  <alan.hayward@arm.com>
24056             David Sherwood  <david.sherwood@arm.com>
24058         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
24059         vfm1 with a bound_epilog parameter.
24060         (vect_do_peeling): Update calls accordingly, and move the prologue
24061         call earlier in the function.  Treat the base bound_epilog as 0 for
24062         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
24063         this base when peeling for gaps.
24064         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
24065         with fully-masked loops.
24066         (vect_estimate_min_profitable_iters): Handle the single peeled
24067         iteration in that case.
24069 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24070             Alan Hayward  <alan.hayward@arm.com>
24071             David Sherwood  <david.sherwood@arm.com>
24073         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
24074         single-element interleaving even if the size is not a power of 2.
24075         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
24076         accesses for single-element interleaving if the group size is
24077         not a power of 2.
24079 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24080             Alan Hayward  <alan.hayward@arm.com>
24081             David Sherwood  <david.sherwood@arm.com>
24083         * doc/md.texi (fold_extract_last_@var{m}): Document.
24084         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
24085         * optabs.def (fold_extract_last_optab): New optab.
24086         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
24087         * internal-fn.c (fold_extract_direct): New macro.
24088         (expand_fold_extract_optab_fn): Likewise.
24089         (direct_fold_extract_optab_supported_p): Likewise.
24090         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
24091         * tree-vect-loop.c (vect_model_reduction_cost): Handle
24092         EXTRACT_LAST_REDUCTION.
24093         (get_initial_def_for_reduction): Do not create an initial vector
24094         for EXTRACT_LAST_REDUCTION reductions.
24095         (vectorizable_reduction): Leave the scalar phi in place for
24096         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
24097         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
24098         epilogue code for EXTRACT_LAST_REDUCTION and defer the
24099         transform phase to vectorizable_condition.
24100         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
24101         split out from...
24102         (vect_finish_stmt_generation): ...here.
24103         (vect_finish_replace_stmt): New function.
24104         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
24105         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
24106         pattern.
24107         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
24109 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24110             Alan Hayward  <alan.hayward@arm.com>
24111             David Sherwood  <david.sherwood@arm.com>
24113         * doc/md.texi (extract_last_@var{m}): Document.
24114         * optabs.def (extract_last_optab): New optab.
24115         * internal-fn.def (EXTRACT_LAST): New internal function.
24116         * internal-fn.c (cond_unary_direct): New macro.
24117         (expand_cond_unary_optab_fn): Likewise.
24118         (direct_cond_unary_optab_supported_p): Likewise.
24119         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
24120         loops using EXTRACT_LAST.
24121         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
24122         (extract_last_<mode>): ...this optab.
24123         (vec_extract<mode><Vel>): Update accordingly.
24125 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24126             Alan Hayward  <alan.hayward@arm.com>
24127             David Sherwood  <david.sherwood@arm.com>
24129         * target.def (empty_mask_is_expensive): New hook.
24130         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
24131         * doc/tm.texi: Regenerate.
24132         * targhooks.h (default_empty_mask_is_expensive): Declare.
24133         * targhooks.c (default_empty_mask_is_expensive): New function.
24134         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
24135         if the target says that empty masks are expensive.
24136         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
24137         New function.
24138         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
24140 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24141             Alan Hayward  <alan.hayward@arm.com>
24142             David Sherwood  <david.sherwood@arm.com>
24144         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
24145         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
24146         (vect_use_loop_mask_for_alignment_p): New function.
24147         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
24148         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
24149         niters_skip argument.  Make sure that the first niters_skip elements
24150         of the first iteration are inactive.
24151         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
24152         Update call to vect_set_loop_masks_directly.
24153         (get_misalign_in_elems): New function, split out from...
24154         (vect_gen_prolog_loop_niters): ...here.
24155         (vect_update_init_of_dr): Take a code argument that specifies whether
24156         the adjustment should be added or subtracted.
24157         (vect_update_init_of_drs): Likewise.
24158         (vect_prepare_for_masked_peels): New function.
24159         (vect_do_peeling): Skip prologue peeling if we're using a mask
24160         instead.  Update call to vect_update_inits_of_drs.
24161         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24162         mask_skip_niters.
24163         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
24164         alignment.  Do not include the number of peeled iterations in
24165         the minimum threshold in that case.
24166         (vectorizable_induction): Adjust the start value down by
24167         LOOP_VINFO_MASK_SKIP_NITERS iterations.
24168         (vect_transform_loop): Call vect_prepare_for_masked_peels.
24169         Take the number of skipped iterations into account when calculating
24170         the loop bounds.
24171         * tree-vect-stmts.c (vect_gen_while_not): New function.
24173 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24174             Alan Hayward  <alan.hayward@arm.com>
24175             David Sherwood  <david.sherwood@arm.com>
24177         * doc/sourcebuild.texi (vect_fully_masked): Document.
24178         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
24179         default value to 0.
24180         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
24181         split out from...
24182         (vect_analyze_loop_2): ...here. Don't check the vectorization
24183         factor against the number of loop iterations if the loop is
24184         fully-masked.
24186 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24187             Alan Hayward  <alan.hayward@arm.com>
24188             David Sherwood  <david.sherwood@arm.com>
24190         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
24191         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
24192         (dump_groups): Update accordingly.
24193         (iv_use::mem_type): New member variable.
24194         (address_p): New function.
24195         (record_use): Add a mem_type argument and initialize the new
24196         mem_type field.
24197         (record_group_use): Add a mem_type argument.  Use address_p.
24198         Remove obsolete null checks of base_object.  Update call to record_use.
24199         (find_interesting_uses_op): Update call to record_group_use.
24200         (find_interesting_uses_cond): Likewise.
24201         (find_interesting_uses_address): Likewise.
24202         (get_mem_type_for_internal_fn): New function.
24203         (find_address_like_use): Likewise.
24204         (find_interesting_uses_stmt): Try find_address_like_use before
24205         calling find_interesting_uses_op.
24206         (addr_offset_valid_p): Use the iv mem_type field as the type
24207         of the addressed memory.
24208         (add_autoinc_candidates): Likewise.
24209         (get_address_cost): Likewise.
24210         (split_small_address_groups_p): Use address_p.
24211         (split_address_groups): Likewise.
24212         (add_iv_candidate_for_use): Likewise.
24213         (autoinc_possible_for_pair): Likewise.
24214         (rewrite_groups): Likewise.
24215         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
24216         (determine_group_iv_cost): Update after split of USE_ADDRESS.
24217         (get_alias_ptr_type_for_ptr_address): New function.
24218         (rewrite_use_address): Rewrite address uses in calls that were
24219         identified by find_address_like_use.
24221 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24222             Alan Hayward  <alan.hayward@arm.com>
24223             David Sherwood  <david.sherwood@arm.com>
24225         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
24226         TARGET_MEM_REFs.
24227         * gimple-expr.h (is_gimple_addressable: Likewise.
24228         * gimple-expr.c (is_gimple_address): Likewise.
24229         * internal-fn.c (expand_call_mem_ref): New function.
24230         (expand_mask_load_optab_fn): Use it.
24231         (expand_mask_store_optab_fn): Likewise.
24233 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24234             Alan Hayward  <alan.hayward@arm.com>
24235             David Sherwood  <david.sherwood@arm.com>
24237         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
24238         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
24239         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
24240         (cond_umax@var{mode}): Document.
24241         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
24242         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
24243         (cond_umin_optab, cond_umax_optab): New optabs.
24244         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
24245         (COND_IOR, COND_XOR): New internal functions.
24246         * internal-fn.h (get_conditional_internal_fn): Declare.
24247         * internal-fn.c (cond_binary_direct): New macro.
24248         (expand_cond_binary_optab_fn): Likewise.
24249         (direct_cond_binary_optab_supported_p): Likewise.
24250         (get_conditional_internal_fn): New function.
24251         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
24252         Cope with reduction statements that are vectorized as calls rather
24253         than assignments.
24254         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
24255         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
24256         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
24257         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
24258         (UNSPEC_COND_EOR): New unspecs.
24259         (optab): Add mappings for them.
24260         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
24261         (sve_int_op, sve_fp_op): New int attributes.
24263 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24264             Alan Hayward  <alan.hayward@arm.com>
24265             David Sherwood  <david.sherwood@arm.com>
24267         * optabs.def (while_ult_optab): New optab.
24268         * doc/md.texi (while_ult@var{m}@var{n}): Document.
24269         * internal-fn.def (WHILE_ULT): New internal function.
24270         * internal-fn.h (direct_internal_fn_supported_p): New override
24271         that takes two types as argument.
24272         * internal-fn.c (while_direct): New macro.
24273         (expand_while_optab_fn): New function.
24274         (convert_optab_supported_p): Likewise.
24275         (direct_while_optab_supported_p): New macro.
24276         * wide-int.h (wi::udiv_ceil): New function.
24277         * tree-vectorizer.h (rgroup_masks): New structure.
24278         (vec_loop_masks): New typedef.
24279         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
24280         and fully_masked_p.
24281         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
24282         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
24283         (vect_max_vf): New function.
24284         (slpeel_make_loop_iterate_ntimes): Delete.
24285         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
24286         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
24287         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
24288         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
24289         internal-fn.h, stor-layout.h and optabs-query.h.
24290         (vect_set_loop_mask): New function.
24291         (add_preheader_seq): Likewise.
24292         (add_header_seq): Likewise.
24293         (interleave_supported_p): Likewise.
24294         (vect_maybe_permute_loop_masks): Likewise.
24295         (vect_set_loop_masks_directly): Likewise.
24296         (vect_set_loop_condition_masked): Likewise.
24297         (vect_set_loop_condition_unmasked): New function, split out from
24298         slpeel_make_loop_iterate_ntimes.
24299         (slpeel_make_loop_iterate_ntimes): Rename to..
24300         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
24301         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
24302         (vect_do_peeling): Update call accordingly.
24303         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
24304         loops.
24305         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24306         mask_compare_type, can_fully_mask_p and fully_masked_p.
24307         (release_vec_loop_masks): New function.
24308         (_loop_vec_info): Use it to free the loop masks.
24309         (can_produce_all_loop_masks_p): New function.
24310         (vect_get_max_nscalars_per_iter): Likewise.
24311         (vect_verify_full_masking): Likewise.
24312         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
24313         retries, and free the mask rgroups before retrying.  Check loop-wide
24314         reasons for disallowing fully-masked loops.  Make the final decision
24315         about whether use a fully-masked loop or not.
24316         (vect_estimate_min_profitable_iters): Do not assume that peeling
24317         for the number of iterations will be needed for fully-masked loops.
24318         (vectorizable_reduction): Disable fully-masked loops.
24319         (vectorizable_live_operation): Likewise.
24320         (vect_halve_mask_nunits): New function.
24321         (vect_double_mask_nunits): Likewise.
24322         (vect_record_loop_mask): Likewise.
24323         (vect_get_loop_mask): Likewise.
24324         (vect_transform_loop): Handle the case in which the final loop
24325         iteration might handle a partial vector.  Call vect_set_loop_condition
24326         instead of slpeel_make_loop_iterate_ntimes.
24327         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
24328         (check_load_store_masking): New function.
24329         (prepare_load_store_mask): Likewise.
24330         (vectorizable_store): Handle fully-masked loops.
24331         (vectorizable_load): Likewise.
24332         (supportable_widening_operation): Use vect_halve_mask_nunits for
24333         booleans.
24334         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
24335         (vect_gen_while): New function.
24336         * config/aarch64/aarch64.md (umax<mode>3): New expander.
24337         (aarch64_uqdec<mode>): New insn.
24339 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24340             Alan Hayward  <alan.hayward@arm.com>
24341             David Sherwood  <david.sherwood@arm.com>
24343         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
24344         (reduc_xor_scal_optab): New optabs.
24345         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
24346         (reduc_xor_scal_@var{m}): Document.
24347         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
24348         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
24349         internal functions.
24350         * fold-const-call.c (fold_const_call): Handle them.
24351         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
24352         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
24353         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
24354         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
24355         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
24356         (UNSPEC_XORV): New unspecs.
24357         (optab): Add entries for them.
24358         (BITWISEV): New int iterator.
24359         (bit_reduc_op): New int attributes.
24361 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24362             Alan Hayward  <alan.hayward@arm.com>
24363             David Sherwood  <david.sherwood@arm.com>
24365         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
24366         * internal-fn.def (VEC_SHL_INSERT): New internal function.
24367         * optabs.def (vec_shl_insert_optab): New optab.
24368         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
24369         (duplicate_and_interleave): Likewise.
24370         * tree-vect-loop.c: Include internal-fn.h.
24371         (neutral_op_for_slp_reduction): New function, split out from
24372         get_initial_defs_for_reduction.
24373         (get_initial_def_for_reduction): Handle option 2 for variable-length
24374         vectors by loading the neutral value into a vector and then shifting
24375         the initial value into element 0.
24376         (get_initial_defs_for_reduction): Replace the code argument with
24377         the neutral value calculated by neutral_op_for_slp_reduction.
24378         Use gimple_build_vector for constant-length vectors.
24379         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
24380         but the first group_size elements have a neutral value.
24381         Use duplicate_and_interleave otherwise.
24382         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
24383         Update call to get_initial_defs_for_reduction.  Handle SLP
24384         reductions for variable-length vectors by creating one vector
24385         result for each scalar result, with the elements associated
24386         with other scalar results stubbed out with the neutral value.
24387         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
24388         Require IFN_VEC_SHL_INSERT for double reductions on
24389         variable-length vectors, or SLP reductions that have
24390         a neutral value.  Require can_duplicate_and_interleave_p
24391         support for variable-length unchained SLP reductions if there
24392         is no neutral value, such as for MIN/MAX reductions.  Also require
24393         the number of vector elements to be a multiple of the number of
24394         SLP statements when doing variable-length unchained SLP reductions.
24395         Update call to vect_create_epilog_for_reduction.
24396         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
24397         and remove initial values.
24398         (duplicate_and_interleave): Make public.
24399         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
24400         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
24402 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24403             Alan Hayward  <alan.hayward@arm.com>
24404             David Sherwood  <david.sherwood@arm.com>
24406         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
24407         (can_duplicate_and_interleave_p): New function.
24408         (vect_get_and_check_slp_defs): Take the vector of statements
24409         rather than just the current one.  Remove excess parentheses.
24410         Restriction rejectinon of vect_constant_def and vect_external_def
24411         for variable-length vectors to boolean types, or types for which
24412         can_duplicate_and_interleave_p is false.
24413         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
24414         (duplicate_and_interleave): New function.
24415         (vect_get_constant_vectors): Use gimple_build_vector for
24416         constant-length vectors and suitable variable-length constant
24417         vectors.  Use duplicate_and_interleave for other variable-length
24418         vectors.  Don't defer the update when inserting new statements.
24420 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24421             Alan Hayward  <alan.hayward@arm.com>
24422             David Sherwood  <david.sherwood@arm.com>
24424         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
24425         min_profitable_iters doesn't go negative.
24427 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24428             Alan Hayward  <alan.hayward@arm.com>
24429             David Sherwood  <david.sherwood@arm.com>
24431         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
24432         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
24433         * optabs.def (vec_mask_load_lanes_optab): New optab.
24434         (vec_mask_store_lanes_optab): Likewise.
24435         * internal-fn.def (MASK_LOAD_LANES): New internal function.
24436         (MASK_STORE_LANES): Likewise.
24437         * internal-fn.c (mask_load_lanes_direct): New macro.
24438         (mask_store_lanes_direct): Likewise.
24439         (expand_mask_load_optab_fn): Handle masked operations.
24440         (expand_mask_load_lanes_optab_fn): New macro.
24441         (expand_mask_store_optab_fn): Handle masked operations.
24442         (expand_mask_store_lanes_optab_fn): New macro.
24443         (direct_mask_load_lanes_optab_supported_p): Likewise.
24444         (direct_mask_store_lanes_optab_supported_p): Likewise.
24445         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
24446         parameter.
24447         (vect_load_lanes_supported): Likewise.
24448         * tree-vect-data-refs.c (strip_conversion): New function.
24449         (can_group_stmts_p): Likewise.
24450         (vect_analyze_data_ref_accesses): Use it instead of checking
24451         for a pair of assignments.
24452         (vect_store_lanes_supported): Take a masked_p parameter.
24453         (vect_load_lanes_supported): Likewise.
24454         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
24455         vect_store_lanes_supported and vect_load_lanes_supported.
24456         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
24457         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
24458         parameter.  Don't allow gaps for masked accesses.
24459         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
24460         and vect_load_lanes_supported.
24461         (get_load_store_type): Take a masked_p parameter and update
24462         call to get_group_load_store_type.
24463         (vectorizable_store): Update call to get_load_store_type.
24464         Handle IFN_MASK_STORE_LANES.
24465         (vectorizable_load): Update call to get_load_store_type.
24466         Handle IFN_MASK_LOAD_LANES.
24468 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24469             Alan Hayward  <alan.hayward@arm.com>
24470             David Sherwood  <david.sherwood@arm.com>
24472         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
24473         modes for SVE.
24474         * config/aarch64/aarch64-protos.h
24475         (aarch64_sve_struct_memory_operand_p): Declare.
24476         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
24477         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
24478         (VPRED, vpred): Handle SVE structure modes.
24479         * config/aarch64/constraints.md (Utx): New constraint.
24480         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
24481         (aarch64_sve_struct_nonimmediate_operand): New predicates.
24482         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
24483         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
24484         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
24485         structure modes.  Split into pieces after RA.
24486         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
24487         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
24488         New patterns.
24489         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
24490         SVE structure modes.
24491         (aarch64_classify_address): Likewise.
24492         (sizetochar): Move earlier in file.
24493         (aarch64_print_operand): Handle SVE register lists.
24494         (aarch64_array_mode): New function.
24495         (aarch64_sve_struct_memory_operand_p): Likewise.
24496         (TARGET_ARRAY_MODE): Redefine.
24498 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24499             Alan Hayward  <alan.hayward@arm.com>
24500             David Sherwood  <david.sherwood@arm.com>
24502         * target.def (array_mode): New target hook.
24503         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
24504         * doc/tm.texi: Regenerate.
24505         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
24506         * hooks.c (hook_optmode_mode_uhwi_none): New function.
24507         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
24508         targetm.array_mode.
24509         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
24510         type sizes.
24512 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24513             Alan Hayward  <alan.hayward@arm.com>
24514             David Sherwood  <david.sherwood@arm.com>
24516         * fold-const.c (fold_binary_loc): Check the argument types
24517         rather than the result type when testing for a vector operation.
24519 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24521         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
24522         * doc/tm.texi: Regenerate.
24524 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24525             Alan Hayward  <alan.hayward@arm.com>
24526             David Sherwood  <david.sherwood@arm.com>
24528         * doc/invoke.texi (-msve-vector-bits=): Document new option.
24529         (sve): Document new AArch64 extension.
24530         * doc/md.texi (w): Extend the description of the AArch64
24531         constraint to include SVE vectors.
24532         (Upl, Upa): Document new AArch64 predicate constraints.
24533         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
24534         enum.
24535         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
24536         (msve-vector-bits=): New option.
24537         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
24538         SVE when these are disabled.
24539         (sve): New extension.
24540         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
24541         modes.  Adjust their number of units based on aarch64_sve_vg.
24542         (MAX_BITSIZE_MODE_ANY_MODE): Define.
24543         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
24544         aarch64_addr_query_type.
24545         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
24546         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
24547         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
24548         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
24549         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
24550         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
24551         (aarch64_simd_imm_zero_p): Delete.
24552         (aarch64_check_zero_based_sve_index_immediate): Declare.
24553         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24554         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24555         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24556         (aarch64_sve_float_mul_immediate_p): Likewise.
24557         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24558         rather than an rtx.
24559         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
24560         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
24561         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
24562         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
24563         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
24564         (aarch64_regmode_natural_size): Likewise.
24565         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
24566         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
24567         left one place.
24568         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
24569         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
24570         for VG and the SVE predicate registers.
24571         (V_ALIASES): Add a "z"-prefixed alias.
24572         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
24573         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
24574         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
24575         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
24576         (REG_CLASS_NAMES): Add entries for them.
24577         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
24578         and the predicate registers.
24579         (aarch64_sve_vg): Declare.
24580         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
24581         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
24582         (REGMODE_NATURAL_SIZE): Define.
24583         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
24584         SVE macros.
24585         * config/aarch64/aarch64.c: Include cfgrtl.h.
24586         (simd_immediate_info): Add a constructor for series vectors,
24587         and an associated step field.
24588         (aarch64_sve_vg): New variable.
24589         (aarch64_dbx_register_number): Handle VG and the predicate registers.
24590         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
24591         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
24592         (VEC_ANY_DATA, VEC_STRUCT): New constants.
24593         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
24594         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
24595         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
24596         (aarch64_get_mask_mode): New functions.
24597         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
24598         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
24599         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
24600         predicate modes and predicate registers.  Explicitly restrict
24601         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
24602         to store a vector mode if it is recognized by
24603         aarch64_classify_vector_mode.
24604         (aarch64_regmode_natural_size): New function.
24605         (aarch64_hard_regno_caller_save_mode): Return the original mode
24606         for predicates.
24607         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
24608         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
24609         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
24610         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
24611         functions.
24612         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
24613         does not overlap dest if the function is frame-related.  Handle
24614         SVE constants.
24615         (aarch64_split_add_offset): New function.
24616         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
24617         them aarch64_add_offset.
24618         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
24619         and update call to aarch64_sub_sp.
24620         (aarch64_add_cfa_expression): New function.
24621         (aarch64_expand_prologue): Pass extra temporary registers to the
24622         functions above.  Handle the case in which we need to emit new
24623         DW_CFA_expressions for registers that were originally saved
24624         relative to the stack pointer, but now have to be expressed
24625         relative to the frame pointer.
24626         (aarch64_output_mi_thunk): Pass extra temporary registers to the
24627         functions above.
24628         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
24629         IP0 and IP1 values for SVE frames.
24630         (aarch64_expand_vec_series): New function.
24631         (aarch64_expand_sve_widened_duplicate): Likewise.
24632         (aarch64_expand_sve_const_vector): Likewise.
24633         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
24634         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
24635         into the register, rather than emitting a SET directly.
24636         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
24637         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
24638         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
24639         (offset_9bit_signed_scaled_p): New functions.
24640         (aarch64_replicate_bitmask_imm): New function.
24641         (aarch64_bitmask_imm): Use it.
24642         (aarch64_cannot_force_const_mem): Reject expressions involving
24643         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
24644         (aarch64_classify_index): Handle SVE indices, by requiring
24645         a plain register index with a scale that matches the element size.
24646         (aarch64_classify_address): Handle SVE addresses.  Assert that
24647         the mode of the address is VOIDmode or an integer mode.
24648         Update call to aarch64_classify_symbol.
24649         (aarch64_classify_symbolic_expression): Update call to
24650         aarch64_classify_symbol.
24651         (aarch64_const_vec_all_in_range_p): New function.
24652         (aarch64_print_vector_float_operand): Likewise.
24653         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
24654         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
24655         and the FP immediates 1.0 and 0.5.
24656         (aarch64_print_address_internal): Handle SVE addresses.
24657         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
24658         (aarch64_regno_regclass): Handle predicate registers.
24659         (aarch64_secondary_reload): Handle big-endian reloads of SVE
24660         data modes.
24661         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
24662         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
24663         (aarch64_convert_sve_vector_bits): New function.
24664         (aarch64_override_options): Use it to handle -msve-vector-bits=.
24665         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24666         rather than an rtx.
24667         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
24668         Handle SVE vector and predicate modes.  Accept VL-based constants
24669         that need only one temporary register, and VL offsets that require
24670         no temporary registers.
24671         (aarch64_conditional_register_usage): Mark the predicate registers
24672         as fixed if SVE isn't available.
24673         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
24674         Return true for SVE vector and predicate modes.
24675         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
24676         rather than an unsigned int.  Handle SVE modes.
24677         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
24678         SVE modes.
24679         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
24680         if SVE is enabled.
24681         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24682         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24683         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24684         (aarch64_sve_float_mul_immediate_p): New functions.
24685         (aarch64_sve_valid_immediate): New function.
24686         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
24687         Explicitly reject structure modes.  Check for INDEX constants.
24688         Handle PTRUE and PFALSE constants.
24689         (aarch64_check_zero_based_sve_index_immediate): New function.
24690         (aarch64_simd_imm_zero_p): Delete.
24691         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
24692         vector modes.  Accept constants in the range of CNT[BHWD].
24693         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
24694         ask for an Advanced SIMD mode.
24695         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
24696         (aarch64_simd_vector_alignment): Handle SVE predicates.
24697         (aarch64_vectorize_preferred_vector_alignment): New function.
24698         (aarch64_simd_vector_alignment_reachable): Use it instead of
24699         the vector size.
24700         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
24701         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
24702         functions.
24703         (MAX_VECT_LEN): Delete.
24704         (expand_vec_perm_d): Add a vec_flags field.
24705         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
24706         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
24707         (aarch64_evpc_ext): Don't apply a big-endian lane correction
24708         for SVE modes.
24709         (aarch64_evpc_rev): Rename to...
24710         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
24711         (aarch64_evpc_rev_global): New function.
24712         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
24713         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
24714         MAX_VECT_LEN.
24715         (aarch64_evpc_sve_tbl): New function.
24716         (aarch64_expand_vec_perm_const_1): Update after rename of
24717         aarch64_evpc_rev.  Handle SVE permutes too, trying
24718         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
24719         than aarch64_evpc_tbl.
24720         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
24721         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
24722         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
24723         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
24724         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
24725         (aarch64_expand_sve_vcond): New functions.
24726         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
24727         of aarch64_vector_mode_p.
24728         (aarch64_dwarf_poly_indeterminate_value): New function.
24729         (aarch64_compute_pressure_classes): Likewise.
24730         (aarch64_can_change_mode_class): Likewise.
24731         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
24732         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
24733         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
24734         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
24735         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
24736         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
24737         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
24738         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
24739         constraints.
24740         (Dn, Dl, Dr): Accept const as well as const_vector.
24741         (Dz): Likewise.  Compare against CONST0_RTX.
24742         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
24743         of "vector" where appropriate.
24744         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
24745         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
24746         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
24747         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
24748         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
24749         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
24750         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
24751         (v_int_equiv): Extend to SVE modes.
24752         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
24753         mode attributes.
24754         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
24755         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
24756         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
24757         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
24758         (SVE_COND_FP_CMP): New int iterators.
24759         (perm_hilo): Handle the new unpack unspecs.
24760         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
24761         attributes.
24762         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
24763         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
24764         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
24765         (aarch64_equality_operator, aarch64_constant_vector_operand)
24766         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
24767         (aarch64_sve_nonimmediate_operand): Likewise.
24768         (aarch64_sve_general_operand): Likewise.
24769         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
24770         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
24771         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
24772         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
24773         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
24774         (aarch64_sve_float_arith_immediate): Likewise.
24775         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
24776         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
24777         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
24778         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
24779         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
24780         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
24781         (aarch64_sve_float_arith_operand): Likewise.
24782         (aarch64_sve_float_arith_with_sub_operand): Likewise.
24783         (aarch64_sve_float_mul_operand): Likewise.
24784         (aarch64_sve_vec_perm_operand): Likewise.
24785         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
24786         (aarch64_mov_operand): Accept const_poly_int and const_vector.
24787         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
24788         as well as const_vector.
24789         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
24790         in file.  Use CONST0_RTX and CONSTM1_RTX.
24791         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
24792         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
24793         Use aarch64_simd_imm_zero.
24794         * config/aarch64/aarch64-sve.md: New file.
24795         * config/aarch64/aarch64.md: Include it.
24796         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
24797         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
24798         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
24799         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
24800         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
24801         (sve): New attribute.
24802         (enabled): Disable instructions with the sve attribute unless
24803         TARGET_SVE.
24804         (movqi, movhi): Pass CONST_POLY_INT operaneds through
24805         aarch64_expand_mov_immediate.
24806         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
24807         CNT[BHSD] immediates.
24808         (movti): Split CONST_POLY_INT moves into two halves.
24809         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
24810         Split additions that need a temporary here if the destination
24811         is the stack pointer.
24812         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
24813         (*add<mode>3_poly_1): New instruction.
24814         (set_clobber_cc): New expander.
24816 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24818         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
24819         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
24820         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
24821         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
24822         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
24823         Change innermode from fixed_mode_size to machine_mode.
24824         (simplify_subreg): Update call accordingly.  Handle a constant-sized
24825         subreg of a variable-length CONST_VECTOR.
24827 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24828             Alan Hayward  <alan.hayward@arm.com>
24829             David Sherwood  <david.sherwood@arm.com>
24831         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
24832         (add_offset_to_base): New function, split out from...
24833         (create_mem_ref): ...here.  When handling a scale other than 1,
24834         check first whether the address is valid without the offset.
24835         Add it into the base if so, leaving the index and scale as-is.
24837 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
24839         PR c++/83778
24840         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
24841         fold_for_warn before checking if arg2 is INTEGER_CST.
24843 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
24845         * config/rs6000/predicates.md (load_multiple_operation): Delete.
24846         (store_multiple_operation): Delete.
24847         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
24848         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
24849         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
24850         guarded by TARGET_STRING.
24851         (rs6000_output_load_multiple): Delete.
24852         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
24853         OPTION_MASK_STRING / TARGET_STRING handling.
24854         (print_operand) <'N', 'O'>: Add comment that these are unused now.
24855         (const rs6000_opt_masks) <"string">: Change mask to 0.
24856         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
24857         (MASK_STRING): Delete.
24858         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
24859         parts.  Simplify.
24860         (load_multiple): Delete.
24861         (*ldmsi8): Delete.
24862         (*ldmsi7): Delete.
24863         (*ldmsi6): Delete.
24864         (*ldmsi5): Delete.
24865         (*ldmsi4): Delete.
24866         (*ldmsi3): Delete.
24867         (store_multiple): Delete.
24868         (*stmsi8): Delete.
24869         (*stmsi7): Delete.
24870         (*stmsi6): Delete.
24871         (*stmsi5): Delete.
24872         (*stmsi4): Delete.
24873         (*stmsi3): Delete.
24874         (movmemsi_8reg): Delete.
24875         (corresponding unnamed define_insn): Delete.
24876         (movmemsi_6reg): Delete.
24877         (corresponding unnamed define_insn): Delete.
24878         (movmemsi_4reg): Delete.
24879         (corresponding unnamed define_insn): Delete.
24880         (movmemsi_2reg): Delete.
24881         (corresponding unnamed define_insn): Delete.
24882         (movmemsi_1reg): Delete.
24883         (corresponding unnamed define_insn): Delete.
24884         * config/rs6000/rs6000.opt (mno-string): New.
24885         (mstring): Replace by deprecation warning stub.
24886         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
24888 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
24890         * regrename.c (regrename_do_replace): If replacing the same
24891         reg multiple times, try to reuse last created gen_raw_REG.
24893         PR debug/81155
24894         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
24895         main to workaround a bug in GDB.
24897 2018-01-12  Tom de Vries  <tom@codesourcery.com>
24899         PR target/83737
24900         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
24902 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
24904         PR rtl-optimization/80481
24905         * ira-color.c (get_cap_member): New function.
24906         (allocnos_conflict_by_live_ranges_p): Use it.
24907         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
24908         (setup_slot_coalesced_allocno_live_ranges): Ditto.
24910 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
24912         PR target/83628
24913         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
24914         (*saddl_se_1): Ditto.
24915         (*ssubsi_1): Ditto.
24916         (*ssubl_se_1): Ditto.
24918 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
24920         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
24921         rather than wi::to_widest for DR_INITs.
24922         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
24923         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
24924         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
24925         INTEGER_CSTs.
24926         (vect_analyze_group_access_1): Note that here.
24928 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
24930         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
24931         polynomial type sizes.
24933 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
24935         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
24936         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
24937         (gimple_add_tmp_var): Likewise.
24939 2018-01-12  Martin Liska  <mliska@suse.cz>
24941         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
24942         (gimple_alloc_sizes): Likewise.
24943         (dump_gimple_statistics): Use PRIu64 in printf format.
24944         * gimple.h: Change uint64_t to int.
24946 2018-01-12  Martin Liska  <mliska@suse.cz>
24948         * tree-core.h: Use uint64_t instead of int.
24949         * tree.c (tree_node_counts): Likewise.
24950         (tree_node_sizes): Likewise.
24951         (dump_tree_statistics): Use PRIu64 in printf format.
24953 2018-01-12  Martin Liska  <mliska@suse.cz>
24955         * Makefile.in: As qsort_chk is implemented in vec.c, add
24956         vec.o to linkage of gencfn-macros.
24957         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
24958         passing the info to record_node_allocation_statistics.
24959         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
24960         and pass the info.
24961         * ggc-common.c (struct ggc_usage): Add operator== and use
24962         it in operator< and compare function.
24963         * mem-stats.h (struct mem_usage): Likewise.
24964         * vec.c (struct vec_usage): Remove operator< and compare
24965         function. Can be simply inherited.
24967 2018-01-12  Martin Jambor  <mjambor@suse.cz>
24969         PR target/81616
24970         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
24971         * tree-ssa-math-opts.c: Include domwalk.h.
24972         (convert_mult_to_fma_1): New function.
24973         (fma_transformation_info): New type.
24974         (fma_deferring_state): Likewise.
24975         (cancel_fma_deferring): New function.
24976         (result_of_phi): Likewise.
24977         (last_fma_candidate_feeds_initial_phi): Likewise.
24978         (convert_mult_to_fma): Added deferring logic, split actual
24979         transformation to convert_mult_to_fma_1.
24980         (math_opts_dom_walker): New type.
24981         (math_opts_dom_walker::after_dom_children): New method, body moved
24982         here from pass_optimize_widening_mul::execute, added deferring logic
24983         bits.
24984         (pass_optimize_widening_mul::execute): Moved most of code to
24985         math_opts_dom_walker::after_dom_children.
24986         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
24987         * config/i386/i386.c (ix86_option_override_internal): Added
24988         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
24990 2018-01-12  Richard Biener  <rguenther@suse.de>
24992         PR debug/83157
24993         * dwarf2out.c (gen_variable_die): Do not reset old_die for
24994         inline instance vars.
24996 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
24998         PR target/81819
24999         * config/rx/rx.c (rx_is_restricted_memory_address):
25000         Handle SUBREG case.
25002 2018-01-12  Richard Biener  <rguenther@suse.de>
25004         PR tree-optimization/80846
25005         * target.def (split_reduction): New target hook.
25006         * targhooks.c (default_split_reduction): New function.
25007         * targhooks.h (default_split_reduction): Declare.
25008         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
25009         target requests first reduce vectors by combining low and high
25010         parts.
25011         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
25012         (get_vectype_for_scalar_type_and_size): Export.
25013         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
25014         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
25015         * doc/tm.texi: Regenerate.
25016         * config/i386/i386.c (ix86_split_reduction): Implement
25017         TARGET_VECTORIZE_SPLIT_REDUCTION.
25019 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
25021         PR target/83368
25022         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
25023         in PIC mode except for TARGET_VXWORKS_RTP.
25024         * config/sparc/sparc.c: Include cfgrtl.h.
25025         (TARGET_INIT_PIC_REG): Define.
25026         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
25027         (sparc_pic_register_p): New predicate.
25028         (sparc_legitimate_address_p): Use it.
25029         (sparc_legitimize_pic_address): Likewise.
25030         (sparc_delegitimize_address): Likewise.
25031         (sparc_mode_dependent_address_p): Likewise.
25032         (gen_load_pcrel_sym): Remove 4th parameter.
25033         (load_got_register): Adjust call to above.  Remove obsolete stuff.
25034         (sparc_expand_prologue): Do not call load_got_register here.
25035         (sparc_flat_expand_prologue): Likewise.
25036         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
25037         (sparc_use_pseudo_pic_reg): New function.
25038         (sparc_init_pic_reg): Likewise.
25039         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25040         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
25042 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
25044         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25045         Add item for branch_cost.
25047 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
25049         PR rtl-optimization/83565
25050         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
25051         not extend the result to a larger mode for rotate operations.
25052         (num_sign_bit_copies1): Likewise.
25054 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25056         PR target/40411
25057         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
25058         -symbolic.
25059         Use values-Xc.o for -pedantic.
25060         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
25062 2018-01-12  Martin Liska  <mliska@suse.cz>
25064         PR ipa/83054
25065         * ipa-devirt.c (final_warning_record::grow_type_warnings):
25066         New function.
25067         (possible_polymorphic_call_targets): Use it.
25068         (ipa_devirt): Likewise.
25070 2018-01-12  Martin Liska  <mliska@suse.cz>
25072         * profile-count.h (enum profile_quality): Use 0 as invalid
25073         enum value of profile_quality.
25075 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
25077         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
25078         -mext-string options.
25080 2018-01-12  Richard Biener  <rguenther@suse.de>
25082         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
25083         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
25084         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
25085         Likewise.
25086         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
25088 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
25090         * configure.ac (--with-long-double-format): Add support for the
25091         configuration option to change the default long double format on
25092         PowerPC systems.
25093         * config.gcc (powerpc*-linux*-*): Likewise.
25094         * configure: Regenerate.
25095         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
25096         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
25097         used without modification.
25099 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25101         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
25102         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
25103         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
25104         MISC_BUILTIN_SPEC_BARRIER.
25105         (rs6000_init_builtins): Likewise.
25106         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
25107         enum value.
25108         (speculation_barrier): New define_insn.
25109         * doc/extend.texi: Document __builtin_speculation_barrier.
25111 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
25113         PR target/83203
25114         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
25115         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
25116         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
25117         iterators.
25118         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
25119         integral modes instead of "ss" and "sd".
25120         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
25121         vectors with 32-bit and 64-bit elements.
25122         (vecdupssescalarmodesuffix): New mode attribute.
25123         (vec_dup<mode>): Use it.
25125 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
25127         PR target/83330
25128         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
25129         frame if argument is passed on stack.
25131 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
25133         PR target/82682
25134         * ree.c (combine_reaching_defs): Optimize also
25135         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
25136         reg2=any_extend(exp); reg1=reg2;, formatting fix.
25138 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
25140         PR middle-end/83189
25141         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
25143 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
25145         PR middle-end/83718
25146         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
25147         after they are computed.
25149 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
25151         PR tree-optimization/83695
25152         * gimple-loop-linterchange.cc
25153         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
25154         reset cached scev information after interchange.
25155         (pass_linterchange::execute): Remove call to scev_reset_htab.
25157 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25159         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
25160         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
25161         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
25162         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
25163         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
25164         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
25165         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
25166         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
25167         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
25168         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
25169         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
25170         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
25171         (V_lane_reg): Likewise.
25172         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
25173         New define_expand.
25174         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
25175         (vfmal_lane_low<mode>_intrinsic,
25176         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
25177         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
25178         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
25179         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
25180         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
25181         vfmsl_lane_high<mode>_intrinsic): New define_insns.
25183 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25185         * config/arm/arm-cpus.in (fp16fml): New feature.
25186         (ALL_SIMD): Add fp16fml.
25187         (armv8.2-a): Add fp16fml as an option.
25188         (armv8.3-a): Likewise.
25189         (armv8.4-a): Add fp16fml as part of fp16.
25190         * config/arm/arm.h (TARGET_FP16FML): Define.
25191         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
25192         when appropriate.
25193         * config/arm/arm-modes.def (V2HF): Define.
25194         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
25195         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
25196         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
25197         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
25198         vfmsl_low, vfmsl_high): New set of builtins.
25199         * config/arm/iterators.md (PLUSMINUS): New code iterator.
25200         (vfml_op): New code attribute.
25201         (VFMLHALVES): New int iterator.
25202         (VFML, VFMLSEL): New mode attributes.
25203         (V_reg): Define mapping for V2HF.
25204         (V_hi, V_lo): New mode attributes.
25205         (VF_constraint): Likewise.
25206         (vfml_half, vfml_half_selector): New int attributes.
25207         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
25208         define_expand.
25209         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
25210         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
25211         New define_insn.
25212         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
25213         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
25214         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
25215         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
25216         documentation.
25217         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
25218         Document new effective target and option set.
25220 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25222         * config/arm/arm-cpus.in (armv8_4): New feature.
25223         (ARMv8_4a): New fgroup.
25224         (armv8.4-a): New arch.
25225         * config/arm/arm-tables.opt: Regenerate.
25226         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
25227         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
25228         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
25229         Add matching rules for -march=armv8.4-a and extensions.
25230         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
25232 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
25234         PR target/81821
25235         * config/rx/rx.md (BW): New mode attribute.
25236         (sync_lock_test_and_setsi): Add mode suffix to insn output.
25238 2018-01-11  Richard Biener  <rguenther@suse.de>
25240         PR tree-optimization/83435
25241         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
25242         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
25243         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
25245 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25246             Alan Hayward  <alan.hayward@arm.com>
25247             David Sherwood  <david.sherwood@arm.com>
25249         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
25250         field.
25251         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
25252         (aarch64_print_address_internal): Use it to check for a zero offset.
25254 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25255             Alan Hayward  <alan.hayward@arm.com>
25256             David Sherwood  <david.sherwood@arm.com>
25258         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
25259         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
25260         Return a poly_int64 rather than a HOST_WIDE_INT.
25261         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
25262         rather than a HOST_WIDE_INT.
25263         * config/aarch64/aarch64.h (aarch64_frame): Protect with
25264         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
25265         hard_fp_offset, frame_size, initial_adjust, callee_offset and
25266         final_offset from HOST_WIDE_INT to poly_int64.
25267         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
25268         to_constant when getting the number of units in an Advanced SIMD
25269         mode.
25270         (aarch64_builtin_vectorized_function): Check for a constant number
25271         of units.
25272         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
25273         GET_MODE_SIZE.
25274         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
25275         attribute instead of GET_MODE_NUNITS.
25276         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
25277         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
25278         GET_MODE_SIZE for fixed-size registers.
25279         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
25280         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
25281         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
25282         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
25283         (aarch64_print_operand, aarch64_print_address_internal)
25284         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
25285         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
25286         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
25287         Handle polynomial GET_MODE_SIZE.
25288         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
25289         wider than SImode without modification.
25290         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
25291         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
25292         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
25293         passing and returning SVE modes.
25294         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
25295         rather than GEN_INT.
25296         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
25297         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
25298         (aarch64_allocate_and_probe_stack_space): Likewise.
25299         (aarch64_layout_frame): Cope with polynomial offsets.
25300         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
25301         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
25302         polynomial offsets.
25303         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
25304         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
25305         poly_int64 rather than a HOST_WIDE_INT.
25306         (aarch64_get_separate_components, aarch64_process_components)
25307         (aarch64_expand_prologue, aarch64_expand_epilogue)
25308         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
25309         (aarch64_anchor_offset): New function, split out from...
25310         (aarch64_legitimize_address): ...here.
25311         (aarch64_builtin_vectorization_cost): Handle polynomial
25312         TYPE_VECTOR_SUBPARTS.
25313         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
25314         GET_MODE_NUNITS.
25315         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
25316         number of elements from the PARALLEL rather than the mode.
25317         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
25318         rather than GET_MODE_BITSIZE.
25319         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
25320         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
25321         (aarch64_expand_vec_perm_const_1): Handle polynomial
25322         d->perm.length () and d->perm elements.
25323         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
25324         Apply to_constant to d->perm elements.
25325         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
25326         polynomial CONST_VECTOR_NUNITS.
25327         (aarch64_move_pointer): Take amount as a poly_int64 rather
25328         than an int.
25329         (aarch64_progress_pointer): Avoid temporary variable.
25330         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
25331         the mode attribute instead of GET_MODE.
25333 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25334             Alan Hayward  <alan.hayward@arm.com>
25335             David Sherwood  <david.sherwood@arm.com>
25337         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
25338         x exists before using it.
25339         (aarch64_add_constant_internal): Rename to...
25340         (aarch64_add_offset_1): ...this.  Replace regnum with separate
25341         src and dest rtxes.  Handle the case in which they're different,
25342         including when the offset is zero.  Replace scratchreg with an rtx.
25343         Use 2 additions if there is no spare register into which we can
25344         move a 16-bit constant.
25345         (aarch64_add_constant): Delete.
25346         (aarch64_add_offset): Replace reg with separate src and dest
25347         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
25348         Use aarch64_add_offset_1.
25349         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
25350         an rtx rather than an int.  Take the delta as a poly_int64
25351         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
25352         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
25353         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
25354         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
25355         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
25356         and aarch64_add_sp.
25357         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
25358         aarch64_add_constant.
25360 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25362         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
25363         Use scalar_float_mode.
25365 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25367         * config/aarch64/aarch64-simd.md
25368         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
25369         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
25370         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
25371         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
25372         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
25373         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
25374         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
25375         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
25376         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
25377         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
25379 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
25381         PR target/83514
25382         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
25383         targ_options->x_arm_arch_string is non NULL.
25385 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
25387         * config/aarch64/aarch64.h
25388         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
25390 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
25392         PR target/82096
25393         * expmed.c (emit_store_flag_force): Swap if const op0
25394         and change VOIDmode to mode of op0.
25396 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25398         PR rtl-optimization/83761
25399         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
25400         than bytes to mode_for_size.
25402 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
25404         PR middle-end/83189
25405         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
25406         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
25407         profile.
25409 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
25411         PR middle-end/83575
25412         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
25413         when in layout mode.
25414         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
25415         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
25416         partition fixup.
25418 2018-01-10  Michael Collison  <michael.collison@arm.com>
25420         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
25421         * config/aarch64/aarch64-option-extension.def: Add
25422         AARCH64_OPT_EXTENSION of 'fp16fml'.
25423         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25424         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
25425         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
25426         * config/aarch64/constraints.md (Ui7): New constraint.
25427         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
25428         (VFMLA_SEL_W): Ditto.
25429         (f16quad): Ditto.
25430         (f16mac1): Ditto.
25431         (VFMLA16_LOW): New int iterator.
25432         (VFMLA16_HIGH): Ditto.
25433         (UNSPEC_FMLAL): New unspec.
25434         (UNSPEC_FMLSL): Ditto.
25435         (UNSPEC_FMLAL2): Ditto.
25436         (UNSPEC_FMLSL2): Ditto.
25437         (f16mac): New code attribute.
25438         * config/aarch64/aarch64-simd-builtins.def
25439         (aarch64_fmlal_lowv2sf): Ditto.
25440         (aarch64_fmlsl_lowv2sf): Ditto.
25441         (aarch64_fmlalq_lowv4sf): Ditto.
25442         (aarch64_fmlslq_lowv4sf): Ditto.
25443         (aarch64_fmlal_highv2sf): Ditto.
25444         (aarch64_fmlsl_highv2sf): Ditto.
25445         (aarch64_fmlalq_highv4sf): Ditto.
25446         (aarch64_fmlslq_highv4sf): Ditto.
25447         (aarch64_fmlal_lane_lowv2sf): Ditto.
25448         (aarch64_fmlsl_lane_lowv2sf): Ditto.
25449         (aarch64_fmlal_laneq_lowv2sf): Ditto.
25450         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
25451         (aarch64_fmlalq_lane_lowv4sf): Ditto.
25452         (aarch64_fmlsl_lane_lowv4sf): Ditto.
25453         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
25454         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
25455         (aarch64_fmlal_lane_highv2sf): Ditto.
25456         (aarch64_fmlsl_lane_highv2sf): Ditto.
25457         (aarch64_fmlal_laneq_highv2sf): Ditto.
25458         (aarch64_fmlsl_laneq_highv2sf): Ditto.
25459         (aarch64_fmlalq_lane_highv4sf): Ditto.
25460         (aarch64_fmlsl_lane_highv4sf): Ditto.
25461         (aarch64_fmlalq_laneq_highv4sf): Ditto.
25462         (aarch64_fmlsl_laneq_highv4sf): Ditto.
25463         * config/aarch64/aarch64-simd.md:
25464         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
25465         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25466         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
25467         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25468         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
25469         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
25470         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
25471         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
25472         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
25473         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
25474         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
25475         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
25476         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
25477         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
25478         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
25479         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
25480         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
25481         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
25482         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
25483         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
25484         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
25485         (vfmlsl_low_u32): Ditto.
25486         (vfmlalq_low_u32): Ditto.
25487         (vfmlslq_low_u32): Ditto.
25488         (vfmlal_high_u32): Ditto.
25489         (vfmlsl_high_u32): Ditto.
25490         (vfmlalq_high_u32): Ditto.
25491         (vfmlslq_high_u32): Ditto.
25492         (vfmlal_lane_low_u32): Ditto.
25493         (vfmlsl_lane_low_u32): Ditto.
25494         (vfmlal_laneq_low_u32): Ditto.
25495         (vfmlsl_laneq_low_u32): Ditto.
25496         (vfmlalq_lane_low_u32): Ditto.
25497         (vfmlslq_lane_low_u32): Ditto.
25498         (vfmlalq_laneq_low_u32): Ditto.
25499         (vfmlslq_laneq_low_u32): Ditto.
25500         (vfmlal_lane_high_u32): Ditto.
25501         (vfmlsl_lane_high_u32): Ditto.
25502         (vfmlal_laneq_high_u32): Ditto.
25503         (vfmlsl_laneq_high_u32): Ditto.
25504         (vfmlalq_lane_high_u32): Ditto.
25505         (vfmlslq_lane_high_u32): Ditto.
25506         (vfmlalq_laneq_high_u32): Ditto.
25507         (vfmlslq_laneq_high_u32): Ditto.
25508         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
25509         (AARCH64_FL_FOR_ARCH8_4): New.
25510         (AARCH64_ISA_F16FML): New ISA flag.
25511         (TARGET_F16FML): New feature flag for fp16fml.
25512         (doc/invoke.texi): Document new fp16fml option.
25514 2018-01-10  Michael Collison  <michael.collison@arm.com>
25516         * config/aarch64/aarch64-builtins.c:
25517         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
25518         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25519         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
25520         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
25521         (AARCH64_ISA_SHA3): New ISA flag.
25522         (TARGET_SHA3): New feature flag for sha3.
25523         * config/aarch64/iterators.md (sha512_op): New int attribute.
25524         (CRYPTO_SHA512): New int iterator.
25525         (UNSPEC_SHA512H): New unspec.
25526         (UNSPEC_SHA512H2): Ditto.
25527         (UNSPEC_SHA512SU0): Ditto.
25528         (UNSPEC_SHA512SU1): Ditto.
25529         * config/aarch64/aarch64-simd-builtins.def
25530         (aarch64_crypto_sha512hqv2di): New builtin.
25531         (aarch64_crypto_sha512h2qv2di): Ditto.
25532         (aarch64_crypto_sha512su0qv2di): Ditto.
25533         (aarch64_crypto_sha512su1qv2di): Ditto.
25534         (aarch64_eor3qv8hi): Ditto.
25535         (aarch64_rax1qv2di): Ditto.
25536         (aarch64_xarqv2di): Ditto.
25537         (aarch64_bcaxqv8hi): Ditto.
25538         * config/aarch64/aarch64-simd.md:
25539         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
25540         (aarch64_crypto_sha512su0qv2di): Ditto.
25541         (aarch64_crypto_sha512su1qv2di): Ditto.
25542         (aarch64_eor3qv8hi): Ditto.
25543         (aarch64_rax1qv2di): Ditto.
25544         (aarch64_xarqv2di): Ditto.
25545         (aarch64_bcaxqv8hi): Ditto.
25546         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
25547         (vsha512h2q_u64): Ditto.
25548         (vsha512su0q_u64): Ditto.
25549         (vsha512su1q_u64): Ditto.
25550         (veor3q_u16): Ditto.
25551         (vrax1q_u64): Ditto.
25552         (vxarq_u64): Ditto.
25553         (vbcaxq_u16): Ditto.
25554         * config/arm/types.md (crypto_sha512): New type attribute.
25555         (crypto_sha3): Ditto.
25556         (doc/invoke.texi): Document new sha3 option.
25558 2018-01-10  Michael Collison  <michael.collison@arm.com>
25560         * config/aarch64/aarch64-builtins.c:
25561         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
25562         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25563         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
25564         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
25565         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
25566         (AARCH64_ISA_SM4): New ISA flag.
25567         (TARGET_SM4): New feature flag for sm4.
25568         * config/aarch64/aarch64-simd-builtins.def
25569         (aarch64_sm3ss1qv4si): Ditto.
25570         (aarch64_sm3tt1aq4si): Ditto.
25571         (aarch64_sm3tt1bq4si): Ditto.
25572         (aarch64_sm3tt2aq4si): Ditto.
25573         (aarch64_sm3tt2bq4si): Ditto.
25574         (aarch64_sm3partw1qv4si): Ditto.
25575         (aarch64_sm3partw2qv4si): Ditto.
25576         (aarch64_sm4eqv4si): Ditto.
25577         (aarch64_sm4ekeyqv4si): Ditto.
25578         * config/aarch64/aarch64-simd.md:
25579         (aarch64_sm3ss1qv4si): Ditto.
25580         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
25581         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
25582         (aarch64_sm4eqv4si): Ditto.
25583         (aarch64_sm4ekeyqv4si): Ditto.
25584         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
25585         (sm3part_op): Ditto.
25586         (CRYPTO_SM3TT): Ditto.
25587         (CRYPTO_SM3PART): Ditto.
25588         (UNSPEC_SM3SS1): New unspec.
25589         (UNSPEC_SM3TT1A): Ditto.
25590         (UNSPEC_SM3TT1B): Ditto.
25591         (UNSPEC_SM3TT2A): Ditto.
25592         (UNSPEC_SM3TT2B): Ditto.
25593         (UNSPEC_SM3PARTW1): Ditto.
25594         (UNSPEC_SM3PARTW2): Ditto.
25595         (UNSPEC_SM4E): Ditto.
25596         (UNSPEC_SM4EKEY): Ditto.
25597         * config/aarch64/constraints.md (Ui2): New constraint.
25598         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
25599         * config/arm/types.md (crypto_sm3): New type attribute.
25600         (crypto_sm4): Ditto.
25601         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
25602         (vsm3tt1aq_u32): Ditto.
25603         (vsm3tt1bq_u32): Ditto.
25604         (vsm3tt2aq_u32): Ditto.
25605         (vsm3tt2bq_u32): Ditto.
25606         (vsm3partw1q_u32): Ditto.
25607         (vsm3partw2q_u32): Ditto.
25608         (vsm4eq_u32): Ditto.
25609         (vsm4ekeyq_u32): Ditto.
25610         (doc/invoke.texi): Document new sm4 option.
25612 2018-01-10  Michael Collison  <michael.collison@arm.com>
25614         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
25615         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
25616         (AARCH64_FL_FOR_ARCH8_4): New.
25617         (AARCH64_FL_V8_4): New flag.
25618         (doc/invoke.texi): Document new armv8.4-a option.
25620 2018-01-10  Michael Collison  <michael.collison@arm.com>
25622         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25623         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
25624         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
25625         * config/aarch64/aarch64-option-extension.def: Add
25626         AARCH64_OPT_EXTENSION of 'sha2'.
25627         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
25628         (crypto): Disable sha2 and aes if crypto disabled.
25629         (crypto): Enable aes and sha2 if enabled.
25630         (simd): Disable sha2 and aes if simd disabled.
25631         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
25632         New flags.
25633         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
25634         (TARGET_SHA2): New feature flag for sha2.
25635         (TARGET_AES): New feature flag for aes.
25636         * config/aarch64/aarch64-simd.md:
25637         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
25638         conditional on TARGET_AES.
25639         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
25640         (aarch64_crypto_sha1hsi): Make pattern conditional
25641         on TARGET_SHA2.
25642         (aarch64_crypto_sha1hv4si): Ditto.
25643         (aarch64_be_crypto_sha1hv4si): Ditto.
25644         (aarch64_crypto_sha1su1v4si): Ditto.
25645         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
25646         (aarch64_crypto_sha1su0v4si): Ditto.
25647         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
25648         (aarch64_crypto_sha256su0v4si): Ditto.
25649         (aarch64_crypto_sha256su1v4si): Ditto.
25650         (doc/invoke.texi): Document new aes and sha2 options.
25652 2018-01-10  Martin Sebor  <msebor@redhat.com>
25654         PR tree-optimization/83781
25655         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
25656         as string arrays.
25658 2018-01-11  Martin Sebor  <msebor@gmail.com>
25659             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
25661         PR tree-optimization/83501
25662         PR tree-optimization/81703
25664         * tree-ssa-strlen.c (get_string_cst): Rename...
25665         (get_string_len): ...to this.  Handle global constants.
25666         (handle_char_store): Adjust.
25668 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
25669             Jim Wilson  <jimw@sifive.com>
25671         * config/riscv/riscv-protos.h (riscv_output_return): New.
25672         * config/riscv/riscv.c (struct machine_function): New naked_p field.
25673         (riscv_attribute_table, riscv_output_return),
25674         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
25675         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
25676         (riscv_compute_frame_info): Only compute frame->mask if not a naked
25677         function.
25678         (riscv_expand_prologue): Add early return for naked function.
25679         (riscv_expand_epilogue): Likewise.
25680         (riscv_function_ok_for_sibcall): Return false for naked function.
25681         (riscv_set_current_function): New.
25682         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
25683         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
25684         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
25685         * doc/extend.texi (RISC-V Function Attributes): New.
25687 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
25689         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
25690         check for 128-bit long double before checking TCmode.
25691         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
25692         128-bit long doubles before checking TFmode or TCmode.
25693         (FLOAT128_IBM_P): Likewise.
25695 2018-01-10  Martin Sebor  <msebor@redhat.com>
25697         PR tree-optimization/83671
25698         * builtins.c (c_strlen): Unconditionally return zero for the empty
25699         string.
25700         Use -Warray-bounds for warnings.
25701         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
25702         for non-constant array indices with COMPONENT_REF, arrays of
25703         arrays, and pointers to arrays.
25704         (gimple_fold_builtin_strlen): Determine and set length range for
25705         non-constant character arrays.
25707 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
25709         PR middle-end/81897
25710         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
25711         empty blocks.
25713 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
25715         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
25717 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
25719         PR target/83399
25720         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
25721         VECTOR_MEM_ALTIVEC_OR_VSX_P.
25722         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
25723         indexed_or_indirect_operand predicate.
25724         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
25725         (*vsx_le_perm_load_v8hi): Likewise.
25726         (*vsx_le_perm_load_v16qi): Likewise.
25727         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
25728         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
25729         (*vsx_le_perm_store_v8hi): Likewise.
25730         (*vsx_le_perm_store_v16qi): Likewise.
25731         (eight unnamed splitters): Likewise.
25733 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
25735         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
25736         * config/rs6000/emmintrin.h: Likewise.
25737         * config/rs6000/mmintrin.h: Likewise.
25738         * config/rs6000/xmmintrin.h: Likewise.
25740 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
25742         PR c++/43486
25743         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
25744         "public_flag".
25745         * tree.c (tree_nop_conversion): Return true for location wrapper
25746         nodes.
25747         (maybe_wrap_with_location): New function.
25748         (selftest::check_strip_nops): New function.
25749         (selftest::test_location_wrappers): New function.
25750         (selftest::tree_c_tests): Call it.
25751         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
25752         (maybe_wrap_with_location): New decl.
25753         (EXPR_LOCATION_WRAPPER_P): New macro.
25754         (location_wrapper_p): New inline function.
25755         (tree_strip_any_location_wrapper): New inline function.
25757 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
25759         PR target/83735
25760         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
25761         stack_realign_offset for the largest alignment of stack slot
25762         actually used.
25763         (ix86_find_max_used_stack_alignment): New function.
25764         (ix86_finalize_stack_frame_flags): Use it.  Set
25765         max_used_stack_alignment if we don't realign stack.
25766         * config/i386/i386.h (machine_function): Add
25767         max_used_stack_alignment.
25769 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
25771         * config/arm/arm.opt (-mbranch-cost): New option.
25772         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
25773         account.
25775 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
25777         PR target/83629
25778         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
25779         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
25781 2018-01-10  Richard Biener  <rguenther@suse.de>
25783         PR debug/83765
25784         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
25785         early out so it also covers the case where we have a non-NULL
25786         origin.
25788 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
25790         PR tree-optimization/83753
25791         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
25792         for non-strided grouped accesses if the number of elements is 1.
25794 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
25796         PR target/81616
25797         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
25798         * i386.h (TARGET_USE_GATHER): Define.
25799         * x86-tune.def (X86_TUNE_USE_GATHER): New.
25801 2018-01-10  Martin Liska  <mliska@suse.cz>
25803         PR bootstrap/82831
25804         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
25805         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
25806         partitioning.
25807         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
25808         CLEANUP_NO_PARTITIONING is not set.
25810 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
25812         * doc/rtl.texi: Remove documentation of (const ...) wrappers
25813         for vectors, as a partial revert of r254296.
25814         * rtl.h (const_vec_p): Delete.
25815         (const_vec_duplicate_p): Don't test for vector CONSTs.
25816         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
25817         * expmed.c (make_tree): Likewise.
25819         Revert:
25820         * common.md (E, F): Use CONSTANT_P instead of checking for
25821         CONST_VECTOR.
25822         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
25823         checking for CONST_VECTOR.
25825 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
25827         PR middle-end/83575
25828         * predict.c (force_edge_cold): Handle in more sane way edges
25829         with no prediction.
25831 2018-01-09  Carl Love  <cel@us.ibm.com>
25833         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
25834         V4SI, V4SF types.
25835         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
25836         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
25837         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
25838         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
25839         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
25840         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
25841         * config/rs6000/rs6000-protos.h: Add extern defition for
25842         rs6000_generate_float2_double_code.
25843         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
25844         function.
25845         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
25846         (float2_v2df): Add define_expand.
25848 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
25850         PR target/83628
25851         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
25852         op_mode in the force_to_mode call.
25854 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
25856         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
25857         instead of checking each element individually.
25858         (aarch64_evpc_uzp): Likewise.
25859         (aarch64_evpc_zip): Likewise.
25860         (aarch64_evpc_ext): Likewise.
25861         (aarch64_evpc_rev): Likewise.
25862         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
25863         instead of checking each element individually.  Return true without
25864         generating rtl if
25865         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
25866         whether all selected elements come from the same input, instead of
25867         checking each element individually.  Remove calls to gen_rtx_REG,
25868         start_sequence and end_sequence and instead assert that no rtl is
25869         generated.
25871 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
25873         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
25874         order of HIGH and CONST checks.
25876 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
25878         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
25879         if the destination isn't an SSA_NAME.
25881 2018-01-09  Richard Biener  <rguenther@suse.de>
25883         PR tree-optimization/83668
25884         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
25885         move prologue...
25886         (canonicalize_loop_form): ... here, renamed from ...
25887         (canonicalize_loop_closed_ssa_form): ... this and amended to
25888         swap successor edges for loop exit blocks to make us use
25889         the RPO order we need for initial schedule generation.
25891 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
25893         PR tree-optimization/64811
25894         * match.pd: When optimizing comparisons with Inf, avoid
25895         introducing or losing exceptions from comparisons with NaN.
25897 2018-01-09  Martin Liska  <mliska@suse.cz>
25899         PR sanitizer/82517
25900         * asan.c (shadow_mem_size): Add gcc_assert.
25902 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
25904         Don't save registers in main().
25906         PR target/83738
25907         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
25908         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
25909         * config/avr/avr.c (avr_set_current_function): Don't error if
25910         naked, OS_task or OS_main are specified at the same time.
25911         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
25912         OS_main.
25913         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
25914         attribute.
25915         * common/config/avr/avr-common.c (avr_option_optimization_table):
25916         Switch on -mmain-is-OS_task for optimizing compilations.
25918 2018-01-09  Richard Biener  <rguenther@suse.de>
25920         PR tree-optimization/83572
25921         * graphite.c: Include cfganal.h.
25922         (graphite_transform_loops): Connect infinite loops to exit
25923         and remove fake edges at the end.
25925 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
25927         * ipa-inline.c (edge_badness): Revert accidental checkin.
25929 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
25931         PR ipa/80763
25932         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
25933         symbols; not inline clones.
25935 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
25937         PR target/83507
25938         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
25939         hard registers.  Formatting fixes.
25941         PR preprocessor/83722
25942         * gcc.c (try_generate_repro): Pass
25943         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
25944         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
25945         do_report_bug.
25947 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
25948             Kito Cheng  <kito.cheng@gmail.com>
25950         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
25951         (riscv_leaf_function_p): Delete.
25952         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
25954 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25956         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
25957         function.
25958         (do_ifelse): New function.
25959         (do_isel): New function.
25960         (do_sub3): New function.
25961         (do_add3): New function.
25962         (do_load_mask_compare): New function.
25963         (do_overlap_load_compare): New function.
25964         (expand_compare_loop): New function.
25965         (expand_block_compare): Call expand_compare_loop() when appropriate.
25966         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
25967         option description.
25968         (-mblock-compare-inline-loop-limit): New option.
25970 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25972         PR target/83677
25973         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
25974         Reverse order of second and third operands in first alternative.
25975         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
25976         of first and second elements in UNSPEC_VPERMR vector.
25977         (altivec_expand_vec_perm_le): Likewise.
25979 2018-01-08  Jeff Law  <law@redhat.com>
25981         PR rtl-optimizatin/81308
25982         * tree-switch-conversion.c (cfg_altered): New file scoped static.
25983         (process_switch): If group_case_labels makes a change, then set
25984         cfg_altered.
25985         (pass_convert_switch::execute): If a switch is converted, then
25986         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
25988         PR rtl-optimization/81308
25989         * recog.c (split_all_insns): Conditionally cleanup the CFG after
25990         splitting insns.
25992 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
25994         PR target/83663 - Revert r255946
25995         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
25996         generation for cases where splatting a value is not useful.
25997         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
25998         across a vec_duplicate and a paradoxical subreg forming a vector
25999         mode to a vec_concat.
26001 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26003         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
26004         -march=armv8.3-a variants.
26005         * config/arm/t-multilib: Likewise.
26006         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
26008 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26010         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
26011         to generate rtl.
26012         (cceq_ior_compare_complement): Give it a name so I can use it, and
26013         change boolean_or_operator predicate to boolean_operator so it can
26014         be used to generate a crand.
26015         (eqne): New code iterator.
26016         (bd/bd_neg): New code_attrs.
26017         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
26018         a single define_insn.
26019         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
26020         decrement (bdnzt/bdnzf/bdzt/bdzf).
26021         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
26022         with the new names of the branch decrement patterns, and added the
26023         names of the branch decrement conditional patterns.
26025 2018-01-08  Richard Biener  <rguenther@suse.de>
26027         PR tree-optimization/83563
26028         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
26029         cache.
26031 2018-01-08  Richard Biener  <rguenther@suse.de>
26033         PR middle-end/83713
26034         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
26036 2018-01-08  Richard Biener  <rguenther@suse.de>
26038         PR tree-optimization/83685
26039         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
26040         references to abnormals.
26042 2018-01-08  Richard Biener  <rguenther@suse.de>
26044         PR lto/83719
26045         * dwarf2out.c (output_indirect_strings): Handle empty
26046         skeleton_debug_str_hash.
26047         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
26049 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
26051         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
26052         (emit_store_direct): Likewise.
26053         (arc_trampoline_adjust_address): Likewise.
26054         (arc_asm_trampoline_template): New function.
26055         (arc_initialize_trampoline): Use asm_trampoline_template.
26056         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
26057         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
26058         * config/arc/arc.md (flush_icache): Delete pattern.
26060 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
26062         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
26063         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
26064         munaligned-access.
26066 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26068         PR target/83681
26069         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
26070         by not USED_FOR_TARGET.
26071         (make_pass_resolve_sw_modes): Likewise.
26073 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26075         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
26076         USED_FOR_TARGET.
26078 2018-01-08  Richard Biener  <rguenther@suse.de>
26080         PR middle-end/83580
26081         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
26083 2018-01-08  Richard Biener  <rguenther@suse.de>
26085         PR middle-end/83517
26086         * match.pd ((t * 2) / 2) -> t): Add missing :c.
26088 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
26090         PR middle-end/81897
26091         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
26092         basic blocks with a small number of successors.
26093         (convert_control_dep_chain_into_preds): Improve handling of
26094         forwarder blocks.
26095         (dump_predicates): Split apart into...
26096         (dump_pred_chain): ...here...
26097         (dump_pred_info): ...and here.
26098         (can_one_predicate_be_invalidated_p): Add debugging printfs.
26099         (can_chain_union_be_invalidated_p): Improve check for invalidation
26100         of paths.
26101         (uninit_uses_cannot_happen): Avoid unnecessary if
26102         convert_control_dep_chain_into_preds yielded nothing.
26104 2018-01-06  Martin Sebor  <msebor@redhat.com>
26106         PR tree-optimization/83640
26107         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
26108         subtracting negative offset from size.
26109         (builtin_access::overlap): Adjust offset bounds of the access to fall
26110         within the size of the object if possible.
26112 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
26114         PR rtl-optimization/83699
26115         * expmed.c (extract_bit_field_1): Restrict the vector usage of
26116         extract_bit_field_as_subreg to cases in which the extracted
26117         value is also a vector.
26119         * lra-constraints.c (process_alt_operands): Test for the equivalence
26120         substitutions when detecting a possible reload cycle.
26122 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
26124         PR debug/83480
26125         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
26126         by default if flag_selective_schedling{,2}.  Formatting fixes.
26128         PR rtl-optimization/83682
26129         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
26130         if it has non-VECTOR_MODE element mode.
26131         (vec_duplicate_p): Likewise.
26133         PR middle-end/83694
26134         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
26135         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
26137 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
26139         PR target/83604
26140         * config/i386/i386-builtin.def
26141         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
26142         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
26143         Require also OPTION_MASK_ISA_AVX512F in addition to
26144         OPTION_MASK_ISA_GFNI.
26145         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
26146         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
26147         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
26148         to OPTION_MASK_ISA_GFNI.
26149         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
26150         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
26151         OPTION_MASK_ISA_AVX512BW.
26152         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
26153         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
26154         addition to OPTION_MASK_ISA_GFNI.
26155         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
26156         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
26157         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
26158         to OPTION_MASK_ISA_GFNI.
26159         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
26160         a requirement for all ISAs rather than any of them with a few
26161         exceptions.
26162         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
26163         processing.
26164         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
26165         bitmasks to be enabled with 3 exceptions, instead of requiring any
26166         enabled ISA with lots of exceptions.
26167         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
26168         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
26169         Change avx512bw in isa attribute to avx512f.
26170         * config/i386/sgxintrin.h: Add license boilerplate.
26171         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
26172         to __AVX512F__ and __AVX512VL to __AVX512VL__.
26173         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
26174         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
26175         defined.
26176         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
26177         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
26178         temporarily sse2 rather than sse if not enabled already.
26180         PR target/83604
26181         * config/i386/sse.md (VI248_VLBW): Rename to ...
26182         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
26183         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
26184         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
26185         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
26186         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
26187         mode iterator instead of VI248_VLBW.
26189 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
26191         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
26192         (record_modified): Skip clobbers; add debug output.
26193         (param_change_prob): Use sreal frequencies.
26195 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
26197         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
26198         punt for user-aligned variables.
26200 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
26202         * tree-chrec.c (chrec_contains_symbols): Return true for
26203         POLY_INT_CST.
26205 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
26207         PR target/82439
26208         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
26209         of (x|y) == x for BICS pattern.
26211 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
26213         PR tree-optimization/83605
26214         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
26215         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
26216         can throw.
26218 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26220         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
26221         * config/epiphany/rtems.h: New file.
26223 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26224             Uros Bizjak  <ubizjak@gmail.com>
26226         PR target/83554
26227         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
26228         QIreg_operand instead of register_operand predicate.
26229         * config/i386/i386.c (ix86_rop_should_change_byte_p,
26230         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
26231         comments instead of -fmitigate[-_]rop.
26233 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26235         PR bootstrap/81926
26236         * cgraphunit.c (symbol_table::compile): Switch to text_section
26237         before calling assembly_start debug hook.
26238         * run-rtl-passes.c (run_rtl_passes): Likewise.
26239         Include output.h.
26241 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26243         * tree-vrp.c (extract_range_from_binary_expr_1): Check
26244         range_int_cst_p rather than !symbolic_range_p before calling
26245         extract_range_from_multiplicative_op_1.
26247 2018-01-04  Jeff Law  <law@redhat.com>
26249         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
26250         redundant test in assertion.
26252 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26254         * doc/rtl.texi: Document machine_mode wrapper classes.
26256 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26258         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
26259         using tree_to_uhwi.
26261 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26263         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
26264         the VEC_PERM_EXPR fold to fail.
26266 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26268         PR debug/83585
26269         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
26270         to switched_sections.
26272 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26274         PR target/83680
26275         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
26276         test for d.testing.
26278 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
26280         PR target/83387
26281         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
26282         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
26284 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26286         PR debug/83666
26287         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
26288         is BLKmode and bitpos not zero or mode change is needed.
26290 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26292         PR target/83675
26293         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
26294         TARGET_VIS2.
26296 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
26298         PR target/83628
26299         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
26300         instead of MULT rtx.  Update all corresponding splitters.
26301         (*saddl_se): Ditto.
26302         (*ssub<modesuffix>): Ditto.
26303         (*ssubl_se): Ditto.
26304         (*cmp_sadd_di): Update split patterns.
26305         (*cmp_sadd_si): Ditto.
26306         (*cmp_sadd_sidi): Ditto.
26307         (*cmp_ssub_di): Ditto.
26308         (*cmp_ssub_si): Ditto.
26309         (*cmp_ssub_sidi): Ditto.
26310         * config/alpha/predicates.md (const23_operand): New predicate.
26311         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
26312         Look for ASHIFT, not MULT inner operand.
26313         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
26315 2018-01-04  Martin Liska  <mliska@suse.cz>
26317         PR gcov-profile/83669
26318         * gcov.c (output_intermediate_file): Add version to intermediate
26319         gcov file.
26320         * doc/gcov.texi: Document new field 'version' in intermediate
26321         file format. Fix location of '-k' option of gcov command.
26323 2018-01-04  Martin Liska  <mliska@suse.cz>
26325         PR ipa/82352
26326         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
26328 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26330         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
26332 2018-01-03  Martin Sebor  <msebor@redhat.com>
26334         PR tree-optimization/83655
26335         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
26336         checking calls with invalid arguments.
26338 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26340         * tree-vect-stmts.c (vect_get_store_rhs): New function.
26341         (vectorizable_mask_load_store): Delete.
26342         (vectorizable_call): Return false for masked loads and stores.
26343         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
26344         instead of gimple_assign_rhs1.
26345         (vectorizable_load): Handle IFN_MASK_LOAD.
26346         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
26348 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26350         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
26351         split out from..,
26352         (vectorizable_mask_load_store): ...here.
26353         (vectorizable_load): ...and here.
26355 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26357         * tree-vect-stmts.c (vect_build_all_ones_mask)
26358         (vect_build_zero_merge_argument): New functions, split out from...
26359         (vectorizable_load): ...here.
26361 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26363         * tree-vect-stmts.c (vect_check_store_rhs): New function,
26364         split out from...
26365         (vectorizable_mask_load_store): ...here.
26366         (vectorizable_store): ...and here.
26368 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26370         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
26371         split out from...
26372         (vectorizable_mask_load_store): ...here.
26374 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26376         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
26377         (vect_model_store_cost): Take a vec_load_store_type instead of a
26378         vect_def_type.
26379         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
26380         (vect_model_store_cost): Take a vec_load_store_type instead of a
26381         vect_def_type.
26382         (vectorizable_mask_load_store): Update accordingly.
26383         (vectorizable_store): Likewise.
26384         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
26386 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26388         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
26389         IFN_MASK_LOAD calls here rather than...
26390         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
26392 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26393             Alan Hayward  <alan.hayward@arm.com>
26394             David Sherwood  <david.sherwood@arm.com>
26396         * expmed.c (extract_bit_field_1): For vector extracts,
26397         fall back to extract_bit_field_as_subreg if vec_extract
26398         isn't available.
26400 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26401             Alan Hayward  <alan.hayward@arm.com>
26402             David Sherwood  <david.sherwood@arm.com>
26404         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
26405         they are variable or constant sized.
26406         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
26407         slots for constant-sized data.
26409 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26410             Alan Hayward  <alan.hayward@arm.com>
26411             David Sherwood  <david.sherwood@arm.com>
26413         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
26414         handling COND_EXPRs with boolean comparisons, try to find a better
26415         basis for the mask type than the boolean itself.
26417 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26419         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
26420         is calculated and how it can be overridden.
26421         * genmodes.c (max_bitsize_mode_any_mode): New variable.
26422         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
26423         if defined.
26424         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
26425         if nonzero.
26427 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26428             Alan Hayward  <alan.hayward@arm.com>
26429             David Sherwood  <david.sherwood@arm.com>
26431         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
26432         Remove the mode argument.
26433         (aarch64_simd_valid_immediate): Remove the mode and inverse
26434         arguments.
26435         * config/aarch64/iterators.md (bitsize): New iterator.
26436         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
26437         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
26438         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
26439         aarch64_simd_valid_immediate.
26440         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
26441         (aarch64_reg_or_bic_imm): Likewise.
26442         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
26443         with an insn_type enum and msl with a modifier_type enum.
26444         Replace element_width with a scalar_mode.  Change the shift
26445         to unsigned int.  Add constructors for scalar_float_mode and
26446         scalar_int_mode elements.
26447         (aarch64_vect_float_const_representable_p): Delete.
26448         (aarch64_can_const_movi_rtx_p)
26449         (aarch64_simd_scalar_immediate_valid_for_move)
26450         (aarch64_simd_make_constant): Update call to
26451         aarch64_simd_valid_immediate.
26452         (aarch64_advsimd_valid_immediate_hs): New function.
26453         (aarch64_advsimd_valid_immediate): Likewise.
26454         (aarch64_simd_valid_immediate): Remove mode and inverse
26455         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
26456         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
26457         and aarch64_float_const_representable_p on the result.
26458         (aarch64_output_simd_mov_immediate): Remove mode argument.
26459         Update call to aarch64_simd_valid_immediate and use of
26460         simd_immediate_info.
26461         (aarch64_output_scalar_simd_mov_immediate): Update call
26462         accordingly.
26464 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26465             Alan Hayward  <alan.hayward@arm.com>
26466             David Sherwood  <david.sherwood@arm.com>
26468         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
26469         (mode_nunits): Likewise CONST_MODE_NUNITS.
26470         * machmode.def (ADJUST_NUNITS): Document.
26471         * genmodes.c (mode_data::need_nunits_adj): New field.
26472         (blank_mode): Update accordingly.
26473         (adj_nunits): New variable.
26474         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
26475         parameter.
26476         (emit_mode_size_inline): Set need_bytesize_adj for all modes
26477         listed in adj_nunits.
26478         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
26479         listed in adj_nunits.  Don't emit case statements for such modes.
26480         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
26481         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
26482         nothing if adj_nunits is nonnull.
26483         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
26484         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
26485         (emit_mode_fbit): Update use of print_maybe_const_decl.
26486         (emit_move_size): Likewise.  Treat the array as non-const
26487         if adj_nunits.
26488         (emit_mode_adjustments): Handle adj_nunits.
26490 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26492         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
26493         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
26494         (VECTOR_MODES): Use it.
26495         (make_vector_modes): Take the prefix as an argument.
26497 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26498             Alan Hayward  <alan.hayward@arm.com>
26499             David Sherwood  <david.sherwood@arm.com>
26501         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
26502         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
26503         for MODE_VECTOR_BOOL.
26504         * machmode.def (VECTOR_BOOL_MODE): Document.
26505         * genmodes.c (VECTOR_BOOL_MODE): New macro.
26506         (make_vector_bool_mode): New function.
26507         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
26508         MODE_VECTOR_BOOL.
26509         * lto-streamer-in.c (lto_input_mode_table): Likewise.
26510         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
26511         Likewise.
26512         * stor-layout.c (int_mode_for_mode): Likewise.
26513         * tree.c (build_vector_type_for_mode): Likewise.
26514         * varasm.c (output_constant_pool_2): Likewise.
26515         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
26516         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
26517         for MODE_VECTOR_BOOL.
26518         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
26519         of mode class checks.
26520         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
26521         instead of a list of mode class checks.
26522         (expand_vector_scalar_condition): Likewise.
26523         (type_for_widest_vector_mode): Handle BImode as an inner mode.
26525 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26526             Alan Hayward  <alan.hayward@arm.com>
26527             David Sherwood  <david.sherwood@arm.com>
26529         * machmode.h (mode_size): Change from unsigned short to
26530         poly_uint16_pod.
26531         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
26532         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26533         or if measurement_type is not polynomial.
26534         (fixed_size_mode::includes_p): Check for constant-sized modes.
26535         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
26536         return a poly_uint16 rather than an unsigned short.
26537         (emit_mode_size): Change the type of mode_size from unsigned short
26538         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
26539         (emit_mode_adjustments): Cope with polynomial vector sizes.
26540         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26541         for GET_MODE_SIZE.
26542         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26543         for GET_MODE_SIZE.
26544         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
26545         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
26546         * caller-save.c (setup_save_areas): Likewise.
26547         (replace_reg_with_saved_mem): Likewise.
26548         * calls.c (emit_library_call_value_1): Likewise.
26549         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
26550         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
26551         (gen_lowpart_for_combine): Likewise.
26552         * convert.c (convert_to_integer_1): Likewise.
26553         * cse.c (equiv_constant, cse_insn): Likewise.
26554         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
26555         (cselib_subst_to_values): Likewise.
26556         * dce.c (word_dce_process_block): Likewise.
26557         * df-problems.c (df_word_lr_mark_ref): Likewise.
26558         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
26559         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
26560         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
26561         (rtl_for_decl_location): Likewise.
26562         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
26563         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
26564         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
26565         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
26566         (expand_expr_real_1): Likewise.
26567         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
26568         (pad_below): Likewise.
26569         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26570         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
26571         * ira.c (get_subreg_tracking_sizes): Likewise.
26572         * ira-build.c (ira_create_allocno_objects): Likewise.
26573         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
26574         (ira_sort_regnos_for_alter_reg): Likewise.
26575         * ira-costs.c (record_operand_costs): Likewise.
26576         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
26577         (resolve_simple_move): Likewise.
26578         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
26579         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
26580         (lra_constraints): Likewise.
26581         (CONST_POOL_OK_P): Reject variable-sized modes.
26582         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
26583         (add_pseudo_to_slot, lra_spill): Likewise.
26584         * omp-low.c (omp_clause_aligned_alignment): Likewise.
26585         * optabs-query.c (get_best_extraction_insn): Likewise.
26586         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26587         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
26588         (expand_mult_highpart, valid_multiword_target_p): Likewise.
26589         * recog.c (offsettable_address_addr_space_p): Likewise.
26590         * regcprop.c (maybe_mode_change): Likewise.
26591         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
26592         * regrename.c (build_def_use): Likewise.
26593         * regstat.c (dump_reg_info): Likewise.
26594         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
26595         (find_reloads, find_reloads_subreg_address): Likewise.
26596         * reload1.c (eliminate_regs_1): Likewise.
26597         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
26598         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
26599         (simplify_binary_operation_1, simplify_subreg): Likewise.
26600         * targhooks.c (default_function_arg_padding): Likewise.
26601         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
26602         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
26603         (verify_gimple_assign_ternary): Likewise.
26604         * tree-inline.c (estimate_move_cost): Likewise.
26605         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26606         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
26607         (get_address_cost_ainc): Likewise.
26608         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
26609         (vect_supportable_dr_alignment): Likewise.
26610         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26611         (vectorizable_reduction): Likewise.
26612         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
26613         (vectorizable_operation, vectorizable_load): Likewise.
26614         * tree.c (build_same_sized_truth_vector_type): Likewise.
26615         * valtrack.c (cleanup_auto_inc_dec): Likewise.
26616         * var-tracking.c (emit_note_insn_var_location): Likewise.
26617         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
26618         (ADDR_VEC_ALIGN): Likewise.
26620 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26621             Alan Hayward  <alan.hayward@arm.com>
26622             David Sherwood  <david.sherwood@arm.com>
26624         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
26625         unsigned short.
26626         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26627         or if measurement_type is polynomial.
26628         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
26629         * combine.c (make_extraction): Likewise.
26630         * dse.c (find_shift_sequence): Likewise.
26631         * dwarf2out.c (mem_loc_descriptor): Likewise.
26632         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
26633         (extract_bit_field, extract_low_bits): Likewise.
26634         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
26635         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
26636         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
26637         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
26638         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26639         * reload.c (find_reloads): Likewise.
26640         * reload1.c (alter_reg): Likewise.
26641         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
26642         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
26643         * tree-if-conv.c (predicate_mem_writes): Likewise.
26644         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
26645         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
26646         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
26647         * valtrack.c (dead_debug_insert_temp): Likewise.
26648         * varasm.c (mergeable_constant_section): Likewise.
26649         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
26651 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26652             Alan Hayward  <alan.hayward@arm.com>
26653             David Sherwood  <david.sherwood@arm.com>
26655         * expr.c (expand_assignment): Cope with polynomial mode sizes
26656         when assigning to a CONCAT.
26658 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26659             Alan Hayward  <alan.hayward@arm.com>
26660             David Sherwood  <david.sherwood@arm.com>
26662         * machmode.h (mode_precision): Change from unsigned short to
26663         poly_uint16_pod.
26664         (mode_to_precision): Return a poly_uint16 rather than an unsigned
26665         short.
26666         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
26667         or if measurement_type is not polynomial.
26668         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
26669         in which the mode is already known to be a scalar_int_mode.
26670         * genmodes.c (emit_mode_precision): Change the type of mode_precision
26671         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
26672         initializer.
26673         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26674         for GET_MODE_PRECISION.
26675         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26676         for GET_MODE_PRECISION.
26677         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
26678         as polynomial.
26679         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
26680         (expand_field_assignment, make_extraction): Likewise.
26681         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
26682         (get_last_value): Likewise.
26683         * convert.c (convert_to_integer_1): Likewise.
26684         * cse.c (cse_insn): Likewise.
26685         * expr.c (expand_expr_real_1): Likewise.
26686         * lra-constraints.c (simplify_operand_subreg): Likewise.
26687         * optabs-query.c (can_atomic_load_p): Likewise.
26688         * optabs.c (expand_atomic_load): Likewise.
26689         (expand_atomic_store): Likewise.
26690         * ree.c (combine_reaching_defs): Likewise.
26691         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
26692         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
26693         * tree.h (type_has_mode_precision_p): Likewise.
26694         * ubsan.c (instrument_si_overflow): Likewise.
26696 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26697             Alan Hayward  <alan.hayward@arm.com>
26698             David Sherwood  <david.sherwood@arm.com>
26700         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
26701         polynomial numbers of units.
26702         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
26703         (valid_vector_subparts_p): New function.
26704         (build_vector_type): Remove temporary shim and take the number
26705         of units as a poly_uint64 rather than an int.
26706         (build_opaque_vector_type): Take the number of units as a
26707         poly_uint64 rather than an int.
26708         * tree.c (build_vector_from_ctor): Handle polynomial
26709         TYPE_VECTOR_SUBPARTS.
26710         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
26711         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
26712         (build_vector_from_val): If the number of units is variable,
26713         use build_vec_duplicate_cst for constant operands and
26714         VEC_DUPLICATE_EXPR otherwise.
26715         (make_vector_type): Remove temporary is_constant ().
26716         (build_vector_type, build_opaque_vector_type): Take the number of
26717         units as a poly_uint64 rather than an int.
26718         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
26719         VECTOR_CST_NELTS.
26720         * cfgexpand.c (expand_debug_expr): Likewise.
26721         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
26722         (store_constructor, expand_expr_real_1): Likewise.
26723         (const_scalar_mask_from_tree): Likewise.
26724         * fold-const-call.c (fold_const_reduction): Likewise.
26725         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
26726         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
26727         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
26728         (fold_relational_const): Likewise.
26729         (native_interpret_vector): Likewise.  Change the size from an
26730         int to an unsigned int.
26731         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
26732         TYPE_VECTOR_SUBPARTS.
26733         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
26734         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
26735         duplicating a non-constant operand into a variable-length vector.
26736         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
26737         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
26738         * ipa-icf.c (sem_variable::equals): Likewise.
26739         * match.pd: Likewise.
26740         * omp-simd-clone.c (simd_clone_subparts): Likewise.
26741         * print-tree.c (print_node): Likewise.
26742         * stor-layout.c (layout_type): Likewise.
26743         * targhooks.c (default_builtin_vectorization_cost): Likewise.
26744         * tree-cfg.c (verify_gimple_comparison): Likewise.
26745         (verify_gimple_assign_binary): Likewise.
26746         (verify_gimple_assign_ternary): Likewise.
26747         (verify_gimple_assign_single): Likewise.
26748         * tree-pretty-print.c (dump_generic_node): Likewise.
26749         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26750         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
26751         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
26752         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
26753         (vect_shift_permute_load_chain): Likewise.
26754         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
26755         (expand_vector_condition, optimize_vector_constructor): Likewise.
26756         (lower_vec_perm, get_compute_type): Likewise.
26757         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26758         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
26759         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
26760         (vect_recog_mask_conversion_pattern): Likewise.
26761         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
26762         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
26763         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26764         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
26765         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
26766         (vectorizable_shift, vectorizable_operation, vectorizable_store)
26767         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
26768         (supportable_widening_operation): Likewise.
26769         (supportable_narrowing_operation): Likewise.
26770         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
26771         Likewise.
26772         * varasm.c (output_constant): Likewise.
26774 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26775             Alan Hayward  <alan.hayward@arm.com>
26776             David Sherwood  <david.sherwood@arm.com>
26778         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
26779         so that both the length == 3 and length != 3 cases set up their
26780         own permute vectors.  Add comments explaining why we know the
26781         number of elements is constant.
26782         (vect_permute_load_chain): Likewise.
26784 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26785             Alan Hayward  <alan.hayward@arm.com>
26786             David Sherwood  <david.sherwood@arm.com>
26788         * machmode.h (mode_nunits): Change from unsigned char to
26789         poly_uint16_pod.
26790         (ONLY_FIXED_SIZE_MODES): New macro.
26791         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
26792         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
26793         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
26794         New typedefs.
26795         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
26796         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
26797         or if measurement_type is not polynomial.
26798         * genmodes.c (ZERO_COEFFS): New macro.
26799         (emit_mode_nunits_inline): Make mode_nunits_inline return a
26800         poly_uint16.
26801         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
26802         Use ZERO_COEFFS when emitting initializers.
26803         * data-streamer.h (bp_pack_poly_value): New function.
26804         (bp_unpack_poly_value): Likewise.
26805         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26806         for GET_MODE_NUNITS.
26807         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26808         for GET_MODE_NUNITS.
26809         * tree.c (make_vector_type): Remove temporary shim and make
26810         the real function take the number of units as a poly_uint64
26811         rather than an int.
26812         (build_vector_type_for_mode): Handle polynomial nunits.
26813         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
26814         * emit-rtl.c (const_vec_series_p_1): Likewise.
26815         (gen_rtx_CONST_VECTOR): Likewise.
26816         * fold-const.c (test_vec_duplicate_folding): Likewise.
26817         * genrecog.c (validate_pattern): Likewise.
26818         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
26819         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26820         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
26821         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
26822         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
26823         * rtlanal.c (subreg_get_info): Likewise.
26824         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26825         (vect_grouped_load_supported): Likewise.
26826         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
26827         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
26828         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
26829         (simplify_const_unary_operation, simplify_binary_operation_1)
26830         (simplify_const_binary_operation, simplify_ternary_operation)
26831         (test_vector_ops_duplicate, test_vector_ops): Likewise.
26832         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
26833         instead of CONST_VECTOR_NUNITS.
26834         * varasm.c (output_constant_pool_2): Likewise.
26835         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
26836         explicit-encoded elements in the XVEC for variable-length vectors.
26838 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26840         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
26842 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26843             Alan Hayward  <alan.hayward@arm.com>
26844             David Sherwood  <david.sherwood@arm.com>
26846         * coretypes.h (fixed_size_mode): Declare.
26847         (fixed_size_mode_pod): New typedef.
26848         * builtins.h (target_builtins::x_apply_args_mode)
26849         (target_builtins::x_apply_result_mode): Change type to
26850         fixed_size_mode_pod.
26851         * builtins.c (apply_args_size, apply_result_size, result_vector)
26852         (expand_builtin_apply_args_1, expand_builtin_apply)
26853         (expand_builtin_return): Update accordingly.
26855 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26857         * cse.c (hash_rtx_cb): Hash only the encoded elements.
26858         * cselib.c (cselib_hash_rtx): Likewise.
26859         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
26860         CONST_VECTOR encoding.
26862 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26863             Jeff Law  <law@redhat.com>
26865         PR target/83641
26866         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
26867         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
26868         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
26869         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
26871         PR target/83641
26872         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
26873         explicitly probe *sp in a noreturn function if there were any callee
26874         register saves or frame pointer is needed.
26876 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26878         PR debug/83621
26879         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
26880         BLKmode for ternary, binary or unary expressions.
26882         PR debug/83645
26883         * var-tracking.c (delete_vta_debug_insn): New inline function.
26884         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
26885         insns from get_insns () to NULL instead of each bb separately.
26886         Use delete_vta_debug_insn.  No longer static.
26887         (vt_debug_insns_local, variable_tracking_main_1): Adjust
26888         delete_vta_debug_insns callers.
26889         * rtl.h (delete_vta_debug_insns): Declare.
26890         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
26891         instead of variable_tracking_main.
26893 2018-01-03  Martin Sebor  <msebor@redhat.com>
26895         PR tree-optimization/83603
26896         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
26897         arguments past the endof the argument list in functions declared
26898         without a prototype.
26899         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
26900         Avoid checking when arguments are null.
26902 2018-01-03  Martin Sebor  <msebor@redhat.com>
26904         PR c/83559
26905         * doc/extend.texi (attribute const): Fix a typo.
26906         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
26907         issuing -Wsuggest-attribute for void functions.
26909 2018-01-03  Martin Sebor  <msebor@redhat.com>
26911         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
26912         offset_int::from instead of wide_int::to_shwi.
26913         (maybe_diag_overlap): Remove assertion.
26914         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
26915         * gimple-ssa-sprintf.c (format_directive): Same.
26916         (parse_directive): Same.
26917         (sprintf_dom_walker::compute_format_length): Same.
26918         (try_substitute_return_value): Same.
26920 2018-01-03  Jeff Law  <law@redhat.com>
26922         PR middle-end/83654
26923         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
26924         non-constant residual for zero at runtime and avoid probing in
26925         that case.  Reorganize code for trailing problem to mirror handling
26926         of the residual.
26928 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26930         PR tree-optimization/83501
26931         * tree-ssa-strlen.c (get_string_cst): New.
26932         (handle_char_store): Call get_string_cst.
26934 2018-01-03  Martin Liska  <mliska@suse.cz>
26936         PR tree-optimization/83593
26937         * tree-ssa-strlen.c: Include tree-cfg.h.
26938         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
26939         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
26940         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
26941         to false.
26942         (strlen_dom_walker::before_dom_children): Call
26943         gimple_purge_dead_eh_edges. Dump tranformation with details
26944         dump flags.
26945         (strlen_dom_walker::before_dom_children): Update call by adding
26946         new argument cleanup_eh.
26947         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
26949 2018-01-03  Martin Liska  <mliska@suse.cz>
26951         PR ipa/83549
26952         * cif-code.def (VARIADIC_THUNK): New enum value.
26953         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
26954         thunks.
26956 2018-01-03  Jan Beulich  <jbeulich@suse.com>
26958         * sse.md (mov<mode>_internal): Tighten condition for when to use
26959         vmovdqu<ssescalarsize> for TI and OI modes.
26961 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26963         Update copyright years.
26965 2018-01-03  Martin Liska  <mliska@suse.cz>
26967         PR ipa/83594
26968         * ipa-visibility.c (function_and_variable_visibility): Skip
26969         functions with noipa attribure.
26971 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26973         * gcc.c (process_command): Update copyright notice dates.
26974         * gcov-dump.c (print_version): Ditto.
26975         * gcov.c (print_version): Ditto.
26976         * gcov-tool.c (print_version): Ditto.
26977         * gengtype.c (create_file): Ditto.
26978         * doc/cpp.texi: Bump @copying's copyright year.
26979         * doc/cppinternals.texi: Ditto.
26980         * doc/gcc.texi: Ditto.
26981         * doc/gccint.texi: Ditto.
26982         * doc/gcov.texi: Ditto.
26983         * doc/install.texi: Ditto.
26984         * doc/invoke.texi: Ditto.
26986 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26988         * vector-builder.h (vector_builder::m_full_nelts): Change from
26989         unsigned int to poly_uint64.
26990         (vector_builder::full_nelts): Update prototype accordingly.
26991         (vector_builder::new_vector): Likewise.
26992         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
26993         (vector_builder::operator ==): Likewise.
26994         (vector_builder::finalize): Likewise.
26995         * int-vector-builder.h (int_vector_builder::int_vector_builder):
26996         Take the number of elements as a poly_uint64 rather than an
26997         unsigned int.
26998         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
26999         from unsigned int to poly_uint64.
27000         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
27001         (vec_perm_indices::new_vector): Likewise.
27002         (vec_perm_indices::length): Likewise.
27003         (vec_perm_indices::nelts_per_input): Likewise.
27004         (vec_perm_indices::input_nelts): Likewise.
27005         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
27006         number of elements per input as a poly_uint64 rather than an
27007         unsigned int.  Use the original encoding for variable-length
27008         vectors, rather than clamping each individual element.
27009         For the second and subsequent elements in each pattern,
27010         clamp the step and base before clamping their sum.
27011         (vec_perm_indices::series_p): Handle polynomial element counts.
27012         (vec_perm_indices::all_in_range_p): Likewise.
27013         (vec_perm_indices_to_tree): Likewise.
27014         (vec_perm_indices_to_rtx): Likewise.
27015         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
27016         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
27017         (tree_vector_builder::new_binary_operation): Handle polynomial
27018         element counts.  Return false if we need to know the number
27019         of elements at compile time.
27020         * fold-const.c (fold_vec_perm): Punt if the number of elements
27021         isn't known at compile time.
27023 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27025         * vec-perm-indices.h (vec_perm_builder): Change element type
27026         from HOST_WIDE_INT to poly_int64.
27027         (vec_perm_indices::element_type): Update accordingly.
27028         (vec_perm_indices::clamp): Handle polynomial element_types.
27029         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27030         (vec_perm_indices::all_in_range_p): Likewise.
27031         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
27032         than shwi trees.
27033         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
27034         polynomial vec_perm_indices element types.
27035         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
27036         * fold-const.c (fold_vec_perm): Likewise.
27037         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
27038         * tree-vect-generic.c (lower_vec_perm): Likewise.
27039         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27040         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
27041         element type to HOST_WIDE_INT.
27043 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27044             Alan Hayward  <alan.hayward@arm.com>
27045             David Sherwood  <david.sherwood@arm.com>
27047         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
27048         rather than an int.  Use plus_constant.
27049         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
27050         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
27052 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27053             Alan Hayward  <alan.hayward@arm.com>
27054             David Sherwood  <david.sherwood@arm.com>
27056         * calls.c (emit_call_1, expand_call): Change struct_value_size from
27057         a HOST_WIDE_INT to a poly_int64.
27059 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27060             Alan Hayward  <alan.hayward@arm.com>
27061             David Sherwood  <david.sherwood@arm.com>
27063         * calls.c (load_register_parameters): Cope with polynomial
27064         mode sizes.  Require a constant size for BLKmode parameters
27065         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
27066         forces a parameter to be padded at the lsb end in order to
27067         fill a complete number of words, require the parameter size
27068         to be ordered wrt UNITS_PER_WORD.
27070 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27071             Alan Hayward  <alan.hayward@arm.com>
27072             David Sherwood  <david.sherwood@arm.com>
27074         * reload1.c (spill_stack_slot_width): Change element type
27075         from unsigned int to poly_uint64_pod.
27076         (alter_reg): Treat mode sizes as polynomial.
27078 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27079             Alan Hayward  <alan.hayward@arm.com>
27080             David Sherwood  <david.sherwood@arm.com>
27082         * reload.c (complex_word_subreg_p): New function.
27083         (reload_inner_reg_of_subreg, push_reload): Use it.
27085 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27086             Alan Hayward  <alan.hayward@arm.com>
27087             David Sherwood  <david.sherwood@arm.com>
27089         * lra-constraints.c (process_alt_operands): Reject matched
27090         operands whose sizes aren't ordered.
27091         (match_reload): Refer to this check here.
27093 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27094             Alan Hayward  <alan.hayward@arm.com>
27095             David Sherwood  <david.sherwood@arm.com>
27097         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
27098         that the mode size is in the set {1, 2, 4, 8, 16}.
27100 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27101             Alan Hayward  <alan.hayward@arm.com>
27102             David Sherwood  <david.sherwood@arm.com>
27104         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
27105         Use plus_constant instead of gen_rtx_PLUS.
27107 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27108             Alan Hayward  <alan.hayward@arm.com>
27109             David Sherwood  <david.sherwood@arm.com>
27111         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
27112         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
27113         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
27114         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
27115         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
27116         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
27117         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
27118         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
27119         * config/i386/i386.c (ix86_push_rounding): ...this new function.
27120         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
27121         a poly_int64.
27122         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
27123         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
27124         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
27125         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
27126         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
27127         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
27128         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
27129         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
27130         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
27131         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
27132         function.
27133         * expr.c (emit_move_resolve_push): Treat the input and result
27134         of PUSH_ROUNDING as a poly_int64.
27135         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
27136         (emit_push_insn): Likewise.
27137         * lra-eliminations.c (mark_not_eliminable): Likewise.
27138         * recog.c (push_operand): Likewise.
27139         * reload1.c (elimination_effects): Likewise.
27140         * rtlanal.c (nonzero_bits1): Likewise.
27141         * calls.c (store_one_arg): Likewise.  Require the padding to be
27142         known at compile time.
27144 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27145             Alan Hayward  <alan.hayward@arm.com>
27146             David Sherwood  <david.sherwood@arm.com>
27148         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
27149         Use plus_constant instead of gen_rtx_PLUS.
27151 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27152             Alan Hayward  <alan.hayward@arm.com>
27153             David Sherwood  <david.sherwood@arm.com>
27155         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
27156         rather than an int.
27158 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27159             Alan Hayward  <alan.hayward@arm.com>
27160             David Sherwood  <david.sherwood@arm.com>
27162         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
27163         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
27164         via stack temporaries.  Treat the mode size as polynomial too.
27166 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27167             Alan Hayward  <alan.hayward@arm.com>
27168             David Sherwood  <david.sherwood@arm.com>
27170         * expr.c (expand_expr_real_2): When handling conversions involving
27171         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
27172         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
27173         as a poly_uint64 too.
27175 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27176             Alan Hayward  <alan.hayward@arm.com>
27177             David Sherwood  <david.sherwood@arm.com>
27179         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
27181 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27182             Alan Hayward  <alan.hayward@arm.com>
27183             David Sherwood  <david.sherwood@arm.com>
27185         * combine.c (can_change_dest_mode): Handle polynomial
27186         REGMODE_NATURAL_SIZE.
27187         * expmed.c (store_bit_field_1): Likewise.
27188         * expr.c (store_constructor): Likewise.
27189         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
27190         and polynomial REGMODE_NATURAL_SIZE.
27191         (gen_lowpart_common): Likewise.
27192         * reginfo.c (record_subregs_of_mode): Likewise.
27193         * rtlanal.c (read_modify_subreg_p): Likewise.
27195 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27196             Alan Hayward  <alan.hayward@arm.com>
27197             David Sherwood  <david.sherwood@arm.com>
27199         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
27200         numbers of elements.
27202 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27203             Alan Hayward  <alan.hayward@arm.com>
27204             David Sherwood  <david.sherwood@arm.com>
27206         * match.pd: Cope with polynomial numbers of vector elements.
27208 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27209             Alan Hayward  <alan.hayward@arm.com>
27210             David Sherwood  <david.sherwood@arm.com>
27212         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
27213         in a POINTER_PLUS_EXPR.
27215 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27216             Alan Hayward  <alan.hayward@arm.com>
27217             David Sherwood  <david.sherwood@arm.com>
27219         * omp-simd-clone.c (simd_clone_subparts): New function.
27220         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
27221         (ipa_simd_modify_function_body): Likewise.
27223 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27224             Alan Hayward  <alan.hayward@arm.com>
27225             David Sherwood  <david.sherwood@arm.com>
27227         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
27228         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
27229         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
27230         (expand_vector_condition, vector_element): Likewise.
27231         (subparts_gt): New function.
27232         (get_compute_type): Use subparts_gt.
27233         (count_type_subparts): Delete.
27234         (expand_vector_operations_1): Use subparts_gt instead of
27235         count_type_subparts.
27237 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27238             Alan Hayward  <alan.hayward@arm.com>
27239             David Sherwood  <david.sherwood@arm.com>
27241         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
27242         (vect_compile_time_alias): ...this new function.  Do the calculation
27243         on poly_ints rather than trees.
27244         (vect_prune_runtime_alias_test_list): Update call accordingly.
27246 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27247             Alan Hayward  <alan.hayward@arm.com>
27248             David Sherwood  <david.sherwood@arm.com>
27250         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
27251         numbers of units.
27252         (vect_schedule_slp_instance): Likewise.
27254 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27255             Alan Hayward  <alan.hayward@arm.com>
27256             David Sherwood  <david.sherwood@arm.com>
27258         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
27259         constant and extern definitions for variable-length vectors.
27260         (vect_get_constant_vectors): Note that the number of units
27261         is known to be constant.
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-stmts.c (vectorizable_conversion): Treat the number
27268         of units as polynomial.  Choose between WIDE and NARROW based
27269         on multiple_p.
27271 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27272             Alan Hayward  <alan.hayward@arm.com>
27273             David Sherwood  <david.sherwood@arm.com>
27275         * tree-vect-stmts.c (simd_clone_subparts): New function.
27276         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
27278 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27279             Alan Hayward  <alan.hayward@arm.com>
27280             David Sherwood  <david.sherwood@arm.com>
27282         * tree-vect-stmts.c (vectorizable_call): Treat the number of
27283         vectors as polynomial.  Use build_index_vector for
27284         IFN_GOMP_SIMD_LANE.
27286 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27287             Alan Hayward  <alan.hayward@arm.com>
27288             David Sherwood  <david.sherwood@arm.com>
27290         * tree-vect-stmts.c (get_load_store_type): Treat the number of
27291         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
27292         for variable-length vectors.
27293         (vectorizable_mask_load_store): Treat the number of units as
27294         polynomial, asserting that it is constant if the condition has
27295         already been enforced.
27296         (vectorizable_store, vectorizable_load): Likewise.
27298 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27299             Alan Hayward  <alan.hayward@arm.com>
27300             David Sherwood  <david.sherwood@arm.com>
27302         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
27303         of units as polynomial.  Punt if we can't tell at compile time
27304         which vector contains the final result.
27306 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27307             Alan Hayward  <alan.hayward@arm.com>
27308             David Sherwood  <david.sherwood@arm.com>
27310         * tree-vect-loop.c (vectorizable_induction): Treat the number
27311         of units as polynomial.  Punt on SLP inductions.  Use an integer
27312         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
27313         cast of such a series for variable-length floating-point
27314         reductions.
27316 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27317             Alan Hayward  <alan.hayward@arm.com>
27318             David Sherwood  <david.sherwood@arm.com>
27320         * tree.h (build_index_vector): Declare.
27321         * tree.c (build_index_vector): New function.
27322         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
27323         of units as polynomial, forcibly converting it to a constant if
27324         vectorizable_reduction has already enforced the condition.
27325         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
27326         to create a {1,2,3,...} vector.
27327         (vectorizable_reduction): Treat the number of units as polynomial.
27328         Choose vectype_in based on the largest scalar element size rather
27329         than the smallest number of units.  Enforce the restrictions
27330         relied on above.
27332 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27333             Alan Hayward  <alan.hayward@arm.com>
27334             David Sherwood  <david.sherwood@arm.com>
27336         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
27337         number of units as polynomial.
27339 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27340             Alan Hayward  <alan.hayward@arm.com>
27341             David Sherwood  <david.sherwood@arm.com>
27343         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
27344         * target.def (autovectorize_vector_sizes): Return the vector sizes
27345         by pointer, using vector_sizes rather than a bitmask.
27346         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
27347         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
27348         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
27349         Likewise.
27350         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
27351         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
27352         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
27353         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
27354         * omp-general.c (omp_max_vf): Likewise.
27355         * omp-low.c (omp_clause_aligned_alignment): Likewise.
27356         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
27357         * tree-vect-loop.c (vect_analyze_loop): Likewise.
27358         * tree-vect-slp.c (vect_slp_bb): Likewise.
27359         * doc/tm.texi: Regenerate.
27360         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
27361         to a poly_uint64.
27362         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
27363         the vector size as a poly_uint64 rather than an unsigned int.
27364         (current_vector_size): Change from an unsigned int to a poly_uint64.
27365         (get_vectype_for_scalar_type): Update accordingly.
27366         * tree.h (build_truth_vector_type): Take the size and number of
27367         units as a poly_uint64 rather than an unsigned int.
27368         (build_vector_type): Add a temporary overload that takes
27369         the number of units as a poly_uint64 rather than an unsigned int.
27370         * tree.c (make_vector_type): Likewise.
27371         (build_truth_vector_type): Take the number of units as a poly_uint64
27372         rather than an unsigned int.
27374 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27375             Alan Hayward  <alan.hayward@arm.com>
27376             David Sherwood  <david.sherwood@arm.com>
27378         * target.def (get_mask_mode): Take the number of units and length
27379         as poly_uint64s rather than unsigned ints.
27380         * targhooks.h (default_get_mask_mode): Update accordingly.
27381         * targhooks.c (default_get_mask_mode): Likewise.
27382         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
27383         * doc/tm.texi: Regenerate.
27385 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27386             Alan Hayward  <alan.hayward@arm.com>
27387             David Sherwood  <david.sherwood@arm.com>
27389         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
27390         * omp-general.c (omp_max_vf): Likewise.
27391         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
27392         (expand_omp_simd): Handle polynomial safelen.
27393         * omp-low.c (omplow_simd_context): Add a default constructor.
27394         (omplow_simd_context::max_vf): Change from int to poly_uint64.
27395         (lower_rec_simd_input_clauses): Update accordingly.
27396         (lower_rec_input_clauses): Likewise.
27398 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27399             Alan Hayward  <alan.hayward@arm.com>
27400             David Sherwood  <david.sherwood@arm.com>
27402         * tree-vectorizer.h (vect_nunits_for_cost): New function.
27403         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
27404         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
27405         (vect_analyze_slp_cost): Likewise.
27406         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
27407         (vect_model_load_cost): Likewise.
27409 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27410             Alan Hayward  <alan.hayward@arm.com>
27411             David Sherwood  <david.sherwood@arm.com>
27413         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
27414         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
27415         from an unsigned int * to a poly_uint64_pod *.
27416         (calculate_unrolling_factor): New function.
27417         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
27419 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27420             Alan Hayward  <alan.hayward@arm.com>
27421             David Sherwood  <david.sherwood@arm.com>
27423         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
27424         from an unsigned int to a poly_uint64.
27425         (_loop_vec_info::slp_unrolling_factor): Likewise.
27426         (_loop_vec_info::vectorization_factor): Change from an int
27427         to a poly_uint64.
27428         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
27429         (vect_get_num_vectors): New function.
27430         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
27431         (vect_get_num_copies): Use vect_get_num_vectors.
27432         (vect_analyze_data_ref_dependences): Change max_vf from an int *
27433         to an unsigned int *.
27434         (vect_analyze_data_refs): Change min_vf from an int * to a
27435         poly_uint64 *.
27436         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27437         than an unsigned HOST_WIDE_INT.
27438         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
27439         (vect_analyze_data_ref_dependence): Change max_vf from an int *
27440         to an unsigned int *.
27441         (vect_analyze_data_ref_dependences): Likewise.
27442         (vect_compute_data_ref_alignment): Handle polynomial vf.
27443         (vect_enhance_data_refs_alignment): Likewise.
27444         (vect_prune_runtime_alias_test_list): Likewise.
27445         (vect_shift_permute_load_chain): Likewise.
27446         (vect_supportable_dr_alignment): Likewise.
27447         (dependence_distance_ge_vf): Take the vectorization factor as a
27448         poly_uint64 rather than an unsigned HOST_WIDE_INT.
27449         (vect_analyze_data_refs): Change min_vf from an int * to a
27450         poly_uint64 *.
27451         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
27452         vfm1 as a poly_uint64 rather than an int.  Make the same change
27453         for the returned bound_scalar.
27454         (vect_gen_vector_loop_niters): Handle polynomial vf.
27455         (vect_do_peeling): Likewise.  Update call to
27456         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
27457         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
27458         be constant.
27459         * tree-vect-loop.c (vect_determine_vectorization_factor)
27460         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
27461         (vect_get_known_peeling_cost): Likewise.
27462         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
27463         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
27464         (vect_transform_loop): Likewise.  Use the lowest possible VF when
27465         updating the upper bounds of the loop.
27466         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
27467         rather than an int.
27468         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
27469         polynomial unroll factors.
27470         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
27471         (vect_make_slp_decision): Likewise.
27472         (vect_supported_load_permutation_p): Likewise, and polynomial
27473         vf too.
27474         (vect_analyze_slp_cost): Handle polynomial vf.
27475         (vect_slp_analyze_node_operations): Likewise.
27476         (vect_slp_analyze_bb_1): Likewise.
27477         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27478         than an unsigned HOST_WIDE_INT.
27479         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
27480         (vectorizable_load): Handle polynomial vf.
27481         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
27482         a poly_uint64.
27483         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
27485 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27486             Alan Hayward  <alan.hayward@arm.com>
27487             David Sherwood  <david.sherwood@arm.com>
27489         * match.pd: Handle bit operations involving three constants
27490         and try to fold one pair.
27492 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27494         * tree-vect-loop-manip.c: Include gimple-fold.h.
27495         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
27496         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
27497         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
27498         Add a path that uses a step of VF instead of 1, but disable it
27499         for now.
27500         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
27501         and niters_no_overflow parameters.  Update calls to
27502         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
27503         Create a new SSA name if the latter choses to use a ste other
27504         than zero, and return it via niters_vector_mult_vf_var.
27505         * tree-vect-loop.c (vect_transform_loop): Update calls to
27506         vect_do_peeling, vect_gen_vector_loop_niters and
27507         slpeel_make_loop_iterate_ntimes.
27508         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
27509         (vect_gen_vector_loop_niters): Update declarations after above changes.
27511 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
27513         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
27514         128-bit round to integer instructions.
27515         (ceil<mode>2): Likewise.
27516         (btrunc<mode>2): Likewise.
27517         (round<mode>2): Likewise.
27519 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27521         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
27522         unaligned VSX load/store on P8/P9.
27523         (expand_block_clear): Allow the use of unaligned VSX
27524         load/store on P8/P9.
27526 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27528         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
27529         New function.
27530         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
27531         swap associated with both a load and a store.
27533 2018-01-02  Andrew Waterman  <andrew@sifive.com>
27535         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
27536         * config/riscv/riscv.md (clear_cache): Use it.
27538 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
27540         * web.c: Remove out-of-date comment.
27542 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27544         * expr.c (fixup_args_size_notes): Check that any existing
27545         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
27546         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
27547         (emit_single_push_insn): ...here.
27549 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27551         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
27552         (const_vector_encoded_nelts): New function.
27553         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
27554         (const_vector_int_elt, const_vector_elt): Declare.
27555         * emit-rtl.c (const_vector_int_elt_1): New function.
27556         (const_vector_elt): Likewise.
27557         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
27558         of CONST_VECTOR_ELT.
27560 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27562         * expr.c: Include rtx-vector-builder.h.
27563         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
27564         directly on the tree encoding.
27565         (const_vector_from_tree): Likewise.
27566         * optabs.c: Include rtx-vector-builder.h.
27567         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
27568         sequence of "u" values.
27569         * vec-perm-indices.c: Include rtx-vector-builder.h.
27570         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
27571         directly on the vec_perm_indices encoding.
27573 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27575         * doc/rtl.texi (const_vector): Describe new encoding scheme.
27576         * Makefile.in (OBJS): Add rtx-vector-builder.o.
27577         * rtx-vector-builder.h: New file.
27578         * rtx-vector-builder.c: Likewise.
27579         * rtl.h (rtx_def::u2): Add a const_vector field.
27580         (CONST_VECTOR_NPATTERNS): New macro.
27581         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
27582         (CONST_VECTOR_DUPLICATE_P): Likewise.
27583         (CONST_VECTOR_STEPPED_P): Likewise.
27584         (CONST_VECTOR_ENCODED_ELT): Likewise.
27585         (const_vec_duplicate_p): Check for a duplicated vector encoding.
27586         (unwrap_const_vec_duplicate): Likewise.
27587         (const_vec_series_p): Check for a non-duplicated vector encoding.
27588         Say that the function only returns true for integer vectors.
27589         * emit-rtl.c: Include rtx-vector-builder.h.
27590         (gen_const_vec_duplicate_1): Delete.
27591         (gen_const_vector): Call gen_const_vec_duplicate instead of
27592         gen_const_vec_duplicate_1.
27593         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
27594         (gen_const_vec_duplicate): Use rtx_vector_builder.
27595         (gen_const_vec_series): Likewise.
27596         (gen_rtx_CONST_VECTOR): Likewise.
27597         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
27598         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27599         Build a new vector rather than modifying a CONST_VECTOR in-place.
27600         (handle_special_swappables): Update call accordingly.
27601         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
27602         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27603         Build a new vector rather than modifying a CONST_VECTOR in-place.
27604         (handle_special_swappables): Update call accordingly.
27606 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27608         * simplify-rtx.c (simplify_const_binary_operation): Use
27609         CONST_VECTOR_ELT instead of XVECEXP.
27611 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27613         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
27614         the selector elements to be different from the data elements
27615         if the selector is a VECTOR_CST.
27616         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
27617         ssizetype for the selector.
27619 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27621         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
27622         before testing each element individually.
27623         * tree-vect-generic.c (lower_vec_perm): Likewise.
27625 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27627         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
27628         * selftest-run-tests.c (selftest::run_tests): Call it.
27629         * vector-builder.h (vector_builder::operator ==): New function.
27630         (vector_builder::operator !=): Likewise.
27631         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
27632         (vec_perm_indices::all_from_input_p): New function.
27633         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27634         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
27635         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
27636         instead of reading the VECTOR_CST directly.  Detect whether both
27637         vector inputs are the same before constructing the vec_perm_indices,
27638         and update the number of inputs argument accordingly.  Use the
27639         utility functions added above.  Only construct sel2 if we need to.
27641 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27643         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
27644         the broadcast of the low byte.
27645         (expand_mult_highpart): Use an explicit encoding for the permutes.
27646         * optabs-query.c (can_mult_highpart_p): Likewise.
27647         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
27648         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27649         (vectorizable_bswap): Likewise.
27650         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
27651         explicit encoding for the power-of-2 permutes.
27652         (vect_permute_store_chain): Likewise.
27653         (vect_grouped_load_supported): Likewise.
27654         (vect_permute_load_chain): Likewise.
27656 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27658         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
27659         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
27660         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
27661         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27662         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
27663         (vect_gen_perm_mask_any): Likewise.
27665 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27667         * int-vector-builder.h: New file.
27668         * vec-perm-indices.h: Include int-vector-builder.h.
27669         (vec_perm_indices): Redefine as an int_vector_builder.
27670         (auto_vec_perm_indices): Delete.
27671         (vec_perm_builder): Redefine as a stand-alone class.
27672         (vec_perm_indices::vec_perm_indices): New function.
27673         (vec_perm_indices::clamp): Likewise.
27674         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
27675         (vec_perm_indices::new_vector): New function.
27676         (vec_perm_indices::new_expanded_vector): Update for new
27677         vec_perm_indices class.
27678         (vec_perm_indices::rotate_inputs): New function.
27679         (vec_perm_indices::all_in_range_p): Operate directly on the
27680         encoded form, without computing elided elements.
27681         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
27682         encoding.  Update for new vec_perm_indices class.
27683         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
27684         the given vec_perm_builder.
27685         (expand_vec_perm_var): Update vec_perm_builder constructor.
27686         (expand_mult_highpart): Use vec_perm_builder instead of
27687         auto_vec_perm_indices.
27688         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
27689         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
27690         or double series encoding as appropriate.
27691         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
27692         vec_perm_indices instead of auto_vec_perm_indices.
27693         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27694         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27695         (vect_permute_store_chain): Likewise.
27696         (vect_grouped_load_supported): Likewise.
27697         (vect_permute_load_chain): Likewise.
27698         (vect_shift_permute_load_chain): Likewise.
27699         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27700         (vect_transform_slp_perm_load): Likewise.
27701         (vect_schedule_slp_instance): Likewise.
27702         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27703         (vectorizable_mask_load_store): Likewise.
27704         (vectorizable_bswap): Likewise.
27705         (vectorizable_store): Likewise.
27706         (vectorizable_load): Likewise.
27707         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
27708         vec_perm_indices instead of auto_vec_perm_indices.  Use
27709         tree_to_vec_perm_builder to read the vector from a tree.
27710         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
27711         vec_perm_builder instead of a vec_perm_indices.
27712         (have_whole_vector_shift): Use vec_perm_builder and
27713         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
27714         truncation to calc_vec_perm_mask_for_shift.
27715         (vect_create_epilog_for_reduction): Likewise.
27716         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
27717         from auto_vec_perm_indices to vec_perm_indices.
27718         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27719         instead of changing individual elements.
27720         (aarch64_vectorize_vec_perm_const): Use new_vector to install
27721         the vector in d.perm.
27722         * config/arm/arm.c (expand_vec_perm_d::perm): Change
27723         from auto_vec_perm_indices to vec_perm_indices.
27724         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27725         instead of changing individual elements.
27726         (arm_vectorize_vec_perm_const): Use new_vector to install
27727         the vector in d.perm.
27728         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
27729         Update vec_perm_builder constructor.
27730         (rs6000_expand_interleave): Likewise.
27731         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
27732         (rs6000_expand_interleave): Likewise.
27734 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27736         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
27737         to qimode could truncate the indices.
27738         * optabs.c (expand_vec_perm_var): Likewise.
27740 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27742         * Makefile.in (OBJS): Add vec-perm-indices.o.
27743         * vec-perm-indices.h: New file.
27744         * vec-perm-indices.c: Likewise.
27745         * target.h (vec_perm_indices): Replace with a forward class
27746         declaration.
27747         (auto_vec_perm_indices): Move to vec-perm-indices.h.
27748         * optabs.h: Include vec-perm-indices.h.
27749         (expand_vec_perm): Delete.
27750         (selector_fits_mode_p, expand_vec_perm_var): Declare.
27751         (expand_vec_perm_const): Declare.
27752         * target.def (vec_perm_const_ok): Replace with...
27753         (vec_perm_const): ...this new hook.
27754         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
27755         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
27756         * doc/tm.texi: Regenerate.
27757         * optabs.def (vec_perm_const): Delete.
27758         * doc/md.texi (vec_perm_const): Likewise.
27759         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
27760         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
27761         expand_vec_perm for constant permutation vectors.  Assert that
27762         the mode of variable permutation vectors is the integer equivalent
27763         of the mode that is being permuted.
27764         * optabs-query.h (selector_fits_mode_p): Declare.
27765         * optabs-query.c: Include vec-perm-indices.h.
27766         (selector_fits_mode_p): New function.
27767         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
27768         is defined, instead of checking whether the vec_perm_const_optab
27769         exists.  Use targetm.vectorize.vec_perm_const instead of
27770         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
27771         fit in the vector mode before using a variable permute.
27772         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
27773         vec_perm_indices instead of an rtx.
27774         (expand_vec_perm): Replace with...
27775         (expand_vec_perm_const): ...this new function.  Take the selector
27776         as a vec_perm_indices rather than an rtx.  Also take the mode of
27777         the selector.  Update call to shift_amt_for_vec_perm_mask.
27778         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
27779         Use vec_perm_indices::new_expanded_vector to expand the original
27780         selector into bytes.  Check whether the indices fit in the vector
27781         mode before using a variable permute.
27782         (expand_vec_perm_var): Make global.
27783         (expand_mult_highpart): Use expand_vec_perm_const.
27784         * fold-const.c: Includes vec-perm-indices.h.
27785         * tree-ssa-forwprop.c: Likewise.
27786         * tree-vect-data-refs.c: Likewise.
27787         * tree-vect-generic.c: Likewise.
27788         * tree-vect-loop.c: Likewise.
27789         * tree-vect-slp.c: Likewise.
27790         * tree-vect-stmts.c: Likewise.
27791         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
27792         Delete.
27793         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
27794         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
27795         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
27796         (aarch64_vectorize_vec_perm_const): ...this new function.
27797         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27798         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27799         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
27800         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
27801         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27802         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27803         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
27804         into...
27805         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
27806         check for NEON modes.
27807         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
27808         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
27809         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
27810         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
27811         into...
27812         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
27813         the old VEC_PERM_CONST conditions.
27814         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
27815         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
27816         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
27817         (ia64_vectorize_vec_perm_const_ok): Merge into...
27818         (ia64_vectorize_vec_perm_const): ...this new function.
27819         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
27820         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
27821         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
27822         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
27823         * config/mips/mips.c (mips_expand_vec_perm_const)
27824         (mips_vectorize_vec_perm_const_ok): Merge into...
27825         (mips_vectorize_vec_perm_const): ...this new function.
27826         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
27827         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
27828         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
27829         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
27830         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
27831         (rs6000_expand_vec_perm_const): Delete.
27832         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
27833         Delete.
27834         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27835         (altivec_expand_vec_perm_const_le): Take each operand individually.
27836         Operate on constant selectors rather than rtxes.
27837         (altivec_expand_vec_perm_const): Likewise.  Update call to
27838         altivec_expand_vec_perm_const_le.
27839         (rs6000_expand_vec_perm_const): Delete.
27840         (rs6000_vectorize_vec_perm_const_ok): Delete.
27841         (rs6000_vectorize_vec_perm_const): New function.
27842         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27843         an element count and rtx array.
27844         (rs6000_expand_extract_even): Update call accordingly.
27845         (rs6000_expand_interleave): Likewise.
27846         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
27847         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
27848         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
27849         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
27850         (rs6000_expand_vec_perm_const): Delete.
27851         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27852         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27853         (altivec_expand_vec_perm_const_le): Take each operand individually.
27854         Operate on constant selectors rather than rtxes.
27855         (altivec_expand_vec_perm_const): Likewise.  Update call to
27856         altivec_expand_vec_perm_const_le.
27857         (rs6000_expand_vec_perm_const): Delete.
27858         (rs6000_vectorize_vec_perm_const_ok): Delete.
27859         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
27860         reference to the SPE evmerge intructions.
27861         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27862         an element count and rtx array.
27863         (rs6000_expand_extract_even): Update call accordingly.
27864         (rs6000_expand_interleave): Likewise.
27865         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
27866         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
27867         new function.
27868         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27870 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27872         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
27873         vector mode and that that mode matches the mode of the data
27874         being permuted.
27875         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
27876         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
27877         directly using expand_vec_perm_1 when forcing selectors into
27878         registers.
27879         (expand_vec_perm_var): New function, split out from expand_vec_perm.
27881 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27883         * optabs-query.h (can_vec_perm_p): Delete.
27884         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
27885         * optabs-query.c (can_vec_perm_p): Split into...
27886         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
27887         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
27888         particular selector is valid.
27889         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27890         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27891         (vect_grouped_load_supported): Likewise.
27892         (vect_shift_permute_load_chain): Likewise.
27893         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27894         (vect_transform_slp_perm_load): Likewise.
27895         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27896         (vectorizable_bswap): Likewise.
27897         (vect_gen_perm_mask_checked): Likewise.
27898         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
27899         implementations of variable permutation vectors into account
27900         when deciding which selector to use.
27901         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
27902         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
27903         with a false third argument.
27904         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
27905         to test whether the constant selector is valid and can_vec_perm_var_p
27906         to test whether a variable selector is valid.
27908 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27910         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
27911         * optabs-query.c (can_vec_perm_p): Likewise.
27912         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
27913         instead of vec_perm_indices.
27914         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
27915         (vect_gen_perm_mask_checked): Likewise,
27916         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
27917         (vect_gen_perm_mask_checked): Likewise,
27919 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27921         * optabs-query.h (qimode_for_vec_perm): Declare.
27922         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
27923         (qimode_for_vec_perm): ...this new function.
27924         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
27926 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27928         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
27929         does not have a conditional at the top.
27931 2018-01-02  Richard Biener  <rguenther@suse.de>
27933         * ipa-inline.c (big_speedup_p): Fix expression.
27935 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
27937         PR target/81616
27938         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
27939         for generic 4->6.
27941 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
27943         PR target/81616
27944         Generic tuning.
27945         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
27946         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
27947         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
27948         cond_taken_branch_cost 3->4.
27950 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
27952         PR tree-optimization/83581
27953         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
27954         TODO_cleanup_cfg if any changes have been made.
27956         PR middle-end/83608
27957         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
27958         convert_modes if target mode has the right side, but different mode
27959         class.
27961         PR middle-end/83609
27962         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
27963         last argument when extracting from CONCAT.  If either from_real or
27964         from_imag is NULL, use expansion through memory.  If result is not
27965         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
27966         the parts directly to inner mode, if even that fails, use expansion
27967         through memory.
27969         PR middle-end/83623
27970         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
27971         check for bswap in mode rather than HImode and use that in expand_unop
27972         too.
27974 Copyright (C) 2018 Free Software Foundation, Inc.
27976 Copying and distribution of this file, with or without modification,
27977 are permitted in any medium without royalty provided the copyright
27978 notice and this notice are preserved.