dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
[official-gcc.git] / gcc / ChangeLog
blob49770e78a8539480743ada9f6ac5155a82b4930a
1 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
3         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
4         (notice_args_size): Set it in the current trace if no insn that can
5         throw internally has been seen yet.
6         (connect_traces): When connecting args_size between traces, allow the
7         incoming values not to match if there is an insn setting it before the
8         first insn that can throw internally; in that case, force the creation
9         of a CFI note on this latter insn.
11 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
13         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
14         the base class, because using the injected-class-name was not clearly
15         specified until DR 176.
17 2018-10-12  Paul Koning  <ni1d@arrl.net>
19         * config/pdp11/pdp11.md (doloop_end): New expander.
20         (doloop_end_insn): renamed from "doloop_end".
21         (addqi3): New pattern.
22         (subqi3): New pattern.
23         * config/pdp11/predicates.md (incdec_operand): New predicate.
25 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
27         PR middle-end/81376
28         * real.c (format_helper::can_represent_integral_type_p): New function
29         * real.h (format_helper::can_represent_integral_type_p): Ditto.
30         * match.pd: New pattern.
32 2018-10-12  Alexandre Oliva <oliva@adacore.com>
34         * configure.ac: Introduce --enable-large-address-aware
35         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
36         * doc/install.texi: Document it.
37         * configure, config.in: Rebuilt.
38         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
39         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
40         (LINK_SPEC): Insert it.
41         * config/i386/mingw-264.h: Likewise.
43         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
45 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
47         PR rtl-optimization/87600
48         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
50 2018-10-12  Paul Koning  <ni1d@arrl.net>
52         * doc/md.texi (doloop_end): Document that the pattern code may
53         need to check operand mode.
55 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
57         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
58         to zero-extend between int and floating-point registers.
59         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
60         ldp into floating-point registers.  Add type and arch attributes.
61         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
62         Use f_loads for type attribute.
64 2018-10-11  Martin Sebor  <msebor@redhat.com>
66         * doc/extend.texi (attribute packed): Correct typos.
68 2018-10-11  Martin Sebor  <msebor@redhat.com>
70         * doc/extend.texi (attribute flatten): Mention interaction with
71         noinline.
73 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
75         PR target/87156
76         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
77         Set new_decl virtual flag to zero.
79 2018-10-11  Martin Sebor  <msebor@redhat.com>
81         PR middle-end/87593
82         * doc/extend.texi (attribute format_arg): Discuss using multiple
83         attributes on a single function.
85 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
87         PR tree-optimization/86829
88         * match.pd (sin (atan (x))): New simplification rules.
89         (cos (atan (x))): Likewise.
90         * real.c (build_sinatan_real): New function.
91         * real.h (build_sinatan_real): Prototype.
93 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
95         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
96         function.
97         (fold_mergeeo_helper): New helper function.
98         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
99         intrinsics.  Correct some whitespace indentation issues.
101 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
103         PR target/87511
104         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
105         Use HOST_WIDE_INT_1U for shift.
107 2018-10-11  Doug Rupp  <rupp@adacore.com>
108             Olivier Hainque  <hainque@adacore.com>
110         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
111         Pass --relax to the linker for RTPs.
112         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
114 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
115             Jan Hubicka  <jh@suse.cz>
116             Martin Jambor  <mjambor@suse.cz>
118         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
119         the same elements are repeated rather than printing all of them.
120         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
121         "repeated" elements.
122         * read-rtl-function.c (test_loading_repeat): New function.
123         (read_rtl_function_c_tests): Call test_loading_repeat.
124         * rtl-tests.c (test_dumping_repeat): New function.
125         (rtl_tests_c_tests): Call test_dumping_repeat.
127 2018-10-11  Richard Biener  <rguenther@suse.de>
129         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
130         bdver?_cost): Unify to ...
131         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
132         * config/i386/i386.c (processor_cost_table): Adjust.
134 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
136         PR middle-end/87574
137         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
138         the thunk when expanding to GIMPLE.
140 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
142         * varasm.c (mergeable_string_section): Don't try to move zero-length
143         strings to the merge section.
145 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
147         PR target/87573
148         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
150 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
152         PR target/87550
153         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
154         to special_args set.
156 2018-10-10  Richard Biener  <rguenther@suse.de>
158         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
159         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
160         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
161         and recursing and pattern terminating the recursion on SSE
162         vector width using ix86_expand_reduc.
163         (reduc_sminmax_scal_<mode>): Split into part reducing to half
164         width and recursing and SSE2 vector variant doing the final
165         reduction with ix86_expand_reduc.
166         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
167         with terminating the recursion at AVX level, splitting that
168         to SSE there.
170 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
172         * genmatch.c (error_cb): Rename to...
173         (diagnostic_cb): ...this, converting int params to enums.
174         (fatal_at): Update for renaming.
175         (warning_at): Likewise.
176         (main): Likewise.
177         * input.c (selftest::ebcdic_execution_charset::apply):
178         Update for renaming of...
179         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
180         to...
181         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
182         converting level and reason to enums.
183         (class selftest::lexer_error_sink): Rename to...
184         (class selftest::lexer_test_options): ...this, renaming field
185         "m_errors" to "m_diagnostics".
186         (selftest::lexer_test_options::apply): Update for renaming of...
187         (selftest::lexer_test_options::on_error): ...this, renaming to...
188         (selftest::lexer_test_options::on_diagnostic): ...this
189         converting level and reason to enums.
190         (selftest::test_lexer_string_locations_raw_string_unterminated):
191         Update for renamings.
192         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
193         "reason".
195 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
197         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
198         * config/rs6000/pmmintrin.h: New file.
200 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
202         PR tree-optimization/86659
203         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
205 2018-10-09  Richard Biener  <rguenther@suse.de>
207         PR tree-optimization/63155
208         * tree-ssa-structalias.c: Include tree-ssa.h.
209         (get_constraint_for_ssa_var): For undefs return nothing_id.
210         (find_func_aliases): Cleanup PHI handling.
212 2018-10-09  Richard Biener  <rguenther@suse.de>
214         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
215         replacements.
217 2018-10-09  Martin Liska  <mliska@suse.cz>
219         * asan.c (asan_emit_stack_protection): If a stack variable
220         is located in a same file as current function, then emit
221         line info into variable definition string.
223 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
225         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
226         information.
228 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
230         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
231         on the thunk.
233 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
235         PR tree-optimization/86659
236         * gimple-match.h (struct gimple_match_op): Add reverse field.
237         (gimple_match_op::set_op): New overloaded method.
238         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
239         the REF_REVERSE_STORAGE_ORDER flag on the value.
240         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
241         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
242         
243 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
245         PR middle-end/63155
246         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
247         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
249 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
251         PR target/87517
252         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
253         Defined with __builtin_ia32_vfmaddsubpd512_mask.
255 2018-10-08  Richard Biener  <rguenther@suse.de>
257         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
258         cost the same as AVX128 ones.
260 2018-10-08  Paul Koning  <ni1d@arrl.net>
262         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
263         (expand_block_move): New function.
264         * config/pdp11/pdp11.c (output_block_move): Remove.
265         (expand_block_move): New function.
266         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
267         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
268         (*movmemhi1): Remove.
270 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
272         * config/s390/2827.md: Increase latencies for some FP instructions.
274 2018-10-08  Richard Biener  <rguenther@suse.de>
276         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
277         Open a dump scope.
278         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
279         * tree-vectorizer.h (dump_stmt_cost): Adjust.
280         (add_stmt_cost): Dump return value of the hook.
282 2018-10-08  Richard Biener  <rguenther@suse.de>
284         PR tree-optimization/63155
285         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
286         (ssa_propagation_engine::ssa_propagate): Remove redundant
287         bitmap bit clearing.
289 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
291         PR rtl-optimization/86939
292         PR rtl-optimization/87479
293         * ira.h (non_conflicting_reg_copy_p): New prototype.
294         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
295         (make_hard_regno_dead): Don't add conflicts for register
296         ignore_reg_for_conflicts.
297         (make_object_dead): Likewise.
298         (non_conflicting_reg_copy_p): New function.
299         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
300         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
301         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
302         (make_hard_regno_dead): Don't add conflicts for register
303         ignore_reg_for_conflicts.  Remove special conflict handling of
304         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
305         check_pic_pseudo_p and update callers.
306         (mark_pseudo_dead): Don't add conflicts for register
307         ignore_reg_for_conflicts.
308         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
310 2018-10-05  Andrew Waterman  <andrew@sifive.com>
311             Jim Wilson  <jimw@sifive.com>
313         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
314         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
315         new pattern using HONOR_SNANS that emits one extra instruction.
317 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
319         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
320         patterns): Merge SI and DI patterns to a GPR pattern.
321         (unnamed define_insn and define_split for record form of that): Merge
322         to a single define_insn_and_split pattern.
324 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
326         PR c++/56856
327         * input.c (expand_location_to_spelling_point): Add param "aspect"
328         and use rather than hardcoding LOCATION_ASPECT_CARET.
329         (get_substring_ranges_for_loc): Handle the case of a single token
330         within a macro expansion.
331         * input.h (expand_location_to_spelling_point): Add "aspect" param,
332         defaulting to LOCATION_ASPECT_CARET.
334 2018-10-05  Paul Koning  <ni1d@arrl.net>
336         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
337         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
338         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
339         (pdp11_guard_type): New function.
341 2018-10-05  Paul Koning  <ni1d@arrl.net>
343         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
344         * config/pdp11/pdp11.opt (mfloat32): Remove.
345         (mfloat64): Remove.
346         * doc/invoke.texi (pdp11 -mfloat32): Remove:
347         (pdp11 -mfloat64): Remove.
349 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
351         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
352         (*cmp<mode>_cc_i387): Ditto.
353         (*cmpu<mode>_cc_i387): Ditto.
354         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
355         * config/i386/i386.c (ix86_expand_fp_compare): Remove
356         "scratch" argument.
357         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
358         Emit x86_sahf_1 pattern.
359         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
360         (ix86_expand_carry_flag_compare): Ditto.
362 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
364         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
365         to reg_or_0_operand.  Add "C" constraint.
366         (*cmpxf_cc_i387): Ditto.
367         (*cmp<mode>_i387): Change operand 2 predicate
368         to nonimm_or_0_operand.  Add "C" constraint.
369         (*cmp<mode>_cc_i387): Ditto.
370         (*cmp<mode>_0_i387): Remove insn pattern.
371         (*cmp<mode>_0_cc_i387): Ditto.
373 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
375         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
376         * config/i386/predicates.md (nonimm_or_0_operand): Rename
377         from vector_move_operand.  Update all uses.
379 2018-10-05  Martin Sebor  <msebor@redhat.com>
381         PR tree-optimization/87490
382         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
383         consistently.
385 2018-10-05  Richard Biener  <rguenther@suse.de>
387         PR tree-optimization/63155
388         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
389         vertical space in dumpfiles.
390         * tree-ssa-propagate.h
391         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
392         * tree-ssa-propagate.c (cfg_blocks_back): New global.
393         (ssa_edge_worklist_back): Likewise.
394         (curr_order): Likewise.
395         (cfg_blocks_get): Remove abstraction.
396         (cfg_blocks_add): Likewise.
397         (cfg_blocks_empty_p): Likewise.
398         (add_ssa_edge): Add to current or next worklist based on
399         RPO index.
400         (add_control_edge): Likewise.
401         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
402         into ...
403         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
404         iteration from CFG and SSA edge worklist so we process
405         everything in RPO order, prioritizing forward progress
406         over iteration.
407         (ssa_prop_init): Allocate new worklists, do not dump
408         immediate uses.
409         (ssa_prop_fini): Free new worklists.
411 2018-10-05  Richard Biener  <rguenther@suse.de>
413         * tree-core.h (tree_block::abstract_flag): Remove.
414         (tree_block::block_num): Make full 32bits.
415         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
416         * tree.h (BLOCK_ABSTRACT): Remove.
417         * dwarf2out.c (gen_lexical_block_die): Remove dead code
418         resulting from BLOCK_ABSTRACT being always false.
419         (gen_inlined_subroutine_die): Likewise.
420         (gen_block_die): Likewise.
421         * tree.c (block_ultimate_origin): Likewise.
422         * tree-pretty-print.c (dump_block_node): Remove code dealing
423         with BLOCK_ABSTRACT.
424         * tree-ssa-live.c (dump_scope_block): Likewise.
425         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
426         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
428 2018-10-05   Richard Biener  <rguenther@suse.de>
430         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
431         is asked for initialize mode to the component mode of the
432         vector type.
434 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
436         PR target/87522
437         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
438         assembler for -mavx.
439         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
441 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
443         PR target/87509
444         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
445         RS6000_BTM_DFP.
446         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
447         to be DImode.  When using mffscrn, force the operand to a register.
449 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
451         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
452         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
453         X87MODEF mode iterator.
454         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
455         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
456         X87MODEF mode iterator.
458 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
460         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
461         -Wno-prio-ctor-dtor.
463 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
465         * Makefile.in (OBJS): Add opt-problem.o.
466         * dump-context.h: Include "selftest.h.
467         (selftest::temp_dump_context): New forward decl.
468         (class dump_context): Make friend of class
469         selftest::temp_dump_context.
470         (dump_context::dump_loc_immediate): New decl.
471         (class dump_pretty_printer): Move here from dumpfile.c.
472         (class temp_dump_context): Move to namespace selftest.
473         (temp_dump_context::temp_dump_context): Add param
474         "forcibly_enable_dumping".
475         (selftest::verify_dumped_text):
476         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
477         (selftest::verify_item):
478         (ASSERT_IS_TEXT): Move here from dumpfile.c.
479         (ASSERT_IS_TREE): Likewise.
480         (ASSERT_IS_GIMPLE): Likewise.
481         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
482         to...
483         (dump_context::dump_loc_immediate): ...this new function.
484         (class dump_pretty_printer): Move to dump-context.h.
485         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
486         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
487         (temp_dump_context::temp_dump_context): Move to "selftest"
488         namespace.  Add param "forcibly_enable_dumping", and use it to
489         conditionalize the use of m_pp;
490         (selftest::verify_dumped_text): Make non-static.
491         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
492         (selftest::verify_item): Make non-static.
493         (ASSERT_IS_TEXT): Move to dump-context.h.
494         (ASSERT_IS_TREE): Likewise.
495         (ASSERT_IS_GIMPLE): Likewise.
496         (selftest::test_capture_of_dump_calls): Pass "true" for new
497         param of temp_dump_context.
498         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
499         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
500         TDF_COMPARE_DEBUG.
501         * opt-problem.cc: New file.
502         * opt-problem.h: New file.
503         * optinfo-emit-json.cc
504         (selftest::test_building_json_from_dump_calls): Pass "true" for
505         new param of temp_dump_context.
506         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
507         (optinfo::emit_for_opt_problem): New function.
508         (optinfo::emit): Clarity which emit_item is used.
509         * optinfo.h (optinfo::get_dump_location): New accessor.
510         (optinfo::emit_for_opt_problem): New decl.
511         (optinfo::emit): Make const.
512         * selftest-run-tests.c (selftest::run_tests): Call
513         selftest::opt_problem_cc_tests.
514         * selftest.h (selftest::opt_problem_cc_tests): New decl.
515         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
516         bool to opt_result, converting fprintf messages to
517         opt_result::failure_at calls.  Add "stmt" param for use by the
518         failure_at calls.
519         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
520         (runtime_alias_check_p): Convert return type from bool to
521         opt_result, converting dump_printf calls to
522         opt_result::failure_at, using the statement DDR_A for their
523         location.
524         (find_data_references_in_stmt): Convert return type from bool to
525         opt_result, converting "return false" to opt_result::failure_at
526         with a new message.
527         * tree-data-ref.h: Include "opt-problem.h".
528         (dr_analyze_innermost): Convert return type from bool to opt_result,
529         and add a const gimple * param.
530         (find_data_references_in_stmt): Convert return type from bool to
531         opt_result.
532         (runtime_alias_check_p): Likewise.
533         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
534         dr_analyze_innermost.
535         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
536         Convert return type from bool to opt_result, adding a message for
537         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
538         (vect_analyze_data_ref_dependence): Convert return type from bool
539         to opt_result.  Change sense of return type from "false"
540         effectively meaning "no problems" to "false" meaning a problem,
541         so that "return false" becomes "return opt_result::success".
542         Convert "return true" calls to opt_result::failure_at, using
543         the location of statement A rather than vect_location.
544         (vect_analyze_data_ref_dependences): Convert return type from bool
545         to opt_result.
546         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
547         calls to opt_result::failure_at, using the stmt location rather
548         than vect_location.
549         (vect_verify_datarefs_alignment): Convert return type from bool
550         to opt_result.
551         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
552         into multiple more-tightly-scoped copies.
553         (vect_analyze_data_refs_alignment): Convert return type from bool
554         to opt_result.
555         (vect_analyze_data_ref_accesses): Likewise, converting a
556         "return false" to a "return opt_result::failure_at", adding a
557         new message.
558         (vect_prune_runtime_alias_test_list): Convert return type from
559         bool to opt_result, converting dump_printf_loc to
560         opt_result::failure_at.  Add a %G to show the pertinent statement,
561         and use the stmt's location rather than vect_location.
562         (vect_find_stmt_data_reference): Convert return type from
563         bool to opt_result, converting dump_printf_loc to
564         opt_result::failure_at, using stmt's location.
565         (vect_analyze_data_refs):  Convert return type from bool to
566         opt_result.  Convert "return false" to "return
567         opt_result::failure_at", adding messages as needed.
568         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
569         type from bool to opt_result.
570         (vect_determine_vf_for_stmt): Likewise.
571         (vect_determine_vectorization_factor): Likewise, converting
572         dump_printf_loc to opt_result::failure_at, using location of phi
573         rather than vect_location.
574         (vect_analyze_loop_form_1): Convert return type from bool to
575         opt_result, converting dump_printf_loc calls, retaining the use of
576         vect_location.
577         (vect_analyze_loop_form): Convert return type from loop_vec_info
578         to opt_loop_vec_info.
579         (vect_analyze_loop_operations): Convert return type from bool to
580         opt_result, converting dump_printf_loc calls, using the location
581         of phi/stmt rather than vect_location where available.  Convert
582         various "return false" to "return opt_result::failure_at" with
583         "unsupported phi" messages.
584         (vect_get_datarefs_in_loop): Convert return type from bool to
585         opt_result.  Add a message for the
586         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
587         (vect_analyze_loop_2): Convert return type from bool to
588         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
589         each "goto again;", adding new messages where needed.
590         Add "unsupported grouped {store|load}" messages.
591         (vect_analyze_loop): Convert return type from loop_vec_info to
592         opt_loop_vec_info.
593         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
594         bool to opt_result.
595         * tree-vect-stmts.c (process_use): Likewise, converting
596         dump_printf_loc call and using stmt location, rather than
597         vect_location.
598         (vect_mark_stmts_to_be_vectorized): Likeise.
599         (vect_analyze_stmt): Likewise, adding a %G.
600         (vect_get_vector_types_for_stmt): Convert return type from bool to
601         opt_result, converting dump_printf_loc calls and using stmt
602         location, rather than vect_location.
603         (vect_get_mask_type_for_stmt): Convert return type from tree to
604         opt_tree, converting dump_printf_loc calls and using stmt location.
605         * tree-vectorizer.c: Include "opt-problem.h.
606         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
607         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
608         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
609         enabled, use it to report at the top level "couldn't vectorize
610         loop" followed by the problem.
611         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
612         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
613         to opt_result.
614         (vect_analyze_stmt): Likewise.
615         (vect_get_vector_types_for_stmt): Likewise.
616         (tree vect_get_mask_type_for_stmt): Likewise.
617         (vect_analyze_data_ref_dependences): Likewise.
618         (vect_enhance_data_refs_alignment): Likewise.
619         (vect_analyze_data_refs_alignment): Likewise.
620         (vect_verify_datarefs_alignment): Likewise.
621         (vect_analyze_data_ref_accesses): Likewise.
622         (vect_prune_runtime_alias_test_list): Likewise.
623         (vect_find_stmt_data_reference): Likewise.
624         (vect_analyze_data_refs): Likewise.
625         (vect_analyze_loop): Convert return type from loop_vec_info to
626         opt_loop_vec_info.
627         (vect_analyze_loop_form): Likewise.
628         (vect_analyze_slp): Convert return type from bool to opt_result.
630 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
632         * doc/invoke.texi (-fopt-info): Document new "internals"
633         sub-option.
634         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
635         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
636         MSG_ALL_KINDS.
637         (optinfo_verbosity_options): Add "internals".
638         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
639         (dump_context::apply_dump_filter_p): New member function.
640         (dump_context::dump_loc): Use apply_dump_filter_p rather than
641         explicitly masking the dump_kind.
642         (dump_context::begin_scope): Increment the scope depth first.  Use
643         apply_dump_filter_p rather than explicitly masking the dump_kind.
644         (dump_context::emit_item): Use apply_dump_filter_p rather than
645         explicitly masking the dump_kind.
646         (dump_dec): Likewise.
647         (dump_hex): Likewise.
648         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
649         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
650         (opt_info_switch_p): Update handling of default
651         MSG_OPTIMIZED_LOCATIONS to cope with default of
652         MSG_PRIORITY_USER_FACING.
653         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
654         masking the dump_kind.
655         (selftest::test_capture_of_dump_calls): Update test_dump_context
656         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
657         than MSG_ALL.  Generalize scope test to be run at all four
658         combinations of with/without MSG_PRIORITY_USER_FACING and
659         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
660         for each of the two values.
661         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
662         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
663         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
664         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
665         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
666         with MSG_PRIORITY_*.
667         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
668         dump messages as MSG_PRIORITY_USER_FACING.
669         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
670         about the interaction with MSG_PRIORITY_*.
672 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
674         * varasm.c (output_constant): Add new parameter merge_strings.
675         Make strings properly zero terminated in merge string sections.
676         (mergeable_string_section): Don't fail if the last char is non-zero.
677         (assemble_variable_contents): Handle merge string sections.
678         (assemble_variable): Likewise.
679         (assemble_constant_contents): Likewise.
680         (output_constant_def_contents): Likewise.
681         (output_constructor_array_range,
682         output_constructor_regular_field): Adjust call to output_constant.
683         (output_object_block): Adjust call to assemble_constant_contents
684         and assemble_variable_contents.
686 2018-10-04  Martin Liska  <mliska@suse.cz>
688         PR c/87483
689         * cgraphunit.c (process_function_and_variable_attributes):
690         Warn about a function with alias attribute and a body.
692 2018-10-04  Martin Liska  <mliska@suse.cz>
694         PR ipa/82625
695         * multiple_target.c (redirect_to_specific_clone): New function.
696         (ipa_target_clone): Use it.
697         * tree-inline.c: Fix comment.
699 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
701         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
702         fields.
703         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
704         (gcc::dump_manager::register_pass): New member function, adapted
705         from loop body in gcc::pass_manager::register_pass, adding a
706         call to update_dfi_for_opt_info.
707         (gcc::dump_manager::opt_info_enable_passes): Store the
708         -fopt-info options into the new fields.  Move the loop
709         bodies into...
710         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
711         function.
712         * dumpfile.h (struct opt_pass): New forward decl.
713         (gcc::dump_manager::register_pass): New decl.
714         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
715         (class gcc::dump_manager): Add fields "m_optgroup_flags",
716         "m_optinfo_flags", and "m_optinfo_filename".
717         * passes.c (gcc::pass_manager::register_pass): Move all of the
718         dump-handling code to gcc::dump_manager::register_pass.
720 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
722         PR rtl-optimization/87466
723         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
724         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
725         * doc/tm.texi: Regenerate.
726         * ira-lives.c (process_bb_node_lives): Use the new target hook.
727         * lra-lives.c (process_bb_lives): Likewise.
728         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
729         Define.
731 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
733         * params.c (add_params): Fix initialization.
735 2018-10-04  Martin Liska  <mliska@suse.cz>
737         PR gcov-profile/84107
738         * tree-profile.c (init_ic_make_global_vars):
739         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
740         Come up with new ic_tuple* variables.  Emit
741         __gcov_indirect_call{,_topn} variables.
742         (gimple_gen_ic_profiler): Access the variable
743         and emit gimple.
744         (gimple_gen_ic_func_profiler): Access
745         __gcov_indirect_call.callee field.
746         (gimple_init_gcov_profiler): Use ptr_type_node.
747         * value-prof.c (gimple_ic): Use ptr_type_node.
749 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
751         PR tree-optimization/85787
752         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
753         into this function and add support for detecting multiple phis.
754         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
756 2018-10-04  Martin Liska  <mliska@suse.cz>
758         PR ipa/87491
759         * ipa-inline.c (inline_to_all_callers_1):
760         Call ultimate_alias_target for node being inlined.
762 2018-10-03  Jeff Law  <law@redhat.com>
764         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
765         target's wchar_t.
766         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
767         * tree.h (get_typenode_from_name): Prototype.
769 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
771         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
772         Change operand 2 predicate to nonimmediate_operand.
773         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
775 2018-10-03  Martin Sebor  <msebor@redhat.com>
776             Jeff Law  <law@redhat.com>
778         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
779         initialize it.
780         (get_string_length): Detect unterminated arrays.
781         (format_string): Same.
782         (format_directive): Warn about unterminated arrays.
783         (handle_gimple_call): Mark statements with no_warning as needed.
785 2018-10-03  Jim Wilson  <jimw@sifive.com>
787         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
788         also define __riscv_abi_rve.  Delete trailing white space.
790 2018-10-03  Paul Koning  <ni1d@arrl.net>
792         Enable LRA register allocator for PDP11.
793         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
794         (R): Likewise.
795         (D): Likewise.
796         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
797         * config/pdp11/pdp11.opt (-mlra): New option.
798         * doc/invoke.texi (PDP-11 Options): Document -mlra.
800 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
802         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
803         (*<absneg:code>extend<mode>xf2): Ditto.
805 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
807         PR tree-optimization/87415
808         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
809         precision fields.
811 2018-10-02  Jeff Law  <law@redhat.com>
813         * gimple-fold.c (get_range_strlen): Only set *nonstr when
814         an unterminated string is discovered.  Bubble up range
815         even for unterminated strings.
816         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
817         indicates the string was not terminated via NONSTR.
819 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
821         * tree-vrp.c (extract_range_from_unary_expr): Special case all
822         pointer conversions.
823         Do not do anything special for anti-ranges.
825 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
827         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
828         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
830 2018-10-03  Martin Liska  <mliska@suse.cz>
832         PR gcov-profile/86109
833         * coverage.c (coverage_begin_function): Do not
834         mark lambdas as artificial.
835         * tree-core.h (struct GTY): Remove tm_clone_flag
836         and introduce new lambda_function.
837         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
839 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
841         PR target/87474
842         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
843         P8_VECTOR and VSX are enabled.
845 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
847         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
848         0x3907 as CPU model number.
850 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
852         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
853         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
854         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
855         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
856         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
857         * config/s390/s390.md: Likewise. Rename also the cpu attribute
858         value from arch12 to z14.
860 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
862         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
863         (isinfxf2): Ditto.
864         (isinf<mode>2): Ditto.
866 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
868         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
869         before emitting fxam.  Perform calculations in XFmode.
871 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
873         * match.pd (((X /[ex] A) +- B) * A): New transformation.
875 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
877         PR middle-end/87319
878         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
879         * tree.c (signed_or_unsigned_type_for): Handle complex.
881 2018-10-02  Jeff Law  <law@redhat.com>
883         * gimple-fold.c (get_range_strlen): Remove dead code.
885 2018-10-02  Martin Sebor  <msebor@redhat.com>
886             Jeff Law  <law@redhat.com>
888         * builtins.c (unterminated_array): Add new arguments.
889         If argument is not terminated, bubble up size and exact
890         state to callers.
891         (expand_builtin_strnlen): Detect, avoid expanding
892         and diagnose unterminated arrays.
893         (c_strlen): Fill in offset of start of unterminated strings.
894         * builtins.h (unterminated_array): Update prototype.
896 2018-10-02  Richard Biener  <rguenther@suse.de>
898         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
899         of haddv4df, first reduce to SSE width and exploit the fact
900         that we only need element zero with the reduction result.
901         (reduc_plus_scal_v2df): Likewise.
903 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
905         * dojump.h (do_jump): Delete.
906         (do_jump_1): Likewise.
907         (split_comparison): Move around.
908         * dojump.c (do_jump): Make static.
909         (do_jump_1): Likewise.
910         (jumpifnot): Move around.
911         (jumpifnot_1): Likewise.
912         (jumpif): Likewise.
913         (jumpif_1): Likewise.
914         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
916 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
918         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
919         insns in the delay slot and add_insn_after for the jump insn.
921 2018-10-02  Richard Biener  <rguenther@suse.de>
923         * tree-inline.c (expand_call_inline): Use the location of
924         the callee declaration for the inline-entry marker.
925         * final.c (notice_source_line): Remove special-casing of
926         NOTE_INSN_INLINE_ENTRY.
928 2018-10-01  Carl Love  <cel@us.ibm.com>
930         PR 69431
931         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
932         (__builtin_mtfsb0): New.
933         (__builtin_mtfsb1): New.
934         ( __builtin_set_fpscr_rn): New.
935         (__builtin_set_fpscr_drn): New.
936         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
937         (rs6000_expand_set_fpscr_rn_builtin): Add.
938         (rs6000_expand_set_fpscr_drn_builtin): Add.
939         (rs6000_expand_builtin): Add case statement entries for
940         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
941         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
942         RS6000_BUILTIN_MFFSL.
943         (rs6000_init_builtins): Add ftype initialization and def_builtin
944         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
945         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
946         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
947         rs6000_mffscdrn): Add define_insn.
948         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
949         * doc/extend.texi: Add documentation for the builtins.
951 2018-10-01  Richard Biener  <rguenther@suse.de>
953         PR tree-optimization/87465
954         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
955         causing branch miscounts.
957 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
959         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
960         aarch64_option_default_param):  New.
961         (params.h): Include.
962         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
963         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
964         stack-clash protection validation code.
966 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
968         * params.c (validate_param): New.
969         (add_params): Use it.
970         (set_param_value): Refactor param validation into validate_param.
971         (diagnostic.h): Include.
972         * diagnostic.h (diagnostic_ready_p): New.
974 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
976         * params.c (set_param_value):
977         Add index of parameter being validated.
978         * common/common-target.def (option_validate_param): New.
979         * common/common-targhooks.h (default_option_validate_param): New.
980         * common/common-targhooks.c (default_option_validate_param): New.
981         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
982         * doc/tm.texi: Regenerate.
984 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
986         PR target/86486
987         * config/aarch64/aarch64.c (aarch64_override_options_internal):
988         Add validation for stack-clash parameters and set defaults.
990 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
992         PR target/86486
993         * configure.ac: Add stack-clash-protection-guard-size.
994         * doc/install.texi: Document it.
995         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
996         * params.def: Update comment for guard-size.
997         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
998         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
999         * configure: Regenerate.
1001 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1003         PR target/86486
1004         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
1005         STACK_DYNAMIC_OFFSET): New.
1006         * config/aarch64/aarch64.c (aarch64_layout_frame):
1007         Update outgoing args size.
1008         (aarch64_stack_clash_protection_alloca_probe_range,
1009         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1011 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1013         PR target/86486
1014         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
1015         probe ranges.
1016         * target.def (stack_clash_protection_alloca_probe_range): New.
1017         (stack_clash_protection_final_dynamic_probe): Remove.
1018         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
1019         (default_stack_clash_protection_final_dynamic_probe): Remove.
1020         * targhooks.c: Likewise.
1021         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1022         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
1023         * doc/tm.texi: Regenerate.
1025 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1027         PR target/86486
1028         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
1029         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
1030         aarch64_clamp_to_uimm12_shift): New.
1031         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
1032         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
1034 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1036         PR target/86486
1037         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
1039 2018-10-01  Jeff Law  <law@redhat.com>
1040             Richard Sandiford <richard.sandiford@linaro.org>
1041             Tamar Christina  <tamar.christina@arm.com>
1043         PR target/86486
1044         * config/aarch64/aarch64.md
1045         (probe_stack_range): Add k (SP) constraint.
1046         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
1047         STACK_CLASH_MAX_UNROLL_PAGES): New.
1048         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
1049         stack probes for stack clash.
1050         (aarch64_allocate_and_probe_stack_space): New.
1051         (aarch64_expand_prologue): Use it.
1052         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
1053         (aarch64_sub_sp): Add emit_move_imm optional param.
1055 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
1057         PR tree-optimization/87261
1058         * match.pd: Remove trailing whitespace.
1059         Add (x & y) | ~(x | y) -> ~(x ^ y),
1060         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
1062 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
1064         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
1065         constraints.
1066         (ashlsi3_insn): Update instruction constraints.
1067         (ashrsi3_insn): Likewise.
1068         (rotrsi3): Likewise.
1069         (add_shift): Likewise.
1070         * config/arc/constraints.md (Csz): New 32 bit constraint. It
1071         avoids placing in the limm field small constants which, otherwise,
1072         could end into a small instruction.
1074 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
1076         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
1077         destination register is not odd-even.
1078         (umaddsidi4_split): Likewise.
1080 2018-10-01  Richard Biener  <rguenther@suse.de>
1082         * tree-inline.c (expand_call_inline): Store origin of fn
1083         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
1084         * tree.c (block_ultimate_origin): Simplify and do some
1085         checking.
1087 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
1089         * config/i386/mmx.md (EMMS): New int iterator.
1090         (emms): New int attribute.
1091         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
1092         EMMS int iterator.  Explicitly declare clobbers.
1093         (mmx_emms): Remove expander.
1094         (mmx_femms): Ditto.
1095         * config/i386/predicates.md (emms_operation): Remove predicate.
1096         (vzeroall_pattern): New predicate.
1097         (vzeroupper_pattern): Rename from vzeroupper_operation.
1098         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
1099         vzeroupper_pattern and vzeroall_pattern predicates.
1101 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
1103         PR rtl-optimization/86939
1104         * ira-lives.c (make_hard_regno_born): Rename from this...
1105         (make_hard_regno_live): ... to this.  Remove update to conflict
1106         information.  Update function comment.
1107         (make_hard_regno_dead): Add conflict information update.  Update
1108         function comment.
1109         (make_object_born): Rename from this...
1110         (make_object_live): ... to this.  Remove update to conflict information.
1111         Update function comment.
1112         (make_object_dead):  Add conflict information update.  Update function
1113         comment.
1114         (mark_pseudo_regno_live): Call make_object_live.
1115         (mark_pseudo_regno_subword_live): Likewise.
1116         (mark_hard_reg_dead): Update function comment.
1117         (mark_hard_reg_live): Call make_hard_regno_live.
1118         (process_bb_node_lives): Likewise.
1119         * lra-lives.c (make_hard_regno_born): Rename from this...
1120         (make_hard_regno_live): ... to this.  Remove update to conflict
1121         information.  Remove now uneeded check_pic_pseudo_p argument.
1122         Update function comment.
1123         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
1124         to conflict information.  Update function comment.
1125         (mark_pseudo_live): Remove update to conflict information.  Update
1126         function comment.
1127         (mark_pseudo_dead): Add conflict information update.
1128         (mark_regno_live): Call make_hard_regno_live.
1129         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
1130         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
1132 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
1134         PR target/87370
1135         * config/i386/i386.c (construct_container): Use TImode for
1136         BLKmode values in 2 integer registers.
1138 2018-09-29  Jeff Law  <law@redhat.com>
1140         * builtins.c (unterminated_array): Pass in c_strlen_data * to
1141         c_strlen rather than just a tree *.
1142         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
1143         Update recursive calls appropriately.  If caller did not provide a
1144         suitable data pointer, create a local one.  When a non-terminated
1145         string is discovered, bubble up information about the string via the
1146         c_strlen_data object.
1147         * builtins.h (c_strlen): Update prototype.
1148         (c_strlen_data): New structure.
1149         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
1150         For a type 2 call, if c_strlen indicates a non-terminated string
1151         use the length of the non-terminated string.
1152         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
1154 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
1156         PR target/87467
1157         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
1158         __m512d type for __A argument rather than __m512.
1160 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
1162         * match.pd (simple_comparison): Don't optimize if either operand is
1163         a function pointer when target needs function pointer canonicalization.
1165 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1167         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
1168         power5 .. power9 to remove indirection.
1169         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
1170         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
1171         ASM_CPU_476_SPEC): Delete.
1172         (ASM_CPU_SPEC): Adjust.
1173         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
1174         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
1176 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1178         * config.in: Delete HAVE_AS_DCI.
1179         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
1180         * config/rs6000/rs6000.h: Ditto.
1181         * configure.ac: Delete HAVE_AS_DCI.
1182         * configure: Regenerate.
1184 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1186         * config.in (HAVE_AS_LWSYNC): Delete.
1187         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1188         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
1189         do it as a .long .
1190         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1191         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
1192         as a .long .
1193         * configure.ac: Delete HAVE_AS_LWSYNC.
1194         * configure: Regenerate.
1196 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
1197             Pierre-Marie de Rodat  <derodat@adacore.com>
1199         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
1200         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
1201         (cgraph_node::create_thunk): Add indirect_offset parameter.
1202         (thunk_adjust): Likewise.
1203         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
1204         and initialize the corresponding field with it.
1205         (cgraph_node::dump): Dump indirect_offset field.
1206         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
1207         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
1208         (thunk_adjust): Add indirect_offset parameter and deal with it.
1209         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
1210         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
1211         or if the thunk is external or local.  Fix formatting.  Do not chain
1212         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
1213         if any, in the GIMPLE representation.
1214         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
1215         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
1216         (input_node): Read indirect_offset field.
1217         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
1218         call to thunk_adjust.
1219         * tree-nested.c (struct nesting_info): Add thunk_p field.
1220         (create_nesting_tree): Set it.
1221         (convert_all_function_calls): Copy static chain from targets to thunks.
1222         (finalize_nesting_tree_1): Return early for thunks.
1223         (unnest_nesting_tree_1): Do not finalize thunks.
1224         (gimplify_all_functions): Do not gimplify thunks.
1226 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
1228         * opt-suggestions.c (option_proposer::build_option_suggestions):
1229         Release "option_values".
1231 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
1233         * coverage.c (get_coverage_counts): Convert problem-reporting dump
1234         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
1235         * dumpfile.c (kind_as_string): New function.
1236         (dump_loc): Rather than a hardcoded prefix of "note: ", use
1237         kind_as_string to vary the prefix based on dump_kind.
1238         (selftest::test_capture_of_dump_calls): Update for above.
1240 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
1242         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
1243         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
1245 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
1247         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
1248         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
1249         INVALID_REGNUM instead of FPSR_REG.
1250         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
1251         * config/i386/i386.md: Update comment of FP compares.
1252         (fldenv): Do not clobber FPSR_REG.
1254 2018-09-28  Richard Biener  <rguenther@suse.de>
1256         * tree.h (BLOCK_ORIGIN): New.
1257         * omp-expand.c (grid_expand_target_grid_body): Assign
1258         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
1259         * tree-inline.c (remap_block): Likewise.
1260         * auto-profile.c (get_function_decl_from_block): Simplify
1261         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
1262         * langhooks.c (lhd_print_error_function): Likewise.
1263         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
1264         Likewise.
1265         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
1266         * tree.c (block_nonartificial_location): Likewise.
1267         (block_ultimate_origin): Likewise.
1268         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
1269         no longer needed LTO case.
1271 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
1272             Jan Hubicka  <jh@suse.cz>
1273             Martin Jambor  <mjambor@suse.cz>
1275         * simplify-rtx.c (simplify_merge_mask): New function.
1276         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
1277         same masks are used in op1 or op2.
1278         (test_vec_merge): New function.
1279         (test_vector_ops): Call test_vec_merge.
1281 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
1283         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
1284         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
1285         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
1286         (cypress_costs): Set it.
1287         (supersparc_costs): Likewise.
1288         (hypersparc_costs): Likewise.
1289         (leon_cost): Likewise.
1290         (leon3_costs): Likewise.
1291         (sparclet_costs): Likewise.
1292         (ultrasparc_costs): Likewise.
1293         (ultrasparc_costs): Likewise.
1294         (niagara_costs): Likewise.
1295         (niagara2_costs): Likewise.
1296         (niagara3_costs): Likewise.
1297         (niagara4_costs): Likewise.
1298         (niagara7_costs): Likewise.
1299         (m8_costs): Likewise.
1300         (TARGET_CAN_FOLLOW_JUMP): Define.
1301         (pass_work_around_errata::gate): Minor tweak.
1302         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
1303         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
1304         Automaitcally clear MASK_FSMULD mask for V7 processors.
1305         (sparc_can_follow_jump): New static function.
1306         (output_ubranch): Deal with CROSSING_JUMP_P.
1307         (sparc_use_sched_lookahead): Rewrite using switch statement.
1308         (sparc_issue_rate): Reorder.
1309         (sparc_branch_cost): New function.
1311 2018-09-27  Martin Sebor  <msebor@redhat.com>
1313         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
1314         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
1315         (int_fits_type_p): Same.
1317 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
1319         * config/i386/i386.md (FPCR_REG): Remove.
1320         (UNSPEC_FLDCW): Remove.
1321         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
1322         (x86_fldcw_1): Remove insn pattern.
1323         (fnstenv): Do not clobber FPCR_REG.
1324         (fldenv): Ditto.
1325         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
1326         (CALL_USED_REGISTERS): Ditto.
1327         (REG_ALLOC_ORDER): Ditto.
1328         (REG_CLASS_CONTENTS): Ditto.
1329         (HI_REGISTER_NAMES): Ditto.
1330         (ADDITIONAL_REGISTER_NAMES): Use defines instead
1331         of numerical constants.
1332         * config/i386/i386.c (regclass_map): Remove fpsr register.
1333         (dbx_register_map): Ditto.
1334         (dbx64_register_map): Ditto.
1335         (svr4_dbx_register_map): Ditto.
1336         (print_reg): Do not handle FPCR_REG.
1338 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
1340         PR target/87149
1341         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
1342         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
1343         Delete, always treat as true.
1344         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1345         Ditto.  Simplify remaining code.
1346         * config/powerpcspe/powerpcspe.h: Ditto.
1347         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
1348         Simplify remaining code.
1349         (rs6000_expand_builtin): Ditto.
1350         * config/rs6000/rs6000.h: Ditto.
1351         * configure.ac: Ditto.
1352         * configure: Regenerate.
1354 2018-09-27  Martin Liska  <mliska@suse.cz>
1356         * coverage.c (get_coverage_counts): Revert the formatting
1357         of missing profile opt info.
1359 2018-09-27  Richard Biener  <rguenther@suse.de>
1361         PR debug/37801
1362         PR debug/87440
1363         * dwarf2out.c (set_block_origin_self): Do not mark outermost
1364         block as we do not output that.
1365         (gen_inlined_subroutine_die): Elide the originally outermost
1366         block, matching what we do for concrete instances.
1367         (decls_for_scope): Add parameter specifying whether to recurse
1368         to subblocks.
1370 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
1371             Tom de Vries  <tom@codesourcery.com>
1373         PR 82089
1375         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
1376         STORE_FLAG_VALUE == 1.
1378 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
1380         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
1381         constant definitions.
1382         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
1383         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
1384         ("speculation_barrier"): New expander definition.
1386 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
1388         PR gcov-profile/86957
1389         * common.opt: New warning option -Wmissing-profile.
1390         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
1391         * doc/invoke.texi: Document -Wmissing-profile.
1393 2018-09-26  Jim Wilson  <jimw@sifive.com>
1395         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
1396         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
1398 2018-09-26  Martin Sebor  <msebor@redhat.com>
1400         * tree.c (zerop): Change return type to bool.
1401         (integer_zerop, integer_onep, integer_each_onep): Same.
1402         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1403         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1404         (real_onep, real_minus_onep, chain_index): Same.
1405         (print_type_hash_statistics, type_list_equal): Same.
1406         * tree.h (zerop): Same.
1407         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
1408         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1409         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1410         (real_onep, real_minus_onep, chain_index): Same.
1411         (print_type_hash_statistics, type_list_equal): Same.
1413 2018-09-26  Jim Wilson  <jimw@sifive.com>
1415         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
1417 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
1419         PR target/87414
1420         * config/i386/i386.c: Include debug.h and dwarf2out.h.
1421         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
1422         call.
1424 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
1426         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
1428 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
1430         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
1431         and FP_SECOND_SSE_REGS.
1432         (REG_CLASS_NAMES): Ditto.
1433         (REG_CLASS_CONTENTS): Ditto.
1434         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
1435         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
1436         (ix86_preferred_output_reload_class): Ditto.
1437         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
1438         clobber constraint to "=&f".
1439         (fix_truncdi_i387): Ditto.
1440         (lrintxfdi2): Ditto.
1441         (fistdi2_<rounding>): Ditto.
1442         (fpremxf4_i387): Change "=u" constraint to "=f".
1443         (fprem1xf4_i387): Ditto.
1444         (sincosxf3): Ditto.
1445         (fptanxf4_i387): Ditto.
1446         (fxtractxf3_i387): Ditto.
1447         (fscalexf4_i387): Ditto.
1448         (atan2xf3): Change "u" constraint to "f".
1449         (fyl2xxf3_i387): Ditto.
1450         (fyl2xp1xf3_i387): Ditto.
1452 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
1454         PR target/87439
1455         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
1456         for removed I387_MASK_PM entity.
1459 2018-09-26  Jeff Law  <law@redhat.com>
1460         Revert
1461         2018-09-26  Alexey Neyman  <stilor@att.net>
1463         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1464         headers are no longer pulled in by <isl/val.h>.
1466 2018-09-26  Richard Biener  <rguenther@suse.de>
1468         PR debug/87443
1469         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
1470         or concrete instance DIE to the tree.  Create abstract origin
1471         attributes also for concrete instances.
1473 2018-09-26  Alexey Neyman  <stilor@att.net>
1475         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1476         headers are no longer pulled in by <isl/val.h>.
1478 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
1480         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
1481         Use new helper functions.
1482         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
1483         Use new helper functions.
1484         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
1485         aarch_mm_needs_release): New declarations.
1486         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
1487         aarch_mm_needs_release): New.
1489 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1491         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
1492         (arm32_output_mi_thunk): Deal with long calls.
1494 2018-09-26  Richard Biener  <rguenther@suse.de>
1496         PR debug/87428
1497         PR debug/87362
1498         * tree-inline.c (expand_call_inline): When the location
1499         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
1500         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
1501         the inserted BLOCK to make inlined_function_outer_scope_p
1502         recognize it.
1503         * dwarf2out.c (add_call_src_coords_attributes): Do not add
1504         coords for reserved locations.
1506 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
1508         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
1509         (*call_indirect_nonlocal_sysv<mode>): Ditto.
1510         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
1511         (*sibcall_nonlocal_sysv<mode>): Ditto.
1512         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
1513         (<bd>_<mode>): Ditto.
1514         (<bd>tf_<mode>): Ditto.
1516 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
1518         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
1519         control string as a list of templates instead of as C code.
1520         (*altivec_movti): Ditto.
1521         * config/rs6000/darwin.md (movdf_low_di): Ditto.
1523 2018-09-25  Jim Wilson  <jimw@sifive.com>
1525         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
1526         when target symbol is weak.
1528 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1530         PR c/87387
1531         * builtins.c (unterminated_array): Simplify.
1532         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
1533         where pointer arithmetic is safe.
1535 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
1537         PR target/86987
1538         * config/rs6000/altivec.md (altivec_vspltb): Use
1539         const_0_to_15_operand instead of u5bit_cint_operand.
1540         (*altivec_vspltb_internal): Ditto.
1541         (altivec_vspltb_direct): Ditto.
1542         (altivec_vsplth): Use const_0_to_7_operand instead of
1543         u5bit_cint_operand.
1544         (*altivec_vsplth_internal): Ditto.
1545         (altivec_vsplth_direct): Ditto.
1546         (altivec_vspltw): Use const_0_to_3_operand instead of
1547         u5bit_cint_operand.
1548         (*altivec_vspltw_internal): Ditto.
1549         (altivec_vspltw_direct): Ditto.
1550         (altivec_vspltsf): Ditto.
1551         (*altivec_vspltsf_internal): Ditto.
1552         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
1553         various splats with the proper size immediate.  Reorder the various
1554         cases by ascending size of immediate, and put all such together.
1556 2018-09-25  Richard Biener  <rguenther@suse.de>
1558         PR debug/83941
1559         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
1560         GC-ification.
1561         (maybe_create_die_with_external_ref): Do not create
1562         DW_TAG_imported_unit here.
1563         (add_abstract_origin_attribute): Handle external BLOCK refs.
1564         (dwarf2out_abstract_function): Simplify LTO case.
1565         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
1566         rather than using maybe_create_die_with_external_ref.
1568 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
1570         PR target/71278
1571         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
1572         (frndintxf2_mask_pm_i387): Ditto.
1573         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
1574         Enable for !flag_trapping_math.
1575         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
1576         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
1577         Change operand 1 predicate to nonimmediate_operand.
1578         (attr "i387_cw"): Remove mask_pm.
1579         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
1580         (enum ix86_entity): Remove I387_MASK_PM.
1581         * config/i386/i386.c (ix86_i387_mode_needed): Do not
1582         handle I387_MASK_PM.
1583         (ix86_mode_needed): Ditto.
1584         (ix86_mode_after): Ditto.
1585         (ix86_mode_entry): Ditto.
1586         (ix86_mode_exit): Ditto.
1587         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
1589 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
1591         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
1592         to_update_switch_stmts to vNULL instead of calling create on them
1593         immediately.
1595 2018-09-25  Richard Biener  <rguenther@suse.de>
1597         PR tree-optimization/87402
1598         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
1599         (visit_phi): Re-instantiate handling of supposed to be VARYING
1600         but non-VARYING backedge value.
1602 2018-09-25  Richard Biener  <rguenther@suse.de>
1604         PR debug/83941
1605         * dwarf2out.c (struct sym_off_pair): New.
1606         (external_die_map): New global.
1607         (lookup_decl_die): When in LTO create DIEs lazily from the
1608         external_die_map.
1609         (lookup_block_die): New function, create DIEs lazily in LTO.
1610         (equate_block_to_die): New function.
1611         (dwarf2out_die_ref_for_decl): During WPA get the association
1612         from the external DIE map.
1613         (dwarf2out_register_external_die): Record mapping into the
1614         external DIE map.
1615         (maybe_create_die_with_external_ref): New function split out from
1616         DIE generation part of old dwarf2out_register_external_die.
1617         (add_abstract_origin_attribute): Do not return the DIE.  When
1618         in LTO reference externals directly.
1619         (dwarf2out_abstract_function): When in LTO ignore calls for
1620         decls with external DIEs (already present abstract instances).
1621         (gen_call_site_die): Adjust.
1622         (add_high_low_attributes): Likewise.
1623         (gen_lexical_block_die): Likewise.
1624         (gen_inlined_subroutine_die): Likewie.
1625         (gen_block_die): Likewise.
1626         (dwarf2out_inline_entry): Likewise.
1627         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
1628         DIEs.
1630 2018-09-25  Martin Liska  <mliska@suse.cz>
1632         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
1633         integers and not by a float value.
1635 2018-09-25  Martin Liska  <mliska@suse.cz>
1637         PR fortran/87394
1638         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
1639         instead of NULL.
1640         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
1641         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
1642         * godump.c (go_format_type): Remove extra parenthesis.
1644 2018-09-25  Martin Liska  <mliska@suse.cz>
1646         * alias.c (set_dest_equal_p): Remove unused function.
1647         * config/i386/i386.c (def_builtin_pure2): Likewise.
1648         * diagnostic-show-locus.c (class layout): Remove
1649         unused field.
1650         (layout::layout): Likewise here.
1651         * dump-context.h (class temp_dump_context): Likewise.
1652         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
1653         (add_AT_loclistsptr): Likewise.
1654         (add_AT_offset): Likewise.
1655         (get_AT_hi_pc): Likewise.
1656         (is_comdat_die): Likewise.
1657         (type_is_enum): Likewise.
1658         (ceiling): Likewise.
1659         (add_AT_vms_delta): Likewise.
1660         (is_class_die): Likewise.
1661         * edit-context.c (class line_event): Remove unused field.
1662         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
1663         unused function.
1664         * ipa-cp.c (ipa_get_vr_lat): Likewise.
1665         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
1666         (ok_for_base_p_nonstrict): Likewise.
1667         * tree-chrec.c (is_not_constant_evolution): Likewise.
1668         (chrec_fold_poly_cst): Likewise.
1669         * tree-if-conv.c (has_pred_critical_p): Likewise.
1670         * tree-ssa-coalesce.c (print_exprs): Likewise.
1671         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
1672         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
1673         * tree-vrp.c (value_ranges_intersect_p): Likewise.
1674         (value_range_nonnegative_p): Likewise.
1676 2018-09-25  Martin Liska  <mliska@suse.cz>
1678         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
1679         Do not handle "GNU Pascal".
1680         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1681         Likewise.
1682         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
1683         from documentation. Likewise.
1684         * dbxout.c (dbxout_range_type): Likewise.
1685         * doc/cpp.texi: Likewise.
1686         * doc/extend.texi: Likewise.
1687         * doc/frontends.texi: Likewise.
1688         * doc/invoke.texi: Remove Pascal entry.
1689         * tree.def (CLEANUP_POINT_EXPR): Likewise.
1690         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
1692 2018-09-25  Martin Liska  <mliska@suse.cz>
1694         PR middle-end/86078
1695         * doc/invoke.texi: Document all parameters and remove default
1696         of the parameters.
1698 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
1700         PR bootstrap/87417
1701         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
1702         contains HOST_WIDE_INTs when computing its size.
1704 2018-09-24  Jim Wilson  <jimw@sifive.com>
1706         PR target/87391
1707         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
1708         not TARGET_RVE.
1709         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
1711 2018-09-24  Andrew Pinski  <apinski@marvell.com>
1713         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
1714         access prev before checking it for NULLness in the
1715         AARCH64_FUSE_CMP_BRANCH case.
1717 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
1719         PR target/82699
1720         * config/i386/i386.c (rest_of_insert_endbranch): Set
1721         endbr_queued_at_entrance to true and don't insert ENDBR if
1722         x86_function_profiler will be called.
1723         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
1724         is true.
1725         * config/i386/i386.h (machine_function): Add
1726         endbr_queued_at_entrance.
1728 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
1730         * genattrtab.c (mk_attr_alt): Use alternative_mask.
1731         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
1732         types.
1733         (check_attr_test): Use alternative_mask.
1734         (get_attr_value): Likewise.
1735         (compute_alternative_mask): Use alternative_mask and XWINT.
1736         (make_alternative_compare): Use alternative_mask.
1737         (attr_alt_subset_p): Use XWINT.
1738         (attr_alt_subset_of_compl_p): Likewise.
1739         (attr_alt_intersection): Use alternative_mask and XWINT.
1740         (attr_alt_union): Likewise.
1741         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
1742         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
1743         (simplify_test_exp): Use alternative_mask and XWINT.
1744         (write_test_expr): Use alternative_mask and XWINT, adjust bit
1745         number calculation to support 64 bits.  Generate code that
1746         checks 64-bit masks.
1747         (main): Use alternative_mask.
1748         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
1750 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
1752         PR target/80080
1753         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
1754         RETURN+USE when returning via %r14.
1756 2018-09-24  Martin Liska  <mliska@suse.cz>
1758         * gcov.c (output_lines): Print colorization legend
1759         for both flag_use_colors and flag_use_hotness_colors.
1760         Reword the help.
1762 2018-09-24  Martin Liska  <mliska@suse.cz>
1764         * coverage.c (get_coverage_counts): Use warning_at
1765         with current_function_decl location. Use %qD in warning
1766         message.
1768 2018-09-24  Martin Liska  <mliska@suse.cz>
1770         * memory-block.h (memory_block_pool::release): Annotate with
1771         valgrind that the memory is not accessible.
1773 2018-09-24  Martin Liska  <mliska@suse.cz>
1775         PR sanitizer/85774
1776         * asan.c: Make asan_handled_variables extern.
1777         * asan.h: Likewise.
1778         * cfgexpand.c (expand_stack_vars): Make sure
1779         a representative is unpoison if another
1780         variable in the partition is handled by
1781         use-after-scope sanitization.
1783 2018-09-24  Richard Biener  <rguenther@suse.de>
1785         PR tree-optimization/63155
1786         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
1787         the worklist when the edge of the respective argument isn't
1788         executable.
1790 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
1792         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
1793         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
1794         (MASK_CLASS_P): Update for rename.
1795         (MAYBE_MASK_CLASS_P): Ditto.
1796         (REG_CLASS_NAMES): Update.
1797         (REG_CLASS_CONTENT): Update.
1798         * config/i386/i386.c (regclass_map): Update for MASK_REG
1799         and ALL_MASK_REGS rename.
1800         * config/i386/constraints.md (Yk): Update for rename.
1801         (k): Ditto.
1803 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
1805         * config/i386/i386.h (enum reg_class): Remove
1806         EVEX_SSE_REGS and MOD4_SSE_REGS.
1807         (REG_CLASS_NAMES): Update.
1808         (REG_CLASS_CONTENT): Update.
1809         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
1810         registers as ALL_SSE_REGS.
1811         (ix86_additional_allocno_class_p): Remove.
1812         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
1813         (ix86_register_priority): Lower priority of EVEX SSE registers.
1814         Use IN_RANGE macro where appropriate.
1815         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
1816         AVX-5124VNNIW checks.
1817         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
1818         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
1819         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
1820         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
1821         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
1822         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
1823         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
1824         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
1825         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
1826         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
1827         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
1828         * config/i386/constraints.md (Yh): Remove.
1830 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
1832         * config/i386/i386.c (regclass_map): Declare integer REX registers
1833         as GENERAL_REGS.
1835 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
1837         * doc/service.texi (Service): Switch the fsf.org link to https.
1839 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
1841         PR target/86798
1842         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1843         Define to speculation_safe_value_not_needed.
1845 2018-09-21  Florian Weimer  <fweimer@redhat.com>
1847         PR middle-end/81035
1848         * doc/extend.texi (Common Function Attributes): Mention that
1849         noreturn suppresses tail call optimization.
1851 2018-09-21  Jeff Law  <law@redhat.com>
1853         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
1854         vr_values::cleanup_edges_and_switches.
1855         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
1856         vr_values class.
1857         (identify_jump_threads): Remove EDGE_IGNORE handling.
1858         (execute_vrp): Move handling of to_remove_edges and
1859         to_update_switch_stmts into vr_values class member functions.
1860         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
1861         (to_update_switch_stmts): Likewise.
1862         * vr-values.c: Include cfghooks.h.
1863         (vr_values::vr_values): Initialize to_remove_edges and
1864         to_update_switch_stmts.
1865         (vr_values::~vr_values): Verify to_remove_edges and
1866         to_update_switch_stmts are empty.
1867         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
1868         (vr_values::cleanup_edges_and_switches): New member function.
1869         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
1870         function.  Add new data members.
1872 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
1874         PR tree-optimization/87309
1875         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
1876         calls with pflags and alt_flags.
1877         (selftest::test_capture_of_dump_calls): Add test of interaction of
1878         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
1880 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1882         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
1884 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1886         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
1888 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1890         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
1891         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
1892         (VXWORKS_LIBS_RTP): Minor reordering.
1894 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1896         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
1897         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
1899 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1901         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
1902         (PTRDIFF_TYPE): Likewise.
1904 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1906         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
1907         triplet, similar to support for VxWorks7.
1908         * config/vxworks-dummy.h: Provide a default definition
1909         of TARGET_VXWORKS64 to 0.
1911 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1913         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
1914         * config/vxworks-dummy.h: here.
1916 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1918         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
1920 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
1921             Bo Zhou  <zbo.zhou@hisilicon.com>
1923         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
1924         * config/aarch64/aarch64-tune.md: Regenerated.
1925         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
1926         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
1927         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
1929 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
1930             Julian Brown  <julian@codesourcery.com>
1932         * builtins.c (get_builtin_sync_mem): Handle address spaces.
1934 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
1936         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
1937         if the call takes a static chain.
1939 2018-09-21  Martin Liska  <mliska@suse.cz>
1941         * auto-profile.c (autofdo_source_profile::read): Do not
1942         set sum_all.
1943         (read_profile): Do not add working sets.
1944         (read_autofdo_file): Remove sum_all.
1945         (afdo_callsite_hot_enough_for_early_inline): Remove const
1946         qualifier.
1947         * coverage.c (struct counts_entry): Remove gcov_summary.
1948         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
1949         do not support GCOV_TAG_PROGRAM_SUMMARY.
1950         (get_coverage_counts): Remove summary and expected
1951         arguments.
1952         * coverage.h (get_coverage_counts): Likewise.
1953         * doc/gcov-dump.texi: Remove -w option.
1954         * gcov-dump.c (dump_working_sets): Remove.
1955         (main): Do not support '-w' option.
1956         (print_usage): Likewise.
1957         (tag_summary): Likewise.
1958         * gcov-io.c (gcov_write_summary): Do not dump
1959         histogram.
1960         (gcov_read_summary): Likewise.
1961         (gcov_histo_index): Remove.
1962         (gcov_histogram_merge): Likewise.
1963         (compute_working_sets): Likewise.
1964         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
1965         it not obsolete.
1966         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
1967         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
1968         (GCOV_HISTOGRAM_SIZE): Remove.
1969         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
1970         (struct gcov_summary): Simplify rapidly just
1971         to runs and sum_max fields.
1972         (gcov_histo_index): Remove.
1973         (NUM_GCOV_WORKING_SETS): Likewise.
1974         (compute_working_sets): Likewise.
1975         * gcov-tool.c (print_overlap_usage_message): Remove
1976         trailing empty line.
1977         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
1978         (output_lines): Remove program related line.
1979         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
1980         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
1981         histogram.
1982         (input_profile_summary): Do not read it.
1983         (merge_profile_summaries): And do not merge it.
1984         (input_symtab): Do not call removed function.
1985         * modulo-sched.c (sms_schedule): Do not print sum_max.
1986         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
1987         removed when histogram method was invented.
1988         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
1989         mode.
1990         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
1991         GCOV coding style.
1992         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
1993         and dump selected value.
1994         * profile.c (add_working_set): Remove.
1995         (get_working_sets): Likewise.
1996         (find_working_set): Likewise.
1997         (get_exec_counts): Do not work with working sets.
1998         (read_profile_edge_counts): Do not inform as sum_max is removed.
1999         (compute_branch_probabilities): Likewise.
2000         (compute_value_histograms): Remove argument for call of
2001         get_coverage_counts.
2002         * profile.h: Do not make gcov_summary const.
2004 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
2006         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
2008 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
2010         PR tree-optimization/86990
2011         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
2012         Check that the entire merged store group is made of constants only for
2013         overlapping stores.
2015 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
2017         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
2018         (VTABLE_VERIFICATION_SPEC): Likewise.
2019         (SANITIZER_EARLY_SPEC): Likewise.
2020         (SANITIZER_SPEC): Likewise.
2021         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
2022         * doc/invoke.texi (Link Options): Document -r.
2024 2018-09-20  Richard Biener <rguenther@suse.de>
2026         PR middle-end/87054
2027         * gimplify.c (gimplify_expr): Retain alignment of
2028         addressable lvalue in dereference.
2030 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
2032         PR bootstrap/87013
2033         * configure.ac: Check for .loc is_stmt support.
2034         * configure, config.in: Rebuilt.
2035         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
2036         if not supported.
2038 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
2040         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
2041         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
2042         -misel=no.
2044 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
2046         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2047         VECTOR_OTHER.
2048         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
2049         case VECTOR_OTHER.
2051 2018-09-20  Marek Polacek  <polacek@redhat.com>
2053         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
2055 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
2057         PR tree-optimization/87288
2058         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
2059         into account when determining PEELING_FOR_NITERS.
2061 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
2063         PR tree-optimization/86877
2064         * tree-vect-loop.c (vect_analyze_loop_2): Call
2065         vect_verify_datarefs_alignment.
2067 2018-09-19  Marek Polacek  <polacek@redhat.com>
2069         * doc/invoke.texi: Document -Wclass-conversion.
2071 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
2073         * config/pa/pa.c (pa_adjust_priority): Delete.
2074         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
2076         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
2077         (atomic_storehi): Likewise.
2078         (atomic_storesi): Likewise.
2079         (atomic_loaddi): Restore compare and swap exchange loop code.
2081 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
2083         PR rtl-optimization/86902
2084         * combine.c (try_combine): When changing the CC mode used, don't change
2085         an unrelated mode in other_insn to that new CC mode.
2087 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
2089         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
2090         with %T in place of calls to dump_generic_expr.
2091         (prune_runtime_alias_test_list): Likewise.
2092         (create_runtime_alias_checks): Likewise.
2093         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
2094         (vect_analyze_data_ref_dependence): Likewise.
2095         (vect_slp_analyze_data_ref_dependence): Likewise.
2096         (vect_record_base_alignment): Likewise.  Use %G in place of call
2097         to dump_gimple_stmt.
2098         (vect_compute_data_ref_alignment): Likewise.
2099         (verify_data_ref_alignment): Likewise.
2100         (vect_find_same_alignment_drs): Likewise.
2101         (vect_analyze_group_access_1): Likewise.
2102         (vect_analyze_data_ref_accesses): Likewise.
2103         (dependence_distance_ge_vf): Likewise.
2104         (dump_lower_bound): Likewise.
2105         (vect_prune_runtime_alias_test_list): Likewise.
2106         (vect_find_stmt_data_reference): Likewise.
2107         (vect_analyze_data_refs): Likewise.
2108         (vect_create_addr_base_for_vector_ref): Likewise.
2109         (vect_create_data_ref_ptr): Likewise.
2110         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
2111         (vect_can_advance_ivs_p): Likewise.
2112         (vect_update_ivs_after_vectorizer): Likewise.
2113         (vect_gen_prolog_loop_niters): Likewise.
2114         (vect_prepare_for_masked_peels): Likewise.
2115         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2116         (vect_determine_vectorization_factor): Likewise.
2117         (vect_is_simple_iv_evolution): Likewise.
2118         (vect_analyze_scalar_cycles_1): Likewise.
2119         (vect_analyze_loop_operations): Likewise.
2120         (report_vect_op): Likewise.
2121         (vect_is_slp_reduction): Likewise.
2122         (check_reduction_path): Likewise.
2123         (vect_is_simple_reduction): Likewise.
2124         (vect_create_epilog_for_reduction): Likewise.
2125         (vect_finalize_reduction:): Likewise.
2126         (vectorizable_induction): Likewise.
2127         (vect_transform_loop_stmt): Likewise.
2128         (vect_transform_loop): Likewise.
2129         (optimize_mask_stores): Likewise.
2130         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
2131         (vect_split_statement): Likewise.
2132         (vect_recog_over_widening_pattern): Likewise.
2133         (vect_recog_average_pattern): Likewise.
2134         (vect_determine_min_output_precision_1): Likewise.
2135         (vect_determine_precisions_from_range): Likewise.
2136         (vect_determine_precisions_from_users): Likewise.
2137         (vect_mark_pattern_stmts): Likewise.
2138         (vect_pattern_recog_1): Likewise.
2139         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2140         (vect_record_max_nunits): Likewise.
2141         (vect_build_slp_tree_1): Likewise.
2142         (vect_build_slp_tree_2): Likewise.
2143         (vect_print_slp_tree): Likewise.
2144         (vect_analyze_slp_instance): Likewise.
2145         (vect_detect_hybrid_slp_stmts): Likewise.
2146         (vect_detect_hybrid_slp_1): Likewise.
2147         (vect_slp_analyze_operations): Likewise.
2148         (vect_slp_analyze_bb_1): Likewise.
2149         (vect_transform_slp_perm_load): Likewise.
2150         (vect_schedule_slp_instance): Likewise.
2151         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2152         (vect_mark_stmts_to_be_vectorized): Likewise.
2153         (vect_init_vector_1): Likewise.
2154         (vect_get_vec_def_for_operand): Likewise.
2155         (vect_finish_stmt_generation_1): Likewise.
2156         (vect_check_load_store_mask): Likewise.
2157         (vectorizable_call): Likewise.
2158         (vectorizable_conversion): Likewise.
2159         (vectorizable_operation): Likewise.
2160         (vectorizable_load): Likewise.
2161         (vect_analyze_stmt): Likewise.
2162         (vect_is_simple_use): Likewise.
2163         (vect_get_vector_types_for_stmt): Likewise.
2164         (vect_get_mask_type_for_stmt): Likewise.
2165         * tree-vectorizer.c (increase_alignment): Likewise.
2167 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
2169         * doc/rtl.texi: Adjust vec_select description.
2170         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
2171         non-constant selectors.
2173 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
2175         * config/aarch64/aarch64-protos.h
2176         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
2177         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
2178         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
2179         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
2180         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
2181         (AARCH64_FL_PROFILE): Move index so flags are ordered.
2182         (AARCH64_ISA_RCPC8_4): New flag.
2183         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
2184         to aarch64_offset_9bit_signed_unscaled_p.
2185         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
2186         and use stlur.
2187         * config/aarch64/constraints.md (Ust): New constraint.
2188         * config/aarch64/predicates.md.
2189         (aarch64_9bit_offset_memory_operand): New predicate.
2190         (aarch64_rcpc_memory_operand): New predicate.
2192 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
2194         PR rtl-optimization/87361
2195         * rtlanal.c (nonzero_bits1): Revert accidental change.
2197 2018-09-19  Richard Biener  <rguenther@suse.de>
2199         PR tree-optimization/87349
2200         PR tree-optimization/87342
2201         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
2203 2018-09-18  Marek Polacek  <polacek@redhat.com>
2205         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
2206         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
2208 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
2210         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
2212 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
2214         PR rtl-optimization/86882
2215         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
2217 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
2219         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
2220         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
2222 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
2224         PR other/87353
2225         * doc/invoke.texi (Link Options): Fix formatting and grammar.
2227 2018-09-18  Richard Biener  <rguenther@suse.de>
2229         PR middle-end/63155
2230         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
2231         (compute_samebase_partition_bases): Likewise.
2232         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
2233         (gimple_can_coalesce_p): Simplify.
2235 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
2237         Handle a library implementation of ffs calling __builtin_ffs.
2238         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
2239         (mmix_init_libfuncs): New function: make __builtin_ffs expand
2240         to __ffsdi2.
2242 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
2244         * diagnostic-show-locus.c (class layout_range): Add field
2245         "m_original_idx".
2246         (layout_range::layout_range): Add "original_idx" param and use it
2247         to initialize new field.
2248         (make_range): Use 0 for original_idx.
2249         (layout::layout): Pass in index to calls to
2250         maybe_add_location_range.
2251         (layout::maybe_add_location_range): Add param "original_idx" and
2252         pass it on to layout_range.
2253         (layout::print_any_labels): Pass on range->m_original_idx to
2254         get_text call.
2255         (gcc_rich_location::add_location_if_nearby): Use 0 for
2256         original_idx.
2257         * gcc-rich-location.h (text_range_label::get_text): Update for new
2258         param.
2259         (range_label_for_type_mismatch::get_text): Likewise.
2261 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
2263         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
2265 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
2267         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
2268         format_string_diagnostic_t.
2269         (fmtwarn_n): Likewise.
2270         * substring-locations.c
2271         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
2272         (format_warning_n_va): Convert to...
2273         (format_string_diagnostic_t::emit_warning_n_va): ...this.
2274         (format_warning_va): Convert to...
2275         (format_string_diagnostic_t::emit_warning_va): ...this.
2276         (format_warning_at_substring): Convert to...
2277         (format_string_diagnostic_t::emit_warning): ...this.
2278         (format_warning_at_substring_n): Convert to...
2279         (format_string_diagnostic_t::emit_warning_n): ...this.
2280         * substring-locations.h (class format_string_diagnostic_t): New
2281         class.
2282         (format_warning_va): Convert to
2283         format_string_diagnostic_t::emit_warning_va.
2284         (format_warning_n_va): Convert to
2285         format_string_diagnostic_t::emit_warning_n_va.
2286         (format_warning_at_substring): Convert to
2287         format_string_diagnostic_t::emit_warning.
2288         (format_warning_at_substring_n): Convert to
2289         format_string_diagnostic_t::emit_warning_n.
2291 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
2292             Bernd Schmidt <bernds_cb1@t-online.de>
2294         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
2295         SImode args.
2297 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
2299         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
2300         operand 0 predicate to nonimmediate operand.
2301         (rint<mode>2_frndint): Remove insn pattern.
2302         (rint<mode>2): Change operand 1 predicate to general_operand.
2303         Extend operand 1 to XFmode and generate rintxf2 insn.
2304         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
2305         Do not use X87MODEF mode macro.
2306         (frndintxf2_<rounding>_i387): Rename from
2307         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
2308         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
2309         to XFmode and generate significandxf3 insn.
2311 2018-09-17  Richard Biener  <rguenther@suse.de>
2313         PR tree-optimization/87328
2314         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
2315         visiting unexecutable backedges when not iterating.
2316         (do_rpo_vn): Mark all edges not executable even when not
2317         iterating.
2319 2018-09-17  Martin Jambor  <mjambor@suse.cz>
2321         PR c/63886
2322         * doc/invoke.texi (Warning Options): Likewise.
2324 2018-09-17  Richard Biener  <rguenther@suse.de>
2326         PR tree-optimization/87301
2327         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
2328         clean EH info from leftover copy assignments.
2330 2018-09-17  Martin Liska  <mliska@suse.cz>
2332         PR gcov-profile/85871
2333         * gcov.c (output_intermediate_file): Fix out of bounds
2334         access.
2336 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
2338         * config/arc/arc.c: Object attributes for core4 not reflected
2339         correctly.
2340         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
2341         core3).
2343 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
2345         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2347 2018-09-17  Martin Liska  <mliska@suse.cz>
2349         * doc/gcov.texi: Document new option --use-hotness-colors.
2350         * gcov.c (struct source_info): Declare new field.
2351         (source_info::source_info): Set default for maximum_count.
2352         (print_usage): Add new -q option.
2353         (process_args): Process it.
2354         (accumulate_line_info): Save src->maximum_count.
2355         (output_line_beginning): Make color line number if
2356         flag_use_hotness_colors is set.
2357         (output_line_details): Pass default argument value.
2358         (output_lines): Pass src->maximum_count.
2360 2018-09-17  Martin Liska  <mliska@suse.cz>
2362         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
2363         Use processor_names table.
2364         * config/i386/i386.c (ix86_default_align): Use
2365         processor_cost_table for alignment values.
2366         (ix86_option_override_internal): Use processor_names.
2367         (ix86_function_specific_print): Likewise.
2368         * config/i386/i386.h (struct processor_costs):
2369         Add alignment values.
2370         (struct ptt): Remove and replace with const char *.
2371         * config/i386/x86-tune-costs.h (struct processor_costs):
2372         Declare default alignments for all costs.
2374 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
2376         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
2377         symbolics or VR_VARYING ranges for ABS_EXPR.
2378         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
2379         when range will wrap.
2381 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
2383         PR middle-end/86864
2384         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
2385         before and after a JUMP_TABLE_DATA.
2387 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
2389         PR middle-end/87188
2390         * dojump.c (do_compare_and_jump): Canonicalize function pointers
2391         when one operand is a function pointer.  Use POINTER_TYPE_P and
2392         FUNC_OR_METHOD_TYPE_P.
2393         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
2394         * fold-const.c (build_range_check): Likewise.
2395         * match.pd (simple_comparison): Likewise.
2397 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
2399         PR c/82967
2400         * spellcheck.c (get_edit_distance_cutoff): New function.
2401         (selftest::test_edit_distance_unit_test_oneway): Rename to...
2402         (selftest::test_get_edit_distance_one_way): ...this.
2403         (selftest::test_get_edit_distance_unit): Rename to...
2404         (selftest::test_get_edit_distance_both_ways): ...this.
2405         (selftest::test_edit_distances): Move tests to this new function,
2406         and test some more pairs of strings.  Update for above renaming.
2407         (selftest::get_old_cutoff): New function.
2408         (selftest::test_get_edit_distance_cutoff): New function.
2409         (selftest::assert_suggested_for): New function.
2410         (ASSERT_SUGGESTED_FOR): New macro.
2411         (selftest::assert_not_suggested_for): New function.
2412         (ASSERT_NOT_SUGGESTED_FOR): New macro.
2413         (selftest::test_suggestions): New function.
2414         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
2415         tests to selftest::test_edit_distances and call it.  Add calls to
2416         selftest::test_get_edit_distance_cutoff and
2417         selftest::test_suggestions.
2418         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
2419         (best_match::consider): Replace hard-coded cutoff calculation with
2420         a call to...
2421         (best_match::get_cutoff): New declaration.
2422         (best_match::get_best_meaningful_candidate): Likewise.
2424 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2426         * builtins.c (fold_builtin_strlen): Remove TODO comment.
2428 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2430         revert:
2431         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2433         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2434         terminated string literal.
2436 2018-09-14  Martin Sebor  <msebor@redhat.com>
2438         * builtins.c (unterminated_array): Handle ARRAY_REF.
2439         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
2440         * builtins.h (unterminated_array): Declare extern.
2441         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
2442         arrays.
2443         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
2444         calls.
2446 2018-09-14  Martin Sebor  <msebor@redhat.com>
2447             Jeff Law  <law@redhat.com>
2449         * builtins.c (unterminated_array): New.
2450         (expand_builtin_strcpy): Adjust.
2451         (expand_builtin_strcpy_args): Detect unterminated arrays.
2452         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
2453         unterminated arrays.
2454         * gimple-fold.h (get_maxval_strlen): Add argument.
2455         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
2457         * gimple-fold.c (get_range_strlen): Add argument.
2458         (get_maxval_strlen): Adjust.
2459         * gimple-fold.h (get_range_strlen): Add argument.
2461 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
2463         * config/i386/movdirintrin.h: Fix copyright year.
2465 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
2467         * reg-stack.c: Include regs.h.
2468         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
2469         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
2470         FIRST_STACK_REG, not DFmode.
2471         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
2472         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
2473         (change stack): Default register mode to the reg_raw_mode of
2474         FIRST_STACK_REG, not DFmode.
2475         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
2476         (*swapxf): Rename from swapxf.
2478 2018-09-14  Carl Love  <cel@us.ibm.com>
2480         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
2481         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
2483 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
2485         PR target/87224
2486         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
2487         alternatives.
2489 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
2491         PR target/85628
2492         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
2494 2018-09-14  Jason Merrill  <jason@redhat.com>
2496         Fix --enable-gather-detailed-mem-stats.
2497         * hash-table.c (hash_table_usage): Change from variable to function.
2498         * hash-table.h: Adjust.
2499         * Makefile.in: Add missing dependencies on hash-table.h.
2501 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2503         PR tree-optimization/87259
2504         PR lto/87283
2505         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
2506         execute_cse_reciprocals_1 has tried transforming.
2508 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
2510         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
2511         VR_VARYING for PLUS/MINUS_EXPR.
2513 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
2515         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
2516         formatting.
2518 2018-09-14  Richard Biener  <rguenther@suse.de>
2520         PR middle-end/63155
2521         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
2522         bits for the merged partition.
2524 2018-09-13  Martin Sebor  <msebor@redhat.com>
2525             Bernd Edlinger  <bernd.edlinger@hotmail.de>
2527         * builtins.h (c_srlen): Add argument.
2528         * builtins.c (warn_string_no_nul): New function.
2529         (c_strlen): Add argument and use it.  Update recursive calls.
2530         Pass DECL argument to string_constant to get info on non
2531         terminated strings.  Update *NONSTR as needed.
2532         (fold_builtin_strlen): Add argument to calls to c_strlen.
2533         Warn for unterminated arrays.
2534         (warn_string_no_null): Add prototype.
2535         * expr.c (string_constant): Update arguments.  Update recursive
2536         calls appropriately.  Detect missing NUL terminator and outermost
2537         declaration its missing in.
2538         Improve checks for arrays with nonzero lower bound or elements
2539         that are not a single byte.  Simplify offset computation.
2540         Simplify checks for non-NUL terminated strings.
2541         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
2542         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
2544 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2546         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
2547         correctly.
2548         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
2549         argument.  Fix range checks.
2550         * fold-const.h (c_getstr): Adjust protoype.
2551         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
2552         string is constant but contains no NUL byte.
2554         * expr.c (string_constant): Adjust function comment.
2555         Remove bogus check for zero termination.
2557         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
2559         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
2560         (get_constant_size): Don't make STRING_CSTs larger than they are.
2561         (check_string_literal): New check function for STRING_CSTs.
2562         (output_constant): Use it.
2564 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
2566         PR target/86812
2567         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
2569 2018-09-13  Richard Biener  <rguenther@suse.de>
2571         PR tree-optimization/87263
2572         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
2573         (struct unwind_state): Add max_rpo field.
2574         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
2575         Compute max_rpo, the max RPO number a block can be backwards reached
2576         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
2577         separating it from the iterating mode.
2579 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
2581         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
2582         (rfs_decision): New scheduling decision.
2584 2018-09-13  Richard Biener  <rguenther@suse.de>
2586         PR bootstrap/87134
2587         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
2588         (vn_nary_op_insert_pieces_predicated): Do not write useless
2589         valid_dominated_by_p entry outside of the allocated storage.
2591 2018-09-13  Omar Sandoval  <osandov@osandov.com>
2592             Tom de Vries  <tdevries@suse.de>
2594         PR debug/86985
2595         * dwarf2out.c (is_c): New function.
2596         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
2598 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
2600         PR target/85628
2601         * config/aarch64/aarch64.md (*aarch64_bfxil):
2602         Define.
2603         * config/aarch64/constraints.md (Ulc): Define.
2604         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
2605         Define.
2606         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
2607         New function.
2609 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
2611         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
2612         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
2613         aarch64_layout_frame call.
2614         (aarch64_expand_epilogue): Likewise.
2615         (aarch64_initial_elimination_offset): Likewise.
2616         (aarch64_get_separate_components): Likewise.
2617         (aarch64_use_return_insn_p): Likewise.
2618         (aarch64_layout_frame): Remove unneeded check.
2620 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
2622         * configure.ac: Only append
2623         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
2624         gcc_config_arguments if it was never reconfigured or last reconfigure
2625         was with different arguments.
2626         * configure: Regenerated.
2628 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
2629             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2631         PR middle-end/87290
2632         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
2633         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
2635 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
2637         PR tree-optimization/87287
2638         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
2639         X % C == 0 to X % (unsigned) C == 0 optimization to ...
2640         * match.pd (X % C == 0): ... here.  New optimization.
2642 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
2644         PR middle-end/82853
2645         * expr.h (maybe_optimize_mod_cmp): Declare.
2646         * expr.c (mod_inv): New function.
2647         (maybe_optimize_mod_cmp): New function.
2648         (do_store_flag): Use it.
2649         * cfgexpand.c (expand_gimple_cond): Likewise.
2651 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
2652             Julian Brown  <julian@codesourcery.com>
2654         PR middle-end/86336
2655         * gimplify.c (gimplify_scan_omp_clauses): Set
2656         target_firstprivatize_array_bases in OpenACC parallel and kernels
2657         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
2658         OpenACC data regions.
2660 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
2662         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
2663         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
2665 2018-09-12  Richard Biener  <rguenther@suse.de>
2667         PR tree-optimization/87280
2668         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
2669         edge but unreachable target.
2670         (do_rpo_vn): For conservatively handling a PHI only mark
2671         the backedge executable but not the block reachable.
2673 2018-09-12  Richard Biener  <rguenther@suse.de>
2675         PR tree-optimization/87266
2676         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
2677         visited blocks.
2679 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
2681         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
2682         constants.
2683         ("trunc<BFP:mode><DFP_ALL:mode>2")
2684         ("trunc<DFP_ALL:mode><BFP:mode>2")
2685         ("extend<BFP:mode><DFP_ALL:mode>2")
2686         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
2687         according to the target operand type.
2689 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
2690             Andreas Krebbel  <krebbel@linux.ibm.com>
2692         PR tree-optimization/86844
2693         * gimple-ssa-store-merging.c
2694         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
2695         there are any overlapping stores in between them, make sure they are
2696         also coalesced or we give up completely.
2698 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
2700         PR middle-end/87248
2701         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
2702         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
2704 2018-09-12  Tom de Vries  <tdevries@suse.de>
2706         * common.opt (gdescribe-dies): Add option.
2707         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
2708         attribute for artifical and nameless decls.
2709         (dwarf2out_register_external_die): Add description attribute to
2710         external reference die.
2711         (add_desc_attribute): New functions.
2712         (gen_subprogram_die): Add description attribute to
2713         DW_TAG_call_site_parameter.
2714         * tree-pretty-print.c (print_generic_expr_to_str): New function.
2715         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
2716         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
2717         -gno-describe-dies.
2718         (@item -gdescribe-dies): Add.
2720 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
2722         * tree-vrp.c (vrp_shift_undefined_p): Remove.
2723         (extract_range_from_binary_expr_1: Call
2724         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
2725         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
2726         depend on sign.
2728 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
2730         * gimple-ssa-warn-alloca.c
2731         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
2732         field for ALLOCA_BOUND_*_LARGE.
2734 2018-09-11  Nathan Sidwell  <nathan@acm.org>
2736         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
2738 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
2740         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
2741         for clobbers.  Remove obsolete comment.
2743 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
2745         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
2746         mpxchk, mpxld and mpxst types.
2747         (define_attr length_immediate): Remove all processing of mpx types.
2748         (define_attr prefix_0f): Ditto.
2749         (define_attr memory): Ditto.
2751 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
2753         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
2754         (log<mode>2): Change operand 1 predicate to general_operand.
2755         Extend operand 1 to XFmode and generate logxf3 insn.
2756         (log10<mode>2): Change operand 1 predicate to general_operand.
2757         Extend operand 1 to XFmode and generate log10xf3 insn.
2758         (log2<mode>2): Change operand 1 predicate to general_operand.
2759         Extend operand 1 to XFmode and generate log2xf3 insn.
2760         (fyl2xp1_extend<mode>xf3_i387): Remove.
2761         (log1p<mode>2): Change operand 1 predicate to general_operand.
2762         Extend operand 1 to XFmode and generate log1pxf3 insn.
2763         (fxtract_extend<mode>xf3_i387): Remove.
2764         (logb<mode>2): Change operand 1 predicate to general_operand.
2765         Extend operand 1 to XFmode and generate logbxf3 insn.
2766         (ilogb<mode>2): Change operand 1 predicate to general_operand.
2767         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
2768         (significand<mode>2): Change operand 1 predicate to general_operand.
2769         Extend operand 1 to XFmode and generate significandxf3 insn.
2771 2018-09-11  Nathan Sidwell  <nathan@acm.org>
2773         * gcc.c (perror_with_name, pfatal_with_name): Delete.
2774         (load_specs): Use fatal_error.
2775         (DELETE_IF_ORDINARY, process_command): Use error.
2776         (execute, run_attempt): Use fatal_error.
2778 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
2780         * diagnostic-core.h (sorry_at): New prototype.
2781         * diagnostic.c (sorry_at): New function.
2783 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
2785         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
2786         by zero as VR_UNDEFINED.
2788 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
2790         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
2791         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
2792         (<sincos>mode2): New expander.
2793         (sincos_extend<mode>xf3_i387): Remove insn pattern.
2794         (sincos -> sin, cos splitters): Remove splitter patterns.
2795         (sincos<mode>3): Change operand 2 predicate to general_operand.
2796         Extend operand 2 to XFmode and generate sincosxf3 insn.
2797         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
2798         Change operand 3 predicate to const1_operand.
2799         (fptan_extend<mode>xf4_i387): Remove insn pattern.
2800         (tanxf2): Update operands in the call to fptanxf4_i387.
2801         (tan<mode>2): Change operand 1 predicate to general_operand.
2802         Extend operand 1 to XFmode and generate tanxf3 insn.
2803         (atan2xf3): Rename from *fpatanxf3_i387.
2804         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
2805         (atan2xf3): Remove expander.
2806         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
2807         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
2808         (atan<mode>2): Change operand 1 predicate to general_operand.
2809         Extend operand 1 to XFmode and generate atanxf3 insn.
2811 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
2813         * config/i386/i386.md (x87/SSE constant load splitter): Use
2814         memory_operand instead of nonimmediate_operand for input operand
2815         predicate.
2817 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
2819         * config/i386/i386.md (float partial SSE register stall splitter): Move
2820         splitter near its instruction pattern.
2821         (float_extend partial SSE register stall splitter): Ditto.
2822         (float_truncate partial SSE register stall splitter): Ditto.
2824 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
2826         PR target/86794
2827         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2828         to speculation_safe_value_not_needed.
2830         PR target/85666
2831         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
2832         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
2833         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
2834         leaf_function_p, instead use has_hard_reg_initial_val.
2836 2018-09-09  Nathan Sidwell  <nathan@acm.org>
2838         * gcc.h (pfatal_with_name): Don't declare here.
2839         * gcc.c (pfatal_with_name): Make static.
2841 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
2843         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
2844         earlyclobber.
2846 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
2848         PR rtl-optimization/85458
2849         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
2850         priority hook to reduce the priority of EXPR.
2852 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
2854         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
2855         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
2856         with X87_ENABLE_FLOAT.  Remove preparation code.
2857         (*float<SWI48:mode><MODEF:mode>2): Rename from
2858         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
2859         math using "enabled" attribute.
2860         (*floatdi<MODEF:mode>2_i387): Rename from
2861         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
2862         enable for 32bit targets only.
2863         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
2864         splitter.
2865         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
2866         as operand 1 predicate.  Rewrite as define_insn_and_split.
2867         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
2869 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
2871         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
2872         to fallthru to FLOAT case.
2874 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
2876         PR target/86731
2877         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
2878         around folding of vec_sl to handle out of range shift values.
2880 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
2882         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
2883         Update callers to gen_fix_trunc<mode>_i387_fisttp
2884         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
2885         nonimmediate_operand.
2886         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
2887         and corresponding splitters.
2888         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
2889         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
2890         (fix_truncdi_i387_with_temp): Remove insn pattern
2891         and corresponding splitters.
2892         (fix_trunc<mode>_i387): Change operand 0 predicate to
2893         nonimmediate_operand.
2894         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
2895         and corresponding splitters.
2896         (*fistdi2_1): Remove.
2897         (fistdi2): Ditto.
2898         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
2899         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
2900         (*fist<mode>2_1): Remove.
2901         (fist<mode>2): Ditto.
2902         (fist<mode>2_with_temp): Remove insn pattern and corresponding
2903         splitters.
2904         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
2905         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
2906         (fistdi2_<rounding>): Change operand 0 predicate to
2907         nonimmediate_operand.
2908         (fistdi2_<rounding>_with_temp): Remove insn pattern
2909         and corresponding splitters.
2910         (fist<mode>2_<rounding>): Change operand 0 predicate to
2911         nonimmediate_operand.
2912         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
2913         and corresponding splitters.
2915         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
2917 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2919         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
2920         the init value.
2922 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
2924         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
2925         early gimple folding of vec_splat().
2926         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
2927         * gimple-fold.h: Add an extern define for tree_vec_extract().
2929 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
2931         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
2932         wrappers around TREE_TYPE comparisons.
2934 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2936         PR target/80080
2937         * config/s390/predicates.md: Add nonsym_memory_operand.
2938         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
2939         contains a SYMBOL_REF, load it into an intermediate pseudo.
2940         (s390_emit_compare_and_swap): Legitimize operand.
2941         * config/s390/s390.md: Use the new nonsym_memory_operand
2942         with UNSPECV_CAS patterns.
2944 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2946         PR target/80080
2947         * config/s390/s390-passes.def: New file.
2948         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
2949         declaration.
2950         (make_pass_s390_early_mach): Add declaration.
2951         * config/s390/s390.c (make_pass_s390_early_mach):
2952         (s390_option_override): Remove dynamic registration.
2953         * config/s390/t-s390: Add s390-passes.def.
2955 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2957         * config/s390/s390.c (s390_decompose_constant_pool_ref):
2958         Remove UNSPEC_LTREL_BASE check.
2959         (annotate_constant_pool_refs): Likewise.
2960         (find_constant_pool_ref): Likewise.
2961         (find_ltrel_base): Removed.
2962         (replace_ltrel_base): Removed.
2963         (s390_mainpool_finish): Remove replace_ltrel_base call.
2964         (s390_chunkify_start): Remove pending LTREL_BASE logic.
2965         (s390_chunkify_finish): Remove replace_ltrel_base call.
2966         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
2968 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
2970         PR target/86779
2971         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2972         to speculation_safe_value_not_needed.
2974 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
2975             Bernd Schmidt  <bernds_cb1@t-online.de>
2977         * config/nvptx/nvptx-opts.h: New file.
2978         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
2979         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
2980         (ASM_SPEC): Define.
2981         (TARGET_SM35): New macro.
2982         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
2983         correct predicate.
2984         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
2985         values.
2986         (misa=): New option.
2987         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
2989 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
2991         * config/i386/i386.md (truncdfsf2): Remove expander.
2992         (truncdfsf2_with_temp): Ditto.
2993         (truncxf<mode>2): Ditto.
2994         (*truncdfsf_fast_mixed): Remove insn pattern.
2995         (*truncdfsf_fast_i387): Ditto.
2996         (*truncdfsf_mixed): Ditto.
2997         (*truncdfsf_i387): Ditto.
2998         (*truncdfsf2_i387_1): Ditto.
2999         (*truncxfsf2_mixed): Ditto.
3000         (*truncxfdf2_mixed): Ditto.
3001         (*truncxf<mode>2_i387_noop): Ditto. Update callers
3002         to call gen_truncxf<mode>2 instead.
3003         (*truncxf<mode>2_i387): Remove.
3004         (reg->reg splitters): Remove splitter pattern.
3005         (reg->mem splitters): Ditto.
3007         (truncdfsf2): New insn pattern.
3008         (truncxf<mode>2): Ditto.
3010 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3012         * tree-ssa-math-opts.c (is_mult_by): New function.
3013         (is_square_of): Use the above.
3014         (optimize_recip_sqrt): New function.
3015         (pass_cse_reciprocals::execute): Use the above.
3017 2018-09-05  Richard Biener  <rguenther@suse.de>
3019         PR bootstrap/87134
3020         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
3021         to zero-init the emplaced vec.
3023 2018-09-05  Martin Liska  <mliska@suse.cz>
3025         PR tree-optimization/87205
3026         * tree-switch-conversion.c (pass_lower_switch::execute):
3027         Group cases for switch statements.
3029 2018-09-05  Richard Biener  <rguenther@suse.de>
3031         PR tree-optimization/87217
3032         * tree-ssa-sccvn.c (vuse_valueize): New.
3033         (vn_reference_lookup_pieces): Use it.
3034         (vn_reference_lookup): Likewise.
3036 2018-09-05  Nathan Sidwell  <nathan@acm.org>
3038         PR c++/87137
3039         * stor-layout.c (place_field): Scan forwards to check last
3040         bitfield when ms_bitfield_placement is in effect.
3042 2018-09-05  Richard Biener  <rguenther@suse.de>
3044         PR bootstrap/87225
3045         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
3046         return.
3048 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
3049             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
3051         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
3052         * config.gcc (extra_objs): Build it.
3053         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
3054         Likewise.
3055         * config/aarch64/aarch64-passes.def
3056         (pass_tag_collision_avoidance): New pass.
3057         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
3058         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
3059         (aarch64_classify_address): Remove static qualifier.
3060         (aarch64_address_info, aarch64_address_type): Move to...
3061         * config/aarch64/aarch64-protos.h: ... here.
3062         (make_pass_tag_collision_avoidance): New function.
3063         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
3064         New tuning flag.
3066 2018-09-05  Martin Liska  <mliska@suse.cz>
3068         * doc/gcov.texi: Update documentation of humar
3069         readable mode.
3070         * gcov.c (format_count): Print one decimal place, it provides
3071         more fine number of situations like '1G' vs. '1.4G'.
3073 2018-09-05  Martin Liska  <mliska@suse.cz>
3075         PR target/87164
3076         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
3077         * optc-gen.awk: Allow 'Var' for Deprecated options in order
3078         to generate a MASK value.
3080 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
3082         PR debug/86593
3083         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
3084         if frame pointer isn't used.
3085         (compute_frame_pointer_to_fb_displacement): Likewise.
3087 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
3089         PR target/87198
3090         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
3091         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
3092         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
3093         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
3094         and OPTION_MASK_ISA_XSAVEC_UNSET.
3096 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
3098         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
3099         XOR operations in NAND case.
3101 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
3103         * wide-int-range.cc (wide_int_range_convert): New.
3104         * wide-int-range.h (wide_int_range_convert): New.
3105         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
3106         code into wide_int_range_convert.
3107         (extract_range_into_wide_ints): Do not munge anti range constants
3108         into the entire domain.  Just return the range back.
3110 2018-09-04  Martin Liska  <mliska@suse.cz>
3112         * genmatch.c (output_line_directive): Add new argument
3113         fnargs.
3114         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
3116 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
3118         * doc/invoke.texi (Option Summary): Add whitespace.
3120         * doc/invoke.texi (Option Summary): Add -Waligned-new.
3122 2018-09-04  Richard Biener  <rguenther@suse.de>
3124         PR tree-optimization/87211
3125         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
3126         backedge value we're supposed to treat as VARYING also number
3127         the PHI to VARYING in case it got a different value-number already.
3129 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
3131         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
3132         (extract_range_from_binary_expr_1): Do not call
3133         vrp_can_optimize_bit_op.
3134         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
3135         static.
3136         (wide_int_range_get_mask_and_bounds): New.
3137         (wide_int_range_optimize_bit_op): New.
3138         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
3139         (wide_int_range_bit_and): Same.
3140         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
3141         (wide_int_range_optimize_bit_op): New.
3142         (wide_int_range_get_mask_and_bounds): New.
3144 2018-09-04  Richard Biener  <rguenther@suse.de>
3146         PR tree-optimization/87176
3147         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
3148         variable.  When value-numbering a virtual PHI node make sure
3149         to not value-number to the backedge value.
3151 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
3153         * doc/extend.texi (Long Long, Hex Floats): Document support for
3154         long long and hex floats in more recent versions of ISO C++.
3156 2018-09-03  Richard Biener  <rguenther@suse.de>
3158         PR tree-optimization/87177
3159         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
3160         cleanup.
3162 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3164         * bb-reorder.c (edge_order): Convert to C-qsort-style
3165         tri-state comparator.
3166         (reorder_basic_blocks_simple): Change std::stable_sort to
3167         gcc_stablesort.
3169 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3171         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
3172         tri-state comparator.
3173         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
3175 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3177         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
3178         (mergesort): ... here as maximum count for using netsort.
3179         (gcc_qsort): Set nlim to 3 if stable sort is requested.
3180         (gcc_stablesort): New.
3181         * system.h (gcc_stablesort): Declare.
3183 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3185         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
3186         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
3187         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
3189 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
3191         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
3192         lxsdx and stxsdx alternatives.
3193         (*mov<mode>_hardfloat64): Ditto.
3194         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
3196 2018-09-03  Richard Biener  <rguenther@suse.de>
3198         PR tree-optimization/87200
3199         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
3200         simplify result.
3202 2018-09-03  Martin Liska  <mliska@suse.cz>
3204         PR tree-optimization/87201
3205         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3206         Fix parenthesis in an expression.
3208 2018-09-03  Richard Biener  <rguenther@suse.de>
3210         PR tree-optimization/87197
3211         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
3212         visited.  CSE the VN_INFO hashtable lookup.
3214         PR tree-optimization/87169
3215         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
3216         iterating make sure there's no extra backedges from irreducible
3217         regions feeding the header.  Mark the destination block
3218         executable.
3220 2018-09-03  Martin Liska  <mliska@suse.cz>
3222         PR driver/83193
3223         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
3224         * common/common-targhooks.c (default_get_valid_option_values):
3225         New function.
3226         * common/common-targhooks.h (default_get_valid_option_values):
3227         Likewise.
3228         * common/config/i386/i386-common.c: Move processor_target_table
3229         from i386.c.
3230         (ix86_get_valid_option_values): New function.
3231         (TARGET_GET_VALID_OPTION_VALUES): New macro.
3232         * config/i386/i386.c (struct ptt): Move to i386-common.c.
3233         (PTA_*): Move all defined masks into i386-common.c.
3234         (ix86_function_specific_restore): Use new processor_cost_table.
3235         * config/i386/i386.h (struct ptt): Moved from i386.c.
3236         (struct pta): Likewise.
3237         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
3238         * doc/tm.texi.in: Likewise.
3239         * opt-suggestions.c (option_proposer::suggest_option):
3240         Pass prefix to build_option_suggestions.
3241         (option_proposer::get_completions): Likewise.
3242         (option_proposer::build_option_suggestions): Use the new target
3243         hook.
3244         * opts.c (struct option_help_tuple): New struct.
3245         (print_filtered_help): Use the new target hook.
3247 2018-09-03  Martin Liska  <mliska@suse.cz>
3249         PR middle-end/59521
3250         * predict.c (set_even_probabilities): Add likely_edges
3251         argument and handle cases where we have precisely one
3252         likely edge.
3253         (combine_predictions_for_bb): Catch also likely_edges.
3254         (tree_predict_by_opcode): Handle gswitch statements.
3255         * tree-cfg.h (find_case_label_for_value): New declaration.
3256         (find_taken_edge_switch_expr): Likewise.
3257         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3258         Find pivot in decision tree based on probabily, not by number of
3259         nodes.
3261 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
3263         * doc/standards.texi (Standards): Update Objective-C reference.
3265 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
3267         * doc/install.texi (Prerequisites): Update link for MPC.
3269 2018-09-01  Michael Matz  <matz@suse.de>
3271         PR tree-optimization/87074
3272         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
3273         PHIs for outer-loop uses.
3275 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
3277         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
3278         * doc/invoke.texi (C Dialect Options): Ditto.
3280 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
3282         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
3284 2018-08-31  Richard Biener  <rguenther@suse.de>
3286         PR tree-optimization/87168
3287         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
3288         (rpo_elim::eliminate_avail): When OP was not visited it must
3289         be available.
3291 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
3293         * tree-vrp.c (copy_value_range): Convert param "from" from
3294         "value_range *" to "const value_range *".
3295         (range_is_null): Likewise for param "vr".
3296         (range_int_cst_p): Likewise.
3297         (range_int_cst_singleton_p): Likewise.
3298         (symbolic_range_p): Likewise.
3299         (value_ranges_intersect_p): Likewise for both params.
3300         (value_range_nonnegative_p): Likewise for param "vr".
3301         (value_range_constant_singleton): Likewise.
3302         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
3303         (extract_range_into_wide_ints): Likewise for param "vr".
3304         (extract_range_from_multiplicative_op): Likewise for params "vr0"
3305         and "vr1".
3306         (vrp_can_optimize_bit_op): Likewise.
3307         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
3308         "vr1_".
3309         (extract_range_from_unary_expr): Likewise.
3310         (debug_value_range): Likewise for param "vr".
3311         (value_range::dump): Add "const" qualifier.
3312         (vrp_prop::check_array_ref): Convert local "vr" from
3313         "value_range *" to "const value_range *".
3314         (vrp_prop::check_mem_ref): Likewise.
3315         (vrp_prop::visit_stmt): Likewise for local "old_vr".
3316         (vrp_intersect_ranges_1): Likewise for param "vr_1".
3317         (vrp_intersect_ranges): Likewise.
3318         (simplify_stmt_for_jump_threading): Likewise for local "vr".
3319         (vrp_prop::vrp_finalize): Likewise.
3320         * tree-vrp.h (value_range::dump): Add "const" qualifier.
3321         (vrp_intersect_ranges): Add "const" qualifier to params as above.
3322         (extract_range_from_unary_expr): Likewise.
3323         (value_range_constant_singleton): Likewise.
3324         (symbolic_range_p): Likewise.
3325         (copy_value_range): Likewise.
3326         (extract_range_from_binary_expr_1): Likewise.
3327         (range_int_cst_p): Likewise.
3328         (vrp_set_zero_nonzero_bits): Likewise.
3329         (range_int_cst_singleton_p): Likewise.
3331 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
3333         * config/aarch64/arm_neon.h (vabsd_s64): New.
3334         (vnegd_s64): Likewise.
3336 2018-08-31  Martin Jambor  <mjambor@suse.cz>
3338         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
3340 2018-08-31  Martin Liska  <mliska@suse.cz>
3342         * ipa-icf.c (sem_item::add_type): Use
3343         sem_item::m_type_hash_cache.
3344         * ipa-icf.h: Move the cache from sem_item_optimizer
3345         to sem_item.
3347 2018-08-31  Nathan Sidwell  <nathan@acm.org>
3349         * doc/extend.texi (Backwards Compatibility): Remove implicit
3350         extern C leeway of () being (...).
3352 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3354         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
3356 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
3358         PR target/86684
3359         PR target/87149
3360         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
3362 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
3364         PR middle-end/87138
3365         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
3366         gen_int_mode.  Formatting fixes.
3368 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
3370         * target.def (custom_function_descriptors): Improve documentation.
3371         * doc/tm.texi.in (Trampolines): Expand discussion of function
3372         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
3373         beginning of the section.
3374         * doc/tm.texi: Regenerated.
3376 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
3378         * cfg.h (class auto_edge_flag): Spell out the template-id of the
3379         base class in the initializer list.  This is a workaround for
3380         building with older GCC.
3381         (class auto_bb_flag): Likewise.
3383 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
3385         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
3386         (altivec_vcmpequ<VI_char>_p): Remove star.
3387         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
3388         vector load modes.
3389         (expand_strncmp_vec_sequence): New function.
3390         (emit_final_str_compare_vec): New function.
3391         (expand_strn_compare): Add support for vector strncmp.
3392         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
3393         length specification to bytes.
3394         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
3395         (vcmpnezb_p): New pattern.
3396         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
3397         for option -mstring-compare-inline-limit.
3399 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
3401         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
3402         (PTA_SKYLAKE): Add PTA_AES.
3403         (PTA_GOLDMONT): Likewise.
3405 2018-08-29  Jan Hubicka  <jh@suse.cz>
3407         PR lto/86517
3408         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
3409         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
3411 2018-08-29  Jan Hubicka  <jh@suse.cz>
3413         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
3414         TYPE_STUB_DECL.
3415         (hash_tree): Do not visit TYPE_STUB_DECL.
3416         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
3417         stream TYPE_STUB_DECL.
3418         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
3419         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
3420         after free_lang_data.
3421         (type_in_anonymous_namespace_p): Likewise.
3423 2018-08-29  Jan Hubicka  <jh@suse.cz>
3425         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3426         comment that it has to be even number.
3427         (class sreal): Change m_sig type to int32_t.
3428         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3429         int64_t for temporary calculations.
3430         (sreal_verify_basics): Drop one bit from minimum and maximum.
3432 2018-08-30  Richard Biener  <rguenther@suse.de>
3434         PR tree-optimization/87147
3435         * tree-ssa-sccvn.c (SSA_VISITED): New function.
3436         (visit_phi): When the degenerate result is from the backedge and
3437         we didn't visit its definition yet drop to VARYING.
3438         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
3440 2018-08-29  Jan Hubicka  <jh@suse.cz>
3442         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
3443         DECL_VINDEX.
3444         (hash_tree): Likewise.
3446 2018-08-29  Jan Hubicka  <jh@suse.cz>
3448         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
3449         and TYPE_NEXT_REF_TO.
3451 2018-08-29  Jan Hubicka  <jh@suse.cz>
3453         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3454         comment that it has to be even number.
3455         (class sreal): Change m_sig type to int32_t.
3456         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3457         int64_t for temporary calculations.
3458         (sreal_verify_basics): Drop one bit from minimum and maximum.
3460 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
3462         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
3464 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
3466         PR middle-end/86995
3467         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
3468         if to_add is negative.
3470 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3472         PR middle-end/87053
3473         * builtins.c (c_strlen): Improve range checks.
3475 2018-08-29  Martin Sebor  <msebor@redhat.com>
3476             Jeff Law  <law@redhat.com>
3478         PR tree-optimization/86714
3479         PR tree-optimization/86711
3480         * builtins.c (c_strlen): Add arguments to call to string_constant.
3481         * expr.c (string_constant): Add argument.  Detect missing nul
3482         terminator and outermost declaration it's missing in.
3483         * expr.h (string_constant): Add argument.
3484         * fold-const.c (read_from_constant_string): Add arguments to call to
3485         string_constant.
3486         (c_getstr): Likewise.
3487         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3488         to string_constant.
3489         * tree-ssa-strlen.c (get_stridx): Likewise.
3491 2018-08-29  Jan Hubicka  <jh@suse.cz>
3493         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
3494         Do not stream DECL_VINDEX.
3495         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
3496         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
3497         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
3499 2018-08-29  Richard Biener  <rguenther@suse.de>
3501         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
3502         virtual operands that are not default defs to honor region
3503         boundaries.
3504         (rpo_vn_valueize): Remove ineffective code here.
3506 2018-08-29  Richard Biener  <rguenther@suse.de>
3508         PR tree-optimization/87132
3509         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
3510         when skipping defs reachable over backedges.
3512 2018-08-29  Richard Biener  <rguenther@suse.de>
3514         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
3515         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
3516         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
3517         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
3518         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
3519         (vn_reference_lookup_3): Remove use of const_parms.
3520         (free_rpo_vn): Do not free const_parms.
3521         (do_rpo_vn): Do not call init_const_parms.
3522         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
3523         SSA_NAME_POINTS_TO_READONLY_MEMORY.
3524         (call_may_clobber_ref_p_1): Likewise.
3526 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
3528         PR other/86726
3529         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
3530         (-O): Ditto.
3531         (-ftree-scev-cprop): Document.
3533 2018-08-29  Jan Hubicka  <jh@suse.cz>
3535         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
3536         parameters.
3537         (sreal constructor): Update.
3538         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
3539         sreal:operator/): Update.
3541 2018-08-29  Martin Liska  <mliska@suse.cz>
3543         * tree-switch-conversion.c (switch_conversion::expand):
3544         Strenghten assumption about gswitch statements.
3546 2018-08-29  Richard Biener  <rguenther@suse.de>
3548         PR tree-optimization/87117
3549         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
3550         re-value-number released SSA VDEFs.
3552 2018-08-29  Richard Biener  <rguenther@suse.de>
3554         PR tree-optimization/87126
3555         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
3557 2018-08-28  Jim Wilson  <jimw@sifive.com>
3559         * config/riscv/pic.md: Rewrite.
3560         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
3561         invalid address.
3562         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
3563         (SOFTF, default_load, softload, softstore): New.
3565 2018-08-28  Jeff Law  <law@redhat.com>
3567         * fold-const.c (fold_binary_loc): Remove recently added assert.
3569 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
3571         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
3572         to OP parmeter of generated function.
3574 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
3576         PR tree-optimization/87009
3577         * match.pd: Add boolean optimizations.
3579 2018-08-28  Martin Sebor  <msebor@redhat.com>
3581         PR middle-end/86631
3582         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
3583         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
3584         (pass_walloca::gate): Use it.
3585         (alloca_call_type): Same.
3586         (pass_walloca::execute): Same.
3587         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
3589 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
3591         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
3592         GCC_VERSION for usage of "__gcc_dump_printf__" format from
3593         >= 3005 to >= 9000.
3595 2018-08-28  Richard Biener  <rguenther@suse.de>
3597         PR tree-optimization/87124
3598         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
3599         constants before looking up avail.
3601 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
3603         PR middle-end/87099
3604         * calls.c (maybe_warn_nonstring_arg): Punt early if
3605         warn_stringop_overflow is zero.  Don't call get_range_strlen
3606         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
3607         Swap comparison operands to have constants on rhs.  Only use
3608         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
3609         increment lenrng[0].
3611 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
3613         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
3614         use of tree_to_shwi.  Remove duplicated test for the size being
3615         a whole number of bytes.
3617 2018-08-28  Richard Biener  <rguenther@suse.de>
3619         PR tree-optimization/87117
3620         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
3621         Handle removed stmt without LHS (GIMPLE_NOP).
3623 2018-08-28  Richard Biener  <rguenther@suse.de>
3625         PR tree-optimization/87117
3626         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
3627         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
3629 2018-08-28  Richard Biener  <rguenther@suse.de>
3631         PR tree-optimization/87117
3632         * tree-ssa-pre.c (compute_avail): Do not make expressions
3633         with predicated values available.
3634         (get_expr_value_id): Assert we do not run into predicated value
3635         expressions.
3637 2018-08-28  Richard Biener  <rguenther@suse.de>
3639         PR tree-optimization/87117
3640         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
3641         get virtual operands.
3642         (get_expr_operands): Handle STRING_CST like other decls.
3644 2018-08-28  Martin Liska  <mliska@suse.cz>
3646         * tree.h: Update documentation of fndecl_built_in_p
3647         functions.
3650 2018-08-27  Jeff Law  <law@redhat.com>
3651         PR tree-optimization/87110
3652         * tree-ssa-dse.c (compute_trims): Handle non-constant
3653         TYPE_SIZE_UNIT.
3655 2018-08-27  Martin Sebor  <msebor@redhat.com>
3657         PR tree-optimization/86914
3658         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
3660 2018-08-27  Martin Sebor  <msebor@redhat.com>
3662         PR tree-optimization/87112
3663         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
3664         the type of the bound argument.
3666 2018-08-27  Jeff Law  <law@redhat.com>
3668         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
3669         type does not have a TYPE_SIZE_UNIT.
3671 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
3673         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
3674         with include of backend.h.
3676 2018-08-27  Richard Biener  <rguenther@suse.de>
3678         PR tree-optimization/86927
3679         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
3680         use const cond reduction code.
3682 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
3684         PR tree-optimization/85758
3685         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
3687 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
3689         PR c++/87091
3690         * diagnostic-show-locus.c (class layout_range): Update for
3691         conversion of show_caret_p to a tri-state.
3692         (layout_range::layout_range): Likewise.
3693         (make_range): Likewise.
3694         (layout::maybe_add_location_range): Likewise.
3695         (layout::should_print_annotation_line_p): Don't show annotation
3696         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
3697         (layout::get_state_at_point): Update for conversion of
3698         show_caret_p to a tri-state.  Bail out early for
3699         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
3700         underlining or source colorization.
3701         (gcc_rich_location::add_location_if_nearby): Update for conversion
3702         of show_caret_p to a tri-state.
3703         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
3704         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
3705         Likewise.
3706         (selftest::test_one_liner_labels): Likewise.
3707         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
3708         conversion of show_caret_p to a tri-state.
3709         * pretty-print.c (text_info::set_location): Likewise.
3710         * pretty-print.h (text_info::set_location): Likewise.
3711         * substring-locations.c (format_warning_n_va): Likewise.
3712         * tree-diagnostic.c (default_tree_printer): Likewise.
3713         * tree-pretty-print.c (newline_and_indent): Likewise.
3715 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
3717         PR c++/87091
3718         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
3719         line above for line-insertion fix-it hints.
3720         (selftest::test_fixit_insert_containing_newline): Update the
3721         expected results, and add a test with line-numbering enabled.
3723 2018-08-27  Martin Liska  <mliska@suse.cz>
3725         PR sanitizer/86962
3726         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
3727         params with DECL_HAS_VALUE_EXPR_P.
3729 2018-08-27  Martin Liska  <mliska@suse.cz>
3731         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
3732         selected expansion strategy.
3734 2018-08-27  Martin Liska  <mliska@suse.cz>
3736         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
3737         * builtins.c (is_builtin_fn): Likewise.
3738         * attribs.c (diag_attr_exclusions): Use new function
3739         fndecl_built_in_p and remove check for FUNCTION_DECL if
3740         possible.
3741         (builtin_mathfn_code): Likewise.
3742         (fold_builtin_expect): Likewise.
3743         (fold_call_expr): Likewise.
3744         (fold_builtin_call_array): Likewise.
3745         (fold_call_stmt): Likewise.
3746         (set_builtin_user_assembler_name): Likewise.
3747         (is_simple_builtin): Likewise.
3748         * calls.c (gimple_alloca_call_p): Likewise.
3749         (maybe_warn_nonstring_arg): Likewise.
3750         * cfgexpand.c (expand_call_stmt): Likewise.
3751         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
3752         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
3753         (cgraph_node::verify_node): Likewise.
3754         * cgraphclones.c (build_function_decl_skip_args): Likewise.
3755         (cgraph_node::create_clone): Likewise.
3756         * config/arm/arm.c (arm_insert_attributes): Likewise.
3757         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
3758         * dse.c (scan_insn): Likewise.
3759         * expr.c (expand_expr_real_1): Likewise.
3760         * fold-const.c (operand_equal_p): Likewise.
3761         (fold_binary_loc): Likewise.
3762         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
3763         * gimple-low.c (lower_stmt): Likewise.
3764         * gimple-pretty-print.c (dump_gimple_call): Likewise.
3765         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
3766         Likewise.
3767         * gimple.c (gimple_build_call_from_tree): Likewise.
3768         (gimple_call_builtin_p): Likewise.
3769         (gimple_call_combined_fn): Likewise.
3770         * gimplify.c (gimplify_call_expr): Likewise.
3771         (gimple_boolify): Likewise.
3772         (gimplify_modify_expr): Likewise.
3773         (gimplify_addr_expr): Likewise.
3774         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
3775         * ipa-cp.c (determine_versionability): Likewise.
3776         * ipa-fnsummary.c (compute_fn_summary): Likewise.
3777         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
3778         * ipa-split.c (visit_bb): Likewise.
3779         (split_function): Likewise.
3780         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3781         * lto-cgraph.c (input_node): Likewise.
3782         * lto-streamer-out.c (write_symbol): Likewise.
3783         * omp-low.c (setjmp_or_longjmp_p): Likewise.
3784         (lower_omp_1): Likewise.
3785         * predict.c (strip_predict_hints): Likewise.
3786         * print-tree.c (print_node): Likewise.
3787         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
3788         * trans-mem.c (is_tm_irrevocable): Likewise.
3789         (is_tm_load): Likewise.
3790         (is_tm_simple_load): Likewise.
3791         (is_tm_store): Likewise.
3792         (is_tm_simple_store): Likewise.
3793         (is_tm_abort): Likewise.
3794         (tm_region_init_1): Likewise.
3795         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
3796         * tree-cfg.c (verify_gimple_call): Likewise.
3797         (move_stmt_r): Likewise.
3798         (stmt_can_terminate_bb_p): Likewise.
3799         * tree-eh.c (lower_eh_constructs_2): Likewise.
3800         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
3801         * tree-inline.c (remap_gimple_stmt): Likewise.
3802         (copy_bb): Likewise.
3803         (estimate_num_insns): Likewise.
3804         (fold_marked_statements): Likewise.
3805         * tree-sra.c (scan_function): Likewise.
3806         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
3807         (optimize_stack_restore): Likewise.
3808         (pass_fold_builtins::execute): Likewise.
3809         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
3810         (mark_all_reaching_defs_necessary_1): Likewise.
3811         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
3812         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3813         (pass_forwprop::execute): Likewise.
3814         * tree-ssa-loop-im.c (stmt_cost): Likewise.
3815         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3816         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
3817         * tree-ssa-strlen.c (get_string_length): Likewise.
3818         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
3819         (find_func_aliases_for_call): Likewise.
3820         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
3821         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
3822         * tree-tailcall.c (find_tail_calls): Likewise.
3823         * tree.c (need_assembler_name_p): Likewise.
3824         (free_lang_data_in_decl): Likewise.
3825         (get_call_combined_fn): Likewise.
3826         * ubsan.c (is_ubsan_builtin_p): Likewise.
3827         * varasm.c (incorporeal_function_p): Likewise.
3828         * tree.h (DECL_BUILT_IN): Remove and replace with
3829         fndecl_built_in_p.
3830         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
3831         (fndecl_built_in_p): New.
3833 2018-08-27  Martin Liska  <mliska@suse.cz>
3835         PR tree-optimization/86847
3836         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
3837         Dump also subtree probability.
3838         (switch_decision_tree::do_jump_if_equal): New function.
3839         (switch_decision_tree::emit_case_nodes): Handle special
3840         situations in balanced tree that can be emitted much simpler.
3841         Fix calculation of probabilities that happen in tree expansion.
3842         * tree-switch-conversion.h (struct cluster): Add
3843         is_single_value_p.
3844         (struct simple_cluster): Likewise.
3845         (struct case_tree_node): Add new function has_child.
3846         (do_jump_if_equal): New.
3848 2018-08-27  Martin Liska  <mliska@suse.cz>
3850         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
3851         Add new argument to bit_test_cluster constructor.
3852         (bit_test_cluster::emit): Set bits really number of values
3853         handlel by a test.
3854         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
3855         probability argument.
3856         * tree-switch-conversion.h (struct bit_test_cluster):
3857         Add m_handles_entire_switch.
3859 2018-08-27  Martin Liska  <mliska@suse.cz>
3861         PR tree-optimization/86702
3862         * tree-switch-conversion.c (jump_table_cluster::emit):
3863         Make probabilities even for values in jump table
3864         according to number of cases handled.
3865         (switch_decision_tree::compute_cases_per_edge): Pass
3866         argument to reset_out_edges_aux function.
3867         (switch_decision_tree::analyze_switch_statement): Likewise.
3868         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
3869         Make it static.
3871 2018-08-27  Martin Liska  <mliska@suse.cz>
3873         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
3874         cfun argument explicitly.
3875         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
3876         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
3877         function gimple_switch_default_bb.
3878         (convert_switch_statements):
3879         (expand_builtins):
3880         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
3881         * stmt.c (label_to_block_fn): Use label_to_block and pass
3882         cfun argument explicitly and use gimple_switch_label_bb.
3883         (expand_case): Likewise.
3884         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
3885         cfun argument explicitly. Likewise.
3886         (make_edges_bb): Likewise.
3887         (make_cond_expr_edges): Likewise.
3888         (get_cases_for_edge): Likewise.
3889         (make_gimple_switch_edges): Likewise.
3890         (label_to_block_fn): Likewise.
3891         (label_to_block): Likewise.
3892         (make_goto_expr_edges): Likewise.
3893         (make_gimple_asm_edges): Likewise.
3894         (main_block_label): Likewise.
3895         (group_case_labels_stmt): Likewise.
3896         (find_taken_edge_computed_goto): Likewise.
3897         (find_taken_edge_switch_expr): Likewise.
3898         (gimple_verify_flow_info): Likewise.
3899         (gimple_redirect_edge_and_branch): Likewise.
3900         (gimple_switch_label_bb): New function.
3901         (gimple_switch_default_bb): Likewise.
3902         (gimple_switch_edge): Likewise.
3903         (gimple_switch_default_edge): Likewise.
3904         * tree-cfg.h (label_to_block_fn): Remove and replace ...
3905         (label_to_block): ... with this.
3906         (gimple_switch_label_bb): New.
3907         (gimple_switch_default_bb): Likewise.
3908         (gimple_switch_edge): Likewise.
3909         (gimple_switch_default_edge): Likewise.
3910         * tree-cfgcleanup.c (convert_single_case_switch): Use
3911         new gimple functions and pass new argument to label_to_block.
3912         (cleanup_control_flow_bb):
3913         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
3914         cfun argument explicitly.
3915         (make_eh_edges): Likewise.
3916         (redirect_eh_dispatch_edge): Likewise.
3917         (lower_resx): Likewise.
3918         (lower_eh_dispatch): Likewise.
3919         (maybe_remove_unreachable_handlers): Likewise.
3920         (unsplit_eh): Likewise.
3921         (cleanup_empty_eh): Likewise.
3922         (verify_eh_edges): Likewise.
3923         (verify_eh_dispatch_edge): Likewise.
3924         * tree-ssa-dom.c (record_edge_info): Likewise.
3925         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
3926         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
3927         (thread_through_normal_block): Likewise.
3928         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
3929         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
3930         * tree-switch-conversion.c (switch_conversion::collect): Use new
3931         gimple functions.
3932         (switch_conversion::check_final_bb): Likewise.
3933         (switch_conversion::gather_default_values): Pass new argument
3934         to label_to_block.
3935         (switch_conversion::build_constructors): Likewise.
3936         (switch_decision_tree::compute_cases_per_edge): Use new
3937         gimple_switch_edge function.
3938         (switch_decision_tree::analyze_switch_statement): Pass new argument
3939         to label_to_block.
3940         (switch_decision_tree::try_switch_expansion): Use
3941         gimple_switch_default_edge.
3942         * tree-vrp.c (find_switch_asserts): Pass new argument
3943         to label_to_block.
3944         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
3945         (vr_values::simplify_switch_using_ranges): Likewise.
3947 2018-08-27  Richard Biener  <rguenther@suse.de>
3949         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
3950         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
3952         * tree-ssa-sccvn.h (struct vn_pval): New structure.
3953         (struct vn_nary_op_s): Add unwind_to member.  Add
3954         predicated_values flag and put result into a union together
3955         with a linked list of vn_pval.
3956         (struct vn_ssa_aux): Add name member to make maintaining
3957         a map of SSA name to vn_ssa_aux possible.  Remove no longer
3958         needed info, dfsnum, low, visited, on_sccstack, use_processed
3959         and range_info_anti_range_p members.
3960         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
3961         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
3962         New functions.
3963         (vn_valueize): New global.
3964         (vn_context_bb): Likewise.
3965         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
3966         VN_INFO_PTR_INFO): Remove.
3967         * tree-ssa-sccvn.c: ... (rewrite)
3968         (pass_fre::execute): For -O2+ initialize loops and run
3969         RPO VN in optimistic mode (iterating).  For -O1 and -Og
3970         run RPO VN in non-optimistic mode.
3971         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
3972         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
3973         * doc/invoke.texi (sccvn-max-scc-size): Remove.
3974         (rpo-vn-max-loop-depth): Document.
3975         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
3976         when valuezing the VUSE signals we walked out of the region.
3977         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
3978         (phi_translate): Set VN context block to use for availability
3979         lookup.
3980         (compute_avail): Likewise.
3981         (pre_valueize): New function.
3982         (pass_pre::execute): Adjust to the RPO VN API.
3984         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
3985         (propagate_constants_for_unrolling): Remove.
3986         (tree_unroll_loops_completely): Perform value-numbering
3987         on the unrolled bodies loop parent.
3989 2018-08-27  Richard Biener  <rguenther@suse.de>
3991         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
3992         for partial antic compute.
3994 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
3996         PR rtl-optimization/87065
3997         * combine.c (simplify_if_then_else): Formatting fix.
3998         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
3999         check.
4000         (known_cond): Don't return const_true_rtx for vector modes.  Use
4001         CONST0_RTX instead of const0_rtx.  Formatting fixes.
4003 2018-08-27  Martin Liska  <mliska@suse.cz>
4005         PR gcov-profile/87069
4006         * gcov.c (process_file): Record files already processed
4007         and warn about a file being processed multiple times.
4009 2018-08-27  Martin Liska  <mliska@suse.cz>
4011         PR driver/83193
4012         * config/aarch64/aarch64.c (aarch64_override_options_internal):
4013         Set default values for x_aarch64_*_string strings.
4014         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
4015         prefix.  For -mabi do not print '=ABI' in help and use
4016         <option_value> format for -msve-vector-bits and -moverride
4017         options.
4019 2018-08-26  Jeff Law  <law@redhat.com>
4021         * config/mips/frame-header-opt.c: Include "backend.h" rather than
4022         "cfg.h"
4024 2018-08-26  Marek Polacek  <polacek@redhat.com>
4026         PR c++/87029, Implement -Wredundant-move.
4027         * doc/invoke.texi: Document -Wredundant-move.
4029 2018-08-25  Martin Sebor  <msebor@redhat.com>
4031         PR tree-optimization/87059
4032         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
4033         to the same type as the other.
4034         * fold-const.c (fold_binary_loc): Assert expectation.
4036 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
4038         * config/darwin.c (machopic_legitimize_pic_address): Clean up
4039         extraneous parentheses, dead code section and formatting.
4041 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
4043         PR c++/87091
4044         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
4045         wide enough for jumps in the line-numbering to be visible.
4046         (layout::print_gap_in_line_numbering): New member function.
4047         (layout::calculate_line_spans): When using line numbering, merge
4048         line spans that are only 1 line apart.
4049         (diagnostic_show_locus): When printing line numbers, show gaps in
4050         line numbering directly, rather than printing headers.
4051         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
4052         line-numbering with multiple line spans.
4053         (selftest::test_fixit_insert_containing_newline_2): Add test of
4054         line-numbering, in which the spans are close enough to be merged.
4056 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
4058         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
4059         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
4060         * tree-vrp.c (range_is_nonnull): Remove.
4061         (range_includes_zero_p): Accept value_range instead of min/max.
4062         (extract_range_from_binary_expr_1): Do not early bail on
4063         POINTER_PLUS_EXPR.
4064         Use range_includes_zero_p instead of range_is_nonnull.
4065         (extract_range_from_unary_expr): Use range_includes_zero_p instead
4066         of range_is_nonnull.
4067         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
4068         special case VR_ANTI_RANGE.
4069         (vrp_finalize): Same.
4070         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
4071         instead of min/max.
4072         (range_is_nonnull): Remove.
4073         * vr-values.c (vrp_stmt_computes_nonzero): Use
4074         range_includes_zero_p instead of range_is_nonnull.
4075         (extract_range_basic): Pass value_range to range_includes_zero_p
4076         instead of range_is_nonnull.
4078 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
4080         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
4081         * emit-rtl.h (rtl_data): Remove return_bnd.
4082         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
4083         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
4084         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
4085         (POINTER_BOUNDS_MODE): Remove definition.
4086         (make_pointer_bounds_mode): Remove.
4087         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
4088         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
4089         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
4090         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
4091         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
4092         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
4093         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
4095         * config/i386/i386-modes.def (BND32, BND64): Remove.
4096         * config/i386/i386.c (dbx_register_map): Remove bound registers.
4097         (dbx64_register_map): Ditto.
4098         (svr4_dbx_register_map): Ditto.
4099         (indirect_thunk_bnd_needed): Remove.
4100         (indirect_thunks_bnd_used): Ditto.
4101         (indirect_return_bnd_needed): Ditto.
4102         (indirect_return_via_cx_bnd): Ditto.
4103         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
4104         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
4105         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
4106         (output_indirect_thunk_function): Remove handling of
4107         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
4108         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
4109         (ix86_save_reg): Remove handling of crtl->return_bnd.
4110         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
4111         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
4112         and UNSPEC_BNDLX_ADDR.
4113         (ix86_output_indirect_branch_via_reg): Remove handling of
4114         indirect_thunk_prefix_bnd.
4115         (ix86_output_indirect_branch_via_push): Ditto.
4116         (ix86_output_function_return): Ditto.
4117         (ix86_output_indirect_function_return): Ditto.
4118         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
4119         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
4120         (CALL_USED_REGISTERS): Ditto.
4121         (REG_ALLOC_ORDER): Update for removal of bound registers.
4122         (HI_REGISTER_NAMES): Ditto.
4123         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
4124         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
4125         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
4126         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
4127         (FIRST_PSEUDO_REG): Update.
4128         (BND): Remove mode iterator.
4129         * config/i386/predicates.md (bnd_mem_operator): Remove.
4131 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
4133         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
4134         vectors.
4136 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
4138         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
4139         the case in which the permute needs only a single element and
4140         repeats for every vector of the result.  Extend that case to
4141         handle variable-length vectors.
4142         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4144 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
4146         PR debug/79342
4147         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
4148         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
4150 2018-08-24  Richard Biener  <rguenther@suse.de>
4152         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
4153         bb_flags_allocated members.
4154         (auto_flag): New RAII class for allocating flags.
4155         (auto_edge_flag): New RAII class for allocating edge flags.
4156         (auto_bb_flag): New RAII class for allocating bb flags.
4157         * cfgloop.c (verify_loop_structure): Allocate temporary edge
4158         flag dynamically.
4159         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
4160         in favor of temporarily allocated BB flag.
4161         * hsa-brig.c: Re-order includes.
4162         * hsa-dump.c: Likewise.
4163         * hsa-regalloc.c: Likewise.
4164         * print-rtl.c: Likewise.
4165         * profile-count.c: Likewise.
4167 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
4169         PR target/86989
4170         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
4171         the TOC register.
4173 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
4175         PR 87073/bootstrap
4176         * wide-int-range.cc (wide_int_range_div): Do not ignore result
4177         from wide_int_range_multiplicative_op.
4179 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4181         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
4182         "permutaion".
4184 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
4186         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
4187         to 'expanded'.
4189 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
4191         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
4192         full GENERIC expression used for replacement.
4194 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
4196         * tree-vrp.c (abs_extent_range): Remove.
4197         (extract_range_into_wide_ints): Pass wide ints by reference.
4198         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
4199         Pass wide ints by reference in all calls to
4200         extract_range_into_wide_ints.
4201         * wide-int-range.cc (wide_int_range_div): New.
4202         * wide-int-range.h (wide_int_range_div): New.
4203         (wide_int_range_includes_zero_p): New.
4204         (wide_int_range_zero_p): New.
4206 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
4208         * config/aarch64/aarch64.md (arches): New enum.
4209         (arch): New enum attr.
4210         (arch_enabled): New attr.
4211         (enabled): Now uses arch_enabled only.
4212         (simd, sve, fp16): Removed attribute.
4213         (fp): Attr now defined in terms of 'arch'.
4214         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
4215         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
4216         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
4217         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
4218         attributes into 'arch'.
4219         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
4220         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
4221         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
4222         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
4223         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
4224         'simd' attribute into 'arch'.
4225         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
4226         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
4227         Convert use of 'fp' attribute to 'arch'.
4228         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
4229         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
4230         into 'arch'.
4231         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
4232         (different modes) Merge 'fp' and 'simd' into 'arch'.
4233         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
4234         'simd' into 'arch'.
4236 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
4238         PR rtl-optimization/87026
4239         * expmed.c (canonicalize_comparison): If we can no longer create
4240         pseudoregisters, don't.
4242 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
4244         PR target/86951
4245         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
4246         prototype.
4247         * config/arm/arm.c (speculation_barrier_libfunc): New static
4248         variable.
4249         (arm_init_libfuncs): Initialize it.
4250         (arm_emit_speculation_barrier): New function.
4251         * config/arm/arm.md (speculation_barrier): Call
4252         arm_emit_speculation_barrier for architectures that do not have
4253         DSB or ISB.
4254         (speculation_barrier_insn): Only match on Armv7 or later.
4256 2018-08-23  Richard Biener  <rguenther@suse.de>
4258         PR middle-end/87024
4259         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
4260         calls.
4262 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
4264         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
4265         of single-vector TBLs.
4266         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
4267         one input is given.
4269 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
4271         PR target/85910
4272         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
4273         aarch64_evpc_tbl guard.
4275 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4277         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
4278         behaviour.
4280 2018-08-22  Martin Sebor  <msebor@redhat.com>
4282         PR middle-end/87052
4283         * tree-pretty-print.c (pretty_print_string): Add argument.
4284         (dump_generic_node): Call to pretty_print_string with string size.
4286 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
4288         PR rtl-optimization/86771
4289         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
4290         of two SETs into those two SETs, one to be placed at i2, if that SETs
4291         destination is modified between i2 and i3.
4293 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4295         PR tree-optimization/86725
4296         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
4297         function.
4298         (vect_analyze_scalar_cycles_1): Check it.
4300 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4302         PR tree-optimization/86725
4303         * tree-vect-loop.c (vect_is_simple_reduction): When treating
4304         an outer loop phi as a double reduction, make sure that the
4305         single user of the phi result is an inner loop phi.
4307 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4309         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
4310         grouped stores with gaps to a strided group.
4312 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
4314         * tree-vect-stmts.c (get_group_load_store_type)
4315         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
4316         first statement in a group.
4318 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4320         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
4321         the sequence used in gcc/gcc.c.
4323 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4325         PR other/704
4326         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
4327         building it.
4329 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4331         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
4332         Darwin10-specific unwinder-shim.
4333         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
4334         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
4335         New to cater for Darwin10 Rosetta.
4337 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4339         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
4340         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
4342 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
4344         PR bootstrap/81033
4345         PR target/81733
4346         PR target/52795
4347         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
4348         (dwarf2out_switch_text_section): Generate a local label for the
4349         second function sub-section and apply it as the second FDE start
4350         label.
4351         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
4352         second sub-section start.
4354 2018-08-22  Richard Biener  <rguenther@suse.de>
4356         PR tree-optimization/86988
4357         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
4359 2018-08-22  Richard Biener  <rguenther@suse.de>
4361         PR tree-optimization/86945
4362         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
4364 2018-08-22  Alexandre Oliva <oliva@adacore.com>
4366         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
4367         a comment about how uses of r2 for .sdata2 come about.
4369 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
4371         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
4373 2018-08-21  Marek Polacek  <polacek@redhat.com>
4375         PR c++/86981, Implement -Wpessimizing-move.
4376         * doc/invoke.texi: Document -Wpessimizing-move.
4378 2018-08-21  Jan Hubicka  <jh@suse.cz>
4380         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
4381         * tree.h (is_redundant_typedef): Remove.
4382         * dwarf2out.c (is_redundant_typedef): Turn into static function.
4384 2018-08-21  Jan Hubicka  <jh@suse.cz>
4386         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
4387         when possible.
4389 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
4391         * expmed.c (extract_low_bits): Reject invalid subregs early.
4393 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4395         PR middle-end/86121
4396         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
4397         behaviour.
4399 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4401         * config/vxworks.h: Guard vxworks_asm_out_constructor and
4402         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
4403         * config/vxworks.c: Likewise.
4405 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4407         * config/vxworks.c: Set targetm.have_ctors_dtors
4408         if HAVE_INITFINI_ARRAY_SUPPORT.
4409         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
4410         if HAVE_INITFINI_ARRAY_SUPPORT.
4412 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4414         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
4415         default search path for VxWorks < 7.
4417 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4419         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
4420         (get_format_string): Refer to c_getstr.
4422 2018-08-21  Tom de Vries  <tdevries@suse.de>
4424         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4425         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4426         (debuginfo_early_stop): Declare.
4427         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4428         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4429         (debuginfo_early_stop): New function.
4430         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
4431         and debuginfo_early_stop.
4432         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
4433         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
4434         (general_init): Call debuginfo_early_init.
4435         (finalize): Call debuginfo_fini.
4436         (do_compile): Call debuginfo_init.
4437         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
4438         -fdump-early-debug.
4439         (@item -fdump-debug, @item -fdump-earlydebug): Add.
4441 2018-08-21  Tom de Vries  <tdevries@suse.de>
4443         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
4444         flag_dump_noaddr and flag_dump_unnumbered.
4446 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
4448         * wide-int-range.cc (wide_int_range_abs): New.
4449         (wide_int_range_order_set): Rename from wide_int_range_min_max.
4450         * wide-int-range.h (wide_int_range_abs): New.
4451         (wide_int_range_min_max): New.
4452         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
4453         case to call wide_int_range_abs.
4454         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
4455         (extract_range_from_abs_expr): Delete.
4457 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
4459         PR target/87033
4460         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
4461         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
4462         for indexed loads.
4464 2018-08-20  Nathan Sidwell  <nathan@acm.org>
4465             Jeff Law <law@redhat.com>
4467         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
4468         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
4470 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
4472         PR other/84889
4473         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
4474         (decl_attributes): Likewise.
4475         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
4476         instance.
4477         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4478         * diagnostic-core.h (class auto_diagnostic_group): New class.
4479         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
4480         (diagnostic_report_diagnostic): Handle the first diagnostics within
4481         a group.
4482         (emit_diagnostic): Add auto_diagnostic_group instance.
4483         (inform): Likewise.
4484         (inform_n): Likewise.
4485         (warning): Likewise.
4486         (warning_at): Likewise.
4487         (warning_n): Likewise.
4488         (pedwarn): Likewise.
4489         (permerror): Likewise.
4490         (error): Likewise.
4491         (error_n): Likewise.
4492         (error_at): Likewise.
4493         (sorry): Likewise.
4494         (fatal_error): Likewise.
4495         (internal_error): Likewise.
4496         (internal_error_no_backtrace): Likewise.
4497         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
4498         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
4499         * diagnostic.h (struct diagnostic_context): Add fields
4500         "diagnostic_group_nesting_depth",
4501         "diagnostic_group_emission_count", "begin_group_cb",
4502         "end_group_cb".
4503         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
4504         Add auto_diagnostic_group instance(s).
4505         (find_explicit_erroneous_behavior): Likewise.
4506         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
4507         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
4508         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
4509         (gimplify_va_arg_expr): Likewise.
4510         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
4511         (HSA_SORRY_AT): Likewise.
4512         * ipa-devirt.c (compare_virtual_tables): Likewise.
4513         (warn_odr): Likewise.
4514         * multiple_target.c (expand_target_clones): Likewise.
4515         * opts-common.c (cmdline_handle_error): Likewise.
4516         * reginfo.c (globalize_reg): Likewise.
4517         * substring-locations.c (format_warning_n_va): Likewise.
4518         * tree-inline.c (expand_call_inline): Likewise.
4519         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
4520         * tree-ssa-loop-niter.c
4521         (do_warn_aggressive_loop_optimizations): Likewise.
4522         * tree-ssa-uninit.c (warn_uninit): Likewise.
4523         * tree.c (warn_deprecated_use): Likewise.
4525 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
4527         PR target/87014
4528         * config/i386/i386.md (eh_return): Always update EH return
4529         address in word_mode.
4531 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
4533         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
4534         TARGET_SPLIT_COMPLEX_ARG is defined.
4536 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4538         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
4540 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4542         PR target/86984
4543         * expr.c (expand_assignment): Assert that bitpos is positive.
4544         (store_field): Likewise
4545         (expand_expr_real_1): Make sure that bitpos is positive.
4546         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
4547         integer overflow.
4549 2018-08-20  Nathan Sidwell  <nathan@acm.org>
4551         * Makefile.in (CPP_ID_DATA_H): Delete.
4552         (CPP_INTERNAL_H): Don't add it.
4553         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
4554         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
4556 2018-08-20  Richard Biener  <rguenther@suse.de>
4558         PR tree-optimization/78655
4559         * tree-vrp.c (extract_range_from_binary_expr_1): Make
4560         pointer + offset nonnull if either operand is nonnull work.
4562 2018-08-20  Tom de Vries  <tdevries@suse.de>
4564         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
4565         unless the referenced die describes the added property using
4566         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
4567         Otherwise, add a DW_AT_location to the referenced die.
4569 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
4571         PR target/86994
4572         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
4573         register_operand when calling ix86_set_reg_reg_cost.
4574         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
4575         Set *total to 0 for operands that satisfy x86_64_immediate_operand
4576         predicate and to 1 otherwise.
4578 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
4580         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
4581         emit a diagnostic that it is not supported and reset the option.
4582         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
4583         supported and consume the option.  (ASM_FINAL_SPEC): New.
4585 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
4587         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
4588         a sentence.
4590 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
4592         C-SKY port: Documentation
4594         * doc/extend.texi (C-SKY Function Attributes): New section.
4595         * doc/invoke.texi (Option Summary): Add C-SKY options.
4596         (C-SKY Options): New section.
4597         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
4599 2018-08-17  Jojo  <jijie_rong@c-sky.com>
4600             Huibin Wang  <huibin_wang@c-sky.com>
4601             Sandra Loosemore  <sandra@codesourcery.com>
4602             Chung-Lin Tang  <cltang@codesourcery.com>
4604         C-SKY port: Backend implementation
4606         * config/csky/*: New.
4607         * common/config/csky/*: New.
4609 2018-08-17  Jojo  <jijie_rong@c-sky.com>
4610             Huibin Wang  <huibin_wang@c-sky.com>
4611             Sandra Loosemore  <sandra@codesourcery.com>
4612             Chung-Lin Tang  <cltang@codesourcery.com>
4613             Andrew Jenner  <andrew@codesourcery.com>
4615         C-SKY port: Configury
4617         * config.gcc (csky-*-*): New.
4618         * configure.ac: Add csky to targets for dwarf2 debug_line support.
4619         * configure: Regenerated.
4621 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
4623         * dump-context.h: Include "dumpfile.h".
4624         (dump_context::dump_printf_va): Convert final param from va_list
4625         to va_list *.  Convert from ATTRIBUTE_PRINTF to
4626         ATTRIBUTE_GCC_DUMP_PRINTF.
4627         (dump_context::dump_printf_loc_va): Likewise.
4628         * dumpfile.c: Include "stringpool.h".
4629         (make_item_for_dump_printf_va): Delete.
4630         (make_item_for_dump_printf): Delete.
4631         (class dump_pretty_printer): New class.
4632         (dump_pretty_printer::dump_pretty_printer): New ctor.
4633         (dump_pretty_printer::emit_items): New member function.
4634         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
4635         function.
4636         (dump_pretty_printer::emit_item): New member function.
4637         (dump_pretty_printer::stash_item): New member function.
4638         (dump_pretty_printer::format_decoder_cb): New member function.
4639         (dump_pretty_printer::decode_format): New member function.
4640         (dump_context::dump_printf_va): Reimplement in terms of
4641         dump_pretty_printer.
4642         (dump_context::dump_printf_loc_va): Convert final param from va_list
4643         to va_list *.
4644         (dump_context::begin_scope): Reimplement call to
4645         make_item_for_dump_printf.
4646         (dump_printf): Update for change to dump_printf_va.
4647         (dump_printf_loc): Likewise.
4648         (selftest::test_capture_of_dump_calls): Convert "stmt" from
4649         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
4650         with %T, %E, and %G.
4651         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
4652         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
4653         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
4654         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
4655         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
4656         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
4657         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
4658         within a dump_printf_loc call to "%wu".
4659         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
4660         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
4661         missing space after "=".
4662         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
4663         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
4664         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
4665         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
4666         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
4667         duplicate "vectorized" from message.
4669 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4671         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
4672         polyNxK_t element's TYPE_STRING_FLAG.
4674 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
4676         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
4677         (they were unnamed before).  Fix comments.
4679 2018-08-17  Nathan Sidwell  <nathan@acm.org>
4681         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
4683 2018-08-17  Richard Biener  <rguenther@suse.de>
4685         PR tree-optimization/86841
4686         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
4688 2018-08-17  Martin Liska  <mliska@suse.cz>
4690         * common.opt: Remove Warn, Init and Report for options with
4691         Ignore/Deprecated flag. Warning is done automatically for
4692         Deprecated flags.
4693         * config/i386/i386.opt: Likewise.
4694         * config/ia64/ia64.opt: Likewise.
4695         * config/rs6000/rs6000.opt: Likewise.
4696         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
4697         Remove usage of flag_check_pointer_bounds.
4698         * lto-wrapper.c (merge_and_complain): Do not handle
4699         OPT_fcheck_pointer_bounds.
4700         (append_compiler_options): Likewise.
4701         * opt-functions.awk: Do not handle Deprecated.
4702         * optc-gen.awk: Check that Var, Report and Init are not
4703         used for an option with Ignore/Deprecated flag.
4704         * opts-common.c (decode_cmdline_option): Do not report
4705         CL_ERR_DEPRECATED.
4706         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
4707         options.
4708         * opts.h (struct cl_option): Remove cl_deprecated flag.
4709         (CL_ERR_DEPRECATED): Remove error enum value.
4711 2018-08-17  Richard Biener  <rguenther@suse.de>
4713         PR middle-end/86505
4714         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
4715         across a va-arg-pack using call adjust its return value accordingly.
4717 2018-08-16  Martin Sebor  <msebor@redhat.com>
4719         PR tree-optimization/86853
4720         * gimple-ssa-sprintf.c (struct format_result): Rename member.
4721         (struct fmtresult): Add member and initialize it in ctors.
4722         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
4723         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
4724         (format_directive): Set POSUNDER4K when MAYFAIL is set.
4725         (parse_directive): Handle %C same as %c.
4726         (sprintf_dom_walker::compute_format_length): Adjust.
4727         (is_call_safe): Adjust.
4729 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4731         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
4732         for determining how to count the elements.
4733         * builtins.h (c_strlen): Adjust prototype.
4734         * expr.c (string_constant): Add new parameter mem_size.
4735         Set *mem_size appropriately.
4736         * expr.h (string_constant): Adjust protoype.
4737         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
4738         * gimple-fold.h (get_range_strlen): Adjust prototype.
4739         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
4740         (format_string): Call get_string_length with eltsize.
4742 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
4744         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
4745         to emit the span, rather than setting it as the prefix.
4747 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
4749         * diagnostic-show-locus.c (layout::start_annotation_line): Add
4750         "margin_char" parameter, defaulting to space.  Use it in place
4751         of pp_space for the initial part of the margin.
4752         (layout::print_leading_fixits): Use '+' when filling the margin
4753         of line-insertion fix-it hints.
4755 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4757         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
4758         Delete.
4760 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4762         * config/rs6000/altivec.md: Don't set length attribute to the default
4763         value.
4764         * config/rs6000/darwin.md: Ditto.
4765         * config/rs6000/dfp.md: Ditto.
4766         * config/rs6000/htm.md: Ditto.
4767         * config/rs6000/rs6000.md: Ditto.
4768         * config/rs6000/sync.md: Ditto.
4769         * config/rs6000/vsx.md: Ditto.
4771 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4773         * config/rs6000/altivec.md: Don't set length attribute to the default
4774         value, for branch instructions.
4775         * config/rs6000/darwin.md: Ditto.
4776         * config/rs6000/rs6000.md: Ditto.
4778 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4780         * config/rs6000/rs6000.md (length): Always define as const_int 4.
4781         (unnamed conditional branch define_insn): Set length to 4 or 8
4782         depending on offset.
4783         (<bd>_<mode>): Similar, for alternative 0.
4784         (<bd>tf_<mode>): Ditto.
4786 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
4788         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
4790 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
4792         * doc/rtl.texi: Replace old RTX class names with new names.
4795 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
4797         * expmed.h (canonicalize_comparison): New declaration.
4798         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
4799         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
4800         * optabs.c (prepare_cmp_insn): Likewise.
4801         * rtl.h (unsigned_condition_p): New function which checks if a
4802         comparison operator is unsigned.
4804 2018-08-16  Nathan Sidwell  <nathan@acm.org>
4806         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
4807         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
4809 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
4811         PR target/84711
4812         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
4813         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
4814         (mov<mov>): ..this and enable unconditionally.
4816 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
4818         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
4820 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
4822         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
4823         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
4824         "Common" with "Target".
4826 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
4828         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
4829         * doc/invoke.texi (mmitigate-rop): Remove.
4830         * config/i386/i386.c: Do not include "regrename.h".
4831         (ix86_rop_should_change_byte_p, reg_encoded_number)
4832         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
4833         Remove.
4834         (ix86_reorg): Remove call to ix86_mitigate_rop.
4835         * config/i386/i386.md (attr "modrm_class"): Remove.
4836         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
4837         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
4838         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
4840 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
4842         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
4843         allow folding of mergeh() and mergel() for the float and double types.
4844         (fold_mergehl_helper): Rework to handle building a permute tree
4845         for float vectors.
4847 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
4849         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
4850         for TARGET_SSE.
4852 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
4854         * common.opt (fdiagnostics-show-labels): New option.
4855         * diagnostic-show-locus.c (class layout_range): Add field
4856         "m_label".
4857         (class layout): Add field "m_show_labels_p".
4858         (layout_range::layout_range): Add param "label" and use it to
4859         initialize m_label.
4860         (make_range): Pass in NULL for new "label" param of layout_range's
4861         ctor.
4862         (layout::layout): Initialize m_show_labels_p.
4863         (layout::maybe_add_location_range): Pass in loc_range->m_label
4864         when constructing layout_range instances.
4865         (struct line_label): New struct.
4866         (layout::print_any_labels): New member function.
4867         (layout::print_line): Call it if label-printing is enabled.
4868         (selftest::test_one_liner_labels): New test.
4869         (selftest::test_diagnostic_show_locus_one_liner): Call it.
4870         * diagnostic.c (diagnostic_initialize): Initialize
4871         context->show_labels_p.
4872         * diagnostic.h (struct diagnostic_context): Add field
4873         "show_labels_p".
4874         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
4875         -fno-diagnostics-show-labels.
4876         * dwarf2out.c (gen_producer_string): Add
4877         OPT_fdiagnostics_show_labels to the ignored options.
4878         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
4879         param.
4880         (gcc_rich_location::maybe_add_expr): Likewise.
4881         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
4882         label" param, defaulting to NULL.
4883         (gcc_rich_location::add_expr): Add "label" param.
4884         (gcc_rich_location::maybe_add_expr): Likewise.
4885         (class text_range_label): New class.
4886         (class range_label_for_type_mismatch): New class.
4887         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
4888         of format_warning_va.
4889         (fmtwarn_n): Likewise for new params of format_warning_n_va.
4890         * lto-wrapper.c (merge_and_complain): Add
4891         OPT_fdiagnostics_show_labels to the "pick one setting" options.
4892         (append_compiler_options): Likewise to the dropped options.
4893         (append_diag_options): Likewise to the passed-on options.
4894         * opts.c (common_handle_option): Handle the new option.
4895         * selftest-diagnostic.c
4896         (test_diagnostic_context::test_diagnostic_context): Enable
4897         show_labels_p.
4898         * substring-locations.c: Include "gcc-rich-location.h".
4899         (format_warning_n_va): Add "fmt_label" and "param_label" params
4900         and use them as appropriate.
4901         (format_warning_va): Add "fmt_label" and "param_label" params,
4902         passing them on to format_warning_n_va.
4903         (format_warning_at_substring): Likewise.
4904         (format_warning_at_substring_n): Likewise.
4905         * substring-locations.h (format_warning_va): Add "fmt_label" and
4906         "param_label" params.
4907         (format_warning_n_va): Likewise.
4908         (format_warning_at_substring): Likewise.
4909         (format_warning_at_substring_n): Likewise.
4910         * toplev.c (general_init): Initialize global_dc->show_labels_p.
4912 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
4914         PR testsuite/86519
4915         * builtins.c (expand_builtin_memcmp): Do not expand the call
4916         when overflow is detected.
4918 2018-08-15  Martin Sebor  <msebor@redhat.com>
4920         PR tree-optimization/71625
4921         * config/aarch64/aarch64-builtins.c
4922         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
4924 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
4926         * config/s390/s390.c (s390_reorg): Remove loop.
4928 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
4930         * config/darwin.c
4931          (darwin_function_switched_text_sections): Delete.
4932         * gcc/config/darwin.h
4933          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
4935 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
4937         PR target/81685
4938         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
4939         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
4940         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
4942 2018-08-15  Martin Liska  <mliska@suse.cz>
4944         PR tree-optimization/86925
4945         * predict.c (expr_expected_value_1): When taking
4946         later predictor, assign also probability.
4947         Use fold_build2_initializer_loc in order to fold
4948         the expression in -frounding-math.
4950 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
4952         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
4953         patterns.
4954         (expand_vec_perm_1): Try the new method.
4956 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
4958         PR target/86547
4959         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
4960         Check whether lra_live_max_point is 0 before dividing.
4962 2018-08-14  Martin Sebor  <msebor@redhat.com>
4964         PR tree-optimization/86650
4965         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
4966         (vrp_prop::check_mem_ref): Same.
4968 2018-08-13  Liu Hao <lh_mouse@126.com>
4970         * pretty-print.c (eat_esc_sequence): Swap the foreground and
4971         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
4972         and clear it thereafter, as it only works for DBCS.
4974 2018-08-13  Liu Hao <lh_mouse@126.com>
4976         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
4977         handle returned by _get_osf_handle().
4979 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
4981         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
4982         for folding vec_perm.
4984 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
4986         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
4987         Add support for gimple-folding of vec_pack() and vec_unpack()
4988         intrinsics.
4990 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
4992         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
4993         vec_xst variants to the list.
4994         (rs6000_gimple_fold_builtin): Add support for folding unaligned
4995         vector loads and stores.
4997 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
4999         * config.gcc (rs6000-ibm-aix4.x): Delete.
5000         (rs6000-ibm-aix5.1): Delete.
5001         (rs6000-ibm-aix5.2): Delete.
5002         (rs6000-ibm-aix5.3): Delete.
5003         * config/rs6000/aix43.h: Delete.
5004         * config/rs6000/aix51.h: Delete.
5005         * config/rs6000/aix52.h: Delete.
5006         * config/rs6000/t-aix43: Delete.
5008 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
5010         * config/s390/s390.c (s390_decompose_constant_pool_ref):
5011         New function.
5012         (s390_decompose_address): Factor out constant pool ref
5013         decomposition.
5015 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5017         * config/nds32/nds32-predicates.c
5018         (nds32_can_use_bclr_p): Change return type as bool.
5019         (nds32_can_use_bset_p): Ditto.
5020         (nds32_can_use_btgl_p): Ditto.
5021         (nds32_can_use_bitci_p): Ditto.
5022         * config/nds32/nds32-protos.h
5023         (nds32_can_use_bclr_p): Change declaration.
5024         (nds32_can_use_bset_p): Ditto.
5025         (nds32_can_use_btgl_p): Ditto.
5026         (nds32_can_use_bitci_p): Ditto.
5028 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5030         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
5031         Support -msched-prolog-epilog option.
5032         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
5034 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5036         * common/config/nds32/nds32-common.c
5037         (nds32_option_optimization_table): Enalbe -malways-align.
5039 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5041         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
5042         extra_headers.
5043         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
5044         OPT_misr_secure_ case.
5045         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
5046         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
5047         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
5048         secure attribute.
5049         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
5050         (nds32_isr_info): New field security_level.
5051         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
5052         * config/nds32/nds32.md (return_internal): Consider critical attribute.
5053         * config/nds32/nds32.opt (misr-secure): New option.
5054         * config/nds32/nds32_init.inc: New file.
5055         * config/nds32/nds32_isr.h: New file.
5057 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
5059         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
5060         Update comment for atomic instructions.
5061         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
5062         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
5063         Remove.
5064         (atomic_loaddi): Revise fence expansion to only emit fence prior to
5065         load for __ATOMIC_SEQ_CST model.
5066         (atomic_loaddi_1): Remove float register target.
5067         (atomic_storedi): Handle CONST_INT values.
5068         (atomic_storedi_1): Remove float register source.  Add special case
5069         for zero value.
5070         (memory_barrier): New expander and insn.
5072 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
5074         PR tree-optimization/86835
5075         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
5076         new_stmt after def_gsi, make sure to insert new_square_stmt after
5077         that stmt, not 2 stmts before it.
5079 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
5081         PR target/82418
5082         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
5083         instead of SWI48.
5085 2018-08-10  Martin Liska  <mliska@suse.cz>
5087         PR target/83610
5088         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
5089         function type.
5090         * builtins.c (expand_builtin_expect_with_probability):
5091         New function.
5092         (expand_builtin_expect_with_probability): New function.
5093         (build_builtin_expect_predicate): Add new argumnet probability
5094         for BUILT_IN_EXPECT_WITH_PROBABILITY.
5095         (fold_builtin_expect):
5096         (fold_builtin_2):
5097         (fold_builtin_3):
5098         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
5099         * builtins.h (fold_builtin_expect): Set new argument.
5100         * doc/extend.texi: Document __builtin_expect_with_probability.
5101         * doc/invoke.texi: Likewise.
5102         * gimple-fold.c (gimple_fold_call): Pass new argument.
5103         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
5104         also BUILT_IN_EXPECT_WITH_PROBABILITY.
5105         * predict.c (get_predictor_value): New function.
5106         (expr_expected_value): Add new argument probability. Assume
5107         that predictor and probability are always non-null.
5108         (expr_expected_value_1): Likewise.  For __builtin_expect and
5109         __builtin_expect_with_probability set probability.  Handle
5110         combination in binary expressions.
5111         (tree_predict_by_opcode): Simplify code by simply calling
5112         get_predictor_value.
5113         (pass_strip_predict_hints::execute): Add handling of
5114         BUILT_IN_EXPECT_WITH_PROBABILITY.
5115         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
5116         new predictor.
5117         * tree.h (DECL_BUILT_IN_P): New function.
5119 2018-08-10  Martin Liska  <mliska@suse.cz>
5121         PR tree-optimization/85799
5122         * passes.def: Add argument for pass_strip_predict_hints.
5123         * predict.c (class pass_strip_predict_hints): Add new argument
5124         early_p.
5125         (strip_predictor_early): New function.
5126         (pass_strip_predict_hints::execute): Call the function to
5127         strip predictors.
5128         (strip_predict_hints): New function.
5129         * predict.def: Fix comment.
5131 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
5133         * Makefile.in: Clarify which tm.texi to copy over to assert the
5134         right to grant a GFDL license for all.
5136 2018-08-09  Jeff Law  <law@redhat.com>
5138         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
5139         unused variable.
5141 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
5143         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
5144         prototype.
5146 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
5148         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
5149         reductions for variable-length vectors.
5151 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
5153         PR other/84889
5154         * common.opt (fdiagnostics-show-line-numbers): New option.
5155         * diagnostic-show-locus.c (class layout): Add fields
5156         "m_show_line_numbers_p" and "m_linenum_width";
5157         (num_digits): New function.
5158         (test_num_digits): New function.
5159         (layout::layout): Initialize new fields.  Update m_x_offset
5160         logic to handle any left margin.
5161         (layout::print_source_line): Print line number when requested.
5162         (layout::start_annotation_line): New member function.
5163         (layout::print_annotation_line): Call it.
5164         (layout::print_leading_fixits): Likewise.
5165         (layout::print_trailing_fixits): Likewise.  Update calls to
5166         move_to_column for new parameter.
5167         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
5168         it to potentially call start_annotation_line.
5169         (layout::show_ruler): Call start_annotation_line.
5170         (selftest::test_line_numbers_multiline_range): New selftest.
5171         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
5172         and selftest::test_line_numbers_multiline_range.
5173         * diagnostic.c (diagnostic_initialize): Initialize
5174         show_line_numbers_p.
5175         * diagnostic.h (struct diagnostic_context): Add field
5176         "show_line_numbers_p".
5177         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5178         -fno-diagnostics-show-line-numbers.
5179         * dwarf2out.c (gen_producer_string): Add
5180         OPT_fdiagnostics_show_line_numbers to the ignored options.
5181         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
5182         one setting" options.
5183         (append_compiler_options): Likewise to the dropped options.
5184         (append_diag_options): Likewise to the passed-on options.
5185         * opts.c (common_handle_option): Handle the new option.
5186         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
5188 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5190         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
5191         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
5192         third argument of type "const signed char" to descriptions of
5193         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
5194         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
5195         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
5196         __builtin_bcdsub_ov functions.
5198 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
5200         PR tree-optimization/86858
5201         * tree-vect-loop.c (vect_is_simple_reduction): Restore
5202         flow_bb_inside_loop_p calls.
5204 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
5206         PR tree-optimization/86871
5207         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
5208         instead of gimple_assign_lhs.
5210 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
5212         PR target/86887
5213         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
5214         register constraint to operand 0.
5215         (add<mode>3_carryinC): Likewise.
5216         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
5218 2018-08-09  Martin Liska  <mliska@suse.cz>
5220         PR c/86895
5221         * common.opt: Remove extra line.
5223 2018-08-09  Martin Liska  <mliska@suse.cz>
5225         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
5226         at the end of a line, make first letter capital and end up
5227         a sentence with a dot.
5228         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
5229         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
5230         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
5231         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
5232         (PARAM_MAX_ISL_OPERATIONS): Likewise.
5233         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
5234         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
5235         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
5236         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
5237         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
5238         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
5239         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
5240         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
5241         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
5242         (PARAM_TREE_REASSOC_WIDTH): Likewise.
5243         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
5244         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
5245         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
5247 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
5249         PR target/84332
5250         * config/s390/s390.c (s390_option_override_internal): Reduce the
5251         stack-clash-protection-probe-interval param if it would be too big
5252         for z900.
5254 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
5256         PR target/46179
5257         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
5258         * config/m68k/m68k.c (handle_move_double): Don't call
5259         m68k_final_prescan_insn.
5260         (m68k_adjust_decorated_operand): Renamed from
5261         m68k_final_prescan_insn, remove first and third operand and
5262         simplify.
5263         (print_operand): Call it.
5264         (print_operand_address): Call it.
5266 2018-08-08  Nathan Sidwell  <nathan@acm.org>
5268         * diagnostic.c (diagnostic_report_current_module): Use
5269         linemap_included_from & linemap_included_from_linemap.
5271 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
5273         * config/aarch64/aarch64-cores.def: Add phecda core.
5274         * config/aarch64/aarch64-tune.md: Regenerate.
5275         * doc/invoke.texi: Add phecda core.
5277 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
5279         PR target/85295
5280         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
5281         definitions.
5282         * config/s390/s390.md ("movti"): Add more alternatives for
5283         constant to GPR copies.
5285 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
5287         * config/s390/s390.c: Fix whitespace damage throughout the file.
5288         * config/s390/s390.h: Likewise.
5289         * config/s390/tpf.h: Likewise.
5291 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
5293         * config/s390/s390.c (s390_loadrelative_operand_p):
5294         Remove TARGET_CPU_ZARCH usages.
5295         (s390_rtx_costs): Likewise.
5296         (s390_legitimate_constant_p): Likewise.
5297         (s390_cannot_force_const_mem): Likewise.
5298         (legitimate_reload_constant_p): Likewise.
5299         (s390_preferred_reload_class): Likewise.
5300         (legitimize_pic_address): Likewise.
5301         (legitimize_tls_address): Likewise.
5302         (s390_split_branches): Removed.
5303         (s390_add_execute): Removed.
5304         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
5305         (s390_mainpool_start): Likewise.
5306         (s390_mainpool_finish): Likewise.
5307         (s390_mainpool_cancel): Removed.
5308         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
5309         (s390_chunkify_cancel): Likewise.
5310         (s390_return_addr_rtx): Likewise.
5311         (s390_register_info): Remove split_branches_pending_p uages.
5312         (s390_optimize_register_info): Likewise.
5313         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
5314         split_branches_pending_p usages.
5315         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
5316         (s390_load_got): Likewise.
5317         (s390_expand_split_stack_prologue): Likewise.
5318         (output_asm_nops): Likewise.
5319         (s390_function_profiler): Likewise.
5320         (s390_emit_call): Likewise.
5321         (s390_conditional_register_usage): Likewise.
5322         (s390_optimize_prologue): Likewise.
5323         (s390_reorg): Remove TARGET_CPU_ZARCH and
5324         split_branches_pending_p usages.
5325         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
5326         usages.
5327         (s390_output_indirect_thunk_function): Likewise.
5328         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
5329         (TARGET_CPU_ZARCH_P): Removed.
5330         (struct machine_function): Remove split_branches_pending_p.
5331         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
5333 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
5335         * common/config/s390/s390-common.c (processor_flags_table):
5336         Remove flags.
5337         * config.gcc: Remove with_arch/with_tune support.
5338         * config/s390/2064.md: Remove cpu attribute comparisons.
5339         * config/s390/driver-native.c (s390_host_detect_local_cpu):
5340         Remove MTN.
5341         * config/s390/linux.h (ASM_SPEC):
5342         Remove -march support.
5343         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
5344         Use a table to get an arch level.
5345         * config/s390/s390-opts.h (enum processor_type):
5346         Remove enum values.
5347         * config/s390/s390.c
5348         (processor_table): Remove entries, add arch_level values.
5349         (s390_issue_rate): Remove cases.
5350         (s390_option_override): Adjust
5351         s390_option_override_internal() call.
5352         (s390_option_override_internal): Remove deprecation warning.
5353         (s390_valid_target_attribute_tree): Adjust
5354         s390_option_override_internal() call.
5355         * config/s390/s390.h (struct s390_processor):
5356         Share with s390-c.c, add arch_level field.
5357         * config/s390/s390.md:
5358         Remove occurrences in cpu attribute.
5359         * config/s390/s390.opt: Remove -march/-mtune support.
5360         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
5361         * doc/invoke.texi: Remove deprecation warning.
5363 2018-08-08  Luis Machado  <luis.machado@linaro.org>
5365         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
5366         global.
5367         (qdf24xx_tunings): Set vector cost structure to
5368         qdf24xx_vector_cost.
5370         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
5371         <register_sextend>: Set to 3.
5373 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
5375         PR target/86838
5376         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
5377         * config/aarch64/aarch64-simd.md
5378         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
5379         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
5380         (aarch64_frecpx<mode>): ...this new pattern.
5381         * config/aarch64/aarch64-simd-builtins.def: Remove comment
5382         about aarch64_frecp<FRECP:frecp_suffix><mode>.
5384 2018-08-07  Martin Liska  <mliska@suse.cz>
5386         PR middle-end/83023
5387         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
5388         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
5389         * predict.def (PRED_MALLOC_NONNULL): New predictor.
5390         * doc/extend.texi: Document that malloc attribute adds
5391         hit to compiler.
5393 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
5395         PR target/86785
5396         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5397         Define to speculation_safe_value_not_needed.
5399 2018-08-06  Jeff Law  <law@redhat.com>
5401         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
5402         the vr_values instance to cprop_into_stmt.
5403         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
5404         (cprop_operand): Also query EVRP to determine if OP is a constant.
5406 2018-08-06  Nathan Sidwell  <nathan@acm.org>
5408         * diagnostic.c (diagnostic_report_current_module): Reroll
5409         included-at loop.  Translate text.
5411 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
5413         * function-tests.c (selftest::test_expansion_to_rtl): Call
5414         free_after_compilation.
5416 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5418         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
5420 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
5422         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
5423         loops with memory block operations from getting unrolled.
5425 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
5427         PR target/86807
5428         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5429         Define to speculation_safe_value_not_needed.
5431 2018-08-06  Jeff Law  <law@redhat.com>
5433         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
5434         assert.
5436 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5438         PR target/86662
5439         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
5440         with all enabled __intN types.
5442         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
5444 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5446         * alias.c (record_set): Check for clobber high.
5447         * cfgexpand.c (expand_gimple_stmt): Likewise.
5448         * combine-stack-adj.c (single_set_for_csa): Likewise.
5449         * combine.c (find_single_use_1): Likewise.
5450         (set_nonzero_bits_and_sign_copies): Likewise.
5451         (get_combine_src_dest): Likewise.
5452         (is_parallel_of_n_reg_sets): Likewise.
5453         (try_combine): Likewise.
5454         (record_dead_and_set_regs_1): Likewise.
5455         (reg_dead_at_p_1): Likewise.
5456         (reg_dead_at_p): Likewise.
5457         * dce.c (deletable_insn_p): Likewise.
5458         (mark_nonreg_stores_1): Likewise.
5459         (mark_nonreg_stores_2): Likewise.
5460         * df-scan.c (df_find_hard_reg_defs): Likewise.
5461         (df_uses_record): Likewise.
5462         (df_get_call_refs): Likewise.
5463         * dwarf2out.c (mem_loc_descriptor): Likewise.
5464         * haifa-sched.c (haifa_classify_rtx): Likewise.
5465         * ira-build.c (create_insn_allocnos): Likewise.
5466         * ira-costs.c (scan_one_insn): Likewise.
5467         * ira.c (equiv_init_movable_p): Likewise.
5468         (rtx_moveable_p): Likewise.
5469         (interesting_dest_for_shprep): Likewise.
5470         * jump.c (mark_jump_label_1): Likewise.
5471         * postreload-gcse.c (record_opr_changes): Likewise.
5472         * postreload.c (reload_cse_simplify): Likewise.
5473         (struct reg_use): Add source expr.
5474         (reload_combine): Check for clobber high.
5475         (reload_combine_note_use): Likewise.
5476         (reload_cse_move2add): Likewise.
5477         (move2add_note_store): Likewise.
5478         * print-rtl.c (print_pattern): Likewise.
5479         * recog.c (decode_asm_operands): Likewise.
5480         (store_data_bypass_p): Likewise.
5481         (if_test_bypass_p): Likewise.
5482         * regcprop.c (kill_clobbered_value): Likewise.
5483         (kill_set_value): Likewise.
5484         * reginfo.c (reg_scan_mark_refs): Likewise.
5485         * reload1.c (maybe_fix_stack_asms): Likewise.
5486         (eliminate_regs_1): Likewise.
5487         (elimination_effects): Likewise.
5488         (mark_not_eliminable): Likewise.
5489         (scan_paradoxical_subregs): Likewise.
5490         (forget_old_reloads_1): Likewise.
5491         * reorg.c (find_end_label): Likewise.
5492         (try_merge_delay_insns): Likewise.
5493         (redundant_insn): Likewise.
5494         (own_thread_p): Likewise.
5495         (fill_simple_delay_slots): Likewise.
5496         (fill_slots_from_thread): Likewise.
5497         (dbr_schedule): Likewise.
5498         * resource.c (update_live_status): Likewise.
5499         (mark_referenced_resources): Likewise.
5500         (mark_set_resources): Likewise.
5501         * rtl.c (copy_rtx): Likewise.
5502         * rtlanal.c (reg_referenced_p): Likewise.
5503         (single_set_2): Likewise.
5504         (noop_move_p): Likewise.
5505         (note_stores): Likewise.
5506         * sched-deps.c (sched_analyze_reg): Likewise.
5507         (sched_analyze_insn): Likewise.
5509 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5511         * cse.c (invalidate_reg): New function extracted from...
5512         (invalidate): ...here.
5513         (canonicalize_insn): Check for clobber high.
5514         (invalidate_from_clobbers): invalidate clobber highs.
5515         (invalidate_from_sets_and_clobbers): Likewise.
5516         (count_reg_usage): Check for clobber high.
5517         (insn_live_p): Likewise.
5518         * cselib.c (cselib_expand_value_rtx_1):Likewise.
5519         (cselib_invalidate_regno): Check for clobber in setter.
5520         (cselib_invalidate_rtx): Pass through setter.
5521         (cselib_invalidate_rtx_note_stores):
5522         (cselib_process_insn): Check for clobber high.
5523         * cselib.h (cselib_invalidate_rtx): Add operand.
5525 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5527         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
5528         (mark_not_eliminable): Likewise.
5529         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
5530         * lra-lives.c (process_bb_lives): Check for clobber high.
5531         * lra.c (new_insn_reg): Remember clobber highs.
5532         (collect_non_operand_hard_regs): Check for clobber high.
5533         (lra_set_insn_recog_data): Likewise.
5534         (add_regs_to_insn_regno_info): Likewise.
5535         (lra_update_insn_regno_info): Likewise.
5537 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5539         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
5540         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
5542 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5544         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
5545         (copy_insn_1): Likewise.
5546         (gen_hard_reg_clobber_high): New gen function.
5547         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
5548         * genemit.c (gen_exp): Likewise.
5549         (gen_emit_seq): Pass through info.
5550         (gen_insn): Check for CLOBBER_HIGH.
5551         (gen_expand): Pass through info.
5552         (gen_split): Likewise.
5553         (output_add_clobbers): Likewise.
5554         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
5555         (remove_clobbers): Likewise.
5556         * rtl.h (gen_hard_reg_clobber_high): New declaration.
5558 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
5560         * doc/rtl.texi (clobber_high): Add.
5561         (parallel): Add in clobber high
5562         * rtl.c (rtl_check_failed_code3): Add function.
5563         * rtl.def (CLOBBER_HIGH): Add expression.
5564         * rtl.h (RTL_CHECKC3): Add macro.
5565         (rtl_check_failed_code3): Add declaration.
5566         (XC3EXP): Add macro.
5568 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
5570         PR target/86386
5571         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
5572         cfun->machine->max_used_stack_alignment if needed.
5574 2018-08-04  Martin Sebor  <msebor@redhat.com>
5576         PR tree-optimization/86571
5577         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
5578         NaN output to 4.
5580 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
5582         PR target/86799
5583         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5584         Define.
5586 2018-08-03  Jeff Law  <law@redhat.com>
5588         PR target/86795
5589         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5590         Define to speculation_safe_value_not_needed.
5592 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
5594         * doc/gcov.texi (-x): Remove duplicate "to".
5595         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
5596         (-Wif-not-aligned): Remove duplicate "is".
5597         (-flto): Remove duplicate "the".
5598         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
5599         duplicate "v5.00.b".
5600         (MSP430 Options): Remove duplicate "and" from the description
5601         of "-mgprel-sec=regexp".
5602         (x86 Options): Remove duplicate copies of "vmldLog102" and
5603         vmlsLog104 from description of "-mveclibabi=type".
5605 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
5607         * internal-fn.h (first_commutative_argument): Declare.
5608         * internal-fn.c (first_commutative_argument): New function.
5609         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
5610         restrictions for pattern statements.  Use first_commutative_argument
5611         to look for commutative operands in calls to internal functions.
5613 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
5615         * Makefile.in (wide-int-range.o): New.
5616         * tree-vrp.c: Move all the wide_int_* functions to...
5617         * wide-int-range.cc: ...here.
5618         * tree-vrp.h: Move all the wide_int_* prototypes to...
5619         * wide-int-range.h: ...here.
5621 2018-08-03  Tom de Vries  <tdevries@suse.de>
5623         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
5624         UI_NONE.
5625         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
5626         * except.c (output_function_exception_table): Do early exit if
5627         targetm_common.except_unwind_info (&global_options) == UI_NONE.
5629 2018-08-03  Martin Liska  <mliska@suse.cz>
5631         * predict.c (dump_prediction): Change to 2 digits
5632         in fraction part.
5634 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5636         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
5637         neon_dup_q to...
5638         (falkor_am_1_gtov_gtov): ... a new insn reservation.
5640 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
5642         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
5643         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
5644         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
5645         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
5646         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
5648 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
5650         * diagnostic-show-locus.c (diagnostic_show_locus): Use
5651         pp_take_prefix when saving the existing prefix.
5652         * diagnostic.c (diagnostic_append_note): Likewise.
5653         * langhooks.c (lhd_print_error_function): Likewise.
5654         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
5655         param's type.  Free the existing prefix.
5656         (pp_take_prefix): New function.
5657         (pretty_printer::pretty_printer): Drop the prefix parameter.
5658         Rename the length parameter to match the comment.
5659         (pretty_printer::~pretty_printer): Free the prefix.
5660         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
5661         parameter.
5662         (struct pretty_printer): Drop the "const" from "prefix" field's
5663         type and clarify memory management.
5664         (pp_set_prefix): Drop the "const" from the 2nd param.
5665         (pp_take_prefix): New decl.
5667 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
5669         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
5670         for word_mode_ok here instead of passing as argument.
5671         (expand_block_compare): Change select_block_compare_mode() call.
5672         (expand_strncmp_gpr_sequence): New function.
5673         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
5675 2018-08-02  Jeff Law  <law@redhat.com>
5677         PR target/86790
5678         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5679         Define to speculation_safe_value_not_needed.
5681         PR target/86784
5682         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5683         Define to speculation_safe_value_not_needed.
5685 2018-08-02  Tom de Vries  <tdevries@suse.de>
5687         PR target/86660
5688         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
5689         function.  Return UI_TARGET unconditionally.
5690         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
5691         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
5693 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
5695         * genemit.c (print_overload_test): Fix typo.
5697 2018-08-02  Richard Biener  <rguenther@suse.de>
5699         PR tree-optimization/86816
5700         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
5701         which checks for value availability before querying it.
5702         (gvn_uses_equal): Use it.
5703         (same_succ_hash): Likewise.
5704         (gimple_equal_p): Likewise.
5706 2018-08-02  Nick Clifton  <nickc@redhat.com>
5708         PR target/86813
5709         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5710         Define to speculation_safe_value_not_needed.
5712         PR target/86810
5713         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5714         Define to speculation_safe_value_not_needed.
5716         PR target/86810
5717         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5718         Define to speculation_safe_value_not_needed.
5720         PR target/86803
5721         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5722         Define to speculation_safe_value_not_needed.
5724         PR target/86797
5725         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5726         Define to speculation_safe_value_not_needed.
5728         PR target/86791
5729         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5730         Define to speculation_safe_value_not_needed.
5732         PR target/86789
5733         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5734         Define to speculation_safe_value_not_needed.
5736         PR target/86787
5737         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5738         Define to speculation_safe_value_not_needed.
5740         PR target/86782
5741         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5742         speculation_safe_value_not_needed.
5744         PR target/86781
5745         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
5746         to speculation_safe_value_not_needed.
5748 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
5750         * doc/md.texi: Expand the documentation of instruction names
5751         to mention port-local uses.  Document '@' in pattern names.
5752         * read-md.h (overloaded_instance, overloaded_name): New structs.
5753         (mapping): Declare.
5754         (md_reader::handle_overloaded_name): New member function.
5755         (md_reader::get_overloads): Likewise.
5756         (md_reader::m_first_overload): New member variable.
5757         (md_reader::m_next_overload_ptr): Likewise.
5758         (md_reader::m_overloads_htab): Likewise.
5759         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
5760         m_next_overload_ptr and m_overloads_htab.
5761         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
5762         (get_mode_token, get_code_token, get_int_token): New functions.
5763         (map_attr_string): Add an optional argument that passes back
5764         the associated iterator.
5765         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
5766         (md_reader::handle_overloaded_name, add_overload_instance): New
5767         functions.
5768         (apply_iterators): Handle '@' names.  Report an error if '@'
5769         is used without iterators.
5770         (initialize_iterators): Initialize the new iterator_group fields.
5771         * genopinit.c (handle_overloaded_code_for)
5772         (handle_overloaded_gen): New functions.
5773         (main): Use them to print declarations of maybe_code_for_* and
5774         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
5775         * genemit.c (print_overload_arguments, print_overload_test)
5776         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
5777         (main): Use it to print definitions of maybe_code_for_* and
5778         maybe_gen_* functions.
5779         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
5780         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
5781         instead of explicit mode checks.
5782         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
5783         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
5784         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
5785         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
5786         (aarch64_expand_compare_and_swap): Likewise
5787         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
5788         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
5789         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
5790         (aarch64_constant_pool_reload_icode): Delete.
5791         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
5792         instead of aarch64_constant_pool_reload_icode.  Use
5793         code_for_aarch64_reload_mov instead of explicit mode checks.
5794         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
5795         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
5796         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
5797         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
5798         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
5799         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
5800         (aarch64_atomic_load_op_code): Delete.
5801         (aarch64_emit_atomic_load_op): Likewise.
5802         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
5803         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
5804         instead of aarch64_emit_atomic_load_op.
5805         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
5806         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
5807         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
5808         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
5809         character before the pattern name.
5810         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
5811         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
5812         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
5813         (aarch64_frecps<mode>): Likewise.
5814         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
5815         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
5816         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
5817         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
5818         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
5820 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
5822         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
5823         Allow HFmode constants if TARGET_FP_F16INST.
5825 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
5827         PR target/86014
5828         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
5829         No longer check last store for clobber of address register.
5831 2018-08-02  Martin Liska  <mliska@suse.cz>
5833         PR gcov-profile/86817
5834         * gcov.c (process_all_functions): New function.
5835         (main): Call it.
5836         (process_file): Move functions processing to
5837         process_all_functions.
5839 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
5841         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
5842         "const" to the "gimple *" and "rtx_insn *" parameters.
5843         * dumpfile.h (dump_user_location_t::dump_user_location_t):
5844         Likewise.
5845         (dump_location_t::dump_location_t): Likewise.
5847 2018-08-01  Martin Sebor  <msebor@redhat.com>
5849         PR tree-optimization/86650
5850         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
5851         rather than a "gcall *".  Directly pass the data of interest
5852         to percent_K_format, rather than building a temporary CALL_EXPR
5853         to hold it.
5854         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
5855         (gimple_fold_builtin_strncat): Adjust.
5856         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
5857         gcall* argument with gimple*.
5858         * gimple-ssa-warn-restrict.c (check_call): Same.
5859         (wrestrict_dom_walker::before_dom_children): Same.
5860         (builtin_access::builtin_access): Same.
5861         (check_bounds_or_overlap): Same
5862         (maybe_diag_overlap): Same.
5863         (maybe_diag_offset_bounds): Same.
5864         * tree-diagnostic.c (default_tree_printer): Move usage of
5865         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
5866         to this callsite.
5867         * tree-pretty-print.c (percent_K_format): Add argument.
5868         * tree-pretty-print.h: Add argument.
5869         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
5870         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
5871         (maybe_diag_stxncpy_trunc): Same.
5872         (handle_builtin_stxncpy): Same.
5873         (handle_builtin_strcat): Same.
5875 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5877         * match.pd: Optimise pointer range checks.
5879 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5881         PR tree-optimization/86758
5882         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
5883         to remove pattern statements.
5885 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5887         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
5888         result of dfs_enumerate_from when constructing stmt_vec_infos,
5889         instead of additionally calling get_loop_body.
5891 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5893         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
5894         parameter.
5895         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
5896         When creating an iv, assert that the step is not known to be zero.
5897         (vect_setup_realignment): Update call accordingly.
5898         * tree-vect-stmts.c (vectorizable_store): Likewise.
5899         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
5901 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5903         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
5904         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
5905         (vectorizable_reduction): Likewise.
5906         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5907         (vect_detect_hybrid_slp_stmts): Likewise.
5908         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5910 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
5912         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
5913         (wide_int_set_zero_nonzero_bits): ...this.
5914         (zero_nonzero_bits_from_vr): Rename to...
5915         (vrp_set_zero_nonzero_bits): ...this.
5916         (extract_range_from_multiplicative_op_1): Abstract wide int
5917         code...
5918         (wide_int_range_multiplicative_op): ...here.
5919         (extract_range_from_binary_expr_1): Extract wide int binary
5920         operations into their own functions.
5921         (wide_int_range_lshift): New.
5922         (wide_int_range_can_optimize_bit_op): New.
5923         (wide_int_range_shift_undefined_p): New.
5924         (wide_int_range_bit_xor): New.
5925         (wide_int_range_bit_ior): New.
5926         (wide_int_range_bit_and): New.
5927         (wide_int_range_trunc_mod): New.
5928         (extract_range_into_wide_ints): New.
5929         (vrp_shift_undefined_p): New.
5930         (extract_range_from_multiplicative_op): New.
5931         (vrp_can_optimize_bit_op): New.
5932         * tree-vrp.h (value_range::dump): New.
5933         (wide_int_range_multiplicative_op): New.
5934         (wide_int_range_lshift):New.
5935         (wide_int_range_shift_undefined_p): New.
5936         (wide_int_range_bit_xor): New.
5937         (wide_int_range_bit_ior): New.
5938         (wide_int_range_bit_and): New.
5939         (wide_int_range_trunc_mod): New.
5940         (zero_nonzero_bits_from_bounds): Rename to...
5941         (wide_int_set_zero_nonzero_bits): ...this.
5942         (zero_nonzero_bits_from_vr): Rename to...
5943         (vrp_set_zero_nonzero_bits): ...this.
5944         (range_easy_mask_min_max): Rename to...
5945         (wide_int_range_can_optimize_bit_op): this.
5946         * vr-values.c (simplify_bit_ops_using_ranges): Rename
5947         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
5949 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5951         * tree-vectorizer.h (vect_orig_stmt): New function.
5952         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
5953         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
5954         (vect_create_epilog_for_reduction): Likewise.
5955         (vectorizable_live_operation): Likewise.
5956         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
5957         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
5958         * tree-vect-stmts.c (vectorizable_call): Likewise.
5959         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
5961 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5963         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
5964         argument.
5965         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
5966         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
5967         (vect_transform_loop): Likewise.
5968         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5970 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5972         * tree-vectorizer.h (vect_schedule_slp): Return void.
5973         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5974         (vect_schedule_slp): Likewise.
5976 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5978         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
5979         argument.
5980         (vect_transform_loop): Update calls accordingly.  Schedule SLP
5981         instances before the main loop, if any exist.
5983 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5985         PR tree-optimization/86749
5986         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
5987         If the lhs is used in a COND_EXPR, check that it is being used
5988         as the "then" or "else" value.
5990 2018-08-01  Tom de Vries  <tdevries@suse.de>
5992         PR target/86800
5993         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5994         speculation_safe_value_not_needed.
5996 2018-08-01  Richard Biener  <rguenther@suse.de>
5998         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
5999         as base and offset.
6001 2018-08-01  Martin Liska  <mliska@suse.cz>
6003         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
6004         format how successful transformation is dumped.
6005         (gimple_mod_pow2_value_transform): Likewise.
6006         (gimple_mod_subtract_transform): Likewise.
6007         (gimple_stringops_transform): Likewise.
6009 2018-08-01  Martin Liska  <mliska@suse.cz>
6011         PR value-prof/35543
6012         * value-prof.c (interesting_stringop_to_profile_p):
6013         Simplify the code and add BUILT_IN_MEMMOVE.
6014         (gimple_stringops_transform): Likewise.
6016 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
6018         * config/aarch64/aarch64-simd.md
6019         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
6020         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
6021         use GPI iterator instead of SI mode.
6023 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
6025         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
6026         rs6000_speculation_barrier.
6027         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
6028         new barrier pattern name.
6030 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
6032         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
6033         (speculation_barrier): New insn.
6035 2018-08-01  Richard Biener  <rguenther@suse.de>
6037         PR bootstrap/86724
6038         * graphite.h: Include isl/id.h and isl/space.h to allow build
6039         with ISL 0.20.
6041 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
6043         PR target/86651
6044         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
6045         mode for COFF targets.
6046         * defaults.h (TARGET_COFF): Define.
6047         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
6048         TARGET_COFF): Define.
6049         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
6050         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
6051         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
6053 2018-07-31  Alexandre Oliva <oliva@adacore.com>
6055         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
6056         * gimple-streamer-out.c (output_bb): Save it.
6057         * lto-streamer-in.c (input_struct_function_base): Restore
6058         instance discriminator if available.  Create map on demand.
6059         * lto-streamer-out.c (output_struct_function_base): Save it if
6060         available.
6061         * final.c (decl_to_instance_map): Document LTO strategy.
6063 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
6064             Olivier Hainque  <hainque@adacore.com>
6066         * debug.h (decl_to_instance_map_t): New type.
6067         (decl_to_instance_map): Declare.
6068         (maybe_create_decl_to_instance_map): New inline function.
6069         * final.c (bb_discriminator, last_bb_discriminator): New statics,
6070         to track basic block discriminators.
6071         (final_start_function_1): Initialize them.
6072         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
6073         bb_discriminator.
6074         (decl_to_instance_map): New variable.
6075         (map_decl_to_instance, maybe_set_discriminator): New functions.
6076         (notice_source_line): Set discriminator.
6078 2018-07-31  Ian Lance Taylor  <iant@golang.org>
6080         * targhooks.c (default_have_speculation_safe_value): Add
6081         ATTRIBUTE_UNUSED.
6083 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
6085         * dump-context.h: Include "pretty-print.h".
6086         (dump_context::refresh_dumps_are_enabled): New decl.
6087         (dump_context::emit_item): New decl.
6088         (class dump_context): Add fields "m_test_pp" and
6089         "m_test_pp_flags".
6090         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6091         (temp_dump_context::get_dumped_text): New decl.
6092         (class temp_dump_context): Add field "m_pp".
6093         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
6094         (dump_context::refresh_dumps_are_enabled): ...and add a test for
6095         m_test_pp.
6096         (set_dump_file): Update for above change.
6097         (set_alt_dump_file): Likewise.
6098         (dump_loc): New overload, taking a pretty_printer *.
6099         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
6100         to any test pretty-printer.
6101         (make_item_for_dump_gimple_stmt): New function, adapted from
6102         optinfo::add_gimple_stmt.
6103         (dump_context::dump_gimple_stmt): Call it, and use the result,
6104         eliminating the direct usage of dump_file and alt_dump_file in
6105         favor of indirectly using them via emit_item.
6106         (make_item_for_dump_gimple_expr): New function, adapted from
6107         optinfo::add_gimple_expr.
6108         (dump_context::dump_gimple_expr): Call it, and use the result,
6109         eliminating the direct usage of dump_file and alt_dump_file in
6110         favor of indirectly using them via emit_item.
6111         (make_item_for_dump_generic_expr): New function, adapted from
6112         optinfo::add_tree.
6113         (dump_context::dump_generic_expr): Call it, and use the result,
6114         eliminating the direct usage of dump_file and alt_dump_file in
6115         favor of indirectly using them via emit_item.
6116         (make_item_for_dump_printf_va): New function, adapted from
6117         optinfo::add_printf_va.
6118         (make_item_for_dump_printf): New function.
6119         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
6120         and use the result, eliminating the direct usage of dump_file and
6121         alt_dump_file in favor of indirectly using them via emit_item.
6122         (make_item_for_dump_dec): New function.
6123         (dump_context::dump_dec): Call it, and use the result,
6124         eliminating the direct usage of dump_file and alt_dump_file in
6125         favor of indirectly using them via emit_item.
6126         (make_item_for_dump_symtab_node): New function, adapted from
6127         optinfo::add_symtab_node.
6128         (dump_context::dump_symtab_node): Call it, and use the result,
6129         eliminating the direct usage of dump_file and alt_dump_file in
6130         favor of indirectly using them via emit_item.
6131         (dump_context::begin_scope): Reimplement, avoiding direct usage
6132         of dump_file and alt_dump_file in favor of indirectly using them
6133         via emit_item.
6134         (dump_context::emit_item): New member function.
6135         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6136         Set up test pretty-printer on the underlying context.  Call
6137         refresh_dumps_are_enabled.
6138         (temp_dump_context::~temp_dump_context): Call
6139         refresh_dumps_are_enabled.
6140         (temp_dump_context::get_dumped_text): New member function.
6141         (selftest::verify_dumped_text): New function.
6142         (ASSERT_DUMPED_TEXT_EQ): New macro.
6143         (selftest::test_capture_of_dump_calls): Run all tests twice, with
6144         and then without optinfo enabled.  Add uses of
6145         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
6146         * dumpfile.h: Update comment for the dump_* API.
6147         * optinfo-emit-json.cc
6148         (selftest::test_building_json_from_dump_calls): Update for new
6149         param for temp_dump_context ctor.
6150         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
6151         and "m_owned" field.
6152         (optinfo_item::~optinfo_item): Likewise.
6153         (optinfo::add_item): New member function.
6154         (optinfo::emit): Update comment.
6155         (optinfo::add_string): Delete.
6156         (optinfo::add_printf): Delete.
6157         (optinfo::add_printf_va): Delete.
6158         (optinfo::add_gimple_stmt): Delete.
6159         (optinfo::add_gimple_expr): Delete.
6160         (optinfo::add_tree): Delete.
6161         (optinfo::add_symtab_node): Delete.
6162         (optinfo::add_dec): Delete.
6163         * optinfo.h (class dump_context): New forward decl.
6164         (optinfo::add_item): New decl.
6165         (optinfo::add_string): Delete.
6166         (optinfo::add_printf): Delete.
6167         (optinfo::add_printf_va): Delete.
6168         (optinfo::add_gimple_stmt): Delete.
6169         (optinfo::add_gimple_expr): Delete.
6170         (optinfo::add_tree): Delete.
6171         (optinfo::add_symtab_node): Delete.
6172         (optinfo::add_dec): Delete.
6173         (optinfo::add_poly_int): Delete.
6174         (optinfo_item::optinfo_item): Remove "owned" param.
6175         (class optinfo_item): Remove field "m_owned".
6177 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6179         PR middle-end/86705
6180         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
6181         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
6182         requested variable alignment.
6183         (expand_one_ssa_partition): Likewise.
6184         (expand_one_var): Likewise.
6186 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6188         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6189         to speculation_safe_value_not_needed.
6191 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6193         * targhooks.h (speculation_safe_value_not_needed): New prototype.
6194         * targhooks.c (speculation_safe_value_not_needed): New function.
6195         * target.def (have_speculation_safe_value): Update documentation.
6196         * doc/tm.texi: Regenerated.
6198 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6200         * config/aarch64/iterators.md (ALLI_TI): New iterator.
6201         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
6202         expand.
6203         (despeculate_copy<ALLI:mode>_insn): New insn.
6204         (despeculate_copyti_insn): New insn.
6205         (despeculate_simple<ALLI:mode>): New insn
6206         (despeculate_simpleti): New insn.
6207         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
6208         function.
6209         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
6210         aarch64_speculation_safe_value.
6211         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
6213 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6215         * config/aarch64/aarch64-speculation.cc: New file.
6216         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
6217         before pass_reorder_blocks.
6218         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
6219         prototype.
6220         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
6221         X14 and X15 when tracking speculation.
6222         * config/aarch64/aarch64.md (register name constants): Add
6223         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
6224         (unspec): Add UNSPEC_SPECULATION_TRACKER.
6225         (speculation_barrier): New insn attribute.
6226         (cmp<mode>): Allow SP in comparisons.
6227         (speculation_tracker): New insn.
6228         (speculation_barrier): Add speculation_barrier attribute.
6229         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
6230         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
6231         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
6233 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6235         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
6236         aarch64_track_speculation is true.
6237         (tb<optab><mode>1): Likewise.
6238         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
6239         generate CB[N]Z when tracking speculation.
6240         (aarch64_split_compare_and_swap): Likewise.
6241         (aarch64_split_atomic_op): Likewise.
6243 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6245         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
6247 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6249         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
6250         (speculation_barrier): New insn.
6252 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6254         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
6255         * config/arm/arm.md (speculation_barrier): New expand.
6256         (speculation_barrier_insn): New pattern.
6258 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6260         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
6261         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
6262         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
6263         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
6264         list.
6265         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
6266         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
6267         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
6268         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
6269         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
6270         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
6271         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
6272         * builtins.c (expand_speculation_safe_value): New function.
6273         (expand_builtin): Call it.
6274         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
6275         * doc/extend.texi: Document __builtin_speculation_safe_value.
6276         * doc/md.texi: Document "speculation_barrier" pattern.
6277         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
6278         TARGET_HAVE_SPECULATION_SAFE_VALUE.
6279         * doc/tm.texi: Regenerated.
6280         * target.def (have_speculation_safe_value, speculation_safe_value): New
6281         hooks.
6282         * targhooks.c (default_have_speculation_safe_value): New function.
6283         (default_speculation_safe_value): New function.
6284         * targhooks.h (default_have_speculation_safe_value): Add prototype.
6285         (default_speculation_safe_value): Add prototype.
6287 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
6289         * dump-context.h (dump_context::dump_loc): New decl.
6290         * dumpfile.c (dump_context::dump_loc): New member function.
6291         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
6292         and dump_gimple_stmt.
6293         (dump_context::dump_gimple_expr_loc): Likewise, using
6294         dump_gimple_expr.
6295         (dump_context::dump_generic_expr_loc): Likewise, using
6296         dump_generic_expr.
6297         (dump_context::dump_printf_loc_va): Likewise, using
6298         dump_printf_va.
6299         (dump_context::begin_scope): Explicitly using the global function
6300         "dump_loc", rather than the member function.
6302 2018-07-31  Martin Sebor  <msebor@redhat.com>
6304         PR tree-optimization/86741
6305         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
6307 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
6309         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
6310         depend on whether prefetch instructions will be emitted or not.
6311         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
6312         will be emitted or not.
6313         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
6314         (TARGET_SETMEM_PFD): New macros.
6316 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6318         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
6319         (NULL_STMT_VEC_INFO): Delete.
6320         (stmt_vec_info::operator*): Likewise.
6321         (stmt_vec_info::operator gimple *): Likewise.
6322         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
6323         of NULL_STMT_VEC_INFO.
6324         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6325         (vect_reassociating_reduction_p): Likewise.
6326         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6327         (vectorizable_store): Likewise.
6328         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
6329         (vec_info::free_stmt_vec_infos): Likewise.
6331 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6333         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
6334         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
6336 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6338         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
6339         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6340         (vec_info::free_stmt_vec_info): New private member functions.
6341         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
6342         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
6343         * tree-parloops.c (gather_scalar_reductions): Remove calls to
6344         set_stmt_vec_info_vec and free_stmt_vec_infos.
6345         * tree-vect-loop.c (_loop_vec_info): Remove call to
6346         set_stmt_vec_info_vec.
6347         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
6348         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
6349         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
6350         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6351         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
6352         assignments in {vec_info::,}new_stmt_vec_info that are redundant
6353         with the clearing in the xcalloc.
6354         (stmt_vec_info_vec): Delete.
6355         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
6356         (vectorize_loops): Likewise.
6357         (vec_info::~vec_info): Remove argument from call to
6358         free_stmt_vec_infos.
6359         (vec_info::add_stmt): Remove vinfo argument from call to
6360         new_stmt_vec_info.
6362 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6364         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
6365         rather than a gimple stmt.
6366         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
6367         information for pattern statements when passed the original
6368         statement; instead wait to be passed the pattern statement itself.
6369         Don't call set_vinfo_for_stmt here.
6370         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
6371         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
6372         stmt_vec_infos here.
6373         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
6374         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
6375         stmt_vec_infos entry.
6377 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6379         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
6380         * tree-vectorizer.c (vec_info::replace_stmt): New function.
6381         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
6382         * tree-vect-stmts.c (vectorizable_call): Likewise.
6383         (vectorizable_simd_clone_call): Likewise.
6385 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6387         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
6388         * tree-vectorizer.c (vec_info::remove_stmt): New function.
6389         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
6390         * tree-vect-loop.c (vect_transform_loop): Likewise.
6391         * tree-vect-slp.c (vect_schedule_slp): Likewise.
6392         * tree-vect-stmts.c (vect_remove_stores): Likewise.
6394 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6396         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
6397         (vect_dr_stmt): Delete.
6398         * tree-vectorizer.c (vec_info::lookup_dr): New function.
6399         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
6400         of DR_VECT_AUX.
6401         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
6402         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
6403         (vect_verify_datarefs_alignment, vect_peeling_supportable)
6404         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6405         (vect_analyze_data_refs): Likewise.
6406         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
6407         argument.
6408         (vect_find_same_alignment_drs): Likewise.
6409         (vect_slp_analyze_node_dependences): Update calls accordingly.
6410         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
6411         instead of DR_VECT_AUX.
6412         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
6413         of a vector data references.  Use vec_info::lookup_dr instead of
6414         DR_VECT_AUX.
6415         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
6416         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
6417         instead of DR_VECT_AUX.
6419 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6421         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
6422         dr_vec_info.
6423         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6424         accordingly.
6425         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6426         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6427         (vect_gen_prolog_loop_niters): Likewise.
6429 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6431         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
6432         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
6433         (vect_known_alignment_in_bytes, vect_dr_behavior)
6434         (vect_get_scalar_dr_size): Take references as dr_vec_infos
6435         instead of data_references.  Update calls to other routines for
6436         which the same change has been made.
6437         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
6438         dr_vec_infos instead of stmt_vec_infos.
6439         (vect_analyze_data_ref_dependence): Update call accordingly.
6440         (vect_slp_analyze_data_ref_dependence)
6441         (vect_record_base_alignments): Use DR_VECT_AUX.
6442         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
6443         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
6444         (vector_alignment_reachable_p, vect_get_data_access_cost)
6445         (vect_peeling_supportable, vect_analyze_group_access_1)
6446         (vect_analyze_group_access, vect_analyze_data_ref_access)
6447         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
6448         (vect_compile_time_alias, vect_small_gap_p)
6449         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
6450         (vect_supportable_dr_alignment): Take references as dr_vec_infos
6451         instead of data_references.  Update calls to other routines for
6452         which the same change has been made.
6453         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
6454         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6455         (vect_slp_analyze_and_verify_node_alignment)
6456         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6457         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6458         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
6459         above changes.
6460         (_vect_peel_info::dr): Replace with...
6461         (_vect_peel_info::dr_info): ...this new field.
6462         (vect_peeling_hash_get_most_frequent)
6463         (vect_peeling_hash_choose_best_peeling): Update accordingly.
6464         (vect_peeling_hash_get_lowest_cost):
6465         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
6466         routines for which the same change has been made.
6467         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
6468         data_reference.
6469         * tree-vect-loop-manip.c (get_misalign_in_elems)
6470         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
6471         above changes.
6472         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6473         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
6474         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
6475         (get_group_load_store_type, get_negative_load_store_type)
6476         (vect_get_data_ptr_increment, vectorizable_store)
6477         (vectorizable_load): Likewise.
6478         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
6479         Update calls to other routines for which the same change has been made.
6481 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6483         * tree-vectorizer.h (vec_info::move_dr): New member function.
6484         (dataref_aux): Rename to...
6485         (dr_vec_info): ...this and add "dr" and "stmt" fields.
6486         (_stmt_vec_info::dr_aux): Update accordingly.
6487         (_stmt_vec_info::data_ref_info): Delete.
6488         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
6489         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
6490         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
6491         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
6492         of data_ref.
6493         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
6494         (STMT_VINFO_DR_INFO): New macro.
6495         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
6496         (set_dr_misalignment): Update after rename of dataref_aux.
6497         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
6498         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
6499         initialization of STMT_VINFO_DATA_REF.
6500         * tree-vectorizer.c (vec_info::move_dr): New function.
6501         * tree-vect-patterns.c (vect_recog_bool_pattern)
6502         (vect_recog_mask_conversion_pattern)
6503         (vect_recog_gather_scatter_pattern): Use it.
6504         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
6505         the "dr" and "stmt" fields of dr_vec_info instead of
6506         STMT_VINFO_DATA_REF.
6508 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6510         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
6511         (is_pattern_stmt_p): Use it.
6512         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
6513         on pattern statements.
6515 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6517         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
6518         original stmt as a stmt_vec_info rather than a gimple stmt.
6519         (vect_pattern_recog_1): Take the statement directly as a
6520         stmt_vec_info, rather than via a gimple_stmt_iterator.
6521         Update call to vect_mark_pattern_stmts.
6522         (vect_pattern_recog): Update calls accordingly.
6524 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6526         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
6527         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
6528         a vect_def_type for the first argument.
6529         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
6530         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
6531         operand if it isn't defined by a vectorized statement.
6532         (vect_build_gather_load_calls): Remove the mask_dt argument and
6533         update calls to vect_get_vec_def_for_stmt_copy.
6534         (vectorizable_bswap): Likewise the dt argument.
6535         (vectorizable_call): Update calls to vectorizable_bswap and
6536         vect_get_vec_def_for_stmt_copy.
6537         (vectorizable_simd_clone_call, vectorizable_assignment)
6538         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
6539         (vectorizable_comparison): Update calls to
6540         vect_get_vec_def_for_stmt_copy.
6541         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
6542         vect_is_simple_use.
6543         (vect_get_loop_based_defs): Remove dt argument and update call
6544         to vect_get_vec_def_for_stmt_copy.
6545         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
6546         and vect_get_vec_def_for_stmt_copy.
6547         (vectorizable_load): Update calls to vect_build_gather_load_calls
6548         and vect_get_vec_def_for_stmt_copy.
6549         * tree-vect-loop.c (vect_create_epilog_for_reduction)
6550         (vectorizable_reduction, vectorizable_live_operation): Update calls
6551         to vect_get_vec_def_for_stmt_copy.
6553 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6555         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
6556         and gimple stmt arguments with a stmt_vec_info.
6557         (vect_record_base_alignments): Update calls accordingly.
6558         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
6559         and gimple stmt arguments with a stmt_vec_info.
6560         (vect_build_slp_tree_1): Remove vinfo argument and update call
6561         to vect_record_max_nunits.
6562         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
6563         and vect_record_max_nunits.
6565 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6567         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
6568         file and take a stmt_vec_info instead of a gimple stmt.
6569         (supportable_widening_operation, vect_finish_replace_stmt)
6570         (vect_finish_stmt_generation, vect_get_store_rhs)
6571         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
6572         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
6573         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
6574         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
6575         (vect_create_data_ref_ptr, bump_vector_ptr)
6576         (vect_permute_store_chain, vect_setup_realignment)
6577         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
6578         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
6579         (vectorizable_reduction, vectorizable_induction)
6580         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
6581         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
6582         than gimple stmts as arguments.
6583         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
6584         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
6585         (can_group_stmts_p, vect_check_gather_scatter)
6586         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6587         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
6588         (vect_permute_load_chain, vect_shift_permute_load_chain)
6589         (vect_transform_grouped_load)
6590         (vect_record_grouped_load_vectors): Likewise.
6591         * tree-vect-loop.c (vect_fixup_reduc_chain)
6592         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
6593         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
6594         (vectorizable_reduction, vectorizable_induction)
6595         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
6596         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
6597         (vect_get_load_store_mask): Likewise.
6598         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
6599         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
6600         * tree-vect-stmts.c (vect_mark_relevant)
6601         (is_simple_and_all_uses_invariant)
6602         (exist_non_indexing_operands_for_use_p, process_use)
6603         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
6604         (vect_get_vec_def_for_operand, vect_get_vec_defs)
6605         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
6606         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
6607         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
6608         (get_negative_load_store_type, get_load_store_type)
6609         (vect_check_load_store_mask, vect_check_store_rhs)
6610         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
6611         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6612         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6613         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6614         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
6615         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
6616         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
6617         (supportable_widening_operation): Likewise.
6619 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6621         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
6622         a stmt_vec_info instead of a gcall.
6623         (vect_check_gather_scatter): Update call accordingly.
6624         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
6625         of a gphi.
6626         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
6627         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
6628         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
6629         instead of a gimple stmt.
6630         (vect_transform_loop): Update calls accordingly.
6631         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
6632         stmt_vec_infos instead of gimple stmts.
6633         (vect_analyze_slp_instance): Update use accordingly.
6634         * tree-vect-stmts.c (read_vector_array, write_vector_array)
6635         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
6636         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
6637         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
6638         (vect_gen_widened_results_half, vect_get_loop_based_defs)
6639         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
6640         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
6641         down to subroutines.
6643 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6645         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
6646         of the worklist from a vector of gimple stmts to a vector of
6647         stmt_vec_infos.
6648         * tree-vect-stmts.c (vect_mark_relevant, process_use)
6649         (vect_mark_stmts_to_be_vectorized): Likewise
6651 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6653         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
6654         statement before passing it to vect_analyze_stmt.
6655         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
6656         the chain of phi vector definitions.  Track the exit phi via its
6657         stmt_vec_info.
6658         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
6659         STMT_VINFO_REDUC_DEF.
6660         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
6661         stmt_vec_infos to handle the statement chains.
6662         (vect_get_slp_defs): Record the first statement in the node
6663         using a stmt_vec_info.
6664         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
6665         statements here and pass their stmt_vec_info down to subroutines.
6666         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
6667         down to vect_finish_stmt_generation.
6668         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
6669         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
6670         stmt_vec_infos to subroutines.
6671         (vect_remove_stores): Use stmt_vec_infos to handle the statement
6672         chains.
6674 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6676         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
6677         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
6678         (vect_permute_store_chain, vect_setup_realignment)
6679         (vect_permute_load_chain, vect_shift_permute_load_chain)
6680         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
6681         stmts internally, and when passing values to other vectorizer routines.
6682         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6683         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
6684         (vect_analyze_loop_operations, get_initial_def_for_reduction)
6685         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
6686         (vectorizable_reduction, vectorizable_induction)
6687         (vectorizable_live_operation, vect_transform_loop_stmt)
6688         (vect_transform_loop): Likewise.
6689         * tree-vect-patterns.c (vect_reassociating_reduction_p)
6690         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
6691         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
6692         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6693         (vect_slp_analyze_node_operations_1): Likewise.
6694         * tree-vect-stmts.c (vect_mark_relevant, process_use)
6695         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
6696         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
6697         (vect_finish_stmt_generation_1, get_group_load_store_type)
6698         (get_load_store_type, vect_build_gather_load_calls)
6699         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6700         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6701         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6702         (vectorizable_store, vectorizable_load, vectorizable_condition)
6703         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
6704         (supportable_widening_operation): Likewise.
6705         (vect_get_vector_types_for_stmt): Likewise.
6706         * tree-vectorizer.h (vect_dr_behavior): Likewise.
6708 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6710         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6711         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
6712         (vect_permute_store_chain, vect_permute_load_chain)
6713         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
6714         repeated stmt_vec_info lookups.
6715         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6716         (vect_update_ivs_after_vectorizer): Likewise.
6717         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
6718         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6719         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
6720         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6721         (vect_bb_slp_scalar_cost): Likewise.
6722         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
6724 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6726         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
6727         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
6728         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
6729         to get gassigns and gcalls, rather than operating on generc gimple
6730         stmts.
6731         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
6732         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
6733         (vectorizable_load, vect_analyze_stmt): Likewise.
6734         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
6736 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6738         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
6739         return stmt_vec_infos rather than gimple stmts.  Do not accept
6740         null arguments.
6741         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
6742         of a gimple stmt.
6743         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6744         Update use of get_later_stmt.
6745         (vect_get_constant_vectors): Update call accordingly.
6746         (vect_schedule_slp_instance): Likewise
6747         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
6748         (vect_slp_analyze_instance_dependence): Likewise.
6749         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
6751 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6753         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
6754         (stmt_info_for_cost::stmt_info): ...this new field.
6755         (add_stmt_costs): Update accordingly.
6756         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6757         (vect_get_known_peeling_cost): Likewise.
6758         (vect_estimate_min_profitable_iters): Likewise.
6759         * tree-vect-stmts.c (record_stmt_cost): Likewise.
6761 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6763         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
6764         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6765         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6766         accordingly.
6767         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
6769 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6771         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
6772         a gimple stmt to a stmt_vec_info.
6773         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6775 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6777         * tree-vectorizer.h (vec_info::grouped_stores): Change from
6778         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6779         (_loop_vec_info::reduction_chains): Likewise.
6780         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
6781         accordingly.
6782         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6784 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6786         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
6787         a gimple stmt to a stmt_vec_info.
6788         (_stmt_vec_info::next_element): Likewise.
6789         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
6790         (vect_slp_analyze_and_verify_node_alignment)
6791         (vect_analyze_group_access_1, vect_analyze_group_access)
6792         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
6793         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
6794         (vect_supportable_dr_alignment): Update accordingly.
6795         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
6796         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
6797         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
6798         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6799         * tree-vect-slp.c (vect_build_slp_tree_1)
6800         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
6801         (vect_split_slp_store_group, vect_analyze_slp_instance)
6802         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
6803         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
6804         (get_group_load_store_type, get_load_store_type)
6805         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
6806         (vect_transform_stmt, vect_remove_stores): Likewise.
6808 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6810         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
6811         than a gimple stmt.
6812         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6813         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
6814         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
6815         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
6816         (vector_alignment_reachable_p, vect_get_data_access_cost)
6817         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
6818         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
6819         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6820         (vect_analyze_group_access_1, vect_analyze_group_access)
6821         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
6822         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
6823         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
6824         result of vect_dr_stmt and use the stmt_vec_info instead of
6825         the associated gimple stmt.
6826         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6827         (vect_gen_prolog_loop_niters): Likewise.
6828         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6830 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6832         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
6833         to a vec<stmt_vec_info>.
6834         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
6835         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
6836         vec<stmt_vec_info>.
6837         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
6838         to a vec<stmt_vec_info>.
6839         (bst_traits::value_type, bst_traits::value_type): Likewise.
6840         (bst_traits::hash): Update accordingly.
6841         (vect_get_and_check_slp_defs): Change the stmts parameter from
6842         a vec<gimple *> to a vec<stmt_vec_info>.
6843         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
6844         (vect_build_slp_tree): Likewise.
6845         (vect_build_slp_tree_2): Likewise.  Update uses of
6846         SLP_TREE_SCALAR_STMTS.
6847         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
6848         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
6849         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
6850         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
6851         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
6852         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
6853         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
6854         (vect_get_constant_vectors, vect_get_slp_defs)
6855         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
6856         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
6857         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
6858         instead of gimple stmts.
6859         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
6860         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
6861         (vect_slp_analyze_instance_dependence): Update uses of
6862         SLP_TREE_SCALAR_STMTS.
6863         (vect_slp_analyze_and_verify_node_alignment): Likewise.
6864         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
6865         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
6866         (get_initial_defs_for_reduction): Likewise.
6867         (vect_create_epilog_for_reduction): Likewise.
6868         (vectorize_fold_left_reduction): Likewise.
6869         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
6870         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
6871         (can_vectorize_live_stmts): Likewise.
6873 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6875         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
6876         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6877         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
6878         than gimple stmts.
6879         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
6880         of a gimple stmt.
6881         (gather_scalar_reductions): Update after above interface changes.
6882         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
6883         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
6884         than gimple stmts.
6885         (vect_force_simple_reduction): Likewise.
6886         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
6887         LOOP_VINFO_REDUCTIONS.
6888         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6890 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6892         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
6893         a gimple stmt to a stmt_vec_info.
6894         * tree-vect-loop.c (vect_active_double_reduction_p)
6895         (vect_force_simple_reduction, vectorizable_reduction): Update
6896         accordingly.
6898 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6900         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
6901         vec<gimple *> to a vec<stmt_vec_info>.
6902         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
6903         the reduction_phis argument from a vec<gimple *> to a
6904         vec<stmt_vec_info>.
6905         (vectorizable_reduction): Likewise the phis local variable that
6906         is passed to vect_create_epilog_for_reduction.  Update for new type
6907         of SLP_TREE_VEC_STMTS.
6908         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
6909         (vectorizable_live_operation): Likewise.
6910         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
6911         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
6913 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6915         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
6916         a gimple stmt to a stmt_vec_info.
6917         (vectorizable_condition, vectorizable_live_operation)
6918         (vectorizable_reduction, vectorizable_induction): Pass back the
6919         vectorized statement as a stmt_vec_info.
6920         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
6921         use of STMT_VINFO_VEC_STMT.
6922         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
6923         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
6924         as stmt_vec_infos rather than gimple stmts.
6925         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
6926         to a stmt_vec_info.
6927         (vectorizable_live_operation): Likewise.
6928         (vectorizable_reduction, vectorizable_induction): Likewise,
6929         updating use of STMT_VINFO_VEC_STMT.
6930         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
6931         of STMT_VINFO_VEC_STMT.
6932         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
6933         (vectorizable_simd_clone_call, vectorizable_conversion)
6934         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6935         (vectorizable_store, vectorizable_load, vectorizable_condition)
6936         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
6937         from a gimple stmt to a stmt_vec_info.
6938         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
6939         pointer to a stmt_vec_info to the vectorizable_* routines.
6941 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6943         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
6944         a gimple stmt to a stmt_vec_info.
6945         (is_pattern_stmt_p): Update accordingly.
6946         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
6947         (vect_record_grouped_load_vectors): Likewise.
6948         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6949         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
6950         (vect_model_reduction_cost): Likewise.
6951         (vect_create_epilog_for_reduction): Likewise.
6952         (vectorizable_reduction, vectorizable_induction): Likewise.
6953         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6954         Return the stmt_vec_info for the pattern statement.
6955         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
6956         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
6957         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
6958         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
6959         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6960         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
6961         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
6962         (free_stmt_vec_info, vect_is_simple_use): Likewise.
6964 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6966         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
6967         (vect_finish_stmt_generation): Likewise.
6968         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6969         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
6970         (vect_build_gather_load_calls): Use the return value of the above
6971         functions instead of a separate call to vinfo_for_stmt.  Use narrow
6972         scopes for the input gimple stmt and wider scopes for the associated
6973         stmt_vec_info.  Use vec_info::lookup_def when setting these
6974         stmt_vec_infos from an SSA_NAME definition.
6975         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6976         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6977         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6978         (vectorizable_store, vectorizable_load, vectorizable_condition)
6979         (vectorizable_comparison): Likewise.
6980         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
6981         (vectorizable_reduction): Likewise.
6983 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6985         * tree-vectorizer.h (vect_is_simple_use): Add an optional
6986         stmt_vec_info * parameter before the optional gimple **.
6987         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6988         (process_use, vect_get_vec_def_for_operand_1): Update callers.
6989         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
6990         * tree-vect-loop.c (vectorizable_reduction): Likewise.
6991         (vectorizable_live_operation): Likewise.
6992         * tree-vect-patterns.c (type_conversion_p): Likewise.
6993         (vect_look_through_possible_promotion): Likewise.
6994         (vect_recog_rotate_pattern): Likewise.
6995         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6997 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6999         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
7000         a typedef to a wrapper class.
7001         (NULL_STMT_VEC_INFO): New macro.
7002         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
7003         (stmt_vec_info::operator*): New function.
7004         (stmt_vec_info::operator gimple *): Likewise.
7005         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
7006         (add_stmt_costs): Likewise.
7007         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
7008         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7009         (vect_get_known_peeling_cost): Likewise.
7010         (vect_estimate_min_profitable_iters): Likewise.
7011         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7012         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
7013         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7014         (vectorizable_store, free_stmt_vec_infos): Likewise.
7015         (new_stmt_vec_info): Change return type of xcalloc to
7016         _stmt_vec_info *.
7018 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7020         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
7021         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
7022         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
7023         a single_imm_use-based sequence.
7024         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
7026 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7028         * tree-vectorizer.h (vec_info::lookup_def): Declare.
7029         * tree-vectorizer.c (vec_info::lookup_def): New function.
7030         * tree-vect-patterns.c (vect_get_internal_def): Use it.
7031         (vect_widened_op_tree): Likewise.
7032         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7033         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
7034         (vectorizable_reduction): Likewise.
7035         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
7036         of a gimple *.
7037         (vect_is_slp_reduction): Update calls accordingly.  Use
7038         vec_info::lookup_def.
7039         (vect_is_simple_reduction): Likewise
7040         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
7042 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7044         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
7045         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
7046         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
7047         of vinfo_for_stmt.
7048         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
7049         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
7050         (vect_update_vf_for_slp, vect_analyze_loop_operations)
7051         (vect_is_slp_reduction, vectorizable_induction)
7052         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
7053         * tree-vect-patterns.c (vect_init_pattern_stmt):
7054         (vect_determine_min_output_precision_1, vect_determine_precisions)
7055         (vect_pattern_recog): Likewise.
7056         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
7057         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
7058         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
7059         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7060         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
7061         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
7062         info field from a loop to a loop_vec_info.
7064 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7066         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
7067         (vec_info::add_stmt): Declare.
7068         * tree-vectorizer.c (vec_info::add_stmt): New function.
7069         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
7070         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
7071         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7072         (vectorizable_induction): Likewise.
7073         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
7074         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7075         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
7076         (vectorizable_load): Likewise.
7077         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7078         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
7079         (vect_recog_gather_scatter_pattern): Likewise.
7080         (append_pattern_def_seq): Likewise.  Remove a check that is
7081         performed by add_stmt itself.
7083 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7085         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
7086         which make_ssa_name was called with new_stmt before new_stmt
7087         had been created.
7089 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7091         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
7092         split out from...
7093         (vect_is_slp_reduction): ...here...
7094         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
7095         that are already known to be false.
7097 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7099         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
7100         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
7101         STMT_VINFO_NUM_SLP_USES when it's true.
7102         (vect_free_slp_instance): Add a final_p parameter and pass it to
7103         vect_free_slp_tree.
7104         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
7105         (vect_analyze_slp_instance): Likewise.
7106         (vect_slp_analyze_operations): Likewise.
7107         (vect_slp_analyze_bb_1): Likewise.
7108         * tree-vectorizer.c (vec_info): Likewise.
7109         * tree-vect-loop.c (vect_transform_loop): Likewise.
7111 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7113         * tree-vect-loop.c (vectorizable_reduction): Assert that the
7114         function is not called for second and subsequent members of
7115         a reduction group.
7117 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7119         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
7120         cases for nested loops from here to ...
7121         (vect_create_epilog_for_reduction): ...here.  Only call
7122         vect_is_simple_use for inner-loop reductions.
7124 2018-07-31  Martin Liska  <mliska@suse.cz>
7126         PR gcov-profile/85338
7127         PR gcov-profile/85350
7128         PR gcov-profile/85372
7129         * profile.c (struct location_triplet): New.
7130         (struct location_triplet_hash): Likewise.
7131         (output_location): Do not output a BB that
7132         is already recorded for a line.
7133         (branch_prob): Use streamed_locations.
7135 2018-07-31  Martin Liska  <mliska@suse.cz>
7137         PR gcov-profile/85370
7138         * coverage.c (coverage_begin_function): Do not mark target
7139         clones as artificial functions.
7141 2018-07-31  Martin Liska  <mliska@suse.cz>
7143         PR gcov-profile/83813
7144         PR gcov-profile/84758
7145         PR gcov-profile/85217
7146         PR gcov-profile/85332
7147         * profile.c (branch_prob): Do not record GOTO expressions
7148         for GIMPLE statements which locations are already streamed.
7150 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7152         * gcc.c (handle_spec_function): Accept a soft_matched_part
7153         argument, as do_spec_1.  Pass it down to ...
7154         (eval_spec_function): Accept a soft_matched_part argument,
7155         and pass it down to ...
7156         (do_spec_2): Accept a soft_matched_part argument, and pass
7157         it down to do_spec_1.
7158         (do_spec_1): Pass soft_matched_part to handle_spec_function.
7159         (handle_braces): Update call to handle_spec_function.
7160         (driver::set_up_specs): Update calls to do_spec_2.
7161         (compare_debug_dump_opt_spec_function): Likewise.
7162         (compare_debug_self_opt_spec_function): Likewise.
7164 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7166         * common.opt (nolibc): New option.
7167         * doc/invoke.texi (Link Options): Document it.
7168         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
7169         * config/alpha/linux.h: Likewise.
7170         * config/arc/elf.h: Likewise.
7171         * config/arm/uclinux-elf.h: Likewise.
7172         * config/arm/unknown-elf.h: Likewise.
7173         * config/avr/avrlibc.h: Likewise.
7174         * config/bfin/bfin.h: Likewise.
7175         * config/bfin/linux.h: Likewise.
7176         * config/bfin/uclinux.h: Likewise.
7177         * config/darwin.h: Likewise.
7178         * config/darwin10.h: Likewise.
7179         * config/darwin12.h: Likewise.
7180         * config/gnu-user.h: Likewise.
7181         * config/lm32/uclinux-elf.h: Likewise.
7182         * config/pa/pa-hpux11.h: Likewise.
7183         * config/pa/pa64-hpux.h: Likewise.
7184         * config/sparc/sparc.h: Likewise.
7186 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7188         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
7189         undefined variables.
7191 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
7193         PR target/86640
7194         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
7195         instead of GEN_INT.
7197 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7199         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7200         terminated string literal.
7202 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
7204         PR rtl-optimization/85160
7205         * combine.c (is_just_move): New function.
7206         (try_combine): Allow combining two instructions into two if neither of
7207         the original instructions was a move.
7209 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
7211         PR target/86673
7212         * doc/extend.texi (Global Register Variables): Discourage use of type
7213         qualifiers.
7214         (Local Register Variables): Likewise.
7216 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
7218         PR tree-optimization/86506
7219         * hwint.h (ceil_log2): Resync with hwint.c implementation.
7221 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
7223         PR target/86547
7224         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
7225         hard_regno, make sure no insn between `from` and `to` clobbers it.
7227 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
7228             Tom de Vries  <tdevries@suse.de>
7230         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
7231         (PTX_DEFAULT_RUNTIME_DIM): ... this.
7232         (nvptx_goacc_validate_dims): Set default worker and gang dims to
7233         PTX_DEFAULT_RUNTIME_DIM.
7234         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
7236 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
7238         * config/pa/pa.c (pa_output_addr_vec): Align address table.
7239         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
7240         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
7242 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
7244         * config/rs6000/constraints.md (wG constraint): Delete, no longer
7245         used.
7246         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
7247         predicate to reflect toc fusion has been deleted.
7248         (toc_fusion_mem_raw): Delete, no longer used.
7249         (toc_fusion_mem_wrapped): Likewise.
7250         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
7251         fusion mask bit.
7252         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
7253         Delete, no longer used.
7254         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
7255         meant to be used for toc fusion.
7256         (rs6000_debug_print_mode): Delete toc fusion debugging.
7257         (rs6000_debug_reg_global): Likewise.
7258         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
7259         fusion and secondary reload support that were never used.
7260         (rs6000_option_override_internal): Delete TOC fusion, that was only
7261         partially defined, and it did not work unless you also used the
7262         -mcmodel= switch.
7263         (rs6000_legitimate_address_p): Delete TOC fusion support.
7264         (rs6000_opt_masks): Likewise.
7265         (fusion_wrap_memory_address): Delete function, no longer used.
7266         (fusion_split_address); Delete TOC fusion support.
7267         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
7268         longer used with toc fusion being deleted.
7269         (TARGET_TOC_FUSION_FP): Likewise.
7270         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
7271         UNSPEC.
7272         (toc fusion spliter): Delete TOC fusion support.
7273         (toc_fusionload_<mode>): Likewise.
7274         (toc_fusionload_di): Likewise.
7275         (fusion_gpr_load_<mode>): Delete generator function, this insn no
7276         longer needs to be named.  Rename predicate to delete TOC fusion.
7277         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7278         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7279         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7280         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7281         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
7283 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7285         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
7286         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
7287         __int128 in built-in function prototypes.
7288         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
7289         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
7291 2018-07-27  Martin Sebor  <msebor@redhat.com>
7293         PR tree-optimization/86696
7294         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
7295         types, including enums.
7296         (handle_char_store): Be prepared for the above function to fail.
7298 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
7300         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
7301         when optimization level is lower than 2 or optimize for size.
7303 2018-07-26  Martin Sebor  <msebor@redhat.com>
7305         PR tree-optimization/86043
7306         PR tree-optimization/86042
7307         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
7308         (get_string_cst_length): Rename...
7309         (get_min_string_length): ...to this.  Add argument.
7310         (handle_char_store): Extend to handle multi-character stores by
7311         MEM_REF.
7312         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
7313         * tree.h (initializer_zerop): Add argument.
7315 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
7317         PR middle-end/86660
7318         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
7319         declare target to variables if they have always,{to,from,tofrom} map
7320         kinds.
7322 2018-07-26  Martin Liska  <mliska@suse.cz>
7324         PR lto/86548
7325         * lto-wrapper.c: Add linker_output as prefix
7326         for ltrans_output_file.
7328 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
7330         PR rtl-optimization/85805
7331         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
7332         value for hard registers if that was written in the same mode.
7334 2018-07-26  Martin Liska  <mliska@suse.cz>
7336         PR gcov-profile/86536
7337         * gcov.c (format_gcov): Use printf format %.*f directly
7338         and do not handle special values.
7340 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7342         * common/config/arc/arc-common.c (arc_option_optimization_table):
7343         Update default optimizations for size.
7345 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7347         * config/arc/arc.md (movsf_insn): Add short instruction selection.
7348         * config/arc/constraints.md (CfZ): New constraint.
7349         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
7350         (subsf3_fpu): Likewise.
7351         (cmpsf_fpu): Likewise.
7352         (cmpsf_fpu_uneq): Likewise.
7354 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7356         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
7357         accesses as well.
7358         (arc_is_uncached_mem_p): uncached applies to both the variable and
7359         the pointer.
7361 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
7363         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
7364         register names.
7366 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
7368         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
7369         field "m_scopes" from vec to auto_vec.
7371 2018-07-25  Martin Liska  <mliska@suse.cz>
7373         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
7374         return type.
7376 2018-07-25  Richard Biener  <rguenther@suse.de>
7378         PR debug/86654
7379         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
7380         special wrt context_die late.
7381         (gen_subprogram_die): Re-use DIEs in local scope.
7383 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
7385         PR tree-optimization/86644
7386         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
7388 2018-07-25  Martin Liska  <mliska@suse.cz>
7390         PR middle-end/86645
7391         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
7392         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
7394 2018-07-25  Martin Liska  <mliska@suse.cz>
7396         PR sanitizer/79635
7397         * params.def: Explain ASan abbreviation and provide
7398         a documentation link.
7400 2018-07-24  Martin Sebor  <msebor@redhat.com>
7402         PR tree-optimization/86622
7403         PR tree-optimization/86532
7404         * builtins.h (string_length): Declare.
7405         * builtins.c (c_strlen): Correct handling of non-constant offsets.
7406         (check_access): Be prepared for non-constant length ranges.
7407         (string_length): Make extern.
7408         * expr.c (string_constant): Only handle the minor non-constant
7409         array index.  Use string_constant to compute the length of
7410         a generic string constant.
7412 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
7414         PR tree-optimization/86618
7415         * tree-vect-stmts.c (vectorizable_call): Don't take the address
7416         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
7418 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
7420         PR tree-optimization/86636
7421         * json.cc (json::object::set): Fix comment.  Add assertions.
7422         (json::array::append): Move here from json.h.  Add comment and an
7423         assertion.
7424         (json::string::string): Likewise.
7425         * json.h (json::array::append): Move to json.cc.
7426         (json::string::string): Likewise.
7427         * optinfo-emit-json.cc
7428         (optrecord_json_writer::impl_location_to_json): Assert that we
7429         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
7430         wrapper around it.  Expand the location once, rather than three
7431         times.
7432         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
7433         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
7434         wrappers.
7435         (optrecord_json_writer::optinfo_to_json): Likewise, in four
7436         places.  Fix some overlong lines.
7438 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
7440         * config/aarch64/aarch64-simd.md
7441         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
7442         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
7443         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
7444         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
7445         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
7446         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
7447         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
7448         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
7449         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
7451 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
7453         PR middle-end/86627
7454         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
7455         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
7456         and abs_d == d, do the power of two handling if profitable.
7458 2018-07-24  Richard Biener  <rguenther@suse.de>
7460         * match.pd: Add BIT_FIELD_REF canonicalizations.
7462 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7464         PR c/86617
7465         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
7467 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7469         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
7470         terminated STRING_CST object.
7472 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7474         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
7476 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
7478         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
7479         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
7480         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
7481         the elements into a register.
7482         (rs6000_split_v4si_init_di_reg): Delete.
7483         (rs6000_split_v4si_init): Delete.
7484         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
7485         (vsx_init_v4si): Rewrite as a define_expand.
7487 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
7489         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
7490         zero_extend argument from memory): New.
7492 2018-07-22  Martin Sebor  <msebor@redhat.com>
7494         PR bootstrap/86621
7495         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
7496         diagnosing calls with unknown arguments unless -Walloca-larger-than
7497         is restricted to less than PTRDIFF_MAX bytes.
7499 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
7501         * doc/gcov.texi (Invoking Gcov): Editorial changes.
7503 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
7505         * pretty-print.c (text_info::set_location): Remove redundant
7506         "line_table" parameter from call to rich_location::set_range.
7508 2018-07-20  Martin Sebor  <msebor@redhat.com>
7510         PR middle-end/82063
7511         * builtins.c (expand_builtin_alloca): Adjust.
7512         * calls.c (alloc_max_size): Simplify.
7513         * cgraphunit.c (cgraph_node::expand): Adjust.
7514         * common.opt (larger_than_size, warn_frame_larger_than): Remove
7515         variables.
7516         (frame_larger_than_size): Same.
7517         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
7518         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
7519         Initialize.
7520         * doc/invoke.texi (GCC Command Options): Document option arguments.
7521         Explain byte-size arguments and suffixes.
7522         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
7523         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
7524         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
7525         * doc/options.texi (UInteger): Expand.
7526         (Host_Wide_Int, ByteSize): Document new properties.
7527         * final.c (final_start_function_1): Include sizes in an error message.
7528         * function.c (frame_offset_overflow): Same.
7529         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
7530         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
7531         Diagnose unbounded alloca calls only for limits of less than
7532         PTRDIFF_MAX.
7533         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
7534         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
7535         for alloca(0).
7536         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
7537         only for limits of less than PTRDIFF_MAX.
7538         * langhooks-def.h (lhd_handle_option): Change function argument
7539         to HOST_WIDE_INT.
7540         * langhooks.c (lhd_handle_option): Same.
7541         * langhooks.h (handle_option): Same.
7542         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
7543         ByteSize flags.
7544         (var_type, var_type_struct): Same.
7545         (var_set): Handle ByteSize flag.
7546         * optc-gen.awk: Add comments to output to ease debugging.  Make
7547         use of HOST_WIDE_INT where appropriate.
7548         * opts-gen-save.awk:  Use %lx to format unsigned long.
7549         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
7550         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
7551         arguments.  Parse bytes-size suffixes.
7552         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
7553         (enum_value_to_arg): Same.
7554         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
7555         (handle_option): Adjust.
7556         (generate_option): Change function argument to HOST_WIDE_INT.
7557         (cmdline_handle_error): Adjust.
7558         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
7559         (set_option): Change function argument to HOST_WIDE_INT.
7560         (option_enabled): Handle cl_host_wide_int.
7561         (get_option_state): Handle CLVC_SIZE.
7562         (control_warning_option): Same.
7563         * opts.c (common_handle_option): Change function argument to
7564         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
7565         OPT_Wvla_larger_than_.
7566         * opts.h (enum cl_var_type): Add an enumerator.
7567         * stor-layout.c (layout_decl): Print a more meaningful warning.
7568         * toplev.c (output_stack_usage): Adjust.
7570 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
7572         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
7573         call to inline_expand_builtin_string_cmp.
7574         (expand_builtin_strcmp): Likewise.
7575         (expand_builtin_strncmp): Likewise.
7576         (inline_string_cmp): Delete the last parameter, change char_type_node
7577         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
7578         two operands.
7579         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
7580         the inlining expansion on target where the type of the call has same or
7581         narrower precision than unsigned char.
7583 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
7585         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
7586         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
7587         * common.opt (fsave-optimization-record): New option.
7588         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
7589         * doc/invoke.texi (-fsave-optimization-record): New option.
7590         * dumpfile.c: Include "optinfo-emit-json.h".
7591         (struct kv_pair): Move to coretypes.h.
7592         (optgroup_options): Make non-static.
7593         (dump_context::end_scope): Call
7594         optimization_records_maybe_pop_dump_scope.
7595         * dumpfile.h (optgroup_options): New decl.
7596         * json.cc: New file.
7597         * json.h: New file.
7598         * optinfo-emit-json.cc: New file.
7599         * optinfo-emit-json.h: New file.
7600         * optinfo.cc: Include "optinfo-emit-json.h".
7601         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
7602         (optinfo_enabled_p): Check optimization_records_enabled_p.
7603         (optinfo_wants_inlining_info_p): Likewise.
7604         * optinfo.h: Update comment.
7605         * profile-count.c (profile_quality_as_string): New function.
7606         * profile-count.h (profile_quality_as_string): New decl.
7607         (profile_count::quality): New accessor.
7608         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
7609         and optinfo_emit_json_cc_tests.
7610         * selftest.h (selftest::json_cc_tests): New decl.
7611         (selftest::optinfo_emit_json_cc_tests): New decl.
7612         * toplev.c: Include "optinfo-emit-json.h".
7613         (compile_file): Call optimization_records_finish.
7614         (do_compile): Call optimization_records_start.
7615         * tree-ssa-live.c: Include optinfo.h.
7616         (remove_unused_scope_block_p): Retain inlining information if
7617         optinfo_wants_inlining_info_p returns true.
7619 2018-07-20  Richard Biener  <rguenther@suse.de>
7621         PR debug/86585
7622         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
7623         to cover -flto-partition=none.
7625 2018-07-20  Martin Liska  <mliska@suse.cz>
7627         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
7628         (get_decl_source_range): Remove unused function.
7630 2018-07-20  Richard Biener  <rguenther@suse.de>
7632         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
7633         (struct vn_phi_s): Likewise.
7634         (struct vn_reference_s): Likewise.
7635         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
7636         for searching the slot of an entry known to be in the hash itself.
7637         (vn_phi_hasher::equal): Likewise.
7638         (vn_reference_hasher::equal): Likewise.
7639         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
7640         globals.
7641         (optimistic_info, current_info): Remove, keeping only valid_info.
7642         (vn_reference_lookup_1): Remove fallback lookup.
7643         (vn_reference_lookup_2): Likewise.
7644         (vn_nary_op_lookup_1): Likewise.
7645         (vn_phi_lookup): Likewise.
7646         (vn_nary_build_or_lookup_1): Make sure to not chain the built
7647         hash element.
7648         (vn_reference_insert): Adjust, chain the inserted hash element
7649         at last_inserted_ref.
7650         (vn_reference_insert_pieces): Likewise.
7651         (visit_reference_op_call): Likewise.
7652         (vn_nary_op_insert_into): Chain the inserted hash element at
7653         last_inserted_nary.
7654         (vn_nary_op_insert_pieces): Adjust.
7655         (vn_nary_op_insert): Likewise.
7656         (vn_nary_op_insert_stmt): Likewise.
7657         (vn_phi_insert): Adjust, chain the inserted hash element at
7658         last_inserted_phi.
7659         (process_scc): Remove clearing and copying the optimistic
7660         table.  Instead remove elements inserted during an optimistic
7661         iteration from the single table we maintain.
7662         (init_scc_vn): Adjust.
7663         (free_scc_vn): Likewise.
7664         (sccvn_dom_walker::record_cond): Likewise.
7665         (sccvn_dom_walker::after_dom_children): Likewise.
7667 2018-07-19  Martin Sebor  <msebor@redhat.com>
7669         PR tree-optimization/84047
7670         PR tree-optimization/83776
7671         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
7672         (check_array_bounds): Call it.
7674 2018-07-19  Martin Sebor  <msebor@redhat.com>
7676         * align.h (align_flags): Use member initialization.
7678 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
7680         * Makefile.in (OBJS): Add optinfo.o.
7681         * coretypes.h (class symtab_node): New forward decl.
7682         (struct cgraph_node): New forward decl.
7683         (class varpool_node): New forward decl.
7684         * dump-context.h: New file.
7685         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
7686         "tree-pass.h".
7687         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
7688         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
7689         (set_alt_dump_file): Likewise.
7690         (dump_context::~dump_context): New dtor.
7691         (dump_gimple_stmt): Move implementation to...
7692         (dump_context::dump_gimple_stmt): ...this new member function.
7693         Add the stmt to any pending optinfo, creating one if need be.
7694         (dump_gimple_stmt_loc): Move implementation to...
7695         (dump_context::dump_gimple_stmt_loc): ...this new member function.
7696         Start a new optinfo and add the stmt to it.
7697         (dump_gimple_expr): Move implementation to...
7698         (dump_context::dump_gimple_expr): ...this new member function.
7699         Add the stmt to any pending optinfo, creating one if need be.
7700         (dump_gimple_expr_loc): Move implementation to...
7701         (dump_context::dump_gimple_expr_loc): ...this new member function.
7702         Start a new optinfo and add the stmt to it.
7703         (dump_generic_expr): Move implementation to...
7704         (dump_context::dump_generic_expr): ...this new member function.
7705         Add the tree to any pending optinfo, creating one if need be.
7706         (dump_generic_expr_loc): Move implementation to...
7707         (dump_context::dump_generic_expr_loc): ...this new member
7708         function.  Add the tree to any pending optinfo, creating one if
7709         need be.
7710         (dump_printf): Move implementation to...
7711         (dump_context::dump_printf_va): ...this new member function.  Add
7712         the text to any pending optinfo, creating one if need be.
7713         (dump_printf_loc): Move implementation to...
7714         (dump_context::dump_printf_loc_va): ...this new member function.
7715         Start a new optinfo and add the stmt to it.
7716         (dump_dec): Move implementation to...
7717         (dump_context::dump_dec): ...this new member function.  Add the
7718         value to any pending optinfo, creating one if need be.
7719         (dump_context::dump_symtab_node): New member function.
7720         (dump_context::get_scope_depth): New member function.
7721         (dump_context::begin_scope): New member function.
7722         (dump_context::end_scope): New member function.
7723         (dump_context::ensure_pending_optinfo): New member function.
7724         (dump_context::begin_next_optinfo): New member function.
7725         (dump_context::end_any_optinfo): New member function.
7726         (dump_context::s_current): New global.
7727         (dump_context::s_default): New global.
7728         (dump_scope_depth): Delete global.
7729         (dumpfile_ensure_any_optinfo_are_flushed): New function.
7730         (dump_symtab_node): New function.
7731         (get_dump_scope_depth): Reimplement in terms of dump_context.
7732         (dump_begin_scope): Likewise.
7733         (dump_end_scope): Likewise.
7734         (selftest::temp_dump_context::temp_dump_context): New ctor.
7735         (selftest::temp_dump_context::~temp_dump_context): New dtor.
7736         (selftest::verify_item): New function.
7737         (ASSERT_IS_TEXT): New macro.
7738         (ASSERT_IS_TREE): New macro.
7739         (ASSERT_IS_GIMPLE): New macro.
7740         (selftest::test_capture_of_dump_calls): New test.
7741         (selftest::dumpfile_c_tests): Call it.
7742         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
7743         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
7744         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
7745         descriptive comment.
7746         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
7747         (dump_node, dump_bb): Move these unrelated decls.
7748         (class dump_manager): Add leading comment.
7749         * optinfo.cc: New file.
7750         * optinfo.h: New file.
7752 2018-07-19  Michael Collison  <michael.collison@arm.com>
7753             Richard Henderson <rth@redhat.com>
7755         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
7756         (subti): Handle op1 zero.
7757         (subvti4, usub4ti4): New.
7758         (*sub<GPI>3_compare1_imm): New.
7759         (sub<GPI>3_carryinCV): New.
7760         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
7761         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
7763 2018-07-19  Michael Collison  <michael.collison@arm.com>
7764             Richard Henderson <rth@redhat.com>
7766         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
7767         (addti3): Create simpler code if low part is already known to be 0.
7768         (addvti4, uaddvti4): New.
7769         (*add<GPI>3_compareC_cconly_imm): New.
7770         (*add<GPI>3_compareC_cconly): New.
7771         (*add<GPI>3_compareC_imm): New.
7772         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
7773         handle constants within this pattern..
7774         (*add<GPI>3_compareV_cconly_imm): New.
7775         (*add<GPI>3_compareV_cconly): New.
7776         (*add<GPI>3_compareV_imm): New.
7777         (add<GPI>3_compareV): New.
7778         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
7779         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
7780         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
7781         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
7782         with 'comparison' operator.
7783         (*add<GPI>3_compareV_cconly_imm): Ditto.
7784         (*add<GPI>3_compareV_cconly): Ditto.
7785         (*add<GPI>3_compareV_imm): Ditto.
7786         (add<GPI>3_compareV): Ditto.
7787         (add<mode>3_carryinC): Ditto.
7788         (*add<mode>3_carryinC_zero): Ditto.
7789         (*add<mode>3_carryinC): Ditto.
7790         (add<mode>3_carryinV): Ditto.
7791         (*add<mode>3_carryinV_zero): Ditto.
7792         (*add<mode>3_carryinV): Ditto.
7794 2018-07-19  Michael Collison  <michael.collison@arm.com>
7795             Richard Henderson <rth@redhat.com>
7797         * config/aarch64/aarch64-modes.def (CC_V): New.
7798         * config/aarch64/aarch64-protos.h
7799         (aarch64_addti_scratch_regs): Declare
7800         (aarch64_subvti_scratch_regs): Declare.
7801         (aarch64_expand_subvti): Declare.
7802         (aarch64_gen_unlikely_cbranch): Declare
7803         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
7804         for signed overflow using CC_Vmode.
7805         (aarch64_get_condition_code_1): Handle CC_Vmode.
7806         (aarch64_gen_unlikely_cbranch): New function.
7807         (aarch64_addti_scratch_regs): New function.
7808         (aarch64_subvti_scratch_regs): New function.
7809         (aarch64_expand_subvti): New function.
7811 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7813         * config/aarch64/aarch64-option-extensions.def: New entry for profile
7814         extension.
7815         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
7816         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
7817         extension.
7819 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7821         PR target/83009
7822         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7823         address check not strict.
7825 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7827         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
7828         Umq with Umn.
7829         (store_pair_lanes<mode>): Likewise.
7830         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
7831         enum value 'ADDR_QUERY_LDP_STP_N'.
7832         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
7833         (aarch64_print_address_internal): Add declaration.
7834         (aarch64_print_ldpstp_address): Remove.
7835         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
7836         (aarch64_print_operand): Change printing of 'y'.
7837         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
7838         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
7839         'true' rather than '1'.
7840         * config/aarch64/constraints.md (Uml): Likewise.
7841         (Uml): Rename to Umn.
7842         (Umq): Remove.
7844 2018-07-19  Richard Biener  <rguenther@suse.de>
7846         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
7847         a trailing array.
7848         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
7849         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
7850         (vn_reference_hasher): Likewise.
7851         (struct vn_tables_s): Remove obstack and alloc-pool members.
7852         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
7853         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
7854         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
7855         (vn_reference_insert_pieces): Likewise.
7856         (alloc_vn_nary_op_noinit): Adjust.
7857         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
7858         (vn_phi_eq): Adjust.
7859         (shared_lookup_phiargs): Remove.
7860         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
7861         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
7862         (visit_reference_op_call): Likewise.
7863         (copy_nary, copy_phi, copy_reference): Remove.
7864         (process_scc): Rewind the obstack when iterating.  Do not
7865         copy the elements to valid_info but just move them from one
7866         hashtable to the other.
7867         (allocate_vn_table): Adjust.
7868         (free_vn_table): Likewise.
7869         (init_scc_vn): Likewise.
7870         (free_scc_vn): Likewise.
7872 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
7874         PR target/86560
7875         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
7876         indirect_return as function type attribute.
7877         (ix86_attribute_table): Change indirect_return to function
7878         type attribute.
7879         * doc/extend.texi: Update indirect_return attribute.
7881 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
7883         * wide-int.h (widest2_int): New.
7884         * gimple-fold.c (arith_overflowed_p): Use it.
7885         * tree.h (widest2_int_cst): New.
7886         * tree-vrp.c (wide_int_binop_overflow): Rename from
7887         vrp_int_const_binop.
7888         Rewrite to work on trees.
7889         (extract_range_from_multiplicative_op_1): Abstract code to...
7890         (wide_int_range_min_max): ...here.
7891         (wide_int_range_cross_product): ...and here.
7892         (extract_range_from_binary_expr_1): Abstract overflow code to...
7893         (wide_int_range_mult_wrapping): ...here.
7894         * tree-vrp.h (wide_int_range_cross_product): New.
7895         (wide_int_range_mult_wrapping): New.
7897 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
7898             Julia Koval  <julia.koval@intel.com>
7900         * config/i386/x86-tune-costs.h (skylake_memcpy,
7901         skylake_memset): Replace rep_prefix with unrolling for size 512.
7903 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
7905         PR middle-end/86544
7906         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
7907         comparision with EQ_EXPR in last stmt.
7909 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7911         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
7912         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
7913         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
7914         previously known as "PowerPC AltiVec Built-in Functions".  Move
7915         some material to new subsubsections "PowerPC AltiVec Built-in
7916         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
7917         ISA 2.07".
7918         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
7919         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
7920         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
7921         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
7923 2018-07-18  Richard Biener  <rguenther@suse.de>
7925         PR tree-optimization/86557
7926         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
7927         EXACT_DIV_EXPR.
7929 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
7931         * config/s390/s390.c (s390_function_profiler): Generate CFI.
7933 2018-07-17  Jeff Law  <law@redhat.com>
7935         * config/arm/arm.c (get_label_padding): Update for recent
7936         changes to label_to_alignment.
7938         PR tree-optimization/86010
7939         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
7941         * config/mips/mips.c (vr4130_align_insns): Update for recent
7942         changes to label_to_alignment.
7944         * config/frv/frv.c (frv_label_align): Update for recent changes
7945         to label_to_alignment.
7947         * config/nios2/nios2.c (nios2_label_align): Update for recent
7948         changes which dropped ALIGN_LABELS_LOG.
7950 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
7952         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
7953         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
7955 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
7957         * config/arc/arc.c (arc_label_align): Use align_labels instead of
7958         deprecated align_labels_log.
7960 2018-07-17  Richard Biener  <rguenther@suse.de>
7962         PR lto/86456
7963         * dwarf2out.c (init_sections_and_labels): Always generate
7964         a debug_line_str_section for early LTO debug.
7965         (dwarf2out_finish): Reset debug_line_str_hash output early.
7966         Bump counter for extra dwarf5 .debug_loc labels to not conflict
7967         with fat LTO part.
7968         (dwarf2out_early_finish): Output debug_line_str.
7970 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
7972         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
7973         index register on z196 or later.
7975 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
7977         * config/s390/s390.c (s390_default_align): Set default function
7978         alignment to 16.
7979         (s390_override_options_after_change): Call s390_default align.
7980         (s390_option_override_internal): Call s390_default_align.
7981         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
7983 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
7985         PR middle-end/86542
7986         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
7987         to _looptemp_ clauses, other than the first two.
7989 2018-07-17  Martin Liska  <mliska@suse.cz>
7991         * opts.c: Do not enable OPT_falign_* for -Os.
7993 2018-07-17  Martin Liska  <mliska@suse.cz>
7995         * align.h (MAX_CODE_ALIGN): New.
7996         (MAX_CODE_ALIGN_VALUE): New.
7997         * common/config/i386/i386-common.c (ix86_handle_option):
7998         (MAX_CODE_ALIGN): Moved to align.h.
7999         * final.c (MAX_CODE_ALIGN): Likewise.
8000         * opts.c (parse_and_check_align_values):
8001         (MAX_CODE_ALIGN): Likewise.
8002         (MAX_CODE_ALIGN_VALUE): Likewise.
8004 2018-07-17  Martin Liska  <mliska@suse.cz>
8006         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
8007         in order to fulfil coding style.
8008         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
8009         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8010         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8011         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
8012         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
8013         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
8014         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
8015         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
8016         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8018 2018-07-17  Martin Liska  <mliska@suse.cz>
8020         * align.h: New file.
8021         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
8022         directly.
8023         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
8024         align_flags of label_to_alignment.
8025         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
8026         align_flags class.
8027         * config/m68k/m68k.c: Do not use removed align_labels_value and
8028         align_loops_value.
8029         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
8030         (LOOP_ALIGN): Likewise.
8031         (LABEL_ALIGN): Likewise.
8032         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8033         Remove not used macro.
8034         (rs6000_loop_align): Change return type to align_flags.
8035         (rs6000_loop_align_max_skip): Remove.
8036         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
8037         Change return type to align_flags.
8038         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8039         Remove not used macro.
8040         (rs6000_loop_align):  Change return type to align_flags.
8041         (rs6000_loop_align_max_skip): Remove.
8042         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
8043         * config/rx/rx-protos.h (rx_align_for_label): Make it
8044         static function.
8045         * config/rx/rx.c (rx_align_for_label): Change return type
8046         to align_flags.
8047         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
8048         macro definitions.
8049         into align_flags class.
8050         (LABEL_ALIGN): Likewise.
8051         (LOOP_ALIGN): Likewise.
8052         * config/s390/s390.c (s390_label_align): Use align_flags
8053         class member.
8054         (s390_asm_output_function_label): Likewise.
8055         * config/sh/sh.c (sh_override_options_after_change):
8056         Use align_flags class directly without macros.
8057         (find_barrier): Likewise.
8058         (barrier_align): Likewise.
8059         (sh_loop_align): Likewise.
8060         * config/spu/spu.c (spu_option_override):
8061         Use align_flags_tuple::get_value instead of removed macros.
8062         (spu_sched_init): Likewise.
8063         * config/spu/spu.h (GTY): Likewise.
8064         * config/visium/visium.c (visium_option_override):
8065         Set "8" as default secondary alignment.
8066         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
8067         in order to guarantee secondary alignment of 8.
8068         * coretypes.h: Include align.h header file.
8069         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
8070         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
8071         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
8072         * doc/tm.texi.in: Likewise.
8073         * final.c (struct label_alignment): Remove not used structure.
8074         (LABEL_ALIGN): Change type to align_flags.
8075         (LOOP_ALIGN): Likewise.
8076         (JUMP_ALIGN): Likewise.
8077         (default_loop_align_max_skip): Remove.
8078         (default_label_align_max_skip): Likewise.
8079         (default_jump_align_max_skip): Likewise.
8080         (default_label_align_after_barrier_max_skip):
8081         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
8082         (LABEL_TO_MAX_SKIP): Remove.
8083         (label_to_alignment): Return align_flags type instead of integer.
8084         (label_to_max_skip): Remove.
8085         (align_fuzz): Use align_flags type.
8086         (compute_alignments): Use align_flags type and use align_flags::max
8087         to combine multiple alignments.
8088         (grow_label_align): Grow vec instead of C array.
8089         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
8090         (shorten_branches):  Use align_flags type and use align_flags::max
8091         to combine multiple alignments.
8092         (final_scan_insn_1): Remove usage of secondary alignment that comes
8093         from label alignment, but instead use proper secondary alignment
8094         which is computed in grow_label_align.
8095         * flags.h (struct align_flags_tuple): Move to align.h.
8096         (struct align_flags): Likewise.
8097         (state_align_loops): Rename to align_loops.
8098         (state_align_jumps): Rename to align_jumps.
8099         (state_align_labels): Rename to align_labels.
8100         (state_align_functions): Rename to align_functions.
8101         (align_loops_log): Remove.
8102         (align_jumps_log): Remove.
8103         (align_labels_log): Remove.
8104         (align_functions_log): Remove.
8105         (align_loops_max_skip): Remove.
8106         (align_jumps_max_skip): Remove.
8107         (align_labels_max_skip): Remove.
8108         (align_functions_max_skip): Remove.
8109         (align_loops_value): Remove.
8110         (align_jumps_value): Remove.
8111         (align_labels_value): Remove.
8112         (align_functions_value): Remove.
8113         * output.h (label_to_alignment): Change return type to align_flags.
8114         (label_to_max_skip): Remove.
8115         * target.def: Remove loop_align_max_skip, label_align_max_skip,
8116         jump_align_max_skip macros.
8117         * targhooks.h (default_loop_align_max_skip): Remove.
8118         (default_label_align_max_skip): Likewise.
8119         (default_jump_align_max_skip): Likewise.
8120         (default_label_align_after_barrier_max_skip): Remove.
8121         * toplev.c (read_log_maxskip): Use ::normalize function.
8122         (parse_N_M): Remove not used argument and also call ::normalize.
8123         (parse_alignment_opts): Do not pass unused arguments.
8124         * varasm.c (assemble_start_function): Use directly align_functions
8125         instead of removed macros.
8126         * system.h: Do not poison removed macros.
8128 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
8130         PR middle-end/86539
8131         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
8132         and cond temporaries don't have reference type if iterator has
8133         pointer type.  For init use &for_pre_body instead of pre_p if
8134         for_pre_body is non-empty.
8136 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8138         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
8139         double-double modes to SFmode directly directly.
8140         (trunc<mode>sf2_fprs): Delete.
8142 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8144         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
8145         for conversions between IFmode and the decimal floating point modes.
8146         (init_float128_ieee): Use the correct names for conversions between
8147         KFmode and the decimal floating point modes.
8149 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8151         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
8152         for the conversions between TDmode and IFmode.
8153         (init_float128_ieee): Use more correct names for the conversions
8154         between TDmode and KFmode.
8156 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
8158         PR tree-optimization/86526
8159         * builtins.c (expand_builtin_memcmp): Formatting fixes.
8160         (inline_expand_builtin_string_cmp): Likewise.
8161         (inline_string_cmp): Likewise.  Use c_readstr instead of
8162         builtin_memcpy_read_str.  Add unit_mode temporary.
8164 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8166         PR middle-end/86528
8167         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
8168         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
8170 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8172         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
8173         Alphabetize prototypes of built-in functions, separating out
8174         built-in functions that are listed in this section but should be
8175         described elsewhere.
8177 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
8179         PR target/86511
8180         * expmed.c (emit_store_flag): Do not emit setcc followed by a
8181         conditional move when trapping comparison was split to a
8182         non-trapping one (and vice versa).
8184 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8186         * config/s390/s390.c (s390_function_profiler): Generate nops
8187         instead of profiler call sequences.
8188         * config/s390/s390.opt: Add the new option.
8190 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8192         * config/s390/s390.c (s390_function_profiler): Generate
8193         __mcount_loc section.
8194         * config/s390/s390.opt: Add the new option.
8196 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8198         * common.opt: Add the new warning.
8199         * config/s390/s390.c (s390_function_profiler): Emit "brasl
8200         %r0,__fentry__" when -mfentry is specified.
8201         (s390_option_override_internal): Disallow -mfentry for 31-bit
8202         CPUs.
8203         * config/s390/s390.opt: Add the new option.
8205 2018-07-16  Richard Biener  <rguenther@suse.de>
8207         PR lto/86523
8208         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
8209         for function-local FUNCTION_DECL and RESULT_DECL immediately.
8211 2018-07-16  Martin Liska  <mliska@suse.cz>
8213         PR ipa/86529
8214         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
8215         to ::get_create.
8217 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
8219         * config/arc/arcHS.md: Update ARCHS scheduling rules.
8221 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
8223         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
8224         for ARCHS4x.
8225         * config/arc/arc-cpus.def (hs4x): New cpu.
8226         (hs4xd): Likewise.
8227         * config/arc/arc-tables.opt: Regenerate.
8228         * config/arc/arc.c (arc_sched_issue_rate): New function.
8229         (TARGET_SCHED_ISSUE_RATE): Define.
8230         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
8231         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
8232         fpu_cvt.
8233         (attr tune): Add ARCHS4x tune values.
8234         (attr tune_dspmpy): Define.
8235         (*tst): Correct instruction type.
8236         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
8237         * config/arc/arcHS4x.md: New file.
8238         * config/arc/fpu.md: Update instruction type attributes.
8239         * config/arc/t-multilib: Regenerate.
8241 2018-07-16  Tom de Vries  <tdevries@suse.de>
8243         PR debug/86455
8244         * var-tracking.c (vt_initialize): Fix pre_dec handling.
8246 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8248         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
8249         early clobber.
8251 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
8253         PR tree-optimization/86514
8254         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
8255         conversion to a boolean type from a type with greater precision.
8257 2018-07-16  Tom de Vries  <tdevries@suse.de>
8259         * var-tracking.c (vt_initialize): Print adjusted insn slim if
8260         dump_flags request TDF_SLIM.
8262 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
8264         * fold-const.c (int_const_binop_1): Abstract...
8265         (wide_int_binop): ...wide int code here.
8266         (poly_int_binop): ...poly int code here.
8267         Abstract the rest of int_const_binop_1 into int_const_binop.
8268         * fold-const.h (wide_int_binop): New.
8269         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
8270         Remove useless PLUS/MINUS_EXPR case.
8271         (zero_nonzero_bits_from_vr): Move wide int code...
8272         (zero_nonzero_bits_from_bounds): ...here.
8273         (extract_range_from_binary_expr_1): Move mask optimization code...
8274         (range_easy_mask_min_max): ...here.
8275         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
8276         (range_easy_mask_min_max): New.
8278 2018-07-15  Jeff Law  <law@redhat.com>
8280         PR target/85993
8281         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
8282         block.
8284 2018-07-14  Jim Wilson  <jimw@sifive.com>
8286         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
8288 2018-07-14  Paul Koning  <ni1d@arrl.net>
8290         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
8292 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
8294         * lto-streamer-out.c (copy_function_or_variable): Dump info about
8295         copying section.
8297 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
8298             Steve Munroe  <munroesj52@gmail.com>
8300         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
8301         (_mm_andnot_si128): Likewise.
8302         (_mm_or_si128): Likewise.
8303         (_mm_xor_si128): Likewise.
8305 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
8307         PR middle-end/78809
8308         * builtins.c (expand_builtin_memcmp): Inline the calls first
8309         when result_eq is false.
8310         (expand_builtin_strcmp): Inline the calls first.
8311         (expand_builtin_strncmp): Likewise.
8312         (inline_string_cmp): New routine. Expand a string compare
8313         call by using a sequence of char comparison.
8314         (inline_expand_builtin_string_cmp): New routine. Inline expansion
8315         a call to str(n)cmp/memcmp.
8316         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
8317         New option.
8318         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
8320 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
8322         * config/arm/driver-arm.c: Include arm-native.h.
8323         (host_detect_local_cpu): Use auto-generated data tables.
8324         (vendors, arm_cpu_table): Delete.  Move part information to ...
8325         * config/arm/arm-cpus.in: ... here.
8326         * config/arm/parsecpu.awk (gen_native): New function.
8327         (vendor, part): New CPU fields.
8328         (END): Add support for building the native CPU detection tables.
8329         * config/arm/t-arm (arm-native.h): Add build rule.
8330         (driver-arm.o): Add dependency on arm-native.h.
8332 2018-07-13  Richard Biener  <rguenther@suse.de>
8334         PR middle-end/85974
8335         * match.pd (addr1 - addr2): Allow either of the operand to
8336         have a conversion.
8338 2018-07-13  Tom de Vries  <tdevries@suse.de>
8340         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
8341         in remap_ssa_name.
8343 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
8345         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
8346         arrays instead of numbered variables.
8348 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
8350         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
8351         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
8353 2018-07-13  Richard Biener  <rguenther@suse.de>
8355         PR debug/86452
8356         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
8357         instead of get_context_die.
8359 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
8360             Richard Biener  <rguenther@suse.de>
8362         PR middle-end/86489
8363         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
8364         that the loop latch destination where phi is defined.
8366 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
8368         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
8369         (riscv_expand_epilogue): Add assertion to check interrupt mode.
8370         (riscv_set_current_function): Extract getting interrupt type to new
8371         function.
8372         (riscv_get_interrupt_type): New function.
8373         (riscv_merge_decl_attributes): New function, checking interrupt type is
8374         same.
8375         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
8377 2018-07-12  Paul Koning  <ni1d@arrl.net>
8379         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
8380         directive.
8382 2018-07-12  Paul Koning  <ni1d@arrl.net>
8384         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
8385         zero reference, add doloop_end instead.
8386         * doc/md.texi (decrement_and_branch_until_zero): Remove.
8387         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
8388         detail for doloop_end.
8390 2018-07-12  Martin Sebor  <msebor@redhat.com>
8392         PR c/86453
8393         * attribs.c (decl_attributes): Reject conflicting attributes before
8394         calling attribute handlers.
8396 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
8398         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
8399          parameter.
8400         (gcc::dump_manager::get_dump_file_name): likewise.
8401         (dump_begin): Likewise.
8402         * dumpfile.h (dump_begin): Update prototype.
8403         (gcc::dump_manager::get_dump_file_name,
8404         gcc::dump_manager::get_dump_file_name): Update prototype.
8406 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8408         * internal-fn.h (vectorizable_internal_fn_p): New function.
8409         * tree-vect-slp.c (compatible_calls_p): Likewise.
8410         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
8411         to internal functions.
8412         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
8414 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8416         * fold-const.h (inverse_conditions_p): Declare.
8417         * fold-const.c (inverse_conditions_p): New function.
8418         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
8419         that test the inverse condition of a conditional internal function.
8420         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
8421         * internal-fn.c (internal_fn_mask_index): Handle conditional
8422         internal functions.
8423         (vectorized_internal_fn_supported_p): New function.
8424         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
8425         (any_pred_load_store): Replace with...
8426         (need_to_predicate): ...this new variable.
8427         (redundant_ssa_names): New variable.
8428         (ifcvt_can_use_mask_load_store): Move initial checks to...
8429         (ifcvt_can_predicate): ...this new function.  Handle tree codes
8430         for which a conditional internal function exists.
8431         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
8432         instead of ifcvt_can_use_mask_load_store.  Update after variable
8433         name change.
8434         (predicate_load_or_store): New function, split out from
8435         predicate_mem_writes.
8436         (check_redundant_cond_expr): New function.
8437         (value_available_p): Likewise.
8438         (predicate_rhs_code): Likewise.
8439         (predicate_mem_writes): Rename to...
8440         (predicate_statements): ...this.  Use predicate_load_or_store
8441         and predicate_rhs_code.
8442         (combine_blocks, tree_if_conversion): Update after above name changes.
8443         (ifcvt_local_dce): Handle redundant_ssa_names.
8444         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
8445         general conditional functions.
8446         * tree-vect-stmts.c (vectorizable_call): Likewise.
8448 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8449             Alan Hayward  <alan.hayward@arm.com>
8450             David Sherwood  <david.sherwood@arm.com>
8452         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
8453         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
8454         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
8455         plus and minus and convert them into IFN_COND_FMA-based sequences.
8456         (convert_mult_to_fma): Handle conditional plus and minus.
8458 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8460         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
8461         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
8462         (cond_fnms_optab): New optabs.
8463         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
8464         internal functions.
8465         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
8466         * internal-fn.h (get_conditional_internal_fn): Declare.
8467         (get_unconditional_internal_fn): Likewise.
8468         * internal-fn.c (cond_ternary_direct): New macro.
8469         (expand_cond_ternary_optab_fn): Likewise.
8470         (direct_cond_ternary_optab_supported_p): Likewise.
8471         (FOR_EACH_COND_FN_PAIR): Likewise.
8472         (get_conditional_internal_fn): New function.
8473         (get_unconditional_internal_fn): Likewise.
8474         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
8475         (gimple_match_op::gimple_match_op): Add a new overload for 5
8476         operands.
8477         (gimple_match_op::set_op): Likewise.
8478         (gimple_resimplify5): Declare.
8479         * genmatch.c (decision_tree::gen): Generate simplifications for
8480         5 operands.
8481         * gimple-match-head.c (gimple_simplify): Define an overload for
8482         5 operands.  Handle calls with 5 arguments in the top-level overload.
8483         (convert_conditional_op): Handle conversions from unconditional
8484         internal functions to conditional ones.
8485         (gimple_resimplify5): New function.
8486         (build_call_internal): Pass a fifth operand.
8487         (maybe_push_res_to_seq): Likewise.
8488         (try_conditional_simplification): Try converting conditional
8489         internal functions to unconditional internal functions.
8490         Handle 3-operand unconditional forms.
8491         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
8492         Define ternary equivalents of the current rules for binary conditional
8493         internal functions.
8494         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
8495         ternary operations.
8496         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
8497         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
8498         (optab): Handle them.
8499         (SVE_COND_FP_TERNARY): New int iterator.
8500         (sve_fmla_op, sve_fmad_op): New int attributes.
8501         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
8502         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
8503         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
8505 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
8507         * target.def (preferred_else_value): New target hook.
8508         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
8509         * doc/tm.texi: Regenerate.
8510         * targhooks.h (default_preferred_else_value): Declare.
8511         * targhooks.c (default_preferred_else_value): New function.
8512         * internal-fn.h (conditional_internal_fn_code): Declare.
8513         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
8514         (get_conditional_internal_fn): Use it.
8515         (conditional_internal_fn_code): New function.
8516         * gimple-match.h (gimple_match_cond): New struct.
8517         (gimple_match_op): Add a cond member function.
8518         (gimple_match_op::gimple_match_op): Update all forms to take a
8519         gimple_match_cond.
8520         * genmatch.c (expr::gen_transform): Use the same condition as res_op
8521         for the suboperation, but don't specify a particular else_value.
8522         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
8523         (visit_nary_op, visit_reference_op_load): Pass
8524         gimple_match_cond::UNCOND to the gimple_match_op constructor.
8525         * gimple-match-head.c: Include tree-eh.h
8526         (convert_conditional_op): New function.
8527         (maybe_resimplify_conditional_op): Likewise.
8528         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
8529         (gimple_resimplify2): Likewise.
8530         (gimple_resimplify3): Likewise.
8531         (gimple_resimplify4): Likewise.
8532         (maybe_push_res_to_seq): Return null for conditional operations.
8533         (try_conditional_simplification): New function.
8534         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
8535         constructor.
8536         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
8537         IFN_COND_* call.
8538         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
8539         function.
8540         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
8542 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
8544         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8545         DECL_FCONTEXT
8546         (hash_tree): Do not hash DECL_FCONTEXT
8547         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
8548         Do not stream DECL_FCONTEXT.
8549         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
8550         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
8552 2018-07-12  Richard Biener  <rguenther@suse.de>
8554         PR debug/86462
8555         * dwarf2out.c (gen_block_die): Only output blocks when they have
8556         at least one !DECL_IGNORED_P variable.
8558 2018-07-12  Richard Biener  <rguenther@suse.de>
8560         PR target/84829
8561         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
8562         Remove -mieee-fp handling.
8564 2018-07-12  Richard Biener  <rguenther@suse.de>
8566         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
8567         left-over from last patch.
8569 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
8571         PR tree-optimization/86492
8572         * gimple-ssa-store-merging.c
8573         (imm_store_chain_info::coalesce_immediate_stores): Call
8574         check_no_overlap even for the merge_overlapping case.  Formatting fix.
8576 2018-07-12  Richard Biener  <rguenther@suse.de>
8578         PR middle-end/86479
8579         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
8580         move possibly trapping operations into the conditional.
8582 2018-07-12  Richard Biener  <rguenther@suse.de>
8584         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
8585         (vn_lookup_simplify_result): Remove recursion limit applied
8586         here.
8587         (vn_nary_build_or_lookup_1): Adjust.
8588         (try_to_simplify): Likewise.
8589         * gimple-match-head.c (gimple_resimplify1): Instead apply one
8590         here.
8591         (gimple_resimplify2): Likewise.
8592         (gimple_resimplify3): Likewise.
8593         (gimple_resimplify4): Likewise.
8595 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
8597         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
8598         Use __mmask64 type instead of __mmask8 for __M argument.
8599         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
8600         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
8601         __U argument.
8602         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
8603         __mmask16 for __M argument.
8604         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
8605         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
8606         to __mmask16 instead of __mmask8.
8607         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
8608         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
8609         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
8610         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
8611         instead of __mmask16 for __U argument.
8612         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
8613         __mmask16 instead of __mmask8 for __U argument.
8614         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
8615         __U argument.
8616         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
8617         __mmask16.
8618         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
8619         argument.
8620         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
8621         __U argument.
8622         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
8623         __mmask16.
8624         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
8625         of __mmask16.
8626         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
8627         __U argument.
8628         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
8629         __U argument.
8630         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
8631         __U argument.
8632         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
8633         __U argument.
8634         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
8635         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
8636         return type as well as __M argument type and all casts from __mmask8
8637         to __mmask32.
8638         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
8639         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
8640         return type as well as __M argument type and all casts from __mmask8
8641         to __mmask16.
8642         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
8643         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
8644         return type as well as __M argument type and all casts from __mmask8
8645         to __mmask32.
8646         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
8647         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
8648         return type as well as __M argument type and all casts from __mmask8
8649         to __mmask16.
8650         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
8651         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
8652         __mmask16.
8654 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
8656         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
8657         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
8658         for __U argument.
8660 2018-07-11  Paul Koning  <ni1d@arrl.net>
8662         * doc/md.texi (define_subst): Document how multiple occurrences of
8663         the same argument in the replacement pattern are handled.
8665 2018-07-11  Paul Koning  <ni1d@arrl.net>
8667         * doc/extend.texi (Common Variable Attributes): Move "mode" into
8668         alphabetical order.
8669         (Common Type Attributes): Add "mode" attribute.
8671 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
8673         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
8674         stream DECL_ORIGINAL_TYPE.
8675         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
8676         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
8677         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
8678         Do not walk original type.
8679         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
8680         external decls.
8681         (write_ts_decl_non_common_tree_pointers): Do not stream
8682         DECL_ORIGINAL_TYPE
8683         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
8684         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
8686 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
8688         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
8689         thread twice from the same starting edge.
8691 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
8693         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
8694         * gimple.c (gimple_call_nonnull_result_p): ...here...
8695         (gimple_call_nonnull_arg): ...and here.
8696         * gimple.h (gimple_call_nonnull_result_p): New.
8697         (gimple_call_nonnull_arg): New.
8699 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
8701         * config/arm/arm-cpus.in: Move information from fpu field of each
8702         cpu definition to the isa field.
8703         * config/arm/parsecpu.awk (fpu): Delete match rule.
8704         (gen_comm_data): Don't add bits from the CPU's FPU entry.
8706 2018-07-11  Richard Biener  <rguenther@suse.de>
8708         PR debug/86457
8709         * dwarf2out.c (init_sections_and_labels): Use
8710         output_asm_line_debug_info consistently.
8711         (dwarf2out_early_finish): Likewise.
8712         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
8713         type units.
8715 2018-07-11  Richard Biener  <rguenther@suse.de>
8717         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
8718         Rework father_bb setting in a way to avoid propagating constants
8719         multiple times on a loop body.
8721 2018-07-10  Mark Wielaard  <mark@klomp.org>
8723         PR debug/86459
8724         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
8726 2018-07-10  Richard Biener  <rguenther@suse.de>
8728         * hash-map.h (hash_map::iterator::operator*): Return
8729         references to key and value.
8731 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
8733         PR c++/86443
8734         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
8735         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
8736         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
8737         (gimplify_omp_for): For composite loops, move outer
8738         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
8739         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
8740         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
8741         TREE_LIST for both the original class iterator and the "last" helper
8742         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
8743         loop, remember has_decl_expr from outer composite loops for the
8744         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
8746 2018-07-09  Martin Sebor  <msebor@redhat.com>
8748         PR middle-end/77357
8749         PR middle-end/86428
8750         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
8751         accessing implicitly initialized array elements.
8752         * expr.c (string_constant): Handle string initializers of
8753         character arrays within aggregates.
8754         * gimple-fold.c (fold_array_ctor_reference): Add argument.
8755         Store element offset.  As a special case, handle zero size.
8756         (fold_nonarray_ctor_reference): Same.
8757         (fold_ctor_reference): Add argument.  Store subobject offset.
8758         * gimple-fold.h (fold_ctor_reference): Add argument.
8760 2018-07-09  Paul Koning  <ni1d@arrl.net>
8762         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
8763         (pdp11_insn_cost): New function.
8764         (pdp11_md_asm_adjust): New function.
8765         (TARGET_INVALID_WITHIN_DOLOOP): Define.
8766         (pdp11_rtx_costs): Update to match machine better.
8767         (output_addr_const_pdp11): Correct format mismatch warnings.
8768         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
8769         * config/pdp11/pdp11.md: General change to add base_cost and/or
8770         length attributes for use by new pdp11_insn_cost function.
8771         (MIN_BRANCH): Correct definition.
8772         (MIN_SOB): Ditto.
8773         (doloop_end): Use standard pattern name for looping pattern.
8774         (doloop_end_nocc): New.
8775         (movsf): Add another constraint alternative.
8776         (zero_extendqihi2): Add constraint alternatives for not in place
8777         extend.
8778         (zero_extendhisi2): Remove.
8779         (shift patterns): Add CC handling variants.
8780         (bswaphi2): New.
8781         (bswapsi2): New.
8782         (rothi3): New.
8783         (define_peephole2): New peephole to recognize mov that sets CC for
8784         subsequent test.
8786 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8788         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
8789         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
8790         wi::add.
8792 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
8794         PR c/86420
8795         * real.c (real_nextafter): Return true if result is denormal.
8797 2018-07-09  Martin Liska  <mliska@suse.cz>
8799         * common.opt: Add back wrongly removed attribute.
8801 2018-07-09  Richard Biener  <rguenther@suse.de>
8803         PR debug/86413
8804         * dwarf2out.c (gen_block_die): For an early generated DIE
8805         always output high/low PC attributes.
8807 2018-07-09  Tom de Vries  <tdevries@suse.de>
8809         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
8810         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
8811         onto VAR_DECL with abstract origin.
8813 2018-07-07  Jim Wilson  <jimw@sifive.com>
8815         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
8817 2018-07-07  Tom de Vries  <tdevries@suse.de>
8819         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
8821 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
8823         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
8824         overflow_type.
8825         (combine_bound): Use wide-int overflow calculation instead of
8826         rolling our own.
8827         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
8828         overflow_type.
8829         * fold-const.c (int_const_binop_2): Same.
8830         (extract_muldiv_1): Same.
8831         (fold_div_compare): Same.
8832         (fold_abs_const): Same.
8833         * match.pd: Same.
8834         * poly-int.h (add): Same.
8835         (sub): Same.
8836         (neg): Same.
8837         (mul): Same.
8838         * predict.c (predict_iv_comparison): Same.
8839         * profile-count.c (slow_safe_scale_64bit): Same.
8840         * simplify-rtx.c (simplify_const_binary_operation): Same.
8841         * tree-chrec.c (tree_fold_binomial): Same.
8842         * tree-data-ref.c (split_constant_offset_1): Same.
8843         * tree-if-conv.c (idx_within_array_bound): Same.
8844         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
8845         * tree-ssa-phiopt.c (minmax_replacement): Same.
8846         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
8847         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
8848         * vr-values.c (vr_values::adjust_range_with_scev): Same.
8849         * wide-int.cc (wi::add_large): Same.
8850         (wi::mul_internal): Same.
8851         (wi::sub_large): Same.
8852         (wi::divmod_internal): Same.
8853         * wide-int.h: Change overflow type to overflow_type for neg, add,
8854         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
8855         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
8856         mul_internal, divmod_internal.
8857         (overflow_type): New enum.
8858         (accumulate_overflow): New.
8860 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
8862         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
8863         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
8865 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
8867         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
8868         argument is checked for zero before entering loop, avoid checking again.
8870 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
8872         * gimplify.h (generic_expr_could_trap_p): Set as global function.
8873         * gimplify.h (generic_expr_could_trap_p): Likwise.
8874         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
8876 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
8878         PR tree-optimization/86401
8879         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
8880         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
8881         (fold_bit_and_mask): ... here.  New helper function for match.pd.
8882         * fold-const.h (fold_bit_and_mask): Declare.
8883         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
8885 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
8887         PR target/86324
8888         * target.def (translate_mode_attribute): New hook.
8889         * targhooks.h (default_translate_mode_attribute): Declare.
8890         * targhooks.c (default_translate_mode_attribute): New function.
8891         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
8892         * doc/tm.texi: Regenerate.
8893         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
8894         (rs6000_translate_mode_attribute): New function.
8896 2018-07-06  Paul Koning  <ni1d@arrl.net>
8898         * doc/md.texi (define_split): Document DONE and FAIL.
8899         (define_peephole2): Ditto.
8901 2018-07-05  Jeff Law  <law@redhat.com>
8903         PR tree-optimization/86010
8904         * tree-ssa-dse.c (compute_trims): More aggressively trim at
8905         both the head and tail of mem* and str* calls.
8907 2018-07-05  Jim Wilson  <jimw@sifive.com>
8909         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
8911 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
8913         * config/aarch64/aarch64-simd.md: correct flags text for
8914         MIN_EXPR replacement.
8916 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
8918         * configure: Regenerated.
8920 2018-07-05  Carl Love  <cel@us.ibm.com>
8922         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
8923         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
8924         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
8925         VSX_BUILTIN_DOUBLEL_V4SF.
8927 2018-07-05  Martin Sebor  <msebor@redhat.com>
8929         PR c++/86400
8930         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
8931         than its domain to compute its the upper bound of a char array.
8933 2018-07-05  Nathan Sidwell  <nathan@acm.org>
8935         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
8936         * doc/cpp.texi: Update comment.
8937         * doc/tm.texi: Rebuilt.
8938         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
8939         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
8940         * doc/extend.texi (Backwards Compatibility): Clarify it is system
8941         headers affected by extern "C".
8942         * system.h: Poison NO_IMPLICIT_EXTERN_C.
8943         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
8944         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
8945         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
8946         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
8947         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
8948         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
8949         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
8950         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
8951         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
8952         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
8953         config/sparc/sp64-elf.h, config/spu/spu.h,
8954         config/stormy16/stormy16.h, config/v850/v850.h,
8955         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
8956         define NO_IMPLICIT_EXTERN_C.
8957         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
8959 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
8961         PR target/84711
8962         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
8963         instead of GET_MODE_SIZE when comparing Units.
8965 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
8967         PR target/84711
8968         * rtlanal.c (set_noop_p): Constrain on mode change,
8969         include hard-reg-set.h
8971 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
8973         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
8975 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
8977         Revert
8978         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
8980         PR sanitizer/84250
8981         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
8982         libasan.
8983         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
8985 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
8987         PR sanitizer/84250
8988         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
8989         libasan.
8990         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
8992 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
8994         PR middle-end/86380
8995         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
8997 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
8999         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
9000         neg_*_op* variables.
9002 2018-07-04  Martin Liska  <mliska@suse.cz>
9004         * tree-switch-conversion.c: Define
9005         max_ratio_for_speed and max_ratio_for_size constants.
9007 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
9008             Martin Liska  <mliska@suse.cz>
9010         PR middle-end/66240
9011         PR target/45996
9012         PR c/84100
9013         * common.opt: Rename align options with 'str_' prefix.
9014         * common/config/i386/i386-common.c (set_malign_value): New
9015         function.
9016         (ix86_handle_option): Use it to set -falign-* options/
9017         * config/aarch64/aarch64-protos.h (struct tune_params): Change
9018         type from int to string.
9019         * config/aarch64/aarch64.c: Update default values from int
9020         to string.
9021         * config/alpha/alpha.c (alpha_override_options_after_change):
9022         Likewise.
9023         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
9024         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9025         max skip conditionally.
9026         * config/i386/freebsd.h (SUBALIGN_LOG): New.
9027         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9028         max skip conditionally.
9029         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9030         max skip conditionally.
9031         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
9032         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9033         max skip conditionally.
9034         * config/i386/i386.c (struct ptt): Change type from int to
9035         string.
9036         (ix86_default_align): Set default values.
9037         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
9038         max skip conditionally.
9039         * config/i386/iamcu.h (SUBALIGN_LOG): New.
9040         (ASM_OUTPUT_MAX_SKIP_ALIGN):
9041         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
9042         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9043         max skip conditionally.
9044         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
9045         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
9046         * config/i386/x86-64.h (SUBALIGN_LOG): New.
9047         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9048         max skip conditionally.
9049         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9050         * config/ia64/ia64.c (ia64_option_override): Set default values
9051         for alignment options.
9052         * config/m68k/m68k.c: Handle new str_align_* options.
9053         * config/mips/mips.c (mips_set_compression_mode): Change
9054         type of constants.
9055         (mips_option_override): Set default values for options.
9056         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
9057         Likewise.
9058         * config/rs6000/rs6000.c (rs6000_option_override_internal):
9059         Likewise.
9060         * config/rx/rx.c (rx_option_override): Likewise.
9061         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
9062         (LABEL_ALIGN): Use align_labels_log.
9063         (LOOP_ALIGN): Use align_loops_align.
9064         * config/s390/s390.c (s390_asm_output_function_label): Use new
9065         macros.
9066         * config/sh/sh.c (sh_override_options_after_change):
9067         Change type of constants.
9068         * config/spu/spu.c (spu_sched_init): Likewise.
9069         * config/sparc/sparc.c (sparc_option_override): Set default
9070         values for options.
9071         * config/visium/visium.c (visium_option_override): Likewise.
9072         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
9073         emit p2align format with last argument if it's not needed.
9074         * doc/invoke.texi: Document extended format of -falign-*.
9075         * final.c: Use align_labels alignment.
9076         * flags.h (struct target_flag_state): Change type to use
9077         align_flags.
9078         (struct align_flags_tuple): New.
9079         (struct align_flags): Likewise.
9080         (align_loops_log): Redefine macro to use new types.
9081         (align_loops_max_skip): Redefine macro to use new types.
9082         (align_jumps_log): Redefine macro to use new types.
9083         (align_jumps_max_skip): Redefine macro to use new types.
9084         (align_labels_log): Redefine macro to use new types.
9085         (align_labels_max_skip): Redefine macro to use new types.
9086         (align_functions_log): Redefine macro to use new types.
9087         (align_loops): Redefine macro to use new types.
9088         (align_jumps): Redefine macro to use new types.
9089         (align_labels): Redefine macro to use new types.
9090         (align_functions): Redefine macro to use new types.
9091         (align_functions_max_skip): Redefine macro to use new types.
9092         (align_loops_value): New macro.
9093         (align_jumps_value): New macro.
9094         (align_labels_value): New macro.
9095         (align_functions_value): New macro.
9096         * function.c (invoke_set_current_function_hook): Propagate
9097         alignment values from flags to global variables default in
9098         topleev.h.
9099         * ipa-icf.c (sem_function::equals_wpa): Use
9100         cl_optimization_option_eq instead of memcmp.
9101         * lto-streamer.h (cl_optimization_stream_out): Support streaming
9102         of string types.
9103         (cl_optimization_stream_in): Likewise.
9104         * optc-save-gen.awk: Support strings in cl_optimization.
9105         * opth-gen.awk: Likewise.
9106         * opts.c (finish_options): Remove error checking of invalid
9107         value ranges.
9108         (MAX_CODE_ALIGN): Remove.
9109         (MAX_CODE_ALIGN_VALUE): Likewise.
9110         (parse_and_check_align_values): New function.
9111         (check_alignment_argument): Likewise.
9112         (common_handle_option): Use check_alignment_argument.
9113         * opts.h (parse_and_check_align_values): Declare.
9114         * toplev.c (init_alignments): Remove.
9115         (read_log_maxskip): New.
9116         (parse_N_M): Likewise.
9117         (parse_alignment_opts): Likewise.
9118         (backend_init_target): Remove usage of init_alignments.
9119         * toplev.h (parse_alignment_opts): Declare.
9120         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
9121         argument.
9122         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
9123         * tree.c (cl_option_hasher::equal): New.
9124         * varasm.c: Use new global macros.
9126 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
9128         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
9129         Use a simpler align directive also if MAXSKIP = ALIGN-1.
9130         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9131         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9132         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9133         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9134         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
9135         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
9136         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
9137         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9138         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9139         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9140         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9142 2018-07-04  Martin Liska  <mliska@suse.cz>
9143             Jonathan Wakely  <jwakely@redhat.com>
9145         * coverage.c: Use correct type.
9146         * doc/invoke.texi: Language correction.
9148 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
9150         PR target/85620
9151         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
9152         ENDBRANCH for non-tail call which may return via indirect branch.
9153         * doc/extend.texi: Document indirect_return attribute.
9155 2018-07-03  Martin Sebor  <msebor@redhat.com>
9157         PR tree-optimization/86274
9158         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
9159         precondition.
9160         (format_floating): Correct handling of infinities and NaNs.
9162 2018-07-03  Martin Sebor  <msebor@redhat.com>
9164         * print-tree.c (print_real_cst): New function.
9165         (print_node_brief): Call it.
9166         (print_node): Ditto.
9168 2018-07-03  Jeff Law  <law@redhat.com>
9170         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
9171         into a single pattern.
9173         * config/h8300/h8300.md (ors code_iterator): New.
9174         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
9175         a single pattern and single splitter.
9176         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
9177         (iorqi3_1, xorqi3_1): Likewise.
9178         (iorqi3, xorqi3 expanders): Similarly.
9180         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
9181         (movmd_internal) into a single pattern using the P mode iterator.
9182         (movmd splitters): Similarly.
9183         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
9184         (movsd splitters): Similarly.
9186         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
9187         ADDB, ADDW and ADDL into a single ADD attribute which selects the
9188         right table based on the size of the operand.
9189         * config/h8300/h8300.md (length_table): Corresponding changes. All
9190         references to "addb", "addw" and "addl" changed to "add".
9191         (btst patterns): Merge two variants into a single pattern.
9192         (tstqi, tsthi): Likewise.
9193         (addhi3_incdec, addsi3_incdec): Likewise.
9194         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
9195         (mulhi3, mulsi3): Likewise.
9196         (udivhi3, udivsi3): Likewise.
9197         (divhi3, divsi3): Likewise.
9198         (andorqi3, andorhi3, andorsi3): Likewise.
9200 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
9202         PR target/85694
9203         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
9204         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
9206 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9208         PR tree-optimization/85694
9209         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
9210         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
9211         UNSPEC_URHADD.
9212         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
9213         (<u>avg<mode>3_ceil): New patterns.
9215 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
9217         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
9218         scan-tree-dump directive.
9219         * gcc.dg/vect/slp-perm-2.c: Likewise.
9220         * gcc.dg/vect/slp-perm-3.c: Likewise.
9221         * gcc.dg/vect/slp-perm-5.c: Likewise.
9222         * gcc.dg/vect/slp-perm-6.c: Likewise.
9223         * gcc.dg/vect/slp-perm-7.c: Likewise.
9224         * gcc.dg/vect/slp-perm-8.c: Likewise.
9226 2018-07-03  Marek Polacek  <polacek@redhat.com>
9228         PR middle-end/86202
9229         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
9231 2018-07-03  Richard Biener  <rguenther@suse.de>
9233         PR ipa/86389
9234         * tree-ssa-structalias.c (find_func_clobbers): Properly
9235         handle indirect calls.
9237 2018-07-03  Jeff Law  <law@redhat.com>
9239         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
9240         (shifts): New code iterator.
9241         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
9242         expander.  Fix HImode handling on H8/SX.
9243         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
9244         (subqi3, subhi3, subsi3 expanders): Likewise.
9245         (andqi3, andhi3, andsi3 expanders): Likewise.
9246         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
9247         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
9248         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
9249         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
9250         (zero_extendqihi2, zero_extendqisi2): Likewise.
9251         (extendqihi2, extendqisi2): Likewise.
9252         (rotlqi3, rotlhi3, rotlsi3): Likewise.
9253         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
9254         (rotlqi3_1, rotlhi3_1): Likewise.
9255         (logicalhi3_sn, logicalsi3_sn): Likewise.
9256         (logicalhi3, logicalsi3): Likewise.
9258 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9260         * tree-vect-patterns.c (vect_recog_rotate_pattern)
9261         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9262         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
9263         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
9264         type to append_pattern_def_seq instead of creating a stmt_vec_info
9265         directly.
9266         (build_mask_conversion): Likewise.  Remove vinfo argument.
9267         (vect_add_conversion_to_patterm): Likewise, renaming to...
9268         (vect_add_conversion_to_pattern): ...this.
9269         (vect_recog_mask_conversion_pattern): Update call to
9270         build_mask_conversion.  Pass the vector type to
9271         append_pattern_def_seq here too.
9272         (vect_recog_gather_scatter_pattern): Update call to
9273         vect_add_conversion_to_pattern.
9275 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9277         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
9278         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9279         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
9280         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
9281         STMT_VINFO_PATTERN_DEF_SEQ to null here.
9282         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
9283         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
9284         append_pattern_def_seq instead of new_pattern_def_seq.
9285         (vect_recog_divmod_pattern): Do both of the above.
9286         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
9287         is null.
9289 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9291         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
9292         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
9293         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
9294         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
9295         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
9296         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9297         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
9298         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9299         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9300         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
9301         parameter with a single stmt_vec_info.
9302         (vect_recog_func_ptr): Likewise.
9303         (vect_recog_gather_scatter_pattern): Likewise, folding in...
9304         (vect_try_gather_scatter_pattern): ...this.
9305         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
9306         the stmt_vec_info of the statement to be matched.  Don't clear
9307         STMT_VINFO_RELATED_STMT.
9308         (vect_pattern_recog): Update call accordingly.
9310 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9312         PR tree-optimization/85694
9313         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
9314         (uavgM3_ceil): Document new optabs.
9315         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
9316         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
9317         functions.
9318         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
9319         (savg_ceil_optab): New optabs.
9320         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
9321         (vect_vect_recog_func_ptrs): Add it.
9322         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
9323         constant directly from the associated lhs.
9325 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9327         * tree-vect-patterns.c (vect_split_statement): New function.
9328         (vect_convert_input): Use it to try to split an existing cast.
9330 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9332         * poly-int.h (print_hex): New function.
9333         * dumpfile.h (dump_dec, dump_hex): Declare.
9334         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
9335         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
9336         min_input_precision, operation_precision and operation_sign.
9337         * tree-vect-patterns.c (vect_get_range_info): New function.
9338         (vect_same_loop_or_bb_p, vect_single_imm_use)
9339         (vect_operation_fits_smaller_type): Delete.
9340         (vect_look_through_possible_promotion): Add an optional
9341         single_use_p parameter.
9342         (vect_recog_over_widening_pattern): Rewrite to use new
9343         stmt_vec_info infomration.  Handle one operation at a time.
9344         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
9345         (vect_truncatable_operation_p, vect_set_operation_type)
9346         (vect_set_min_input_precision): New functions.
9347         (vect_determine_min_output_precision_1): Likewise.
9348         (vect_determine_min_output_precision): Likewise.
9349         (vect_determine_precisions_from_range): Likewise.
9350         (vect_determine_precisions_from_users): Likewise.
9351         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
9352         (vect_vect_recog_func_ptrs): Put over_widening first.
9353         Add cast_forwprop.
9354         (vect_pattern_recog): Call vect_determine_precisions.
9356 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
9358         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
9359         statements that have been replaced by further pattern statements.
9360         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
9362 2018-07-03  Richard Biener  <rguenther@suse.de>
9364         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
9365         always set *dt.  Dump vectype in vectype overload.
9366         * dumpfile.h (dump_gimple_expr): New function.
9367         (dump_gimple_expr_loc): Likewise.
9368         * dumpfile.c (dump_gimple_expr): New function.
9369         (dump_gimple_expr_loc): Likewise.
9371 2018-07-02  Jeff Law  <law@redhat.com>
9373         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
9374         the H8/300, H8/300H and H8/S variants into a single pattern.
9375         (movhi_h8300, movqi_h8300hs): Similarly.
9376         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
9377         (QHI mode iterator): New.
9379         * config/h8300/h8300.md: Remove trailing whitespace.
9381 2018-07-02  Jim Wilson  <jimw@sifive.com>
9383         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
9384         instead of emit_insn for interrupt returns.
9385         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
9386         (riscv_sret, riscv_uret): Likewise.
9388 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
9390         * pretty-print.c (selftest::test_pp_format): Move save and restore
9391         of quotes to class auto_fix_quotes, and add an instance.
9392         * selftest.c: Include "intl.h".
9393         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
9394         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
9395         * selftest.h (selftest::auto_fix_quotes): New class.
9397 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
9399         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
9400         (aarch64_sve_prepare_conditional_op): Remove.
9401         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
9402         Allow aarch64_simd_reg_or_zero as select operand; remove
9403         the aarch64_sve_prepare_conditional_op call.
9404         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
9405         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9406         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
9407         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
9408         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
9409         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
9410         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
9411         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
9412         and a splitters to match all of the *_any patterns.
9413         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
9415         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
9416         (SVE_COND_FP_BINARY_REV): Remove.
9417         (sve_int_op_rev, sve_fp_op_rev): New.
9418         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
9419         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
9420         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
9421         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
9422         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
9423         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
9424         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
9425         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
9426         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
9428         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
9429         Remove match_dup 1 from the inner unspec.
9430         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9432         * config/aarch64/aarch64.md (movprfx): New attr.
9433         (length): Default movprfx to 8.
9434         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
9435         (*madd<SVE_I>, *msub<SVE_I): Likewise.
9436         (*<su>mul<SVE_I>3_highpart): Likewise.
9437         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
9438         (*v<ASHIFT><SVE_I>3): Likewise.
9439         (*<su><MAXMIN><SVE_I>3): Likewise.
9440         (*<su><MAXMIN><SVE_F>3): Likewise.
9441         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
9442         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
9443         (*div<SVE_F>4): Likewise.
9445 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
9447         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
9448         in dump string.
9450 2018-07-02  Richard Biener  <rguenther@suse.de>
9452         PR tree-optimization/86363
9453         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
9454         memset argument refers to a non-variable address.
9456 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
9458         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
9459         {PLUS,MINUS}_EXPR code to...
9460         (adjust_symbolic_bound): ...here,
9461         (combine_bound): ...here,
9462         (set_value_range_with_overflow): ...and here.
9464 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
9466         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
9467         code...
9468         (extract_range_from_abs_expr): ...here.
9470 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
9472         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
9473         -fno-omit-frame-pointer when not optimizing.
9475 2018-07-02  Martin Liska  <mliska@suse.cz>
9477         PR ipa/86279
9478         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
9479         (propagate_nothrow): Likewise.
9481 2018-07-02  Martin Liska  <mliska@suse.cz>
9483         PR ipa/86323
9484         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
9486 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
9488         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
9489         function in r262149, changing "loc" param from source_location to
9490         const dump_location_t &.
9491         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
9492         declaration, as above.
9494 2018-07-01  Paul Koning  <ni1d@arrl.net>
9496         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9497         -munit-asm, -mgnu-asm, -mdec-asm.
9498         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
9499         (pdp11_output_labelref): New.
9500         (pdp11_output_def): New.
9501         (pdp11_output_addr_vec_elt): New.
9502         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
9503         %# and %@ format codes.
9504         (pdp11_option_override): New.
9505         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
9506         (pdp11_output_ident): New.
9507         (pdp11_asm_named_section): New.
9508         (pdp11_asm_init_sections): New.
9509         (pdp11_file_start): New.
9510         (pdp11_file_end): New.
9511         (output_ascii): Use .ascii/.asciz for -mdec-asm.
9512         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
9513         %o, like %c but octal.
9514         (pdp11_option_override): New.
9515         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
9516         -mdec-asm.
9517         (DATA_SECTION_ASM_OP): Ditto.
9518         (READONLY_DATA_SECTION_ASM_OP): New.
9519         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
9520         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
9521         (ASM_OUTPUT_LABELREF): Ditto.
9522         (ASM_OUTPUT_DEF): Ditto.
9523         (ASM_OUTPUT_EXTERNAL): New.
9524         (ASM_OUTPUT_SOURCE_FILENAME): New.
9525         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
9526         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
9527         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
9528         %# and %@ format codes.
9529         * config/pdp11/pdp11.opt (mgnu-asm): New.
9530         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
9531         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
9532         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
9534 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
9536         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
9537         dereferencing path[] beyond its length.
9538         (debug_path): New.
9539         (debug_all_paths): New.
9540         (rewire_first_differing_edge): New.
9541         (adjust_paths_after_duplication): New.
9542         (duplicate_thread_path): Call adjust_paths_after_duplication.
9543         Add new argument.
9544         (thread_through_all_blocks): Add new argument to
9545         duplicate_thread_path.
9547 2018-06-30  Jim Wilson  <jimw@sifive.com>
9549         * config/riscv/predicates.md (p2m1_shift_operand): New.
9550         (high_mask_shift_operand): New.
9551         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
9552         pattern using p2m1_shift_operand.
9553         (lshsi3_zero_extend_3+2): New combiner pattern using
9554         high_mask_shift_operand.
9556 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9558         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
9559         split out from...
9560         (vect_recog_rotate_pattern): ...here.
9561         (vect_convert_input): Try to insert casts of invariants in the
9562         preheader.
9563         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
9564         preheader to be empty.
9566 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9568         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
9569         vector type.  If given, install it in the new statement's
9570         STMT_VINFO_VECTYPE.
9571         (vect_element_precision): New function.
9572         (vect_unpromoted_value): New struct.
9573         (vect_unpromoted_value::vect_unpromoted_value): New function.
9574         (vect_unpromoted_value::set_op): Likewise.
9575         (vect_look_through_possible_promotion): Likewise.
9576         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
9577         (vect_widened_op_tree, vect_convert_input): Likewise.
9578         (vect_convert_inputs, vect_convert_output): Likewise.
9579         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
9580         to handle the optional cast of the multiplication result and
9581         vect_widened_op_tree to detect the widened multiplication itself.
9582         Do not require the input and output of promotion casts to have
9583         the same sign, but base the signedness of the operation on the
9584         input rather than the result.  If the pattern includes two
9585         promotions, check that those promotions have the same sign.
9586         Do not restrict the MULT_EXPR handling to a double-width result;
9587         handle quadruple-width results and wider.  Use vect_convert_inputs
9588         to convert the inputs to the common type.
9589         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
9590         to handle the optional cast of the ABS result.  Also allow a sign
9591         change or a sign extension between the ABS and MINUS.
9592         Use vect_widened_op_tree to detect the widened subtraction and use
9593         vect_convert_inputs to convert the inputs to the common type.
9594         (vect_handle_widen_op_by_const): Delete.
9595         (vect_recog_widen_op_pattern): New function.
9596         (vect_recog_widen_mult_pattern): Use it.
9597         (vect_recog_widen_shift_pattern): Likewise.
9598         (vect_recog_widen_sum_pattern): Use
9599         vect_look_through_possible_promotion to handle the promoted
9600         PLUS_EXPR operand.
9602 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9604         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
9605         the containing gimple_seq *.
9606         * gimple-iterator.h (gsi_for_stmt): Declare it.
9607         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
9608         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
9609         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9610         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9611         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
9612         checks.
9613         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
9614         split out from...
9615         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
9616         statement being replaced is part of an existing pattern
9617         definition sequence, inserting the new pattern statements before
9618         the original one.
9619         (vect_pattern_recog_1): Don't return a bool.  If the statement
9620         is already part of a pattern, instead apply pattern matching
9621         to the pattern definition statements.  Don't clear the
9622         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
9623         (vect_pattern_recog): Don't break after the first match;
9624         continue processing the pattern definition statements instead.
9625         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
9627 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9629         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9630         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9631         (vect_recog_widen_sum_pattern): Use it.
9633 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9635         * tree-vect-loop.c (vectorizable_reduction): Assert that the
9636         phi is not a pattern statement and has not been replaced by
9637         a pattern statement.
9638         * tree-vect-patterns.c (type_conversion_p): Don't check
9639         STMT_VINFO_IN_PATTERN_P.
9640         (vect_recog_vector_vector_shift_pattern): Likewise.
9641         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
9642         the pattern statement rather than the original statement; check
9643         directly for a WIDEN_MULT_EXPR here.
9644         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
9645         vect_is_simple_use to return the pattern statement rather
9646         than the original statement; use is_pattern_stmt_p to check
9647         for such a pattern statement.
9648         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
9649         to return the pattern statement rather than the original statement;
9650         don't do the same transformation here.
9651         (vect_is_simple_use): If the defining statement has been replaced
9652         by a pattern statement, return the pattern statement instead.
9653         Remove the corresponding (local) transformation from the vectype
9654         overload.
9656 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
9658         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
9659         end and default to null.
9660         * tree-vect-loop.c (vect_create_epilog_for_reduction)
9661         (vectorizable_reduction): Update calls accordingly, dropping the
9662         gimple ** argument if the passed-back statement isn't needed.
9663         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
9664         (vect_recog_rotate_pattern): Likewise.
9665         (vect_recog_mask_conversion_pattern): Likewise.
9666         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9667         (vect_mask_constant_operand_p): Likewise.
9668         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
9669         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
9670         (get_group_load_store_type, get_load_store_type): Likewise.
9671         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
9672         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
9673         (vectorizable_conversion, vectorizable_assignment): Likewise.
9674         (vectorizable_shift, vectorizable_operation): Likewise.
9675         (vectorizable_store, vect_is_simple_cond): Likewise.
9676         (vectorizable_condition, vectorizable_comparison): Likewise.
9677         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
9678         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
9679         and move it to the end.  Cope with null def_stmt_outs.
9681 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9683         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
9685 2018-06-29  Jeff Law  <law@redhat.com>
9687         * config/v850/v850.c (v850_legitimate_address_p): Handle large
9688         displacements for TARGET_V850E2V3 and newer.
9689         (TARGET_LRA_P): Remove.  Defaults to LRA now.
9690         * config/v850/v850.md (sign23byte_load): Remove.
9691         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
9692         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
9694 2018-06-29  Martin Liska  <mliska@suse.cz>
9696         PR lto/85759
9697         * coverage.c (coverage_init): Mangle full path name.
9698         * doc/invoke.texi: Document the change.
9699         * gcov-io.c (mangle_path): New.
9700         * gcov-io.h (mangle_path): Likewise.
9701         * gcov.c (mangle_name): Use mangle_path for path mangling.
9703 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9705         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
9706         if starting source register is not even.
9708 2018-06-29  Martin Liska  <mliska@suse.cz>
9710         PR tree-optimization/86263
9711         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
9712         Make edge redirection.
9714 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
9716         * dumpfile.c (dump_loc): Add indentation based on scope depth.
9717         (dump_scope_depth): New variable.
9718         (get_dump_scope_depth): New function.
9719         (dump_begin_scope): New function.
9720         (dump_end_scope): New function.
9721         * dumpfile.h (get_dump_scope_depth): New declaration.
9722         (dump_begin_scope): New declaration.
9723         (dump_end_scope): New declaration.
9724         (class auto_dump_scope): New class.
9725         (AUTO_DUMP_SCOPE): New macro.
9726         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
9727         AUTO_DUMP_SCOPE.
9729 2018-06-29  Richard Biener  <rguenther@suse.de>
9731         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
9732         compute_all_dependences succeeds.
9733         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
9734         exceed --param loop-max-datarefs-for-datadeps.
9736 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
9738         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
9740 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
9742         PR target/86348
9743         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
9744         alternative 0 in preferred_for_speed attribute.
9746 2018-06-28  Paul Koning  <ni1d@arrl.net>
9748         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
9749         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
9750         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
9751         * config/pdp11/pdp11.md: Correct "length" attribute calculation
9752         for shift insn patterns.
9754 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
9756         * cgraph.c (cgraph_node::get_body): Replace assignments to
9757         "dump_file" with calls to set_dump_file.
9758         * dumpfile.c (alt_dump_file): Make static, and group with...
9759         (alt_flags): ...this definition.
9760         (dumps_are_enabled): New variable.
9761         (refresh_dumps_are_enabled): New function.
9762         (set_dump_file): New function.
9763         (set_alt_dump_file): New function.
9764         (gcc::dump_manager::dump_start): Replace assignments to
9765         "dump_file" and "alt_dump_file" with calls to set_dump_file and
9766         set_alt_dump_file.
9767         (gcc::dump_manager::dump_finish): Likewise.
9768         * dumpfile.h (alt_dump_file): Delete decl.
9769         (dumps_are_enabled): New variable decl.
9770         (set_dump_file): New function decl.
9771         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
9772         global.
9773         * tree-nested.c (lower_nested_functions): Replace assignments to
9774         "dump_file" with calls to set_dump_file.
9776 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
9778         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
9779         goto_locus of each outgoing edge of each basic block.
9781 2018-06-28  Richard Biener  <rguenther@suse.de>
9783         * dwarf2out.c (decl_scope_table): Remove.
9784         (push_decl_scope): Likewise.
9785         (pop_decl_scope): Likewise.
9786         (gen_type_die_for_member): Do not call push/pop_decl_scope.
9787         (gen_struct_or_union_type_die): Likewise.
9788         (gen_tagged_type_die): Likewise.
9789         (dwarf2out_init): Do not initialize decl_scope_table.
9790         (dwarf2out_c_finalize): Do not free it.
9792 2018-06-28  Richard Biener  <rguenther@suse.de>
9794         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
9795         deciding whether to not re-use a DIE.
9797 2018-06-28  Richard Biener  <rguenther@suse.de>
9799         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
9800         DW_AT_abstract_origin attribute.
9802 2018-06-28  Martin Liska  <mliska@suse.cz>
9804         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
9805         Use newly introduced constants.
9806         * tree-switch-conversion.h (struct jump_table_cluster):
9807         Define max_ratio_for_size and max_ratio_for_speed.
9809 2018-06-28  Martin Liska  <mliska@suse.cz>
9811         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9812         Add new checking assert to catch invalid state.
9813         (jump_table_cluster::can_be_handled): Handle single case
9814         clusters.
9815         (jump_table_cluster::is_beneficial): Bail out for such case.
9816         (bit_test_cluster::find_bit_tests):
9817         Add new checking assert to catch invalid state.
9818         (bit_test_cluster::can_be_handled): Handle single case
9819         clusters.
9820         (bit_test_cluster::is_beneficial): Bail out for such case.
9821         (switch_decision_tree::analyze_switch_statement):
9822         Fix comment.
9824 2018-06-28  Martin Liska  <mliska@suse.cz>
9826         * common.opt: Introduce -completion option.
9827         * gcc.c (driver_handle_option): Handle it.
9828         (driver::main): Print completions if completion
9829         is set.
9830         * opt-suggestions.c (option_proposer::get_completions):
9831         New function.
9832         (option_proposer::suggest_completion): Likewise.
9833         (option_proposer::find_param_completions): Likewise.
9834         (verify_autocompletions): Likewise.
9835         (test_completion_valid_options): Likewise.
9836         (test_completion_valid_params): Likewise.
9837         (in_completion_p): Likewise.
9838         (empty_completion_p): Likewise.
9839         (test_completion_partial_match): Likewise.
9840         (test_completion_garbage): Likewise.
9841         (opt_proposer_c_tests): Likewise.
9842         * opt-suggestions.h: Declare new functions.
9843         * opts.c (common_handle_option): Handle OPT__completion_.
9844         * selftest-run-tests.c (selftest::run_tests): Add
9845         opt_proposer_c_tests.
9846         * selftest.c (assert_str_startswith): New.
9847         * selftest.h (assert_str_startswith): Likewise.
9848         (opt_proposer_c_tests): New.
9849         (ASSERT_STR_STARTSWITH): Likewise.
9851 2018-06-28  Martin Liska  <mliska@suse.cz>
9853         * Makefile.in: Add opt-suggestions.o.
9854         * gcc-main.c: Include opt-suggestions.h.
9855         * gcc.c (driver::driver): Likewise.
9856         (driver::~driver): Remove m_option_suggestions.
9857         (driver::build_option_suggestions): Moved to option_proposer.
9858         (driver::suggest_option): Likewise.
9859         (driver::handle_unrecognized_options): Use option_proposer.
9860         * gcc.h (class driver): Add new memver m_option_proposer.
9861         * opt-suggestions.c: New file.
9862         * opt-suggestions.h: New file.
9864 2018-06-28  Martin Liska  <mliska@suse.cz>
9866         * vec.h (class auto_string_vec): New (moved from auto_argvec).
9867         (auto_string_vec::~auto_string_vec): Likewise.
9869 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
9871         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
9872         prevent_decl_creation_for_types fields up and add reset_location field.
9873         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
9874         statement if id->reset_location is true.
9875         (copy_edges_for_bb): Do not set goto_locus on the new edges if
9876         id->reset_location is true.
9877         (copy_phis_for_bb): Force input_location on the arguments if
9878         id->reset_location is true.
9879         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
9880         is set on the function to be inlined.
9882 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
9884         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
9886 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
9888         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
9889         registers for Pmode.
9890         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
9891         hard registers for the clobbered pseudo.
9893 2018-06-27  Paul Koning  <ni1d@arrl.net>
9895         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9896         mutually exclusive options.
9897         * config/pdp11/constraints.md (h): New constraint.
9898         (O): Update definition to match shift code generation.
9899         (D): New constraint.
9900         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
9901         (CCFP): Remove.
9902         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
9903         function.
9904         (output_jump): Change arguments.
9905         (pdp11_fixed_cc_regs): New function.
9906         (pdp11_cc_mode): Ditto.
9907         (pdp11_expand_shift): Ditto.
9908         (pdp11_assemble_shift): Ditto.
9909         (pdp11_small_shift): Ditto.
9910         (pdp11_branch_cost): Remove.
9911         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
9912         from output.
9913         (pdp11_register_move_cost): Update for CC registers.
9914         (pdp11_rtx_costs): Add case for LSHIFTRT.
9915         (pdp11_output_jump): Add CCNZ mode conditional branches.
9916         (notice_update_cc_on_set): Remove.
9917         (pdp11_cc_mode): New function.
9918         (simple_memory_operand): Correct pre/post decrement case.
9919         (no_side_effect_operand): New function.
9920         (pdp11_regno_reg_class): Add CC_REGS class.
9921         (pdp11_fixed_cc_regs): New function.
9922         (pdp11_small_shift): New function.
9923         (pdp11_expand_shift): New function to expand shift insns.
9924         (pdp11_assemble_shift): New function to output shifts.
9925         (pdp11_branch_cost): Remove.
9926         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
9927         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
9928         (WCHAR_TYPE): Ditto.
9929         (PTRDIFF_TYPE): Ditto.
9930         (ADJUST_INSN_LENGTH): New macro.
9931         (FIXED_REGISTERS): Add CC registers.
9932         (CALL_USED_REGISTERS): Ditto.
9933         (reg_class): Ditto.
9934         (REG_CLASS_NAMES): Ditto.
9935         (REG_CLASS_CONTENTS): Ditto.
9936         (SELECT_CC_MODE): Use new function.
9937         (TARGET_FLAGS_REGNUM): New macro.
9938         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
9939         (cc0_reg_rtx): Remove.
9940         (CC_STATUS_MDEP): Remove.
9941         (CC_STATUS_MDEFP_INIT): Remove.
9942         (CC_IN_FPU): Remove.
9943         (NOTICE_UPDATE_CC): Remove.
9944         (REGISTER_NAMES): Add CC registers.
9945         (BRANCH_COST): Change to constant 1.
9946         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
9947         handling.
9948         * config/pdp11/pdp11.opt (mbcopy): Remove.
9949         (mbcopy-builtin): Remove.
9950         (mbranch-cheap): Remove.
9951         (mbranch-expensive): Remove.
9952         * config/pdp11/predicates.md (expand_shift_operand): Update to
9953         match shift code generation.
9954         (ccnz_operator): New predicate.
9955         * doc/invoke.texi (PDP-11 Options): Remove deleted options
9956         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
9957         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
9958         exclusive options.
9959         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
9960         description of O constraint.
9962 2018-06-27  Jeff Law  <law@redhat.com>
9963             Austin Law  <austinklaw@gmail.com>
9965         * config/v850/v850.md (addsi3_set_flags): New pattern.
9966         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
9967         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
9968         (zero_extendhisi2_v850_set_flags): Likewise.
9969         (zero_extendqisi2_v850_set_flags): Likewise.
9970         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
9971         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
9972         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
9974         * config/v850/v850-protos.h (notice_update_cc): Remove.
9975         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
9976         (v850_print_operand): Handle 'D' and "d".
9977         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
9978         Add handling of arithmetic/logical operations compared against zero.
9979         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
9980         Do not look at v850_compare_op, instead get mode from last argument.
9981         (v850_gen_compare): Remove
9982         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
9983         after reload for prologue insns.
9984         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
9985         patterns.
9986         (construct_save_jarl): Likewise.
9987         (TARGET_FLAGS_REGNUM): Define.
9988         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
9989         (NOTICE_UPDATE_CC): Remove.
9990         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
9991         than cc0.  Conditionalize on reload_completed.
9992         (cmpsi_insn, setfcc_insn): Likewise.
9993         (tst1 splitter): Turn into define_and_split which sets the flags
9994         after reload.
9995         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
9996         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
9997         (cstoresf4, cstoredf4): Clobber the flags.
9998         (cmpsi, cmpsf, cmpdf): Remove expanders.
9999         (setf_insn): Remove pattern.
10000         (addsi3): Turn into define_and_split which clobbers the flags after
10001         reload and a suitable pattern (addsi3_clobber_flags) for use after
10002         reload.
10003         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
10004         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
10005         (ashrsi3, ashrsi3_v850e2): Likewise.
10006         (bins): Clobber the flags.
10007         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
10008         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
10009         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
10010         (call_value_internal_short, call_value_internal_long): Likewise.
10011         (callt_save_interrupt, callt_return_interrupt): Likewise.
10012         (save_interrupt, return_interrupt): Likewise.
10013         (callt_save_all_interrupt, save_all_interrupt): Likewise.
10014         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
10015         (restore_all_interrupt, _restore_all_interrupt): Likewise.
10016         (All FP comparisons): Only allow after reload has completed.
10017         (trfsr): Likewise.
10018         (divh, divhu): Tweak output template.
10019         (branch_z_normal, branch_z_invert): Remove
10020         (branch_nz_normal, branch_nz_invert): Likewise.
10021         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
10023         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
10024         * config/v850/v850.c (notice_update_cc): Remove.
10025         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
10026         (CC_NO_CARRY): Likewise.
10027         (NOTICE_UPDATE_CC): Define to nothing.
10028         * config/v850/v850.md: Remove block comment on cc0 handling
10029         Remove "cc" attribute from all patterns.  Remove cc_status handling
10030         from all patterns.  Minor formatting fixes.
10032 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10034         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
10035         (cortex-a76.cortex-a55): Likewise.
10036         * config/aarch64/aarch64-tune.md: Regenerate.
10037         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
10038         cortex-a76.cortex-a55.
10040 2018-06-27  Jeff Law  <law@redhat.com>
10042         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
10043         (MULTILIB_DIRNAMES): Similarly.
10045 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
10047         * gimple.h (gimple_return_retbnd): Delete.
10048         (gimple_return_set_retbnd): Likewise.
10049         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
10050         gimple_return_set_retbnd.
10051         * gimple-pretty-print.c (dump_gimple_return): Remove call to
10052         gimple_return_retbnd and adjust.
10053         * tree-inline.h (struct copy_body_data): Remove retbnd field.
10054         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
10055         Explicitly return NULL in a couple more cases.  Move assertion
10056         on debug statements and remove unreachable code.
10057         (reset_debug_binding): Do not test id->retbnd.
10058         (expand_call_inline): Do not set it.
10060 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
10062         * configure.ac: Add --disable-gcov option.
10063         * configure: Regenerate.
10064         * Makefile.in: Honour @enable_gcov@.
10065         * doc/install.texi: Document --disable-gcov.
10067 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10069         * config/arm/arm-cpus.in (cortex-a76): New entry.
10070         (cortex-a76.cortex-a55): Likewise.
10071         * config/arm/arm-tables.opt: Regenerate.
10072         * config/arm/arm-tune.md: Likewise.
10073         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
10074         * doc/invoke.texi (ARM Options): Document cortex-a76 and
10075         cortex-a76.cortex-a55.
10077 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
10079         PR target/85769
10080         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
10082 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
10084         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
10085         comment.
10086         (EPILOGUE_USES): Likewise.
10088 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
10090         * tree-inline.c (remap_location): New function extracted from...
10091         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
10092         (copy_phis_for_bb): ...here.  Call remap_location.
10093         (copy_cfg_body): Adjust call to copy_edges_for_bb.
10095 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
10097         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
10098         unaligned vsx for 16B memset.
10100 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
10102         PR target/86285
10103         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
10104         ieee128_float_type_node to long_double_type_node unless
10105         TARGET_LONG_DOUBLE_128 is set.
10107 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
10109         * cfgloop.c (get_loop_location): Convert return type from
10110         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
10111         by implicit construction from rtx_insn *, and using
10112         dump_user_location_t::from_function_decl for the fallback case.
10113         * cfgloop.h (get_loop_location): Convert return type from
10114         location_t to dump_user_location_t.
10115         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
10116         dump_printf_loc to pass in a dump_location_t rather than a
10117         location_t, via the gimple stmt.
10118         * coverage.c (get_coverage_counts): Update calls to
10119         dump_printf_loc to pass in dump_location_t rather than a
10120         location_t.
10121         * doc/optinfo.texi (Dump types): Convert example of
10122         dump_printf_loc from taking "locus" to taking "insn".  Update
10123         description of the "_loc" calls to cover dump_location_t.
10124         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
10125         "selftest.h".
10126         (dump_user_location_t::dump_user_location_t): New constructors,
10127         from gimple *stmt and rtx_insn *.
10128         (dump_user_location_t::from_function_decl): New function.
10129         (dump_loc): Make static.
10130         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
10131         const dump_location_t &.
10132         (dump_generic_expr_loc): Delete.
10133         (dump_printf_loc): Convert param "loc" from location_t to
10134         const dump_location_t &.
10135         (selftest::test_impl_location): New function.
10136         (selftest::dumpfile_c_tests): New function.
10137         * dumpfile.h: Include "profile-count.h".
10138         (class dump_user_location_t): New class.
10139         (struct dump_impl_location_t): New struct.
10140         (class dump_location_t): New class.
10141         (dump_printf_loc): Convert 2nd param from source_location to
10142         const dump_location_t &.
10143         (dump_generic_expr_loc): Delete.
10144         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
10145         const dump_location_t &.
10146         * gimple-fold.c (fold_gimple_assign): Update call to
10147         dump_printf_loc to pass in a dump_location_t rather than a
10148         location_t, via the gimple stmt.
10149         (gimple_fold_call): Likewise.
10150         * gimple-loop-interchange.cc
10151         (loop_cand::analyze_iloop_reduction_var): Update for change to
10152         check_reduction_path.
10153         (tree_loop_interchange::interchange): Update for change to
10154         find_loop_location.
10155         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
10156         change in return-type of find_loop_location.
10157         (graphite_regenerate_ast_isl): Likewise.
10158         * graphite-optimize-isl.c (optimize_isl): Likewise.
10159         * graphite.c (graphite_transform_loops): Likewise.
10160         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
10161         pass in a dump_location_t rather than a location_t, via the
10162         gimple stmt.
10163         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10164         * ipa.c (walk_polymorphic_call_targets): Likewise.
10165         * loop-unroll.c (report_unroll): Convert "locus" param from
10166         location_t to dump_location_t.
10167         (decide_unrolling): Update for change to get_loop_location's
10168         return type.
10169         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
10170         location_t to dump_user_location_t.
10171         (grid_find_single_omp_among_assignments_1): Updates calls to
10172         dump_printf_loc to pass in a dump_location_t rather than a
10173         location_t, via the gimple stmt.
10174         (grid_parallel_clauses_gridifiable): Convert "tloc" from
10175         location_t to dump_location_t.  Updates calls to dump_printf_loc
10176         to pass in a dump_location_t rather than a location_t, via the
10177         gimple stmt.
10178         (grid_inner_loop_gridifiable_p): Likewise.
10179         (grid_dist_follows_simple_pattern): Likewise.
10180         (grid_gfor_follows_tiling_pattern): Likewise.
10181         (grid_target_follows_gridifiable_pattern): Likewise.
10182         (grid_attempt_target_gridification): Convert initialization
10183         of local "grid" from memset to zero-initialization; FIXME: does
10184         this require C++11?  Update call to dump_printf_loc to pass in a
10185         optinfo_location rather than a location_t, via the gimple stmt.
10186         * profile.c (read_profile_edge_counts): Updates call to
10187         dump_printf_loc to pass in a dump_location_t rather than a
10188         location_t
10189         (compute_branch_probabilities): Likewise.
10190         * selftest-run-tests.c (selftest::run_tests): Call
10191         dumpfile_c_tests.
10192         * selftest.h (dumpfile_c_tests): New decl.
10193         * tree-loop-distribution.c (pass_loop_distribution::execute):
10194         Update for change in return type of find_loop_location.
10195         * tree-parloops.c (parallelize_loops): Likewise.
10196         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
10197         "locus" from location_t to dump_user_location_t.
10198         (canonicalize_loop_induction_variables): Likewise.
10199         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
10200         for change in return type of find_loop_location.
10201         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
10202         to dump_printf_loc to pass in a dump_location_t rather than a
10203         location_t, via the stmt.
10204         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
10205         Likewise.
10206         * tree-vect-loop-manip.c (find_loop_location): Convert return
10207         type from source_location to dump_user_location_t.
10208         (vect_do_peeling): Update for above change.
10209         (vect_loop_versioning): Update for change in type of
10210         vect_location.
10211         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
10212         from location_t to dump_user_location_t.
10213         (vect_estimate_min_profitable_iters): Update for change in type
10214         of vect_location.
10215         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
10216         location_t to dump_location_t.
10217         (vect_slp_bb): Update for change in type of vect_location.
10218         * tree-vectorizer.c (vect_location): Convert from source_location
10219         to dump_user_location_t.
10220         (try_vectorize_loop_1): Update for change in vect_location's type.
10221         (vectorize_loops): Likewise.
10222         (increase_alignment): Likewise.
10223         * tree-vectorizer.h (vect_location): Convert from source_location
10224         to dump_user_location_t.
10225         (find_loop_location): Convert return type from source_location to
10226         dump_user_location_t.
10227         (check_reduction_path): Convert 1st param from location_t to
10228         dump_user_location_t.
10229         * value-prof.c (check_counter): Update call to dump_printf_loc to
10230         pass in a dump_user_location_t rather than a location_t; update
10231         call to error_at for change in type of "locus".
10232         (check_ic_target): Update call to dump_printf_loc to
10233         pass in a dump_user_location_t rather than a location_t, via the
10234         call_stmt.
10236 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
10238         * config/s390/s390.h (enum processor_flags): Do not use
10239         default tune parameter when -march was specified.
10241 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
10243         PR target/86314
10244         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
10245         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
10246         operands.
10248 2018-06-26  Richard Biener  <rguenther@suse.de>
10250         PR tree-optimization/86287
10251         PR bootstrap/86316
10252         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
10253         (vect_analyze_loop): Initialize n_stmts.
10255 2018-06-26  Richard Biener  <rguenther@suse.de>
10257         PR middle-end/86271
10258         * fold-const.c (fold_convertible_p): Pointer extension
10259         isn't valid.
10261 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
10263         PR debug/86064
10264         * dwarf2out.c (loc_list_has_views): Adjust comments.
10265         (dw_loc_list): Split single cross-partition range with
10266         nonzero locview.
10268 2018-06-25  Jeff Law  <law@redhat.com>
10270         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
10271         on -mbig-switch by default.
10273         * config/v850/predicates.md (const_float_1_operand): Fix match_code
10274         test.
10275         (const_float_0_operand): Remove unused predicate.
10276         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
10277         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
10278         (recipsf2): New expander.  Original pattern now called
10279         (recipsf2_insn).
10280         (recipdf2, recipdf2_insn): Similarly.
10281         (rsqrtsf2, rsqrtsf2_insn): Similarly
10282         (rsqrtdf2, rsqrtdf2_insn): Similarly
10284 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
10286         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
10287         Simplify logic for FreeBSD (twice).
10289 2018-06-25  Martin Sebor  <msebor@redhat.com>
10291         PR tree-optimization/86204
10292         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
10293         a strnlen result if it's less than the length of the string.
10295 2018-06-25  Martin Sebor  <msebor@redhat.com>
10297         PR tree-optimization/85700
10298         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
10299         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
10300         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
10302 2018-06-25  Martin Sebor  <msebor@redhat.com>
10304         * doc/extend.texi (Zero-length arrays): Update and clarify.
10306 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
10308         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
10309         added IEEE/IBM long double multilib support on PowerPC little
10310         endian Linux systems.
10311         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
10312         (MULTILIB_DEFAULTS): Likewise.
10313         * config/rs6000/rs6000.c (rs6000_option_override_internal):
10314         Likewise.
10315         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
10316         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
10317         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
10319 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
10321         PR middle-end/86311
10322         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
10323         (REORDER_45): Likewise.
10325 2018-06-25  Jeff Law  <law@redhat.com>
10327         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
10328         dividend to 32 bits.  Adjust length.
10329         (udivmodhi4): Cleanup output template.  Fix length.
10331 2018-06-25  Carl Love  <cel@us.ibm.com>
10333         * config/rs6000/vsx.md: Change word selector to prefered location.
10335 2018-06-25  Richard Biener  <rguenther@suse.de>
10337         PR tree-optimization/86304
10338         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
10339         epilogue-if-converted loops as well.
10341 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
10343         * lto-section-out.c (lto_begin_section): Do not print section
10344         name for noaddr and unnumbered dumps.
10346 2018-06-25  Richard Biener  <rguenther@suse.de>
10348         * tree-vectorizer.h (struct vec_info_shared): New structure
10349         with parts split out from struct vec_info and loop_nest from
10350         struct _loop_vec_info.
10351         (struct vec_info): Adjust accordingly.
10352         (struct _loop_vec_info): Likewise.
10353         (LOOP_VINFO_LOOP_NEST): Adjust.
10354         (LOOP_VINFO_DATAREFS): Likewise.
10355         (LOOP_VINFO_DDRS): Likewise.
10356         (struct _bb_vec_info): Likewise.
10357         (BB_VINFO_DATAREFS): Likewise.
10358         (BB_VINFO_DDRS): Likewise.
10359         (struct _stmt_vec_info): Add dr_aux member.
10360         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
10361         (DR_MISALIGNMENT_UNINITIALIZED): New.
10362         (set_dr_misalignment): Adjust.
10363         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
10364         (vect_analyze_loop): Adjust prototype.
10365         (vect_analyze_loop_form): Likewise.
10366         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10367         Compute dependences lazily.
10368         (vect_record_base_alignments): Use shared datarefs/ddrs.
10369         (vect_verify_datarefs_alignment): Likewise.
10370         (vect_analyze_data_refs_alignment): Likewise.
10371         (vect_analyze_data_ref_accesses): Likewise.
10372         (vect_analyze_data_refs): Likewise.
10373         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
10374         constructor parameter for shared part.
10375         (vect_analyze_loop_form): Pass in shared part and adjust.
10376         (vect_analyze_loop_2): Pass in storage for the number of
10377         stmts.  Move loop nest finding to the caller.  Compute
10378         datarefs lazily.
10379         (vect_analyze_loop): Pass in shared part.
10380         (vect_transform_loop): Verify shared datarefs are unchanged.
10381         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
10382         constructor parameter for shared part.
10383         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
10384         (vect_slp_bb): Verify shared datarefs are unchanged before
10385         transform.
10386         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
10387         change.
10388         (new_stmt_vec_info): Initialize DR_AUX misalignment to
10389         DR_MISALIGNMENT_UNINITIALIZED.
10390         * tree-vectorizer.c (vec_info::vec_info): Add constructor
10391         parameter for shared part.
10392         (vec_info::~vec_info): Adjust.
10393         (vec_info_shared::vec_info_shared): New.
10394         (vec_info_shared::~vec_info_shared): Likewise.
10395         (vec_info_shared::save_datarefs): Likewise.
10396         (vec_info_shared::check_datarefs): Likewise.
10397         (try_vectorize_loop_1): Construct shared part live for analyses
10398         of a single loop for multiple vector sizes.
10399         * tree-parloops.c (gather_scalar_reductions): Adjust.
10401 2018-06-25  Richard Biener  <rguenther@suse.de>
10403         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
10404         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
10405         (vect_analyze_data_refs): Remove similar code from here and
10406         simplify accordingly.
10408 2018-06-25  Richard Biener  <rguenther@suse.de>
10410         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
10411         for reverse storage order accesses rather than asserting
10412         they cannot happen here.
10414 2018-06-25  Tom de Vries  <tdevries@suse.de>
10416         PR debug/86257
10417         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
10418         Use data16 instead of .byte for insn prefix.
10420 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
10422         PR C++/86082
10423         * parser.c (make_char_string_pack): Pass this literal chars
10424         through cpp_interpret_string.
10425         (cp_parser_userdef_numeric_literal): Check the result of
10426         make_char_string_pack.
10428 2018-06-24  Maya Rashish  <coypu@sdf.org>
10430         * ginclude/stddef.h: Simplify conditions around avoiding
10431         re-definition of __size_t.
10433 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
10435         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
10436         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
10438 2018-06-22  Maya Rashish  <coypu@sdf.org>
10440         * doc/invoke.texi (mno-fancy-math-387): Update for changes
10441         made to OpenBSD and NetBSD through the years.
10443 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10445         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10446         behavior of vec_pack (vector double, vector double) to match
10447         behavior of vec_float2 (vector double, vector double).
10449 2018-06-22  Olivier Hainque  <hainque@adacore.com>
10451         * gimplify.c (gimplify_function_tree): Prevent creation
10452         of a trampoline for the address of the current function
10453         passed to entry/exit instrumentation hooks.
10455 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
10457         PR target/86222
10458         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
10459         correctly.
10461 2018-06-22  Martin Liska  <mliska@suse.cz>
10463         PR tree-optimization/86263
10464         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10465         Bail out if is_enabled is false.
10466         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
10467         New declaration.
10468         (jump_table_cluster::is_enabled): New function.
10470 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
10472         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10473         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
10474         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
10475         (lto_input_ts_binfo_tree_pointers): Likewise.
10476         * tree-streamer-out.c (streamer_write_tree_bitfields,
10477         write_ts_binfo_tree_pointers): Likewise.
10478         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
10480 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
10482         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
10484 2018-06-22  Martin Liska  <mliska@suse.cz>
10486         * symbol-summary.h (get): Make it pure and inline move
10487         functionality from ::get function.
10488         (get): Remove and inline into ::get and ::get_create.
10489         (get_create): Move code from ::get function.
10491 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10493         PR target/85994
10494         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
10495         -x assembler-with-cpp.
10497 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10499         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
10500         _FILE_OFFSET_BITS=64 for C++.
10502 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
10504         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
10505         conversion insn that shows up when pr85657-3.c is compiled using
10506         IEEE 128-bit long double.
10507         (neg<mode>2_internal): Use the correct mode to check whether the
10508         mode is IBM extended.
10509         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
10510         multiply and divide external functions from being created more
10511         than once.
10513 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10515         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
10516         functions.
10517         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
10518         the edge can be forwarded.
10519         (cfg_layout_merge_blocks): Likewise.
10521 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10523         * except.c (finish_eh_generation): Commit edge insertions only after
10524         the EH edges have been redirected from post-landing to landing pads.
10526 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10528         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
10529         create_tmp_var_for to create the FRAME decl.
10530         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
10532 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
10534         * tree-inline.c (copy_edges_for_bb): Minor tweak.
10535         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
10536         debug statement when resetting its value.
10537         (expand_call_inline): Copy the locus of the call onto the assignment
10538         of the return value, if any.  Use local variable in more cases.
10540 2018-06-21  Martin Liska  <mliska@suse.cz>
10542         * ipa-pure-const.c (propagate_nothrow): Use
10543         funct_state_summaries->get.
10544         (dump_malloc_lattice): Likewise.
10545         (propagate_malloc): Likewise.
10547 2018-06-21  Richard Biener  <rguenther@suse.de>
10549         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
10550         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
10551         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
10552         comment.
10553         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
10554         BLOCK_ABSTRACT_ORIGIN unconditionally.
10556 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
10558         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
10559         deleting it.
10560         * ipa-reference.c (ipa_reference_c_finalize): Delete
10561         ipa_ref_opt_sum_summaries and set it to NULL.
10563 2018-06-21  Tom de Vries  <tdevries@suse.de>
10565         PR tree-optimization/85859
10566         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
10567         test with comment from bb_no_side_effects_p.
10569 2018-06-21  Richard Biener  <rguenther@suse.de>
10571         PR tree-optimization/86232
10572         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
10573         max for constant niter.
10575 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10577         * config/aarch64/aarch64-simd.md
10578         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
10580 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10582         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
10583         Make opernads of the unspec commutative.
10585 2018-06-21  Richard Biener  <rguenther@suse.de>
10587         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
10588         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
10589         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
10590         (vect_analyze_data_ref_dependence): Re-order checks to deal with
10591         NULL DR_STEP.
10592         (vect_record_base_alignments): Do not record base alignment
10593         for gathers or scatters.
10594         (vect_compute_data_ref_alignment): Drop return value that is always
10595         true.  Bail out early for gathers or scatters.
10596         (vect_enhance_data_refs_alignment): Bail out early for gathers
10597         or scatters.
10598         (vect_find_same_alignment_drs): Likewise.
10599         (vect_analyze_data_refs_alignment): Remove dead code.
10600         (vect_slp_analyze_and_verify_node_alignment): Likewise.
10601         (vect_analyze_data_refs): For possible gathers or scatters do
10602         not create an alternate DR, just check their possible validity
10603         and mark them.  Adjust DECL_NONALIASED handling to not rely
10604         on DR_BASE_ADDRESS.
10605         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
10606         update inits of gathers or scatters.
10607         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
10608         Also copy gather/scatter flag to pattern vinfo.
10610 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10612         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10613         behavior of vec_packsu (vector unsigned long long, vector unsigned
10614         long long) to match behavior of vec_packs with same signature.
10616 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
10617             Thomas Schwinge <thomas@codesourcery.com>
10618             Cesar Philippidis  <cesar@codesourcery.com>
10620         * gimplify.c (gimplify_scan_omp_clauses): Add support for
10621         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10622         (gimplify_adjust_omp_clauses): Likewise.
10623         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
10624         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
10625         (gimplify_omp_target_update): Update handling of acc update and
10626         enter/exit data.
10627         * omp-low.c (install_var_field): Remove unused parameter
10628         base_pointers_restrict.
10629         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
10630         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
10631         FINALIZE}
10632         (omp_target_base_pointers_restrict_p): Delete.
10633         (scan_omp_target): Update call to scan_sharing_clauses.
10634         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
10635         FINALIZE}.
10636         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
10637         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10638         (convert_local_omp_clauses): Likewise.
10639         * tree-pretty-print.c (dump_omp_clause): Likewise.
10640         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
10641         FINALIZE}.
10642         (omp_clause_code_name): Likewise.
10644 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
10646         PR debug/86194
10647         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
10648         be narrowed.
10650         PR tree-optimization/86231
10651         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
10652         anti-range don't overwrite *vr0min before using it to compute *vr0max.
10654 2018-06-20  Tom de Vries  <tdevries@suse.de>
10656         PR tree-optimization/86097
10657         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
10658         iv type if signedness of iv type is not the same as that of *nit.
10660 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
10662         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
10663         EDGE_EH edges, verify they are all EDGE_EH.
10665 2018-06-20  Maya Rashish  <coypu@sdf.org>
10667         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
10669 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10671         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
10672         * config/aarch64/aarch64.c (xgene1_tunings): Add
10673         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
10674         (aarch64_mode_valid_for_sched_fusion_p):
10675         Allow 16-byte modes.
10676         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
10677         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
10678         128-bit modes.
10679         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
10680         New pattern.
10681         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
10682         * config/aarch64/iterators.md (VQ2): New mode iterator.
10684 2018-06-20  Martin Liska  <mliska@suse.cz>
10686         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10687         Change default ratio from 10 to 8.
10689 2018-06-20  Martin Liska  <mliska@suse.cz>
10691         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10692         New.
10693         (bit_test_cluster::find_bit_tests): Likewise.
10694         (switch_decision_tree::analyze_switch_statement): Find clusters.
10695         * tree-switch-conversion.h (struct jump_table_cluster): Document
10696         hierarchy.
10698 2018-06-20  Martin Liska  <mliska@suse.cz>
10700         * tree-switch-conversion.c (switch_conversion::collect):
10701         Record m_uniq property.
10702         (switch_conversion::expand): Bail out for special conditions.
10703         (group_cluster::~group_cluster): New.
10704         (group_cluster::group_cluster): Likewise.
10705         (group_cluster::dump): Likewise.
10706         (jump_table_cluster::emit): New.
10707         (switch_decision_tree::fix_phi_operands_for_edges): New.
10708         (struct case_node): Remove struct.
10709         (jump_table_cluster::can_be_handled): New.
10710         (case_values_threshold): Moved to header.
10711         (reset_out_edges_aux): Likewise.
10712         (jump_table_cluster::is_beneficial): New.
10713         (bit_test_cluster::can_be_handled): Likewise.
10714         (add_case_node): Remove.
10715         (bit_test_cluster::is_beneficial): New.
10716         (case_bit_test::cmp): New.
10717         (bit_test_cluster::emit): New.
10718         (expand_switch_as_decision_tree_p): Remove.
10719         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
10720         (fix_phi_operands_for_edge): Likewise.
10721         (switch_decision_tree::analyze_switch_statement): New.
10722         (compute_cases_per_edge): Move ...
10723         (switch_decision_tree::compute_cases_per_edge): ... here.
10724         (try_switch_expansion): Likewise.
10725         (switch_decision_tree::try_switch_expansion): Likewise.
10726         (record_phi_operand_mapping): Likewise.
10727         (switch_decision_tree::record_phi_operand_mapping): Likewise.
10728         (emit_case_decision_tree): Likewise.
10729         (switch_decision_tree::emit): Likewise.
10730         (balance_case_nodes): Likewise.
10731         (switch_decision_tree::balance_case_nodes): Likewise.
10732         (dump_case_nodes): Likewise.
10733         (switch_decision_tree::dump_case_nodes): Likewise.
10734         (emit_jump): Likewise.
10735         (switch_decision_tree::emit_jump): Likewise.
10736         (emit_cmp_and_jump_insns): Likewise.
10737         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
10738         (emit_case_nodes): Likewise.
10739         (switch_decision_tree::emit_case_nodes): Likewise.
10740         (conditional_probability): Remove.
10741         * tree-switch-conversion.h (enum cluster_type): New.
10742         (PRINT_CASE): New.
10743         (struct cluster): Likewise.
10744         (cluster::cluster): Likewise.
10745         (struct simple_cluster): Likewise.
10746         (simple_cluster::simple_cluster): Likewise.
10747         (struct group_cluster): Likewise.
10748         (struct jump_table_cluster): Likewise.
10749         (struct bit_test_cluster): Likewise.
10750         (struct min_cluster_item): Likewise.
10751         (struct case_tree_node): Likewise.
10752         (case_tree_node::case_tree_node): Likewise.
10753         (jump_table_cluster::case_values_threshold): Likewise.
10754         (struct case_bit_test): Likewise.
10755         (struct switch_decision_tree): Likewise.
10756         (struct switch_conversion): Likewise.
10757         (switch_decision_tree::reset_out_edges_aux): Likewise.
10759 2018-06-20  Martin Liska  <mliska@suse.cz>
10761         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
10762         (hoist_edge_and_branch_if_true): Likewise.
10763         (expand_switch_using_bit_tests_p): Likewise.
10764         (struct case_bit_test): Likewise.
10765         (case_bit_test_cmp): Likewise.
10766         (emit_case_bit_tests): Likewise.
10767         (switch_conversion::switch_conversion): New class.
10768         (struct switch_conv_info): Remove old struct.
10769         (collect_switch_conv_info): More to ...
10770         (switch_conversion::collect): ... this.
10771         (check_range): Likewise.
10772         (switch_conversion::check_range): Likewise.
10773         (check_all_empty_except_final): Likewise.
10774         (switch_conversion::check_all_empty_except_final): Likewise.
10775         (check_final_bb): Likewise.
10776         (switch_conversion::check_final_bb): Likewise.
10777         (create_temp_arrays): Likewise.
10778         (switch_conversion::create_temp_arrays): Likewise.
10779         (free_temp_arrays): Likewise.
10780         (gather_default_values): Likewise.
10781         (switch_conversion::gather_default_values): Likewise.
10782         (build_constructors): Likewise.
10783         (switch_conversion::build_constructors): Likewise.
10784         (constructor_contains_same_values_p): Likewise.
10785         (switch_conversion::contains_same_values_p): Likewise.
10786         (array_value_type): Likewise.
10787         (switch_conversion::array_value_type): Likewise.
10788         (build_one_array): Likewise.
10789         (switch_conversion::build_one_array): Likewise.
10790         (build_arrays): Likewise.
10791         (switch_conversion::build_arrays): Likewise.
10792         (gen_def_assigns): Likewise.
10793         (switch_conversion::gen_def_assigns): Likewise.
10794         (prune_bbs): Likewise.
10795         (switch_conversion::prune_bbs): Likewise.
10796         (fix_phi_nodes): Likewise.
10797         (switch_conversion::fix_phi_nodes): Likewise.
10798         (gen_inbound_check): Likewise.
10799         (switch_conversion::gen_inbound_check): Likewise.
10800         (process_switch): Use the newly created class.
10801         (switch_conversion::expand): New.
10802         (switch_conversion::~switch_conversion): New.
10803         * tree-switch-conversion.h: New file.
10805 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10807         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
10808         tree-vect-patterns.c.
10809         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
10810         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
10811         (vect_recog_sad_pattern): Likewise.
10812         (vect_recog_widen_sum_pattern): Likewise.
10813         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
10814         (vect_recog_widen_shift_pattern): Remove the type_in argument.
10815         (vect_recog_rotate_pattern): Likewise.
10816         (vect_recog_mult_pattern): Likewise.
10817         (vect_recog_vector_vector_shift_pattern): Likewise.
10818         (vect_recog_divmod_pattern): Likewise.
10819         (vect_recog_mixed_size_cond_pattern): Likewise.
10820         (vect_recog_bool_pattern): Likewise.
10821         (vect_recog_mask_conversion_pattern): Likewise.
10822         (vect_try_gather_scatter_pattern): Likewise.
10823         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
10824         (vect_recog_over_widening_pattern): Likewise.
10825         (vect_recog_gather_scatter_pattern): Likewise.
10826         (vect_recog_func_ptr): Move from tree-vectorizer.h
10827         (vect_vect_recog_func_ptrs): Move further down the file.
10828         (vect_recog_func): Likewise.  Remove the third argument.
10829         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
10830         (vect_pattern_recog_1): Expect the pattern function to do any
10831         necessary target tests.  Also expect it to provide a vector type.
10832         Remove the type_in handling.
10834 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10836         * tree-vect-patterns.c (vect_pattern_detected): New function.
10837         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
10838         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
10839         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
10840         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
10841         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10842         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10843         (vect_recog_mask_conversion_pattern)
10844         (vect_try_gather_scatter_pattern): Likewise.
10846 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10848         * tree-vect-patterns.c (vect_get_internal_def): New function.
10849         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10850         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
10851         (search_type_for_mask_1): Use it.
10853 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10855         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10856         redundant WIDEN_SUM_EXPR handling.
10857         (vect_recog_sad_pattern): Likewise.
10859 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10861         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10862         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
10863         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
10864         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
10865         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
10867 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10869         * tree-vect-stmts.c (vectorizable_call): Make sure that we
10870         use the stmt_vec_info of the original bb statement for the
10871         new zero assignment, even if the call is part of a pattern.
10873 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10875         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
10876         that the sequence is attached to the original statement rather
10877         than the pattern statement.
10878         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
10879         PATTERN_DEF_SEQ from the original statement rather than
10880         the main pattern statement.
10881         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
10882         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
10883         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
10885 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10887         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
10888         definition statements before the early exit for statements that aren't
10889         live or relevant.
10890         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
10891         split out from...
10892         (vect_transform_loop): ...here.  Process pattern definition
10893         statements without first checking whether the main pattern
10894         statement is live or relevant.
10896 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
10898         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
10899         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
10901 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
10903         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
10904         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
10905         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
10906         (expand_block_compare): Change select_block_compare_mode call.
10907         (expand_strncmp_align_check): Use new functions, fix comment.
10908         (emit_final_str_compare_gpr): New function.
10909         (expand_strn_compare): Refactor and clean up code.
10910         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
10912 2018-06-19  Tony Reix  <tony.reix@atos.com>
10913             Damien Bergamini  <damien.bergamini@atos.com>
10914             David Edelsohn  <dje.gcc@gmail.com>
10916         * collect2.c (static_obj): New variable.
10917         (static_libs): New variable.
10918         (is_in_list): Uncomment declaration.
10919         (main): Track AIX libraries linked statically.
10920         (is_in_list): Uncomment definition.
10921         (scan_prog_file): Don't add AIX shared libraries initializer
10922         to constructor list if linking statically.
10924 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
10926         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
10927         constant.
10928         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
10930 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
10932         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
10933         blocks.
10935 2018-06-19  Martin Liska  <mliska@suse.cz>
10937         * config/i386/i386.c (ix86_can_inline_p): Do not use
10938         ipa_fn_summaries::get_create.
10939         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
10940         get.
10941         (devirtualization_time_bonus): Likewise.
10942         (ipcp_propagate_stage): Likewise.
10943         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10944         (edge_set_predicate): Likewise.
10945         (evaluate_conditions_for_known_args): Likewise.
10946         (evaluate_properties_for_edge): Likewise.
10947         (ipa_call_summary::reset): Tranform to ...
10948         (ipa_call_summary::~ipa_call_summary): ... this.
10949         (ipa_fn_summary::reset): Transform to ...
10950         (ipa_fn_summary::~ipa_fn_summary): ... this.
10951         (ipa_fn_summary_t::remove): Rename to ...
10952         (ipa_fn_summary_t::remove_callees): ... this.
10953         (ipa_fn_summary_t::duplicate): Use placement new
10954         instead of memory copy.
10955         (ipa_call_summary_t::duplicate): Likewise.
10956         (ipa_call_summary_t::remove): Remove.
10957         (dump_ipa_call_summary): Change get_create to get.
10958         (ipa_dump_fn_summary): Dump only when summary exists.
10959         (analyze_function_body): Use symbol_summary::get instead
10960         of get_create.
10961         (compute_fn_summary): Likewise.
10962         (estimate_edge_devirt_benefit): Likewise.
10963         (estimate_edge_size_and_time): Likewise.
10964         (inline_update_callee_summaries): Likewise.
10965         (remap_edge_change_prob): Likewise.
10966         (remap_edge_summaries): Likewise.
10967         (ipa_merge_fn_summary_after_inlining): Likewise.
10968         (write_ipa_call_summary): Likewise.
10969         (ipa_fn_summary_write): Likewise.
10970         (ipa_free_fn_summary): Likewise.
10971         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
10972         (struct ipa_call_summary): Likewise.
10973         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
10974         of get_create.
10975         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
10976         (estimate_size_after_inlining): Likewise.
10977         (estimate_growth): Likewise.
10978         (growth_likely_positive): Likewise.
10979         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10980         (inline_call): Likewise.
10981         * ipa-inline.c (caller_growth_limits): Likewise.
10982         (can_inline_edge_p): Likewise.
10983         (can_inline_edge_by_limits_p): Likewise.
10984         (compute_uninlined_call_time): Likewise.
10985         (compute_inlined_call_time): Likewise.
10986         (want_inline_small_function_p): Likewise.
10987         (edge_badness): Likewise.
10988         (update_caller_keys): Likewise.
10989         (update_callee_keys): Likewise.
10990         (inline_small_functions): Likewise.
10991         (inline_to_all_callers_1): Likewise.
10992         (dump_overall_stats): Likewise.
10993         (early_inline_small_functions): Likewise.
10994         (early_inliner): Likewise.
10995         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
10996         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10997         * ipa-pure-const.c (malloc_candidate_p): Likewise.
10998         * ipa-split.c (execute_split_functions): Likewise.
10999         * symbol-summary.h: Likewise.
11000         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
11002 2018-06-19  Richard Biener  <rguenther@suse.de>
11004         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
11005         (vectorize_loops): ... here.  Fix dbgcnt handling.
11006         (try_vectorize_loop): Wrap try_vectorize_loop_1.
11008 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
11010         PR target/86197
11011         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
11012         ieee128 argument takes up only one (vector) register, not two (floating
11013         point) registers.
11015 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
11017         * gimplify.c (gimplify_init_constructor): Really never clear for an
11018         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
11020 2018-06-19  Richard Biener  <rguenther@suse.de>
11022         PR tree-optimization/86179
11023         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
11024         after failed recognition.
11026 2018-06-18  Martin Sebor  <msebor@redhat.com>
11028         PR middle-end/85602
11029         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
11030         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
11031         Handle integer subtraction.
11032         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
11033         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
11035 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
11037         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
11038         param from rtx to rtx_insn *.
11039         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
11040         param.
11041         (frv_ifcvt_modify_insn): Likwise.
11042         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
11043         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
11044         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
11045         as_a <rtx_insn *> cast to local "unprotected_region" once
11046         it's been established that it's not NULL or pc_rtx.
11047         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
11048         param "sethi" from rtx to rtx_insn *.
11049         (nds32_group_float_insns): Likewise for param "insn".
11050         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
11051         param.
11052         (vax_output_int_subtract): Likewise.
11053         * config/vax/vax.c (vax_output_int_add): Likewise for param
11054         "insn".
11055         (vax_output_int_subtract): Likewise.
11056         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
11057         (emit_pattern_after): Likewise for param "after".
11058         (emit_insn_after): Likewise.
11059         (emit_jump_insn_after): Likewise.
11060         (emit_call_insn_after): Likewise.
11061         (emit_debug_insn_after): Likewise.
11062         (emit_pattern_before): Likewise for param "before".
11063         (emit_insn_before): Likewise.
11064         (emit_jump_insn_before): Likewise.
11065         * final.c (get_insn_template): Likewise for param "insn", removing
11066         a cast.
11067         * output.h (get_insn_template): Likewise for 2nd param.
11068         * rtl.h (emit_insn_before): Likewise.
11069         (emit_jump_insn_before): Likewise.
11070         (emit_debug_insn_before_noloc): Likewise.
11071         (emit_insn_after): Likewise.
11072         (emit_jump_insn_after): Likewise.
11073         (emit_call_insn_after): Likewise.
11074         (emit_debug_insn_after): Likewise.
11075         (set_insn_deleted): Likewise for param.
11077 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
11079         PR target/85358
11080         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
11081         floating point modes, so that IFmode is numerically greater than
11082         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
11083         to declare the ordering.  This prevents IFmode from being
11084         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
11085         machine.  Include rs6000-modes.h to share the fractional values
11086         between genmodes* and the rest of the compiler.
11087         (IFmode): Likewise.
11088         (KFmode): Likewise.
11089         (TFmode): Likewise.
11090         * config/rs6000/rs6000-modes.h: New file.
11091         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
11092         meaning of rs6000_long_double_size so that 126..128 selects an
11093         appropriate 128-bit floating point type.
11094         (rs6000_option_override_internal): Likewise.
11095         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
11096         (TARGET_LONG_DOUBLE_128): Change the meaning of
11097         rs6000_long_double_size so that 126..128 selects an appropriate
11098         128-bit floating point type.
11099         (LONG_DOUBLE_TYPE_SIZE): Update comment.
11100         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
11101         source and destination to match the standard usage.
11102         (truncifkf2): Likewise.
11103         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
11104         ISA 2.07 to use an explicit clobber, instead of passing in a
11105         temporary.
11106         (copysign<mode>3_soft): Likewise.
11108 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
11110         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11111         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
11112         (vect_slp_analyze_instance_dependence): Likewise.
11113         (vect_enhance_data_refs_alignment): Likewise.
11114         (vect_analyze_data_refs_alignment): Likewise.
11115         (vect_slp_analyze_and_verify_instance_alignment
11116         (vect_analyze_data_ref_accesses): Likewise.
11117         (vect_prune_runtime_alias_test_list): Likewise.
11118         (vect_analyze_data_refs): Likewise.
11119         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
11120         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11121         (vect_analyze_scalar_cycles_1): Likewise.
11122         (vect_get_loop_niters): Likewise.
11123         (vect_analyze_loop_form_1): Likewise.
11124         (vect_update_vf_for_slp): Likewise.
11125         (vect_analyze_loop_operations): Likewise.
11126         (vect_analyze_loop): Likewise.
11127         (vectorizable_induction): Likewise.
11128         (vect_transform_loop): Likewise.
11129         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
11130         * tree-vect-slp.c (vect_analyze_slp): Likewise.
11131         (vect_make_slp_decision): Likewise.
11132         (vect_detect_hybrid_slp): Likewise.
11133         (vect_slp_analyze_operations): Likewise.
11134         (vect_slp_bb): Likewise.
11135         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
11136         (vectorizable_bswap): Likewise.
11137         (vectorizable_call): Likewise.
11138         (vectorizable_simd_clone_call): Likewise.
11139         (vectorizable_conversion): Likewise.
11140         (vectorizable_assignment): Likewise.
11141         (vectorizable_shift): Likewise.
11142         (vectorizable_operation): Likewise.
11143         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
11145 2018-06-18  Martin Sebor  <msebor@redhat.com>
11147         PR tree-optimization/81384
11148         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
11149         * builtins.c (expand_builtin_strnlen): New function.
11150         (expand_builtin): Call it.
11151         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
11152         * builtins.def (BUILT_IN_STRNLEN): New.
11153         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
11154         Warn for bounds in excess of maximum object size.
11155         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
11156         single-value ranges.  Handle strnlen.
11157         (handle_builtin_strlen): Handle strnlen.
11158         (strlen_check_and_optimize_stmt): Same.
11159         * doc/extend.texi (Other Builtins): Document strnlen.
11161 2018-06-18  Maya Rashish  <coypu@sdf.org>
11163         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
11164         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
11165         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
11167         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
11168         here to ...
11169         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
11171 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11173         * tree.c (escaped_string::escape): Replace cast to char * by
11174         const_cast<char *> (unescaped).
11176 2018-06-18  Nick Clifton  <nickc@redhat.com>
11178         PR 84195
11179         * tree.c (escaped_string): New class.  Converts an unescaped
11180         string into its escaped equivalent.
11181         (warn_deprecated_use): Use the new class to convert the
11182         deprecation message, if present.
11183         (test_escaped_strings): New self test.
11184         (test_c_tests): Add test_escaped_strings.
11185         * doc/extend.texi (deprecated): Add a note that the
11186         deprecation message is affected by the -fmessage-length
11187         option, and that control characters will be escaped.
11188         (#pragma GCC error): Document this pragma.
11189         (#pragma GCC warning): Likewise.
11190         * doc/invoke.texi (-fmessage-length): Document this option's
11191         effect on the #warning and #error preprocessor directives and
11192         the deprecated attribute.
11194 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11196         * tree.c (decl_value_expr_lookup): Revert latest change.
11197         (decl_value_expr_insert): Likewise.
11199 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
11201         * gimplify.c (nonlocal_vlas): Delete.
11202         (nonlocal_vla_vars): Likewise.
11203         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
11204         referenced VLAs.
11205         (gimplify_body): Do not create and destroy nonlocal_vlas.
11206         * tree-nested.c: Include diagnostic.h.
11207         (use_pointer_in_frame): Tweak.
11208         (lookup_field_for_decl): Add assertion and declare the transformation.
11209         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
11210         internal error when the reference is in a wrong context.  Do not
11211         create a debug decl by default.
11212         (note_nonlocal_block_vlas): Delete.
11213         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
11214         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
11215         create a debug decl by default.
11216         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
11217         call is in a wrong context.
11218         (fixup_vla_decls): New function.
11219         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
11220         debug variables were created.
11221         * tree.c (decl_value_expr_lookup): Add checking assertion.
11222         (decl_value_expr_insert): Likewise.
11224 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
11226         PR middle-end/82479
11227         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
11228         * tree-scalar-evolution.c (interpret_expr): Likewise.
11229         (expression_expensive_p): Likewise.
11230         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
11231         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
11232         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
11233         (ssa_defined_by_minus_one_stmt_p): New.
11235 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
11237         PR middle-end/64946
11238         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
11239         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
11240         * dojump.c (do_jump): Likewise.
11241         * expr.c (expand_expr_real_2): Check operand type's sign.
11242         * fold-const.c (const_unop): Handle ABSU_EXPR.
11243         (fold_abs_const): Likewise.
11244         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
11245         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
11246         (strip_sign_op_1): Likesise.
11247         * match.pd: Add new pattern to generate ABSU_EXPR.
11248         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
11249         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11250         * tree-eh.c (operation_could_trap_helper_p): Likewise.
11251         * tree-inline.c (estimate_operator_cost): Likewise.
11252         * tree-pretty-print.c (dump_generic_node): Likewise.
11253         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
11254         * tree.def (ABSU_EXPR): New.
11256 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
11258         PR middle-end/86095
11259         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
11260         documented as preserved for backward compatibility only.
11261         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
11263         PR rtl-optimization/86108
11264         * bb-reorder.c (create_forwarder_block): Renamed to ...
11265         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
11266         jump from new landing pad to the second part.
11267         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
11268         Adjust callers.
11270 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
11272         PR middle-end/85878
11273         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
11274         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
11275         Only call store_expr for halves if the mode is the same.
11277         PR middle-end/86123
11278         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
11279         Fix up comment formatting.
11281 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11283         * typed-splay-tree.h (typed_splay_tree::remove): New function.
11284         (typed_splay_tree::closure,
11285         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
11286         (typed_splay_tree::typed_splay_tree,
11287         typed_splay_tree::operator =): Declared private.
11288         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
11289         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
11290         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
11291         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
11292         typed_splay_tree::splay_tree_splay,
11293         typed_splay_tree::splay_tree_foreach_helper,
11294         typed_splay_tree::splay_tree_insert,
11295         typed_splay_tree::splay_tree_remove,
11296         typed_splay_tree::splay_tree_lookup,
11297         typed_splay_tree::splay_tree_predecessor,
11298         typed_splay_tree::splay_tree_successor,
11299         typed_splay_tree::splay_tree_min,
11300         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
11301         (typed_splay_tree::root, typed_splay_tree::comp,
11302         typed_splay_tree::delete_key,
11303         typed_splay_tree::delete_value): New data members.
11304         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
11305         typed_splay_tree::remove.
11307 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
11309         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
11310         -mginv and -mno-ginv to the assembler.
11311         * config/mips/mips.opt (-mcrc): New option.
11312         (-mginv): Likewise.
11313         * doc/invoke.text (-mcrc): Document.
11314         (-mginv): Likewise.
11316 2018-06-15  Nick Clifton  <nickc@redhat.com>
11318         PR 84195
11319         * tree.c (escaped_string): New class.  Converts an unescaped
11320         string into its escaped equivalent.
11321         (warn_deprecated_use): Use the new class to convert the
11322         deprecation message, if present.
11323         (test_escaped_strings): New self test.
11324         (test_c_tests): Add test_escaped_strings.
11325         * doc/extend.texi (deprecated): Add a note that the
11326         deprecation message is affected by the -fmessage-length
11327         option, and that control characters will be escaped.
11328         (#pragma GCC error): Document this pragma.
11329         (#pragma GCC warning): Likewise.
11330         * doc/invoke.texi (-fmessage-length): Document this option's
11331         effect on the #warning and #error preprocessor directives and
11332         the deprecated attribute.
11334 2018-06-15  Richard Biener  <rguenther@suse.de>
11336         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
11337         here, also noting vector size used.
11338         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
11339         size used in MSG_OPTIMIZED_LOCATIONS dump.
11340         (pass_slp_vectorize::execute): Adjust.
11342 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
11344         PR target/85968
11345         * config/arc/arc.c (arc_return_address_register): Fix
11346         if-condition.
11348 2018-06-15  Richard Biener  <rguenther@suse.de>
11350         PR middle-end/86159
11351         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
11352         leave useless conversion stripping to force_gimple_operand_gsi.
11353         (gimplify_build2): Likewise.
11354         (gimplify_build1): Likewise.
11356 2018-06-15  Richard Biener  <rguenther@suse.de>
11358         PR middle-end/86076
11359         * tree-cfg.c (move_stmt_op): unshare invariant addresses
11360         before adjusting their block.
11362 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11364         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
11365         multilibs for *-*-rtems*.
11366         * config/riscv/t-rtems: New file.
11368 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
11370         PR middle-end/86122
11371         * match.pd ((A +- CST1) +- CST2): Punt if last resort
11372         unsigned_type_for returns NULL.
11374         PR target/85945
11375         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
11376         subregs of multi-word pseudos unless the float mode has word size.
11378 2018-06-14  Richard Biener  <rguenther@suse.de>
11380         PR middle-end/86139
11381         * tree-vect-generic.c (build_word_mode_vector_type): Remove
11382         duplicate and harmful type_hash_canon.
11383         * tree.c (type_hash_canon): Assert we didn't find ourselves.
11385 2018-06-14  Richard Biener  <rguenther@suse.de>
11387         PR ipa/86124
11388         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
11389         NULL cgraph_node.
11391 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11393         * config/rtems.h (STDINT_LONG32): Define.
11395 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
11396             Prachi Godbole  <prachi.godbole@imgtec.com>
11398         * config/mips/mips-cpus.def: Define P6600.
11399         * config/mips/mips-tables.opt: Regenerate.
11400         * config/mips/mips.c (mips_ucbranch_type): New enum.
11401         (mips_rtx_cost_data): Add support for P6600.
11402         (mips_issue_rate): Likewise.
11403         (mips_multipass_dfa_lookahead): Likewise.
11404         (mips_avoid_hazard): Likewise.
11405         (mips_reorg_process_insns): Likewise.
11406         (mips_classify_branch_p6600): New function.
11407         * config/mips/mips.h (TUNE_P6600): New define.
11408         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
11409         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
11410         * config/mips/mips.md: Include p6600.md.
11411         (processor): Add p6600.
11412         * config/mips/p6600.md: New file.
11413         * doc/invoke.texi: Add p6600 to supported architectures.
11415 2018-06-13  Martin Sebor  <msebor@redhat.com>
11417         PR tree-optimization/86114
11418         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
11419         of integer types.
11420         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
11422 2018-06-13  Richard Biener  <rguenther@suse.de>
11424         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
11425         Properly set vector type of the intermediate stmt.
11426         * tree-vect-stmts.c (vectorizable_operation): The destination
11427         var always has vectype_out type.
11429 2018-06-13  Jeff Law  <law@redhat.com>
11431         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
11432         integer 0 for argument to print_rtl_with_bb.
11433         (rl78_reorg): Likewise.
11435 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
11437         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
11438         from rtx to rtx_insn *.
11439         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
11440         "label".
11441         (add_sched_insns_for_speculation): Likewise for local "target",
11442         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11443         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
11444         from rtx_insn ** to rtx_code_label **.
11445         (reorg_emit_nops): Likewise.
11446         (c6x_reorg): Likewise for local "call_labels".
11447         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
11448         rtx to rtx_insn *.
11449         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
11450         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
11451         the loops over LABEL_REFS.
11452         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
11453         braf_label.
11454         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11455         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
11456         (split_branches): Strengthen local "olabel" from rtx to
11457         rtx_insn *, adding a safe_as_a cast.
11458         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
11459         to "rtx_insn *".
11460         (add_insn_after): Likewise for first two params.
11461         (add_insn_before): Likewise.
11462         (remove_insn): Likewise for param.
11463         (emit_pattern_before_noloc): Likewise for second and third params.
11464         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
11465         (emit_call_insn_before_noloc): Likewise.
11466         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
11467         to "rtx_insn *".
11468         (emit_barrier_before): Likewise.
11469         (emit_label_before): Strengthen "label" param from "rtx" to
11470         "rtx_code_label *".  Strengthen "before" param from "rtx" to
11471         "rtx_insn *".
11472         (emit_insn_after_1): Strengthen "after" param from "rtx" to
11473         "rtx_insn *".
11474         (emit_pattern_after_noloc): Likewise.
11475         (emit_insn_after_noloc): Likewise.
11476         (emit_jump_insn_after_noloc): Likewise.
11477         (emit_call_insn_after_noloc): Likewise.
11478         (emit_debug_insn_after_noloc): Likewise.
11479         (emit_barrier_after): Likewise.
11480         (emit_label_after): Likewise for both params.
11481         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
11482         "loc" param from "int" to "location_t".
11483         (emit_insn_after_setloc): Likewise.
11484         (emit_jump_insn_after_setloc): Likewise.
11485         (emit_call_insn_after_setloc): Likewise.
11486         (emit_debug_insn_after_setloc): Likewise.
11487         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
11488         "loc" param from "int" to "location_t".
11489         (emit_pattern_before): Convert NULL_RTX to NULL.
11490         (emit_insn_before_setloc): Convert "loc" param from "int" to
11491         "location_t".
11492         (emit_jump_insn_before_setloc): Likewise.
11493         (emit_call_insn_before_setloc): Likewise.
11494         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
11495         rtx_insn *.  Convert "loc" param from "int" to "location_t".
11496         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
11497         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
11498         Convert 3rd param from "int" to "location_t".
11499         (emit_barrier_before, emit_barrier_after, next_real_insn):
11500         Strengthen param from rtx to rtx_insn *.
11501         (emit_label_before): Strengthen 1st param from "rtx" to
11502         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
11503         "rtx_insn *".
11504         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
11505         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
11506         Strengthen 2nd param from "rtx" to "rtx_insn *".
11507         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
11508         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
11509         Likewise. Convert 3rd param from "int" to "location_t".
11510         (emit_label_after): Strengthen 1st param from "rtx" to
11511         "rtx_code_label *".
11512         (next_real_insn, remove_insn): Strengthen param from "rtx" to
11513         "rtx_insn *".
11514         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
11515         from "rtx" to "rtx_insn *".
11517 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
11519         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
11520         bodies streamed in with -Q.
11521         * dumpfile.c (dump_files): Add lto-stream-out dump file.
11522         * dumpfile.h (tree_dump_index): Add lto_stream_out.
11523         * gimple-streamer-out.c: Include gimple-pretty-print.h
11524         (output_bb): Dump stmts streamed.
11525         * lto-section-out.c: Include print-tree.h
11526         (lto_begin_section): Dump sections created.
11527         (lto_output_decl_index): Dump decl encoded.
11528         * lto-streamer-out.c: Include print-tree.h
11529         (create_output_block): Dump output block created.
11530         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
11531         (output_function): Dump function output.
11532         (output_constructor): Dump constructor streamed.
11533         (write_global_stream): Output indexes encoded.
11534         (produce_asm_for_decls): Dump streams encoded.
11535         * lto-streamer.c (streamer_dump_file): New global var.
11536         * lto-streamer.h (streamer_dump_file): Declare.
11537         * passes.c (ipa_write_summaries): Initialize streamer dump.
11538         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
11539         in.
11541 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
11543         PR target/86048
11544         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
11545         offsets for register save directives.  Emit a second batch of save
11546         directives, if need be, when the function accesses prior frames.
11548 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11550         * config/arc/fpu.md (fmasf4): Force operand to register.
11551         (fnmasf4): Likewise.
11553 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11555         * config/arc/arc-protos.h (arc_pad_return): Remove.
11556         * config/arc/arc.c (machine_function): Remove force_short_suffix
11557         and size_reason.
11558         (arc_print_operand): Adjust printing of '&'.
11559         (arc_verify_short): Remove conditional printing of short suffix.
11560         (arc_final_prescan_insn): Remove reference to size_reason.
11561         (pad_return): New function.
11562         (arc_reorg): Call pad_return.
11563         (arc_pad_return): Remove.
11564         (arc_init_machine_status): Remove reference to force_short_suffix.
11565         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
11566         (attr length): When attribute iscompact is true force to 2
11567         regardless; in the case of maybe check if we want to force the
11568         instruction to have 4 bytes length.
11569         (nopv): Change it to generate 4 byte long nop as well.
11570         (blockage): New pattern.
11571         (simple_return): Remove call to arc_pad_return.
11572         (p_return_i): Likewise.
11574 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11576         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
11578 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11580         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
11581         ARC cores.
11583 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11585         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
11586         for ARC700 and ARCv2.
11588 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
11590         PR target/86076
11591         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
11592         operands[2] instead of operands[1].
11595 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
11597         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
11598         case, check whether the outer register overlaps an unallocatable
11599         register, not just whether it fits the required class.
11601 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
11603         * poly-int.h (can_div_trunc_p): Add new overload in which all values
11604         are poly_ints.
11605         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
11606         (memrefs_conflict_p): Likewise.
11607         (init_alias_analysis): Likewise.
11608         * cfgexpand.c (expand_debug_expr): Likewise.
11609         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
11610         * cse.c (fold_rtx): Likewise.
11611         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
11612         * expr.c (emit_block_move_hints): Likewise.
11613         (clear_storage_hints, push_block, emit_push_insn): Likewise.
11614         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
11615         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
11616         (emit_group_store): Likewise.
11617         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
11618         to read the PRE/POST_MODIFY increment.
11619         * calls.c (store_one_arg): Use strip_offset.
11620         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
11621         poly_int_rtx_p.
11622         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
11623         by a VEC_SELECT.
11624         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
11625         (simplify_binary_operation_1): Extend CONST_INT handling to
11626         poly_int_rtx_p.
11627         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
11628         than a HOST_WIDE_INT.
11629         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
11630         poly_int64.
11631         (adjust_mems, add_stores): Update accodingly.
11632         (vt_canonicalize_addr): Track polynomial offsets.
11633         (emit_note_insn_var_location): Likewise.
11634         (vt_add_function_parameter): Likewise.
11635         (vt_initialize): Likewise.
11637 2018-06-12  Jeff Law  <law@redhat.com>
11639         * config.gcc (alpha*-*-freebsd*): Remove.
11640         * config/alpha/freebsd.h: Remove.
11642 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
11644         PR other/69968
11645         * spellcheck-tree.c (levenshtein_distance): Rename to...
11646         (get_edit_distance): ...this, and update for underlying renaming.
11647         * spellcheck-tree.h (levenshtein_distance): Rename to...
11648         (get_edit_distance): ...this.
11649         * spellcheck.c (levenshtein_distance): Rename to...
11650         (get_edit_distance): ...this.  Convert from Levenshtein distance
11651         to Damerau-Levenshtein distance by supporting transpositions of
11652         adjacent characters.  Rename "v1" to "v_next" and "v0" to
11653         "v_one_ago".
11654         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
11655         (selftest::test_edit_distance_unit_test_oneway): ...this, and
11656         update for underlying renaming.
11657         (selftest::levenshtein_distance_unit_test): Rename to...
11658         (selftest::test_get_edit_distance_unit): ...this, and update for
11659         underlying renaming.
11660         (selftest::test_find_closest_string): Add example from PR 69968
11661         where transposition helps
11662         (selftest::test_metric_conditions): Update for renaming.
11663         (selftest::test_metric_conditions): Likewise.
11664         (selftest::spellcheck_c_tests): Likewise.
11665         * spellcheck.h (levenshtein_distance): Rename both overloads to...
11666         (get_edit_distance): ...this.
11667         (best_match::consider): Update for renaming.
11669 2018-06-12  Martin Sebor  <msebor@redhat.com>
11671         PR tree-optimization/85259
11672         * builtins.c (compute_objsize): Handle constant offsets.
11673         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
11674         true iff a warning has been issued.
11675         * gimple.h (gimple_nonartificial_location): New function.
11676         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
11677         gimple_nonartificial_location and handle -Wno-system-headers.
11678         (handle_builtin_stxncpy): Same.
11680 2018-06-12  Martin Sebor  <msebor@redhat.com>
11682         PR c/85931
11683         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
11685 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
11687         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
11688         BUILTIN_VEC_XST entries for pointer to double and long long.
11690 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
11692         PR target/85990
11693         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11694         Update comments.
11695         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11696         Likewise.
11698 2018-06-12  Martin Liska  <mliska@suse.cz>
11700         * doc/options.texi: Document IntegerRange.
11702 2018-06-12  Martin Liska  <mliska@suse.cz>
11704         * config/i386/i386.opt: Make MPX-related options as Deprecated.
11705         * opt-functions.awk: Handle Deprecated flag.
11706         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
11707         and report error.
11708         (read_cmdline_option): Report warning for a deprecated option.
11709         * opts.h (struct cl_option): Add new field cl_deprecated.
11710         (CL_ERR_DEPRECATED): New.
11712 2018-06-12  Martin Liska  <mliska@suse.cz>
11714         * doc/options.texi: Document Deprecated option flag.
11716 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11718         * config/arc/arc-arch.h (arc_extras): New enum.
11719         (arc_cpu_t):Add field extra.
11720         (arc_cpu_types): Consider the extras.
11721         * config/arc/arc-cpus.def: Add extras info.
11722         * config/arc/arc-opts.h (processor_type): Consider extra field.
11723         * config/arc/arc.c (arc_override_options): Handle extra field.
11725 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
11727         * config/arc/arc-arch.h: Update ARC_OPTX macro.
11728         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
11729         field.
11730         * config/arc/arc.c (arc_init): Update pic warning.
11731         (irq_range): Update irq range parsing warnings.
11732         (arc_override_options): Update various warning messages.
11733         (arc_handle_aux_attribute): Likewise.
11735 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
11737         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
11739 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11741         * doc/sourcebuild.texi: Document usage of line number 0 in verify
11742         compiler messages directives.
11744 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
11746         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
11747         * config/mips/mips-tables.opt: Regenerate.
11748         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
11749         mips64r6.
11750         * doc/invoke.texi: Document -march=i6500.
11752 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
11754         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
11755         (i6400_gpmul): Add cpu_unit.
11756         (i6400_gpdiv): Likewise.
11757         (i6400_msa_add_d): Update reservations.
11758         (i6400_msa_int_add) Likewise.
11759         (i6400_msa_short_logic3) Likewise.
11760         (i6400_msa_short_logic2) Likewise.
11761         (i6400_msa_short_logic) Likewise.
11762         (i6400_msa_move) Likewise.
11763         (i6400_msa_cmp) Likewise.
11764         (i6400_msa_short_float2) Likewise.
11765         (i6400_msa_div_d) Likewise.
11766         (i6400_msa_long_logic1) Likewise.
11767         (i6400_msa_long_logic2) Likewise.
11768         (i6400_msa_mult) Likewise.
11769         (i6400_msa_long_float2) Likewise.
11770         (i6400_msa_long_float4) Likewise.
11771         (i6400_msa_long_float5) Likewise.
11772         (i6400_msa_long_float8) Likewise.
11773         (i6400_fpu_fadd): Include frint type.
11774         (i6400_fpu_store): New define_insn_reservation.
11775         (i6400_fpu_load): Likewise.
11776         (i6400_fpu_move): Likewise.
11777         (i6400_fpu_fcmp): Likewise.
11778         (i6400_fpu_fmadd): Likewise.
11779         (i6400_int_mult): Include imul3nc type and update reservation.
11780         (i6400_int_div): Include idiv3 type and update reservation.
11781         (i6400_int_load): Update to check type not move_type.
11782         (i6400_int_store): Likewise.
11783         (i6400_int_prefetch): Set zero latency.
11785 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
11787         * gcc.c: Document new %@{...} sequence.
11788         (LINK_COMMAND_SPEC): Use it for the -L switches.
11789         (cpp_unique_options): Use it for the -I switches.
11790         (at_file_argbuf): New global variable.
11791         (in_at_file): Likewise.
11792         (alloc_args): Create at_file_argbuf.
11793         (clear_args): Truncate at_file_argbuf.
11794         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
11795         (open_at_file): New function.
11796         (close_at_file): Likewise.
11797         (create_at_file): Delete.
11798         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
11799         <'o'>: Likewise.
11800         <'@'>: New case.
11801         (validate_switches_from_spec): Deal with %@{...} sequence.
11802         (validate_switches): Likewise.
11803         (driver::finalize): Call clear_args.
11805 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
11807         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
11809 2018-06-11  Martin Sebor  <msebor@redhat.com>
11811         * doc/invoke.texi (-Wall): List -Wc++17-compat.
11812         (Wno-class-memaccess): Add @opindex.
11813         (Wno-templates, Wno-multiple-inheritance): Same.
11814         (Wno-virtual-inheritance, Wno-namespaces): Same.
11815         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
11816         (Wno-format-overflow, Wno-format-truncation): Same.
11817         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
11818         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
11819         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
11820         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
11821         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
11822         (Wno-misspelled-isr): Same.
11824 2018-06-11  Martin Sebor  <msebor@redhat.com>
11826         * PR tree-optimization/86083
11827         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
11829 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
11831         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
11833 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
11835         PR target/85755
11836         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
11837         on the correct operand.
11838         (*movdi_internal64): Ditto.
11840 2018-06-11  Martin Liska  <mliska@suse.cz>
11842         PR tree-optimization/86089
11843         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
11845 2018-06-11  Julia Koval  <julia.koval@intel.com>
11847         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
11848         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
11849         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
11851 2018-06-11  Olivier Hainque  <hainque@adacore.com>
11853         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
11854         for Ada with strict dwarf2.
11856 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
11858         PR target/85755
11859         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
11860         addresses.
11862 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
11864         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
11866 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
11868         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
11869         TARGET_ELF.
11871 2018-06-08  Martin Liska  <mliska@suse.cz>
11873         * tree-cfg.h (debug_function): Fix argument type to match
11874         implementation.
11876 2018-06-08  Martin Liska  <mliska@suse.cz>
11878         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
11879         Remove usage of MPX-related (and removed) fields.
11880         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
11882 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
11884         * cfg.c (debug): Use TDF_NONE rather than 0.
11885         * cfghooks.c (debug): Likewise.
11886         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
11887         (struct dump_option_value_info): Convert to...
11888         (struct kv_pair): ...this template type.
11889         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
11890         rather than 0.
11891         (optinfo_verbosity_options): Likewise.
11892         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
11893         OPTGROUP_NONE.
11894         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
11895         than int for "optgroup_flags" param.
11896         (dump_generic_expr_loc): Use dump_flags_t rather than int for
11897         "dump_kind" param.
11898         (dump_dec): Likewise.
11899         (dump_finish): Use TDF_NONE rather than 0.
11900         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
11901         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
11902         than 0.  Update for change to option_ptr.
11903         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
11904         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
11905         0.  Update for changes to optinfo_verbosity_options and
11906         optgroup_options.
11907         (opt_info_switch_p): Convert optgroup_flags from int to
11908         optgroup_flags_t.
11909         (dump_basic_block): Use dump_flags_t rather than int
11910         for "dump_kind" param.
11911         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
11912         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
11913         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
11914         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
11915         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
11916         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
11917         TDF_NONE): Convert from macros to...
11918         (enum dump_flag): ...this new enum.
11919         (dump_flags_t): Update to use enum.
11920         (operator|, operator&, operator~, operator|=, operator&=):
11921         Implement for dump_flags_t.
11922         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
11923         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
11924         Convert from macros to...
11925         (enum optgroup_flag): ...this new enum.
11926         (optgroup_flags_t): New typedef.
11927         (operator|, operator|=): Implement for optgroup_flags_t.
11928         (struct dump_file_info): Convert field "alt_flags" to
11929         dump_flags_t.  Convert field "optgroup_flags" to
11930         optgroup_flags_t.
11931         (dump_basic_block): Use dump_flags_t rather than int for param.
11932         (dump_generic_expr_loc): Likewise.
11933         (dump_dec): Likewise.
11934         (dump_register): Convert param "optgroup_flags" to
11935         optgroup_flags_t.
11936         (opt_info_enable_passes): Likewise.
11937         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
11938         than 0.
11939         * gimple-pretty-print.c (debug): Likewise.
11940         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
11941         (merged_store_group::apply_stores): Likewise.
11942         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
11943         * gimple.c (verify_gimple_pp): Likewise.
11944         * graphite-poly.c (print_pbb_body): Likewise.
11945         * passes.c (pass_manager::register_one_dump_file): Convert
11946         local "optgroup_flags" to optgroup_flags_t.
11947         * print-tree.c (print_node): Use TDF_NONE rather than 0.
11948         (debug): Likewise.
11949         (debug_body): Likewise.
11950         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
11951         to optgroup_flags_t.
11952         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
11953         than 0.
11954         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
11955         (convert_mult_to_fma): Likewise.
11956         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
11957         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
11958         * tree-vect-data-refs.c (dump_lower_bound): Convert param
11959         "dump_kind" to dump_flags_t.
11961 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
11963         * config/rs6000/rs6000.c (min, max): Delete.
11965 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
11967         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
11968         -mabi=spe and -mabi=no-spe.
11970 2018-06-08  Martin Liska  <mliska@suse.cz>
11972         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
11973         where we expect an existing summary.
11975 2018-06-08  Martin Liska  <mliska@suse.cz>
11977         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
11978         * ipa-inline.h (estimate_edge_growth): Likewise.
11980 2018-06-08  Martin Liska  <mliska@suse.cz>
11982         * cgraph.c (function_version_hasher::hash): Use
11983         cgraph_node::get_uid ().
11984         (function_version_hasher::equal):
11985         * cgraph.h (cgraph_node::get_uid): New method.
11986         * ipa-inline.c (update_caller_keys): Use
11987         cgraph_node::get_uid ().
11988         (update_callee_keys): Likewise.
11989         * ipa-utils.c (searchc): Likewise.
11990         (ipa_reduced_postorder): Likewise.
11991         * lto-cgraph.c (input_node): Likewise.
11992         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
11993         * symbol-summary.h (symtab_insertion): Likewise.
11994         (symtab_removal): Likewise.
11995         (symtab_duplication): Likewise.
11996         * tree-pretty-print.c (dump_function_header): Likewise.
11997         * tree-sra.c (convert_callers_for_node): Likewise.
11999 2018-06-08  Martin Liska  <mliska@suse.cz>
12001         * cgraph.c (symbol_table::create_edge): Always assign a new
12002         unique number.
12003         (symbol_table::free_edge): Do not recycle numbers.
12004         * cgraph.h (cgraph_edge::get): New method.
12005         * symbol-summary.h (symtab_removal): Use it.
12006         (symtab_duplication): Likewise.
12007         (call_summary::hashable_uid): Remove.
12009 2018-06-08  Martin Liska  <mliska@suse.cz>
12011         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
12012         (initialize_growth_caches): Remove.
12013         (free_growth_caches): Likewise.
12014         (do_estimate_edge_time): Use edge_growth_cache.
12015         (do_estimate_edge_size): Likewise.
12016         (do_estimate_edge_hints): Likewise.
12017         * ipa-inline.c (reset_edge_caches): Likewise.
12018         (recursive_inlining): Likewise.
12019         (inline_small_functions): Likewise.
12020         * ipa-inline.h (initialize_growth_caches): Remove.
12021         (estimate_edge_size): Likewise.
12022         (estimate_edge_time): Likewise.
12023         (estimate_edge_hints): Likewise.
12024         (reset_edge_growth_cache): Likewise.
12025         * symbol-summary.h (call_summary::remove): New method.
12027 2018-06-08  Martin Liska  <mliska@suse.cz>
12029         * ipa-cp.c (class edge_clone_summary): New summary.
12030         (grow_edge_clone_vectors): Remove.
12031         (ipcp_edge_duplication_hook): Remove.
12032         (class edge_clone_summary_t): New call_summary class.
12033         (ipcp_edge_removal_hook): Remove.
12034         (edge_clone_summary_t::duplicate): New function.
12035         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
12036         (create_specialized_node): Likewise.
12037         (ipcp_driver): Initialize edge_clone_summaries and do not
12038         register hooks.
12040 2018-06-08  Martin Liska  <mliska@suse.cz>
12042         * symbol-summary.h (get): New function.
12043         (call_summary::m_initialize_when_cloning): New class member.
12045 2018-06-08  Martin Liska  <mliska@suse.cz>
12047         * cgraph.c (cgraph_node::remove): Do not recycle uid.
12048         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
12049         (symbol_table::allocate_cgraph_symbol): Do not set uid.
12050         * passes.c (uid_hash_t): Record removed_nodes by their uids.
12051         (remove_cgraph_node_from_order): Use the removed_nodes set.
12052         (do_per_function_toporder): Likwise.
12053         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
12054         instead of summary_uid.
12055         (symtab_removal): Likewise.
12056         (symtab_duplication): Likewise.
12058 2018-06-08  Martin Liska  <mliska@suse.cz>
12060         * ipa-cp.c (ipcp_store_bits_results): Use
12061         ipcp_transformation_sum.
12062         (ipcp_store_vr_results): Likewise.
12063         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
12064         to ...
12065         (ipcp_transformation_initialize): ... this.
12066         (ipa_set_node_agg_value_chain):
12067         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
12068         (write_ipcp_transformation_info): Likewise.
12069         (read_ipcp_transformation_info): Likewise.
12070         (ipcp_update_bits): Likewise.
12071         (ipcp_update_vr): Likewise.
12072         (ipcp_transform_function): Likewise.
12073         * ipa-prop.h: Rename ipcp_transformation_summary to
12074         ipcp_transformation.
12075         (class ipcp_transformation_t): New function summary.
12076         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
12077         (ipa_get_agg_replacements_for_node): Likewise.
12079 2018-06-08  Martin Liska  <mliska@suse.cz>
12081         * ipa-pure-const.c (struct funct_state_d): Do it class instead
12082         of struct.
12083         (class funct_state_summary_t): New function_summary class.
12084         (has_function_state): Remove.
12085         (get_function_state): Likewise.
12086         (set_function_state): Likewise.
12087         (add_new_function): Likewise.
12088         (funct_state_summary_t::insert): New function.
12089         (duplicate_node_data): Remove.
12090         (remove_node_data): Remove.
12091         (funct_state_summary_t::duplicate): New function.
12092         (register_hooks): Create new funct_state_summaries.
12093         (pure_const_generate_summary): Use it.
12094         (pure_const_write_summary): Likewise.
12095         (pure_const_read_summary): Likewise.
12096         (propagate_pure_const): Likewise.
12097         (propagate_nothrow): Likewise.
12098         (dump_malloc_lattice): Likewise.
12099         (propagate_malloc): Likewise.
12100         (execute): Do not register hooks, just remove summary
12101         instead.
12102         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
12103         constructor.
12105 2018-06-08  Martin Liska  <mliska@suse.cz>
12107         * ipa-reference.c (remove_node_data): Remove.
12108         (duplicate_node_data): Likewise.
12109         (class ipa_ref_var_info_summary_t): New class.
12110         (class ipa_ref_opt_summary_t): Likewise.
12111         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
12112         (get_reference_optimization_summary): Use
12113         ipa_ref_opt_sum_summaries.
12114         (set_reference_vars_info): Remove.
12115         (set_reference_optimization_summary): Likewise.
12116         (ipa_init): Create summaries.
12117         (init_function_info): Use function summary.
12118         (ipa_ref_opt_summary_t::duplicate): New function.
12119         (ipa_ref_opt_summary_t::remove): New function.
12120         (get_read_write_all_from_node): Fix GNU coding style.
12121         (propagate): Use function summary.
12122         (write_node_summary_p): Fix GNU coding style.
12123         (stream_out_bitmap): Likewise.
12124         (ipa_reference_read_optimization_summary): Use function summary.
12125         (ipa_reference_c_finalize): Do not release hooks.
12127 2018-06-08  Martin Liska  <mliska@suse.cz>
12129         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
12130         (analyze_function_body): Extract multiple calls of get_create.
12131         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12132         * ipa-inline.c (recursive_inlining): Use ::get method.
12133         * ipa-inline.h (estimate_edge_growth): Likewise.
12135 2018-06-08  Martin Liska  <mliska@suse.cz>
12137         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
12138         HSA_INVALID.
12139         (hsa_function_summary::hsa_function_summary): Use the new enum
12140         value.
12141         (hsa_gpu_implementation_p): Use hsa_summaries::get.
12142         * hsa-gen.c (hsa_get_host_function): Likewise.
12143         (get_brig_function_name): Likewise.
12144         * ipa-hsa.c (process_hsa_functions): Likewise.
12145         (ipa_hsa_write_summary): Likewise.
12146         * symbol-summary.h (symtab_duplication): Use ::get function/
12147         (get): New function.
12149 2018-06-08  Martin Liska  <mliska@suse.cz>
12151         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
12152         of get.
12153         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
12154         (hsa_register_kernel): Likewise.
12155         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
12156         * hsa-gen.c (hsa_get_host_function): Likewise.
12157         (get_brig_function_name): Likewise.
12158         (generate_hsa): Likewise.
12159         (pass_gen_hsail::execute): Likewise.
12160         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
12161         (devirtualization_time_bonus): Likewise.
12162         (ipcp_propagate_stage): Likewise.
12163         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12164         (edge_set_predicate): Likewise.
12165         (evaluate_conditions_for_known_args): Likewise.
12166         (evaluate_properties_for_edge): Likewise.
12167         (ipa_fn_summary::reset): Likewise.
12168         (ipa_fn_summary_t::duplicate): Likewise.
12169         (dump_ipa_call_summary): Likewise.
12170         (ipa_dump_fn_summary): Likewise.
12171         (analyze_function_body): Likewise.
12172         (compute_fn_summary): Likewise.
12173         (estimate_edge_devirt_benefit): Likewise.
12174         (estimate_edge_size_and_time): Likewise.
12175         (estimate_calls_size_and_time): Likewise.
12176         (estimate_node_size_and_time): Likewise.
12177         (inline_update_callee_summaries): Likewise.
12178         (remap_edge_change_prob): Likewise.
12179         (remap_edge_summaries): Likewise.
12180         (ipa_merge_fn_summary_after_inlining): Likewise.
12181         (ipa_update_overall_fn_summary): Likewise.
12182         (read_ipa_call_summary): Likewise.
12183         (inline_read_section): Likewise.
12184         (write_ipa_call_summary): Likewise.
12185         (ipa_fn_summary_write): Likewise.
12186         (ipa_free_fn_summary): Likewise.
12187         * ipa-hsa.c (process_hsa_functions): Likewise.
12188         (ipa_hsa_write_summary): Likewise.
12189         (ipa_hsa_read_section): Likewise.
12190         * ipa-icf.c (sem_function::merge): Likewise.
12191         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12192         (do_estimate_edge_time): Likewise.
12193         (estimate_size_after_inlining): Likewise.
12194         (estimate_growth): Likewise.
12195         (growth_likely_positive): Likewise.
12196         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12197         (inline_call): Likewise.
12198         * ipa-inline.c (caller_growth_limits): Likewise.
12199         (can_inline_edge_p): Likewise.
12200         (can_inline_edge_by_limits_p): Likewise.
12201         (compute_uninlined_call_time): Likewise.
12202         (compute_inlined_call_time): Likewise.
12203         (want_inline_small_function_p): Likewise.
12204         (edge_badness): Likewise.
12205         (update_caller_keys): Likewise.
12206         (update_callee_keys): Likewise.
12207         (recursive_inlining): Likewise.
12208         (inline_small_functions): Likewise.
12209         (inline_to_all_callers_1): Likewise.
12210         (dump_overall_stats): Likewise.
12211         (early_inline_small_functions): Likewise.
12212         (early_inliner): Likewise.
12213         * ipa-inline.h (estimate_edge_growth): Likewise.
12214         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12215         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12216         * ipa-prop.h (IPA_NODE_REF): Likewise.
12217         (IPA_EDGE_REF): Likewise.
12218         * ipa-pure-const.c (malloc_candidate_p): Likewise.
12219         (propagate_malloc): Likewise.
12220         * ipa-split.c (execute_split_functions): Likewise.
12221         * symbol-summary.h: Rename get to get_create.
12222         (get): Likewise.
12223         (get_create): Likewise.
12224         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12226 2018-06-08  Martin Liska  <mliska@suse.cz>
12228         * symbol-summary.h (release): Move definition out of class
12229         declaration.
12230         (symtab_removal): Likewise.
12231         (symtab_duplication): Likewise.
12233 2018-06-08  Martin Liska  <mliska@suse.cz>
12235         * symbol-summary.h (function_summary): Move constructor
12236         implementation out of class declaration.
12237         (release): Likewise.
12238         (symtab_insertion): Likewise.
12239         (symtab_removal): Likewise.
12240         (symtab_duplication): Likewise.
12241         (get): Likewise.
12243 2018-06-08  Martin Liska  <mliska@suse.cz>
12245         * Makefile.in: Remove support for MPX (macros, related functions,
12246         fields in cgraph_node, ...).
12247         * builtin-types.def (BT_BND): Likewise.
12248         (BT_FN_BND_CONST_PTR): Likewise.
12249         (BT_FN_CONST_PTR_BND): Likewise.
12250         (BT_FN_VOID_PTR_BND): Likewise.
12251         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
12252         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
12253         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
12254         (expand_builtin_mempcpy_with_bounds): Likewise.
12255         (expand_builtin_memset_with_bounds): Likewise.
12256         (expand_builtin_memset_args): Likewise.
12257         (std_expand_builtin_va_start): Likewise.
12258         (expand_builtin): Likewise.
12259         (expand_builtin_with_bounds): Likewise.
12260         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
12261         (DEF_LIB_BUILTIN_CHKP): Likewise.
12262         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
12263         (DEF_CHKP_BUILTIN): Likewise.
12264         (BUILT_IN_MEMCPY): Likewise.
12265         (BUILT_IN_MEMMOVE): Likewise.
12266         (BUILT_IN_MEMPCPY): Likewise.
12267         (BUILT_IN_MEMSET): Likewise.
12268         (BUILT_IN_STPCPY): Likewise.
12269         (BUILT_IN_STRCAT): Likewise.
12270         (BUILT_IN_STRCHR): Likewise.
12271         (BUILT_IN_STRCPY): Likewise.
12272         (BUILT_IN_STRLEN): Likewise.
12273         (BUILT_IN_MEMCPY_CHK): Likewise.
12274         (BUILT_IN_MEMMOVE_CHK): Likewise.
12275         (BUILT_IN_MEMPCPY_CHK): Likewise.
12276         (BUILT_IN_MEMSET_CHK): Likewise.
12277         (BUILT_IN_STPCPY_CHK): Likewise.
12278         (BUILT_IN_STRCAT_CHK): Likewise.
12279         (BUILT_IN_STRCPY_CHK): Likewise.
12280         * calls.c (store_bounds): Likewise.
12281         (emit_call_1): Likewise.
12282         (special_function_p): Likewise.
12283         (maybe_warn_nonstring_arg): Likewise.
12284         (initialize_argument_information): Likewise.
12285         (finalize_must_preallocate): Likewise.
12286         (compute_argument_addresses): Likewise.
12287         (expand_call): Likewise.
12288         * cfgexpand.c (expand_call_stmt): Likewise.
12289         (expand_return): Likewise.
12290         (expand_gimple_stmt_1): Likewise.
12291         (pass_expand::execute): Likewise.
12292         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
12293         (cgraph_node::remove): Likewise.
12294         (cgraph_node::dump): Likewise.
12295         (cgraph_node::verify_node): Likewise.
12296         * cgraph.h (chkp_function_instrumented_p): Likewise.
12297         (symtab_node::get_alias_target): Likewise.
12298         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
12299         (cgraph_local_p): Likewise.
12300         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
12301         (cgraph_edge::rebuild_references): Likewise.
12302         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
12303         (walk_polymorphic_call_targets): Likewise.
12304         (cgraph_node::expand_thunk): Likewise.
12305         (symbol_table::output_weakrefs): Likewise.
12306         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
12307         (ix86_handle_option): Likewise.
12308         * config/i386/constraints.md: Likewise.
12309         * config/i386/i386-builtin-types.def (BND): Likewise.
12310         (VOID): Likewise.
12311         (PVOID): Likewise.
12312         (ULONG): Likewise.
12313         * config/i386/i386-builtin.def (BDESC_END): Likewise.
12314         (BDESC_FIRST): Likewise.
12315         (BDESC): Likewise.
12316         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
12317         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
12318         * config/i386/i386.c (enum reg_class): Likewise.
12319         (ix86_target_string): Likewise.
12320         (ix86_option_override_internal): Likewise.
12321         (ix86_conditional_register_usage): Likewise.
12322         (ix86_valid_target_attribute_inner_p): Likewise.
12323         (ix86_set_indirect_branch_type): Likewise.
12324         (ix86_set_current_function): Likewise.
12325         (ix86_function_arg_regno_p): Likewise.
12326         (init_cumulative_args): Likewise.
12327         (ix86_function_arg_advance): Likewise.
12328         (ix86_function_arg): Likewise.
12329         (ix86_pass_by_reference): Likewise.
12330         (ix86_function_value_regno_p): Likewise.
12331         (ix86_function_value_1): Likewise.
12332         (ix86_function_value_bounds): Likewise.
12333         (ix86_return_in_memory): Likewise.
12334         (ix86_setup_incoming_vararg_bounds): Likewise.
12335         (ix86_va_start): Likewise.
12336         (indirect_thunk_need_prefix): Likewise.
12337         (print_reg): Likewise.
12338         (ix86_print_operand): Likewise.
12339         (ix86_expand_call): Likewise.
12340         (ix86_output_function_return): Likewise.
12341         (reg_encoded_number): Likewise.
12342         (BDESC_VERIFYS): Likewise.
12343         (ix86_init_mpx_builtins): Likewise.
12344         (ix86_init_builtins): Likewise.
12345         (ix86_emit_cmove): Likewise.
12346         (ix86_emit_move_max): Likewise.
12347         (ix86_expand_builtin): Likewise.
12348         (ix86_builtin_mpx_function): Likewise.
12349         (ix86_get_arg_address_for_bt): Likewise.
12350         (ix86_load_bounds): Likewise.
12351         (ix86_store_bounds): Likewise.
12352         (ix86_load_returned_bounds): Likewise.
12353         (ix86_store_returned_bounds): Likewise.
12354         (ix86_class_likely_spilled_p): Likewise.
12355         (ix86_hard_regno_mode_ok): Likewise.
12356         (x86_order_regs_for_local_alloc): Likewise.
12357         (ix86_mitigate_rop): Likewise.
12358         (ix86_bnd_prefixed_insn_p): Likewise.
12359         (ix86_mpx_bound_mode): Likewise.
12360         (ix86_make_bounds_constant): Likewise.
12361         (ix86_initialize_bounds): Likewise.
12362         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
12363         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
12364         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
12365         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
12366         (TARGET_CHKP_BOUND_MODE): Likewise.
12367         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
12368         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
12369         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
12370         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
12371         * config/i386/i386.h (TARGET_MPX): Likewise.
12372         (TARGET_MPX_P): Likewise.
12373         (VALID_BND_REG_MODE): Likewise.
12374         (FIRST_BND_REG): Likewise.
12375         (LAST_BND_REG): Likewise.
12376         (enum reg_class): Likewise.
12377         (BND_REG_P): Likewise.
12378         (BND_REGNO_P): Likewise.
12379         (BNDmode): Likewise.
12380         (ADJUST_INSN_LENGTH): Likewise.
12381         * config/i386/i386.md: Likewise.
12382         * config/i386/i386.opt: Likewise.
12383         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
12384         (defined): Likewise.
12385         (LINK_MPX): Likewise.
12386         (MPX_SPEC): Likewise.
12387         (LIBMPX_SPEC): Likewise.
12388         (LIBMPXWRAPPERS_SPEC): Likewise.
12389         (CHKP_SPEC): Likewise.
12390         * config/i386/predicates.md: Likewise.
12391         * dbxout.c (dbxout_type): Likewise.
12392         * doc/extend.texi: Likewise.
12393         * doc/invoke.texi: Likewise.
12394         * doc/md.texi: Likewise.
12395         * doc/tm.texi: Likewise.
12396         * doc/tm.texi.in: Likewise.
12397         * dwarf2out.c (is_base_type): Likewise.
12398         (gen_formal_types_die): Likewise.
12399         (gen_subprogram_die): Likewise.
12400         (gen_type_die_with_usage): Likewise.
12401         (gen_decl_die): Likewise.
12402         (dwarf2out_late_global_decl): Likewise.
12403         * expr.c (expand_assignment): Likewise.
12404         (emit_storent_insn): Likewise.
12405         (store_expr_with_bounds): Likewise.
12406         (store_expr): Likewise.
12407         (expand_expr_real_1): Likewise.
12408         * expr.h (store_expr_with_bounds): Likewise.
12409         * function.c (use_register_for_decl): Likewise.
12410         (struct bounds_parm_data): Likewise.
12411         (assign_parms_augmented_arg_list): Likewise.
12412         (assign_parm_find_entry_rtl): Likewise.
12413         (assign_parm_is_stack_parm): Likewise.
12414         (assign_parm_load_bounds): Likewise.
12415         (assign_bounds): Likewise.
12416         (assign_parms): Likewise.
12417         (expand_function_start): Likewise.
12418         * gcc.c (CHKP_SPEC): Likewise.
12419         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
12420         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
12421         (wrestrict_dom_walker::check_call): Likewise.
12422         * gimple.c (gimple_build_call_from_tree): Likewise.
12423         * gimple.h (enum gf_mask): Likewise.
12424         (gimple_call_with_bounds_p): Likewise.
12425         (gimple_call_set_with_bounds): Likewise.
12426         * gimplify.c (gimplify_init_constructor): Likewise.
12427         * ipa-cp.c (initialize_node_lattices): Likewise.
12428         (propagate_constants_across_call): Likewise.
12429         (find_more_scalar_values_for_callers_subset): Likewise.
12430         * ipa-hsa.c (process_hsa_functions): Likewise.
12431         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
12432         * ipa-icf.c (sem_function::merge): Likewise.
12433         * ipa-inline.c (early_inliner): Likewise.
12434         * ipa-pure-const.c (warn_function_noreturn): Likewise.
12435         (warn_function_cold): Likewise.
12436         (propagate_pure_const): Likewise.
12437         * ipa-ref.h (enum GTY): Likewise.
12438         * ipa-split.c (find_retbnd): Likewise.
12439         (consider_split): Likewise.
12440         (split_function): Likewise.
12441         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
12442         * ipa.c (walk_polymorphic_call_targets): Likewise.
12443         (symbol_table::remove_unreachable_nodes): Likewise.
12444         (process_references): Likewise.
12445         (cgraph_build_static_cdtor_1): Likewise.
12446         * lto-cgraph.c (lto_output_node): Likewise.
12447         (output_refs): Likewise.
12448         (compute_ltrans_boundary): Likewise.
12449         (input_overwrite_node): Likewise.
12450         (input_node): Likewise.
12451         (input_cgraph_1): Likewise.
12452         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
12453         * passes.c (pass_manager::execute_early_local_passes): Likewise.
12454         (class pass_chkp_instrumentation_passes): Likewise.
12455         (make_pass_chkp_instrumentation_passes): Likewise.
12456         * passes.def: Likewise.
12457         * rtl.h (struct GTY): Likewise.
12458         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
12459         * stor-layout.c (layout_type): Likewise.
12460         * symtab.c: Likewise.
12461         * target.def: Likewise.
12462         * targhooks.c (default_chkp_bound_type): Likewise.
12463         (default_chkp_bound_mode): Likewise.
12464         (default_builtin_chkp_function): Likewise.
12465         (default_chkp_function_value_bounds): Likewise.
12466         (default_chkp_make_bounds_constant): Likewise.
12467         (default_chkp_initialize_bounds): Likewise.
12468         * targhooks.h (default_chkp_bound_type): Likewise.
12469         (default_chkp_bound_mode): Likewise.
12470         (default_builtin_chkp_function): Likewise.
12471         (default_chkp_function_value_bounds): Likewise.
12472         (default_chkp_make_bounds_constant): Likewise.
12473         (default_chkp_initialize_bounds): Likewise.
12474         * toplev.c (compile_file): Likewise.
12475         (process_options): Likewise.
12476         * tree-core.h (DEF_BUILTIN): Likewise.
12477         (DEF_BUILTIN_CHKP): Likewise.
12478         * tree-inline.c (declare_return_variable): Likewise.
12479         (remap_gimple_stmt): Likewise.
12480         (copy_bb): Likewise.
12481         (initialize_inlined_parameters): Likewise.
12482         (expand_call_inline): Likewise.
12483         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
12484         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
12485         (make_pass_ipa_chkp_produce_thunks): Likewise.
12486         (make_pass_chkp): Likewise.
12487         (make_pass_chkp_opt): Likewise.
12488         (make_pass_chkp_instrumentation_passes): Likewise.
12489         * tree-pretty-print.c (dump_generic_node): Likewise.
12490         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
12491         * tree-ssa-dce.c (propagate_necessity): Likewise.
12492         (eliminate_unnecessary_stmts): Likewise.
12493         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
12494         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
12495         * tree-ssa-sccvn.h: Likewise.
12496         * tree-ssa-strlen.c (get_string_length): Likewise.
12497         (valid_builtin_call): Likewise.
12498         (adjust_last_stmt): Likewise.
12499         (handle_builtin_strchr): Likewise.
12500         (handle_builtin_strcpy): Likewise.
12501         (handle_builtin_stxncpy): Likewise.
12502         (handle_builtin_memcpy): Likewise.
12503         (handle_builtin_strcat): Likewise.
12504         (strlen_check_and_optimize_stmt): Likewise.
12505         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
12506         * tree-streamer-in.c: Likewise.
12507         * tree-streamer.c (record_common_node): Likewise.
12508         * tree.c (tree_code_size): Likewise.
12509         (wide_int_to_tree_1): Likewise.
12510         (type_contains_placeholder_1): Likewise.
12511         (build_common_tree_nodes): Likewise.
12512         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
12513         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
12514         (POINTER_BOUNDS_P): Likewise.
12515         (BOUNDED_TYPE_P): Likewise.
12516         (BOUNDED_P): Likewise.
12517         (CALL_WITH_BOUNDS_P): Likewise.
12518         (pointer_bounds_type_node): Likewise.
12519         * value-prof.c (gimple_ic): Likewise.
12520         * var-tracking.c (vt_add_function_parameters): Likewise.
12521         * varasm.c (make_decl_rtl): Likewise.
12522         (assemble_start_function): Likewise.
12523         (output_constant): Likewise.
12524         (maybe_assemble_visibility): Likewise.
12525         * varpool.c (ctor_for_folding): Likewise.
12526         * chkp-builtins.def: Remove.
12527         * ipa-chkp.c: Remove.
12528         * ipa-chkp.h: Remove.
12529         * rtl-chkp.c: Remove.
12530         * rtl-chkp.h: Remove.
12531         * tree-chkp-opt.c: Remove.
12532         * tree-chkp.c: Remove.
12533         * tree-chkp.h: Remove.
12535 2018-06-07  Carl Love  <cel@us.ibm.com>
12537         * config/rs6000/vsx.md (vextract_fp_from_shorth,
12538         vextract_fp_from_shortl): Add BE support.
12540 2018-06-07  Paul Koning  <ni1d@arrl.net>
12542         * compare-elim.c (try_merge_compare): Don't merge compare if
12543         address contains a side effect.
12544         (try_eliminate_compare): Likewise.
12546 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
12548         * config.gcc: Support "tremont".
12549         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
12550         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12551         PROCESSOR_TREMONT.
12552         * config/i386/i386.c (m_TREMONT): Define.
12553         (processor_target_table): Add "tremont".
12554         (PTA_TREMONT): Define.
12555         (ix86_lea_outperforms): Add TARGET_TREMONT.
12556         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
12557         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
12558         and M_INTEL_GOLDMONT_PLUS.
12559         (fold_builtin_cpu): Add "tremont".
12560         (ix86_add_stmt_cost): Add TARGET_TREMONT.
12561         (ix86_option_override_internal): Add "tremont".
12562         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
12563         (processor_type): Add PROCESSOR_TREMONT.
12564         * config/i386/x86-tune.def: Add m_TREMONT.
12565         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
12567 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12569         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
12570         symbol defined for msp430i* devices to be lower case.
12572 2018-06-07  Richard Biener  <rguenther@suse.de>
12574         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
12575         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
12576         Properly wrap signed arithmetic if overflow wraps.
12578 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
12580         PR tree-optimization/69615
12581         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
12582         of a cast from a same precision integral SSA_NAME in a bb dominated
12583         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
12584         cast to utype if rhs2 has already a compatible type.
12586 2018-06-07  Richard Biener  <rguenther@suse.de>
12588         PR tree-optimization/85935
12589         * graphite-scop-detection.c (find_params_in_bb): Analyze
12590         condition operands with respect to the correct loop.  Assert
12591         the analysis doesn't fail.
12593 2018-06-04  Carl Love  <cel@us.ibm.com>
12595         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
12596         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
12597         as it is slightly cheaper.
12598         (first_match_or_eos_index_<mode>):
12599         Calculate index using natural element order.
12600         (first_match_index_<mode>):
12601         Calculate index using natural element order.
12602         (first_match_or_eos_index_<mode>):
12603         Calculate index using natural order.
12604         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
12605         for BE and LE modes.
12606         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
12607         P9V_BUILTIN_VCLZLSBB_V16QI.
12608         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
12609         specific.
12611 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12613         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
12614         indentation and line wrap for many prototypes.  Add missing
12615         @smallexample directives around block of prototypes for vec_xl and
12616         vec_xst.
12618 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
12620         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
12621         track if we pass or return IEEE 128-bit floating point.
12622         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
12623         C++ mangling that is compatible with GCC 8.1.
12624         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
12625         (init_cumulative_args): Note if we pass or return IEEE 128-bit
12626         floating point types.
12627         (rs6000_function_arg_advance_1): Likewise.
12628         (rs6000_mangle_type): Optionally generate mangled names that match
12629         what GCC 8.1 generated for IEEE 128-bit floating point types.
12630         (rs6000_globalize_decl_name): If we have an external function that
12631         passes or returns IEEE 128-bit types, generate a weak reference
12632         from the mangled name used in GCC 8.1 to the current mangled
12633         name.
12634         (rs6000_init_builtins): Make __ibm128 use the long double type if
12635         long double is IBM extended double.  Make __float128 use the long
12636         double type if long double is IEEE 128-bit.
12638         PR target/85657
12639         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
12640         macro for __ibm128 built-in functions.
12641         (PACK_IF): Add __ibm128 pack/unpack functions.
12642         (UNPACK_IF): Likewise.
12643         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
12644         enable long double built-in functions if long double is IEEE
12645         128-bit floating point.
12646         (rs6000_invalid_builtin): Update long double built-in function
12647         error message.
12648         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
12649         functions, adjust the built-in function to use the long double
12650         built-in function if __ibm128 and long double are the same type.
12651         * doc/extend.texi (PowerPC builtins): Update documention for
12652         __builtin_{,un}pack_longdouble.  Add documentation for
12653         __builtin_{,un}pack_ibm128.
12655 2018-06-06  Jim Wilson  <jimw@sifive.com>
12657         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
12658         (struct machine_function): New field interrupt_mode.
12659         (riscv_handle_type_attribute): New function.  Add forward declaration.
12660         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
12661         (riscv_expand_epilogue): Check interrupt_mode field.
12662         (riscv_set_current_function): Check interrupt attribute args and
12663         set interrupt_mode field.
12664         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
12665         (riscv_sret, riscv_uret): New.
12666         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
12667         new arguments to interrupt attribute.
12669 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
12671         PR target/63177
12672         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
12673         Don't handle -mcpu=power8 if -mpower9-vector is also used.
12675 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12677         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
12678         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
12679         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12680         several redundant entries.
12682 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
12684         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
12685         type from "rtx" to "rtx_insn *".
12686         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
12687         for local "call_insn", removing cast.
12688         (ix86_expand_call): Likewise, introducing a "call_insn" local.
12690 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12692         PR tree-optimization/86066
12693         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
12694         for BIT_INSERT_EXPR stores.
12696 2018-06-06  Richard Biener  <rguenther@suse.de>
12698         PR tree-optimization/86062
12699         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12700         component refs ontop
12701         of to be offsetted base.
12703 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12705         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
12706         to be static and remove check on interrupt attribute name.
12708 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12710         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
12711         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
12713 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
12715         PR target/79924
12716         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
12717         second argument.
12718         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
12719         Remove second argument, change how error is called.
12720         (aarch64_layout_arg): Remove second argument from
12721         aarch64_err_no_fpadvsimd call.
12722         (aarch64_init_cumulative_args): Ditto.
12723         (aarch64_gimplify_va_arg_expr): Ditto.
12724         * config/aarch64/aarch64.md (mov<mode>): Ditto.
12726 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
12728         * config/i386/i386.md (simple_return_indirect_internal): New expander.
12729         (*simple_return_indirect_internal<mode>): Rename from
12730         simple_return_indirect_internal.  Use W mode iterator.
12731         (rstorssp): New expander.
12732         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
12733         (clrssbsy): New expander.
12734         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
12736 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12738         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
12739         __typeof__.
12740         (cmse_check_pointed_object): Likewise.
12742 2018-06-05  Martin Liska  <mliska@suse.cz>
12744         PR gcov-profile/47618
12745         * doc/invoke.texi: Document how -fprofile-dir format
12746         is extended.
12748 2018-06-05  Richard Biener  <rguenther@suse.de>
12750         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
12751         removal pretend DOM info isn't available so we do not update
12752         it and only remove edges, not dominated blocks.  Actually free
12753         DOM info in case we removed something.  Remove unreachable blocks.
12754         (mfb_keep_latches): Work with either DOM info or marked backedges.
12755         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
12756         first.  Mark backedges if DOM info isn't available.
12757         (Re-)compute DOM info after cleanup_control_flow_pre.
12759 2018-06-05  Richard Biener  <rguenther@suse.de>
12761         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
12762         (locus_discrim_hasher::hash): Adjust.
12763         (locus_discrim_hasher::equal): Likewise.
12764         (next_discriminator_for_locus): Work on line directly.
12765         (same_line_p): Pass in expanded locus1 as well.
12766         (assign_discriminators): Avoid redundant location expansions.
12768 2018-06-05  Richard Biener  <rguenther@suse.de>
12770         PR tree-optimization/86046
12771         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
12772         if required after clearing TREE_ADDRESSABLE.
12774 2018-06-05  Richard Biener  <rguenther@suse.de>
12776         PR tree-optimization/86047
12777         * tree-ssa-loop.c (for_each_index): Glob handling of all
12778         decls and constants and really handle all of them.
12780 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12782         PR target/81497
12783         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
12784         qualifier_void_pointer and qualifier_const_void_pointer.
12785         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
12786         (arm_init_builtins): Handle the above.
12787         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
12788         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
12789         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
12790         void intrinsics.
12792 2018-06-05  Martin Liska  <mliska@suse.cz>
12794         * auto-profile.c (read_autofdo_file): Do not use
12795         gcov_ctr_summary struct.
12796         (afdo_callsite_hot_enough_for_early_inline): Likewise.
12797         * coverage.c (struct counts_entry): Likewise.
12798         (read_counts_file): Read just single summary entry.
12799         (get_coverage_counts): Use gcov_summary struct.
12800         * coverage.h (get_coverage_counts): Likewise.
12801         * gcov-dump.c (dump_working_sets): Likewise.
12802         (tag_summary): Dump just single summary.
12803         * gcov-io.c (gcov_write_summary): Write just histogram
12804         summary.
12805         (gcov_read_summary): Read just single summary.
12806         (compute_working_sets): Use gcov_summary struct.
12807         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
12808         of GCOV_COUNTERS_SUMMABLE.
12809         (GCOV_COUNTERS_SUMMABLE): Remove.
12810         (GCOV_FIRST_VALUE_COUNTER): Replace with
12811         GCOV_COUNTER_V_INTERVAL.
12812         (struct gcov_ctr_summary): Remove.
12813         (struct gcov_summary): Directly use fields of former
12814         gcov_ctr_summary.
12815         (compute_working_sets): Use gcov_summary struct.
12816         * gcov.c (read_count_file): Do not use ctrs fields.
12817         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
12818         struct.
12819         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
12820         struct.
12821         * profile.c: Likewise.
12822         * profile.h: Likewise.
12824 2018-06-05  Martin Liska  <mliska@suse.cz>
12826         PR gcov-profile/84846
12827         * gcov.c (output_lines): Print working directory only
12828         in intermediate format.
12830 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
12832         * config/s390/s390-builtin-types.def: Add void function type.
12833         * config/s390/s390-builtins.def: Use the function type for the
12834         tbeginc builtin.
12836 2018-06-04  Jim Wilson  <jimw@sifive.com>
12838         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
12839         to int.
12840         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
12841         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
12842         handle EH_RETURN_DATA_REGNO registers properly.
12843         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
12844         (riscv_expand_epilogue): Update comment.  Change argument name and
12845         type.  Update code to use new name and type.  Pass new args to
12846         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
12847         EXCEPTION_RETURN.
12848         * config/riscv/riscv.md (NORMAL_RETURN): New.
12849         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
12850         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
12851         (eh_return): Call gen_eh_return_internal and emit barrier.
12852         (eh_return_internal): Call riscv_expand_epilogue.
12854 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
12856         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
12857         bit_insertion field and declare can_be_merged_into method.
12858         (merged_store_group::can_be_merged_into): New method.
12859         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
12860         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
12861         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
12863 2018-06-04  Richard Biener  <rguenther@suse.de>
12865         PR tree-optimization/85955
12866         * builtins.c (fold_builtin_sincos): Convert pointers to
12867         destination to appropriate type before dereferencing.
12869 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
12871         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
12873 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
12875         * expr.c (expand_expr_real_1): Force the operand into memory if
12876         its TYPE_MODE is BLKmode and if there is no integer mode for
12877         the number of bits being extracted.
12879 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
12881         PR target/85832
12882         PR target/86036
12883         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12884         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
12886 2018-06-04  Richard Biener  <rguenther@suse.de>
12888         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
12889         (cleanup_tree_cfg_noloop): ... single caller.  Do
12890         start_recording_case_labels later.
12892 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
12894         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
12895         to _IMMINTRIN_H_INCLUDED.
12896         * config/i386/pconfigintrin.h: Ditto.
12897         * config/i386/waitpkgintrin.h: Ditto.
12898         * config/i386/immintrin.h: Add includes for sgxintrin.h,
12899         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
12900         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
12901         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
12902         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
12903         waitpkgintrin.h and cldemoteintrin.h.
12905 2018-06-04  Richard Biener  <rguenther@suse.de>
12907         PR tree-optimization/86038
12908         * tracer.c (find_best_successor): Check probability for
12909         being initialized, bail out if not.
12911 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
12913         PR target/86003
12914         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
12915         of bits to ignore when comparing architectures.
12917 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
12919         PR tree-optimization/69615
12920         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
12921         maximum or minimum of the type, try to merge it also as if
12922         range1 is + [-, x - 1] or + [x + 1, -].
12924         PR c++/86025
12925         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
12927 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
12929         PR tree-optimization/86034
12930         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
12931         the unsigned bitfield type in a bit insertion sequence if it does not
12932         have a larger precision than the bitfield size.
12933         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
12935 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
12937         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
12939 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
12941         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
12942         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
12943         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
12944         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
12946 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
12948         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
12949         Disable -fdelete-null-pointer-checks for ELF toolchain.
12951 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
12952             Kito Cheng  <kito.cheng@gmail.com>
12954         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
12955         (nds32le-*-*, nds32be-*-*): Integrate checking process.
12956         (nds32*-*-*): Add glibc and uclibc conditions.
12957         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
12958         (TARGET_EXCEPT_UNWIND_INFO): Define.
12959         * config/nds32/elf.h: New file.
12960         * config/nds32/linux.h: New file.
12961         * config/nds32/nds32-elf.opt: New file.
12962         * config/nds32/nds32-linux.opt: New file.
12963         * config/nds32/nds32-fp-as-gp.c
12964         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
12965         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
12966         TARGET_LINUX_ABI.
12967         (nds32_asm_file_end): Ditto.
12968         (nds32_print_operand): Ditto.
12969         (nds32_insert_attributes): Ditto.
12970         (nds32_init_libfuncs): New function.
12971         (TARGET_HAVE_TLS): Define.
12972         (TARGET_INIT_LIBFUNCS): Define.
12973         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
12974         spec content.
12975         (TARGET_ELF): Apply different mcmodel setting.
12976         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
12977         been migrated into elf.h and linux.h files.
12978         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
12979         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
12980         (mcmodel): The content has been migrated into nds32-elf.opt and
12981         nds32-linux.opt files.
12982         * config/nds32/t-elf: New file.
12983         * config/nds32/t-linux: New file.
12985 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
12986             Shiva Chen  <shiva0217@gmail.com>
12988         * config/nds32/constants.md (unspec_volatile_element): Add
12989         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
12990         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
12991         optimization.
12992         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
12993         (make_pass_nds32_fp_as_gp): Declare.
12994         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
12995         optmization pass.
12996         (nds32_asm_function_end_prologue): Remove unused asm output.
12997         (nds32_asm_function_begin_epilogue): Remove unused asm output.
12998         (nds32_asm_file_start): Output necessary fp_as_gp information.
12999         (nds32_option_override): Adjust register usage.
13000         (nds32_expand_prologue): Consider fp_as_gp situation.
13001         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
13002         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
13003         (epilogue): Ditto.
13004         (return): Ditto.
13005         (simple_return): Ditto.
13006         (omit_fp_begin): Output special directive for fp_as_gp.
13007         (omit_fp_end): Output special directive for fp_as_gp.
13008         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
13009         mforbid-fp-as-gp): New options.
13011 2018-06-01  Mark Wielaard  <mark@klomp.org>
13013         * dwarf2out.c (dwarf2out_finish): Remove generation of
13014         DW_AT_loclists_base.
13016 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
13018         * gimple-ssa-store-merging.c: Include gimple-fold.h.
13019         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
13020         (struct merged_store_group): Add bit_insertion field.
13021         (dump_char_array): Use standard hexadecimal format.
13022         (merged_store_group::merged_store_group): Set bit_insertion to false.
13023         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
13024         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
13025         also print the mask in the dump file.
13026         (pass_store_merging::gate): Minor tweak.
13027         (imm_store_chain_info::coalesce_immediate): Fix wrong association
13028         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
13029         stores with INTEGER_CST stores.
13030         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
13031         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
13032         and use it throughout.  Generate bit insertion sequences if need be.
13033         (pass_store_merging::process_store): Remove redundant condition.
13034         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
13036 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
13038         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
13039         the 128-bit floating point types.  Fix function comment.
13041 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13043         * config/aarch64/aarch64-simd.md
13044         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
13045         mnemonics.
13046         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
13047         mnemonics.
13049 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
13051         PR tree-optimization/85989
13052         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
13053         variable.
13054         (backprop::intersect_uses): Check it when deciding whether this
13055         is a backedge reference.
13056         (backprop::process_block): Add each phi to m_visited_phis
13057         after visiting it, then clear it at the end.
13059 2018-06-01  Richard Biener  <rguenther@suse.de>
13061         * tree-vectorizer.h (vect_dr_stmt): New function.
13062         (vect_get_load_cost): Adjust.
13063         (vect_get_store_cost): Likewise.
13064         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
13065         Use vect_dr_stmt instead of DR_SMTT.
13066         (vect_record_base_alignments): Likewise.
13067         (vect_calculate_target_alignment): Likewise.
13068         (vect_compute_data_ref_alignment): Likewise and make static.
13069         (vect_update_misalignment_for_peel): Likewise.
13070         (vect_verify_datarefs_alignment): Likewise.
13071         (vector_alignment_reachable_p): Likewise.
13072         (vect_get_data_access_cost): Likewise.  Pass down
13073         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
13074         (vect_get_peeling_costs_all_drs): Likewise.
13075         (vect_peeling_hash_get_lowest_cost): Likewise.
13076         (vect_enhance_data_refs_alignment): Likewise.
13077         (vect_find_same_alignment_drs): Likewise.
13078         (vect_analyze_data_refs_alignment): Likewise.
13079         (vect_analyze_group_access_1): Likewise.
13080         (vect_analyze_group_access): Likewise.
13081         (vect_analyze_data_ref_access): Likewise.
13082         (vect_analyze_data_ref_accesses): Likewise.
13083         (vect_vfa_segment_size): Likewise.
13084         (vect_small_gap_p): Likewise.
13085         (vectorizable_with_step_bound_p): Likewise.
13086         (vect_prune_runtime_alias_test_list): Likewise.
13087         (vect_analyze_data_refs): Likewise.
13088         (vect_supportable_dr_alignment): Likewise.
13089         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13090         (vect_gen_prolog_loop_niters): Likewise.
13091         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13092         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
13093         modify DR_STMT.
13094         (vect_recog_mask_conversion_pattern): Likewise.
13095         (vect_try_gather_scatter_pattern): Likewise.
13096         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
13097         to vect_get_store_cost.
13098         (vect_get_store_cost): Get stmt_info instead of DR.
13099         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
13100         (vect_get_load_cost): Get stmt_info instead of DR.
13102 2018-06-01  Richard Biener  <rguenther@suse.de>
13104         PR middle-end/86017
13105         * gimple-fold.c (var_decl_component_p): Also allow offsetted
13106         vars wrapped in MEM_REFs.
13108 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
13110         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13111         Fix subreg tests so that we only return a choice between
13112         GENERAL_REGS and FP_REGS if the original classes included both.
13114 2018-06-01  Richard Biener  <rguenther@suse.de>
13116         PR ipa/85960
13117         * tree-ssa-structalias.c (get_function_part_constraint):
13118         Handle NULL fi->decl.
13119         (find_func_aliases_for_call): Properly handle indirect
13120         fi from direct call.
13121         (find_func_clobbers): Likewise.
13122         (ipa_pta_execute): Likewise.
13123         (create_variable_info_for): For functions that are ifunc_resolver
13124         resolve to a varinfo that contains the result of the resolver call.
13125         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
13126         aliases.
13128 2018-05-31  Michael Collison  <michael.collison@arm.com>
13130         * config/aarch64/aarch64.md:
13131         (*fix_to_zero_extenddfdi2): New pattern.
13132         * gcc.target/aarch64/fix_extend1.c: New testcase.
13134 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
13136         PR middle-end/78809
13137         PR middle-end/83026
13138         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
13139         and BUILT_IN_STRNCMP_EQ.
13140         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
13141         BUILT_IN_STRNCMP_EQ.
13142         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
13143         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13144         (gimple_fold_builtin): Likewise.
13145         * tree-ssa-strlen.c (compute_string_length): New function.
13146         (determine_min_obsize): New function.
13147         (handle_builtin_string_cmp): New function to handle calls to
13148         string compare functions.
13149         (strlen_optimize_stmt): Add handling to builtin string compare
13150         calls.
13151         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
13152         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13153         * tree.c (build_common_builtin_nodes): Add new defines of
13154         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
13156 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
13158         PR target/85984
13159         * bb-reorder.c (pass_partition_blocks::gate): Return false for
13160         functions with naked attribute.
13162 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
13164         * config/i386/sse.md (avx_vec_concat<mode>):
13165         Substitute concat_tg_mode mode attribute with xtg_mode.
13166         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
13167         (concat_tg_mode): Remove mode attribute.
13169 2018-05-31  Martin Sebor  <msebor@redhat.com>
13171         PR c/82063
13172         * calls.c (alloc_max_size): Correct a logic error/typo.
13173         Treat excessive arguments as infinite.  Warn for invalid arguments.
13174         * doc/invoke.texi (-Walloc-size-larger-than): Update.
13176 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
13178         PR target/85829
13179         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
13180         and movx for Haswell.
13182 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
13183             Cesar Philippidis  <cesar@codesourcery.com>
13185         PR middle-end/85879
13186         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
13187         when emitting error on private/firstprivate reductions.
13188         * omp-low.c (lower_omp_target): Avoid reference-type processing
13189         on pointers for firstprivate clause.
13191 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
13193         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
13194         (st1x2): Likewise.
13195         (st1x3): Likewise.
13196         * config/aarch64/aarch64-simd.md
13197         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
13198         (aarch64_ld1_x3_<mode>): Likewise
13199         (aarch64_st1x2<VALLDIF:mode>): Likewise
13200         (aarch64_st1_x2_<mode>): Likewise
13201         (aarch64_st1x3<VALLDIF:mode>): Likewise
13202         (aarch64_st1_x3_<mode>): Likewise
13203         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
13204         (vld1_s8_x3): Likewise.
13205         (vld1_u16_x3): Likewise.
13206         (vld1_s16_x3): Likewise.
13207         (vld1_u32_x3): Likewise.
13208         (vld1_s32_x3): Likewise.
13209         (vld1_u64_x3): Likewise.
13210         (vld1_s64_x3): Likewise.
13211         (vld1_f16_x3): Likewise.
13212         (vld1_f32_x3): Likewise.
13213         (vld1_f64_x3): Likewise.
13214         (vld1_p8_x3): Likewise.
13215         (vld1_p16_x3): Likewise.
13216         (vld1_p64_x3): Likewise.
13217         (vld1q_u8_x3): Likewise.
13218         (vld1q_s8_x3): Likewise.
13219         (vld1q_u16_x3): Likewise.
13220         (vld1q_s16_x3): Likewise.
13221         (vld1q_u32_x3): Likewise.
13222         (vld1q_s32_x3): Likewise.
13223         (vld1q_u64_x3): Likewise.
13224         (vld1q_s64_x3): Likewise.
13225         (vld1q_f16_x3): Likewise.
13226         (vld1q_f32_x3): Likewise.
13227         (vld1q_f64_x3): Likewise.
13228         (vld1q_p8_x3): Likewise.
13229         (vld1q_p16_x3): Likewise.
13230         (vld1q_p64_x3): Likewise.
13231         (vst1_s64_x2): Likewise.
13232         (vst1_u64_x2): Likewise.
13233         (vst1_f64_x2): Likewise.
13234         (vst1_s8_x2): Likewise.
13235         (vst1_p8_x2): Likewise.
13236         (vst1_s16_x2): Likewise.
13237         (vst1_p16_x2): Likewise.
13238         (vst1_s32_x2): Likewise.
13239         (vst1_u8_x2): Likewise.
13240         (vst1_u16_x2): Likewise.
13241         (vst1_u32_x2): Likewise.
13242         (vst1_f16_x2): Likewise.
13243         (vst1_f32_x2): Likewise.
13244         (vst1_p64_x2): Likewise.
13245         (vst1q_s8_x2): Likewise.
13246         (vst1q_p8_x2): Likewise.
13247         (vst1q_s16_x2): Likewise.
13248         (vst1q_p16_x2): Likewise.
13249         (vst1q_s32_x2): Likewise.
13250         (vst1q_s64_x2): Likewise.
13251         (vst1q_u8_x2): Likewise.
13252         (vst1q_u16_x2): Likewise.
13253         (vst1q_u32_x2): Likewise.
13254         (vst1q_u64_x2): Likewise.
13255         (vst1q_f16_x2): Likewise.
13256         (vst1q_f32_x2): Likewise.
13257         (vst1q_f64_x2): Likewise.
13258         (vst1q_p64_x2): Likewise.
13259         (vst1_s64_x3): Likewise.
13260         (vst1_u64_x3): Likewise.
13261         (vst1_f64_x3): Likewise.
13262         (vst1_s8_x3): Likewise.
13263         (vst1_p8_x3): Likewise.
13264         (vst1_s16_x3): Likewise.
13265         (vst1_p16_x3): Likewise.
13266         (vst1_s32_x3): Likewise.
13267         (vst1_u8_x3): Likewise.
13268         (vst1_u16_x3): Likewise.
13269         (vst1_u32_x3): Likewise.
13270         (vst1_f16_x3): Likewise.
13271         (vst1_f32_x3): Likewise.
13272         (vst1_p64_x3): Likewise.
13273         (vst1q_s8_x3): Likewise.
13274         (vst1q_p8_x3): Likewise.
13275         (vst1q_s16_x3): Likewise.
13276         (vst1q_p16_x3): Likewise.
13277         (vst1q_s32_x3): Likewise.
13278         (vst1q_s64_x3): Likewise.
13279         (vst1q_u8_x3): Likewise.
13280         (vst1q_u16_x3): Likewise.
13281         (vst1q_u32_x3): Likewise.
13282         (vst1q_u64_x3): Likewise.
13283         (vst1q_f16_x3): Likewise.
13284         (vst1q_f32_x3): Likewise.
13285         (vst1q_f64_x3): Likewise.
13286         (vst1q_p64_x3): Likewise.
13288 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13290         * config/msp430/msp430.c (msp430_output_labelref): Prepend
13291         user_label_prefix to name.
13293         * tree-core.h: Update comment about the format of NAME string
13294         passed to handler in attribute_spec.
13296         * config/msp430/msp430.md: Remove erroneous subreg expression from
13297         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
13298         zero_extend{q,h}isi2.
13300 2018-05-30  Borislav Petkov  <bp@suse.de>
13302         * doc/extend.texi: Document some architecture specific
13303         constraints and sort entries.
13305 2018-05-30  Martin Sebor  <msebor@redhat.com>
13307         PR middle-end/85369
13308         * builtins.c (expand_builtin_stpcpy_1): New function.
13309         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
13310         only if the former succeeds.
13312 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
13314         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
13315         in saphira.
13317 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13319         * doc/invoke.texi (-flinker-output): Document
13321 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13323         * passes.c (ipa_write_summaries): Only modify statements if body
13324         is in memory.
13325         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
13326         incrementally linking.
13327         (ipa_passes): Likewise.
13328         * lto-cgraph.c (lto_output_node): When incrementally linking do not
13329         pass down resolution info.
13330         * common.opt (flag_incremental_link): Update info.
13331         * gcc.c (plugin specs): Turn flinker-output=* to
13332         -plugin-opt=-linker-output-known
13333         * toplev.c (compile_file): Also cut compilation when doing incremental
13334         link.
13335         * flag-types. (enum lto_partition_model): Add
13336         LTO_LINKER_OUTPUT_NOLTOREL.
13337         (invoke.texi): Add -flinker-output docs.
13338         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
13339         link same way as WPA; do not stream in dead initializers.
13341         * dwarf2out.c (dwarf2out_die_ref_for_decl,
13342         darf2out_register_external_decl): Support incremental link.
13344 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13346         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
13348 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
13350         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
13351         it down to simple_object_copy_lto_debug_sections.
13352         (run_gcc): Determine incremental LTO link time and configure
13353         lto1 into non-wpa mode, disable renaming of debug sections.
13355 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13357         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13358         descriptions of various incorrectly documented functions.
13360 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13362         Revert:
13363         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13364         address check not strict.
13366 2018-05-30  Richard Biener  <rguenther@suse.de>
13368         PR tree-optimization/85964
13369         * tracer.c (better_p): Drop initialized count check, we only
13370         call the function with initialized counts now.
13371         (find_best_successor): Do find a best edge if one
13372         has uninitialized count.
13373         (find_best_predecessor): Likewise.  Do BB frequency check only
13374         if count is initialized.
13376 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
13378         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
13379         (aarch64_ldrstr_offset_compare): New.
13380         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
13381         load/store orderings.
13382         (aarch64_gen_adjusted_ldpstp): Likewise.
13384 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
13386         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13387         Check for subset of GENERAL_REGS and FP_REGS.
13388         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
13389         r=w alternative.
13391 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
13393         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
13394         and wi::to_poly_offset.  Add the current offset and then check
13395         whether the sum fits, rather than using an unchecked addition of
13396         a checked term.  Check for a shwi rather than a uhwi.
13397         * expr.c (get_bit_range): Use tree_to_poly_uint64.
13398         (store_constructor): Use poly_int_tree_p.
13399         (expand_expr_real_1): Likewise.
13400         * function.c (assign_temp): Likewise.
13401         * fold-const.c (const_binop): Use poly_int_tree_p and
13402         wi::to_poly_offset.
13403         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
13404         division.
13405         * ipa-icf-gimple.c (func_checker::compare_operand): Use
13406         to_poly_offset for MEM offsets.
13407         * ipa-icf.c (sem_variable::equals): Likewise.
13408         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
13409         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
13410         wi::to_poly_offset for BIT_FIELD_REF offsets.
13411         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
13412         wi::to_poly_offset.
13413         * var-tracking.c (emit_note_insn_var_location): Use
13414         tree_to_poly_uint64.
13416 2018-05-29  Jim Wilson  <jimw@sifive.com>
13418         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
13420 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
13422         PR target/85950
13423         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
13424         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
13425         sequence.
13426         (sse4_1_round<mode>2): Use nonimmediate_operand
13427         for operand 1 predicate.
13429 2018-05-29  Martin Sebor  <msebor@redhat.com>
13430             Richard Biener  <rguenther@suse.de>
13432         PR testsuite/85888
13433         * calls.c (get_size_range): Call determine_value_range instead
13434         of get_value_range..
13435         * tree-vrp.h (determine_value_range): Declared new function.
13436         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
13438 2018-05-29  Richard Biener  <rguenther@suse.de>
13440         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
13441         sure to use non-pattern stmts for get_earlier_stmt arguments.
13442         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
13443         called on pattern stmts.
13444         (get_later_stmt): Likewise.
13446 2018-05-29  Martin Liska  <mliska@suse.cz>
13448         PR gcov-profile/85759
13449         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
13450         env variables.
13452 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
13454         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
13455         VEC_UNPACK_*_EXPR.
13456         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
13457         VEC_PACK_*_EXPR.
13459         PR target/85918
13460         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13461         VEC_PACK_FLOAT_EXPR): New tree codes.
13462         * tree-pretty-print.c (op_code_prio): Handle
13463         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13464         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13465         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13466         * tree-inline.c (estimate_operator_cost): Likewise.
13467         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
13468         * fold-const.c (const_binop): Likewise.
13469         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
13470         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13471         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13472         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
13473         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13474         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13475         * expr.c (expand_expr_real_2): Likewise.
13476         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
13477         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
13478         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
13479         optabs.
13480         * optabs.c (expand_widen_pattern_expr): For
13481         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
13482         sign from result type rather than operand's type.
13483         (expand_binop_directly): For vec_packu_float_optab and
13484         vec_packs_float_optab allow result type to be different from operand's
13485         type.
13486         * optabs-tree.c (optab_for_tree_code): Handle
13487         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13488         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
13489         * tree-vect-generic.c (expand_vector_operations_1):  Handle
13490         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13491         VEC_PACK_FLOAT_EXPR.
13492         * tree-vect-stmts.c (supportable_widening_operation): Handle
13493         FIX_TRUNC_EXPR.
13494         (supportable_narrowing_operation): Handle FLOAT_EXPR.
13495         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
13496         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
13497         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
13498         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
13499         mode attributes.
13500         (vec_pack<floatprefix>_float_<mode>): New expander.
13501         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
13502         attributes.
13503         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
13504         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
13505         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
13506         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
13507         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
13508         Document.
13509         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
13510         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
13511         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13512         VEC_PACK_FLOAT_EXPR): Document.
13514 2018-05-29  Richard Biener  <rguenther@suse.de>
13516         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
13517         member.
13518         (stmt_vec_info_vec): Make pointer.
13519         (init_stmt_vec_info_vec): Remove.
13520         (free_stmt_vec_info_vec): Likewise.
13521         (set_stmt_vec_info_vec): New function.
13522         (free_stmt_vec_infos): Likewise.
13523         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
13524         (set_vinfo_for_stmt): Likewise.
13525         (get_earlier_stmt): Likewise.
13526         (get_later_stmt): Likewise.
13527         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
13528         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
13529         (vec_info::~vec_info): Free stmt_vec_infos.
13530         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
13531         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
13532         (pass_slp_vectorize::execute): Likewise.
13533         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
13534         (free_stmt_vec_info_vec): Likewise.
13535         (set_stmt_vec_info_vec): New function.
13536         (free_stmt_vec_infos): Likewise.
13537         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
13538         the global stmt_vec_info_vec.
13539         * tree-parloops.c (gather_scalar_reductions): Use
13540         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
13541         vector.
13543 2018-05-29  Richard Biener  <rguenther@suse.de>
13545         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
13547 2018-05-29  Martin Liska  <mliska@suse.cz>
13548             David Malcolm  <dmalcolm@redhat.com>
13550         * vec.c (test_reverse): New.
13551         (vec_c_tests): Add new test.
13552         * vec.h (vl_ptr>::reverse): New function.
13554 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
13556         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
13558         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
13559         and later.
13561 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13563         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
13565 2018-05-28  Richard Biener  <rguenther@suse.de>
13567         PR tree-optimization/85933
13568         * tree-vect-data-refs.c (vect_record_base_alignments): Only
13569         look at stmts marked as vectorizable.
13571 2018-05-28  Richard Biener  <rguenther@suse.de>
13573         PR tree-optimization/85934
13574         * tree-vect-generic.c (expand_vector_operations_1): Hoist
13575         vector boolean check before scalar optimization.
13577 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
13579         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
13580         for armv5te.
13582 2018-05-28  Mark Wielaard  <mark@klomp.org>
13584         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
13585         if it is an expression containing a minus sign.
13587 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
13589         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
13591 2018-05-27  Paul Koning  <ni1d@arrl.net>
13593         * config/pdp11/pdp11.md (truncsihi2): Remove.
13595 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
13596             Chung-Ju Wu  <jasonwucj@gmail.com>
13598         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
13599         implementation.
13600         (unaligned_store_dw): Ditto.
13601         * config/nds32/nds32-memory-manipulation.c
13602         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
13603         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
13604         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
13605         (emit_setmem_word_loop): Rename to ...
13606         (emit_setmem_doubleword_loop): ... this.
13607         (nds32_gen_dup_4_byte_to_word_value): New function.
13608         (nds32_gen_dup_8_byte_to_double_word_value): New function.
13609         (nds32_expand_setmem_loop): Refine implementation.
13610         (nds32_expand_setmem_loop_v3m): Ditto.
13611         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
13612         pattern.
13614 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13616         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
13618 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13620         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
13621         (nds32_init_machine_status): Initialize machine->attr_naked_p and
13622         machine->attr_no_prologue_p.
13623         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
13624         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
13625         (nds32_expand_epilogue): Consider attr_naked_p.
13626         (nds32_expand_epilogue_v3pop): Likewise.
13627         (nds32_can_use_return_insn): Likewise.
13628         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
13629         attr_no_prologue_p fields.
13630         * config/nds32/nds32.opt (mret-in-naked-func): New option.
13632 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
13634         PR target/85918
13635         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
13636         attributes.
13637         * config/i386/sse.md
13638         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
13639         Rename to ...
13640         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
13641         ... this.
13642         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
13643         Rename to ...
13644         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
13645         ... this.
13646         (*<floatsuffix>floatv2div2sf2): Rename to ...
13647         (*float<floatunssuffix>v2div2sf2): ... this.
13648         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
13649         (float<floatunssuffix>v2div2sf2_mask): ... this.
13650         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
13651         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
13652         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
13653         to ...
13654         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
13655         ... this.
13656         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13657         Rename to ...
13658         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13659         ... this.
13660         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13661         Rename to ...
13662         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13663         ... this.
13664         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
13665         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
13666         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
13667         gen_ufix_truncv8dfv8si2.
13668         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
13669         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
13670         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
13671         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
13672         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
13673         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
13674         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
13675         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
13677 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
13679         PR target/85900
13680         PR target/85345
13681         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
13683 2018-05-25  Jim Wilson  <jimw@sifive.com>
13685         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
13686         * config/riscv/riscv.c (struct machine_function): Add
13687         interrupt_handler_p and attribute_checked_p fields.
13688         (riscv_attribute_table): Add interrupt.
13689         (riscv_interrupt_type_p): New.
13690         (riscv_save_reg_p): Save extra regs for interrupt handler.
13691         (riscv_use_save_libcall): Return false  for interrupt handler.
13692         (riscv_first_stack_step): Add forward declaration.
13693         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
13694         for interrupt handler with large frame.  Use it for saved reg list.
13695         (riscv_expand_prologue): Move flag_stack_usage_info support to
13696         eliminate duplication.
13697         (riscv_expand_epilogue): Generate mret for interrupt handler.
13698         (riscv_epilogue_uses): New.
13699         (riscv_can_use_return_insn): Return false for interrupt handler.
13700         (riscv_function_ok_for_sibcall): Likewise.
13701         (riscv_set_current_function): Add interrupt handler support.
13702         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
13703         * config/riscv/riscv.md (UNSPECV_MRET): New.
13704         (GP_REGNUM): New.
13705         (riscv_frflags, riscv_fsflags): Use tab after opcode.
13706         (riscv_mret): New.
13707         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
13709 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
13711         PR tree-optimization/85712
13712         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
13713         this candidate has already been replaced in-situ by a copy.
13715 2018-05-25  Jason Merrill  <jason@redhat.com>
13717         PR c++/80485 - inline function non-zero address.
13718         * symtab.c (nonzero_address): Check DECL_COMDAT.
13720 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
13722         PR target/83628
13723         * config/alpha/alpha.md (ashlsi3): New insn pattern.
13724         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
13725         extension of SImode operation.  Use const123_operand predicate.
13726         (*saddsi_1): Remove.
13727         (*saddl_se_1): Ditto.
13728         (*ssubsi_1): Ditto.
13729         (*ssubl_se_1): Ditto.
13730         * config/alpha/predicates.md (const123_operand): New predicate.
13731         * config/alpha/constraints.md (P): Use IN_RANGE.
13733 2018-05-25  Richard Biener  <rguenther@suse.de>
13735         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
13736         defaulted to true.
13737         (ref_maybe_used_by_stmt_p): Likewise.
13738         (stmt_may_clobber_ref_p): Likewise.
13739         (stmt_may_clobber_ref_p_1): Likewise.
13740         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
13741         and pass it along.
13742         (ref_maybe_used_by_stmt_p): Likewise.
13743         (stmt_may_clobber_ref_p): Likewise.
13744         (stmt_may_clobber_ref_p_1): Likewise.
13745         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
13746         the alias oracle to disambiguate DRs with stmts DR analysis
13747         couldn't handle.
13748         (vect_analyze_data_refs): Do not give up on not analyzable
13749         DRs for BB vectorization.  Remove code truncating the dataref
13750         vector.
13752 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
13754         PR target/85832
13755         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13756         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
13757         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
13759 2018-05-25  Richard Biener  <rguenther@suse.de>
13761         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
13762         function, combining stmt data ref gathering and fatal analysis
13763         parts.
13764         (vect_analyze_data_refs): Remove now redudnant code and simplify.
13765         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
13766         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
13767         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
13768         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
13770 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
13772         PR tree-optimization/85720
13773         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
13774         SCC if all partitions are builtins.
13775         (version_loop_by_alias_check): New parameter.  Generate cancelable
13776         runtime alias check if all partitions are builtins.
13777         (distribute_loop): Update call to above function.
13779 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
13781         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
13782         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
13783         (parm_default_def_partition_arg): Ditto.
13784         (set_parm_default_def_partition): Ditto.
13785         (get_parm_default_def_partitions): Ditto and make it static.
13786         (get_undefined_value_partitions): Ditto and make it static.
13787         (remove_ssa_form): Refactor call to init_var_map here.
13788         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
13789         computation for loop region.
13790         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
13791         (register_default_def): Delete.
13792         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
13793         (parm_default_def_partition_arg): Ditto.
13794         (set_parm_default_def_partition): Ditto.
13795         (get_parm_default_def_partitions): Ditto and make it static.
13796         (get_undefined_value_partitions): Ditto and make it static.
13797         (coalesce_with_default, coalesce_with_default): Update comment.
13798         (create_coalesce_list_for_region): New func factored out from
13799         create_outofssa_var_map.
13800         (populate_coalesce_list_for_outofssa): New func factored out from
13801         create_outofssa_var_map and coalesce_ssa_name.
13802         (create_outofssa_var_map): Delete.
13803         (coalesce_ssa_name): Refactor to support live range computation.
13804         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
13805         (get_parm_default_def_partitions): Delete.
13806         (get_undefined_value_partitions): Ditto.
13807         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
13808         computation for loop region.
13809         (new_tree_live_info, loe_visit_block): Ditto.
13810         (live_worklist, set_var_live_on_entry): Ditto.
13811         (calculate_live_on_exit, verify_live_on_entry): Ditto.
13812         * tree-ssa-live.h (struct _var_map): New fields.
13813         (init_var_map): Change decl.
13814         (region_contains_p): New.
13816 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
13818         * tree-ssa-live.h (live_merge_and_clear): Delete.
13820 2018-05-25  Richard Biener  <rguenther@suse.de>
13822         PR c++/85912
13823         * tree-dump.c (dequeue_and_dump): Remove access to removed
13824         operand 2 of a SWITCH_EXPR.
13826 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13828         * doc/sourcebuild.texi (vect_double_cond_arith): Include
13829         multiplication and division.
13830         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
13831         (cond_udiv@var{m}, cond_umod@var{m}): Document.
13832         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
13833         (cond_udiv_optab, cond_umod_optab): New optabs.
13834         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
13835         (IFN_COND_RDIV): New internal functions.
13836         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
13837         TRUNC_MOD_EXPR and RDIV_EXPR.
13838         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
13839         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
13840         New unspecs.
13841         (SVE_INT_BINARY): Include mult.
13842         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
13843         (optab, sve_int_op): Handle mult.
13844         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
13845         UNSPEC_COND_DIV.
13846         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
13847         for SVE_INT_BINARY_SD.
13849 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13851         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
13852         (optab, sve_int_op): Handle div and udiv.
13853         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
13854         for SVE_INT_BINARY_SD.
13855         (*<optab><mode>3): New insn for the same.
13857 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13859         * tree-vect-patterns.c: Include predict.h.
13860         (vect_recog_divmod_pattern): Restrict check for division support
13861         to when optimizing for size.
13863 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13865         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
13866         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
13867         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
13868         (gimple_match_op::set_op): Likewise.
13869         (gimple_resimplify4): Declare.
13870         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
13871         (expr::gen_transform): Likewise.
13872         (decision_tree::gen): Generate a simplification routine for 4 operands.
13873         * gimple-match-head.c (gimple_simplify): Add an overload for
13874         4 operands.  In the top-level function, handle up to 4 call
13875         arguments and call gimple_resimplify4.
13876         (gimple_resimplify4): New function.
13877         (build_call_internal): Pass a fourth operand.
13878         (maybe_push_to_seq): Likewise.
13879         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
13880         Fold VEC_COND_EXPRs of an operation and a default value into
13881         an IFN_COND_* function if possible.
13882         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
13883         New unspecs.
13884         (SVE_COND_FP_BINARY): Include them.
13885         (optab, sve_fp_op): Handle them.
13886         (SVE_INT_BINARY_REV): New code iterator.
13887         (SVE_COND_FP_BINARY_REV): New int iterator.
13888         (commutative): New int attribute.
13889         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
13890         Declare.
13891         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
13892         function.
13893         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
13894         (*cond_<optab><mode>): New patterns for reversed operands.
13896 2018-05-25  Richard Biener  <rguenther@suse.de>
13898         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
13899         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
13900         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
13901         (STMT_VINFO_GROUPED_ACCESS): Adjust.
13902         * tree-vect-data-refs.c (everywhere): Adjust users.
13903         * tree-vect-loop.c (everywhere): Likewise.
13904         * tree-vect-slp.c (everywhere): Likewise.
13905         * tree-vect-stmts.c (everywhere): Likewise.
13906         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
13908 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13910         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
13911         Rename to...
13912         (gcc_cv_as_section_exclude): ... this.
13913         Try Solaris as #exclude syntax.
13914         * configure: Regenerate.
13915         * config.in: Regenerate.
13916         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
13917         SECTION_EXCLUDE.
13918         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
13919         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
13921         * varasm.c (default_elf_asm_named_section): Don't check if
13922         HAVE_GAS_SECTION_EXCLUDE is defined.
13924 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13926         * doc/md.texi: Update the documentation of the cond_* optabs
13927         to mention the new final operand.  Fix GET_MODE_NUNITS call.
13928         Describe the scalar case too.
13929         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
13930         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
13931         instead of 2.
13932         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
13933         (get_conditional_internal_fn): Update comment.
13934         * tree-vect-loop.c (vectorizable_reduction): Pass the original
13935         accumulator value as a final argument to conditional functions.
13936         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
13937         a define_expand and add an "else" operand.  Assert for now that
13938         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
13939         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
13940         (*cond_<optab><mode>): New patterns.
13941         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
13942         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
13943         (UNSPEC_COND_EOR): Delete.
13944         (optab): Remove associated mappings.
13945         (SVE_INT_BINARY): New code iterator.
13946         (sve_int_op): Remove int attribute and add "minus" to the code
13947         attribute.
13948         (SVE_COND_INT_OP): Delete.
13949         (SVE_COND_FP_OP): Rename to...
13950         (SVE_COND_FP_BINARY): ...this.
13952 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13954         * optabs.c (can_reuse_operands_p): New function.
13955         (maybe_legitimize_operands): Try to reuse the results for
13956         earlier operands.
13958 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
13960         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
13961         Add {q} suffix to insn mnemonic.
13963 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13965         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
13966         (msp430_warn_func_return): New.
13968 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
13970         * fold-const.c (tree_nonzero_bits): New function.
13971         * fold-const.h (tree_nonzero_bits): Likewise.
13972         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
13973         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
13975 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
13977         PR target/85900
13978         PR target/85345
13979         * varasm.c (assemble_alias): Check ifunc_resolver only on
13980         FUNCTION_DECL.
13982 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
13984         PR target/85903
13985         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
13986         when memory input operand is handled.
13988 2018-05-24  Luis Machado  <luis.machado@linaro.org>
13990         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
13991         global.
13992         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
13994 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
13996         * match.pd: Delay FMA folds until after vectorization.
13998 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14000         PR target/83009
14001         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14002         address check not strict.
14004 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
14006         * gimple-match.h (gimple_match_op): New class.
14007         (mprts_hook): Replace parameters with a gimple_match_op *.
14008         (maybe_build_generic_op): Likewise.
14009         (gimple_simplified_result_is_gimple_val): Replace parameters with
14010         a const gimple_match_op *.
14011         (gimple_simplify): Replace code_helper * and tree * parameters with
14012         a gimple_match_op * parameter.
14013         (gimple_resimplify1): Replace code_helper *, tree and tree *
14014         parameters with a gimple_match_op * parameter.
14015         (gimple_resimplify2): Likewise.
14016         (gimple_resimplify3): Likewise.
14017         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
14018         parameters with a gimple_match_op * parameter.
14019         * gimple-match-head.c (gimple_simplify): Change prototypes of
14020         auto-generated functions to take a gimple_match_op * instead of
14021         separate code_helper * and tree * parameters.  Make the same
14022         change in the top-level overload and update calls to the
14023         gimple_resimplify routines.  Update calls to the auto-generated
14024         functions and to maybe_push_res_to_seq in the publicly-facing
14025         operation-specific gimple_simplify overloads.
14026         (gimple_match_op::MAX_NUM_OPS): Define.
14027         (gimple_resimplify1): Replace rcode and ops with a single res_op
14028         parameter.  Update call to gimple_simplify.
14029         (gimple_resimplify2): Likewise.
14030         (gimple_resimplify3): Likewise.
14031         (mprts_hook): Replace parameters with a gimple_match_op *.
14032         (maybe_build_generic_op): Likewise.
14033         (build_call_internal): Replace type, nargs and ops with
14034         a gimple_match_op *.
14035         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
14036         with a single gimple_match_op *.  Update calls to mprts_hook,
14037         build_call_internal and gimple_simplified_result_is_gimple_val.
14038         Factor out code that is common to the tree_code and combined_fn cases.
14039         * genmatch.c (expr::gen_transform): Replace tem_code and
14040         tem_ops with a gimple_match_op called tem_op.  Update calls
14041         to the gimple_resimplify functions and maybe_push_res_to_seq.
14042         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
14043         res_ops.  Update call to the gimple_resimplify functions.
14044         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
14045         (decision_tree::gen): Make the functions take a gimple_match_op *
14046         called res_op instead of separate res_code and res_ops parameters.
14047         Update call accordingly.
14048         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
14049         and ops with a single res_op parameter.  Update calls to
14050         maybe_build_generic_op and maybe_push_res_to_seq.
14051         (fold_stmt_1): Update calls to gimple_simplify and
14052         replace_stmt_with_simplification.
14053         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
14054         and gimple_simplified_result_is_gimple_val.
14055         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
14056         gimple_simplify.
14057         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
14058         with a gimple_match_op *.
14059         (vn_nary_build_or_lookup): Likewise.  Update call to
14060         vn_nary_build_or_lookup_1.
14061         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
14062         gimple_match_op *.  Update calls to the gimple_resimplify routines
14063         and to gimple_simplified_result_is_gimple_val.
14064         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
14065         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
14066         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
14067         (visit_nary_op): Likewise.
14068         (visit_reference_op_load): Likewise.
14070 2018-05-23  Luis Machado  <luis.machado@linaro.org>
14072         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
14073         modifier for printing the step amount.
14075 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
14077         PR target/78849
14078         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
14079         types.
14081 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
14083         * doc/sourcebuild.texi (Endianness): New subsubsection.
14085 2018-05-23  Luis Machado  <luis.machado@linaro.org>
14087         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14088         <prefetch_dynamic_strides>: New const bool field.
14089         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14090         prefetch_dynamic_strides.
14091         (exynosm1_prefetch_tune): Likewise.
14092         (thunderxt88_prefetch_tune): Likewise.
14093         (thunderx_prefetch_tune): Likewise.
14094         (thunderx2t99_prefetch_tune): Likewise.
14095         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
14096         false.
14097         (aarch64_override_options_internal): Update to set
14098         PARAM_PREFETCH_DYNAMIC_STRIDES.
14099         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14100         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14101         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14102         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14103         prefetch-dynamic-strides setting.
14105 2018-05-23  Luis Machado  <luis.machado@linaro.org>
14107         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14108         <minimum_stride>: New const int field.
14109         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14110         minimum_stride field defaulting to -1.
14111         (exynosm1_prefetch_tune): Likewise.
14112         (thunderxt88_prefetch_tune): Likewise.
14113         (thunderx_prefetch_tune): Likewise.
14114         (thunderx2t99_prefetch_tune): Likewise.
14115         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
14116         <default_opt_level>: Set to 3.
14117         (aarch64_override_options_internal): Update to set
14118         PARAM_PREFETCH_MINIMUM_STRIDE.
14119         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14120         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14121         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14122         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14123         stride is constant and is below the minimum stride threshold.
14125 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14127         * config/arm/arm-cpus.in (mode26): Delete.
14128         (armv4): Delete mode26 reference.
14129         * config/arm/arm.c (arm_configure_build_target): Delete use of
14130         isa_bit_mode26.
14132 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
14134         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
14135         New insn pattern.
14136         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
14137         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
14138         for non-SSE modes.
14139         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
14140         (floatunsdidf2): Ditto.
14142 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
14144         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
14145         (fixuns_trunc<mode>si2_avx512f): Ditto.
14146         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
14147         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
14148         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
14150 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
14152         PR rtl-optimization/79985
14153         * df-scan.c (df_insn_refs_collect): Remove special case for
14154         global registers and asm statements.
14156 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
14158         * extend.texi (Global Register Variables): Rewrite the bullet list.
14159         Note that the register is available for allocation. Note that access
14160         via inline asm must use constraints. Add note about async-signal
14161         handlers. Remove paragraph about automagic register selection.
14163 2018-05-23  Richard Biener  <rguenther@suse.de>
14165         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
14166         of fixed offset from memset VN.
14168 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
14170         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
14171         first_interp field.
14172         (alloc_cand_and_find_basis): Initialize first_interp field.
14173         (slsr_process_mul): Modify first_interp field.
14174         (slsr_process_add): Likewise.
14175         (slsr_process_cast): Modify first_interp field for each new
14176         interpretation.
14177         (slsr_process_copy): Likewise.
14178         (dump_candidate): Dump first_interp field.
14179         (replace_mult_candidate): Process all interpretations, not just
14180         subsequent ones.
14181         (replace_rhs_if_not_dup): Likewise.
14182         (replace_one_candidate): Likewise.
14184 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
14186         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
14187         Add new boolean.
14188         (aarch64_needs_frame_chain): New function.
14189         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
14191 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
14193         PR target/84882
14194         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
14195         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
14196         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
14197         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
14198         as true for strict-align.
14199         (aarch64_can_inline_p): Perform checks even when callee has no
14200         attributes to check for strict alignment.
14201         * doc/extend.texi (AArch64 Function Attributes): Document
14202         no-strict-align.
14203         * doc/invoke.texi: (AArch64 Options): Likewise.
14205 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
14207         PR tree-optimization/85853
14208         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
14209         the handling of the root of the node to...
14210         (vect_slp_analyze_node_operations_1): ...this new function,
14211         and run the whole thing with the child nodes' def types
14212         set according to their SLP node's def type.
14214 2018-05-23  Richard Biener  <rguenther@suse.de>
14216         PR middle-end/85874
14217         * tree-data-ref.c (create_runtime_alias_checks): Defer
14218         and ignore overflow warnings.
14220 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
14222         PR tree-optimization/85822
14223         * tree-vrp.c (is_masked_range_test): Fix handling of negative
14224         constants.
14226 2018-05-23  Richard Biener  <rguenther@suse.de>
14228         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14229         memset constants via native_interpret_expr.
14231 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
14233         PR target/85345
14234         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
14235         attribute.
14236         (cgraph_node::create_alias): Likewise.
14237         (cgraph_node::get_availability): Check ifunc_resolver instead
14238         of looking up ifunc attribute.
14239         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
14240         * varasm.c (do_assemble_alias): Likewise.
14241         (assemble_alias): Likewise.
14242         (default_binds_local_p_3): Likewise.
14243         * cgraph.h (cgraph_node): Add ifunc_resolver.
14244         (cgraph_node::only_called_directly_or_aliased_p): Return false
14245         for IFUNC resolver.
14246         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
14247         attribute.
14248         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
14249         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
14250         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
14251         instead of looking up ifunc attribute.
14253 2018-05-22  Luis Machado  <luis.machado@linaro.org>
14255         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
14257 2018-05-22  Martin Sebor  <msebor@redhat.com>
14259         PR middle-end/85359
14260         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
14261         only when expasion succeeds.
14262         (expand_builtin_strcmp): Same.
14263         (expand_builtin_strncmp): Same.
14265 2018-05-22  Martin Sebor  <msebor@redhat.com>
14267         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
14269 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
14270             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14272         * config/aarch64/aarch64-ldpstp.md: Replace uses of
14273         aarch64_mem_pair_operand with memory_operand and delete operand swapping
14274         code.
14275         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14276         Add check for legitimate_address.
14277         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
14278         (aarch64_swap_ldrstr_operands): New.
14279         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
14280         Define prototype.
14282 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
14283             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14285         * config/aarch64/aarch64.md: New patterns to generate stp
14286         and ldp.
14287         (store_pair_sw, store_pair_dw): New patterns to generate stp for
14288         single words and double words.
14289         (load_pair_sw, load_pair_dw): Likewise.
14290         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
14291         Delete.
14292         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
14293         Delete.
14294         * config/aarch64/aarch64-ldpstp.md: Modify peephole
14295         for different mode ldpstp and add peephole for merged zero stores.
14296         Likewise for loads.
14297         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14298         Add size check.
14299         (aarch64_gen_store_pair): Rename calls to match new patterns.
14300         (aarch64_gen_load_pair): Rename calls to match new patterns.
14301         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
14302         (load_pair<DREG:mode><DREG2:mode>): ... This.
14303         (store_pair<mode>): Rename to...
14304         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
14305         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
14306         New mode iterators.
14307         (V_INT_EQUIV): Handle SImode.
14308         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
14309         New predicate.
14311 2018-05-22  Martin Sebor  <msebor@redhat.com>
14313         PR c/85623
14314         * calls.c (maybe_warn_nonstring_arg): Use string length to set
14315         or ajust the presumed bound on an operation to avoid unnecessary
14316         warnings.
14318 2018-05-22  Martin Sebor  <msebor@redhat.com>
14320         PR tree-optimization/85826
14321         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
14322         assuming that a DECL necesarily has a constant size.
14324 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
14326         PR middle-end/85862
14327         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
14329 2018-05-22  Richard Biener  <rguenther@suse.de>
14331         PR tree-optimization/85834
14332         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
14333         non-constant and non-zero memset arguments.
14335 2018-05-22  Martin Liska  <mliska@suse.cz>
14337         PR ipa/85607
14338         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
14340 2018-05-22  Richard Biener  <rguenther@suse.de>
14342         PR tree-optimization/85863
14343         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
14344         comparisons when vectype is specified.
14345         (vectorizable_condition): Do not specify vectype for
14346         vect_is_simple_cond when SLP vectorizing.
14348 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
14350         PR target/85657
14351         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
14352         define __ibm128 as long double.
14353         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
14354         as a distinct type when IEEE 128-bit support is enabled.
14355         (init_float128_ieee): Fix up conversions between IFmode and IEEE
14356         128-bit types to use the correct functions.
14357         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
14358         convert between 128-bit floating point types that have different
14359         modes but the same representation, instead of using gen_lowpart to
14360         makean alias.
14361         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
14362         KFmode.
14363         (IFKF_reg): New attributes to give the register constraints for
14364         IFmode and KFmode.
14365         (extend<mode>tf2_internal): New insns to mark an explicit
14366         conversion between 128-bit floating point types that have a
14367         different mode but share the same representation.
14369 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
14371         PR tree-optimization/85814
14372         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
14373         a null return from get_strinfo when unsharing the next
14374         strinfo in the chain.
14376 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14378         PR gcc/84923
14379         * varasm.c (weak_finish): Clean up weak_decls.
14381 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14383         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
14384         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
14385         UNSPEC_UADALP values.
14386         * config/aarch64/iterators.md (ABAL): New int iterator.
14387         (ABDL2): Likewise.
14388         (ADALP): Likewise.
14389         (sur): Add mappings for the above.
14390         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
14391         New define_insn.
14392         (aarch64_<sur>abal<mode>_4): Likewise.
14393         (aarch64_<sur>adalp<mode>_3): Likewise.
14394         (<sur>sadv16qi): New define_expand.
14396 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
14398         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
14399         (*movdf_internal): Ditto.
14400         (*rcpsf2_sse): Ditto.
14401         (*rsqrtsf2_sse): Ditto.
14402         (*sqrt<mode>2_sse): Ditto.
14404 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
14406         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
14407         eor3q<mode>4.
14408         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
14409         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
14410         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
14411         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
14412         vbcaxq_s64): New.
14413         * config/aarch64/arm_neon.h: Likewise.
14414         * config/aarch64/iterators.md (VQ_I): New.
14416 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
14418         * config.gcc: Add arc/t-multilib-linux to tmake_file for
14419         arc*-*-linux*.
14420         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
14421         MULTILIB_DIRNAMES
14423 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
14425         * config/nds32/constraints.md (S): New constraint.
14426         * config/nds32/nds32.md (call_internal): Use constraint S.
14427         (call_value_internal): Likewise.
14428         (sibcall_internal): Likewise.
14429         (sibcall_value_internal): Likewise.
14431 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
14432             Chung-Ju Wu  <jasonwucj@gmail.com>
14434         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
14435         into consideration.
14437 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
14438             Chung-Ju Wu  <jasonwucj@gmail.com>
14440         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
14441         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
14442         (nds32_rtx_costs_impl): Simplify.
14443         (nds32_address_cost_impl): Simplify.
14444         (nds32_init_rtx_costs): New function.
14445         (nds32_rtx_costs_speed_prefer): Likewise.
14446         (nds32_rtx_costs_size_prefer): Likewise.
14447         (nds32_address_cost_speed_prefer): Likewise.
14448         (nds32_address_cost_speed_fwprop): Likewise.
14449         (nds32_address_cost_size_prefer): Likewise.
14450         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
14451         * config/nds32/nds32.c (nds32_option_override): Use
14452         nds32_init_rtx_costs function.
14454 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
14456         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
14457         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
14458         (TARGET_PIPELINE_N8): Likewise.
14459         (TARGET_PIPELINE_N10): Likewise.
14460         (TARGET_PIPELINE_N13): Likewise.
14461         (TARGET_PIPELINE_GRAYWOLF): Likewise.
14463 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
14465         * config/nds32/nds32-fpu.md: Update copyright year.
14467 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14469         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
14471 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14473         * config/nds32/nds32.c
14474         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
14475         * config/nds32/nds32.opt (minline-asm-r15): New option.
14477 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14479         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
14480         MASK_HW_ABS.
14481         * config/nds32/nds32.md (abssi2): New pattern.
14483 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
14485         * config/i386/i386.md (rex64namesuffix): New mode attribute.
14486         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
14487         Merge insn pattern from sse_cvtsi2ss<round_name> and
14488         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
14489         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
14490         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
14491         using SWI48 mode iterator.
14492         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
14493         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
14494         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
14495         pattern from sse_cvttss2si<round_saeonly_name>
14496         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
14497         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
14498         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
14499         using SWI48 mode iterator.
14500         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
14501         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
14502         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
14503         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
14504         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
14505         using SWI48 mode iterator.
14506         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
14507         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
14508         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
14509         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
14510         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
14511         SWI48 mode iterator.
14512         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
14513         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
14514         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
14515         pattern from sse_cvttsd2si<round_saeonly_name>
14516         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
14518 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14520         * config/nds32/nds32-md-auxiliary.c
14521         (nds32_valid_smw_lwm_base_p): Refine.
14522         (nds32_output_smw_single_word): Refine.
14523         (nds32_output_smw_double_word): New.
14524         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
14526 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14528         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
14529         (nds32_output_stack_pop): Refine.
14530         (nds32_expand_unaligned_load): Refine.
14531         (nds32_expand_unaligned_store): Refine.
14533 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
14534             Chung-Ju Wu  <jasonwucj@gmail.com>
14536         * config/nds32/constants.md: Add TP_REGNUM constant.
14537         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
14538         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
14539         UNSPEC_ADD32.
14540         * config/nds32/nds32-doubleword.md: Consider flag_pic.
14541         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
14542         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
14543         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
14544         and PIC code generation.
14545         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
14546         code generation.
14547         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
14548         optimization.
14549         * config/nds32/nds32.md: Support TLS and PIC.
14550         * config/nds32/nds32.c: Support TLS and PIC.
14551         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
14552         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
14553         predicate.
14555 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
14557         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
14558         mode with E_ prefix.
14560 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
14561             Chung-Ju Wu  <jasonwucj@gmail.com>
14563         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
14564         * config/nds32/nds32-md-auxiliary.c
14565         (symbolic_reference_mentioned_p): New.
14566         (nds32_legitimize_ict_address): New.
14567         (nds32_expand_ict_move): New.
14568         (nds32_indirect_call_referenced_p): New.
14569         (nds32_symbol_binds_local_p): Delete.
14570         (nds32_long_call_p): Modify.
14571         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
14572         * config/nds32/nds32-protos.h
14573         (symbolic_reference_mentioned_p): Declare.
14574         (nds32_legitimize_ict_address): Declare.
14575         (nds32_expand_ict_move): Declare.
14576         (nds32_indirect_call_referenced_p): Declare.
14577         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
14578         (nds32_relax_group): Use nds32_ict_const_p as condition.
14579         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
14580         (nds32_asm_file_start): Output ict_model directive in asm code.
14581         (nds32_legitimate_address_p): Consider indirect call.
14582         (nds32_print_operand): Consider indirect call.
14583         (nds32_print_operand_address): Consider indirect call.
14584         (nds32_insert_attributes): Handle "indirect_call" attribute.
14585         (TARGET_LEGITIMATE_ADDRESS_P): Define.
14586         (TARGET_LEGITIMATE_CONSTANT_P): Define.
14587         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
14588         (TARGET_DELEGITIMIZE_ADDRESS): Define.
14589         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
14590         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
14591         (TARGET_ICT_MODEL_SMALL): Define.
14592         (TARGET_ICT_MODEL_LARGE): Define.
14593         * config/nds32/nds32.md (movsi): Consider ict model.
14594         (call, call_value): Consider ict model.
14595         (sibcall, sibcall_value): Consider ict model.
14596         * config/nds32/nds32.opt (mict-model): New option.
14597         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
14598         model.
14600 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
14601             Monk Chiang  <sh.chiang04@gmail.com>
14602             Jim Wilson <jimw@sifive.com>
14604         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
14605         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
14606         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
14607         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
14608         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
14609         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
14610         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
14611         compute save_libcall_adjustment properly.
14612         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
14613         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
14614         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
14615         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
14616         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
14617         (ABI_SPEC): Handle mabi=ilp32e.
14618         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
14619         (RVE): Add RVE mask.
14620         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
14621         <-march>: Add rv32e as an example.
14623 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
14625         PR c++/82899
14626         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
14627         (intra_create_variable_infos): Handle C++ constructors.
14629 2018-05-18  Martin Liska  <mliska@suse.cz>
14631         * passes.def: Remove a redundant pass.
14633 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
14635         PR bootstrap/85838
14636         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
14638 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14640         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
14641         (ARMv4): Update.
14642         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
14643         (ARMv6m): Update.
14644         (armv2, armv2a, armv3, armv3m): Delete architectures.
14645         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
14646         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
14647         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
14648         Delete cpus.
14649         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
14650         (*mulsidi3adddi): Likewise.
14651         (mulsidi3): Likewise.
14652         (*mulsidi3_nov6): Likewise.
14653         (umulsidi3): Likewise.
14654         (umulsidi3_nov6): Likewise.
14655         (umaddsidi4): Likewise.
14656         (*umulsidi3adddi): Likewise.
14657         (smulsi3_highpart): Likewise.
14658         (*smulsi3_highpart_nov6): Likewise.
14659         (umulsi3_highpart): Likewise.
14660         (*umulsi3_highpart_nov6): Likewise.
14661         * config/arm/arm.h (arm_arch3m): Delete.
14662         * config/arm/arm.c (arm_arch3m): Delete.
14663         (arm_option_override_internal): Update armv3-related comment.
14664         (arm_configure_build_target): Delete use of isa_bit_mode32.
14665         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
14666         (arm_rtx_costs_internal): Delete check of arm_arch3m.
14667         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
14668         (mulsa3): Likewise.
14669         (mulusa3): Likewise.
14670         * config/arm/arm-protos.h (arm_arch3m): Delete.
14671         * config/arm/arm-tables.opt: Regenerate.
14672         * config/arm/arm-tune.md: Likewise.
14673         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
14674         deleted architectures.
14676 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14678         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
14679         (armv5t, armv5te): New features.
14680         (ARMv5, ARMv5e): Delete fgroups.
14681         (ARMv5t, ARMv5te): Adjust for above changes.
14682         (ARMv6m): Likewise.
14683         (armv5, armv5e): Delete arches.
14684         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
14685         arm_arch5.
14686         (*call_reg_arm): Likewise.
14687         (*call_value_reg_armv5): Likewise.
14688         (*call_value_reg_arm): Likewise.
14689         (*call_symbol): Likewise.
14690         (*call_value_symbol): Likewise.
14691         (*sibcall_insn): Likewise.
14692         (*sibcall_value_insn): Likewise.
14693         (clzsi2): Likewise.
14694         (prefetch): Likewise.
14695         (define_split and define_peephole2 dependent on arm_arch5):
14696         Likewise.
14697         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
14698         arm_arch5e.
14699         (TARGET_ARM_QBIT): Likewise.
14700         (TARGET_DSP_MULTIPLY): Likewise.
14701         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
14702         (arm_arch5, arm_arch5e): Delete.
14703         (arm_arch5t, arm_arch5te): Declare.
14704         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
14705         (arm_arch5t): Declare.
14706         (arm_option_reconfigure_globals): Update for the above.
14707         (arm_options_perform_arch_sanity_checks): Update comment, replace
14708         use of arm_arch5 with arm_arch5t.
14709         (use_return_insn): Likewise.
14710         (arm_emit_call_insn): Likewise.
14711         (output_return_instruction): Likewise.
14712         (arm_final_prescan_insn): Likewise.
14713         (arm_coproc_builtin_available): Likewise.
14714         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
14715         arm_arch5e with arm_arch5t and arm_arch5te.
14716         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
14717         (arm_arch5t, arm_arch5te): Declare.
14718         * config/arm/arm-tables.opt: Regenerate.
14719         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
14720         * config/arm/t-multilib: Likewise.
14721         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
14722         instead of arm_arch5.
14723         (*call_reg_thumb1): Likewise.
14724         (*call_value_reg_thumb1_v5): Likewise.
14725         (*call_value_reg_thumb1): Likewise.
14726         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
14727         unreachable path.
14728         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
14730 2018-05-18  Martin Liska  <mliska@suse.cz>
14732         PR gcov-profile/84846
14733         * doc/gcov.texi: Document -t option of gcov tool.
14735 2018-05-18  Martin Liska  <mliska@suse.cz>
14737         PR gcov-profile/84846
14738         * gcov.c (print_usage): Add new -t option.
14739         (process_args): Handle the option.
14740         (generate_results): Use stdout as output when requested by
14741         the option.
14743 2018-05-18  Martin Liska  <mliska@suse.cz>
14745         PR gcov-profile/84846
14746         * coverage.c (coverage_init): Write PWD to .gcno file.
14747         * doc/gcov.texi: Document how working directory is printed.
14748         * gcov-dump.c (dump_gcov_file): Print PWD.
14749         * gcov.c (output_intermediate_file): Likewise.
14750         (read_graph_file): Read PWD string.
14751         (output_lines): Print PWD.
14753 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
14755         PR middle-end/85817
14756         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
14757         for retval and return false if all args to phi are zero.
14759 2018-05-18  Richard Biener  <rguenther@suse.de>
14761         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
14762         method.
14763         (evrp_dom_walker::before_dom_children): Call it.
14765 2018-05-18  Richard Biener  <rguenther@suse.de>
14767         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
14768         results when processing array refs with variable index.
14770 2018-05-18  Toon Moene  <toon@moene.org>
14772         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
14773         directly after that of -floop-interchange. Indicate that both
14774         options are enabled by default when specifying -O3.
14776 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14778         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
14779         iterator.  Delete separate integer-mode vec_set<mode> expander.
14780         (aarch64_simd_vec_setv2di): Delete.
14781         (vec_setv2di): Delete.
14782         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
14783         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
14784         the "w, r" alternative.
14786 2018-05-18  Martin Liska  <mliska@suse.cz>
14788         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
14789         * tree-pass.h (make_pass_lower_switch_O0): New function.
14790         * tree-switch-conversion.c (node_has_low_bound): Remove.
14791         (node_has_high_bound): Likewise.
14792         (node_is_bounded): Likewise.
14793         (class pass_lower_switch): Make it a template type and create
14794         two instances.
14795         (pass_lower_switch::execute): Add template argument.
14796         (make_pass_lower_switch): New function.
14797         (make_pass_lower_switch_O0): New function.
14798         (do_jump_if_equal): Remove.
14799         (emit_case_nodes): Simplify to just handle all 3 cases and leave
14800         all the hard work to tree optimization passes.
14802 2018-05-18  Martin Liska  <mliska@suse.cz>
14804         * dbgcnt.c (limit_low): Renamed from limit.
14805         (limit_high): New variable.
14806         (dbg_cnt_is_enabled): Check for upper limit.
14807         (dbg_cnt): Adjust dumping.
14808         (dbg_cnt_set_limit_by_index): Add new argument for high
14809         value.
14810         (dbg_cnt_set_limit_by_name): Likewise.
14811         (dbg_cnt_process_single_pair): Parse new format.
14812         (dbg_cnt_process_opt): Use strtok.
14813         (dbg_cnt_list_all_counters): Remove 'value' and add
14814         'limit_high'.
14815         * doc/invoke.texi: Document changes.
14817 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
14819         * doc/sourcebuild.texi (scalar_all_fma): Document.
14820         * tree.def (FMA_EXPR): Delete.
14821         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
14822         * internal-fn.c (ternary_direct): New macro.
14823         (expand_ternary_optab_fn): Likewise.
14824         (direct_ternary_optab_supported_p): Likewise.
14825         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
14826         * builtins.c (fold_builtin_fma): Delete.
14827         (fold_builtin_3): Don't call it.
14828         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
14829         * expr.c (expand_expr_real_2): Likewise.
14830         * fold-const.c (operand_equal_p): Likewise.
14831         (fold_ternary_loc): Likewise.
14832         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
14833         * gimple.c (DEFTREECODE): Likewise.
14834         * gimplify.c (gimplify_expr): Likewise.
14835         * optabs-tree.c (optab_for_tree_code): Likewise.
14836         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
14837         * tree-eh.c (operation_could_trap_p): Likewise.
14838         (stmt_could_throw_1_p): Likewise.
14839         * tree-inline.c (estimate_operator_cost): Likewise.
14840         * tree-pretty-print.c (dump_generic_node): Likewise.
14841         (op_code_prio): Likewise.
14842         * tree-ssa-loop-im.c (stmt_cost): Likewise.
14843         * tree-ssa-operands.c (get_expr_operands): Likewise.
14844         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
14845         * fold-const-call.h (fold_fma): Delete.
14846         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
14847         CFN_FNMA and CFN_FNMS.
14848         (fold_fma): Delete.
14849         * genmatch.c (combined_fn): New enum.
14850         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
14851         (commutative_op): New function.
14852         (commutate): Use it.  Handle more than 2 operands.
14853         (dt_operand::gen_gimple_expr): Use commutative_op.
14854         (parser::parse_expr): Allow :c to be used with non-binary
14855         operators if the commutative operand is known.
14856         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
14857         CFN_FMS, CFN_FNMA and CFN_FNMS.
14858         (backprop::process_assign_use): Remove FMA_EXPR handling.
14859         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
14860         (gen_hsa_fma): New function.
14861         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
14862         IFN_FNMA and IFN_FNMS.
14863         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
14864         * gimple-fold.h (follow_all_ssa_edges): Declare.
14865         * gimple-fold.c (follow_all_ssa_edges): New function.
14866         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
14867         gimple_build interface and use follow_all_ssa_edges to fold the result.
14868         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
14869         instead of checking for optabs directly.
14870         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
14871         rather than FMA_EXPRs.
14872         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
14873         call to IFN_FMA instead of an FMA_EXPR.
14875 2018-05-17  Jim Wilson  <jimw@sifive.com>
14877         * expr.c (do_tablejump): When converting index to Pmode, if we have a
14878         sign extended promoted subreg, and the range does not have the sign bit
14879         set, then do a sign extend.
14881         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
14882         test, check for sign extended subreg and/or constant operands, and
14883         do a sign extend in that case.
14885 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
14887         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
14888         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
14889         Add untyped.
14890         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
14891         Change logics_shift_reg to logics_shift_imm.
14892         (thunderx2t99_fp_loadpair_basic): Delete.
14893         (thunderx2t99_fp_storepair_basic): Delete.
14894         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
14895         (thunderx2t99_asimd_polynomial): Delete.
14896         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
14897         and neon_fp_mul_d_scalar_q.
14898         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
14899         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
14900         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
14901         (thunderx2t99_asimd_lut): Add missing tbl types.
14902         (thunderx2t99_asimd_ext): Delete.
14903         (thunderx2t99_asimd_load1_1_mult): Delete.
14904         (thunderx2t99_asimd_load1_2_mult): Delete.
14905         (thunderx2t99_asimd_load1_ldp): New.
14906         (thunderx2t99_asimd_load1): New.
14907         (thunderx2t99_asimd_load2): Add missing *load2* types.
14908         (thunderx2t99_asimd_load3): New.
14909         (thunderx2t99_asimd_load4): New.
14910         (thunderx2t99_asimd_store1_1_mult): Delete.
14911         (thunderx2t99_asimd_store1_2_mult): Delete.
14912         (thunderx2t99_asimd_store2_mult): Delete.
14913         (thunderx2t99_asimd_store2_onelane): Delete.
14914         (thunderx2t99_asimd_store_stp): New.
14915         (thunderx2t99_asimd_store1): New.
14916         (thunderx2t99_asimd_store2): New.
14917         (thunderx2t99_asimd_store3): New.
14918         (thunderx2t99_asimd_store4): New.
14920 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
14922         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
14923         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
14925 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
14926             Segher Boessenkool  <segher@kernel.crashing.org>
14928         PR target/85698
14929         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
14930         operand.
14932 2018-05-17  Richard Biener  <rguenther@suse.de>
14934         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
14935         for pruning loop and prune defs feeding only already visited PHIs.
14937 2018-05-17  Richard Biener  <rguenther@suse.de>
14939         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
14941 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
14942             Richard Biener  <rguenther@suse.de>
14944         PR tree-optimization/85793
14945         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
14946         for VMAT_ELEMENTWISE.
14948 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
14950         * internal-fn.h (lookup_internal_fn): Declare
14951         * internal-fn.c (lookup_internal_fn): New function.
14952         * gimple.c (gimple_build_call_from_tree): Handle calls to
14953         internal functions.
14954         * gimple-pretty-print.c (dump_gimple_call): Print "." before
14955         internal function names.
14956         * tree-pretty-print.c (dump_generic_node): Likewise.
14957         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
14959 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
14961         * gimple-fold.h (gimple_build): Make the function forms take
14962         combined_fn rather than built_in_function.
14963         (gimple_simplify): Likewise.
14964         * gimple-match-head.c (gimple_simplify): Likewise.
14965         * gimple-fold.c (gimple_build): Likewise.
14966         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
14967         rather than gimple_build_call_internal.
14968         (get_initial_defs_for_reduction): Likewise.
14969         (vect_create_epilog_for_reduction): Likewise.
14970         (vectorizable_live_operation): Likewise.
14972 2018-05-17  Martin Liska  <mliska@suse.cz>
14974         * gimple-ssa-sprintf.c (format_directive): Do not use
14975         space in between 'G_' and '('.
14977 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
14979         PR target/85323
14980         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
14981         even if the mask is not all ones.
14983         PR target/85323
14984         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
14985         vector.
14986         (ix86_gimple_fold_builtin): Likewise.
14988         PR target/85323
14989         * config/i386/i386.c: Include tree-vector-builder.h.
14990         (ix86_vector_shift_count): New function.
14991         (ix86_fold_builtin): Fold shift builtins by scalar count.
14992         (ix86_gimple_fold_builtin): Likewise.
14994         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
14995         _mm512_setzero): New intrinsics.
14997 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
14998             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15000         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
15001         code generation for cases where splatting a value is not useful.
15002         * simplify-rtx.c (simplify_ternary_operation): Simplify
15003         vec_merge across a vec_duplicate and a paradoxical subreg forming
15004         a vector mode to a vec_concat.
15006 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
15008         * config.gcc: Support "goldmont-plus".
15009         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15010         "goldmont-plus".
15011         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15012         PROCESSOR_GOLDMONT_PLUS.
15013         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
15014         (processor_target_table): Add "goldmont-plus".
15015         (PTA_GOLDMONT_PLUS): Define.
15016         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
15017         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
15018         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
15019         (fold_builtin_cpu): Add "goldmont-plus".
15020         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
15021         (ix86_option_override_internal): Add "goldmont-plus".
15022         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
15023         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
15024         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
15025         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
15027 2018-05-17  Richard Biener  <rguenther@suse.de>
15029         PR tree-optimization/85757
15030         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
15031         remove defs that only feed that PHI from further processing.
15033 2018-05-16  Jim Wilson  <jimw@sifive.com>
15035         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
15036         asterisk to name.
15037         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
15039 2018-05-16  Mark Wielaard  <mark@klomp.org>
15041         * dwarf2out.c (count_index_strings): New function.
15042         (output_indirect_strings): Call count_index_strings and generate
15043         header for dwarf_version >= 5.
15045 2018-05-16  Mark Wielaard  <mark@klomp.org>
15047         * dwarf2out.c (dwarf_FORM): New function.
15048         (set_indirect_string): Use dwarf_FORM.
15049         (reset_indirect_string): Likewise.
15050         (size_of_die): Likewise.
15051         (value_format): Likewise.
15052         (output_die): Likewise.
15053         (add_skeleton_AT_string): Likewise.
15054         (output_macinfo_op): Likewise.
15055         (index_string): Likewise.
15056         (output_index_string_offset): Likewise.
15057         (output_index_string): Likewise.
15058         (count_index_strings): Likewise.
15060 2018-05-16  Carl Love  <cel@us.ibm.com>
15062         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15063         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
15065 2018-05-16  Martin Jambor  <mjambor@suse.cz>
15067         * ipa-prop.c (ipa_free_all_edge_args): Remove.
15068         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
15070 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
15072         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
15073         (fnma<mode>4): Likewise.
15074         (fms<mode>4): Likewise.
15075         (fnms<mode>4): Likewise.
15076         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
15077         (aarch64_fnma<mode>4): Likewise.
15078         (aarch64_fms<mode>4): Likewise.
15079         (aarch64_fnms<mode>4): Likewise.
15080         (aarch64_fnmadd<mode>4): Likewise.
15082 2018-05-16  Jason Merrill  <jason@redhat.com>
15084         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
15086 2018-05-16  Richard Biener  <rguenther@suse.de>
15088         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
15089         (dump_stmt_cost): Declare.
15090         (add_stmt_cost): Dump cost we add.
15091         (add_stmt_costs): New function.
15092         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
15093         No longer exported.
15094         (vect_analyze_stmt): Adjust prototype.
15095         (vectorizable_condition): Likewise.
15096         (vectorizable_live_operation): Likewise.
15097         (vectorizable_reduction): Likewise.
15098         (vectorizable_induction): Likewise.
15099         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
15100         cost vector to pass to vectorizable_ and record afterwards.
15101         (vect_model_reduction_cost): Take cost vector argument and adjust.
15102         (vect_model_induction_cost): Likewise.
15103         (vectorizable_reduction): Likewise.
15104         (vectorizable_induction): Likewise.
15105         (vectorizable_live_operation): Likewise.
15106         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
15107         SLP_TREE_NUMBER_OF_VEC_STMTS.
15108         (vect_analyze_slp_cost_1): Remove.
15109         (vect_analyze_slp_cost): Likewise.
15110         (vect_slp_analyze_node_operations): Take visited args and
15111         a target cost vector.  Avoid processing already visited stmt sets.
15112         (vect_slp_analyze_operations): Use a local cost vector to gather
15113         costs and register those of non-discarded instances.
15114         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
15115         (vect_schedule_slp_instance): Remove copying of
15116         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
15117         zero.
15118         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
15119         adding cost.  Record cost entry location.
15120         (vect_prologue_cost_for_slp_op): Function to compute cost of
15121         a constant or invariant generated for SLP vect in the prologue,
15122         split out from vect_analyze_slp_cost_1.
15123         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
15124         (vect_model_promotion_demotion_cost): Likewise.
15125         (vect_model_store_cost): Likewise, make static.
15126         (vect_model_load_cost): Likewise.
15127         (vectorizable_bswap): Add cost vector arg and adjust.
15128         (vectorizable_call): Likewise.
15129         (vectorizable_simd_clone_call): Likewise.
15130         (vectorizable_conversion): Likewise.
15131         (vectorizable_assignment): Likewise.
15132         (vectorizable_shift): Likewise.
15133         (vectorizable_operation): Likewise.
15134         (vectorizable_store): Likewise.
15135         (vectorizable_load): Likewise.
15136         (vectorizable_condition): Likewise.
15137         (vectorizable_comparison): Likewise.
15138         (can_vectorize_live_stmts): Likewise.
15139         (vect_analyze_stmt): Likewise.
15140         (vect_transform_stmt): Adjust calls to vectorizable_*.
15141         * tree-vectorizer.c: Include gimple-pretty-print.h.
15142         (dump_stmt_cost): New function.
15144 2018-05-16  Richard Biener  <rguenther@suse.de>
15146         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
15147         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
15148         * tree-ssa-dse.c: Include tree-ssa-loop.h.
15149         (check_name): New callback.
15150         (dse_classify_store): Track cycles via a visited bitmap of PHI
15151         defs and simplify handling of in-loop and across loop dead stores
15152         and properly fail for loop-variant refs.  Handle byte-tracking with
15153         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
15154         limiting the walk.
15156 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
15158         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
15159         (vect_get_mask_type_for_stmt): Likewise.
15160         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
15161         split out from...
15162         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
15163         to determine the statement's vector type and the vector type that
15164         should be used for calculating nunits.  Deal with cases in which
15165         the type has to be deferred.
15166         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
15167         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
15168         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
15169         (vect_determine_vf_for_stmt): New functions, split out from...
15170         (vect_determine_vectorization_factor): ...here.
15171         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
15172         (vect_get_mask_type_for_stmt): New functions, split out from
15173         vect_determine_vectorization_factor.
15175 2018-05-16  Richard Biener  <rguenther@suse.de>
15177         * tree-cfg.c (verify_gimple_assign_ternary): Properly
15178         verify the [VEC_]COND_EXPR embedded comparison.
15180 2018-05-15  Martin Sebor  <msebor@redhat.com>
15182         PR tree-optimization/85753
15183         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
15184         RECORD_TYPE in addition to ARRAY_TYPE.
15186 2018-05-15  Martin Sebor  <msebor@redhat.com>
15188         PR middle-end/85643
15189         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
15191 2018-05-15  Richard Biener  <rguenther@suse.de>
15193         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
15194         add by_clobber_p one.  Change algorithm to collect all defs
15195         representing uses we need to walk and try reducing them to
15196         a single one before failing.
15197         (dse_dom_walker::dse_optimize_stmt): Adjust.
15199 2018-05-13  Mark Wielaard  <mark@klomp.org>
15201         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
15202         (size_of_loc_descr): Likewise.
15203         (output_loc_operands): Likewise.
15204         (output_loc_operands_raw): Likewise.
15205         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
15206         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
15207         (hash_loc_operands): Likewise.
15208         (compare_loc_operands): Likewise.
15210 2018-05-14  Mark Wielaard  <mark@klomp.org>
15212         * dwarf2out.c (count_index_addrs): New function.
15213         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
15215 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15217         PR tree-optimization/83648
15218         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
15219         return value as malloc candidate.
15221 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15223         PR ipa/85734
15224         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
15225         param as true in call to suggest_attribute.
15227 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
15229         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
15230         -mreadonly-in-sdata.
15232 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15234         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
15235         New pattern.
15236         (aarch64_crypto_aesd_fused): Likewise.
15238 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
15240         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
15241         (movsi_aarch64): Likewise.
15242         (load_pairsi): Likewise.
15243         (load_pairdi): Likewise.
15244         (store_pairsi): Likewise.
15245         (store_pairdi): Likewise.
15246         (load_pairsf): Likewise.
15247         (load_pairdf): Likewise.
15248         (store_pairsf): Likewise.
15249         (store_pairdf): Likewise.
15250         (zero_extend): Likewise.
15251         (trunc): Swap alternatives.
15252         (fcvt_target): Add '?' to prefer w over r.
15254 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
15256         PR target/85756
15257         * config/i386/i386.md: Disallow non-commutative arithmetics in
15258         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
15259         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
15260         in the peephole2 before it.
15262 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
15264         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
15265         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
15266         (ix86_handle_option): Handle -mcldemote.
15267         * config.gcc: New header.
15268         * config/i386/cldemoteintrin.h: New file.
15269         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
15270         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15271         -mcldemote.
15272         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15273         OPTION_MASK_ISA_CLDEMOTE.
15274         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
15275         (ix86_valid_target_attribute_inner_p): Ditto.
15276         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
15277         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
15278         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
15279         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
15280         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
15281         (cldemote): New.
15282         * config/i386/i386.opt: Add -mcldemote.
15283         * config/i386/x86intrin.h: New header.
15284         * doc/invoke.texi: Add -mcldemote.
15286 2018-05-14  Richard Biener  <rguenther@suse.de>
15288         * doc/match-and-simplify.texi: Adjust :s documentation.
15290 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
15292         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
15293         intended memcpy size.
15294         (REORDER_45): Likewise.
15296 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
15298         * sort.cc: New file.
15299         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
15300         * vec.c (qsort_chk): Use gcc_qsort.
15301         * Makefile.in (OBJS-libcommon): Add sort.o.
15302         (build/sort.o): New target.  Use it...
15303         (BUILD_RTL): ... here, and...
15304         (build/gencfn-macros): ... here, and...
15305         (build/genmatch): ... here.
15307 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
15308             Chung-Ju Wu  <jasonwucj@gmail.com>
15310         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
15311         * config/nds32/nds32-graywolf.md: New file.
15312         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
15313         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
15314         pipeline.
15315         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
15316         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
15317         * config/nds32/nds32.md (pipeline_model): Add graywolf.
15318         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
15319         * config/nds32/pipelines.md: Include n15 settings.
15321 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
15322             Chung-Ju Wu  <jasonwucj@gmail.com>
15324         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
15325         * config/nds32/nds32-n13.md: New file.
15326         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
15327         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
15328         pipeline.
15329         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
15330         * config/nds32/nds32.md (pipeline_model): Add n13.
15331         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
15332         * config/nds32/pipelines.md: Include n13 settings.
15334 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
15335             Chung-Ju Wu  <jasonwucj@gmail.com>
15337         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
15338         * config/nds32/nds32-n10.md: New file.
15339         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
15340         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
15341         pipeline.
15342         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
15343         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
15344         * config/nds32/nds32.md (pipeline_model): Add n10.
15345         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
15346         * config/nds32/pipelines.md: Include n10 settings.
15348 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
15349             Kito Cheng  <kito.cheng@gmail.com>
15350             Chung-Ju Wu  <jasonwucj@gmail.com>
15352         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
15353         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15354         Add enum values for DSP extension instructions.
15355         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
15356         New constraints.
15357         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
15358         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
15359         New code iterators.
15360         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
15361         * config/nds32/nds32-dspext.md: New file for DSP implementation.
15362         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
15363         * config/nds32/nds32-intrinsic.md: Likewise.
15364         * config/nds32/nds32_intrinsic.h: Likewise.
15365         * config/nds32/nds32-md-auxiliary.c: Likewise.
15366         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
15367         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
15368         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
15369         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
15370         * config/nds32/nds32-protos.h: New declarations for DSP extension.
15371         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
15372         TYPE_DMAC in switch statement.
15373         * config/nds32/nds32.c: New checking and implementation for DSP
15374         extension instructions.
15375         * config/nds32/nds32.h: Likewise.
15376         * config/nds32/nds32.md: Likewise.
15377         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
15378         * config/nds32/predicates.md: Implement new predicates for DSP
15379         extension.
15381 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
15383         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
15384         Reformat alternatives and attributes so it is easier to identify
15385         which constraints/attributes go with which instruction.
15386         (mov<mode>_hardfloat32, FMOVE64): Likewise.
15387         (mov<mode>_softfloat32, FMOVE64): Likewise.
15388         (mov<mode>_hardfloat64, FMOVE64): Likewise.
15389         (mov<mode>_softfloat64, FMOVE64): Likewise.
15391 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15393         * doc/extend.texi (PowerPC Built-in Functions): Rename this
15394         subsection.
15395         (Basic PowerPC Built-in Functions): The new name of the
15396         subsection previously known as "PowerPC Built-in Functions".
15397         (Basic PowerPC Built-in Functions Available on all Configurations):
15398         New subsubsection.
15399         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
15400         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
15401         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
15402         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
15404 2018-05-11  Martin Jambor  <mjambor@suse.cz>
15406         PR ipa/85655
15407         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
15408         single const.
15410 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
15412         PR target/85733
15413         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
15415 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
15417         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
15418         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
15419         (ix86_handle_option): Handle -mwaitpkg.
15420         * config.gcc: New header.
15421         * config/i386/cpuid.h (bit_WAITPKG): New bit.
15422         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
15423         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
15424         function type.
15425         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15426         OPTION_MASK_ISA_WAITPKG.
15427         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
15428         (ix86_option_override_internal): Add PTA_WAITPKG.
15429         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
15430         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
15431         IX86_BUILTIN_TPAUSE.
15432         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
15433         __builtin_ia32_umwait and __builtin_ia32_tpause.
15434         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
15435         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
15436         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
15437         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
15438         UNSPECV_TPAUSE): New.
15439         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
15440         * config/i386/i386.opt: Add -mwaitpkg.
15441         * config/i386/waitpkgintrin.h: New file.
15442         * config/i386/x86intrin.h: New header.
15443         * doc/invoke.texi: Add -mwaitpkg.
15445 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
15447         PR target/85606
15448         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
15449         equivalent.
15450         (cortex-m0): Use armv6s-m isa.
15451         (cortex-m0plus): Likewise.
15452         (cortex-m1): Likewise.
15453         (cortex-m0.small-multiply): Likewise.
15454         (cortex-m0plus.small-multiply): Likewise.
15455         (cortex-m1.small-multiply): Likewise.
15457 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
15458             Jakub Jelinek  <jakub@redhat.com>
15460         PR tree-optimization/85692
15461         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
15462         source permute as well.
15464 2018-05-11  Martin Liska  <mliska@suse.cz>
15466         PR sanitizer/85556
15467         * doc/extend.texi: Document LLVM style format for no_sanitize
15468         attribute.
15470 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
15472         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
15473         mode_supports_vsx_dform_quad to mode_supports_dq_form.
15474         (mode_supports_vsx_dform_quad): Likewise.
15475         (mode_supports_vmx_dform): Move these functions to be next to the
15476         other mode_supports functions.
15477         (mode_supports_dq_form): Likewise.
15478         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
15479         mode_supports_dq_form.
15480         (reg_offset_addressing_ok_p): Likewise.
15481         (offsettable_ok_by_alignment): Likewise.
15482         (rs6000_legitimate_offset_address_p): Likewise.
15483         (legitimate_lo_sum_address_p): Likewise.
15484         (rs6000_legitimize_address): Likewise.
15485         (rs6000_legitimize_reload_address): Likewise.
15486         (rs6000_secondary_reload_inner): Likewise.
15487         (rs6000_preferred_reload_class): Likewise.
15488         (rs6000_output_move_128bit): Likewise.
15490 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
15492         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
15493         Generate SImode target register for null target.
15494         <case IX86_BUILTIN_XGETBV>: Ditto.
15495         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
15496         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
15498 2018-05-10  Carl Love  <cel@us.ibm.com>
15500         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15501         dcbtt and dcbtstt if operands[2] is 0.
15503 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
15505         PR target/85693
15506         * config/i386/sse.md (usadv64qi): New expander.
15508 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
15510         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
15511         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
15512         -maltivec=be support.
15513         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
15514         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
15515         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
15516         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
15517         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
15518         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
15519         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
15520         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
15521         altivec_vsumsws): Adjust.
15522         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
15523         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
15524         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
15525         support.
15526         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
15527         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
15528         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
15529         (altivec_lve<VI_char>x): Delete expand.
15530         (*altivec_lve<VI_char>x_internal): Rename to...
15531         (altivec_lve<VI_char>x): ... this.
15532         (altivec_lvxl_<mode>): Delete expand.
15533         (*altivec_lvxl_<mode>_internal): Rename to ...
15534         (altivec_lvxl_<mode>): ... this.
15535         (altivec_stvxl_<mode>): Delete expand.
15536         (*altivec_stvxl_<mode>_internal): Rename to ...
15537         (altivec_stvxl_<mode>): ... this.
15538         (altivec_stve<VI_char>x): Delete expand.
15539         (*altivec_stve<VI_char>x_internal): Rename to ...
15540         (altivec_stve<VI_char>x): ... this.
15541         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
15542         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
15543         reduc_plus_scal_<mode>): Adjust.
15544         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
15545         comment.
15546         (rs6000_cpu_cpp_builtins): Adjust.
15547         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
15548         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
15549         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
15550         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
15551         -maltivec=be support.
15552         (rs6000_split_vec_extract_var): Adjust.
15553         (rs6000_split_v4si_init): Adjust.
15554         (swap_selector_for_mode): Delete.
15555         (altivec_expand_lvx_be, altivec_expand_stvx_be,
15556         altivec_expand_stvex_be): Delete.
15557         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
15558         -maltivec=be support.
15559         (rs6000_gimple_fold_builtin): Ditto.
15560         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
15561         Adjust.
15562         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
15563         (TARGET_DIRECT_MOVE_64BIT): Adjust.
15564         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
15565         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
15566         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
15567         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
15568         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
15569         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
15570         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
15571         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
15572         anonymous split): Adjust.
15573         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
15574         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
15576 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
15578         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
15579         when --with-gxx-include-dir is also specified.
15580         * configure: Regenerate.
15582 2018-05-09  Jim Wilson  <jimw@sifive.com>
15584         PR target/84797
15585         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
15586         * config/riscv/t-withmultilib: New.
15587         * config/riscv/withmultilib.h: New.
15588         * doc/install.texi: Document RISC-V --with-multilib-list support.
15590 2018-05-09  Richard Biener  <rguenther@suse.de>
15592         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
15593         vector.
15594         (vect_bb_vectorization_profitable_p): Adjust.  Compute
15595         actual scalar cost using the cost vector and the add_stmt_cost
15596         machinery.
15598 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15600         PR rtl-optimization/85645
15601         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
15602         in the REG_CFA_REGISTER note for LR, don't leave it empty.
15604 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15606         PR rtl-optimization/85645
15607         * shrink-wrap.c (spread_components): Return a boolean saying if
15608         anything was changed.
15609         (try_shrink_wrapping_separate): Iterate spread_components until
15610         nothing changes anymore.
15612 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15614         PR rtl-optimization/85645
15615         * regrename.c (build_def_use): Also kill the chains that include the
15616         destination of a REG_CFA_REGISTER note.
15618 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
15620         PR rtl-optimization/85645
15621         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
15622         insn that has a REG_CFA_REGISTER note.
15624 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
15626         * cfgexpand.c (expand_clobber): New function.
15627         (expand_gimple_stmt_1): Use it.
15628         * tree-vect-stmts.c (vect_clobber_variable): New function,
15629         split out from...
15630         (vectorizable_simd_clone_call): ...here.
15631         (vectorizable_store): Emit a clobber either side of an
15632         IFN_STORE_LANES sequence.
15633         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
15635 2018-05-09  Tom de Vries  <tom@codesourcery.com>
15637         PR target/85626
15638         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
15639         (define_insn "trap_if_false"): Add exit after trap.
15641 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
15643         PR rtl-optimization/85638
15644         * bb-reorder.c: Include common/common-target.h.
15645         (create_forwarder_block): New function extracted from...
15646         (fix_up_crossing_landing_pad): ...here.  Rename into...
15647         (dw2_fix_up_crossing_landing_pad): ...this.
15648         (sjlj_fix_up_crossing_landing_pad): New function.
15649         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
15650         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
15651         from both partitions and exit the loop after one iteration.
15653 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15655         Revert:
15656         * doc/extend.texi (PowerPC Built-in Functions): Rename this
15657         subsection.
15658         (Basic PowerPC Built-in Functions): The new name of the
15659         subsection previously known as "PowerPC Built-in Functions".
15660         (Basic PowerPC Built-in Functions Available on all Configurations):
15661         New subsubsection.
15662         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15663         subsubsection.
15664         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15665         subsubsection.
15666         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15667         subsubsection.
15668         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15669         subsubsection.
15671 2018-05-08  Jim Wilson  <jimw@sifive.com>
15673         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
15674         (LD_EMUL_SUFFIX): New.
15675         (LINK_SPEC): Use it.
15677 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15679         * doc/extend.texi (PowerPC Built-in Functions): Rename this
15680         subsection.
15681         (Basic PowerPC Built-in Functions): The new name of the
15682         subsection previously known as "PowerPC Built-in Functions".
15683         (Basic PowerPC Built-in Functions Available on all Configurations):
15684         New subsubsection.
15685         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15686         subsubsection.
15687         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15688         subsubsection.
15689         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15690         subsubsection.
15691         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15692         subsubsection.
15694 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
15696         PR target/85683
15697         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
15698         after cmpelim optimization.
15700 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
15702         * config.gcc: Support "goldmont".
15703         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
15704         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15705         PROCESSOR_GOLDMONT.
15706         * config/i386/i386.c (m_GOLDMONT): Define.
15707         (processor_target_table): Add "goldmont".
15708         (PTA_GOLDMONT): Define.
15709         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
15710         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
15711         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
15712         (fold_builtin_cpu): Add "goldmont".
15713         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
15714         (ix86_option_override_internal): Add "goldmont".
15715         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
15716         (processor_type): Add PROCESSOR_GOLDMONT.
15717         * config/i386/i386.md: Add CPU "glm".
15718         * config/i386/glm.md: New file.
15719         * config/i386/x86-tune.def: Add m_GOLDMONT.
15720         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
15722 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
15724         PR target/85572
15725         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
15726         E_V4DImode.
15727         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
15728         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
15729         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
15731         PR target/85317
15732         * config/i386/i386.c (ix86_fold_builtin): Handle
15733         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
15735         PR target/85480
15736         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
15737         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
15739 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
15741         PR target/85658
15742         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
15743         (check_arch): Likewise.
15744         (check_fpu): Return the result rather than printing it.
15745         (end arch): Fix operator precedence.
15746         (end cpu): Likewise.
15747         (END): Print the result from check_fpu.
15749 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
15750             Alan Hayward  <alan.hayward@arm.com>
15751             David Sherwood  <david.sherwood@arm.com>
15753         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
15754         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
15755         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
15756         (*fcmuo<mode>_and): New patterns.
15758 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
15760         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
15761         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
15762         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
15763         (cmp_op, sve_imm_con): New code attributes.
15764         (SVE_COND_INT_CMP, imm_con): Delete.
15765         (cmp_op): Remove above unspecs from int attribute.
15766         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
15767         to...
15768         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
15769         comparison-specific unspecs.
15770         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
15771         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
15772         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
15773         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
15774         (*vec_fcm<cmp_op><mode>): Rename to...
15775         (*fcm<cmp_op><mode>): ...this and adjust likewise.
15776         (*vec_fcmuo<mode>): Rename to...
15777         (*fcmuo<mode>): ...this and adjust likewise.
15778         (*pred_fcm<cmp_op><mode>): New pattern.
15779         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
15780         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
15781         functions.
15782         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
15783         and UNORDERED.
15784         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
15785         (aarch64_emit_sve_predicated_cond): New function.
15786         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
15787         (aarch64_emit_unspec_cond_or): Replace with...
15788         (aarch64_emit_sve_or_conds): ...this new function.  Use
15789         aarch64_emit_sve_ptrue_op for the individual comparisons and
15790         aarch64_emit_binop to OR them together.
15791         (aarch64_emit_inverted_unspec_cond): Replace with...
15792         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
15793         aarch64_emit_sve_ptrue_op for the comparison and
15794         aarch64_emit_unop to invert the result.
15795         (aarch64_expand_sve_vec_cmp_float): Update after the above
15796         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
15798 2018-05-07  Nathan Sidwell  <nathan@acm.org>
15800         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
15801         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
15802         (Backwards Compatibility): Likewise.
15804 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15806         PR bootstrap/85681
15807         Revert:
15808         2018-05-07  Luis Machado  <luis.machado@linaro.org>
15810         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15811         <prefetch_dynamic_strides>: New const bool field.
15812         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15813         prefetch_dynamic_strides.
15814         (exynosm1_prefetch_tune): Likewise.
15815         (thunderxt88_prefetch_tune): Likewise.
15816         (thunderx_prefetch_tune): Likewise.
15817         (thunderx2t99_prefetch_tune): Likewise.
15818         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15819         to false.
15820         (aarch64_override_options_internal): Update to set
15821         PARAM_PREFETCH_DYNAMIC_STRIDES.
15822         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15823         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15824         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15825         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15826         prefetch-dynamic-strides setting.
15828         2018-05-07  Luis Machado  <luis.machado@linaro.org>
15830         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15831         <minimum_stride>: New const int field.
15832         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15833         minimum_stride field.
15834         (exynosm1_prefetch_tune): Likewise.
15835         (thunderxt88_prefetch_tune): Likewise.
15836         (thunderx_prefetch_tune): Likewise.
15837         (thunderx2t99_prefetch_tune): Likewise.
15838         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15839         (aarch64_override_options_internal): Update to set
15840         PARAM_PREFETCH_MINIMUM_STRIDE.
15841         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15842         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15843         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15844         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15845         stride is constant and is below the minimum stride threshold.
15847 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15849         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
15850         to 512.
15852 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15854         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15855         <prefetch_dynamic_strides>: New const bool field.
15856         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15857         prefetch_dynamic_strides.
15858         (exynosm1_prefetch_tune): Likewise.
15859         (thunderxt88_prefetch_tune): Likewise.
15860         (thunderx_prefetch_tune): Likewise.
15861         (thunderx2t99_prefetch_tune): Likewise.
15862         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15863         to false.
15864         (aarch64_override_options_internal): Update to set
15865         PARAM_PREFETCH_DYNAMIC_STRIDES.
15866         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15867         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15868         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15869         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15870         prefetch-dynamic-strides setting.
15872 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15874         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15875         <minimum_stride>: New const int field.
15876         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15877         minimum_stride field.
15878         (exynosm1_prefetch_tune): Likewise.
15879         (thunderxt88_prefetch_tune): Likewise.
15880         (thunderx_prefetch_tune): Likewise.
15881         (thunderx2t99_prefetch_tune): Likewise.
15882         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15883         (aarch64_override_options_internal): Update to set
15884         PARAM_PREFETCH_MINIMUM_STRIDE.
15885         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15886         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15887         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15888         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15889         stride is constant and is below the minimum stride threshold.
15891 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
15893         PR c++/85659
15894         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
15895         the type is addressable.  Don't force op into register if it has
15896         BLKmode.
15898 2018-05-05  Roland McGrath  <mcgrathr@google.com>
15900         PR other/77609
15901         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
15902         any section for which we don't know a specific type it should have,
15903         regardless of name.  Previously this was done only for the exact
15904         names ".init_array", ".fini_array", and ".preinit_array".
15905         (default_elf_asm_named_section): Add comment about
15906         relationship with default_section_type_flags and SECTION_NOTYPE.
15907         (get_section): Don't consider it a type conflict if one side has
15908         SECTION_NOTYPE and the other doesn't, as long as neither has the
15909         SECTION_BSS et al used in the default_section_type_flags logic.
15911 2018-05-05  Tom de Vries  <tom@codesourcery.com>
15913         PR target/85653
15914         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
15915         (workaround_barsyncs): New function.
15916         (nvptx_reorg): Use workaround_barsyncs.
15917         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15918         (define_expand "nvptx_membar_cta"): New define_expand.
15919         (define_insn "*nvptx_membar_cta"): New insn.
15921 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
15923         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
15924         To improve optimization opportunities.
15925         * builtin-types.def: The new needed builtin types for the above.
15927 2018-05-04  Richard Biener  <rguenther@suse.de>
15929         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
15930         * gimple-ssa-store-merging.c
15931         (imm_store_chain_info::output_merged_store): Remove redundant create,
15932         release split_store vector contents on failure.
15933         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
15934         scalar stmt vector on cache hit.
15936 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
15938         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
15939         Xilinx FP support.
15940         * config.gcc (powerpc-xilinx-eabi*): Remove.
15941         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
15942         support.
15943         (fusion_addis_mem_combo_load): Ditto.
15944         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
15945         FP support.
15946         (rs6000_cpu_cpp_builtins): Ditto.
15947         * config/rs6000/rs6000-linux.c
15948         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
15949         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
15950         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
15951         support.
15952         (rs6000_setup_reg_addr_masks): Ditto.
15953         (rs6000_init_hard_regno_mode_ok): Ditto.
15954         (rs6000_option_override_internal): Ditto.
15955         (legitimate_lo_sum_address_p): Ditto.
15956         (rs6000_legitimize_address): Ditto.
15957         (rs6000_legitimize_reload_address): Ditto.
15958         (rs6000_legitimate_address_p): Ditto.
15959         (abi_v4_pass_in_fpr): Ditto.
15960         (setup_incoming_varargs): Ditto.
15961         (rs6000_gimplify_va_arg): Ditto.
15962         (rs6000_split_multireg_move): Ditto.
15963         (rs6000_savres_strategy): Ditto.
15964         (rs6000_emit_prologue_components): Ditto.
15965         (rs6000_emit_epilogue_components): Ditto.
15966         (rs6000_emit_prologue): Ditto.
15967         (rs6000_emit_epilogue): Ditto.
15968         (rs6000_elf_file_end): Ditto.
15969         (rs6000_function_value): Ditto.
15970         (rs6000_libcall_value): Ditto.
15971         * config/rs6000/rs6000.h: Ditto.
15972         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
15973         (TARGET_MINMAX): ... this.  New.
15974         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
15975         * config/rs6000/rs6000.md: Remove Xilinx FP support.
15976         (*movsi_internal1_single): Delete.
15977         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
15978         mfpu=, mxilinx-fpu): Delete.
15979         * config/rs6000/singlefp.h: Delete.
15980         * config/rs6000/sysv4.h: Remove Xilinx FP support.
15981         * config/rs6000/t-rs6000: Ditto.
15982         * config/rs6000/t-xilinx: Delete.
15983         * config/rs6000/titan.md: Adjust for fp_type removal.
15984         * config/rs6000/vsx.md: Remove Xilinx FP support.
15985         (VStype_simple): Delete.
15986         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
15987         * config/rs6000/xfpu.h: Delete.
15988         * config/rs6000/xfpu.md: Delete.
15989         * config/rs6000/xilinx.h: Delete.
15990         * config/rs6000/xilinx.opt: Delete.
15991         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
15992         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
15994 2018-05-04  Tom de Vries  <tom@codesourcery.com>
15996         PR libgomp/85639
15997         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
15998         if ignore == 0.
16000 2018-05-04  Richard Biener  <rguenther@suse.de>
16002         PR middle-end/85627
16003         * tree-complex.c (update_complex_assignment): We are always in SSA form.
16004         (expand_complex_div_wide): Likewise.
16005         (expand_complex_operations_1): Likewise.
16006         (expand_complex_libcall): Preserve EH info of the original stmt.
16007         (tree_lower_complex): Handle removed blocks.
16008         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
16009         on complex multiplication and division libcall builtins.
16011 2018-05-04  Richard Biener  <rguenther@suse.de>
16013         PR middle-end/85574
16014         * fold-const.c (negate_expr_p): Restrict negation of operand
16015         zero of a division to when we know that can happen without
16016         overflow.
16017         (fold_negate_expr_1): Likewise.
16019 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
16021         PR libstdc++/85466
16022         * real.h (real_nextafter): Declare.
16023         * real.c (real_nextafter): New function.
16024         * fold-const-call.c (fold_const_nextafter): New function.
16025         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
16026         CASE_CFN_NEXTTOWARD.
16027         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
16028         even when arg1_mode is different from arg0_mode.
16030 2018-05-03  Nathan Sidwell  <nathan@acm.org>
16032         * doc/extend.texi (Deprecated Features): Remove
16033         -ffriend-injection.
16034         (Backwards Compatibility): Likewise.
16035         * doc/invoke.texi (C++ Language Options): Likewise.
16036         (C++ Dialect Options): Likewise.
16038 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
16040         PR target/85530
16041         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
16042         _mm512_mask_mullox_epi64): New intrinsics.
16044 2018-05-03  Tom de Vries  <tom@codesourcery.com>
16046         PR testsuite/85106
16047         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16048         dump files): Add offload-tree.
16050 2018-05-03  Richard Biener  <rguenther@suse.de>
16052         PR tree-optimization/85615
16053         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
16054         to loops not nested in BBs loop father to avoid creating multi-entry
16055         loops.
16057 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16059         PR tree-optimization/70291
16060         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
16061         arguments.  Change return type to tree.  Emit libcall as a new
16062         statement rather than replacing existing one when inplace_p is true.
16063         (expand_complex_multiplication_components): New function.
16064         (expand_complex_multiplication): Expand floating-point complex
16065         multiplication using the above.
16066         (expand_complex_division): Rename inner_type parameter to type.
16067         Update expand_complex_libcall call-site.
16068         (expand_complex_operations_1): Update expand_complex_multiplication
16069         and expand_complex_division call-sites.
16071 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
16073         PR target/85582
16074         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16075         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16076         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
16077         the highest significant bit of the shift count mask is clear.  In
16078         check whether and[sq]i3 is needed verify that all significant bits
16079         of the shift count other than the highest are set.
16081 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16083         PR libgomp/82428
16084         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
16085         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
16086         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
16087         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
16088         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
16089         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
16090         __builtin_goacc_parlevel_size.
16092 2018-05-02  Richard Biener  <rguenther@suse.de>
16094         PR tree-optimization/85597
16095         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
16096         do not use split vect_get_vec_defs call but call vect_get_slp_defs
16097         directly.
16099 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16101         PR testsuite/85106
16102         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16103         dump files): Add ltrans-tree.
16105 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16107         PR testsuite/85106
16108         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16109         dump files): Add wpa-ipa.
16111 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
16113         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
16114         powerpc*-*-linux*paired* target.
16115         * config/rs6000/750cl.h: Delete.
16116         * config/rs6000/paired.h: Delete.
16117         * config/rs6000/paired.md: Delete.
16118         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
16119         float support.
16120         * config/rs6000/rs6000-builtin.def: Remove paired float support.
16121         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
16122         comment.  Remove paired float support.
16123         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
16124         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
16125         VECTOR_PAIRED.
16126         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
16127         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
16128         declarations.
16129         * config/rs6000/rs6000.c: Remove paired float support.
16130         (paired_expand_vector_init, paired_expand_vector_move,
16131         paired_emit_vector_compare, paired_emit_vector_cond_expr,
16132         (paired_expand_lv_builtin, paired_expand_stv_builtin,
16133         paired_expand_builtin, paired_expand_predicate_builtin,
16134         paired_init_builtins): Delete.
16135         * config/rs6000/rs6000.h: Remove paired float support.
16136         * config/rs6000/rs6000.md: Remove paired float support.
16137         (move_from_CR_ov_bit): Delete.
16138         * config/rs6000/rs6000.opt (mpaired): Delete.
16139         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
16140         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
16142 2018-05-02  Richard Biener  <rguenther@suse.de>
16144         PR middle-end/85567
16145         * gimplify.c (gimplify_save_expr): When in SSA form allow
16146         SAVE_EXPRs to compute to SSA vars.
16148 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
16150         PR target/85582
16151         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16152         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16153         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
16154         clobber operands[2], instead use a new pseudo.  Formatting fixes.
16156 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
16158         PR tree-optimization/85586
16159         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
16160         exit early for statements in the same group if the accesses are
16161         not strided.
16163 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16165         PR lto/85451
16166         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
16167         error message.
16169 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
16171         PR tree-optimization/85143
16172         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
16174 2018-05-01  Tom de Vries  <tom@codesourcery.com>
16176         PR lto/85451
16177         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
16178         not found" error message.
16180 2018-05-01  Tom de Vries  <tom@codesourcery.com>
16182         PR other/83786
16183         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
16184         * vec.c (test_ordered_remove_if): New function.
16185         (vec_c_tests): Call test_ordered_remove_if.
16186         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
16187         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
16188         * tree-vect-patterns.c (vect_pattern_recog_1): Use
16189         VEC_ORDERED_REMOVE_IF.
16191 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16193         PR tree-optimization/82665
16194         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
16195         pointer subtraction where arguments come from a memchr call.
16197 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
16199         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
16200         --push-state --as-needed and --pop-state instead of --as-needed and
16201         --no-as-needed if ld supports it.
16202         * configure: Regenerated.
16204         PR web/85578
16205         * doc/install.texi2html: Replace _002d with - and _002a with * in
16206         generated html files using sed.
16208 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16210         PR c++/85523
16211         * gcc-rich-location.c (blank_line_before_p): New function.
16212         (use_new_line): New function.
16213         (gcc_rich_location::add_fixit_insert_formatted): New function.
16214         * gcc-rich-location.h
16215         (gcc_rich_location::add_fixit_insert_formatted): New function.
16217 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16219         * selftest.c (assert_streq): Rename "expected" and "actual" to
16220         "val1" and "val2".  Extend NULL-handling to cover both inputs
16221         symmetrically, while still requiring both to be non-NULL for a pass.
16222         * selftest.h (assert_streq): Rename "expected" and "actual" to
16223         "val1" and "val2".
16224         (ASSERT_EQ): Likewise.
16225         (ASSERT_EQ_AT): Likewise.
16226         (ASSERT_KNOWN_EQ): Likewise.
16227         (ASSERT_KNOWN_EQ_AT): Likewise.
16228         (ASSERT_NE): Likewise.
16229         (ASSERT_MAYBE_NE): Likewise.
16230         (ASSERT_MAYBE_NE_AT): Likewise.
16231         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
16232         the assertion to pass.
16233         (ASSERT_STREQ_AT): Likewise.
16235 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
16237         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
16238         interaction with -pie.
16240 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16242         * selftest.h: Fix alphabetization of per-source-file selftest
16243         declarations.
16245 2018-04-30  Jason Merrill  <jason@redhat.com>
16247         PR c++/61982 - dead stores to destroyed objects.
16248         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
16249         of clobber.
16251 2018-04-30  Jason Merrill  <jason@redhat.com>
16253         * tree.c (build_clobber): New.
16254         * tree.h: Declare it.
16255         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
16257 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16259         * diagnostic-show-locus.c (layout::layout): Update for
16260         location_get_source_line returning a char_span.
16261         (struct char_span): Move to input.h.
16262         (struct correction): Update for fields in char_span becoming
16263         private.
16264         (struct source_line): Update for location_get_source_line
16265         returning a char_span.
16266         (layout::print_line): Likewise.
16267         * edit-context.c (edited_file::print_content): Likewise.
16268         (edited_file::print_diff_hunk): Likewise.
16269         (edited_file::print_run_of_changed_lines): Likewise.
16270         (edited_file::get_num_lines): Likewise.
16271         (edited_line::edited_line): Likewise.
16272         * final.c (asm_show_source): Likewise.
16273         * input.c (location_get_source_line): Convert return type
16274         from const char * to char_span, losing the final "line_len"
16275         param.
16276         (dump_location_info): Update for the above.
16277         (get_substring_ranges_for_loc): Likewise.  Use a char_span
16278         when handling the literal within the line.
16279         (test_reading_source_line): Update for location_get_source_line
16280         returning a char_span.
16281         * input.h (class char_span): Move here from
16282         diagnostic-show-locus.c, converting from a struct to a class.
16283         Make data members private.
16284         (char_span::operator bool): New.
16285         (char_span::length): New.
16286         (char_span::get_buffer): New.
16287         (char_span::operator[]): New.
16288         (char_span::subspan): Make const.
16289         (char_span::xstrdup): New.
16290         (location_get_source_line): Convert return type from const char *
16291         to char_span, losing the final "line_size" param.
16293 2018-04-30  Jan Hubicka  <jh@suse.cz>
16295         * lto-wrapper.c (ltrans_priorities): New static var.
16296         (cmp_priority): New.
16297         (run_gcc): Read priorities and if doing parallel build order
16298         the Makefile by them.
16300 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
16302         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
16304 2018-04-30  Richard Biener  <rguenther@suse.de>
16306         * tree-cfg.c (verify_address): Remove base argument, add
16307         flag whether to check TREE_ADDRESSABLE and do that.
16308         (verify_expr): Remove.
16309         (verify_types_in_gimple_reference): Add pieces from verify_expr.
16310         (verify_gimple_assign_single): Likewise.
16311         (verify_gimple_switch): Likewise.
16312         (verify_expr_location_1): Dereference tp once.  Add (disabled)
16313         piece from verify_expr.
16314         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
16316 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
16318         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
16320 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
16322         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
16323         (small_data_pattern): Likewise.
16324         (arc_rewrite_small_data): Likewise.
16325         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
16326         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
16327         (get_symbol_alignment): New function.
16328         (legitimate_small_data_address_p): Likewise.
16329         (legitimate_scaled_address): Update, call
16330         legitimate_small_data_address_p.
16331         (output_sdata): New static variable.
16332         (arc_print_operand): Update how we handle small data operands.
16333         (arc_print_operand_address): Likewise.
16334         (arc_legitimate_address_p): Update, use
16335         legitimate_small_data_address_p.
16336         (arc_rewrite_small_data_p): Remove.
16337         (arc_rewrite_small_data_1): Likewise.
16338         (arc_rewrite_small_data): Likewise.
16339         (small_data_pattern): Likewise.
16340         (compact_sda_memory_operand): Update to use
16341         legitimate_small_data_address_p and get_symbol_alignment.
16342         (prepare_move_operands): Don't rewite sdata pattern.
16343         (prepare_extend_operands): Remove.
16344         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
16345         pattern.
16346         (zero_extendqisi2): Likewise.
16347         (zero_extendhisi2): Likewise.
16348         (extendqihi2): Likewise.
16349         (extendqisi2): Likewise.
16350         (extendhisi2): Likewise.
16351         (addsi3): Likewise.
16352         (subsi3): Likewise.
16353         (andsi3): Likewise.
16354         * config/arc/constraints.md (Usd): Change it to memory constraint.
16356 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
16358         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
16359         as source of std instructions.
16360         * config/arc/arc.md (movsi_insn): Update pattern predicate to
16361         allow 6-bit constants as source for store instructions.
16362         (movdi_insn): Update instruction pattern to allow 6-bit constants
16363         as source for store instructions.
16365 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
16367         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
16369 2018-04-30  Nathan Sidwell  <nathan@acm.org>
16370             Sandra Loosemore <sandra@codesourcery.com>
16372         * dumpfile.c (dump_open): Allow '-' for stdout.
16373         * doc/invoke.texi (Developer Options): Document dump filename
16374         determination early.  Document stdin/stdout selection.
16376 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
16378         Microblaze Target: PIC data text relative
16380         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
16381         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
16382         Add declaration.
16383         * config/microblaze/microblaze.h (microblaze_constant_address_p):
16384         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
16385         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
16386         New addressing mode for data-text relative position indepenedent code.
16387         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
16388         'ADDRESS_SYMBOLIC_TXT_REL'.
16389         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
16390         (microblaze_legitimate_pic_operand): Exclude function calls from
16391         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
16392         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
16393         addresses cases.
16394         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16395         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16396         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
16397         for 'address + offset'.
16398         (microblaze_expand_prologue): Add new function prologue call for
16399         'r20' assignation.
16400         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
16401         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
16402         table in case of TARGET_PIC_DATA_TEXT_REL.
16403         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
16404         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
16405         Add new macros 'UNSPEC_TEXT',
16406         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
16407         + exclude function calls from 'UNSPEC_PLT' in case of data text
16408         relative mode.
16409         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16410         new target hook for generating address diff vector tables in case of
16411         flag_pic.
16412         * doc/tm.texi : Regenerate.
16413         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
16414         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
16415         of addr diff vector generation.
16416         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16417         target hook definition.
16418         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
16419         Add default function for generate_pic_addr_diff_vec -> flag_pic.
16420         * doc/invoke.texi (Add new pic option): Add new microblaze pic
16421         option for data text relative.
16423 2018-04-30  Richard Biener  <rguenther@suse.de>
16425         * tree-chrec.h (evolution_function_is_constant_p): Remove
16426         redundant check.
16427         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
16429 2018-04-30  Richard Biener  <rguenther@suse.de>
16431         PR bootstrap/85571
16432         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
16434 2018-04-30  Richard Biener  <rguenther@suse.de>
16436         PR tree-optimization/28364
16437         PR tree-optimization/85275
16438         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
16439         copying first exit test.
16441 2018-04-28  Mark Wielaard  <mark@klomp.org>
16443         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
16444         dwarf_version >= 5.
16445         (dwarf_AT): Handle DW_AT_addr_base.
16446         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
16448 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
16450         PR target/84431
16451         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
16452         (*ashl<dwi>3_doubleword_mask_1): Ditto.
16453         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
16454         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
16456 2018-04-28  Richard Biener  <rguenther@suse.de>
16458         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
16459         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
16460         to reflect use.  Only add interesting stmts.
16462 2018-04-27  Martin Jambor  <mjambor@suse.cz>
16464         PR ipa/85549
16465         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
16466         the jump function allows for passing through aggregate values.
16468 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
16470         * input.h (in_system_header_at): Convert from macro to inline
16471         function.
16472         (from_macro_expansion_at): Likewise.
16473         (from_macro_definition_at): Likewise.
16475 2018-04-27  Jeff Law  <law@redhat.com>
16477         * config.gcc: Mark tile* targets as deprecated/obsolete.
16479 2018-04-27  Richard Biener  <rguenther@suse.de>
16481         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
16482         fix for ILP32.
16484 2018-04-27  Richard Biener  <rguenther@suse.de>
16486         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
16488 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
16490         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
16491         with Yd constraint. Set "preferred_for_speed" attribute from
16492         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
16493         with Yd constraint.
16494         (*movdi_internal): Ditto.
16495         (movti_interunit splitters): Remove
16496         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
16497         (movdi_interunit splitters): Ditto.
16498         * config/i386/constraints.md (Ye): Remove.
16499         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
16501 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16503         PR target/85512
16504         * config/aarch64/constraints.md (Usg): Limit to 31.
16505         (Usj): Limit to 63.
16507 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
16509         PR tree-optimization/85529
16510         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
16511         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
16512         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
16513         zero extension or masking of the MSB bit.
16514         (optimize_range_tests): Add FIRST_BB argument, pass it through
16515         to optimize_range_tests_var_bound.
16516         (maybe_optimize_range_tests, reassociate_bb): Adjust
16517         optimize_range_tests callers.
16519 2018-04-26  Richard Biener  <rguenther@suse.de>
16520             Jakub Jelinek  <jakub@redhat.com>
16522         * cgraph.h (symbol_table): Just declare debug method here.
16523         * symtab.c (symbol_table::debug): Define.
16525 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
16527         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
16529 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
16531         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
16532         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
16533         (*movdi_internal): Substitute Yi and Yj constraint with x
16534         and Ym and Yn constraint with y constraint.  Update "isa"
16535         attribute and set "preferred_for_speed" attribute from
16536         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
16537         (*movsi_internal): Ditto.
16538         (*movdf_internal): Ditto.
16539         (*movsf_internal): Ditto.
16540         (*zero_extendsidi2): Ditto.
16541         * config/i386/sse.md (vec_set<mode>_0): Ditto.
16542         (sse2_loadld): Ditto.
16543         (*vec_extract<ssevecmodelower>_0): Ditto.
16544         (*vec_extractv4si_0_zext_sse4): Ditto.
16545         (vec_concatv2di): Ditto.
16546         (*vec_dup<mode>): Ditto.
16547         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
16548         * config/i386/constraints.md (Yi): Remove.
16549         (Yj): Remove.
16550         (Ym): Remove.
16551         (Yn): Remove.
16553 2018-04-26  Nathan Sidwell  <nathan@acm.org>
16555         * dumpfile.c (dump_open): New.
16556         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
16557         (dump_finish): Detect stdio/stderr by value not name.
16559 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
16561         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
16563 2018-04-26  Tom de Vries  <tom@codesourcery.com>
16565         PR target/84952
16566         * config/nvptx/nvptx.c (verify_neutering_jumps)
16567         (verify_neutering_labels): New function
16568         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
16570 2018-04-26  Tom de Vries  <tom@codesourcery.com>
16572         PR target/84025
16573         * config/nvptx/nvptx.c (needs_neutering_p): New function.
16574         (nvptx_single): Use needs_neutering_p to skip over insns that do not
16575         need neutering.
16577 2018-04-26  Richard Biener <rguenther@suse.de>
16578             Tom de Vries  <tom@codesourcery.com>
16580         PR lto/85422
16581         * lto-streamer-out.c (output_function): Fixup loops if required to match
16582         discovery done in the reader.
16584 2018-04-26  Richard Biener  <rguenther@suse.de>
16586         PR tree-optimization/85116
16587         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
16588         have a loop exit from the single latch predecessor.  Remove
16589         case of header with just condition.
16590         (ch_base::copy_headers): Exclude infinite loops from any
16591         processing.
16592         (pass_ch::execute): Record exits.
16594 2018-04-26  Richard Biener  <rguenther@suse.de>
16596         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
16597         prologue cost vector and pass it to vect_get_load_cost.
16598         (vect_get_peeling_costs_all_drs): Likewise.
16599         (vect_peeling_hash_get_lowest_cost): Likewise.
16600         (vect_enhance_data_refs_alignment): Likewise.
16602 2018-04-26  Richard Biener  <rguenther@suse.de>
16604         PR middle-end/85450
16605         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
16606         checking of integer<->pointer conversions.
16607         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
16608         sign-/zero-extending pointer types.
16609         (expand_omp_for_static_chunk): Likewise.
16611 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
16612             Jean Lee  <xiaoyur347@gmail.com>
16614         * config/mips/mips.c (mips_asan_shadow_offset): New function.
16615         (TARGET_ASAN_SHADOW_OFFSET): Define.
16616         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
16617         true for -fsanitize=address.
16619 2018-04-25  Mark Wielaard  <mark@klomp.org>
16621         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
16622         shorter ones.
16624 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
16626         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
16627         than "alu", remove explicit "memory" and "imm_disp" attributes.
16628         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
16630         PR middle-end/85414
16631         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
16632         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
16633         gen_lowpart_no_emit.
16635 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
16637         PR target/85473
16638         * config/i386/i386.c (ix86_expand_builtin): Change memory
16639         operand to XI, extend p0 to Pmode.
16640         * config/i386/i386.md: Change unspec volatile and operand
16641         1 mode to XI, change operand 0 mode to P.
16643 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16645         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
16646         GET_MODE_MASK before any checking.
16647         (nds32_can_use_bset_p): Likewise.
16648         (nds32_can_use_btgl_p): Likewise.
16650 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16652         * config/nds32/nds32-doubleword.md: New define_split pattern for
16653         illegal register number.
16655 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16657         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
16659 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
16661         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
16663 2018-04-25  Richard Biener  <rguenther@suse.de>
16665         * lto-streamer.h (LTO_major_version): Bump to 8.
16667 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
16669         * BASE-VER: Set to 9.0.0.
16671 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
16673         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
16674         in __abskf2 and __powikf2.
16676 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16678         PR target/85512
16679         * config/aarch64/constraints.md (Usg, Usj): New constraints.
16680         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
16681         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
16682         Use the above on operand 2.  Reindent.
16683         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
16685 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
16687         PR target/85485
16688         * common/config/i386/i386-common.c (ix86_handle_option): Don't
16689         handle OPT_mcet.
16690         * config/i386/i386.opt (mcet): Removed.
16691         * doc/install.texi: Remove -mcet documentation.
16692         * doc/invoke.texi: Likewise.
16694 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
16696         PR target/85485
16697         * doc/install.texi: Remove -mcet from bootstrap-cet.
16699 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
16701         PR target/85511
16702         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
16703         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
16704         if TARGET_64BIT.
16706         PR target/85503
16707         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
16708         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
16709         containing a CONST_VECTOR.
16711 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
16713         * doc/install.texi: Update newlib dependency for nvptx.
16715 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
16717         PR target/85508
16718         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
16719         instead of INTVAL when shifting x left.
16721 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
16723         PR tree-optimization/85478
16724         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
16725         vect_grouped_store_supported for single element vectors.
16727 2018-04-24  Richard Biener  <rguenther@suse.de>
16729         PR target/85491
16730         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
16731         load cost increase to the case of non-constant step.
16733 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
16735         PR target/84828
16736         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
16737         destination if any_malformed_asm.
16739 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
16741         PR middle-end/85496
16742         * expr.c (store_field): In the bitfield case, if the value comes from
16743         a function call and is returned in registers by means of a PARALLEL,
16744         do not change the mode of the temporary unless BLKmode and VOIDmode.
16746 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
16748         PR rtl-optimization/85423
16749         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
16750         dependencies to debug insns when the previous insn is non-debug.
16752 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
16754         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
16755         enums into a single definition.
16756         (fls): Fix predicates and printing.
16757         (seti): Likewise.
16759 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
16761         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
16762         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
16763         and short u6 immediate.
16764         (check_if_valid_sleep_operand): Remove.
16765         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
16767 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16769         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
16770         flag_always_save_lp condition.
16771         * config/nds32/nds32.opt (malways-save-lp): New option.
16773 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
16775         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
16776         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
16777         * config/nds32/nds32.h
16778         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
16779         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
16781 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
16783         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
16784         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
16786 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
16787             Chung-Ju Wu  <jasonwucj@gmail.com>
16789         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
16790         Declare.
16791         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
16792         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
16794 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16796         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
16798 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16800         * config/nds32/nds32-protos.h (nds32_data_alignment,
16801         nds32_local_alignment): Declare.
16802         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
16803         nds32_local_alignment): New functions.
16804         (TARGET_CONSTANT_ALIGNMENT): Define.
16805         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
16807 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16809         * config/nds32/nds32.c
16810         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
16811         (TARGET_MODES_TIEABLE_P): Likewise.
16813 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16815         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
16816         level Ofast and Og.
16818 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
16819             Chung-Ju Wu  <jasonwucj@gmail.com>
16821         * config/nds32/constants.md (unspec_volatile_element): Add enum values
16822         for unaligned access.
16823         * config/nds32/nds32-intrinsic.c: Implementation of expanding
16824         unaligned access.
16825         * config/nds32/nds32-intrinsic.md: Likewise.
16826         * config/nds32/nds32_intrinsic.h: Likewise.
16827         * config/nds32/nds32.h (nds32_builtins): Likewise.
16828         * config/nds32/nds32.opt (munaligned-access): New option.
16829         * config/nds32/nds32.c (nds32_asm_file_start): Display
16830         flag_unaligned_access status.
16832 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
16834         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
16835         -mno-relax is present.
16836         * config/riscv/linux.h (LINK_SPEC): Ditto.
16838 2018-04-20  Martin Sebor  <msebor@redhat.com>
16840         PR c/85365
16841         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
16842         for null pointers.
16843         (gimple_fold_builtin_stxcpy_chk): Same.
16844         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
16846 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
16848         PR target/85456
16849         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
16850         __powikf2 when long double is IEEE 128-bit.
16852 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
16854         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
16855         step to make sure stack always aligned.
16857 2018-04-20  Carl Love  <cel@us.ibm.com>
16859         PR target/83402
16860         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
16861         size check for arg0.
16863 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
16864             Tom de Vries  <tom@codesourcery.com>
16866         PR target/85445
16867         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
16868         Emit insns for calls too.
16869         (nvptx_find_par): Always look for worker-level predecessor insn.
16870         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
16871         calls.
16872         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
16873         (nvptx_process_pars): Propagate frames for calls.
16875 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
16877         PR target/85469
16878         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
16879         Removed.
16880         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
16881         (ix86_handle_option): Don't handle OPT_mibt.
16882         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
16883         __SHSTK__.
16884         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
16885         has_ibt and ibt.
16886         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
16887         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
16888         (ix86_target_macros): Define __CET__ with flag_cf_protection
16889         for -fcf-protection.
16890         * config/i386/i386.c (isa2_opts): Remove -mibt.
16891         * config/i386/i386.h (TARGET_IBT): Removed.
16892         (TARGET_IBT_P): Likewise.
16893         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
16894         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
16895         * config/i386/i386.opt (mcet): Update help message.
16896         (mshstk): Likewise.
16897         (mibt): Removed.
16898         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
16899         -mcet as an alias for -mshstk.
16901 2018-04-20  Richard Biener <rguenther@suse.de>
16903         PR middle-end/85475
16904         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
16905         complexity by forcing a single use of the multiply operand.
16907 2018-04-20  Martin Jambor  <mjambor@suse.cz>
16909         ipa/85449
16910         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
16911         recursion dependency to only apply to non-clones.
16913 2018-04-20  Martin Jambor  <mjambor@suse.cz>
16915         ipa/85447
16916         * ipa-cp.c (create_specialized_node): Check that clones of
16917         self-recursive edges exist during IPA-CP.
16919 2018-04-19  Toon Moene  <toon@moene.org>
16921         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
16922         by -O3.
16924 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
16926         PR tree-optimization/85467
16927         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
16928         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
16929         VECTOR_CST element to type.
16931 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
16933         PR target/85397
16934         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
16935         * config/i386/i386.md (builtin_setjmp_setup): Removed.
16936         (builtin_longjmp): Likewise.
16937         (save_stack_nonlocal): New pattern.
16938         (restore_stack_nonlocal): Likewise.
16940 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
16942         PR target/85404
16943         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16944         Replace ASM_OUTPUT_LABEL with fprintf.
16946 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
16948         PR target/85417
16949         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16950         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
16951         * config/i386/i386-c.c (ix86_target_macros_internal): Also
16952         define __IBT__ and __SHSTK__ for -fcf-protection.
16953         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
16954         TARGET_IBT.
16955         (ix86_trampoline_init): Likewise.
16956         (x86_output_mi_thunk): Likewise.
16957         (ix86_notrack_prefixed_insn_p): Likewise.
16958         (ix86_option_override_internal): Don't disallow -fcf-protection.
16959         * config/i386/i386.md (rdssp<mode>): Also enable for
16960         -fcf-protection.
16961         (incssp<mode>): Likewise.
16962         (nop_endbr): Likewise.
16963         * config/i386/i386.opt (mcet): Change help message to built-in
16964         functions only.
16965         (mibt): Likewise.
16966         (mshstk): Likewise.
16967         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
16968         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
16969         enable CET built-in functions.
16971 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
16973         * common/config/i386/i386-common.c
16974         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
16975         OPTION_MASK_ISA_MOVDIRI_UNSET,
16976         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
16977         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
16978         * config.gcc (movdirintrin.h): New header.
16979         * config/i386/cpuid.h (bit_MOVDIRI,
16980         bit_MOVDIR64B): New bits.
16981         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
16982         and -mmvodir64b.
16983         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
16984         (VOID, PVOID, PCVOID)): New function types.
16985         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
16986         __builtin_ia32_directstoreu_u64,
16987         __builtin_ia32_movdir64b): New builtins.
16988         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
16989         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
16990         and -mmovdiri.
16991         (ix86_valid_target_attribute_inner_p): Ditto.
16992         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
16993         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
16994         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
16995         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
16996         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
16997         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
16998         (movdiri<mode>, movdir64b_<mode>): New.
16999         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
17000         * config/i386/immintrin.h: Include movdirintrin.h.
17001         * config/i386/movdirintrin.h: New file.
17002         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
17004 2018-04-19  Richard Biener  <rguenther@suse.de>
17006         PR middle-end/85455
17007         * cfg.c (clear_bb_flags): When loop state says we have
17008         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
17010 2018-04-19  Richard Biener  <rguenther@suse.de>
17012         PR tree-optimization/84737
17013         * tree-vect-data-refs.c (vect_copy_ref_info): New function
17014         copying restrict info.
17015         (vect_setup_realignment): Use it.
17016         * tree-vectorizer.h (vect_copy_ref_info): Declare.
17017         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
17018         the first DR to all generated stores.
17019         (vectorizable_load): Likewise for loads.
17021 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
17023         PR tree-optimization/85446
17024         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
17025         the integral and pointer types to have the same precision.
17027         * doc/install.texi: Document --disable-cet being the default and
17028         --enable-cet=auto.
17030 2018-04-18  Martin Liska  <mliska@suse.cz>
17032         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
17033         style.
17035 2018-04-18  Martin Liska  <mliska@suse.cz>
17037         Revert
17038         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
17040         PR ipa/83983
17041         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17042         arguments if they are comparable.
17044 2018-04-18  Martin Liska  <mliska@suse.cz>
17046         Revert
17047         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
17049         PR lto/84805
17050         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17051         incomplete types.
17053 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
17055         PR target/85388
17056         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
17057         ENDBR after calling __morestack.
17059 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
17061         PR jit/85384
17062         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
17063         by using gcc_base_ver to generate a gcc_driver_version, and use
17064         it when generating GCC_DRIVER_NAME.
17065         * configure: Regenerate.
17067 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
17069         PR target/81084
17070         * config.gcc: Obsolete powerpc*-*-*spe*.
17072 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17074         PR debug/84637
17075         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
17076         (stabstr_D): Change type of unum from unsigned int to
17077         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
17078         type.
17080 2018-04-17  Jim Wilson  <jimw@sifive.com>
17082         PR 84856
17083         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
17084         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
17085         Set arg_pointer_offset after using pretend_args_size.
17087 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17089         PR rtl-optimization/85431
17090         * dse.c (record_store): Ignore zero width stores.
17092         PR sanitizer/85230
17093         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
17094         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
17095         __builtin_stack_restore rather than after it.
17096         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
17097         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
17098         argument instead of virtual_dynamic_stack_rtx.
17100 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17102         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
17103         New prototype.
17104         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
17105         Add note to error message to explain internal mapping of overloaded
17106         built-in function name to non-overloaded built-in function name.
17107         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
17108         function.
17110 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
17112         PR target/85424
17113         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
17114         where the inputs overlap with the output.
17116 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17118         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
17119         (=v, v) alternative and explicit "memory" attribute.
17120         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
17121         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17122         attributes.
17123         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
17124         "sselog1" type instead of "sselog".
17125         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
17126         "sselog".  Remove explicit "memory" attribute.
17127         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
17128         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17129         attributes.
17130         (vec_extract_hi_v32hi): Merge all alternatives into one, use
17131         "sselog1" type instead of "sselog".  Remove explicit "memory"
17132         attribute.
17133         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
17134         use "sselog1" type instead of "sselog".  Remove explicit "memory"
17135         attribute.
17136         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
17137         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17138         attributes.
17139         (vec_extract_hi_v64qi): Merge all alternatives into one, use
17140         "sselog1" type instead of "sselog".  Remove explicit "memory"
17141         attribute.
17142         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
17143         use "sselog1" type instead of "sselog".  Remove explicit "memory"
17144         attribute.
17146         PR target/85430
17147         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
17149         PR middle-end/85414
17150         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
17151         on a SUBREG.
17153 2018-04-17  Martin Jambor  <mjambor@suse.cz>
17155         PR ipa/85421
17156         * ipa-cp.c (create_specialized_node): Call
17157         expand_all_artificial_thunks if necessary.
17159 2018-04-17  Martin Liska  <mliska@suse.cz>
17161         PR lto/85405
17162         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
17163         in message, remote space in between '_G' and '('.
17165 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17167         PR target/85281
17168         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
17169         avx512f_vmcmp<mode>3<round_saeonly_name>,
17170         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
17171         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
17172         avx512f_rndscale<mode><round_saeonly_name>,
17173         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
17174         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
17175         Use %<iptr>2 instead of %2 for -masm=intel.
17176         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
17177         avx512f_vcvttss2usi<round_saeonly_name>,
17178         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
17179         -masm=intel.
17180         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
17181         avx512f_vcvttsd2usi<round_saeonly_name>,
17182         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
17183         Use %q1 instead of %1 for -masm=intel.
17184         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
17185         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
17186         of %3 for -masm=intel.
17187         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
17188         -masm=intel.
17189         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
17190         -masm=intel.
17191         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
17192         -masm=intel.
17193         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
17194         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
17195         %g1.
17196         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
17197         -masm=intel.
17198         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
17199         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
17200         %g1 and one with %0 and %1.
17201         (avx512er_vmrcp28<mode><round_saeonly_name>,
17202         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
17203         %1 for -masm=intel.
17204         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
17205         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
17206         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
17207         of %0 and %{%4%} for -masm=intel.
17208         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
17209         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
17210         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
17211         order of %0 and %{%5%}%{z%} for -masm=intel.
17213 2018-04-17  Jan Hubicka  <jh@suse.cz>
17215         PR lto/85405
17216         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
17218 2018-04-17  Martin Liska  <mliska@suse.cz>
17220         PR ipa/85329
17221         * multiple_target.c (create_dispatcher_calls): Set apostrophes
17222         for target_clone error message.  Make default implementation
17223         clone to be a local declaration.
17224         (separate_attrs): Add new argument and check for an empty
17225         string.
17226         (expand_target_clones): Handle it.
17227         (ipa_target_clone): Make redirection just for target_clones
17228         functions.
17230 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
17231             Tom de Vries  <tom@codesourcery.com>
17233         PR middle-end/84955
17234         * omp-expand.c (expand_oacc_for): Add dummy false branch for
17235         tiled basic blocks without omp continue statements.
17237 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
17239         PR target/83660
17240         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
17241         vec_extract expression as having side effects to make sure it gets
17242         a cleanup point.
17244 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
17246         PR target/85403
17247         * config/i386/i386.c (get_builtin_code_for_version): Check
17248         error_mark_node.
17250 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
17252         PR target/84331
17253         * config.gcc: Support "skylake".
17254         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17255         PROCESSOR_SKYLAKE.
17256         * config/i386/i386.c (m_SKYLAKE): Define.
17257         (processor_target_table): Add "skylake".
17258         (ix86_option_override_internal): Add "skylake".
17259         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
17260         PROCESSOR_CANNONLAKE.
17261         (get_builtin_code_for_version): Fix priority for
17262         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
17263         PROCESSOR_SKYLAKE-AVX512.
17264         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
17265         (processor_type): Add PROCESSOR_SKYLAKE.
17267 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
17268             Jason Merrill  <jason@redhat.com>
17270         PR c++/85112
17271         * convert.c (convert_to_integer_1): Use direct recursion for
17272         enumeral types and types with a precision less than the number
17273         of bits in their mode.
17275 2018-04-16  Julia Koval  <julia.koval@intel.com>
17277         PR target/84413
17278         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
17279         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
17281 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
17283         PR target/85293
17284         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
17285         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
17286         and -mno-direct-move.
17288 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
17290         PR target/83402
17291         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
17292         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
17293         Ensure negative shifts result in {0}.
17295 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
17297         PR rtl-optimization/79916
17298         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
17299         regs (if any) to define how to gnerate SD moves when LRA is in
17300         progress.
17302 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
17304         PR rtl-optimization/85393
17305         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
17306         * except.c (expand_dw2_landing_pad_for_region): Make static.
17307         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
17308         a label and unconditional jump to old_bb, rather than
17309         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
17310         basic block.
17312         PR rtl-optimization/85376
17313         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
17314         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
17315         instead of a specific value.
17317 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
17318             Bin Cheng  <bin.cheng@arm.com>
17320         PR tree-optimization/82965
17321         PR tree-optimization/83991
17322         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
17323         by_profile_only parameter.
17324         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
17325         information if the loop was predicted to iterate too many times.
17326         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
17328 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
17330         PR lto/71991
17331         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
17332         always inline.
17334 2018-04-13  Martin Liska  <mliska@suse.cz>
17335             Jakub Jelinek  <jakub@redhat.com>
17337         PR middle-end/81657
17338         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
17339         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
17340         * builtins.c (expand_builtin_memory_copy_args): Use
17341         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
17342         handle dest_addr == pc_rtx.
17344 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
17346         PR target/85291
17347         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
17348         asked to not generate direct moves.
17349         (fix_trunc<mode>si2_stfiwx): Similar.
17350         (fix_trunc<mode>si2_internal): Similar.
17352 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
17354         PR debug/83157
17355         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
17356         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
17357         lookup if dest in some wider mode is known to be const0_rtx and
17358         if so, record permanent equivalence for it to be ZERO_EXTEND of
17359         the narrower mode destination.
17361 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
17363         * lto-streamer-out.c (output_function): Revert 259346.
17364         * omp-expand.c (expand_oacc_for): Likewise.
17366 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
17368         PR rtl-optimization/85354
17369         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
17370         * sel-sched.c (sel_global_init): ... here.
17372 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
17374         PR target/85238
17375         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
17376         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
17377         mode for PE-COFF targets.
17378         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
17379         (i386_pe_asm_lto_end): Likewise.
17380         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
17381         (TARGET_ASM_LTO_END): Likewise.
17382         * config/i386/winnt.c (saved_debug_info_level): New static variable.
17383         (i386_pe_asm_lto_start): New function.
17384         (i386_pe_asm_lto_end): Likewise.
17386 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
17387             Richard Biener  <rguenther@suse.de>
17389         PR middle-end/84955
17390         * lto-streamer-out.c (output_function): Fix CFG loop state before
17391         streaming out.
17392         * omp-expand.c (expand_oacc_for): Handle calls to internal
17393         functions like regular functions.
17395 2018-04-12  Richard Biener  <rguenther@suse.de>
17397         PR lto/85371
17398         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
17399         for the early LTO debug to properly generate references to it
17400         during DIE emission.  Do not re-use that for the skeleton for
17401         split-dwarf.
17402         (dwarf2out_early_finish): Likewise.
17404 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
17406         PR target/85328
17407         * config/i386/sse.md
17408         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
17409         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
17410         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
17411         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
17412         and output is a reg, avoid creating invalid lowpart subreg, but
17413         instead split into a 512-bit move.  Don't split if not AVX512VL,
17414         input is xmm16+ reg and output is a mem.
17415         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
17416         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
17417         xmm16+ reg and output is a mem.
17419 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17421         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
17422         also for flag_dwarf2_cfi_asm.
17424 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
17426         PR rtl-optimization/85342
17427         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
17428         a bool scalar var inside of the loop instead.  Don't try to update
17429         recog_data.operand after failed apply_change_group.
17431 2018-04-12  Tom de Vries  <tom@codesourcery.com>
17433         PR target/85296
17434         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
17435         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
17436         array with flexible array member as array without given dimension.
17437         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
17438         argument for undefined param to true.
17440 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
17442         PR target/85321
17443         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17444         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
17445         from PowerPC section.
17446         * config/rs6000/sysv4.opt (mcall-): Improve help text.
17447         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
17448         help text that is too long.
17449         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
17450         help text that is too long.
17451         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
17452         help text that is too long.
17454 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
17456         * config/alpha/alpha.md (stack_probe_internal): Rename
17457         from "probe_stack".  Update all callers.
17459 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
17461         PR rtl-optimization/84566
17462         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
17463         sched_macro_fuse_insns.
17465 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
17467         PR target/84301
17468         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
17469         (compute_block_dependences): ... from here.
17471 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
17473         PR tree-optimization/85331
17474         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
17475         from int to HOST_WIDE_INT.
17477 2018-04-11  Martin Jambor  <mjambor@suse.cz>
17479         PR ipa/84149
17480         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
17481         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
17482         not the same as the source val.
17483         (cgraph_edge_brings_value_p): New parameter.
17484         (gather_edges_for_value): Pass destination value to
17485         cgraph_edge_brings_value_p.
17486         (perhaps_add_new_callers): Likewise.
17487         (get_info_about_necessary_edges): Likewise and exclude values brought
17488         only by self-recursive edges.
17489         (create_specialized_node): Redirect only clones of self-calling edges.
17490         (+self_recursive_pass_through_p): New function.
17491         (find_more_scalar_values_for_callers_subset): Use it.
17492         (find_aggregate_values_for_callers_subset): Likewise.
17493         (known_aggs_to_agg_replacement_list): Removed.
17494         (decide_whether_version_node): Re-calculate known constants for all
17495         remaining context clones.
17497 2018-04-11  Richard Biener  <rguenther@suse.de>
17499         PR lto/85339
17500         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
17501         from early DWARF output.
17502         (dwarf2out_early_finish): Output line info unconditionally into
17503         early DWARF and add reference to it.
17505 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
17507         PR target/85281
17508         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
17509         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
17510         other than V2DFmode using iptr mode attribute.
17511         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
17513 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
17515         PR rtl-optimization/84659
17516         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
17518 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
17520         PR debug/85302
17521         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
17522         SIZEP is NULL.
17523         (output_loc_list): Pass address of a dummy size variable even in the
17524         locview handling loop.
17525         (index_location_lists): Add comment on why skip_loc_list_entry can't
17526         call size_of_locs.
17528 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17530         PR target/85261
17531         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
17532         into register.
17534 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
17536         PR target/85321
17537         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17538         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
17539         and -mstring-compare-inline-limit.
17541 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
17543         PR target/85287
17544         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
17545         for stack clash protection in a register whenever we need it to be in
17546         a register.
17548 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
17550         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
17551         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
17553 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
17555         PR target/85321
17556         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
17557         the help text.
17558         (mlong-double-): Ditto.
17559         * config/rs6000/sysv4.opt (msdata=): Ditto.
17560         (mtls-size=): Ditto.
17562 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17564         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17565         erroneous entries for
17566         "vector int vec_ldl (int, long int *)", and
17567         "vector unsigned int vec_ldl (int, unsigned long int *)".
17568         Add comments and entries for
17569         "vector bool char vec_ldl (int, bool char *)",
17570         "vector bool short vec_ldl (int, bool short *)",
17571         "vector bool int vec_ldl (int, bool int *)",
17572         "vector bool long long vec_ldl (int, bool long long *)",
17573         "vector pixel vec_ldl (int, pixel *)",
17574         "vector long long vec_ldl (int, long long *)",
17575         "vector unsigned long long vec_ldl (int, unsigned long long *)".
17576         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
17577         type tree bool_long_long_type_node and correct definition of
17578         bool_V2DI_type_node to make reference to this new type tree.
17579         (rs6000_mangle_type): Replace erroneous reference to
17580         bool_long_type_node with bool_long_long_type_node.
17581         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
17582         comments to emphasize sign distinctions for char and int types and
17583         replace RS6000_BTI_bool_long constant with
17584         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
17585         use of RS6000_BTI_pixel.
17586         (bool_long_type_node): Remove this macro definition.
17587         (bool_long_long_type_node): New macro definition
17589 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
17591         PR rtl-optimization/85300
17592         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
17593         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
17594         simplify_unary_operation fails.
17596 2018-04-10  Martin Liska  <mliska@suse.cz>
17598         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
17599         cgraph_edge and ipa_ref.
17601 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
17603         PR target/85177
17604         PR target/85255
17605         * config/i386/sse.md
17606         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
17607         computation of the VEC_MERGE selector from mask.
17608         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
17609         Fix decoding of the VEC_MERGE selector into mask.
17611 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
17613         PR tree-optimization/85286
17614         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
17616 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
17618         * final.c (final_1): Set insn_last_address as well as
17619         insn_current_address.
17621 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17623         PR target/85173
17624         * explow.c (emit_stack_probe): Call validize_mem on memory location
17625         before passing it to gen_probe_stack.  Create address operand and
17626         legitimize it for the probe_stack_address case.
17628 2018-04-09  Jan Hubicka  <jh@suse.cz>
17630         PR lto/85078
17631         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
17632         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
17633         * tree.c (free_lang_data_in_type): Fix handling of binfos;
17634         walk basetypes.
17635         (free_lang_data): Rebuild type inheritance graph.
17637 2018-04-09  Martin Sebor  <msebor@redhat.com>
17639         * invoke.texi (-finline-small-functions): Mention other optimization
17640         options.
17641         (-findirect-inlining, -fpartial-inlining): Same.
17642         (-finline-functions-called-once): Same.
17643         (-freorder-blocks-and-partition): Same.
17645 2018-04-09  Jan Hubicka  <jh@suse.cz>
17647         PR rtl/84058
17648         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
17649         jumps; choose last target that matches the criteria (i.e.
17650         no partition changes for non-crossing jumps).
17651         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
17652         support for redirecting crossing jumps to non-crossing.
17654 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
17656         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
17657         also for naked functions.
17659 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
17661         * config/arc/arc.md (add_shift): New pattern.
17662         (add_shift2): Likewise.
17663         (sub_shift): Likewise.
17664         (sub_shift_cmp0_noout): Likewise.
17665         (compare_si_ashiftsi): Likewise.
17666         (xbfu_cmp0_noout): New combine pattern.
17667         (xbfu_cmp0"): Likewise.
17668         (movsi_set_cc_insn): Place the predicable variant first.
17669         (commutative_binary_cmp0_noout): Remove clobber.
17670         (commutative_binary_cmp0): New pattern.
17671         (noncommutative_binary_cmp0): Likewise.
17672         (noncommutative_binary_cmp0_noout): Likewise.
17673         (noncommutative_binary_comparison_result_used): Removed.
17674         (rsub_cmp0): New pattern.
17675         (rsub_cmp0_noout): Likewise.
17676         (extzvsi): Changed, keep only meaningful variants.
17677         (SQH, SEZ): New iterators.
17678         (SQH_postfix): New mode attribute.
17679         (SEZ_prefix): New code attribute.
17680         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
17681         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
17682         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
17683         of numerical value.
17684         (noncommutative_operator): Check the availability of barrel
17685         shifter option.
17687 2018-04-09  Richard Biener  <rguenther@suse.de>
17689         PR tree-optimization/85284
17690         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
17691         Only use the niter constraining form of simple_iv when the exit
17692         is always executed.
17694 2018-04-09  Tom de Vries  <tom@codesourcery.com>
17696         PR target/84041
17697         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17698         (define_expand "*memory_barrier"): New define_expand.
17699         (define_insn "memory_barrier"): New insn.
17701 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
17703         PR rtl-optimization/80463
17704         PR rtl-optimization/83972
17705         PR rtl-optimization/83480
17707         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
17708         correct producer for the insn.
17709         (tidy_control_flow): Fixup seqnos in case of debug insns.
17711 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
17713         PR rtl-optimization/83913
17715         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
17716         different sched-times when merging exprs.
17718 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
17720         PR rtl-optimization/83962
17722         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
17723         tidy_fallthru_edge and tidy_control_flow.
17725 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
17727         PR rtl-optimization/83530
17729         * sel-sched.c (force_next_insn): New global variable.
17730         (remove_insn_for_debug): When force_next_insn is true, also leave only
17731         next insn in the ready list.
17732         (sel_sched_region): When the region wasn't scheduled, make another pass
17733         over it with force_next_insn set to 1.
17735 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
17737         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
17738         into tm_file.
17739         * config/nds32/constants.md (unspec_volatile_element): Add enum values
17740         for interrupt control.
17741         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17742         functions for interrupt control.
17743         * config/nds32/nds32-intrinsic.md: Likewise.
17744         * config/nds32/nds32_intrinsic.h: Likewise.
17745         * config/nds32/nds32.h (nds32_builtins): Likewise.
17747 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
17749         * config/nds32/nds32.c (nds32_init_machine_status,
17750         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
17751         strict_aligned_p field.
17752         (nds32_expand_to_rtl_hook): New function.
17753         (TARGET_EXPAND_TO_RTL_HOOK): Define.
17754         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
17756 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17757             Chung-Ju Wu  <jasonwucj@gmail.com>
17759         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
17760         * config/nds32/nds32-n7.md: New file.
17761         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
17762         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
17763         pipeline.
17764         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
17765         * config/nds32/nds32.md (pipeline_model): Add n7.
17766         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
17767         * config/nds32/pipelines.md: Include n7 settings.
17769 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17770             Chung-Ju Wu  <jasonwucj@gmail.com>
17772         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
17773         * config/nds32/nds32-e8.md: New file.
17774         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
17775         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
17776         pipeline.
17777         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
17778         * config/nds32/nds32.md (pipeline_model): Add e8.
17779         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
17780         * config/nds32/pipelines.md: Include e8 settings.
17782 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17783             Chung-Ju Wu  <jasonwucj@gmail.com>
17785         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
17786         * config/nds32/nds32-n8.md: New file.
17787         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
17788         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
17789         pipeline.
17790         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
17791         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
17792         * config/nds32/nds32.md (pipeline_model): Add n8.
17793         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
17794         * config/nds32/pipelines.md: Include n8 settings.
17796 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17797             Chung-Ju Wu  <jasonwucj@gmail.com>
17799         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
17800         * config/nds32/nds32-n9-2r1w.md: New file.
17801         * config/nds32/nds32-n9-3r2w.md: New file.
17802         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
17803         nds32_register_ports): New or modify for cpu n9.
17804         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
17805         pipeline.
17806         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
17807         * config/nds32/nds32-utils.c: New file.
17808         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
17809         TARGET_MUL_SLOW): Define.
17810         * config/nds32/nds32.md (pipeline_model): New attribute.
17811         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
17812         New options that support cpu n9.
17813         * config/nds32/pipelines.md: Include n9 settings.
17814         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
17816 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
17818         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
17819         information if necessary.
17820         (output_cond_branch_compare_zero): Likewise.
17821         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
17822         (nds32_target_alignment): Refine for alignment.
17823         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
17824         (FUNCTION_BOUNDARY): Modify.
17825         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
17826         align case.
17827         * config/nds32/nds32.opt (malways-align, malign-functions): New.
17829 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
17831         * config/nds32/constants.md (unspec_volatile_element): Add values for
17832         TLB operation and data prefetch.
17833         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17834         functions for TLB operation and data prefetch.
17835         * config/nds32/nds32-intrinsic.md: Likewise.
17836         * config/nds32/nds32_intrinsic.h: Likewise.
17837         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
17838         (nds32_print_operand): Likewise.
17839         * config/nds32/nds32.h (nds32_builtins): Likewise.
17841 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
17842         Andrew Pinski <pinsika@gcc.gnu.org>
17844         PR middle-end/82976
17845         * match.pd: Use constant_boolean_node of correct type instead of
17846         boolean_true_node or boolean_false_node for simplifying
17847         pointer comparisons to zero.
17849 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
17851         PR tree-optimization/80021
17852         * tree.c (verify_type_variant): Make error call in verify_variant_match
17853         translatable and remove final full stop.
17855 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17857         * config/nds32/constants.md (unspec_volatile_element): Add
17858         UNSPEC_VOLATILE_EH_RETURN.
17859         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
17860         nds32_output_stack_pop): Support dwarf exception handling process.
17861         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
17862         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
17863         exception handling process.
17864         (nds32_compute_stack_frame): Likewise.
17865         (nds32_return_addr_rtx): Likewise.
17866         (nds32_initial_elimination_offset): Likewise.
17867         (nds32_expand_prologue): Likewise.
17868         (nds32_expand_epilogue): Likewise.
17869         (nds32_dynamic_chain_address): New function.
17870         * config/nds32/nds32.h (machine_function): Add fields for dwarf
17871         exception handling.
17872         (DYNAMIC_CHAIN_ADDRESS): Define.
17873         (EH_RETURN_DATA_REGNO): Define.
17874         (EH_RETURN_STACKADJ_RTX): Define.
17875         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
17876         patterns for dwarf exception handling.
17878 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17880         * config/nds32/nds32.h: Clean up obsolete macros.
17882 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17884         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17885         Add enum values for particular instructions.
17886         * config/nds32/nds32-intrinsic.c: Implementation of expanding
17887         particular intrinsic functions.
17888         * config/nds32/nds32-intrinsic.md: Likewise.
17889         * config/nds32/nds32_intrinsic.h: Likewise.
17890         * config/nds32/nds32.h (nds32_builtins): Likewise.
17891         * config/nds32/nds32.md (type): Add pbsad and pbsada.
17892         (btst, ave): New patterns for particular instructions.
17894 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17896         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17897         Add enum values for atomic load/store and memory sync.
17898         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
17899         and memory sync.
17900         * config/nds32/nds32-intrinsic.md: Likewise.
17901         * config/nds32/nds32_intrinsic.h: Likewise.
17902         * config/nds32/nds32.h (nds32_builtins): Likewise.
17904 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
17906         PR tree-optimization/85257
17907         * fold-const.c (native_encode_vector): If not all elts could fit
17908         and off is -1, return 0 rather than offset.
17909         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
17910         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
17911         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
17912         adjust buffer in native_interpret_expr call.
17914 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17916         * config/nds32/constants.md (unspec_volatile_element): Add cache
17917         control enum values.
17918         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
17919         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
17920         * config/nds32/nds32.c (nds32_cctl_names): New.
17921         (nds32_print_operand): Handle cache control register names.
17922         * config/nds32/nds32.h (nds32_builtins): New enum values.
17923         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
17924         macros.
17925         * config/nds32/nds32.md (type): Add mmu.
17926         * config/nds32/pipelines.md (simple_insn): Add mmu.
17928 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17930         * config/nds32/nds32.md (type): Remove call.
17931         * config/nds32/pipelines.md (simple_insn): Likewise.
17933 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17935         * config/nds32/constants.md (unspec_volatile_element): Add
17936         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
17937         UNSPEC_VOLATILE_FMFCFG.
17938         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
17939         description for fmfcfg and fmfcsr.
17940         (bdesc_1arg): Add fmtcsr.
17941         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
17942         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
17943         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
17944         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
17945         unspec_fmfcfg): New patterns.
17946         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
17947         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
17948         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
17949         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
17950         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
17951         __nds32__fmfcfg): Define.
17953 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17955         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
17956         intrinsic register names.
17957         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
17958         intrinsic register enum values and macros.
17960 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17962         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
17963         for load/store addressing form.
17964         (nds32_print_operand_address): Likewise.
17966 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
17968         PR target/85196
17969         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
17970         based on LABEL_REF.  Remove useless assertion.
17971         (pic_address_needs_scratch): Fix formatting.
17972         (sparc_legitimize_pic_address): Minor tweaks.
17973         (sparc_delegitimize_address): Adjust assertion accordingly.
17974         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
17975         into symbolic_operand.
17976         (movsi_high_pic_label_ref): Likewise.
17977         (movsi_lo_sum_pic_label_ref): Likewise.
17978         (movdi_pic_label_ref): Likewise.
17979         (movdi_high_pic_label_ref): Likewise.
17980         (movdi_lo_sum_pic_label_ref): Likewise.
17982 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
17984         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
17985         custom LIB_SPEC setup.
17987 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
17988             Kito Cheng  <kito.cheng@gmail.com>
17990         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
17991         * config/riscv/freebsd.h: New.
17993 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
17995         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
17996         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
17997         file.
17999 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
18000             Kito Cheng  <kito.cheng@gmail.com>
18002         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
18003         nds32_output_call, nds32_symbol_binds_local_p): New functions.
18004         * config/nds32/nds32-protos.h (nds32_output_call,
18005         nds32_output_return): Declare.
18006         * config/nds32/nds32.md: Refine all the call and return patterns.
18008 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
18010         PR debug/85252
18011         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
18012         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
18014         PR rtl-optimization/84872
18015         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
18016         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
18017         EDGE_CROSSING edge.
18019 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
18021         * expr.c (copy_blkmode_to_reg): Revert 254862.
18022         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
18024 2018-04-06  Richard Biener  <rguenther@suse.de>
18026         PR middle-end/85244
18027         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
18028         after seeing a component reference with an adjacent field.  Treat
18029         refs to arrays at struct end of external decls similar to
18030         refs to unconstrained commons.
18032 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
18034         PR sanitizer/85213
18035         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
18036         look through SAVE_EXPRs with non-side-effects argument.  Adjust
18037         recursive calls.
18038         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
18039         save_p here.
18041 2018-04-06  Richard Biener  <rguenther@suse.de>
18043         PR middle-end/85180
18044         * alias.c (find_base_term): New wrapper around find_base_term
18045         unwinding CSELIB_VAL_PTR changes.
18046         (find_base_term): Do not restore CSELIB_VAL_PTR during the
18047         recursion.
18049 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18051         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
18052         instructions.
18053         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
18054         constant definitions.
18055         ("nop"): lr 0,0 -> nopr r0
18056         ("nop_lr0", "nop_lr1"): New insn definitions.
18058 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
18060         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
18061         NDS32_V3PUSH_AVAILABLE_P macro.
18063 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
18064             Chung-Ju Wu  <jasonwucj@gmail.com>
18066         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
18067         (nds32*-*-*): Add float and fpu_config into supported_defaults.
18068         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
18069         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
18070         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
18071         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
18072         * config/nds32/constraints.md: New constraints and checking for hard
18073         float configuration.
18074         * config/nds32/iterators.md: New mode iterator and attribute for hard
18075         float configuration.
18076         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
18077         patterns.
18078         * config/nds32/nds32-fpu.md: New file.
18079         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
18080         deal with hard float code generation.
18081         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
18082         ARCH_V3S.
18083         (abi_type, float_reg_number): New enum type.
18084         * config/nds32/nds32-predicates.c: New predicates for hard float.
18085         * config/nds32/nds32-protos.h: Declare functions for hard float.
18086         * config/nds32/nds32.c: Implementation for hard float configuration.
18087         * config/nds32/nds32.h: Definitions for hard float configuration.
18088         * config/nds32/nds32.md: Include hard float machine description and
18089         modify patterns for hard float configuration.
18090         * config/nds32/nds32.opt: New options for hard float configuration.
18091         * config/nds32/predicates.md: New predicates for hard float
18092         configuration.
18094 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
18096         * common/config/nds32/nds32-common.c
18097         (nds32_option_optimization_table): Enable -mreleax-hint by default.
18099 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
18101         PR middle-end/85195
18102         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
18103         CONSTRUCTOR_ELT (ctor, ...)->value.
18105 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
18107         PR target/85193
18108         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
18110 2018-04-05  Tom de Vries  <tom@codesourcery.com>
18112         PR target/85204
18113         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
18114         cond jump.
18116 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
18117             Kito Cheng  <kito.cheng@gmail.com>
18119         * config/nds32/constraints.md (U33): Fine-tune checking condition.
18120         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
18121         * config/nds32/nds32.h (nds32_16bit_address_type): Add
18122         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
18124 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
18125             Kito Cheng  <kito.cheng@gmail.com>
18127         * config/nds32/constraints.md (Ufe): New memory constraint.
18128         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
18129         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
18130         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
18131         operands.
18132         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
18133         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
18135 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18137         * config/nds32/nds32.md: Use optimize_size in the condition for
18138         alu-shift instructions.
18140 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18142         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
18144 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18146         * config/nds32/nds32.md (negsi2): Refine pattern.
18148 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
18149             Chung-Ju Wu  <jasonwucj@gmail.com>
18151         * config/nds32/iterators.md (shift_rotate): New code iterator.
18152         (shift): New code attribute.
18153         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
18154         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
18155         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
18156         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
18157         bit-wise operations.
18158         (andsi3, *andsi3): Ditto.
18159         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
18160         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
18161         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
18162         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
18163         nds32_ior_operand, nds32_xor_operand): New predicates.
18165 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18167         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
18168         (addsi3, subsi3): ... this.
18170 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18172         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
18174 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18176         * config/nds32/nds32.md: Adjust indention.
18178 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
18180         * config/nds32/nds32.md (feature): New attribute.
18182 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18184         * config/nds32/nds32.md (subtype): New attribute.
18186 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18188         PR target/85203
18189         * config/arm/arm-builtins.c (arm_expand_builtin): Change
18190         expansion to perform a bitwise AND of the argument followed by a
18191         boolean negation of the result.
18193 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
18195         PR rtl-optimization/84878
18196         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
18197         the basic block.  Assert the use reference is not artificial and that
18198         it has an associated insn.
18200 2018-04-04  Michael Matz  <matz@suse.de>
18202         * builtins.c (compute_objsize): Pass correct operand
18203         to array_at_struct_end_p.
18205 2018-04-04  Richard Biener  <rguenther@suse.de>
18207         PR lto/85176
18208         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
18209         from contexts for DINFO_LEVEL_TERSE and below.
18211 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
18213         * config/nds32/nds32-doubleword.md (move_<mode>): Require
18214         resiter_operand condition.
18215         * config/nds32/nds32.md (*move<mode>): Ditto.
18217 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
18218             Monk Chiang  <sh.chiang04@gmail.com>
18220         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
18222 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18224         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
18226 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18227             Kito Cheng  <kito.cheng@gmail.com>
18229         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
18230         nds32_cond_code_str, output_cond_branch,
18231         output_cond_branch_compare_zero, nds32_expand_cbranch,
18232         nds32_expand_cstore, nds32_expand_movcc,
18233         nds32_output_cbranchsi4_equality_zero,
18234         nds32_output_cbranchsi4_equality_reg,
18235         nds32_output_cbranchsi4_equality_reg_or_const_int,
18236         nds32_output_cbranchsi4_greater_less_zero: New functions.
18237         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
18238         nds32_expand_cstore, nds32_expand_movcc,
18239         nds32_output_cbranchsi4_equality_zero,
18240         nds32_output_cbranchsi4_equality_reg,
18241         nds32_output_cbranchsi4_equality_reg_or_const_int,
18242         nds32_output_cbranchsi4_greater_less_zero): Declare.
18243         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
18244         nds32_rimm11s_operand): New predicates.
18245         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
18246         * config/nds32/nds32.md: Rewrite all the branch and conditional move
18247         patterns.
18249 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
18251         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
18252         * config/nds32/nds32.md: Ditto.
18253         * config/nds32/pipelines.md: Ditto.
18255 2018-04-04  Richard Biener  <rguenther@suse.de>
18257         PR tree-optimization/85168
18258         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
18259         propagating abnormals.
18261 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18263         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
18265 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
18266             Kito Cheng  <kito.cheng@gmail.com>
18268         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
18269         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
18270         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
18271         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
18272         * config/nds32/nds32.md (sibcall_internal): New.
18273         (sibcall_register): Remove.
18274         (sibcall_immediate): Remove.
18275         (sibcall_value_internal): New.
18276         (sibcall_value_register): Remove.
18277         (sibcall_value_immediate): Remove.
18278         * config/nds32/predicates.md (nds32_general_register_operand): New.
18279         (nds32_call_address_operand): New.
18281 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
18283         PR rtl-optimization/85167
18284         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
18285         bb_defs if *split_p, instead preinitialize it to NULL.
18287         PR tree-optimization/85156
18288         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
18289         evaluating the argument multiple times.
18291 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
18293         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
18294         than vector.
18295         (_mm_cvtpd_ps): Likewise.
18296         (_mm_cvttpd_epi32): Likewise.
18297         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
18298         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
18299         vector, pixel, and bool following altivec.h include.
18301 2018-04-03  Martin Sebor  <msebor@redhat.com>
18303         * doc/extend.texi (Common Function Attributes): Clarify.
18304         (const attribute): Likewise.
18305         (pure attribute): Likewise.
18307 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
18309         PR target/85169
18310         * config/i386/i386.c (ix86_expand_vector_set): Use
18311         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
18313 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
18315         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
18316         instructions when changing rounding bits to preserve precision bits
18317         in the x87 control word.
18319 2018-04-03  Martin Liska  <mliska@suse.cz>
18321         PR tree-optimization/82491
18322         * rtl.h (strip_offset_and_add): Replace += suboffset with
18323         poly_uint64 () + suboffset.
18325 2018-03-29  Martin Liska  <mliska@suse.cz>
18326             Martin Jambor  <mjambor@suse.cz>
18328         PR ipa/84947
18329         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
18330         param_type is not an integral or pointer type.
18332 2018-04-03  Richard Biener  <rguenther@suse.de>
18334         * sese.h (recompute_all_dominators): Remove.
18336 2018-04-02  Martin Sebor  <msebor@redhat.com>
18338         * doc/invoke.texi (-Wrestrict): Fix typos.
18340 2018-04-02  Jim Wilson  <jimw@sifive.com>
18342         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
18343         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
18344         (<optab>di3, <optab>si3_extend): Likewise.
18345         (<optab>si3_mask, <optab>si3_mask_1): New.
18346         (<optab>di3_mask, <optab>di3_mask_1): New.
18347         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
18348         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
18349         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
18351 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
18353         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
18354         example.
18356 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
18358         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
18359         (nds32_canonicalize_comparison): New function.
18361 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
18362             Kito Cheng  <kito.cheng@gmail.com>
18363             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
18365         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
18366         * config/nds32/constants.md (unspec_volatile_element): Add
18367         UNSPEC_VOLATILE_RELAX_GROUP.
18368         * config/nds32/nds32-relax-opt.c: New file.
18369         * config/nds32/nds32-predicates.c
18370         (nds32_symbol_load_store_p): New function.
18371         * config/nds32/nds32-protos.h
18372         (nds32_symbol_load_store_p): Declare function.
18373         (make_pass_nds32_relax_opt): Declare new rtl pass function.
18374         * config/nds32/nds32.c
18375         (nds32_register_pass): New function to register pass.
18376         (nds32_register_passes): New function to register passes.
18377         * config/nds32/nds32.md (relax_group): New pattern.
18378         * config/nds32/nds32.opt (mrelax-hint): New option.
18379         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
18381 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
18383         * config/nds32/t-nds32: Modify files dependency.
18385 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
18387         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
18388         (PROFILE_HOOK): Define its implementation.
18390 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
18392         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
18393         type and 32-bit size.
18395 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
18397         PR middle-end/85090
18398         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
18399         (V_128_256): New mode iterator.
18400         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
18401         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
18402         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
18403         of V.
18404         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
18405         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
18407 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
18409         PR target/83315
18410         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
18411         NaN inputs correctly.
18413 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
18415         PR target/80546
18416         * config/rs6000/vsx.md (??r): New mode attribute.
18417         (*vsx_mov<mode>_64bit): Use it.
18418         (*vsx_mov<mode>_32bit): Likewise.
18420 2018-03-30  Martin Sebor  <msebor@redhat.com>
18422         PR tree-optimization/84818
18423         * builtins.c (check_access): Use warning_n.
18425 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18427         PR target/83822
18428         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
18429         condition.
18430         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
18431         condition.
18433 2018-03-30  Julia Koval  <julia.koval@intel.com>
18435         PR target/84413
18436         * x86-tune.def (movx, partial_reg_dependency): Enable for
18437         m_SKYLAKE_AVX512.
18439 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
18441         PR inline-asm/84985
18442         * lra-constraints.c (process_alt_operands): Move setting
18443         this_alternative_matches below.
18445 2018-03-29  Martin Liska  <mliska@suse.cz>
18447         PR lto/84995.
18448         * doc/invoke.texi: Document how LTO works with debug info.
18449         Describe auto-load support of binutils.  Mention 'x86-64'
18450         as valid option value of -march option.
18452 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
18454         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
18456         PR c/85094
18457         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
18458         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
18459         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
18460         checking.
18462 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
18464         PR target/84912
18465         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
18466         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
18467         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
18468         for RS6000_BTM_POWERPC64.
18469         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
18470         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
18471         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
18472         definition.
18473         (DIVDE): Use it.
18474         (DIVDEU): Likewise.
18476 2018-03-28  Carl Love  <cel@us.ibm.com>
18478         Revert
18479         2017-09-27  Carl Love  <cel@us.ibm.com>
18481         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
18482         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
18483         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
18484         fctiw instruction.
18486 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18488         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
18489         instead of __vector bool.
18490         (_mm_max_pu8): Likewise.
18491         (_mm_min_pi16): Likewise.
18493 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
18495         PR target/84912
18496         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
18497         (DIVWEUO): Likewise.
18498         (DIVDEO): Likewise.
18499         (DIVDEUO): Likewise.
18500         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
18501         DIVWEUO and DIVDEUO.
18502         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
18503         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
18504         (div_extend): Likewise.
18505         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
18506         builtin function.
18507         (__builtin_divweuo): Likewise.
18508         (__builtin_divdeo): Likewise.
18509         (__builtin_divdeuo): Likewise.
18511 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
18513         PR target/85095
18514         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
18515         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
18517         PR tree-optimization/82004
18518         * gimple-match-head.c (optimize_pow_to_exp): New function.
18519         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
18520         Don't fold to exp if optimize_pow_to_exp is false.
18522 2018-03-28  Martin Liska  <mliska@suse.cz>
18524         PR other/84819
18525         * calls.c (initialize_argument_information): Fix trailing space.
18526         * common.opt: Fix typo and provide better explanation for
18527         -fsanitize-coverage option.
18528         * config/i386/i386.opt: Fix typo.
18530 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
18531             Martin Liska  <mliska@suse.cz>
18533         PR sanitizer/85081
18534         * gimplify.c (asan_poison_variable): Don't do the check for
18535         gimplify_omp_ctxp here.
18536         (gimplify_decl_expr): Do it here.
18537         (gimplify_target_expr): Likewise.
18539 2018-03-28  Martin Liska  <mliska@suse.cz>
18541         PR target/84988
18542         * config/i386/i386.c (ix86_function_arg_advance): Do not call
18543         chkp_type_bounds_count if MPX is not enabled.
18545 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
18547         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
18549 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
18551         PR target/84914
18552         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
18553         function to create the function decl for complex long double
18554         multiply and divide for -mabi=ieeelongdouble.
18555         (init_float128_ieee): Call it.
18557 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
18559         PR target/85044
18560         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
18561         -fcf-protection=branch -mibt.
18562         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
18564 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
18566         PR target/81863
18567         * config/arm/arm.c (arm_valid_symbolic_address): Handle
18568         arm_word_relocations.
18570 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
18572         PR target/85056
18573         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
18574         extern array declarations.
18576 2018-03-27  Richard Biener  <rguenther@suse.de>
18578         PR middle-end/84067
18579         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
18580         explicit single_use checks.
18582 2018-03-27  Richard Biener  <rguenther@suse.de>
18584         PR tree-optimization/85082
18585         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
18586         Valueize the VUSE.
18588 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
18590         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
18591         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
18592         Turn on fasynchronous-unwind-tables and funwind-tables.
18594 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
18596         PR target/85073
18597         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
18598         (*bmi_blsr_<mode>_ccz): Ditto.
18600 2018-03-26  Tom de Vries  <tom@codesourcery.com>
18602         PR tree-optimization/85063
18603         * omp-general.c (offloading_function_p): New function.  Factor out
18604         of ...
18605         * omp-offload.c (pass_omp_target_link::gate): ... here.
18606         * omp-general.h (offloading_function_p): Declare.
18607         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
18608         with attribute omp declare target for offloading functions.
18610 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
18612         PR tree-optimization/84005
18613         * tree-data-ref.h (get_base_for_alignment): Declare.
18614         * tree-data-ref.c (get_base_for_alignment_1): New function.
18615         (get_base_for_alignment): Likewise.
18616         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
18617         get_base_for_alignment to find a suitable base object, instead
18618         of always using drb->base_address.
18620 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
18622         PR inline-asm/85022
18623         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
18624         known size by default.
18626 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
18628         PR inline-asm/85030
18629         * lra-constraints.c (process_alt_operands): Don't match BLKmode
18630         and non BLKmode operands.
18632 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18634         PR target/85026
18635         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
18636         Clean up attributes.
18638 2018-03-23  Richard Biener  <rguenther@suse.de>
18640         PR debug/85020
18641         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
18642         we are going to emit early debug for LTO.
18644 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
18646         PR inline-asm/85034
18647         * function.c (match_asm_constraints_1): Don't optimize if input
18648         doesn't satisfy general_operand predicate for output's mode.
18650         PR inline-asm/85022
18651         * alias.c (write_dependence_p): Don't require for x_canonicalized
18652         non-VOIDmode if x has VOIDmode.
18654         PR sanitizer/85029
18655         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
18656         just don't try to optimize it rather than assert it never happens.
18658 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18660         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
18661         macro expansions for definition of ST_INTERNAL_<mode> and
18662         LD_INTERNAL_<mode> builtins.
18663         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
18664         Remove prototype.
18665         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
18666         function.
18667         (altivec_expand_st_builtin): Likewise.
18668         (altivec_expand_builtin): Remove calls to deleted functions.
18669         (rs6000_address_for_altivec): Delete this function.
18670         * config/rs6000/vector.md: Remove expands for
18671         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
18673 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
18675         PR target/84826
18676         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
18677         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
18678         re-computing once computed.
18679         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
18680         (arm_init_machine_status): Initialize
18681         machine->static_chain_stack_bytes.
18683 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18685         PR target/84760
18686         * doc/extend.texi: Add four new prototypes for vec_ld.
18687         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
18688         definitions for more logical presentation.
18689         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
18690         entries for V1TI variants of __builtin_altivec_ld builtin.
18691         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
18692         handling of V1TI variant of LVX icode pattern.
18693         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
18694         (rs6000_gimple_fold_builtin): Likewise.
18695         (altivec_init_builtins): Add code to define
18696         __builtin_altivec_lvx_v1ti function.
18698 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
18700         PR inline-asm/84941
18701         * function.c (match_asm_constraints_1): Don't do the optimization
18702         if input isn't a REG, SUBREG, MEM or constant.
18704 2018-03-22  Tom de Vries  <tom@codesourcery.com>
18706         PR tree-optimization/84956
18707         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
18708         bb_has_abnormal_pred.
18710 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
18712         PR sanitizer/85018
18713         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
18714         DECL_INITIAL (decl) to decl at the end.
18715         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
18716         adjust the comment.
18718 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
18720         * doc/extend.texi (__builtin_tgmath): Document when complex
18721         integer types are treated as _Complex _Float64.
18723 2018-03-21  Tom de Vries  <tom@codesourcery.com>
18725         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
18727 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
18729         PR tree-optimization/84960
18730         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
18731         if it is ENTRY block, move them into single succ of ENTRY in that case.
18733 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
18735         PR tree-optimization/84811
18736         * poly-int.h (poly_span_traits): Remove the T3 parameter and
18737         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
18738         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
18739         (known_subrange_p): Update accordingly.  Cast each value involved
18740         in the size comparison, rather than casting the result of the
18741         subtraction.
18743 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
18745         PR tree-optimization/84982
18746         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
18747         by flipping the least significant bit rather than all bits from
18748         bitpos to bitpos + bitsize - 1.
18750 2018-03-21  Nathan Sidwell  <nathan@acm.org>
18752         * doc/extend.texi (Deprecated Features): Remove mention of
18753         long-deleted deprecations.
18755 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18757         PR jit/84288
18758         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
18759         * configure: Regenerate.
18761 2018-03-21  Tom de Vries  <tom@codesourcery.com>
18763         PR tree-optimization/83126
18764         * tree-parloops.c (num_phis): New function.
18765         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
18767 2018-03-21  Nathan Sidwell  <nathan@acm.org>
18769         * doc/extend.texi (Deprecated Features): Update deprecated flags,
18770         mention anon-struct/union members and trailing attributes.
18772 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
18774         PR tree-optimization/84969
18775         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
18776         builtin memset partitions if they set different rhs values.
18778 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
18780         PR rtl-optimization/84989
18781         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
18782         VEC_DUPLICATE with scalar result mode.
18784 2018-03-21  Martin Liska  <mliska@suse.cz>
18786         PR ipa/84963
18787         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
18788         not intended return statement.
18790 2018-03-21  Martin Liska  <mliska@suse.cz>
18792         PR target/84988
18793         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
18794         (chkp_find_bound_slots_1): Limit number of iterations.
18796 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
18798         PR target/84838
18799         * Minor grammar fixes for x86 options.
18801 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
18803         PR debug/84875
18804         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
18805         holding REG_CFA_RESTORE notes, instead turn them into a USE.
18807 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
18809         PR target/83789
18810         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
18811         (altivec_lvx_<mode>_1op): Likewise.
18812         (altivec_stvx_<mode>_2op): Likewise.
18813         (altivec_stvx_<mode>_1op): Likewise.
18814         (altivec_lvx_<VM2:mode>): New define_expand.
18815         (altivec_stvx_<VM2:mode>): Likewise.
18816         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
18817         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18818         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
18819         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18820         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
18821         (rs6000_gen_lvx): Likewise.
18822         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
18823         (altivec_expand_stv_builtin): Likewise.
18824         (altivec_expand_builtin): Likewise.
18825         * config/rs6000/vector.md: Likewise.
18827 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18829         PR target/82518
18830         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
18831         BYTES_BIG_ENDIAN.
18833 2018-03-20  Richard Biener  <rguenther@suse.de>
18835         PR target/84986
18836         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
18837         sign-conversions as zero, fall back to standard scalar_stmt
18838         cost for the rest.
18840 2018-03-20  Martin Liska  <mliska@suse.cz>
18842         PR ipa/84825
18843         * predict.c (rebuild_frequencies): Handle case when we have
18844         PROFILE_ABSENT, but flag_guess_branch_prob is false.
18846 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
18848         PR target/84990
18849         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
18850         flag_section_anchors.
18851         * varasm.c (use_blocks_for_decl_p): Remove hack for
18852         dw2_force_const_mem.
18854         PR target/84845
18855         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
18856         to ...
18857         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
18858         be created, use lowpart_subreg of operands[0] rather than operands[0]
18859         itself.
18860         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
18861         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
18862         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
18863         and n constraint instead of aarch64_shift_imm_di and Usd.
18864         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
18865         (*aarch64_<optab>_reg_minus<mode>3): ... this.
18867 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
18869         PR target/82989
18870         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
18871         to favor GPR over NEON registers.
18872         (<shift>di3_neon): Likewise.
18874 2018-03-20  Tom de Vries  <tom@codesourcery.com>
18876         PR target/84952
18877         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
18878         (nvptx_process_pars): Emit bar.sync asap and alap.
18880 2018-03-20  Tom de Vries  <tom@codesourcery.com>
18882         PR target/84954
18883         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
18884         seen_label if seen_label is already set.
18886 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
18888         PR target/84945
18889         * config/i386/i386.c (fold_builtin_cpu): For features above 31
18890         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
18891         Use 1U instead of 1.  Formatting fixes.
18893         PR c/84953
18894         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
18895         instead of TREE_TYPE (s1) for the return value.
18897 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
18899         PR tree-optimization/84946
18900         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
18901         bitsize + bitsize in poly_uint64 rather than poly_int64.
18903         PR sanitizer/78651
18904         * dwarf2asm.c: Include fold-const.c.
18905         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
18906         of decl rather than decl itself.
18908         PR rtl-optimization/84643
18909         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
18911 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
18913         PR sanitizer/78651
18914         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
18915         calling assemble_variable.
18917 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
18919         PR target/81647
18920         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
18921         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
18923 2018-03-19  Jim Wilson  <jimw@sifive.com>
18925         PR bootstrap/84856
18926         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
18927         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
18928         (riscv_first_stack_step): Likewise.
18929         (riscv_option_override): Use STACK_BOUNDARY instead of
18930         MIN_STACK_BOUNDARY.
18931         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
18932         MIN_STACK_BOUNDARY.
18933         (BIGGEST_ALIGNMENT): Set to 128.
18934         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
18935         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
18936         STACK_BOUNDARY.
18938 2018-03-19  Richard Biener  <rguenther@suse.de>
18940         PR tree-optimization/84933
18941         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
18942         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
18944 2018-03-19  Richard Biener  <rguenther@suse.de>
18946         PR tree-optimization/84859
18947         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
18948         (cond_if_else_store_replacement): Perform sinking operation on
18949         single-store BBs regardless of MAX_STORES_TO_SINK setting.
18950         Generalize what a BB with a single eligible store is.
18952 2018-03-19  Richard Biener  <rguenther@suse.de>
18954         PR tree-optimization/84929
18955         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
18956         chrec_is_positive against non-chrec arg.
18958 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
18960         PR target/84711
18961         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
18963 2018-03-18  Martin Liska  <mliska@suse.cz>
18965         PR rtl-optimization/84635
18966         * regrename.c (build_def_use): Use matches_mode only when
18967         matches >= 0.
18969 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
18971         PR tree-optimization/84913
18972         * tree-vect-loop.c (vectorizable_reduction): Don't try to
18973         vectorize chains of COND_EXPRs.
18975 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
18977         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
18979 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
18981         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
18983 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
18985         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
18987 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
18988             Kito Cheng  <kito.cheng@gmail.com>
18990         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
18991         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
18992         (nds32_adjust_reg_alloc_order): New function.
18993         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
18995 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
18997         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
18998         nds32_print_operand, nds32_print_operand_address): Use
18999         HOST_WIDE_INT_PRINT_DEC instead.
19001 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
19003         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
19005 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
19007         PR target/84902
19008         * config/i386/i386.c (initial_ix86_tune_features,
19009         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
19010         unsigned long long.
19011         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
19012         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
19013         rather than 1u << ix86_tune.  Formatting fix.
19014         (ix86_option_override_internal): Change ix86_arch_mask from
19015         unsigned int to unsigned HOST_WIDE_INT, initialize to
19016         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
19017         (ix86_function_specific_restore): Likewise.
19019 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
19021         PR target/84899
19022         * postreload.c (reload_combine_recognize_pattern): Perform
19023         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
19024         truncate_int_for_mode the result for the destination's mode.
19026         PR c/84909
19027         * hsa-gen.c (mem_type_for_type): Fix comment typo.
19028         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
19029         Likewise.
19030         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19031         Likewise.
19033 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
19035         PR target/84876
19036         * lra-assigns.c (lra_split_hard_reg_for): Don't use
19037         regno_allocno_class_array and sorted_pseudos.
19038         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
19039         insns where regno is used.
19041 2018-03-16  Martin Liska  <mliska@suse.cz>
19043         PR ipa/84833
19044         * multiple_target.c (create_dispatcher_calls): Redirect
19045         reference in the symbol table.
19047 2018-03-16  Martin Liska  <mliska@suse.cz>
19049         PR ipa/84722
19050         * multiple_target.c (create_dispatcher_calls): Redirect also
19051         an alias.
19053 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
19055         PR c++/79937
19056         PR c++/82410
19057         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
19058         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
19059         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
19061 2018-03-16  Julia Koval  <julia.koval@intel.com>
19063         * doc/invoke.texi (Skylake Server): Add CLWB.
19064         Cannonlake): Remove CLWB.
19066 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
19068         PR tree-optimization/84841
19069         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
19070         1 << 3.
19071         (FLOAT_ONE_CONST_TYPE): Define.
19072         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
19073         (sort_by_operand_rank): Put entries with higher constant_type last
19074         rather than first to match comments.
19076 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
19078         * config/nios2/nios2.md (movsi_internal): Fix thinko in
19079         split predicate.
19081 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
19083         PR c++/79085
19084         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
19085         check and use address of target always.
19087 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
19089         PR target/84574
19090         * config/i386/i386.c (indirect_thunk_needed): Update comments.
19091         (indirect_thunk_bnd_needed): Likewise.
19092         (indirect_thunks_used): Likewise.
19093         (indirect_thunks_bnd_used): Likewise.
19094         (indirect_return_needed): New.
19095         (indirect_return_bnd_needed): Likewise.
19096         (output_indirect_thunk_function): Add a bool argument for
19097         function return.
19098         (output_indirect_thunk_function): Don't generate alias for
19099         function return thunk.
19100         (ix86_code_end): Call output_indirect_thunk_function to generate
19101         function return thunks.
19102         (ix86_output_function_return): Set indirect_return_bnd_needed
19103         and indirect_return_needed instead of indirect_thunk_bnd_needed
19104         and indirect_thunk_needed.
19106 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
19108         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
19109         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
19110         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
19112 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
19113             Paul Hua <paul.hua.gm@gmail.com>
19115         PR c/84852
19116         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
19118 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
19120         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
19121         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
19122         resp. SFmode cases.
19124 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
19126         PR target/84711
19127         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
19128         instead of GET_MODE_SIZE when comparing Units.
19130 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
19132         PR target/68256
19133         * varasm.c (hash_section): Return an unchangeble hash value
19134         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
19135         Return !aarch64_can_use_per_function_literal_pools_p ().
19137 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
19139         PR target/84860
19140         * optabs.c (emit_conditional_move): Pass address of cmode's copy
19141         rather than address of cmode as last argument to prepare_cmp_insn.
19143 2018-03-15  Julia Koval  <julia.koval@intel.com>
19145         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
19146         F_AVX512VNNI, F_AVX512BITALG): New.
19148 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
19150         PR target/83451
19151         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
19152         insn for floating-point loads and stores.
19154 2018-03-14  Carl Love  <cel@us.ibm.com>
19156         * config/rs6000/rs6000-c.c: Add macro definitions for
19157         ALTIVEC_BUILTIN_VEC_PERMXOR.
19158         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
19159         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
19160         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
19161         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
19162         UNSPEC_VPERMXOR.
19163         * config/doc/extend.texi: Add prototypes for vec_permxor.
19165 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
19167         PR c/84852
19168         * diagnostic-show-locus.c (class layout_point): Convert m_line
19169         from int to linenum_type.
19170         (line_span::comparator): Use linenum "compare" function when
19171         comparing line numbers.
19172         (test_line_span): New function.
19173         (layout_range::contains_point): Convert param "row" from int to
19174         linenum_type.
19175         (layout_range::intersects_line_p): Likewise.
19176         (layout::will_show_line_p): Likewise.
19177         (layout::print_source_line): Likewise.
19178         (layout::should_print_annotation_line_p): Likewise.
19179         (layout::print_annotation_line): Likewise.
19180         (layout::print_leading_fixits): Likewise.
19181         (layout::annotation_line_showed_range_p): Likewise.
19182         (struct line_corrections): Likewise for field m_row.
19183         (line_corrections::line_corrections): Likewise for param "row".
19184         (layout::print_trailing_fixits): Likewise.
19185         (layout::get_state_at_point): Likewise.
19186         (layout::get_x_bound_for_row): Likewise.
19187         (layout::print_line): Likewise.
19188         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
19189         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
19190         * input.c (selftest::test_linenum_comparisons): New function.
19191         (selftest::input_c_tests): Call it.
19192         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
19193         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
19194         * selftest.h (ASSERT_GT): New macro.
19195         (ASSERT_GT_AT): New macro.
19196         (ASSERT_LT): New macro.
19197         (ASSERT_LT_AT): New macro.
19199 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
19201         PR rtl-optimization/84780
19202         * combine.c (distribute_links): Don't make a link based on pc_rtx.
19204 2018-03-14  Martin Liska  <mliska@suse.cz>
19206         * tree.c (record_node_allocation_statistics): Use
19207         get_stats_node_kind.
19208         (get_stats_node_kind): New function extracted from
19209         record_node_allocation_statistics.
19210         (free_node): Use get_stats_node_kind.
19212 2018-03-14  Richard Biener  <rguenther@suse.de>
19214         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
19215         that the value-set of ANTIC_IN doesn't grow.
19217         Revert
19218         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19219         member.
19220         (BB_VISITED_WITH_VISITED_SUCCS): New define.
19221         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19223 2018-03-14  Julia Koval  <julia.koval@intel.com>
19225         * config.gcc (icelake-client, icelake-server): New.
19226         (icelake): Remove.
19227         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
19228         (initial_ix86_arch_features): Ditto.
19229         (PTA_SKYLAKE): Add SGX.
19230         (PTA_ICELAKE): Remove.
19231         (PTA_ICELAKE_CLIENT): New.
19232         (PTA_ICELAKE_SERVER): New.
19233         (ix86_option_override_internal): Split up icelake on icelake client and
19234         icelake server.
19235         (get_builtin_code_for_version): Ditto.
19236         (fold_builtin_cpu): Ditto.
19237         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
19238         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
19239         * config/i386/i386.h (processor_type): Ditto.
19240         * doc/invoke.texi: Ditto.
19242 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
19244         PR sanitizer/83392
19245         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
19246         INTEGER_CST offset, add it together with bitpos / 8 and
19247         sign extend based on POINTER_SIZE.
19249         PR target/84844
19250         Revert
19251         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
19253         PR target/78090
19254         * config/i386/constraints.md (Yc): New register constraint.
19255         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
19256         Use Yc constraint for alternative 2 of operand 0.  Remove
19257         preferred_for_speed attribute.
19259 2018-03-14  Richard Biener  <rguenther@suse.de>
19261         PR tree-optimization/84830
19262         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
19263         with the old one to avoid oscillations.
19265 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
19267         PR target/83712
19268         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
19269         pseudos.
19270         (assign_by_spills): Return a flag of reload assignment failure.
19271         Do not process the reload assignment failures.  Do not spill other
19272         reload pseudos if they has the same reg class.  Update n if
19273         necessary.
19274         (lra_assign): Add a return arg.  Set up from the result of
19275         assign_by_spills call.
19276         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19277         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
19278         usage_insns if it is not NULL.
19279         (spill_hard_reg_in_range): New function.
19280         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19281         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19282         function prototypes.
19283         (lra_assign): Change prototype.
19284         * lra.c (lra): Add code to deal with fails by splitting hard reg
19285         live ranges.
19287 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
19289         * config/riscv/riscv.opt (mrelax): New option.
19290         * config/riscv/riscv.c (riscv_file_start): Emit ".option
19291         "norelax" when riscv_mrelax is disabled.
19292         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
19294 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19296         PR target/84743
19297         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
19298         reassociation for int modes.
19300 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
19302         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
19303         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
19304         for big-endian.
19305         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
19306         * config/aarch64/aarch64-sve.md
19307         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
19308         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
19309         (*extend<mode><Vwide>2): Rename to...
19310         (aarch64_sve_extend<mode><Vwide>2): ...this.
19311         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
19312         renaming the old pattern to...
19313         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
19314         unsigned packs.
19315         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
19316         define_expand, renaming the old pattern to...
19317         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
19318         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
19319         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
19320         account when deciding which SVE instruction the optab should use.
19321         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
19323 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
19325         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
19326         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
19327         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
19328         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
19329         (tlsdesc_small_<mode>): Turn a define_expand and use
19330         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
19331         (tlsdesc_small_advsimd_<mode>): ...this.
19332         (tlsdesc_small_sve_<mode>): New pattern.
19334 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
19336         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
19337         (UNSPEC_UMUL_HIGHPART): New constants.
19338         (MUL_HIGHPART): New int iteraor.
19339         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
19340         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
19341         define_expand.
19342         (*<su>mul<mode>3_highpart): New define_insn.
19344 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
19346         PR lto/84805
19347         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19348         incomplete types.
19350 2018-03-13  Martin Liska  <mliska@suse.cz>
19352         PR ipa/84658.
19353         * (sem_item_optimizer::sem_item_optimizer): Initialize new
19354         vector.
19355         (sem_item_optimizer::~sem_item_optimizer): Release it.
19356         (sem_item_optimizer::merge_classes): Register variable aliases.
19357         (sem_item_optimizer::fixup_pt_set): New function.
19358         (sem_item_optimizer::fixup_points_to_sets): Likewise.
19359         * ipa-icf.h: Declare new variables and functions.
19361 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
19363         PR middle-end/84834
19364         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
19365         integer_pow2p@2 and test integer_pow2p in condition.
19366         (A < 0 ? C : 0): Similarly for @1.
19368         PR middle-end/84831
19369         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
19370         characters starting at p contain '\0' character, don't look beyond
19371         that.
19373         PR target/84827
19374         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
19375         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
19377         PR target/84828
19378         * reg-stack.c (change_stack): Change update_end var from int to
19379         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
19380         also call set_block_for_insn on the newly added insns and rescan.
19382         PR target/84786
19383         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
19384         on the last operand.
19386         PR c++/84704
19387         * tree.c (stabilize_reference_1): Return save_expr (e) for
19388         STATEMENT_LIST even if it doesn't have side-effects.
19390 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
19392         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
19394 2018-03-12  Renlin Li  <renlin.li@arm.com>
19396         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
19397         aarch64_output_scalar_simd_mov_immediate.
19399 2018-03-12  Martin Sebor  <msebor@redhat.com>
19401         PR tree-optimization/83456
19402         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
19403         for perfectly overlapping calls to memcpy.
19404         (gimple_fold_builtin_memory_chk): Same.
19405         (gimple_fold_builtin_strcpy): Handle no-warning.
19406         (gimple_fold_builtin_stxcpy_chk): Same.
19407         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
19409 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
19411         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
19412         parameter.  Use it for SFmode.
19413         (rs6000_function_arg_advance_1): Adjust.
19414         (rs6000_function_arg): Adjust.
19415         (rs6000_gimplify_va_arg): Pass false for that new parameter.
19417 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
19419         PR rtl-optimization/84169
19420         PR rtl-optimization/84780
19421         * combine.c (can_combine_p): Check for a 2-insn combination whether
19422         the destination register is used between the two insns, too.
19424 2018-03-12  Richard Biener  <rguenther@suse.de>
19426         PR tree-optimization/84803
19427         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
19428         for refs DR analysis didn't process.
19430 2018-03-12  Richard Biener  <rguenther@suse.de>
19432         PR tree-optimization/84777
19433         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
19434         force-vectorize loops ignore whether we are optimizing for size.
19436 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
19438         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
19439         (TARGET_MD_ASM_ADJUST): Define.
19441 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
19442             Kito Cheng  <kito.cheng@gmail.com>
19443             Chung-Ju Wu  <jasonwucj@gmail.com>
19445         * config/nds32/nds32.c (nds32_compute_stack_frame,
19446         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
19447         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
19448         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
19449         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
19450         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
19451         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
19452         * config/nds32/nds32.md (prologue, epilogue): Use macro
19453         NDS32_V3PUSH_AVAILABLE_P to do checking.
19455 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
19457         PR debug/58150
19458         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
19459         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
19460         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
19461         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
19462         addition of most attributes on !orig_type_die or the attribute not
19463         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
19465 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
19466             Chung-Ju Wu  <jasonwucj@gmail.com>
19468         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
19469         __NDS32_VH__ macro.
19470         * config/nds32/nds32.opt (mvh): New option.
19472 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
19473             Chung-Ju Wu  <jasonwucj@gmail.com>
19475         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
19476         function.
19477         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
19478         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
19479         definition.
19481 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
19482             Chung-Ju Wu  <jasonwucj@gmail.com>
19484         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
19485         function.
19486         * config/nds32/nds32-multiple.md (strlensi): New pattern.
19487         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
19489 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
19490             Kito Cheng  <kito.cheng@gmail.com>
19491             Chung-Ju Wu  <jasonwucj@gmail.com>
19493         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
19494         UNSPEC_FFMISM and UNSPEC_FLMISM.
19495         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
19496         for ffb, ffmism and flmism.
19497         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
19498         (unspec_ffmism): Ditto.
19499         (unspec_flmism): Ditto.
19500         (nds32_expand_builtin_impl): Check if string extension is available.
19501         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
19502         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
19504 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
19506         Reverting patch:
19507         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
19509         PR target/83712
19510         * lra-assigns.c (assign_by_spills): Return a flag of reload
19511         assignment failure.  Do not process the reload assignment
19512         failures.  Do not spill other reload pseudos if they has the same
19513         reg class.
19514         (lra_assign): Add a return arg.  Set up from the result of
19515         assign_by_spills call.
19516         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19517         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
19518         usage_insns if it is not NULL.
19519         (spill_hard_reg_in_range): New function.
19520         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19521         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19522         function prototypes.
19523         (lra_assign): Change prototype.
19524         * lra.c (lra): Add code to deal with fails by splitting hard reg
19525         live ranges.
19527 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
19529         PR target/84807
19530         * config/i386/i386.opt: Replace Enforcment with Enforcement.
19532 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
19534         PR debug/84620
19535         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
19536         (dw_val_node): Add val_symbolic_view.
19537         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
19538         (symview_upper_bound): New.
19539         (new_line_info_table): Initialize symviews_since_reset.
19540         (dwarf2out_source_line): Count symviews_since_reset and set
19541         symview_upper_bound.
19542         (dw_val_equal_p): Handle symview.
19543         (add_AT_symview): New.
19544         (print_dw_val): Handle symview.
19545         (attr_checksum, attr_checksum_ordered): Likewise.
19546         (same_dw_val_p, size_of_die): Likewise.
19547         (value_format, output_die): Likewise.
19548         (add_high_low_attributes): Use add_AT_symview for entry_view.
19549         (dwarf2out_finish): Reset symview_upper_bound, clear
19550         zero_view_p.
19552 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
19554         PR target/83969
19555         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
19556         Add strict argument and use it.
19557         (rs6000_split_multireg_move): Update for new strict argument.
19558         (mem_operand_gpr): Disallow all non-offsettable addresses.
19559         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
19561 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
19563         PR target/84772
19564         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
19565         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
19566         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
19568         PR c++/84767
19569         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
19570         decl, use remap_type if we want to use the type.
19572 2018-03-09  Martin Sebor  <msebor@redhat.com>
19574         PR tree-optimization/84526
19575         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19576         Remove dead code.
19577         (builtin_access::generic_overlap): Be prepared to handle non-array
19578         base objects.
19580 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
19582         PR rtl-optimization/84682
19583         * lra-constraints.c (process_address_1): Check is_address flag
19584         for address constraints.
19585         (process_alt_operands): Likewise.
19586         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
19587         preprocess_constraints.
19588         * recog.h (preprocess_constraints): Add oploc parameter.
19589         Adjust callers.
19590         * recog.c (preprocess_constraints): Test address_operand for
19591         CT_ADDRESS constraints.
19593 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
19595         PR target/83712
19596         * lra-assigns.c (assign_by_spills): Return a flag of reload
19597         assignment failure.  Do not process the reload assignment
19598         failures.  Do not spill other reload pseudos if they has the same
19599         reg class.
19600         (lra_assign): Add a return arg.  Set up from the result of
19601         assign_by_spills call.
19602         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19603         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
19604         usage_insns if it is not NULL.
19605         (spill_hard_reg_in_range): New function.
19606         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19607         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19608         function prototypes.
19609         (lra_assign): Change prototype.
19610         * lra.c (lra): Add code to deal with fails by splitting hard reg
19611         live ranges.
19613 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19615         PR target/83193
19616         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
19617         Accept complain bool parameter.  Only emit errors if it is true.
19618         (arm_parse_cpu_option_name): Likewise.
19619         (arm_target_thumb_only): Adjust callers of the above.
19620         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
19621         prototype to take a default true bool parameter.
19622         (arm_parse_arch_option_name): Likewise.
19624 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
19625             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
19627         PR jit/64089
19628         PR jit/84288
19629         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
19630         * configure: Regenerate.
19631         * configure.ac ("linker --version-script option"): New.
19632         ("linker soname option"): New.
19634 2018-03-09  Richard Biener  <rguenther@suse.de>
19636         PR tree-optimization/84775
19637         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
19638         immediate uses of predicate stmts and mark them modified.
19640         Revert
19641         PR tree-optimization/84178
19642         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19643         to caller.
19644         (version_loop_for_if_conversion): Delay update_ssa call.
19645         (tree_if_conversion): Delay update_ssa until after predicate
19646         insertion.
19648 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
19650         PR target/84763
19651         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
19652         when the function accesses prior frames.
19654 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
19656         PR debug/84456
19657         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
19658         gen_llsym, otherwise call maybe_gen_llsym.
19660         PR inline-asm/84742
19661         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
19662         has ',' character inside of it.
19664 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19666         PR target/84748
19667         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
19668         as clobbering CC_REGNUM.
19670 2018-03-08  Richard Biener  <rguenther@suse.de>
19672         PR middle-end/84552
19673         * tree-scalar-evolution.c: Include tree-into-ssa.h.
19674         (follow_copies_to_constant): Do not follow SSA names registered
19675         for update.
19677 2018-03-08  Richard Biener  <rguenther@suse.de>
19679         PR tree-optimization/84178
19680         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19681         to caller.
19682         (version_loop_for_if_conversion): Delay update_ssa call.
19683         (tree_if_conversion): Delay update_ssa until after predicate
19684         insertion.
19686 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
19688         PR tree-optimization/84178
19689         * tree-if-conv.c (release_bb_predicate): Remove the
19690         the assertion that the stmts have NULL use_ops.
19691         Discard the statements, asserting that they haven't
19692         yet been added to a BB.
19694 2018-03-08  Richard Biener  <rguenther@suse.de>
19696         PR tree-optimization/84746
19697         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
19698         (phi_translate): Pass in destination ANTIC_OUT set.
19699         (phi_translate_1): Likewise.  For a simplified result lookup
19700         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
19701         (phi_translate_set): Adjust.
19702         (do_pre_regular_insertion): Likewise.
19703         (do_pre_partial_partial_insertion): Likewise.
19705 2018-03-08  Martin Liska  <mliska@suse.cz>
19707         PR gcov-profile/84735
19708         * doc/gcov.texi: Document usage of profile files.
19709         * gcov-io.h: Document changes in the format.
19711 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
19713         PR debug/84404
19714         PR debug/84408
19715         * dwarf2out.c (struct dw_line_info_table): Update comments for
19716         view == -1.
19717         (FORCE_RESET_NEXT_VIEW): New.
19718         (FORCE_RESETTING_VIEW_P): New.
19719         (RESETTING_VIEW_P): Check for -1 too.
19720         (ZERO_VIEW_P): Likewise.
19721         (new_line_info_table): Force-reset next view.
19722         (dwarf2out_begin_function): Likewise.
19723         (dwarf2out_source_line): Simplify zero_view_p initialization.
19724         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
19725         view directly.  Omit view when omitting .loc at line 0.
19727 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
19729         PR tree-optimization/84740
19730         * tree-switch-conversion.c (process_switch): Call build_constructors
19731         only if info.phi_count is non-zero.
19733         PR tree-optimization/84739
19734         * tree-tailcall.c (find_tail_calls): Check call arguments against
19735         DECL_ARGUMENTS (current_function_decl) rather than
19736         DECL_ARGUMENTS (func) when checking for tail recursion.
19738 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
19740         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
19741         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
19742         Volker Reichelt's entry and add entries for people that perform
19743         GCC fuzzy testing and report numerous bugs.
19745 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
19747         PR target/82411
19748         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
19749         readonly data in sdata, if that is disabled.
19750         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
19751         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
19752         -mreadonly-in-sdata option.
19754 2018-03-07  Martin Sebor  <msebor@redhat.com>
19756         PR tree-optimization/84468
19757         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
19758         basic block when looking for nul assignment.
19760 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
19762         PR target/84277
19763         * except.h (output_function_exception_table): Adjust prototype.
19764         * except.c (output_function_exception_table): Remove FNNAME parameter
19765         and add SECTION parameter.  Ouput one part of the table at a time.
19766         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
19767         the first part of the exception table and emit unwind directives.
19768         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
19769         (i386_pe_seh_cold_init): Likewise.
19770         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
19771         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
19772         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
19773         (ix86_output_call_insn): Emit a nop in one more case for SEH.
19774         * config/i386/winnt.c: Include except.h.
19775         (struct seh_frame_state): Add reg_offset, after_prologue and
19776         in_cold_section fields.
19777         (i386_pe_seh_end_prologue): Set seh->after_prologue.
19778         (i386_pe_seh_cold_init): New function.
19779         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
19780         to seh->in_cold_section.
19781         (seh_emit_push): Record the offset of the push.
19782         (seh_emit_save): Record the offet of the save.
19783         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
19784         Test seh->after_prologue to disregard the epilogue.
19785         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
19786         (i386_pe_end_cold_function): New function.
19788 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
19790         PR fortran/84565
19791         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
19792         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
19794         PR c++/84704
19795         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
19796         on tmp_var.
19797         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
19798         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
19800         PR middle-end/84723
19801         * multiple_target.c: Include tree-inline.h and intl.h.
19802         (expand_target_clones): Diagnose and fail if node->definition and
19803         !tree_versionable_function_p (node->decl).
19805 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
19807         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
19808         sprint_ul.
19809         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
19810         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19811         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
19813 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
19815         PR target/84710
19816         * combine.c (try_combine): Use reg_or_subregno instead of handling
19817         just paradoxical SUBREGs and REGs.
19819 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
19821         * config/arc/arc.c (arc_finalize_pic): Remove function.
19822         (arc_must_save_register): We use single base PIC register, remove
19823         checks to save/restore the PIC register.
19824         (arc_expand_prologue): Likewise.
19825         * config/arc/arc-protos.h (arc_set_default_type_attributes):
19826         Remove.
19827         (arc_verify_short): Likewise.
19828         (arc_attr_type): Likewise.
19829         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
19830         (walk_stores): Likewise.
19831         (arc_address_cost): Make it static.
19832         (arc_verify_short): Likewise.
19833         (branch_dest): Likewise.
19834         (arc_attr_type): Likewise.
19835         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
19836         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
19837         (arc_final_prescan_insn): Remove inserting the nops due to
19838         hardware hazards.  It is done in reorg step.
19839         (insn_length_variant_t): Remove.
19840         (insn_length_parameters_t): Likewise.
19841         (arc_insn_length_parameters): Likewise.
19842         (arc_get_insn_variants): Likewise.
19843         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
19845 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
19847         PR inline-asm/84683
19848         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
19849         assertion failure.
19851         PR tree-optimization/84687
19852         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
19853         on new_node->decl.
19854         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
19856 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19858         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
19859         Rename to ppc_speculation_barrier.
19860         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
19861         __builtin_ppc_speculation_barrier.
19863 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
19865         PR target/84700
19866         * combine.c (combine_simplify_rtx): Don't try to simplify if
19867         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
19868         are equal to x.
19870 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
19872         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
19873         to 32 bytes when compiling for POWER9.
19875 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
19877         PR target/84564
19878         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
19879         regparm >= 3 with no arg reg available also for calls with
19880         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
19882         PR target/84524
19883         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
19884         orig,vex.
19885         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
19887 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
19889         PR target/84264
19890         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
19892 2018-03-05  Richard Biener  <rguenther@suse.de>
19894         PR tree-optimization/84486
19895         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
19896         When inserting a __builtin_assume_aligned call set the LHS
19897         SSA name alignment info accordingly.
19899 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
19901         PR tree-optimization/84114
19902         * config/aarch64/aarch64.c (aarch64_reassociation_width)
19903         Avoid reassociation of FLOAT_MODE addition.
19905 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
19907         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
19908         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
19909         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
19910         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
19911         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
19912         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
19913         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
19914         and -mwbnoinvd.
19915         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
19916         __builtin_ia32_wbinvd): New builtins.
19917         (SPECIAL_ARGS2): New.
19918         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
19919         (SPECIAL_ARGS2): New.
19920         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
19921         (ix86_valid_target_attribute_inner_p): Ditto.
19922         (ix86_init_mmx_sse_builtins): Add special_args2.
19923         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
19924         TARGET_WBNOINVD_P): New.
19925         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
19926         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
19927         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
19928         * config/i386/immintrin.h (_wbinvd): New intrinsic.
19929         * config/i386/pconfigintrin.h: New file.
19930         * config/i386/wbnoinvdintrin.h: Ditto.
19931         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
19932         wbnoinvdintrin.h.
19933         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
19935 2018-03-05  Richard Biener  <rguenther@suse.de>
19937         PR tree-optimization/84670
19938         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19939         member.
19940         (BB_VISITED_WITH_VISITED_SUCCS): New define.
19941         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19942         (compute_antic_aux): Only assert the number of values in ANTIC_IN
19943         doesn't grow if all successors (recursively) were visited at least
19944         once.
19946 2018-03-05  Richard Biener  <rguenther@suse.de>
19948         PR tree-optimization/84650
19949         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
19950         if executed in the loop pipeline.
19952 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
19954         * doc/configfiles.texi (Configuration Files): Move info about
19955         conditionalizing $target-protos.h to...
19956         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
19957         differs from $target-protos.h.
19959 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
19960             Chung-Ju Wu  <jasonwucj@gmail.com>
19962         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
19963         * config/nds32/nds32-multiple.md (setmemsi): Define.
19964         * config/nds32/nds32-memory-manipulation.c
19965         (nds32_gen_dup_4_byte_to_word_value): New.
19966         (emit_setmem_word_loop): New.
19967         (emit_setmem_byte_loop): New.
19968         (nds32_expand_setmem_loop): New.
19969         (nds32_expand_setmem_loop_v3m): New.
19970         (nds32_expand_setmem_unroll): New.
19971         (nds32_expand_setmem): New.
19973 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
19974             Chung-Ju Wu  <jasonwucj@gmail.com>
19976         * config/nds32/nds32-memory-manipulation.c
19977         (nds32_emit_load_store): New.
19978         (nds32_emit_post_inc_load_store): New.
19979         (nds32_emit_mem_move): New.
19980         (nds32_emit_mem_move_block): New.
19981         (nds32_expand_movmemsi_loop_unknown_size): New.
19982         (nds32_expand_movmemsi_loop_known_size): New.
19983         (nds32_expand_movmemsi_loop): New.
19984         (nds32_expand_movmemsi_unroll): New.
19985         (nds32_expand_movmemqi): Rename ...
19986         (nds32_expand_movmemsi): ... to this.
19987         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
19988         (movmemsi): ... to this.
19989         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
19990         (nds32_expand_movmemsi): ... to this.
19992 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
19993             Monk Chiang  <sh.chiang04@gmail.com>
19994             Chung-Ju Wu  <jasonwucj@gmail.com>
19996         * config/nds32/nds32-protos.h
19997         (nds32_expand_load_multiple): New arguments.
19998         (nds32_expand_store_multiple): Ditto.
19999         (nds32_valid_multiple_load_store): Rename ...
20000         (nds32_valid_multiple_load_store_p): ... to this.
20001         * config/nds32/nds32-memory-manipulation.c
20002         (nds32_expand_load_multiple): Refine implementation.
20003         (nds32_expand_store_multiple): Ditto.
20004         * config/nds32/nds32-multiple.md
20005         (load_multiple): Update nds32_expand_load_multiple interface.
20006         (store_multiple): Update nds32_expand_store_multiple interface.
20007         * config/nds32/nds32-predicates.c
20008         (nds32_valid_multiple_load_store): Rename ...
20009         (nds32_valid_multiple_load_store_p): ... to this and refine
20010         implementation.
20011         * config/nds32/predicates.md
20012         (nds32_load_multiple_and_update_address_operation): New predicate.
20013         (nds32_store_multiple_and_update_address_operation): New predicate.
20015 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
20016             Chung-Ju Wu  <jasonwucj@gmail.com>
20018         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
20019         (combo): New attribute.
20020         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
20022 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
20024         * config/nds32/nds32.opt: Change -mcmodel= default value.
20026 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
20027             Monk Chiang  <sh.chiang04@gmail.com>
20028             Chung-Ju Wu  <jasonwucj@gmail.com>
20030         * config/nds32/constants.md (unspec_element): New enum.
20031         * config/nds32/constraints.md (Umw): New constraint.
20032         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
20033         * config/nds32/nds32-intrinsic.md: Likewise.
20034         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
20035         (nds32_valid_smw_lwm_base_p): New.
20036         (nds32_output_smw_single_word): New.
20037         (nds32_output_lmw_single_word): New.
20038         (nds32_expand_unaligned_load): New.
20039         (nds32_expand_unaligned_store): New.
20040         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
20041         (nds32_output_smw_single_word): Declare.
20042         (nds32_output_lmw_single_word): Declare.
20043         (nds32_expand_unaligned_load): Declare.
20044         (nds32_expand_unaligned_store): Declare.
20045         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
20046         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
20047         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
20048         NDS32_BUILTIN_UASTORE_DW.
20049         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
20050         predicate.
20052 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
20053             Kito Cheng  <kito.cheng@gmail.com>
20054             Chung-Ju Wu  <jasonwucj@gmail.com>
20056         * config/nds32/nds32-intrinsic.c
20057         (nds32_expand_builtin_null_ftype_reg): Delete.
20058         (nds32_expand_builtin_reg_ftype_imm): Ditto.
20059         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
20060         (nds32_read_argument): New.
20061         (nds32_legitimize_target): Ditto.
20062         (nds32_legitimize_argument): Ditto.
20063         (nds32_check_constant_argument): Ditto.
20064         (nds32_expand_unop_builtin): Ditto.
20065         (nds32_expand_unopimm_builtin): Ditto.
20066         (nds32_expand_binop_builtin): Ditto.
20067         (nds32_builtin_decl_impl): Ditto.
20068         (builtin_description): Ditto.
20069         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
20070         (nds32_init_builtins_impl): Ditto.
20071         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
20072         (nds32_builtin_decl): New.
20073         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
20074         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
20076 2018-03-02  Jeff Law  <law@redhat.com>
20078         * reorg.c (stop_search_p): Handle DEBUG_INSN.
20079         (redundant_insn, fill_simple_delay_slots): Likewise.
20080         (fill_slots_from_thread): Likewise.
20081         * resource.c (mark_referenced_resources): Likewise.
20082         (mark_set_resources, find_dead_or_set_registers): Likewise.
20084 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20086         * substring-locations.h (format_warning_va): Formatting fix for
20087         ATTRIBUTE_GCC_DIAG.
20088         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
20089         argument.
20090         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
20091         * substring-locations.c: Include intl.h.
20092         (format_warning_va): Turned into small wrapper around
20093         format_warning_n_va, renamed to ...
20094         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
20095         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
20096         use ngettext.
20097         (format_warning_at_substring_n): New function.
20098         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
20099         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
20100         format_warning_at_substring with just a shorter name instead of
20101         const function pointer.
20102         (fmtwarn_n): New function.
20103         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
20104         appropriate, get rid of all the fmtstr temporaries, move conditionals
20105         with G_() wrapped string literals directly into fmtwarn arguments,
20106         cast dir.len to (int), formatting fixes.
20108 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
20110         * doc/invoke.texi: Remove "Cilk Plus" references.
20112 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20113             Richard Biener  <rguenther@suse.de>
20115         PR ipa/84628
20116         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
20117         for error or warning attributes if CALL_FROM_THUNK_P is set.
20118         Formatting fixes.
20120 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20122         PR target/56540
20123         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
20124         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
20126         PR target/56540
20127         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
20128         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
20130         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
20131         instead of -1U in last predictors element's probability member.
20133 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
20135         PR ipa/83983
20136         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20137         arguments if they are comparable.
20139 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
20141         PR tree-optimization/84634
20142         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
20143         masks and masked_loop_p with a single loop_masks, making sure it's
20144         null for bb vectorization.
20146 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
20148         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
20149         (vect_analyze_data_ref_access): Use loop->safe_len rather than
20150         loop->force_vectorize to check whether there is no alias.
20152 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20154         PR target/84614
20155         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
20156         prototypes.
20157         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
20158         comments.
20159         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
20160         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
20161         instead of a loop around prev_real_insn.
20162         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
20163         prev_real_insn.
20165         PR inline-asm/84625
20166         * config/i386/i386.c (ix86_print_operand): Use conditional
20167         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
20168         zero vector.
20170 2018-03-02  Richard Biener  <rguenther@suse.de>
20172         PR tree-optimization/84427
20173         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
20174         (bitmap_set_subtract_values): Rewrite to handle multiple
20175         exprs per value.
20176         (clean): Likewise.
20177         (prune_clobbered_mems): Likewise.
20178         (phi_translate): Take edge instead of pred/phiblock.
20179         (phi_translate_1): Likewise.
20180         (phi_translate_set): Likewise.  Insert all translated
20181         exprs for a value into the set, keeping possibly multiple
20182         expressions per value.
20183         (compute_antic_aux): Adjust for phi_translate changes.
20184         When intersecting union the expressions and prune those
20185         not in the final value set, keeping possibly multiple
20186         expressions per value.  Do not use value-insertion
20187         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
20188         all expressions.  Add verification that the value-sets
20189         only shrink during iteration.
20190         (compute_partial_antic_aux): Adjust for the phi_translate changes.
20191         (do_pre_regular_insertion): Likewise.
20192         (do_pre_partial_partial_insertion): Likewise.
20194 2018-03-02  Richard Biener  <rguenther@suse.de>
20196         PR target/82005
20197         * config/darwin.c (saved_debug_info_level): New static global.
20198         (darwin_asm_lto_start): Disable debug info generation for LTO out.
20199         (darwin_asm_lto_end): Restore debug info generation settings.
20201 2018-03-01  Martin Liska  <mliska@suse.cz>
20203         PR sanitizer/82484
20204         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
20205         volatile arguments.
20207 2018-03-01  Richard Biener  <rguenther@suse.de>
20209         PR debug/84645
20210         * dwarf2out.c (gen_variable_die): Properly handle late VLA
20211         type annotation with LTO when debug was disabled at compile-time.
20213 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
20215         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
20216         XINT with INTVAL.
20217         (mips_final_postscan_insn): Likewise.
20219 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
20221         PR rtl-optimization/84528
20222         * alias.c (init_alias_target): Add commentary.
20223         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
20224         a unique base value if the frame pointer is not eliminated
20225         to the stack pointer.
20227 2018-03-01  Tom de Vries  <tom@codesourcery.com>
20229         PR rtl-optimization/83327
20230         * lra-int.h (hard_regs_spilled_into): Declare.
20231         * lra.c (hard_regs_spilled_into): Define.
20232         (init_reg_info): Init hard_regs_spilled_into.
20233         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
20234         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
20235         (process_bb_lives): Handle hard_regs_spilled_into.
20236         (lra_create_live_ranges_1): Before doing liveness propagation, clear
20237         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
20239 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
20241         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
20242         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
20243         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
20244         * config/rs6000/aix72.h: New file.
20246 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
20248         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
20249         instead of warning_at with conditional singular and plural messages
20250         where possible.
20252         PR target/52991
20253         * stor-layout.c (update_alignment_for_field): For
20254         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
20255         && !DECL_PACKED (field), do the alignment update, just use
20256         only desired_align instead of MAX (type_align, desired_align)
20257         as the alignment.
20258         (place_field): Don't do known_align < desired_align handling
20259         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
20260         is non-NULL, instead do it after rli->prev_field handling and
20261         only if not within a bitfield word.  For DECL_PACKED (field)
20262         use type_align of BITS_PER_UNIT.
20264 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
20266         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
20267         superfluous parentheses and trailing spaces.
20269 2018-02-28  Richard Biener  <rguenther@suse.de>
20271         PR tree-optimization/84584
20272         * graphite-scop-detection.c (scop_detection::add_scop): Discard
20273         SCoPs with fake exit edge.
20275 2018-02-28  Martin Liska  <mliska@suse.cz>
20277         PR testsuite/84597
20278         * timevar.c (timer::print): Fix format to properly print 100%
20279         values.
20281 2018-02-28  Richard Biener  <rguenther@suse.de>
20283         PR middle-end/84607
20284         * genmatch.c (capture_info::walk_match): Do not mark
20285         captured expressions without operands as expr_p given
20286         they act more like predicates and should be subject to
20287         "lost tail" side-effect preserving.
20289 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
20291         PR rtl-optimization/81611
20292         * auto-inc-dec.c (attempt_change): Move dead note from
20293         mem_insn if it's the next use of regno
20294         (find_address): Take address use of reg holding
20295         non-incremented value.  Add parm to limit search to the named
20296         reg only.
20297         (merge_in_block): Attempt to use a mem insn that is the next
20298         use of the original regno.
20300 2018-02-27  Martin Sebor  <msebor@redhat.com>
20302         PR c++/83871
20303         * doc/invoke.texi (-Wmissing-attributes): New option.
20304         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
20306 2018-02-27  Martin Sebor  <msebor@redhat.com>
20308         PR translation/84207
20309         * diagnostic-core.h (warning_n, error_n, inform_n): Change
20310         n argument to unsigned HOST_WIDE_INT.
20311         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
20312         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
20313         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
20314         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
20316 2018-02-27  Richard Biener  <rguenther@suse.de>
20318         PR tree-optimization/84512
20319         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
20320         Do not use the estimate returned from record_stmt_cost for
20321         the scalar iteration cost but sum properly using add_stmt_cost.
20323 2018-02-27  Richard Biener  <rguenther@suse.de>
20325         PR tree-optimization/84466
20326         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20327         Adjust last change to less strictly validate use operands.
20329 2018-02-27  Martin Liska  <mliska@suse.cz>
20331         PR gcov-profile/84548
20332         * gcov.c (process_file): Allow partial overlap and consider it
20333         also as group functions.
20334         (output_lines): Properly calculate range of lines for a group.
20336 2018-02-27  Martin Liska  <mliska@suse.cz>
20338         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
20339         'ggc' suffixes.  Change first column width.
20340         (timer::print): Fix formatting of the column.
20342 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
20344         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
20345         preserve inline entry blocks for the sake of debug inline
20346         entry point markers alone.
20347         (remove_unused_locals): Suggest in comments a better place to
20348         force the preservation of inline entry blocks that are
20349         otherwise unused, but do not preserve them.
20351 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
20353         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
20355 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
20357         PR target/84039
20358         * config/i386/constraints.md (Bs): Replace
20359         ix86_indirect_branch_register with
20360         TARGET_INDIRECT_BRANCH_REGISTER.
20361         (Bw): Likewise.
20362         * config/i386/i386.md (indirect_jump): Likewise.
20363         (tablejump): Likewise.
20364         (*sibcall_memory): Likewise.
20365         (*sibcall_value_memory): Likewise.
20366         Peepholes of indirect call and jump via memory: Likewise.
20367         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
20368         (*sibcall_value_GOT_32): Likewise.
20369         * config/i386/predicates.md (indirect_branch_operand): Likewise.
20370         (GOT_memory_operand): Likewise.
20371         (call_insn_operand): Likewise.
20372         (sibcall_insn_operand): Likewise.
20373         (GOT32_symbol_operand): Likewise.
20374         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
20376 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
20378         PR rtl-optimization/83496
20379         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
20380         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
20381         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
20382         redundant insn, if any.
20383         (relax_delay_slots): Likewise.
20384         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
20386 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
20388         PR tree-optimization/83965
20389         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
20390         that grouped statements are part of a reduction chain.  Return
20391         true if the statement is not marked as a reduction itself but
20392         is part of a group.
20393         (vect_recog_dot_prod_pattern): Don't check whether the statement
20394         is part of a group here.
20395         (vect_recog_sad_pattern): Likewise.
20396         (vect_recog_widen_sum_pattern): Likewise.
20398 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
20400         PR debug/84545
20401         * final.c (rest_of_clean_state): Also look for calls inside sequences.
20403 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
20405         PR target/84530
20406         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
20407         the bool argument.
20408         (ix86_output_indirect_function_return): New prototype.
20409         (ix86_split_simple_return_pop_internal): Likewise.
20410         * config/i386/i386.c (indirect_return_via_cx): New.
20411         (indirect_return_via_cx_bnd): Likewise.
20412         (indirect_thunk_name): Handle return va CX_REG.
20413         (output_indirect_thunk_function): Create alias for
20414         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
20415         (ix86_output_indirect_jmp): Remove the bool argument.
20416         (ix86_output_indirect_function_return): New function.
20417         (ix86_split_simple_return_pop_internal): Likewise.
20418         * config/i386/i386.md (*indirect_jump): Don't pass false
20419         to ix86_output_indirect_jmp.
20420         (*tablejump_1): Likewise.
20421         (simple_return_pop_internal): Change it to define_insn_and_split.
20422         Call ix86_split_simple_return_pop_internal to split it for
20423         -mfunction-return=.
20424         (simple_return_indirect_internal): Call
20425         ix86_output_indirect_function_return instead of
20426         ix86_output_indirect_jmp.
20428 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
20430         PR bootstrap/84405
20431         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
20432         memset and value initialization afterwards.
20434 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
20436         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
20438 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
20440         PR target/84521
20441         * common/config/aarch64/aarch64-common.c
20442         (aarch_option_optimization_table[]): Switch
20443         off fomit-frame-pointer
20445 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
20446             Chung-Ju Wu  <jasonwucj@gmail.com>
20448         * config/nds32/nds32-multiple.md (load_multiple): Disallow
20449         volatile memory.
20450         (store_multiple): Ditto.
20452 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
20454         * config.gcc: Add --with-cpu support for nds32 target.
20455         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
20456         * config/nds32/nds32.opt: Add -mcpu= option.
20458 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
20460         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
20461         isel=yes): Warn for these deprecated options.
20463 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
20465         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
20466         ISA_2_5_MASKS_EMBEDDED.
20468 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
20470         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
20471         p->max as pointers rather than using iterative_hash_expr.
20473 2018-02-23  Carl Love  <cel@us.ibm.com>
20475         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
20476         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
20477         BU_P8V_OVERLOAD_2.
20478         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
20479         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
20480         P8V_BUILTIN_VEC_VUNSIGNED2.
20482 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
20484         PR target/81572
20485         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
20486         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
20487         LRA_UNKNOWN_ALT.
20488         * lra-constraints.c (curr_insn_transform): Set up
20489         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
20490         LRA_UNKNOWN_ALT.
20491         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
20492         * lra-eliminations.c (spill_pseudos): Ditto.
20493         (process_insn_for_elimination): Ditto.
20494         * lra-lives.c (reg_early_clobber_p): Use the new macros.
20495         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
20496         LRA_NON_CLOBBERED_ALT.
20498 2018-02-22  Martin Sebor  <msebor@redhat.com>
20500         PR tree-optimization/84480
20501         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
20502         to maybe_diag_stxncpy_trunc.  Call it.
20503         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
20504         from gimple_fold_builtin_strcpy.  Print inlining stack.
20505         (handle_builtin_stxncpy): Print inlining stack.
20506         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
20508 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
20510         PR target/84176
20511         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
20512         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
20513         and -fcheck-pointer-bounds are used together.
20514         (indirect_thunk_prefix): New enum.
20515         (indirect_thunk_need_prefix): New function.
20516         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
20517         "_nt" instead of "_bnd" for NOTRACK prefix.
20518         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
20519         (output_indirect_thunk_function): Likewise.
20520         (): Likewise.
20521         (ix86_code_end): Update output_indirect_thunk_function calls.
20522         (ix86_output_indirect_branch_via_reg): Replace
20523         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
20524         (ix86_output_indirect_branch_via_push): Likewise.
20525         (ix86_output_function_return): Likewise.
20526         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
20527         incompatible with -fcf-protection=branch and
20528         -fcheck-pointer-bounds.
20530 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
20532         PR target/83335
20533         * config/aarch64/aarch64.c (aarch64_print_address_internal):
20534         Change gcc_assert call to output_operand_lossage.
20536 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
20538         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
20540 2018-02-22  DJ Delorie  <dj@redhat.com>
20541             Sebastian Perta  <sebastian.perta@renesas.com>
20542             Oleg Endo  <olegendo@gcc.gnu.org>
20544         * config/rx/rx.c (rx_rtx_costs): New function.
20545         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
20547 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
20549         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
20551 2018-02-22  Martin Liska  <mliska@suse.cz>
20553         PR driver/83193
20554         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
20555         Add "native" as a possible value.
20557 2018-02-22  Martin Liska  <mliska@suse.cz>
20559         PR driver/83193
20560         * config/i386/i386.c (ix86_option_override_internal):
20561         Add "native" as a possible value for -march and -mtune.
20563 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
20565         PR target/84502
20566         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
20567         to all type variants.
20569         PR tree-optimization/84503
20570         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
20571         width as info->bitpos + info->bitsize - start.
20572         (merged_store_group::merge_overlapping): Simplify width computation.
20573         (check_no_overlap): New function.
20574         (imm_store_chain_info::try_coalesce_bswap): Compute expected
20575         start + width and last_order of the group, fail if check_no_overlap
20576         fails.
20577         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
20578         to group if check_no_overlap fails.
20580 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
20582         * config/rs6000/altivec.md: Delete contraint arguments to
20583         define_expand, define_split, and define_peephole2, and in
20584         define_insn_and_split if always unused.
20585         * config/rs6000/darwin.md: Ditto.
20586         * config/rs6000/dfp.md: Ditto.
20587         * config/rs6000/rs6000.md: Ditto.
20588         * config/rs6000/sync.md: Ditto.
20589         * config/rs6000/vector.md: Ditto.
20590         * config/rs6000/vsx.md: Ditto.
20592 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
20594         * config/rs6000/altivec.md: Write output control strings as braced
20595         blocks instead of double-quoted strings.
20596         * config/rs6000/darwin.md: Ditto.
20597         * config/rs6000/rs6000.md: Ditto.
20598         * config/rs6000/vector.md: Ditto.
20599         * config/rs6000/vsx.md: Ditto.
20601 2018-02-21  Jason Merrill  <jason@redhat.com>
20603         PR c++/84314 - ICE with templates and fastcall attribute.
20604         * attribs.c (build_type_attribute_qual_variant): Remove assert.
20606 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
20608         * ipa-cp.c (determine_versionability): Fix comment typos.
20610 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
20612         PR c/84229
20613         * ipa-cp.c (determine_versionability): Do not version functions caling
20614         va_arg_pack.
20616 2018-02-21  Martin Liska  <mliska@suse.cz>
20618         PR driver/83193
20619         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
20620         Add "native" as a possible value.
20621         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
20622         the macro when native cpu detection is available.
20624 2018-02-21  Martin Liska  <mliska@suse.cz>
20626         PR driver/83193
20627         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
20628         Add "native" as a possible value.
20629         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
20630         when native cpu detection is available.
20632 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
20633             Martin Sebor  <msebor@redhat.com>
20635         PR tree-optimization/84478
20636         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
20637         false.
20638         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
20639         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
20640         support which is conservatively correct, for 2 only stay conservative
20641         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
20642         argument to the 2 argument get_range_strlen, adjust 6 arg
20643         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
20644         false.
20645         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
20646         (gimple_fold_builtin_strlen): Pass true as last argument to
20647         get_range_strlen.
20649 2018-02-20  Martin Sebor  <msebor@redhat.com>
20651         PR middle-end/84095
20652         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
20653         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
20654         (builtin_memref::builtin_memref): Factor out parts into
20655         set_base_and_offset and call it.
20657 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
20659         PR middle-end/84406
20660         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
20661         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
20662         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
20663         search at the associated MODE_INT.
20665 2018-02-20  Jeff Law  <law@redhat.com>
20667         PR middle-end/82123
20668         PR tree-optimization/81592
20669         PR middle-end/79257
20670         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
20671         for range data rather than using global data.
20672         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
20673         range data rather than using global data.
20674         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
20675         pass it to children as needed.
20676         (struct directive::fmtresult): Similarly.
20677         (struct directive::set_width): Similarly.
20678         (struct directive::set_precision): Similarly.
20679         (format_integer, format_directive, parse_directive): Similarly.
20680         (format_none): Accept unnamed vr_values parameter.
20681         (format_percent, format_floating, format_character): Similarly.
20682         (format_string, format_plain): Similarly.
20683         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
20684         the EVRP range analyzer for range data rather than using global data.
20685         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
20686         gimple-ssa-evrp-analyze.h
20687         (class sprintf_dom_walker): Add after_dom_children member function.
20688         Add evrp_range_analyzer member.
20689         (sprintf_dom_walker::before_dom_children): Call into the EVRP
20690         range analyzer as needed.
20691         (sprintf_dom_walker::after_dom_children): New member function.
20692         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
20693         if not optimizing.
20694         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
20695         (evrp_range_analyzer::pop_to_marker): Likewise.
20697 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
20699         PR tree-optimization/84419
20700         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
20701         with the required type if its current type is compatible but
20702         different.
20704 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
20706         PR middle-end/82004
20707         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
20708         after vectorization.
20710 2018-02-20  Martin Liska  <mliska@suse.cz>
20712         PR driver/83193
20713         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
20714         possible values if we don't have a hint.
20716 2018-02-20  Martin Liska  <mliska@suse.cz>
20718         PR c/84310
20719         PR target/79747
20720         * final.c (shorten_branches): Build align_tab array with one
20721         more element.
20722         * opts.c (finish_options): Add alignment option limit check.
20723         (MAX_CODE_ALIGN): Likewise.
20724         (MAX_CODE_ALIGN_VALUE): Likewise.
20725         * doc/invoke.texi: Document maximum allowed option value for
20726         all -falign-* options.
20728 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
20730         PR target/84146
20731         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
20732         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
20733         * var-tracking.c (emit_note_insn_var_location): Remove all references
20734         to NOTE_INSN_CALL_ARG_LOCATION.
20735         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
20736         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
20737         Use copy_rtx_if_shared.
20738         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
20739         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
20740         (dwarf2out_var_location): Remove handling of
20741         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
20742         on call_insn.
20743         * final.c (final_scan_insn): Remove all references to
20744         NOTE_INSN_CALL_ARG_LOCATION.
20745         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
20746         before dumping final insns.
20747         * except.c (emit_note_eh_region_end): Remove all references to
20748         NOTE_INSN_CALL_ARG_LOCATION.
20749         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
20750         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
20751         * config/arc/arc.c (hwloop_optimize): Likewise.
20752         * config/arm/arm.c (create_fix_barrier): Likewise.
20753         * config/s390/s390.c (s390_chunkify_start): Likewise.
20754         * config/sh/sh.c (find_barrier): Likewise.
20755         * config/i386/i386.c (rest_of_insert_endbranch,
20756         ix86_seh_fixup_eh_fallthru): Likewise.
20757         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
20758         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
20759         * config/frv/frv.c (frv_function_prologue): Likewise.
20760         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
20761         reg note.
20762         (note_outside_basic_block_p): Remove all references to
20763         NOTE_INSN_CALL_ARG_LOCATION.
20764         * gengtype.c (adjust_field_rtx_def): Likewise.
20765         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
20766         Likewise.
20767         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
20768         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
20770         PR c++/84444
20771         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
20772         is ADDR_EXPR.
20774         PR tree-optimization/84452
20775         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
20776         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
20777         is NULL.
20779 2018-02-19  Martin Liska  <mliska@suse.cz>
20781         PR sanitizer/82183
20782         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
20784 2018-02-19  Martin Liska  <mliska@suse.cz>
20785             Richard Sandiford  <richard.sandiford@linaro.org>
20787         PR tree-optimization/82491
20788         * gimple-fold.c (get_base_constructor): Make earlier bail out
20789         to prevent ubsan.
20791 2018-02-19  Carl Love  <cel@us.ibm.com>
20793         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
20794         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
20795         BU_P8V_OVERLOAD_1.
20796         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
20797         P8V_BUILTIN_VEC_NEG.
20799 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
20801         * config/rl78/rl78.md (movdf): New define expand.
20803 2018-02-19  Martin Liska  <mliska@suse.cz>
20805         PR other/80589
20806         * doc/invoke.texi: Fix typo.
20807         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
20809 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
20811         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
20812         handle rs6000_single_float and rs6000_double_float specially for
20813         e500 family CPUs.
20815 2018-02-16  Jeff Law  <law@redhat.com>
20817         * config/rx/rx.c (add_pop_cfi_notes): New function.;
20818         (pop_regs): Use it.
20820 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
20822         PR ipa/84425
20823         * ipa-inline.c (inline_small_functions): Fix a typo.
20825 2018-02-16  Nathan Sidwell  <nathan@acm.org>
20827         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
20829 2018-02-16  Carl Love  <cel@us.ibm.com>
20831         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
20832         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
20833         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
20834         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
20835         expansion to P8V_BUILTIN_VEC_FLOAT2.
20837 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
20839         PR rtl-optimization/70023
20840         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
20841         src_regno into account.
20843 2018-02-16  Carl Love  <cel@us.ibm.com>
20845         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
20846         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
20847         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
20848         * config/rs6000/rs6000.c: Remove case statements for
20849         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
20850         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
20851         and P9V_BUILTIN_VEC_VINSERT4B.
20852         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
20853         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
20854         * config/rs6000/vsx.md:
20855         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
20856         vec_insert4b.
20858 2018-02-16  Carl Love  <cel@us.ibm.com>
20860         * config/rs6000/altivec.h: Add builtin names vec_extract4b
20861         vec_insert4b.
20862         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
20863         definitions.
20864         * config/rs6000/rs6000-c.c: Add the definitions for
20865         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
20866         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
20867         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
20868         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
20869         definition for insert4b and define insn *insert3b_internal.
20870         * doc/extend.texi: Add documentation for vec_extract4b.
20872 2018-02-16  Nathan Sidwell  <nathan@acm.org>
20874         * doc/extend.texi (Backwards Compatibility): Mention friend
20875         injection.  Note for-scope is deprecated.
20876         * doc/invoke.texi (-ffriend-injection): Deprecate.
20878 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
20880         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
20881         that moved to I2, also allow destinations that are a paradoxical
20882         subreg (instead of a normal reg).
20884 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
20886         PR target/83831
20887         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
20888         to QImode.
20890 2018-02-16  Richard Biener  <rguenther@suse.de>
20892         PR tree-optimization/84037
20893         PR tree-optimization/84016
20894         PR target/82862
20895         * config/i386/i386.c (ix86_builtin_vectorization_cost):
20896         Adjust vec_construct for the fact we need additional higher latency
20897         128bit inserts for AVX256 and AVX512 vector builds.
20898         (ix86_add_stmt_cost): Scale vector construction cost for
20899         elementwise loads.
20901 2018-02-16  Richard Biener  <rguenther@suse.de>
20903         PR tree-optimization/84417
20904         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
20905         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
20906         (non_rewritable_lvalue_p): Likewise, use poly-ints.
20908 2018-02-16  Martin Liska  <mliska@suse.cz>
20910         PR sanitizer/84307
20911         * internal-fn.def (ASAN_CHECK): Set proper flags.
20912         (ASAN_MARK): Likewise.
20914 2018-02-16  Julia Koval  <julia.koval@intel.com>
20916         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
20917         from PTA_CANNONLAKE.
20919 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
20921         PR target/84272
20922         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
20923         Use ++iter rather than iter++ for std::list iterators.
20924         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
20925         defer deleting them until all nodes in the forest are processed.  Do
20926         free even leaf nodes.  Change to_process into auto_vec.
20928         PR bootstrap/84405
20929         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
20930         * vec.h (vec_default_construct): Use memset instead of placement new
20931         if BROKEN_VALUE_INITIALIZATION is defined.
20932         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
20933         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
20934         is defined.
20936         PR rtl-optimization/83723
20937         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
20938         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
20939         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
20940         recursive calls.
20941         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
20942         callers.
20943         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
20945 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
20947         PR rtl-optimization/81443
20948         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
20949         from inner REGs to paradoxical SUBREGs.
20951 2018-02-16  Richard Biener  <rguenther@suse.de>
20953         PR tree-optimization/84399
20954         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20955         For operands we can analyze at their definition make sure we can
20956         analyze them at each use as well.
20958 2018-02-16  Richard Biener  <rguenther@suse.de>
20960         PR tree-optimization/84190
20961         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
20962         volatile accesses if the decl isn't volatile.
20964 2018-02-15  Jason Merrill  <jason@redhat.com>
20966         PR c++/84314 - ICE with templates and fastcall attribute.
20967         * attribs.c (build_type_attribute_qual_variant): Don't clobber
20968         TYPE_CANONICAL on an existing type.
20970 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
20972         PR tree-optimization/84383
20973         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
20974         dstoff nor call operand_equal_p if dstbase is NULL.
20976         PR tree-optimization/84334
20977         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
20978         also a CONSTANT_CLASS_P, punt.
20980 2018-02-14  Jim Wilson  <jimw@sifive.com>
20982         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
20983         first SMALL_OPERAND check.  New local min_second_step.  Move assert
20984         to where locals are set.  Add TARGET_RVC support.
20985         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
20987 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
20989         * doc/invoke.texi: Correct -Wformat-overflow code sample.
20991 2018-02-14  Martin Sebor  <msebor@redhat.com>
20993         PR tree-optimization/83698
20994         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
20995         arrays constrain the offset range to their bounds.
20996         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
20997         (builtin_access::overlap): Avoid setting the size of overlap if it's
20998         already been set.
20999         (maybe_diag_overlap): Also consider arrays when deciding what values
21000         of offsets to include in diagnostics.
21002 2018-02-14  Martin Sebor  <msebor@redhat.com>
21004         PR c/84108
21005         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
21006         that correspond to the kind of a declaration.
21008 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
21010         PR target/83984
21011         * config/pa/pa.md: Load address of PIC label using the linkage table
21012         if the label is nonlocal.
21014 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21016         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
21017         warning message if user requests -maltivec=be.
21018         * doc/invoke.texi: Document deprecation of -maltivec=be.
21020 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
21022         PR target/84220
21023         * config/rs6000/rs6000-c.c: Update definitions for
21024         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
21025         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
21027 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
21029         PR target/84239
21030         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
21031         add _get_ssp intrinsics. Remove argument from
21032         __builtin_ia32_rdssp[d|q].
21033         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
21034         * config/i386/i386-builtin.def: Remove argument from
21035         __builtin_ia32_rdssp[d|q].
21036         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
21037         ix86_expand_special_args_builtin for _rdssp[d|q].
21038         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
21039         Clear register before usage.
21040         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
21041         Add documentation for new _get_ssp and _inc_ssp intrinsics.
21043 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
21045         PR tree-optimization/84357
21046         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
21047         operand 1 of an ARRAY_REF too.
21049 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
21051         PR target/83831
21052         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
21053         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21054         declarations.
21055         (set_of_reg): New struct.
21056         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
21057         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
21058         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21059         functions.
21060         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
21061         Split into bitclr, bitset, bitinvert patterns if appropriate.
21062         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
21063         use rx_fuse_in_memory_bitop.
21064         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
21065         to named insn, correct maximum insn length.
21067 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
21069         PR target/79242
21070         * machmode.def: Define a complex mode for PARTIAL_INT.
21071         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
21072         MODE_PARTIAL_INT.
21073         * doc/rtl.texi: Document CSPImode.
21074         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
21075         handling.
21076         (msp430_hard_regno_nregs_with_padding): Likewise.
21078 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
21080         PR target/84279
21081         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
21083 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
21085         PR rtl-optimization/84169
21086         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
21087         we generated a parallel as new i3 and we split that to new i2 and i3
21088         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
21089         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
21090         those to i2, not i1.  Partially rewrite this scan code.
21092 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
21094         PR c/82210
21095         * stor-layout.c (place_field): For variable length fields, adjust
21096         offset_align afterwards not just based on the field's alignment,
21097         but also on the size.
21099         PR middle-end/84309
21100         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
21101         of exps and logs in the use_exp2 case.
21103 2018-02-13  Jeff Law  <law@redhat.com>
21105         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
21106         entry for "vector".
21108         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
21109         ARGS as unused.
21111 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
21113         PR debug/84342
21114         PR debug/84319
21115         * common.opt (gas-loc-support, gas-locview-support): New.
21116         (ginline-points, ginternal-reset-location-views): New.
21117         * doc/invoke.texi: Document them.  Use @itemx where intended.
21118         (gvariable-location-views): Adjust.
21119         * target.def (reset_location_view): New.
21120         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
21121         (TARGET_RESET_LOCATION_VIEW): New.
21122         * doc/tm.texi: Rebuilt.
21123         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
21124         (dwarf2out_default_as_locview_support): New.
21125         (output_asm_line_debug_info): Use option variables.
21126         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
21127         (output_loc_list): Likewise.
21128         (add_high_low_attributes): Check option variables.
21129         Don't output entry view attribute in strict mode.
21130         (gen_inlined_subroutine_die): Check option variables.
21131         (dwarf2out_inline_entry): Likewise.
21132         (init_sections_and_labels): Likewise.
21133         (dwarf2out_early_finish): Likewise.
21134         (maybe_reset_location_view): New, from...
21135         (dwarf2out_var_location): ... here.  Call it.
21136         * debug.h (dwarf2out_default_as_loc_support): Declare.
21137         (dwarf2out_default_as_locview_support): Declare.
21138         * hooks.c (hook_int_rtx_insn_0): New.
21139         * hooks.h (hook_int_rtx_insn_0): Declare.
21140         * toplev.c (process_options): Take -gas-loc-support and
21141         -gas-locview-support from dwarf2out.  Enable
21142         -gvariable-location-views by default only with locview
21143         assembler support.  Enable -ginternal-reset-location-views by
21144         default only if the target defines the corresponding hook.
21145         Enable -ginline-points by default if location views are
21146         enabled; force it disabled if statement frontiers are
21147         disabled.
21148         * tree-inline.c (expand_call_inline): Check option variables.
21149         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
21151 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
21153         PR tree-optimization/84321
21154         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
21155         handling.  Also check whether the anti-range contains any values
21156         that satisfy the mask; switch to a VR_RANGE if not.
21158 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
21160         PR sanitizer/84340
21161         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
21163 2018-02-13  Martin Jambor  <mjambor@suse.cz>
21165         PR c++/83990
21166         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
21167         of call statements, also set location of a load to a temporary.
21169 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
21171         * config/rl78/rl78.c (add_vector_labels): New function.
21172         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
21173         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
21174         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
21175         which checks that no arguments are passed.
21176         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
21177         * doc/extend.texi: Documentation for the new attribute.
21179 2018-02-13  Andreas Schwab  <schwab@suse.de>
21181         * config/riscv/linux.h (CPP_SPEC): Define.
21183 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
21185         PR target/84335
21186         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
21187         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
21188         OPTION_MASK_ISA_AES as first argument to def_builtin_const
21189         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
21190         instead of OPTION_MASK_ISA_PCLMUL as first argument to
21191         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
21192         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
21193         temporarily for AES and PCLMUL builtins.
21195         PR tree-optimization/84339
21196         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
21197         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
21198         Formatting fixes.
21200         PR middle-end/84309
21201         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
21202         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
21203         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
21204         inline function.
21205         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
21206         inline function.
21207         * omp-simd-clone.h: New file.
21208         * omp-simd-clone.c: Include omp-simd-clone.h.
21209         (expand_simd_clones): No longer static.
21210         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
21211         cgraph.h and omp-simd-clone.h.
21212         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
21213         (vect_recog_widen_shift_pattern): Formatting fix.
21214         (vect_pattern_recog_1): Don't check optab for calls.
21216         PR target/84336
21217         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
21218         operands[2] into a REG before using gen_lowpart on it.
21220 2018-02-12  Jeff Law  <law@redhat.com>
21222         PR target/83760
21223         * config/sh/sh.c (find_barrier): Consider a sibling call
21224         a barrier as well.
21226         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
21227         successfully back substituting a reg.
21229 2018-02-12  Richard Biener  <rguenther@suse.de>
21231         PR tree-optimization/84037
21232         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
21233         parameter, move visited init to caller.
21234         (vect_slp_analyze_operations): Separate cost from validity
21235         check, initialize visited once for all instances.
21236         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
21237         for all instances.
21238         * tree-vect-stmts.c (vect_model_simple_cost): Make early
21239         out an assert.
21240         (vect_model_promotion_demotion_cost): Likewise.
21241         (vectorizable_bswap): Guard cost modeling with !slp_node
21242         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
21243         SLP stmts.
21244         (vectorizable_call): Likewise.
21245         (vectorizable_conversion): Likewise.
21246         (vectorizable_assignment): Likewise.
21247         (vectorizable_shift): Likewise.
21248         (vectorizable_operation): Likewise.
21249         (vectorizable_store): Likewise.
21250         (vectorizable_load): Likewise.
21251         (vectorizable_condition): Likewise.
21252         (vectorizable_comparison): Likewise.
21254 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
21256         PR sanitizer/84307
21257         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
21258         (ASAN_MARK): Fix fnspec to account for return value, change pointer
21259         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
21261 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
21263         PR middle-end/83665
21264         * params.def (inline-min-speedup): Increase from 8 to 15.
21265         (max-inline-insns-auto): Decrease from 40 to 30.
21266         * ipa-split.c (consider_split): Add some buffer for function to
21267         be considered inlining candidate.
21268         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
21269         default values.
21271 2018-02-12  Richard Biener  <rguenther@suse.de>
21273         PR tree-optimization/84037
21274         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
21275         matched stmts if we cannot swap the non-matched ones.
21277 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
21279         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
21280         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
21281         _mm_maskz_scalef_round_ss): New intrinsics.
21282         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
21283         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
21284         __builtin_ia32_scalefss_round): Remove.
21285         (__builtin_ia32_scalefsd_mask_round,
21286         __builtin_ia32_scalefss_mask_round): New intrinsics.
21287         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
21288         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
21289         ((match_operand:VF_128 2 "<round_nimm_predicate>"
21290         "<round_constraint>")): Changed to ...
21291         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
21292         "<round_scalar_constraint>")): ... this.
21293         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
21294         %0, %1, %2<round_op3>}"): Changed to ...
21295         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
21296         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
21297         %2<round_scalar_mask_op3>}"): ... this.
21298         * config/i386/subst.md (round_scalar_nimm_predicate): New.
21300 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
21302         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
21303         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
21304         (_mm_maskz_sqrt_round_ss): New intrinsics.
21305         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
21306         (__builtin_ia32_sqrtsd_mask_round)
21307         (__builtin_ia32_sqrtss_mask_round): New builtins.
21308         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
21309         (__builtin_ia32_sqrtss_round): Remove.
21310         (__builtin_ia32_sqrtsd_mask_round)
21311         (__builtin_ia32_sqrtss_mask_round): New builtins.
21312         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
21313         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
21314         ((match_operand:VF_128 1 "vector_operand"
21315         "xBm,<round_constraint>")): Changed to ...
21316         ((match_operand:VF_128 1 "vector_operand"
21317         "xBm,<round_scalar_constraint>")): ... this.
21318         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
21319         %0, %2, %<iptr>1<round_op3>}): Changed to ...
21320         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
21321         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
21322         %<iptr>1<round_scalar_mask_op3>}): ... this.
21323         ((set_attr "prefix" "<round_prefix>")): Changed to ...
21324         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
21326 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
21328         PR target/84266
21329         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
21330         Cast vec_cmpeq result to correct type.
21331         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
21332         Cast vec_cmpgt result to correct type.
21334 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
21336         * final.c (final_scan_insn_1): Renamed from...
21337         (final_scan_insn): ... this.  New wrapper, to recover
21338         seen from the outermost call in recursive ones.
21339         * config/sparc/sparc.c (output_return): Drop seen from call.
21340         (output_sibcall): Likewise.
21341         * config/visium/visium.c (output_branch): Likewise.
21343 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
21345         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
21346         function label.
21348 2018-02-10  Alan Modra  <amodra@gmail.com>
21350         PR target/84300
21351         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
21352         Specify LR as an input.
21354 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
21356         PR sanitizer/83987
21357         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
21358         remove_member_access_dummy_vars): New functions.
21359         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
21360         lower_omp_1, execute_lower_omp): Use them.
21362         PR rtl-optimization/84308
21363         * shrink-wrap.c (spread_components): Release todo vector.
21365 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
21367         PR rtl-optimization/57193
21368         * ira-color.c (struct allocno_color_data): Add member
21369         conflict_allocno_hard_prefs.
21370         (update_conflict_allocno_hard_prefs): New.
21371         (bucket_allocno_compare_func): Add a preference based on
21372         conflict_allocno_hard_prefs.
21373         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
21374         (color_allocnos): Remove a dead code.  Initiate
21375         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
21377 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
21379         PR target/84226
21380         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
21381         constraint from =wa to wa.  Avoid a subreg on the output operand,
21382         instead use a pseudo and subreg it in a move.
21383         (p9_xxbrd_<mode>): Changed to ...
21384         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
21385         (p9_xxbrd_v2df): New expander.
21386         (p9_xxbrw_<mode>): Changed to ...
21387         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
21388         (p9_xxbrw_v4sf): New expander.
21390 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
21392         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
21394 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
21396         PR target/83926
21397         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
21398         multiply in 32-bit mode.
21399         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
21400         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
21401         mode.
21403 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
21405         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
21406         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
21407         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
21408         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
21410 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
21412         PR lto/84213
21413         * dwarf2out.c (is_trivial_indirect_ref): New function.
21414         (dwarf2out_late_global_decl): Do not generate a location
21415         attribute for variables that have a non-trivial DECL_VALUE_EXPR
21416         and that are not defined in the current unit.
21418 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
21420         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
21421         instead of a libcall for UNORDERED.
21423 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
21425         PR target/82641
21426         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
21427         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
21429 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21431         PR target/PR84295
21432         * config/s390/s390.c (s390_set_current_function): Invoke
21433         s390_indirect_branch_settings also if fndecl didn't change.
21435 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
21437         * config/rs6000/rs6000.md (blockage): Set length to zero.
21439 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
21441         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
21443 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
21445         PR sanitizer/84285
21446         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
21447         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
21448         -static-lib*san.
21450         PR debug/84252
21451         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
21452         PARALLEL incoming that failed vt_get_decl_and_offset check.
21454         PR middle-end/84237
21455         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
21456         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
21457         TREE_READONLY bit.
21458         (get_variable_section): For decls in named .bss* sections pass true as
21459         second argument to bss_initializer_p.
21461 2018-02-09  Marek Polacek  <polacek@redhat.com>
21462             Jakub Jelinek  <jakub@redhat.com>
21464         PR c++/83659
21465         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
21466         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
21467         Sync some changes from cxx_fold_indirect_ref.
21469 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
21471         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
21472         markers.
21473         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
21474         (BLOCK_INLINE_ENTRY_LABEL): New.
21475         (dwarf2out_var_location): Disregard inline entry markers.
21476         (inline_entry_data): New struct.
21477         (inline_entry_data_hasher): New hashtable type.
21478         (inline_entry_data_hasher::hash): New.
21479         (inline_entry_data_hasher::equal): New.
21480         (inline_entry_data_table): New variable.
21481         (add_high_low_attributes): Add DW_AT_entry_pc and
21482         DW_AT_GNU_entry_view attributes if a pending entry is found
21483         in inline_entry_data_table.  Add old entry_pc attribute only
21484         if debug nonbinding markers are disabled.
21485         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
21486         markers are enabled.
21487         (block_within_block_p, dwarf2out_inline_entry): New.
21488         (dwarf2out_finish): Check that no entries remained in
21489         inline_entry_data_table.
21490         * final.c (reemit_insn_block_notes): Handle inline entry notes.
21491         (final_scan_insn, notice_source_line): Likewise.
21492         (rest_of_clean_state): Skip inline entry markers.
21493         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
21494         markers.
21495         * gimple.c (gimple_build_debug_inline_entry): New.
21496         * gimple.h (enum gimple_debug_subcode): Add
21497         GIMPLE_DEBUG_INLINE_ENTRY.
21498         (gimple_build_debug_inline_entry): Declare.
21499         (gimple_debug_inline_entry_p): New.
21500         (gimple_debug_nonbind_marker_p): Adjust.
21501         * insn-notes.def (INLINE_ENTRY): New.
21502         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
21503         inline entry marker notes.
21504         (print_insn): Likewise.
21505         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
21506         (INSN_DEBUG_MARKER_KIND): Likewise.
21507         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
21508         * tree-inline.c (expand_call_inline): Build and insert
21509         debug_inline_entry stmt.
21510         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
21511         inline entry blocks early, if nonbind markers are enabled.
21512         (dump_scope_block): Dump fragment info.
21513         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
21514         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
21515         (gimple_build_debug_inline_entry): New.
21516         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
21517         Enable/disable inline entry points too.
21518         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
21519         (DEBUG_INSN): Describe inline entry markers.
21521         * common.opt (gvariable-location-views): New.
21522         (gvariable-location-views=incompat5): New.
21523         * config.in: Rebuilt.
21524         * configure: Rebuilt.
21525         * configure.ac: Test assembler for view support.
21526         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
21527         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
21528         * dwarf2out.c (var_loc_view): New typedef.
21529         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
21530         (dwarf2out_locviews_in_attribute): New.
21531         (dwarf2out_locviews_in_loclist): New.
21532         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
21533         (enum dw_line_info_opcode): Add LI_adv_address.
21534         (struct dw_line_info_table): Add view.
21535         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
21536         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
21537         (zero_view_p): New variable.
21538         (ZERO_VIEW_P): New macro.
21539         (output_asm_line_debug_info): New.
21540         (struct var_loc_node): Add view.
21541         (add_AT_view_list, AT_loc_list): New.
21542         (add_var_loc_to_decl): Add view param.  Test it against last.
21543         (new_loc_list): Add view params.  Record them.
21544         (AT_loc_list_ptr): Handle loc and view lists.
21545         (view_list_to_loc_list_val_node): New.
21546         (print_dw_val): Handle dw_val_class_view_list.
21547         (size_of_die): Likewise.
21548         (value_format): Likewise.
21549         (loc_list_has_views): New.
21550         (gen_llsym): Set vl_symbol too.
21551         (maybe_gen_llsym, skip_loc_list_entry): New.
21552         (dwarf2out_maybe_output_loclist_view_pair): New.
21553         (output_loc_list): Output view list or entries too.
21554         (output_view_list_offset): New.
21555         (output_die): Handle dw_val_class_view_list.
21556         (output_dwarf_version): New.
21557         (output_compilation_unit_header): Use it.
21558         (output_skeleton_debug_sections): Likewise.
21559         (output_rnglists, output_line_info): Likewise.
21560         (output_pubnames, output_aranges): Update version comments.
21561         (output_one_line_info_table): Output view numbers in asm comments.
21562         (dw_loc_list): Determine current endview, pass it to new_loc_list.
21563         Call maybe_gen_llsym.
21564         (loc_list_from_tree_1): Adjust.
21565         (add_AT_location_description): Create view list attribute if
21566         needed, check it's absent otherwise.
21567         (convert_cfa_to_fb_loc_list): Adjust.
21568         (maybe_emit_file): Call output_asm_line_debug_info for test.
21569         (dwarf2out_var_location): Reset views as needed.  Precompute
21570         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
21571         attribute.  Set view.
21572         (new_line_info_table): Reset next view.
21573         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
21574         (dwarf2out_source_line): Likewise.  Output view resets and labels to
21575         the assembler, or select appropriate line info opcodes.
21576         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
21577         (optimize_string_length): Catch it.  Adjust.
21578         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
21579         dw_val_class_view_list, and remove it if no longer needed.
21580         (hash_loc_list): Hash view numbers.
21581         (loc_list_hasher::equal): Compare them.
21582         (optimize_location_lists): Check whether a view list symbol is
21583         needed, and whether the locview attribute is present, and
21584         whether they match.  Remove the locview attribute if no longer
21585         needed.
21586         (index_location_lists): Call skip_loc_list_entry for test.
21587         (dwarf2out_finish): Call output_asm_line_debug_info for test.
21588         Use output_dwarf_version.
21589         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
21590         (struct dw_val_node): Add val_view_list.
21591         * final.c (SEEN_NEXT_VIEW): New.
21592         (set_next_view_needed): New.
21593         (clear_next_view_needed): New.
21594         (maybe_output_next_view): New.
21595         (final_start_function): Rename to...
21596         (final_start_function_1): ... this.  Take pointer to FIRST,
21597         add SEEN parameter.  Emit param bindings in the initial view.
21598         (final_start_function): Reintroduce SEEN-less interface.
21599         (final): Rename to...
21600         (final_1): ... this.  Take SEEN parameter.  Output final pending
21601         next view at the end.
21602         (final): Reintroduce seen-less interface.
21603         (final_scan_insn): Output pending next view before switching
21604         sections or ending a block.  Mark the next view as needed when
21605         outputting variable locations.  Notify debug backend of section
21606         changes, and of location view changes.
21607         (rest_of_handle_final): Adjust.
21608         * toplev.c (process_options): Autodetect value for debug variable
21609         location views option.  Warn on incompat5 without -gdwarf-5.
21610         * doc/invoke.texi (gvariable-location-views): New.
21611         (gvariable-location-views=incompat5): New.
21612         (gno-variable-location-views): New.
21614 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
21616         PR tree-optimization/84136
21617         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
21618         that the result of find_edge is non-NULL.
21620 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
21622         PR target/83008
21623         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
21624         storing integer register in SImode.  Fix cost of 256 and 512
21625         byte aligned SSE register store.
21627 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
21629         * config/i386/i386.c (ix86_multiplication_cost): Fix
21630         multiplication cost for TARGET_AVX512DQ.
21632 2018-02-08  Marek Polacek  <polacek@redhat.com>
21634         PR tree-optimization/84238
21635         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
21636         get_range_strlen.
21638 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
21640         PR tree-optimization/84265
21641         * tree-vect-stmts.c (vectorizable_store): Don't treat
21642         VMAT_CONTIGUOUS accesses as grouped.
21643         (vectorizable_load): Likewise.
21645 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
21647         PR tree-optimization/81635
21648         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
21649         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
21650         (test_round_for_mask): New functions.
21651         (wide_int_cc_tests): Call test_round_for_mask.
21652         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
21653         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
21654         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
21655         range returned by get_range_info.
21657 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
21659         PR ipa/81360
21660         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
21661         * symtab.c: Include builtins.h
21662         (symtab_node::output_to_lto_symbol_table_p): Move here
21663         from lto-streamer-out.c:output_symbol_p.
21664         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
21665         (output_symbol_p): Move all logic to symtab.c
21666         (produce_symtab): Update.
21668 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21670         * config/s390/s390-opts.h (enum indirect_branch): Define.
21671         * config/s390/s390-protos.h (s390_return_addr_from_memory)
21672         (s390_indirect_branch_via_thunk)
21673         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
21674         (enum s390_indirect_branch_type): Define.
21675         * config/s390/s390.c (struct s390_frame_layout, struct
21676         machine_function): Remove.
21677         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
21678         (indirect_branch_table_label_no, indirect_branch_table_name):
21679         Define variables.
21680         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
21681         (enum s390_indirect_branch_option): Define.
21682         (s390_return_addr_from_memory): New function.
21683         (s390_handle_string_attribute): New function.
21684         (s390_attribute_table): Add new attribute handler.
21685         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
21686         (s390_indirect_branch_via_thunk): New function.
21687         (s390_indirect_branch_via_inline_thunk): New function.
21688         (s390_function_ok_for_sibcall): When jumping via thunk disallow
21689         sibling call optimization for non z10 compiles.
21690         (s390_emit_call): Force indirect branch target to be a single
21691         register.  Add r1 clobber for non-z10 compiles.
21692         (s390_emit_epilogue): Emit return jump via return_use expander.
21693         (s390_reorg): Handle JUMP_INSNs as execute targets.
21694         (s390_option_override_internal): Perform validity checks for the
21695         new command line options.
21696         (s390_indirect_branch_attrvalue): New function.
21697         (s390_indirect_branch_settings): New function.
21698         (s390_set_current_function): Invoke s390_indirect_branch_settings.
21699         (s390_output_indirect_thunk_function):  New function.
21700         (s390_code_end): Implement target hook.
21701         (s390_case_values_threshold): Implement target hook.
21702         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
21703         macros.
21704         * config/s390/s390.h (struct s390_frame_layout)
21705         (struct machine_function): Move here from s390.c.
21706         (TARGET_INDIRECT_BRANCH_NOBP_RET)
21707         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
21708         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
21709         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
21710         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
21711         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
21712         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
21713         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
21714         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
21715         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
21716         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
21717         (mnemonic attribute): Add values which aren't recognized
21718         automatically.
21719         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
21720         pattern for branch conversion.  Fix mnemonic attribute.
21721         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
21722         indirect branch via thunk if requested.
21723         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
21724         ("*indirect_jump"): Disable for branch conversion using out of
21725         line thunks.
21726         ("indirect_jump_via_thunk<mode>_z10")
21727         ("indirect_jump_via_thunk<mode>")
21728         ("indirect_jump_via_inlinethunk<mode>_z10")
21729         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
21730         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
21731         ("casesi_jump_via_inlinethunk<mode>_z10")
21732         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
21733         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
21734         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
21735         ("*indirect2_jump"): Disable for branch conversion.
21736         ("casesi_jump"): Turn into expander and expand patterns for branch
21737         conversion.
21738         ("return_use"): New expander.
21739         ("*return"): Emit return via thunk and rename it to ...
21740         ("*return<mode>"): ... this one.
21741         * config/s390/s390.opt: Add new options and and enum for the
21742         option values.
21744 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
21746         * lra-constraints.c (match_reload): Unconditionally use
21747         gen_lowpart_SUBREG, rather than selecting between that
21748         and equivalent gen_rtx_SUBREG code.
21750 2018-02-08  Richard Biener  <rguenther@suse.de>
21752         PR tree-optimization/84233
21753         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
21754         changed flag instead of boguously re-using phi_inserted.
21756 2018-02-08  Martin Jambor  <mjambor@suse.cz>
21758         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
21759         static local variables.
21761 2018-02-08  Richard Biener  <rguenther@suse.de>
21763         PR tree-optimization/84278
21764         * tree-vect-stmts.c (vectorizable_store): When looking for
21765         smaller vector types to perform grouped strided loads/stores
21766         make sure the mode is supported by the target.
21767         (vectorizable_load): Likewise.
21769 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
21771         * config/aarch64/aarch64.c (aarch64_components_for_bb):
21772         Increase LDP/STP opportunities by adding adjacent callee-saves.
21774 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
21776         PR rtl-optimization/84068
21777         PR rtl-optimization/83459
21778         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
21780 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
21782         PR tree-optimization/84224
21783         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
21784         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
21785         non-zero arguments.
21787 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
21789         PR target/84113
21790         * config/rs6000/altivec.md (*restore_world): Remove LR use.
21791         * config/rs6000/predicates.md (restore_world_operation): Adjust op
21792         count, remove one USE.
21794 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
21796         * doc/install.texi (Configuration): Document the
21797         --with-long-double-format={ibm,ieee} PowerPC configuration
21798         options.
21800         PR target/84154
21801         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
21802         Convert from define_expand to be define_insn_and_split.  Rework
21803         float/double/_Float128 conversions to QI/HI/SImode to work with
21804         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
21805         conversions to QI/HImode types did a store and then a load to
21806         truncate the value.  For conversions to VSX registers, don't split
21807         the insn, instead emit the code directly.  Use the code iterator
21808         any_fix to combine signed and unsigned conversions.
21809         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
21810         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
21811         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21812         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
21813         (fix_<mode>di2_hw): Likewise.
21814         (fixuns_<mode>di2_hw): Likewise.
21815         (fix_<mode>si2_hw): Likewise.
21816         (fixuns_<mode>si2_hw): Likewise.
21817         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
21818         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21819         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
21820         fix<uns>_trunc<SFDF:mode>si2_p8.
21821         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
21822         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
21823         (fix<uns>_<mode>_mem): Likewise.
21824         (fctiw<u>z_<mode>_mem): Likewise.
21825         (fix<uns>_<mode>_mem): Likewise.
21826         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
21827         the register allocator from doing a direct move to the GPRs to do
21828         a store, and instead use the ISA 3.0 store byte/half-word from
21829         vector register instruction.  For IEEE 128-bit floating point,
21830         also optimize stores of 32-bit ints.
21831         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
21833 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
21835         * genextract.c (push_pathstr_operand): New function to support
21836         [a-zA-Z].
21837         (walk_rtx): Call push_pathstr_operand.
21838         (print_path): Support [a-zA-Z].
21840 2018-02-07  Richard Biener  <rguenther@suse.de>
21842         PR tree-optimization/84037
21843         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
21844         (cse_and_gimplify_to_preheader): Declare.
21845         (vect_get_place_in_interleaving_chain): Likewise.
21846         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21847         ivexpr_map.
21848         (_loop_vec_info::~_loop_vec_info): Delete it.
21849         (cse_and_gimplify_to_preheader): New function.
21850         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
21851         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
21852         (vectorizable_load): Likewise.  For grouped stores always base
21853         the IV on the first element.
21854         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
21855         condition before gimplifying.
21857 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
21859         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
21860         *DIV_EXPR and *MOD_EXPR.
21862 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
21864         PR target/84248
21865         * config/i386/i386.c (ix86_option_override_internal): Mask out
21866         the CF_SET bit when checking -fcf-protection.
21868 2018-02-07  Tom de Vries  <tom@codesourcery.com>
21870         PR libgomp/84217
21871         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
21872         enough.
21874 2018-02-07  Richard Biener  <rguenther@suse.de>
21876         PR tree-optimization/84204
21877         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
21878         this place.
21880         PR tree-optimization/84205
21881         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
21882         special-case isl_ast_op_zdiv_r.
21884         PR tree-optimization/84223
21885         * graphite-scop-detection.c (gather_bbs::before_dom_children):
21886         Only add conditions from within the region.
21887         (gather_bbs::after_dom_children): Adjust.
21889 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
21891         PR target/84209
21892         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
21893         * config/avr/avr.md: Only post-reload split REG-REG moves if
21894         either register is GENERAL_REG_P.
21896 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
21898         PR tree-optimization/84235
21899         * tree-ssa-scopedtables.c
21900         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
21901         if the subtraction is performed in floating point type where NaNs are
21902         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
21903         build 1.  Formatting fix.
21905 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
21907         PR target/84146
21908         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
21909         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
21910         and skip it regardless of bb boundaries.  Use CALL_P macro,
21911         don't test INSN_P (insn) together with CALL_P or JUMP_P check
21912         unnecessarily, formatting fix.
21914 2018-02-06  Michael Collison  <michael.collison@arm.com>
21916         * config/arm/thumb2.md:
21917         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
21918         (*thumb_mov_notscc): Ditto.
21920 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
21922         PR target/84154
21923         * config/rs6000/rs6000.md (su code attribute): Use "u" for
21924         unsigned_fix, not "s".
21926 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21928         * configure.ac (gcc_fn_eh_frame_ro): New function.
21929         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
21930         correct .eh_frame permissions.
21931         * configure: Regenerate.
21933 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
21935         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
21936         irrelevant options.
21938 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21940         * config/rs6000/rs6000.c (rs6000_option_override_internal):
21941         Display warning message for -mno-speculate-indirect-jumps.
21943 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
21945         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
21946         Undocumented.
21947         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
21949 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
21951         PR tree-optimization/84225
21952         * tree-eh.c (find_trapping_overflow): Only call
21953         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
21955 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
21957         PR target/84145
21958         * config/i386/i386.c: Reimplement the check of possible options
21959         -mibt/-mshstk conbination. Change error messages.
21960         * doc/invoke.texi: Fix a typo: remove extra '='.
21962 2018-02-06  Marek Polacek  <polacek@redhat.com>
21964         PR tree-optimization/84228
21965         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
21967 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
21969         PR target/82641
21970         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
21971         emitted arch directives.
21972         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
21973         __ARM_FEATURE_COPROC before changing architectures.
21975 2018-02-06  Richard Biener  <rguenther@suse.de>
21977         * config/i386/i386.c (print_reg): Fix typo.
21978         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
21980 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
21982         * configure: Regenerate.
21984 2018-02-05  Martin Sebor  <msebor@redhat.com>
21986         PR tree-optimization/83369
21987         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
21988         inlining context.
21990 2018-02-05  Martin Liska  <mliska@suse.cz>
21992         * doc/invoke.texi: Cherry-pick upstream r323995.
21994 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
21996         * ira.c (ira_init_register_move_cost): Adjust comment.
21998 2018-02-05  Martin Liska  <mliska@suse.cz>
22000         PR gcov-profile/84137
22001         * doc/gcov.texi: Fix typo in documentation.
22003 2018-02-05  Martin Liska  <mliska@suse.cz>
22005         PR gcov-profile/83879
22006         * doc/gcov.texi: Document necessity of --dynamic-list-data when
22007         using dlopen functionality.
22009 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
22011         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
22012         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
22013         _mm_maskz_range_ss, _mm_mask_range_round_ss,
22014         _mm_maskz_range_round_ss): New intrinsics.
22015         (__builtin_ia32_rangesd128_round)
22016         (__builtin_ia32_rangess128_round): Remove.
22017         (__builtin_ia32_rangesd128_mask_round,
22018         __builtin_ia32_rangess128_mask_round): New builtins.
22019         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
22020         __builtin_ia32_rangess128_round): Remove.
22021         (__builtin_ia32_rangesd128_mask_round,
22022         __builtin_ia32_rangess128_mask_round): New builtins.
22023         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
22024         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
22025         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
22026         "<round_saeonly_constraint>")): Changed to ...
22027         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
22028         "<round_saeonly_scalar_constraint>")): ... this.
22029         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
22030         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
22031         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
22032         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
22033         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
22035 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
22037         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
22038         options.
22039         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
22040         Remove all values except native, 8540 and 8548.
22042 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
22044         * config/i386/i386.c (ix86_output_function_return): Pass
22045         INVALID_REGNUM, instead of -1, as invalid register number to
22046         indirect_thunk_name and output_indirect_thunk.
22048 2018-02-02  Julia Koval  <julia.koval@intel.com>
22050         * config.gcc: Add -march=icelake.
22051         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
22052         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
22053         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
22054         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
22055         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
22056         (processor_target_table): Add icelake.
22057         (ix86_option_override_internal): Handle new PTAs.
22058         (get_builtin_code_for_version): Handle icelake.
22059         (M_INTEL_COREI7_ICELAKE): New.
22060         (fold_builtin_cpu): Handle icelake.
22061         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
22062         * doc/invoke.texi: Add -march=icelake.
22064 2018-02-02  Julia Koval  <julia.koval@intel.com>
22066         * config/i386/i386.c (ix86_option_override_internal): Change flags type
22067         to wide_int_bitmask.
22068         * wide-int-bitmask.h: New.
22070 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
22072         PR target/84066
22073         * config/i386/i386.md: Replace Pmode with word_mode in
22074         builtin_setjmp_setup and builtin_longjmp to support x32.
22076 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
22078         PR target/56010
22079         PR target/83743
22080         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
22081         #include "opts.h".
22082         (rs6000_supported_cpu_names): New static variable.
22083         (linux_cpu_translation_table): Likewise.
22084         (elf_platform) <cpu>: Define new static variable and use it.
22085         Translate kernel AT_PLATFORM name to canonical name if needed.
22086         Error if platform name is unknown.
22088 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
22090         PR target/84089
22091         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
22093 2018-02-01  Jeff Law  <law@redhat.com>
22095         PR target/84128
22096         * config/i386/i386.c (release_scratch_register_on_entry): Add new
22097         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
22098         the scratch if RELEASE_VIA_POP is false.
22099         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
22100         If we have to save a temporary register, decrement SIZE appropriately.
22101         Pass new arguments to release_scratch_register_on_entry.
22102         (ix86_adjust_stack_and_probe): Likewise.
22103         (ix86_emit_probe_stack_range): Pass new arguments to
22104         release_scratch_register_on_entry.
22106 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
22108         PR rtl-optimization/84157
22109         * combine.c (change_zero_ext): Use REG_P predicate in
22110         front of HARD_REGISTER_P predicate.
22112 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
22114         * config/avr/avr.c (avr_option_override): Move disabling of
22115         -fdelete-null-pointer-checks to...
22116         * common/config/avr/avr-common.c (avr_option_optimization_table):
22117         ...here.
22119 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22121         PR tree-optimization/81635
22122         * tree-data-ref.c (split_constant_offset_1): For types that
22123         wrap on overflow, try to use range info to prove that wrapping
22124         cannot occur.
22126 2018-02-01  Renlin Li  <renlin.li@arm.com>
22128         PR target/83370
22129         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
22130         TAILCALL_ADDR_REGS.
22131         (aarch64_register_move_cost): Likewise.
22132         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
22133         TAILCALL_ADDR_REGS.
22134         (REG_CLASS_NAMES): Likewise.
22135         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
22136         TAILCALL_ADDR_REGS. Remove IP registers.
22137         * config/aarch64/aarch64.md (Ucs): Update register constraint.
22139 2018-02-01  Richard Biener  <rguenther@suse.de>
22141         * domwalk.h (dom_walker::dom_walker): Add additional constructor
22142         for specifying RPO order and allow NULL for that.
22143         * domwalk.c (dom_walker::dom_walker): Likewise.
22144         (dom_walker::walk): Handle NULL RPO order.
22145         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
22146         in RPO order.
22147         (rewrite_update_dom_walker): Likewise.
22148         (mark_def_dom_walker): Likewise.
22150 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22152         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
22153         (aarch64_maybe_expand_sve_subreg_move): Declare.
22154         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
22155         * config/aarch64/predicates.md (aarch64_any_register_operand): New
22156         predicate.
22157         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
22158         that are semantically a reverse operation.
22159         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
22160         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
22161         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
22162         functions.
22163         (aarch64_can_change_mode_class): For big-endian, forbid changes
22164         between two SVE modes if they have different element sizes.
22166 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22168         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
22169         the TImode handling for big-endian targets.
22171 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22173         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
22174         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
22175         not just bytes.
22176         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
22177         Remove BSWAP handing for big-endian targets and use the form of
22178         LD1RQ appropariate for the mode.
22180 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22182         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
22183         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
22184         duplicated element.
22186 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22188         PR tearget/83845
22189         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
22190         check for operands that need to go through aarch64_sve_reload_be.
22192 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
22194         PR tree-optimization/81661
22195         PR tree-optimization/84117
22196         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
22197         * tree-eh.c: Include gimplify.h.
22198         (find_trapping_overflow, replace_trapping_overflow,
22199         rewrite_to_non_trapping_overflow): New functions.
22200         * tree-vect-loop.c: Include tree-eh.h.
22201         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
22202         * tree-data-ref.c: Include tree-eh.h.
22203         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
22205 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
22207         PR rtl-optimization/84123
22208         * combine.c (change_zero_ext): Check if hard register satisfies
22209         can_change_dest_mode before calling gen_lowpart_SUBREG.
22211 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
22213         PR target/82444
22214         * ira.c (ira_init_register_move_cost): Remove assert.
22216 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
22218         PR rtl-optimization/84071
22219         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
22220         * doc/tm.texi: Regenerate.
22222 2018-01-31  Richard Biener  <rguenther@suse.de>
22224         PR tree-optimization/84132
22225         * tree-data-ref.c (analyze_miv_subscript): Properly
22226         check whether evolution_function_is_affine_multivariate_p
22227         before calling gcd_of_steps_may_divide_p.
22229 2018-01-31  Julia Koval  <julia.koval@intel.com>
22231         PR target/83618
22232         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
22233         * config/i386/i386.md (rdpid_rex64) New.
22234         (rdpid): Make 32bit only.
22236 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
22238         PR lto/84105
22239         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
22240         an IDENTIFIER_NODE for FUNCTION_TYPE's.
22242 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
22244         Revert
22245         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22247         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22249 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
22251         PR rtl-optimization/84071
22252         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
22253         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
22255 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
22257         * config/arc/arc.c (arc_handle_aux_attribute): New function.
22258         (arc_attribute_table): Add 'aux' attribute.
22259         (arc_in_small_data_p): Consider aux like variables.
22260         (arc_is_aux_reg_p): New function.
22261         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
22262         (arc_get_aux_arg): New function.
22263         (prepare_move_operands): Handle aux-register access.
22264         (arc_handle_aux_attribute): New function.
22265         * doc/extend.texi (ARC Variable attributes): Add subsection.
22267 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
22269         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
22270         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
22271         (arc_attribute_table): Add 'uncached' attribute.
22272         (arc_print_operand): Print '.di' flag for uncached memory
22273         accesses.
22274         (arc_in_small_data_p): Do not consider for small data the uncached
22275         types.
22276         (arc_is_uncached_mem_p): New function.
22277         * config/arc/predicates.md (compact_store_memory_operand): Check
22278         for uncached memory accesses.
22279         (nonvol_nonimm_operand): Likewise.
22280         * doc/extend.texi (ARC Type Attribute): New subsection.
22282 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
22284         PR c/84100
22285         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
22286         falign-loops=): Add Optimization flag.
22288 2018-01-30  Jeff Law  <law@redhat.com>
22290         PR target/84064
22291         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
22292         INT_REGISTERS_SAVED.  Check it prior to calling
22293         get_scratch_register_on_entry.
22294         (ix86_adjust_stack_and_probe): Similarly.
22295         (ix86_emit_probe_stack_range): Similarly.
22296         (ix86_expand_prologue): Corresponding changes.
22298 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22300         PR target/40411
22301         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
22302         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
22304 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
22306         PR target/84112
22307         * lra-constraints.c (curr_insn_transform): Process AND in the
22308         address.
22310 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
22312         PR rtl-optimization/83986
22313         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
22314         dependence against last_pending_memory_flush in addition to
22315         pending_jump_insns.
22317 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
22319         PR tree-optimization/81611
22320         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
22321         copies.
22323 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22325         PR target/83758
22326         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
22327         a reg rtx.
22329 2018-01-30  Richard Biener  <rguenther@suse.de>
22330             Jakub Jelinek  <jakub@redhat.com>
22332         PR tree-optimization/84111
22333         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
22334         inner loops added during recursion, as they don't have up-to-date
22335         SSA form.
22337 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
22339         PR ipa/81360
22340         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
22341         (can_inline_edge_by_limits_p): ... here.
22342         (can_early_inline_edge_p, check_callers,
22343         update_caller_keys, update_callee_keys, recursive_inlining,
22344         add_new_edges_to_heap, speculation_useful_p,
22345         inline_small_functions,
22346         inline_small_functions, flatten_function,
22347         inline_to_all_callers_1): Update.
22349 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
22351         * profile-count.c (profile_count::combine_with_ipa_count): Handle
22352         zeros correctly.
22354 2018-01-30  Richard Biener  <rguenther@suse.de>
22356         PR tree-optimization/83008
22357         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
22358         invariant and constant vector uses in stmts when they need
22359         more than one stmt.
22361 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22363         PR bootstrap/84017
22364         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
22365         * configure: Regenerate.
22367 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
22369         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
22370         pattern.
22371         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
22372         Use gen_rtx_REG rather than gen_lowpart.
22374 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
22376         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
22377         rather than 0 when creating partial subregs.
22379 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
22381         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
22382         of usage.
22384 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
22386         PR target/81550
22387         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
22388         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
22389         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
22390         flags.  This restores the settings used before the 2017-07-24.
22391         Turning off pre increment/decrement/modify allows IVOPTS to
22392         optimize DF/SF loops where the index is an int.
22394 2018-01-29  Richard Biener  <rguenther@suse.de>
22395             Kelvin Nilsen  <kelvin@gcc.gnu.org>
22397         PR bootstrap/80867
22398         * tree-vect-stmts.c (vectorizable_call): Don't call
22399         targetm.vectorize_builtin_md_vectorized_function if callee is
22400         NULL.
22402 2018-01-22  Carl Love  <cel@us.ibm.com>
22404         * doc/extend.tex: Fix typo in second arg in
22405         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
22407 2018-01-29  Richard Biener  <rguenther@suse.de>
22409         PR tree-optimization/84086
22410         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
22411         (flush_ssaname_freelist): When SSA names were released reset
22412         the SCEV hash table.
22414 2018-01-29  Richard Biener  <rguenther@suse.de>
22416         PR tree-optimization/84057
22417         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
22418         removed paths when removing edges.
22420 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
22422         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
22423         -mfunction-return=@var{choice}.
22425 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
22427         PR diagnostic/84034
22428         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
22429         Handle CR like TAB.
22430         (layout::print_source_line): Likewise.
22431         (test_get_line_width_without_trailing_whitespace): Add test cases.
22433 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
22435         PR middle-end/84040
22436         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
22437         debug insns.
22439 2018-01-26  Jim Wilson  <jimw@sifive.com>
22441         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
22443         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
22444         specified.
22446 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22448         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
22449         and CMP + SUB-immediate -> SUBS.
22451 2018-01-26  Martin Sebor  <msebor@redhat.com>
22453         PR tree-optimization/83896
22454         * tree-ssa-strlen.c (get_string_len): Rename...
22455         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
22456         Avoid assuming length is constant.
22457         (handle_char_store): Use HOST_WIDE_INT for string length.
22459 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
22461         PR target/81763
22462         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
22463         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
22465 2018-01-26  Richard Biener  <rguenther@suse.de>
22467         PR rtl-optimization/84003
22468         * dse.c (record_store): Only record redundant stores when
22469         the earlier store aliases at least all accesses the later one does.
22471 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
22473         PR rtl-optimization/83985
22474         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
22475         REG_CFA_RESTORE insns.
22476         (delete_unmarked_insns): Don't ignore separate shrink wrapping
22477         REG_CFA_RESTORE insns here.
22479         PR c/83989
22480         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
22481         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
22483 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22485         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
22486         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
22487         (arc_init): Likewise.
22488         (arc_override_options): Likewise.
22489         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
22490         value.
22491         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
22492         support.
22493         * config/arc/arc.h (TARGET_DBNZ): Define.
22494         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
22495         properly set the tune attribute.
22496         (dbnz): Use TARGET_DBNZ guard.
22497         * config/arc/arc.opt (mtune): Add core3 option.
22499 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22501         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
22502         recognize new pic like addresses.
22503         (arc_delegitimize_address): Clean up.
22505 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22507         * config/arc/arc-arches.def: Option mrf16 valid for all
22508         architectures.
22509         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
22510         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
22511         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
22512         * config/arc/arc-tables.opt: Regenerate.
22513         * config/arc/arc.c (arc_conditional_register_usage): Handle
22514         reduced register file case.
22515         (arc_file_start): Set must have build attributes.
22516         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
22517         mrf16 option value.
22518         * config/arc/arc.opt (mrf16): Add new option.
22519         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
22520         * config/arc/genmultilib.awk: Handle new mrf16 option.
22521         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
22522         * config/arc/t-multilib: Regenerate.
22523         * doc/invoke.texi (ARC Options): Document mrf16 option.
22525 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22527         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
22528         * config/arc/arc.c (arc_handle_secure_attribute): New function.
22529         (arc_attribute_table): Add 'secure_call' attribute.
22530         (arc_print_operand): Print secure call operand.
22531         (arc_function_ok_for_sibcall): Don't optimize tail calls when
22532         secure.
22533         (arc_is_secure_call_p): New function.  * config/arc/arc.md
22534         (call_i): Add support for sjli instruction.
22535         (call_value_i): Likewise.
22536         * config/arc/constraints.md (Csc): New constraint.
22538 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
22539             John Eric Martin  <John.Martin@emmicro-us.com>
22541         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
22542         * config/arc/arc.c (_arc_jli_section): New struct.
22543         (arc_jli_section): New type.
22544         (rc_jli_sections): New static variable.
22545         (arc_handle_jli_attribute): New function.
22546         (arc_attribute_table): Add jli_always and jli_fixed attribute.
22547         (arc_file_end): New function.
22548         (TARGET_ASM_FILE_END): Define.
22549         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
22550         (arc_add_jli_section): New function.
22551         (jli_call_scan): Likewise.
22552         (arc_reorg): Call jli_call_scan.
22553         (arc_output_addsi): Remove 'S' from printing asm operand.
22554         (arc_is_jli_call_p): New function.
22555         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
22556         operand.
22557         (movhi_insn): Likewise.
22558         (movsi_insn): Likewise.
22559         (movsi_set_cc_insn): Likewise.
22560         (loadqi_update): Likewise.
22561         (load_zeroextendqisi_update): Likewise.
22562         (load_signextendqisi_update): Likewise.
22563         (loadhi_update): Likewise.
22564         (load_zeroextendhisi_update): Likewise.
22565         (load_signextendhisi_update): Likewise.
22566         (loadsi_update): Likewise.
22567         (loadsf_update): Likewise.
22568         (movsicc_insn): Likewise.
22569         (bset_insn): Likewise.
22570         (bxor_insn): Likewise.
22571         (bclr_insn): Likewise.
22572         (bmsk_insn): Likewise.
22573         (bicsi3_insn): Likewise.
22574         (cmpsi_cc_c_insn): Likewise.
22575         (movsi_ne): Likewise.
22576         (movsi_cond_exec): Likewise.
22577         (clrsbsi2): Likewise.
22578         (norm_f): Likewise.
22579         (normw): Likewise.
22580         (swap): Likewise.
22581         (divaw): Likewise.
22582         (flag): Likewise.
22583         (sr): Likewise.
22584         (kflag): Likewise.
22585         (ffs): Likewise.
22586         (ffs_f): Likewise.
22587         (fls): Likewise.
22588         (call_i): Remove 'S' asm letter, add jli instruction.
22589         (call_value_i): Likewise.
22590         * config/arc/arc.op (mjli-always): New option.
22591         * config/arc/constraints.md (Cji): New constraint.
22592         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
22593         operand.
22594         (subsf3_fpx): Likewise.
22595         (mulsf3_fpx): Likewise.
22596         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
22597         asm operand.
22598         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
22599         function attrbutes.
22600         * doc/invoke.texi (ARC): Document mjli-always option.
22602 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
22604         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
22605         avoid addition with 0 and use incw and decw where possible.
22607 2018-01-26  Richard Biener  <rguenther@suse.de>
22609         PR tree-optimization/81082
22610         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
22611         association if it requires casting to unsigned.
22612         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
22613         from fold_plusminus_mult_expr to catch important cases late when
22614         range info is available.
22616 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22618         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
22619         * configure.ac (hidden_linkonce): New test.
22620         * configure: Regenerate.
22621         * config.in: Regenerate.
22623 2018-01-26  Julia Koval  <julia.koval@intel.com>
22625         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
22626         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
22627         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
22628         _mm_mask_bitshuffle_epi64_mask): Fix type.
22629         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
22630         USI_FTYPE_V4DI_V4DI_USI): Remove.
22631         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
22632         __builtin_ia32_vpshufbitqmb256_mask,
22633         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
22634         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
22635         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
22637 2018-01-26  Alan Modra  <amodra@gmail.com>
22639         PR target/84033
22640         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
22641         UNSPEC_VBPERMQ.  Sort other unspecs.
22643 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
22645         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
22647 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
22649         PR middle-end/83055
22650         * predict.c (drop_profile): Do not push/pop cfun; update also
22651         node->count.
22652         (handle_missing_profiles): Fix logic looking for zero profiles.
22654 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
22656         PR middle-end/83977
22657         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
22658         on functions with #pragma omp declare simd or functions with simd
22659         attribute.
22660         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
22661         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
22662         Remove trailing \n from warning_at calls.
22664 2018-01-25  Tom de Vries  <tom@codesourcery.com>
22666         PR target/84028
22667         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22668         for neutered workers.
22670 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
22672         PR target/68467
22673         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
22674         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
22676 2018-01-24  Jeff Law  <law@redhat.com>
22678         PR target/83994
22679         * i386.c (get_probe_interval): Move to earlier point.
22680         (ix86_compute_frame_layout): If -fstack-clash-protection and
22681         the frame is larger than the probe interval, then use pushes
22682         to save registers rather than reg->mem moves.
22683         (ix86_expand_prologue): Remove conditional for int_registers_saved
22684         assertion.
22686 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
22688         PR target/84014
22689         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
22690         min/max for never referenced object.
22692 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
22694         PR middle-end/83977
22695         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
22696         here.
22697         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
22698         attributes from DECL_ATTRIBUTES (decl) without affecting
22699         DECL_ATTRIBUTES (current_function_decl).
22700         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
22701         functions with non-NULL DECL_ABSTRACT_ORIGIN.
22703 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
22705         PR tree-optimization/83979
22706         * fold-const.c (fold_comparison): Use constant_boolean_node
22707         instead of boolean_{true,false}_node.
22709 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
22711         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
22712         with zero counts.
22714 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22716         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22717         Simplify the clause that sets the length attribute.
22718         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22719         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
22720         clause that sets the length attribute.
22721         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22723 2018-01-24  Tom de Vries  <tom@codesourcery.com>
22725         PR target/83589
22726         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
22727         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
22728         Add strict parameter.
22729         (prevent_branch_around_nothing): Insert dummy insn between branch to
22730         label and label with no ptx insn inbetween.
22731         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
22733 2018-01-24  Tom de Vries  <tom@codesourcery.com>
22735         PR target/81352
22736         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22737         for neutered threads in warp.
22738         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
22740 2018-01-24  Richard Biener  <rguenther@suse.de>
22742         PR tree-optimization/83176
22743         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
22744         operands.
22746 2018-01-24  Richard Biener  <rguenther@suse.de>
22748         PR tree-optimization/82819
22749         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
22750         code generating pluses that are no-ops in the target precision.
22752 2018-01-24  Richard Biener  <rguenther@suse.de>
22754         PR middle-end/84000
22755         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
22757 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
22759         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
22760         to merge probabilities.
22761         * predict.c (probably_never_executed): Also mark as cold functions
22762         with global 0 profile and guessed local profile.
22763         * profile-count.c (profile_probability::combine_with_count): New
22764         member function.
22765         * profile-count.h (profile_probability::operator*,
22766         profile_probability::operator*=, profile_probability::operator/,
22767         profile_probability::operator/=): Reduce precision to adjusted
22768         and set value to guessed on contradictory divisions.
22769         (profile_probability::combine_with_freq): Remove.
22770         (profile_probability::combine_wiht_count): Declare.
22771         (profile_count::force_nonzero):: Set to adjusted.
22772         (profile_count::probability_in):: Set quality to adjusted.
22773         * tree-ssa-tail-merge.c (replace_block_by): Use
22774         combine_with_count.
22776 2018-01-23  Andrew Waterman  <andrew@sifive.com>
22777             Jim Wilson  <jimw@sifive.com>
22779         * config/riscv/riscv.c (riscv_stack_boundary): New.
22780         (riscv_option_override): Set riscv_stack_boundary.  Handle
22781         riscv_preferred_stack_boundary_arg.
22782         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
22783         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
22784         (STACK_BOUNDARY): Set to riscv_stack_boundary.
22785         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
22786         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
22787         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
22789 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
22791         PR target/83905
22792         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
22793         of struct ix86_frame.
22794         (ix86_expand_epilogue): Likewise.  Add a local variable for
22795         the reg_save_offset field in struct ix86_frame.
22797 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
22799         PR tree-optimization/82604
22800         * tree-loop-distribution.c (enum partition_kind): New enum item
22801         PKIND_PARTIAL_MEMSET.
22802         (partition_builtin_p): Support above new enum item.
22803         (generate_code_for_partition): Ditto.
22804         (compute_access_range): Differentiate cases that equality can be
22805         proven at all loops, the innermost loops or no loops.
22806         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
22807         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
22808         (finalize_partitions, distribute_loop): Don't fuse partition of
22809         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
22810         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
22811         parloop is enabled.
22813 2018-01-23  Martin Liska  <mliska@suse.cz>
22815         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
22816         order to ignore the predictor.
22817         (PRED_POLYMORPHIC_CALL): Likewise.
22818         (PRED_RECURSIVE_CALL): Likewise.
22820 2018-01-23  Martin Liska  <mliska@suse.cz>
22822         * tree-profile.c (tree_profiling): Print function header to
22823         aware reader which function we are working on.
22824         * value-prof.c (gimple_find_values_to_profile): Do not print
22825         not interesting value histograms.
22827 2018-01-23  Martin Liska  <mliska@suse.cz>
22829         * profile-count.h (enum profile_quality): Add
22830         profile_uninitialized as the first value. Do not number values
22831         as they are zero based.
22832         (profile_count::verify): Update sanity check.
22833         (profile_probability::verify): Likewise.
22835 2018-01-23  Nathan Sidwell  <nathan@acm.org>
22837         * doc/invoke.texi (ffor-scope): Deprecate.
22839 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
22841         PR tree-optimization/83510
22842         * domwalk.c (set_all_edges_as_executable): New function.
22843         (dom_walker::dom_walker): Convert bool param
22844         "skip_unreachable_blocks" to enum reachability.  Move setup of
22845         edge flags to set_all_edges_as_executable and only do it when
22846         reachability is REACHABLE_BLOCKS.
22847         * domwalk.h (enum dom_walker::reachability): New enum.
22848         (dom_walker::dom_walker): Convert bool param
22849         "skip_unreachable_blocks" to enum reachability.
22850         (set_all_edges_as_executable): New decl.
22851         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
22852         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
22853         "reachability".
22854         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
22855         but converting true to REACHABLE_BLOCKS.
22856         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
22857         * tree-vrp.c
22858         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
22859         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
22860         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
22861         REACHABLE_BLOCKS.
22862         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
22863         if check_all_array_refs will be called.
22865 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
22867         * tree.c (selftest::test_location_wrappers): Add more test
22868         coverage.
22870 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
22872         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
22873         (selftest::test_bit_in_range): Likewise.
22875 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
22877         PR testsuite/83888
22878         * doc/sourcebuild.texi (vect_float): Say that the selector
22879         only describes the situation when -funsafe-math-optimizations is on.
22880         (vect_float_strict): Document.
22882 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
22884         PR tree-optimization/83965
22885         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
22886         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
22887         instead of checking only for a reduction.
22888         (vect_recog_widen_sum_pattern): Likewise.
22890 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
22892         * predict.c (probably_never_executed): Only use precise profile info.
22893         (compute_function_frequency): Skip after inlining hack since we now
22894         have quality checking.
22896 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
22898         * profile-count.h (profile_probability::very_unlikely,
22899         profile_probability::unlikely, profile_probability::even): Set
22900         precision to guessed.
22902 2018-01-23  Richard Biener  <rguenther@suse.de>
22904         PR tree-optimization/83963
22905         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
22906         Properly terminate dominator walk when crossing the exit edge not
22907         when visiting its source block.
22909 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
22911         PR c++/83918
22912         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
22913         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
22915 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
22917         PR tree-optimization/83957
22918         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
22919         semicolon after for body surrounded by braces.
22921         PR tree-optimization/83081
22922         * profile-count.h (profile_probability::split): New method.
22923         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
22924         Use profile_probability::split.
22925         (do_compare_rtx_and_jump): Fix adjustment of probabilities
22926         when splitting a single conditional jump into 2.
22928 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
22930         PR tree-optimization/69452
22931         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
22932         decl.
22934 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22936         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
22937         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
22938         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
22940 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22942         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
22943         declaration.
22944         * config/rl78/rl78.md (movdi): New define_expand.
22945         * config/rl78/rl78.c (rl78_split_movdi): New function.
22947 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
22949         PR target/83862
22950         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
22951         no longer used.
22952         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
22953         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
22954         128-bit to produce an UNSPEC move to get the double word with the
22955         signbit and then a shift directly to do signbit.
22956         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
22957         implementation with a new version that just does either a direct
22958         move or a regular move.  Move memory interface to separate insns.
22959         Move insns so they are next to the expander.
22960         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
22961         with signbit move.  Split big and little endian case.
22962         (signbit<mode>2_dm_mem_le): Likewise.
22963         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
22964         (signbit<mode>2_dm2): Likewise.
22966 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22968         * config/rl78/rl78.md (anddi3): New define_expand.
22970 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22972         * config/rl78/rl78.md (umindi3): New define_expand.
22974 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22976         * config/rl78/rl78.md (smindi3): New define_expand.
22978 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22980         * config/rl78/rl78.md (smaxdi3): New define_expand.
22982 2018-01-22  Carl Love  <cel@us.ibm.com>
22984         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
22985         LVX_V1TI): Add macro expansion.
22986         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
22987         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
22988         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
22989         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
22990         Change check to determine if the instruction is a byte reversing
22991         entry.  Fix typo in comment.
22992         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
22993         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
22994         Add def_builtin calls for new builtins.
22995         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
22996         Add define_insn expansion.
22998 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23000         * config/rl78/rl78.md (umaxdi3): New define_expand.
23002 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23004         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
23005         for non-QImode registers.
23007 2018-01-22  Richard Biener  <rguenther@suse.de>
23009         PR tree-optimization/83963
23010         * graphite-scop-detection.c (scop_detection::get_sese): Delay
23011         including the loop exit block.
23012         (scop_detection::merge_sese): Likewise.
23013         (scop_detection::add_scop): Do it here instead.
23015 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23017         * doc/sourcebuild.texi (arm_softfloat): Document.
23019 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
23021         PR gcc/77734
23022         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
23023         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
23024         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
23026 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23027             David Edelsohn  <dje.gcc@gmail.com>
23029         PR target/83946
23030         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23031         Change "crset eq" to "crset 2".
23032         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23033         (*call_indirect_aix<mode>_nospec): Likewise.
23034         (*call_value_indirect_aix<mode>_nospec): Likewise.
23035         (*call_indirect_elfv2<mode>_nospec): Likewise.
23036         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
23037         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
23038         change assembly output from . to $.
23039         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23040         (indirect_jump<mode>_nospec): Change assembly output from . to $.
23041         (*tablejump<mode>_internal1_nospec): Likewise.
23043 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
23045         PR target/80870
23046         * config/sh/sh_optimize_sett_clrt.cc:
23047         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
23049 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
23051         PR tree-optimization/83940
23052         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
23053         offset_dt to vect_constant_def rather than vect_unknown_def_type.
23054         (vect_check_load_store_mask): Add a mask_dt_out parameter and
23055         use it to pass back the definition type.
23056         (vect_check_store_rhs): Likewise rhs_dt_out.
23057         (vect_build_gather_load_calls): Add a mask_dt argument and use
23058         it instead of a call to vect_is_simple_use.
23059         (vectorizable_store): Update calls to vect_check_load_store_mask
23060         and vect_check_store_rhs.  Use the dt returned by the latter instead
23061         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
23062         instead of calls to vect_is_simple_use.  Pass the scalar rather
23063         than the vector operand to vect_is_simple_use when handling
23064         second and subsequent copies of an rhs value.
23065         (vectorizable_load): Update calls to vect_check_load_store_mask
23066         and vect_build_gather_load_calls.  Use the cached mask_dt and
23067         gs_info.offset_dt instead of calls to vect_is_simple_use.
23069 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
23071         PR middle-end/83945
23072         * tree-emutls.c: Include gimplify.h.
23073         (lower_emutls_2): New function.
23074         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
23075         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
23076         it before further processing.
23078         PR target/83930
23079         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
23080         UINTVAL (trueop1) instead of INTVAL (op1).
23082 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
23084         PR debug/81570
23085         PR debug/83728
23086         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
23087         INCOMING_FRAME_SP_OFFSET if not defined.
23088         (scan_trace): Add ENTRY argument.  If true and
23089         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
23090         emit a note to adjust the CFA offset.
23091         (create_cfi_notes): Adjust scan_trace callers.
23092         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
23093         INCOMING_FRAME_SP_OFFSET in the CIE.
23094         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
23095         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
23096         Likewise.
23097         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
23098         * doc/tm.texi: Regenerated.
23100 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23102         PR rtl-optimization/83147
23103         * lra-constraints.c (remove_inheritance_pseudos): Use
23104         lra_substitute_pseudo_within_insn.
23106 2018-01-19  Tom de Vries  <tom@codesourcery.com>
23107             Cesar Philippidis  <cesar@codesourcery.com>
23109         PR target/83920
23110         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
23112 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
23114         PR target/83790
23115         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
23116         spaces for function labels.
23118 2018-01-19  Martin Liska  <mliska@suse.cz>
23120         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
23121         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
23122         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
23123         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
23124         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
23125         (PRED_CONST_RETURN): Change from 69 to 65.
23126         (PRED_NULL_RETURN): Change from 91 to 71.
23127         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
23128         (PRED_LOOP_GUARD): Change from 66 to 73.
23130 2018-01-19  Martin Liska  <mliska@suse.cz>
23132         * predict.c (predict_insn_def): Add new assert.
23133         (struct branch_predictor): Change type to signed integer.
23134         (test_prediction_value_range): Amend test to cover
23135         PROB_UNINITIALIZED.
23136         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
23137         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
23138         (PRED_LOOP_ITERATIONS_MAX): Likewise.
23139         (PRED_LOOP_IV_COMPARE): Likewise.
23140         * predict.h (PROB_UNINITIALIZED): Define new constant.
23142 2018-01-19  Martin Liska  <mliska@suse.cz>
23144         * predict.c (dump_prediction): Add new format for
23145         analyze_brprob.py script which is enabled with -details
23146         suboption.
23147         * profile-count.h (precise_p): New function.
23149 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
23151         PR tree-optimization/83922
23152         * tree-vect-loop.c (vect_verify_full_masking): Return false if
23153         there are no statements that need masking.
23154         (vect_active_double_reduction_p): New function.
23155         (vect_analyze_loop_operations): Use it when handling phis that
23156         are not in the loop header.
23158 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
23160         PR tree-optimization/83914
23161         * tree-vect-loop.c (vectorizable_induction): Don't convert
23162         init_expr or apply the peeling adjustment for inductions
23163         that are nested within the vectorized loop.
23165 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23167         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
23168         instead of NEG.
23170 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
23172         PR sanitizer/81715
23173         PR testsuite/83882
23174         * function.h (gimplify_parameters): Add gimple_seq * argument.
23175         * function.c: Include gimple.h and options.h.
23176         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
23177         for the added local temporaries if needed.
23178         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
23179         if there are any parameter cleanups, wrap whole body into a
23180         try/finally with the cleanups.
23182 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
23184         PR target/82964
23185         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
23186         Use GET_MODE_CLASS for scalar floating point.
23188 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
23190         PR ipa/82256
23191         patch by PaX Team
23192         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
23193         Fix call of call_cgraph_insertion_hooks.
23195 2018-01-18  Martin Sebor  <msebor@redhat.com>
23197         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
23199 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
23201         PR ipa/83619
23202         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
23203         frequencies.
23205 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
23207         PR other/70268
23208         * common.opt: (-ffile-prefix-map): New option.
23209         * opts.c (common_handle_option): Defer it.
23210         * opts-global.c (handle_common_deferred_options): Handle it.
23211         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
23212         * file-prefix-map.h: New file.
23213         (remap_debug_filename, add_debug_prefix_map): ...here.
23214         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
23215         * final.c (debug_prefix_map, add_debug_prefix_map
23216         remap_debug_filename): Move to...
23217         * file-prefix-map.c: New file.
23218         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
23219         generalize, get rid of alloca(), use strrchr() instead of strchr().
23220         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
23221         Implement in terms of add_prefix_map().
23222         (remap_macro_filename, remap_debug_filename): Implement in term of
23223         remap_filename().
23224         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
23225         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
23226         * dbxout.c: Include file-prefix-map.h.
23227         * varasm.c: Likewise.
23228         * vmsdbgout.c: Likewise.
23229         * xcoffout.c: Likewise.
23230         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
23231         * doc/cppopts.texi (-fmacro-prefix-map): Document.
23232         * doc/invoke.texi (-ffile-prefix-map): Document.
23233         (-fdebug-prefix-map): Update description.
23235 2018-01-18  Martin Liska  <mliska@suse.cz>
23237         * config/i386/i386.c (indirect_thunk_name): Document that also
23238         lfence is emitted.
23239         (output_indirect_thunk): Document why both instructions
23240         (pause and lfence) are generated.
23242 2018-01-18  Richard Biener  <rguenther@suse.de>
23244         PR tree-optimization/83887
23245         * graphite-scop-detection.c
23246         (scop_detection::get_nearest_dom_with_single_entry): Remove.
23247         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
23248         (scop_detection::merge_sese): Re-implement with a flood-fill
23249         algorithm that properly finds a SESE region if it exists.
23251 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
23253         PR c/61240
23254         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
23255         pointer_diff optimizations use view_convert instead of convert.
23257 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23259         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23260         Generate different code for -mno-speculate-indirect-jumps.
23261         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23262         (*call_indirect_aix<mode>): Disable for
23263         -mno-speculate-indirect-jumps.
23264         (*call_indirect_aix<mode>_nospec): New define_insn.
23265         (*call_value_indirect_aix<mode>): Disable for
23266         -mno-speculate-indirect-jumps.
23267         (*call_value_indirect_aix<mode>_nospec): New define_insn.
23268         (*sibcall_nonlocal_sysv<mode>): Generate different code for
23269         -mno-speculate-indirect-jumps.
23270         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23272 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
23274         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
23275         long double type, set the flags for noting the default long double
23276         type, even if we don't pass or return a long double type.
23278 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
23280         PR ipa/83051
23281         * ipa-inline.c (flatten_function): Do not overwrite final inlining
23282         failure.
23284 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
23286         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
23287         support for merge[hl].
23288         (fold_mergehl_helper): New helper function.
23289         (tree-vector-builder.h): New #include for tree_vector_builder usage.
23290         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
23291         (altivec_vmrglw_direct): Add xxmrglw insn.
23293 2018-01-17  Andrew Waterman  <andrew@sifive.com>
23295         * config/riscv/riscv.c (riscv_conditional_register_usage): If
23296         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
23298 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
23300         PR lto/83121
23301         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
23302         call the lto_location_cache before reading the
23303         DECL_SOURCE_LOCATION of the types.
23305 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
23306             Richard Sandiford  <richard.sandiford@linaro.org>
23308         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
23309         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
23310         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
23311         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
23312         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
23313         Add declaration.
23314         * config/aarch64/constraints.md (aarch64_movti_operand):
23315         Limit immediates.
23316         * config/aarch64/predicates.md (Uti): Add new constraint.
23318 2018-01-17  Carl Love  <cel@us.ibm.com>
23320         * config/rs6000/vsx.md (define_expand xl_len_r,
23321         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
23322         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
23323         lxvll.
23324         (define_expand, define_insn): Move the shift left from  the
23325         define_insn to the define_expand for lxvl and stxvl instructions.
23326         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
23327         and XL_LEN_R definitions to PURE.
23329 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
23331         * config/i386/i386.c (indirect_thunk_name): Declare regno
23332         as unsigned int.  Compare regno with INVALID_REGNUM.
23333         (output_indirect_thunk): Ditto.
23334         (output_indirect_thunk_function): Ditto.
23335         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
23336         in the call to output_indirect_thunk_function.
23338 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
23340         PR middle-end/83884
23341         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
23342         rather than the size of inner_type to determine the stack slot size
23343         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
23345 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
23347         PR target/83546
23348         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
23349         to PTA_SILVERMONT.
23351 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
23353         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
23354         endian Linux systems to optionally enable multilibs for selecting
23355         the long double type if the user configured an explicit type.
23356         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
23357         have no long double multilibs if not defined.
23358         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
23359         warn if the user used -mabi={ieee,ibm}longdouble and we built
23360         multilibs for long double.
23361         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
23362         appropriate multilib option.
23363         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
23364         multilib options.
23365         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
23366         for building long double multilibs.
23367         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
23369 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
23371         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
23372         copies.
23374         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
23375         64 bits.
23376         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
23377         128 bits.
23379         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
23380         variables.
23382         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
23383         return value.
23385 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
23387         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
23388         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
23390 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23392         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
23393         different rtl trees depending on TARGET_64BIT.
23394         (rs6000_gen_lvx): Likewise.
23396 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
23398         * config/visium/visium.md (nop): Tweak comment.
23399         (hazard_nop): Likewise.
23401 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23403         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
23404         -mspeculate-indirect-jumps.
23405         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
23406         for -mno-speculate-indirect-jumps.
23407         (*call_indirect_elfv2<mode>_nospec): New define_insn.
23408         (*call_value_indirect_elfv2<mode>): Disable for
23409         -mno-speculate-indirect-jumps.
23410         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
23411         (indirect_jump): Emit different RTL for
23412         -mno-speculate-indirect-jumps.
23413         (*indirect_jump<mode>): Disable for
23414         -mno-speculate-indirect-jumps.
23415         (*indirect_jump<mode>_nospec): New define_insn.
23416         (tablejump): Emit different RTL for
23417         -mno-speculate-indirect-jumps.
23418         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
23419         (tablejumpsi_nospec): New define_expand.
23420         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
23421         (tablejumpdi_nospec): New define_expand.
23422         (*tablejump<mode>_internal1): Disable for
23423         -mno-speculate-indirect-jumps.
23424         (*tablejump<mode>_internal1_nospec): New define_insn.
23425         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
23426         option.
23428 2018-01-16  Artyom Skrobov tyomitch@gmail.com
23430         * caller-save.c (insert_save): Drop unnecessary parameter.  All
23431         callers updated.
23433 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
23434             Richard Biener  <rguenth@suse.de>
23436         PR libgomp/83590
23437         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
23438         return early, inline manually is_gimple_sizepos.  Make sure if we
23439         call gimplify_expr we don't end up with a gimple constant.
23440         * tree.c (variably_modified_type_p): Don't return true for
23441         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
23442         * gimplify.h (is_gimple_sizepos): Remove.
23444 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23446         PR tree-optimization/83857
23447         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
23448         vectorizable_live_operation for pure SLP statements.
23449         (vectorizable_live_operation): Handle PHIs.
23451 2018-01-16  Richard Biener  <rguenther@suse.de>
23453         PR tree-optimization/83867
23454         * tree-vect-stmts.c (vect_transform_stmt): Precompute
23455         nested_in_vect_loop_p since the scalar stmt may get invalidated.
23457 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
23459         PR c/83844
23460         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
23461         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
23462         If off is not INTEGER_CST, issue a may not be aligned warning
23463         rather than isn't aligned.  Use isn%'t rather than isn't.
23464         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
23465         into MULT_EXPR.
23466         <case MULT_EXPR>: Improve the case when bottom and one of the
23467         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
23468         operand, in that case check if the other operand is multiple of
23469         bottom divided by the INTEGER_CST operand.
23471 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23473         PR target/83858
23474         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
23475         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
23476         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
23477         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
23478         * config/pa/pa.c (pa_function_arg_advance): Likewise.
23479         (pa_function_arg, pa_arg_partial_bytes): Likewise.
23480         (pa_function_arg_size): New function.
23482 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23484         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
23485         in a separate statement.
23487 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
23489         PR tree-optimization/83847
23490         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
23491         group gathers and scatters.
23493 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
23495         PR rtl-optimization/86620
23496         * params.def (max-sched-ready-insns): Bump minimum value to 1.
23498         PR rtl-optimization/83213
23499         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
23500         to last if both are JUMP_INSNs.
23502         PR tree-optimization/83843
23503         * gimple-ssa-store-merging.c
23504         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
23505         store_immediate_info for bswap/nop orig_stores.
23507 2018-01-15  Andrew Waterman  <andrew@sifive.com>
23509         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
23510         !TARGET_MUL.
23511         <UDIV>: Increase cost if !TARGET_DIV.
23513 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
23515         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
23516         (define_attr "cr_logical_3op"): New.
23517         (cceq_ior_compare): Adjust.
23518         (cceq_ior_compare_complement): Adjust.
23519         (*cceq_rev_compare): Adjust.
23520         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
23521         (is_cracked_insn): Adjust.
23522         (insn_must_be_first_in_group): Adjust.
23523         * config/rs6000/40x.md: Adjust.
23524         * config/rs6000/440.md: Adjust.
23525         * config/rs6000/476.md: Adjust.
23526         * config/rs6000/601.md: Adjust.
23527         * config/rs6000/603.md: Adjust.
23528         * config/rs6000/6xx.md: Adjust.
23529         * config/rs6000/7450.md: Adjust.
23530         * config/rs6000/7xx.md: Adjust.
23531         * config/rs6000/8540.md: Adjust.
23532         * config/rs6000/cell.md: Adjust.
23533         * config/rs6000/e300c2c3.md: Adjust.
23534         * config/rs6000/e500mc.md: Adjust.
23535         * config/rs6000/e500mc64.md: Adjust.
23536         * config/rs6000/e5500.md: Adjust.
23537         * config/rs6000/e6500.md: Adjust.
23538         * config/rs6000/mpc.md: Adjust.
23539         * config/rs6000/power4.md: Adjust.
23540         * config/rs6000/power5.md: Adjust.
23541         * config/rs6000/power6.md: Adjust.
23542         * config/rs6000/power7.md: Adjust.
23543         * config/rs6000/power8.md: Adjust.
23544         * config/rs6000/power9.md: Adjust.
23545         * config/rs6000/rs64.md: Adjust.
23546         * config/rs6000/titan.md: Adjust.
23548 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23550         * config/i386/predicates.md (indirect_branch_operand): Rewrite
23551         ix86_indirect_branch_register logic.
23553 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23555         * config/i386/constraints.md (Bs): Update
23556         ix86_indirect_branch_register check.  Don't check
23557         ix86_indirect_branch_register with GOT_memory_operand.
23558         (Bw): Likewise.
23559         * config/i386/predicates.md (GOT_memory_operand): Don't check
23560         ix86_indirect_branch_register here.
23561         (GOT32_symbol_operand): Likewise.
23563 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23565         * config/i386/predicates.md (constant_call_address_operand):
23566         Rewrite ix86_indirect_branch_register logic.
23567         (sibcall_insn_operand): Likewise.
23569 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23571         * config/i386/constraints.md (Bs): Replace
23572         ix86_indirect_branch_thunk_register with
23573         ix86_indirect_branch_register.
23574         (Bw): Likewise.
23575         * config/i386/i386.md (indirect_jump): Likewise.
23576         (tablejump): Likewise.
23577         (*sibcall_memory): Likewise.
23578         (*sibcall_value_memory): Likewise.
23579         Peepholes of indirect call and jump via memory: Likewise.
23580         * config/i386/i386.opt: Likewise.
23581         * config/i386/predicates.md (indirect_branch_operand): Likewise.
23582         (GOT_memory_operand): Likewise.
23583         (call_insn_operand): Likewise.
23584         (sibcall_insn_operand): Likewise.
23585         (GOT32_symbol_operand): Likewise.
23587 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
23589         PR middle-end/83837
23590         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
23591         type rather than type addr's type points to.
23592         (expand_omp_atomic_mutex): Likewise.
23593         (expand_omp_atomic): Likewise.
23595 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
23597         PR target/83839
23598         * config/i386/i386.c (output_indirect_thunk_function): Use
23599         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
23600         for  __x86_return_thunk.
23602 2018-01-15  Richard Biener  <rguenther@suse.de>
23604         PR middle-end/83850
23605         * expmed.c (extract_bit_field_1): Fix typo.
23607 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23609         PR target/83687
23610         * config/arm/iterators.md (VF): New mode iterator.
23611         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
23612         Remove integer-related logic from pattern.
23613         (neon_vabd<mode>_3): Likewise.
23615 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
23617         PR middle-end/82694
23618         * common.opt (fstrict-overflow): No longer an alias.
23619         (fwrapv-pointer): New option.
23620         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
23621         also for pointer types based on flag_wrapv_pointer.
23622         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
23623         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
23624         opts->x_flag_wrapv got set.
23625         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
23626         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
23627         POINTER_TYPE_OVERFLOW_UNDEFINED.
23628         * match.pd: Likewise in address comparison pattern.
23629         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
23631 2018-01-15  Richard Biener  <rguenther@suse.de>
23633         PR lto/83804
23634         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
23635         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
23636         Reset type names to their identifier if their TYPE_DECL doesn't
23637         have linkage (and thus is used for ODR and devirt).
23638         (save_debug_info_for_decl): Remove.
23639         (save_debug_info_for_type): Likewise.
23640         (add_tree_to_fld_list): Adjust.
23641         * tree-pretty-print.c (dump_generic_node): Make dumping of
23642         type names more robust.
23644 2018-01-15  Richard Biener  <rguenther@suse.de>
23646         * BASE-VER: Bump to 8.0.1.
23648 2018-01-14  Martin Sebor  <msebor@redhat.com>
23650         PR other/83508
23651         * builtins.c (check_access): Avoid warning when the no-warning bit
23652         is set.
23654 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
23656         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
23657         * ira-color (allocno_hard_regs_compare): Likewise.
23659 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
23661         PR target/83013
23662         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
23663         Use .pushsection/.popsection.
23665 2018-01-14  Martin Sebor  <msebor@redhat.com>
23667         PR c++/81327
23668         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
23670 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
23672         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
23673         entry from extra_headers.
23674         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
23675         extra_headers, make the list bitwise identical to the i?86-*-* one.
23677 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23679         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
23680         -mcmodel=large with -mindirect-branch=thunk,
23681         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
23682         -mfunction-return=thunk-extern.
23683         * doc/invoke.texi: Document -mcmodel=large is incompatible with
23684         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
23685         -mfunction-return=thunk and -mfunction-return=thunk-extern.
23687 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23689         * config/i386/i386.c (print_reg): Print the name of the full
23690         integer register without '%'.
23691         (ix86_print_operand): Handle 'V'.
23692         * doc/extend.texi: Document 'V' modifier.
23694 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23696         * config/i386/constraints.md (Bs): Disallow memory operand for
23697         -mindirect-branch-register.
23698         (Bw): Likewise.
23699         * config/i386/predicates.md (indirect_branch_operand): Likewise.
23700         (GOT_memory_operand): Likewise.
23701         (call_insn_operand): Likewise.
23702         (sibcall_insn_operand): Likewise.
23703         (GOT32_symbol_operand): Likewise.
23704         * config/i386/i386.md (indirect_jump): Call convert_memory_address
23705         for -mindirect-branch-register.
23706         (tablejump): Likewise.
23707         (*sibcall_memory): Likewise.
23708         (*sibcall_value_memory): Likewise.
23709         Disallow peepholes of indirect call and jump via memory for
23710         -mindirect-branch-register.
23711         (*call_pop): Replace m with Bw.
23712         (*call_value_pop): Likewise.
23713         (*sibcall_pop_memory): Replace m with Bs.
23714         * config/i386/i386.opt (mindirect-branch-register): New option.
23715         * doc/invoke.texi: Document -mindirect-branch-register option.
23717 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23719         * config/i386/i386-protos.h (ix86_output_function_return): New.
23720         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
23721         set function_return_type.
23722         (indirect_thunk_name): Add ret_p to indicate thunk for function
23723         return.
23724         (output_indirect_thunk_function): Pass false to
23725         indirect_thunk_name.
23726         (ix86_output_indirect_branch_via_reg): Likewise.
23727         (ix86_output_indirect_branch_via_push): Likewise.
23728         (output_indirect_thunk_function): Create alias for function
23729         return thunk if regno < 0.
23730         (ix86_output_function_return): New function.
23731         (ix86_handle_fndecl_attribute): Handle function_return.
23732         (ix86_attribute_table): Add function_return.
23733         * config/i386/i386.h (machine_function): Add
23734         function_return_type.
23735         * config/i386/i386.md (simple_return_internal): Use
23736         ix86_output_function_return.
23737         (simple_return_internal_long): Likewise.
23738         * config/i386/i386.opt (mfunction-return=): New option.
23739         (indirect_branch): Mention -mfunction-return=.
23740         * doc/extend.texi: Document function_return function attribute.
23741         * doc/invoke.texi: Document -mfunction-return= option.
23743 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23745         * config/i386/i386-opts.h (indirect_branch): New.
23746         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
23747         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
23748         with local indirect jump when converting indirect call and jump.
23749         (ix86_set_indirect_branch_type): New.
23750         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
23751         (indirectlabelno): New.
23752         (indirect_thunk_needed): Likewise.
23753         (indirect_thunk_bnd_needed): Likewise.
23754         (indirect_thunks_used): Likewise.
23755         (indirect_thunks_bnd_used): Likewise.
23756         (INDIRECT_LABEL): Likewise.
23757         (indirect_thunk_name): Likewise.
23758         (output_indirect_thunk): Likewise.
23759         (output_indirect_thunk_function): Likewise.
23760         (ix86_output_indirect_branch_via_reg): Likewise.
23761         (ix86_output_indirect_branch_via_push): Likewise.
23762         (ix86_output_indirect_branch): Likewise.
23763         (ix86_output_indirect_jmp): Likewise.
23764         (ix86_code_end): Call output_indirect_thunk_function if needed.
23765         (ix86_output_call_insn): Call ix86_output_indirect_branch if
23766         needed.
23767         (ix86_handle_fndecl_attribute): Handle indirect_branch.
23768         (ix86_attribute_table): Add indirect_branch.
23769         * config/i386/i386.h (machine_function): Add indirect_branch_type
23770         and has_local_indirect_jump.
23771         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
23772         to true.
23773         (tablejump): Likewise.
23774         (*indirect_jump): Use ix86_output_indirect_jmp.
23775         (*tablejump_1): Likewise.
23776         (simple_return_indirect_internal): Likewise.
23777         * config/i386/i386.opt (mindirect-branch=): New option.
23778         (indirect_branch): New.
23779         (keep): Likewise.
23780         (thunk): Likewise.
23781         (thunk-inline): Likewise.
23782         (thunk-extern): Likewise.
23783         * doc/extend.texi: Document indirect_branch function attribute.
23784         * doc/invoke.texi: Document -mindirect-branch= option.
23786 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
23788         PR ipa/83051
23789         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
23791 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
23793         * ipa-inline.c (want_inline_small_function_p): Return false if
23794         inlining has already failed with CIF_FINAL_ERROR.
23795         (update_caller_keys): Call want_inline_small_function_p before
23796         can_inline_edge_p.
23797         (update_callee_keys): Likewise.
23799 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23801         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
23802         New function.
23803         (rs6000_quadword_masked_address_p): Likewise.
23804         (quad_aligned_load_p): Likewise.
23805         (quad_aligned_store_p): Likewise.
23806         (const_load_sequence_p): Add comment to describe the outer-most loop.
23807         (mimic_memory_attributes_and_flags): New function.
23808         (rs6000_gen_stvx): Likewise.
23809         (replace_swapped_aligned_store): Likewise.
23810         (rs6000_gen_lvx): Likewise.
23811         (replace_swapped_aligned_load): Likewise.
23812         (replace_swapped_load_constant): Capitalize argument name in
23813         comment describing this function.
23814         (rs6000_analyze_swaps): Add a third pass to search for vector loads
23815         and stores that access quad-word aligned addresses and replace
23816         with stvx or lvx instructions when appropriate.
23817         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
23818         New function prototype.
23819         (rs6000_quadword_masked_address_p): Likewise.
23820         (rs6000_gen_lvx): Likewise.
23821         (rs6000_gen_stvx): Likewise.
23822         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
23823         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
23824         when memory address is aligned.
23825         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
23826         this split to select lvx instruction when memory address is aligned.
23827         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
23828         instruction when memory address is aligned.
23829         (*vsx_le_perm_load_v16qi): Likewise.
23830         (four unnamed splitters): Modify to select the stvx instruction
23831         when memory is aligned.
23833 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
23835         * predict.c (determine_unlikely_bbs): Handle correctly BBs
23836         which appears in the queue multiple times.
23838 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23839             Alan Hayward  <alan.hayward@arm.com>
23840             David Sherwood  <david.sherwood@arm.com>
23842         * tree-vectorizer.h (vec_lower_bound): New structure.
23843         (_loop_vec_info): Add check_nonzero and lower_bounds.
23844         (LOOP_VINFO_CHECK_NONZERO): New macro.
23845         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
23846         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
23847         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
23848         fields.  Make seg_len the distance travelled, not including the
23849         access size.
23850         (dr_direction_indicator): Declare.
23851         (dr_zero_step_indicator): Likewise.
23852         (dr_known_forward_stride_p): Likewise.
23853         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
23854         tree-ssanames.h.
23855         (runtime_alias_check_p): Allow runtime alias checks with
23856         variable strides.
23857         (operator ==): Compare access_size and align.
23858         (prune_runtime_alias_test_list): Rework for new distinction between
23859         the access_size and seg_len.
23860         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
23861         segment lengths.
23862         (get_segment_min_max): New function.
23863         (create_intersect_range_checks): Use it.
23864         (dr_step_indicator): New function.
23865         (dr_direction_indicator): Likewise.
23866         (dr_zero_step_indicator): Likewise.
23867         (dr_known_forward_stride_p): Likewise.
23868         * tree-loop-distribution.c (data_ref_segment_size): Return
23869         DR_STEP * (niters - 1).
23870         (compute_alias_check_pairs): Update call to the dr_with_seg_len
23871         constructor.
23872         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
23873         (vect_preserves_scalar_order_p): New function, split out from...
23874         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
23875         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
23876         (vect_vfa_access_size): New function.
23877         (vect_vfa_align): Likewise.
23878         (vect_compile_time_alias): Take access_size_a and access_b arguments.
23879         (dump_lower_bound): New function.
23880         (vect_check_lower_bound): Likewise.
23881         (vect_small_gap_p): Likewise.
23882         (vectorizable_with_step_bound_p): Likewise.
23883         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
23884         depencies if the vectorization factor is 1.  Convert the checks
23885         for nonzero steps into checks on the bounds of DR_STEP.  Try using
23886         a bunds check for variable steps if the minimum required step is
23887         relatively small. Update calls to the dr_with_seg_len
23888         constructor and to vect_compile_time_alias.
23889         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
23890         function.
23891         (vect_loop_versioning): Call it.
23892         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
23893         when retrying.
23894         (vect_estimate_min_profitable_iters): Account for any bounds checks.
23896 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23897             Alan Hayward  <alan.hayward@arm.com>
23898             David Sherwood  <david.sherwood@arm.com>
23900         * doc/sourcebuild.texi (vect_scatter_store): Document.
23901         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
23902         optabs.
23903         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
23904         Document.
23905         * genopinit.c (main): Add supports_vec_scatter_store and
23906         supports_vec_scatter_store_cached to target_optabs.
23907         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
23908         IFN_MASK_SCATTER_STORE.
23909         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
23910         functions.
23911         * internal-fn.h (internal_store_fn_p): Declare.
23912         (internal_fn_stored_value_index): Likewise.
23913         * internal-fn.c (scatter_store_direct): New macro.
23914         (expand_scatter_store_optab_fn): New function.
23915         (direct_scatter_store_optab_supported_p): New macro.
23916         (internal_store_fn_p): New function.
23917         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
23918         IFN_MASK_SCATTER_STORE.
23919         (internal_fn_mask_index): Likewise.
23920         (internal_fn_stored_value_index): New function.
23921         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
23922         for scatter stores.
23923         * optabs-query.h (supports_vec_scatter_store_p): Declare.
23924         * optabs-query.c (supports_vec_scatter_store_p): New function.
23925         * tree-vectorizer.h (vect_get_store_rhs): Declare.
23926         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
23927         true for scatter stores.
23928         (vect_gather_scatter_fn_p): Handle scatter stores too.
23929         (vect_check_gather_scatter): Consider using scatter stores if
23930         supports_vec_scatter_store_p.
23931         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
23932         scatter stores too.
23933         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23934         internal_fn_stored_value_index.
23935         (check_load_store_masking): Handle scatter stores too.
23936         (vect_get_store_rhs): Make public.
23937         (vectorizable_call): Use internal_store_fn_p.
23938         (vectorizable_store): Handle scatter store internal functions.
23939         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
23940         when deciding whether the end of the group has been reached.
23941         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
23942         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
23943         (mask_scatter_store<mode>): New insns.
23945 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23946             Alan Hayward  <alan.hayward@arm.com>
23947             David Sherwood  <david.sherwood@arm.com>
23949         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
23950         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
23951         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
23952         function.
23953         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
23954         Use vect_truncate_gather_scatter_offset if we can't treat the
23955         operation as a normal gather load or scatter store.
23956         (get_group_load_store_type): Take the gather_scatter_info
23957         as argument.  Try using a gather load or scatter store for
23958         single-element groups.
23959         (get_load_store_type): Update calls to get_group_load_store_type
23960         and vect_use_strided_gather_scatters_p.
23962 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23963             Alan Hayward  <alan.hayward@arm.com>
23964             David Sherwood  <david.sherwood@arm.com>
23966         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
23967         optional tree argument.
23968         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
23969         null target hooks.
23970         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
23971         but continue to use the current value as a fallback.
23972         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
23973         to compare the updates.
23974         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
23975         (get_load_store_type): Use it when handling a strided access.
23976         (vect_get_strided_load_store_ops): New function.
23977         (vect_get_data_ptr_increment): Likewise.
23978         (vectorizable_load): Handle strided gather loads.  Always pass
23979         a step to vect_create_data_ref_ptr and bump_vector_ptr.
23981 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23982             Alan Hayward  <alan.hayward@arm.com>
23983             David Sherwood  <david.sherwood@arm.com>
23985         * doc/md.texi (gather_load@var{m}): Document.
23986         (mask_gather_load@var{m}): Likewise.
23987         * genopinit.c (main): Add supports_vec_gather_load and
23988         supports_vec_gather_load_cached to target_optabs.
23989         * optabs-tree.c (init_tree_optimization_optabs): Use
23990         ggc_cleared_alloc to allocate target_optabs.
23991         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
23992         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
23993         functions.
23994         * internal-fn.h (internal_load_fn_p): Declare.
23995         (internal_gather_scatter_fn_p): Likewise.
23996         (internal_fn_mask_index): Likewise.
23997         (internal_gather_scatter_fn_supported_p): Likewise.
23998         * internal-fn.c (gather_load_direct): New macro.
23999         (expand_gather_load_optab_fn): New function.
24000         (direct_gather_load_optab_supported_p): New macro.
24001         (direct_internal_fn_optab): New function.
24002         (internal_load_fn_p): Likewise.
24003         (internal_gather_scatter_fn_p): Likewise.
24004         (internal_fn_mask_index): Likewise.
24005         (internal_gather_scatter_fn_supported_p): Likewise.
24006         * optabs-query.c (supports_at_least_one_mode_p): New function.
24007         (supports_vec_gather_load_p): Likewise.
24008         * optabs-query.h (supports_vec_gather_load_p): Declare.
24009         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
24010         and memory_type field.
24011         (NUM_PATTERNS): Bump to 15.
24012         * tree-vect-data-refs.c: Include internal-fn.h.
24013         (vect_gather_scatter_fn_p): New function.
24014         (vect_describe_gather_scatter_call): Likewise.
24015         (vect_check_gather_scatter): Try using internal functions for
24016         gather loads.  Recognize existing calls to a gather load function.
24017         (vect_analyze_data_refs): Consider using gather loads if
24018         supports_vec_gather_load_p.
24019         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
24020         (vect_get_gather_scatter_offset_type): Likewise.
24021         (vect_convert_mask_for_vectype): Likewise.
24022         (vect_add_conversion_to_patterm): Likewise.
24023         (vect_try_gather_scatter_pattern): Likewise.
24024         (vect_recog_gather_scatter_pattern): New pattern recognizer.
24025         (vect_vect_recog_func_ptrs): Add it.
24026         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24027         internal_fn_mask_index and internal_gather_scatter_fn_p.
24028         (check_load_store_masking): Take the gather_scatter_info as an
24029         argument and handle gather loads.
24030         (vect_get_gather_scatter_ops): New function.
24031         (vectorizable_call): Check internal_load_fn_p.
24032         (vectorizable_load): Likewise.  Handle gather load internal
24033         functions.
24034         (vectorizable_store): Update call to check_load_store_masking.
24035         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
24036         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
24037         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
24038         (aarch64_gather_scale_operand_d): New predicates.
24039         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
24040         (mask_gather_load<mode>): New insns.
24042 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24043             Alan Hayward  <alan.hayward@arm.com>
24044             David Sherwood  <david.sherwood@arm.com>
24046         * optabs.def (fold_left_plus_optab): New optab.
24047         * doc/md.texi (fold_left_plus_@var{m}): Document.
24048         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
24049         * internal-fn.c (fold_left_direct): Define.
24050         (expand_fold_left_optab_fn): Likewise.
24051         (direct_fold_left_optab_supported_p): Likewise.
24052         * fold-const-call.c (fold_const_fold_left): New function.
24053         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
24054         * tree-parloops.c (valid_reduction_p): New function.
24055         (gather_scalar_reductions): Use it.
24056         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
24057         (vect_finish_replace_stmt): Declare.
24058         * tree-vect-loop.c (fold_left_reduction_fn): New function.
24059         (needs_fold_left_reduction_p): New function, split out from...
24060         (vect_is_simple_reduction): ...here.  Accept reductions that
24061         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
24062         (vect_force_simple_reduction): Also store the reduction type in
24063         the assignment's STMT_VINFO_REDUC_TYPE.
24064         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
24065         (merge_with_identity): New function.
24066         (vect_expand_fold_left): Likewise.
24067         (vectorize_fold_left_reduction): Likewise.
24068         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
24069         scalar phi in place for it.  Check for target support and reject
24070         cases that would reassociate the operation.  Defer the transform
24071         phase to vectorize_fold_left_reduction.
24072         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
24073         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
24074         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
24076 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24078         * tree-if-conv.c (predicate_mem_writes): Remove redundant
24079         call to ifc_temp_var.
24081 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24082             Alan Hayward  <alan.hayward@arm.com>
24083             David Sherwood  <david.sherwood@arm.com>
24085         * target.def (legitimize_address_displacement): Take the original
24086         offset as a poly_int.
24087         * targhooks.h (default_legitimize_address_displacement): Update
24088         accordingly.
24089         * targhooks.c (default_legitimize_address_displacement): Likewise.
24090         * doc/tm.texi: Regenerate.
24091         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
24092         as an argument, moving assert of ad->disp == ad->disp_term to...
24093         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
24094         Try calling targetm.legitimize_address_displacement before expanding
24095         the address rather than afterwards, and adjust for the new interface.
24096         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
24097         Match the new hook interface.  Handle SVE addresses.
24098         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
24099         new hook interface.
24101 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24103         * Makefile.in (OBJS): Add early-remat.o.
24104         * target.def (select_early_remat_modes): New hook.
24105         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
24106         * doc/tm.texi: Regenerate.
24107         * targhooks.h (default_select_early_remat_modes): Declare.
24108         * targhooks.c (default_select_early_remat_modes): New function.
24109         * timevar.def (TV_EARLY_REMAT): New timevar.
24110         * passes.def (pass_early_remat): New pass.
24111         * tree-pass.h (make_pass_early_remat): Declare.
24112         * early-remat.c: New file.
24113         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
24114         function.
24115         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
24117 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24118             Alan Hayward  <alan.hayward@arm.com>
24119             David Sherwood  <david.sherwood@arm.com>
24121         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
24122         vfm1 with a bound_epilog parameter.
24123         (vect_do_peeling): Update calls accordingly, and move the prologue
24124         call earlier in the function.  Treat the base bound_epilog as 0 for
24125         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
24126         this base when peeling for gaps.
24127         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
24128         with fully-masked loops.
24129         (vect_estimate_min_profitable_iters): Handle the single peeled
24130         iteration in that case.
24132 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24133             Alan Hayward  <alan.hayward@arm.com>
24134             David Sherwood  <david.sherwood@arm.com>
24136         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
24137         single-element interleaving even if the size is not a power of 2.
24138         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
24139         accesses for single-element interleaving if the group size is
24140         not a power of 2.
24142 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24143             Alan Hayward  <alan.hayward@arm.com>
24144             David Sherwood  <david.sherwood@arm.com>
24146         * doc/md.texi (fold_extract_last_@var{m}): Document.
24147         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
24148         * optabs.def (fold_extract_last_optab): New optab.
24149         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
24150         * internal-fn.c (fold_extract_direct): New macro.
24151         (expand_fold_extract_optab_fn): Likewise.
24152         (direct_fold_extract_optab_supported_p): Likewise.
24153         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
24154         * tree-vect-loop.c (vect_model_reduction_cost): Handle
24155         EXTRACT_LAST_REDUCTION.
24156         (get_initial_def_for_reduction): Do not create an initial vector
24157         for EXTRACT_LAST_REDUCTION reductions.
24158         (vectorizable_reduction): Leave the scalar phi in place for
24159         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
24160         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
24161         epilogue code for EXTRACT_LAST_REDUCTION and defer the
24162         transform phase to vectorizable_condition.
24163         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
24164         split out from...
24165         (vect_finish_stmt_generation): ...here.
24166         (vect_finish_replace_stmt): New function.
24167         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
24168         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
24169         pattern.
24170         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
24172 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24173             Alan Hayward  <alan.hayward@arm.com>
24174             David Sherwood  <david.sherwood@arm.com>
24176         * doc/md.texi (extract_last_@var{m}): Document.
24177         * optabs.def (extract_last_optab): New optab.
24178         * internal-fn.def (EXTRACT_LAST): New internal function.
24179         * internal-fn.c (cond_unary_direct): New macro.
24180         (expand_cond_unary_optab_fn): Likewise.
24181         (direct_cond_unary_optab_supported_p): Likewise.
24182         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
24183         loops using EXTRACT_LAST.
24184         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
24185         (extract_last_<mode>): ...this optab.
24186         (vec_extract<mode><Vel>): Update accordingly.
24188 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24189             Alan Hayward  <alan.hayward@arm.com>
24190             David Sherwood  <david.sherwood@arm.com>
24192         * target.def (empty_mask_is_expensive): New hook.
24193         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
24194         * doc/tm.texi: Regenerate.
24195         * targhooks.h (default_empty_mask_is_expensive): Declare.
24196         * targhooks.c (default_empty_mask_is_expensive): New function.
24197         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
24198         if the target says that empty masks are expensive.
24199         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
24200         New function.
24201         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
24203 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24204             Alan Hayward  <alan.hayward@arm.com>
24205             David Sherwood  <david.sherwood@arm.com>
24207         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
24208         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
24209         (vect_use_loop_mask_for_alignment_p): New function.
24210         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
24211         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
24212         niters_skip argument.  Make sure that the first niters_skip elements
24213         of the first iteration are inactive.
24214         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
24215         Update call to vect_set_loop_masks_directly.
24216         (get_misalign_in_elems): New function, split out from...
24217         (vect_gen_prolog_loop_niters): ...here.
24218         (vect_update_init_of_dr): Take a code argument that specifies whether
24219         the adjustment should be added or subtracted.
24220         (vect_update_init_of_drs): Likewise.
24221         (vect_prepare_for_masked_peels): New function.
24222         (vect_do_peeling): Skip prologue peeling if we're using a mask
24223         instead.  Update call to vect_update_inits_of_drs.
24224         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24225         mask_skip_niters.
24226         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
24227         alignment.  Do not include the number of peeled iterations in
24228         the minimum threshold in that case.
24229         (vectorizable_induction): Adjust the start value down by
24230         LOOP_VINFO_MASK_SKIP_NITERS iterations.
24231         (vect_transform_loop): Call vect_prepare_for_masked_peels.
24232         Take the number of skipped iterations into account when calculating
24233         the loop bounds.
24234         * tree-vect-stmts.c (vect_gen_while_not): New function.
24236 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24237             Alan Hayward  <alan.hayward@arm.com>
24238             David Sherwood  <david.sherwood@arm.com>
24240         * doc/sourcebuild.texi (vect_fully_masked): Document.
24241         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
24242         default value to 0.
24243         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
24244         split out from...
24245         (vect_analyze_loop_2): ...here. Don't check the vectorization
24246         factor against the number of loop iterations if the loop is
24247         fully-masked.
24249 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24250             Alan Hayward  <alan.hayward@arm.com>
24251             David Sherwood  <david.sherwood@arm.com>
24253         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
24254         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
24255         (dump_groups): Update accordingly.
24256         (iv_use::mem_type): New member variable.
24257         (address_p): New function.
24258         (record_use): Add a mem_type argument and initialize the new
24259         mem_type field.
24260         (record_group_use): Add a mem_type argument.  Use address_p.
24261         Remove obsolete null checks of base_object.  Update call to record_use.
24262         (find_interesting_uses_op): Update call to record_group_use.
24263         (find_interesting_uses_cond): Likewise.
24264         (find_interesting_uses_address): Likewise.
24265         (get_mem_type_for_internal_fn): New function.
24266         (find_address_like_use): Likewise.
24267         (find_interesting_uses_stmt): Try find_address_like_use before
24268         calling find_interesting_uses_op.
24269         (addr_offset_valid_p): Use the iv mem_type field as the type
24270         of the addressed memory.
24271         (add_autoinc_candidates): Likewise.
24272         (get_address_cost): Likewise.
24273         (split_small_address_groups_p): Use address_p.
24274         (split_address_groups): Likewise.
24275         (add_iv_candidate_for_use): Likewise.
24276         (autoinc_possible_for_pair): Likewise.
24277         (rewrite_groups): Likewise.
24278         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
24279         (determine_group_iv_cost): Update after split of USE_ADDRESS.
24280         (get_alias_ptr_type_for_ptr_address): New function.
24281         (rewrite_use_address): Rewrite address uses in calls that were
24282         identified by find_address_like_use.
24284 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24285             Alan Hayward  <alan.hayward@arm.com>
24286             David Sherwood  <david.sherwood@arm.com>
24288         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
24289         TARGET_MEM_REFs.
24290         * gimple-expr.h (is_gimple_addressable: Likewise.
24291         * gimple-expr.c (is_gimple_address): Likewise.
24292         * internal-fn.c (expand_call_mem_ref): New function.
24293         (expand_mask_load_optab_fn): Use it.
24294         (expand_mask_store_optab_fn): Likewise.
24296 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24297             Alan Hayward  <alan.hayward@arm.com>
24298             David Sherwood  <david.sherwood@arm.com>
24300         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
24301         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
24302         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
24303         (cond_umax@var{mode}): Document.
24304         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
24305         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
24306         (cond_umin_optab, cond_umax_optab): New optabs.
24307         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
24308         (COND_IOR, COND_XOR): New internal functions.
24309         * internal-fn.h (get_conditional_internal_fn): Declare.
24310         * internal-fn.c (cond_binary_direct): New macro.
24311         (expand_cond_binary_optab_fn): Likewise.
24312         (direct_cond_binary_optab_supported_p): Likewise.
24313         (get_conditional_internal_fn): New function.
24314         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
24315         Cope with reduction statements that are vectorized as calls rather
24316         than assignments.
24317         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
24318         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
24319         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
24320         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
24321         (UNSPEC_COND_EOR): New unspecs.
24322         (optab): Add mappings for them.
24323         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
24324         (sve_int_op, sve_fp_op): New int attributes.
24326 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24327             Alan Hayward  <alan.hayward@arm.com>
24328             David Sherwood  <david.sherwood@arm.com>
24330         * optabs.def (while_ult_optab): New optab.
24331         * doc/md.texi (while_ult@var{m}@var{n}): Document.
24332         * internal-fn.def (WHILE_ULT): New internal function.
24333         * internal-fn.h (direct_internal_fn_supported_p): New override
24334         that takes two types as argument.
24335         * internal-fn.c (while_direct): New macro.
24336         (expand_while_optab_fn): New function.
24337         (convert_optab_supported_p): Likewise.
24338         (direct_while_optab_supported_p): New macro.
24339         * wide-int.h (wi::udiv_ceil): New function.
24340         * tree-vectorizer.h (rgroup_masks): New structure.
24341         (vec_loop_masks): New typedef.
24342         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
24343         and fully_masked_p.
24344         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
24345         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
24346         (vect_max_vf): New function.
24347         (slpeel_make_loop_iterate_ntimes): Delete.
24348         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
24349         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
24350         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
24351         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
24352         internal-fn.h, stor-layout.h and optabs-query.h.
24353         (vect_set_loop_mask): New function.
24354         (add_preheader_seq): Likewise.
24355         (add_header_seq): Likewise.
24356         (interleave_supported_p): Likewise.
24357         (vect_maybe_permute_loop_masks): Likewise.
24358         (vect_set_loop_masks_directly): Likewise.
24359         (vect_set_loop_condition_masked): Likewise.
24360         (vect_set_loop_condition_unmasked): New function, split out from
24361         slpeel_make_loop_iterate_ntimes.
24362         (slpeel_make_loop_iterate_ntimes): Rename to..
24363         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
24364         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
24365         (vect_do_peeling): Update call accordingly.
24366         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
24367         loops.
24368         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24369         mask_compare_type, can_fully_mask_p and fully_masked_p.
24370         (release_vec_loop_masks): New function.
24371         (_loop_vec_info): Use it to free the loop masks.
24372         (can_produce_all_loop_masks_p): New function.
24373         (vect_get_max_nscalars_per_iter): Likewise.
24374         (vect_verify_full_masking): Likewise.
24375         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
24376         retries, and free the mask rgroups before retrying.  Check loop-wide
24377         reasons for disallowing fully-masked loops.  Make the final decision
24378         about whether use a fully-masked loop or not.
24379         (vect_estimate_min_profitable_iters): Do not assume that peeling
24380         for the number of iterations will be needed for fully-masked loops.
24381         (vectorizable_reduction): Disable fully-masked loops.
24382         (vectorizable_live_operation): Likewise.
24383         (vect_halve_mask_nunits): New function.
24384         (vect_double_mask_nunits): Likewise.
24385         (vect_record_loop_mask): Likewise.
24386         (vect_get_loop_mask): Likewise.
24387         (vect_transform_loop): Handle the case in which the final loop
24388         iteration might handle a partial vector.  Call vect_set_loop_condition
24389         instead of slpeel_make_loop_iterate_ntimes.
24390         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
24391         (check_load_store_masking): New function.
24392         (prepare_load_store_mask): Likewise.
24393         (vectorizable_store): Handle fully-masked loops.
24394         (vectorizable_load): Likewise.
24395         (supportable_widening_operation): Use vect_halve_mask_nunits for
24396         booleans.
24397         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
24398         (vect_gen_while): New function.
24399         * config/aarch64/aarch64.md (umax<mode>3): New expander.
24400         (aarch64_uqdec<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         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
24407         (reduc_xor_scal_optab): New optabs.
24408         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
24409         (reduc_xor_scal_@var{m}): Document.
24410         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
24411         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
24412         internal functions.
24413         * fold-const-call.c (fold_const_call): Handle them.
24414         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
24415         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
24416         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
24417         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
24418         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
24419         (UNSPEC_XORV): New unspecs.
24420         (optab): Add entries for them.
24421         (BITWISEV): New int iterator.
24422         (bit_reduc_op): New int attributes.
24424 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24425             Alan Hayward  <alan.hayward@arm.com>
24426             David Sherwood  <david.sherwood@arm.com>
24428         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
24429         * internal-fn.def (VEC_SHL_INSERT): New internal function.
24430         * optabs.def (vec_shl_insert_optab): New optab.
24431         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
24432         (duplicate_and_interleave): Likewise.
24433         * tree-vect-loop.c: Include internal-fn.h.
24434         (neutral_op_for_slp_reduction): New function, split out from
24435         get_initial_defs_for_reduction.
24436         (get_initial_def_for_reduction): Handle option 2 for variable-length
24437         vectors by loading the neutral value into a vector and then shifting
24438         the initial value into element 0.
24439         (get_initial_defs_for_reduction): Replace the code argument with
24440         the neutral value calculated by neutral_op_for_slp_reduction.
24441         Use gimple_build_vector for constant-length vectors.
24442         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
24443         but the first group_size elements have a neutral value.
24444         Use duplicate_and_interleave otherwise.
24445         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
24446         Update call to get_initial_defs_for_reduction.  Handle SLP
24447         reductions for variable-length vectors by creating one vector
24448         result for each scalar result, with the elements associated
24449         with other scalar results stubbed out with the neutral value.
24450         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
24451         Require IFN_VEC_SHL_INSERT for double reductions on
24452         variable-length vectors, or SLP reductions that have
24453         a neutral value.  Require can_duplicate_and_interleave_p
24454         support for variable-length unchained SLP reductions if there
24455         is no neutral value, such as for MIN/MAX reductions.  Also require
24456         the number of vector elements to be a multiple of the number of
24457         SLP statements when doing variable-length unchained SLP reductions.
24458         Update call to vect_create_epilog_for_reduction.
24459         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
24460         and remove initial values.
24461         (duplicate_and_interleave): Make public.
24462         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
24463         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
24465 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24466             Alan Hayward  <alan.hayward@arm.com>
24467             David Sherwood  <david.sherwood@arm.com>
24469         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
24470         (can_duplicate_and_interleave_p): New function.
24471         (vect_get_and_check_slp_defs): Take the vector of statements
24472         rather than just the current one.  Remove excess parentheses.
24473         Restriction rejectinon of vect_constant_def and vect_external_def
24474         for variable-length vectors to boolean types, or types for which
24475         can_duplicate_and_interleave_p is false.
24476         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
24477         (duplicate_and_interleave): New function.
24478         (vect_get_constant_vectors): Use gimple_build_vector for
24479         constant-length vectors and suitable variable-length constant
24480         vectors.  Use duplicate_and_interleave for other variable-length
24481         vectors.  Don't defer the update when inserting new statements.
24483 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24484             Alan Hayward  <alan.hayward@arm.com>
24485             David Sherwood  <david.sherwood@arm.com>
24487         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
24488         min_profitable_iters doesn't go negative.
24490 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24491             Alan Hayward  <alan.hayward@arm.com>
24492             David Sherwood  <david.sherwood@arm.com>
24494         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
24495         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
24496         * optabs.def (vec_mask_load_lanes_optab): New optab.
24497         (vec_mask_store_lanes_optab): Likewise.
24498         * internal-fn.def (MASK_LOAD_LANES): New internal function.
24499         (MASK_STORE_LANES): Likewise.
24500         * internal-fn.c (mask_load_lanes_direct): New macro.
24501         (mask_store_lanes_direct): Likewise.
24502         (expand_mask_load_optab_fn): Handle masked operations.
24503         (expand_mask_load_lanes_optab_fn): New macro.
24504         (expand_mask_store_optab_fn): Handle masked operations.
24505         (expand_mask_store_lanes_optab_fn): New macro.
24506         (direct_mask_load_lanes_optab_supported_p): Likewise.
24507         (direct_mask_store_lanes_optab_supported_p): Likewise.
24508         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
24509         parameter.
24510         (vect_load_lanes_supported): Likewise.
24511         * tree-vect-data-refs.c (strip_conversion): New function.
24512         (can_group_stmts_p): Likewise.
24513         (vect_analyze_data_ref_accesses): Use it instead of checking
24514         for a pair of assignments.
24515         (vect_store_lanes_supported): Take a masked_p parameter.
24516         (vect_load_lanes_supported): Likewise.
24517         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
24518         vect_store_lanes_supported and vect_load_lanes_supported.
24519         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
24520         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
24521         parameter.  Don't allow gaps for masked accesses.
24522         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
24523         and vect_load_lanes_supported.
24524         (get_load_store_type): Take a masked_p parameter and update
24525         call to get_group_load_store_type.
24526         (vectorizable_store): Update call to get_load_store_type.
24527         Handle IFN_MASK_STORE_LANES.
24528         (vectorizable_load): Update call to get_load_store_type.
24529         Handle IFN_MASK_LOAD_LANES.
24531 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24532             Alan Hayward  <alan.hayward@arm.com>
24533             David Sherwood  <david.sherwood@arm.com>
24535         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
24536         modes for SVE.
24537         * config/aarch64/aarch64-protos.h
24538         (aarch64_sve_struct_memory_operand_p): Declare.
24539         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
24540         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
24541         (VPRED, vpred): Handle SVE structure modes.
24542         * config/aarch64/constraints.md (Utx): New constraint.
24543         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
24544         (aarch64_sve_struct_nonimmediate_operand): New predicates.
24545         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
24546         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
24547         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
24548         structure modes.  Split into pieces after RA.
24549         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
24550         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
24551         New patterns.
24552         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
24553         SVE structure modes.
24554         (aarch64_classify_address): Likewise.
24555         (sizetochar): Move earlier in file.
24556         (aarch64_print_operand): Handle SVE register lists.
24557         (aarch64_array_mode): New function.
24558         (aarch64_sve_struct_memory_operand_p): Likewise.
24559         (TARGET_ARRAY_MODE): Redefine.
24561 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24562             Alan Hayward  <alan.hayward@arm.com>
24563             David Sherwood  <david.sherwood@arm.com>
24565         * target.def (array_mode): New target hook.
24566         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
24567         * doc/tm.texi: Regenerate.
24568         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
24569         * hooks.c (hook_optmode_mode_uhwi_none): New function.
24570         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
24571         targetm.array_mode.
24572         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
24573         type sizes.
24575 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24576             Alan Hayward  <alan.hayward@arm.com>
24577             David Sherwood  <david.sherwood@arm.com>
24579         * fold-const.c (fold_binary_loc): Check the argument types
24580         rather than the result type when testing for a vector operation.
24582 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24584         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
24585         * doc/tm.texi: Regenerate.
24587 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24588             Alan Hayward  <alan.hayward@arm.com>
24589             David Sherwood  <david.sherwood@arm.com>
24591         * doc/invoke.texi (-msve-vector-bits=): Document new option.
24592         (sve): Document new AArch64 extension.
24593         * doc/md.texi (w): Extend the description of the AArch64
24594         constraint to include SVE vectors.
24595         (Upl, Upa): Document new AArch64 predicate constraints.
24596         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
24597         enum.
24598         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
24599         (msve-vector-bits=): New option.
24600         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
24601         SVE when these are disabled.
24602         (sve): New extension.
24603         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
24604         modes.  Adjust their number of units based on aarch64_sve_vg.
24605         (MAX_BITSIZE_MODE_ANY_MODE): Define.
24606         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
24607         aarch64_addr_query_type.
24608         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
24609         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
24610         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
24611         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
24612         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
24613         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
24614         (aarch64_simd_imm_zero_p): Delete.
24615         (aarch64_check_zero_based_sve_index_immediate): Declare.
24616         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24617         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24618         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24619         (aarch64_sve_float_mul_immediate_p): Likewise.
24620         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24621         rather than an rtx.
24622         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
24623         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
24624         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
24625         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
24626         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
24627         (aarch64_regmode_natural_size): Likewise.
24628         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
24629         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
24630         left one place.
24631         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
24632         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
24633         for VG and the SVE predicate registers.
24634         (V_ALIASES): Add a "z"-prefixed alias.
24635         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
24636         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
24637         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
24638         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
24639         (REG_CLASS_NAMES): Add entries for them.
24640         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
24641         and the predicate registers.
24642         (aarch64_sve_vg): Declare.
24643         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
24644         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
24645         (REGMODE_NATURAL_SIZE): Define.
24646         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
24647         SVE macros.
24648         * config/aarch64/aarch64.c: Include cfgrtl.h.
24649         (simd_immediate_info): Add a constructor for series vectors,
24650         and an associated step field.
24651         (aarch64_sve_vg): New variable.
24652         (aarch64_dbx_register_number): Handle VG and the predicate registers.
24653         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
24654         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
24655         (VEC_ANY_DATA, VEC_STRUCT): New constants.
24656         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
24657         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
24658         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
24659         (aarch64_get_mask_mode): New functions.
24660         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
24661         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
24662         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
24663         predicate modes and predicate registers.  Explicitly restrict
24664         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
24665         to store a vector mode if it is recognized by
24666         aarch64_classify_vector_mode.
24667         (aarch64_regmode_natural_size): New function.
24668         (aarch64_hard_regno_caller_save_mode): Return the original mode
24669         for predicates.
24670         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
24671         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
24672         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
24673         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
24674         functions.
24675         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
24676         does not overlap dest if the function is frame-related.  Handle
24677         SVE constants.
24678         (aarch64_split_add_offset): New function.
24679         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
24680         them aarch64_add_offset.
24681         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
24682         and update call to aarch64_sub_sp.
24683         (aarch64_add_cfa_expression): New function.
24684         (aarch64_expand_prologue): Pass extra temporary registers to the
24685         functions above.  Handle the case in which we need to emit new
24686         DW_CFA_expressions for registers that were originally saved
24687         relative to the stack pointer, but now have to be expressed
24688         relative to the frame pointer.
24689         (aarch64_output_mi_thunk): Pass extra temporary registers to the
24690         functions above.
24691         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
24692         IP0 and IP1 values for SVE frames.
24693         (aarch64_expand_vec_series): New function.
24694         (aarch64_expand_sve_widened_duplicate): Likewise.
24695         (aarch64_expand_sve_const_vector): Likewise.
24696         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
24697         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
24698         into the register, rather than emitting a SET directly.
24699         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
24700         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
24701         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
24702         (offset_9bit_signed_scaled_p): New functions.
24703         (aarch64_replicate_bitmask_imm): New function.
24704         (aarch64_bitmask_imm): Use it.
24705         (aarch64_cannot_force_const_mem): Reject expressions involving
24706         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
24707         (aarch64_classify_index): Handle SVE indices, by requiring
24708         a plain register index with a scale that matches the element size.
24709         (aarch64_classify_address): Handle SVE addresses.  Assert that
24710         the mode of the address is VOIDmode or an integer mode.
24711         Update call to aarch64_classify_symbol.
24712         (aarch64_classify_symbolic_expression): Update call to
24713         aarch64_classify_symbol.
24714         (aarch64_const_vec_all_in_range_p): New function.
24715         (aarch64_print_vector_float_operand): Likewise.
24716         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
24717         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
24718         and the FP immediates 1.0 and 0.5.
24719         (aarch64_print_address_internal): Handle SVE addresses.
24720         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
24721         (aarch64_regno_regclass): Handle predicate registers.
24722         (aarch64_secondary_reload): Handle big-endian reloads of SVE
24723         data modes.
24724         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
24725         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
24726         (aarch64_convert_sve_vector_bits): New function.
24727         (aarch64_override_options): Use it to handle -msve-vector-bits=.
24728         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24729         rather than an rtx.
24730         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
24731         Handle SVE vector and predicate modes.  Accept VL-based constants
24732         that need only one temporary register, and VL offsets that require
24733         no temporary registers.
24734         (aarch64_conditional_register_usage): Mark the predicate registers
24735         as fixed if SVE isn't available.
24736         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
24737         Return true for SVE vector and predicate modes.
24738         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
24739         rather than an unsigned int.  Handle SVE modes.
24740         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
24741         SVE modes.
24742         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
24743         if SVE is enabled.
24744         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24745         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24746         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24747         (aarch64_sve_float_mul_immediate_p): New functions.
24748         (aarch64_sve_valid_immediate): New function.
24749         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
24750         Explicitly reject structure modes.  Check for INDEX constants.
24751         Handle PTRUE and PFALSE constants.
24752         (aarch64_check_zero_based_sve_index_immediate): New function.
24753         (aarch64_simd_imm_zero_p): Delete.
24754         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
24755         vector modes.  Accept constants in the range of CNT[BHWD].
24756         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
24757         ask for an Advanced SIMD mode.
24758         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
24759         (aarch64_simd_vector_alignment): Handle SVE predicates.
24760         (aarch64_vectorize_preferred_vector_alignment): New function.
24761         (aarch64_simd_vector_alignment_reachable): Use it instead of
24762         the vector size.
24763         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
24764         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
24765         functions.
24766         (MAX_VECT_LEN): Delete.
24767         (expand_vec_perm_d): Add a vec_flags field.
24768         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
24769         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
24770         (aarch64_evpc_ext): Don't apply a big-endian lane correction
24771         for SVE modes.
24772         (aarch64_evpc_rev): Rename to...
24773         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
24774         (aarch64_evpc_rev_global): New function.
24775         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
24776         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
24777         MAX_VECT_LEN.
24778         (aarch64_evpc_sve_tbl): New function.
24779         (aarch64_expand_vec_perm_const_1): Update after rename of
24780         aarch64_evpc_rev.  Handle SVE permutes too, trying
24781         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
24782         than aarch64_evpc_tbl.
24783         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
24784         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
24785         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
24786         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
24787         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
24788         (aarch64_expand_sve_vcond): New functions.
24789         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
24790         of aarch64_vector_mode_p.
24791         (aarch64_dwarf_poly_indeterminate_value): New function.
24792         (aarch64_compute_pressure_classes): Likewise.
24793         (aarch64_can_change_mode_class): Likewise.
24794         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
24795         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
24796         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
24797         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
24798         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
24799         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
24800         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
24801         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
24802         constraints.
24803         (Dn, Dl, Dr): Accept const as well as const_vector.
24804         (Dz): Likewise.  Compare against CONST0_RTX.
24805         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
24806         of "vector" where appropriate.
24807         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
24808         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
24809         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
24810         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
24811         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
24812         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
24813         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
24814         (v_int_equiv): Extend to SVE modes.
24815         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
24816         mode attributes.
24817         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
24818         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
24819         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
24820         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
24821         (SVE_COND_FP_CMP): New int iterators.
24822         (perm_hilo): Handle the new unpack unspecs.
24823         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
24824         attributes.
24825         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
24826         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
24827         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
24828         (aarch64_equality_operator, aarch64_constant_vector_operand)
24829         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
24830         (aarch64_sve_nonimmediate_operand): Likewise.
24831         (aarch64_sve_general_operand): Likewise.
24832         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
24833         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
24834         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
24835         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
24836         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
24837         (aarch64_sve_float_arith_immediate): Likewise.
24838         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
24839         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
24840         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
24841         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
24842         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
24843         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
24844         (aarch64_sve_float_arith_operand): Likewise.
24845         (aarch64_sve_float_arith_with_sub_operand): Likewise.
24846         (aarch64_sve_float_mul_operand): Likewise.
24847         (aarch64_sve_vec_perm_operand): Likewise.
24848         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
24849         (aarch64_mov_operand): Accept const_poly_int and const_vector.
24850         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
24851         as well as const_vector.
24852         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
24853         in file.  Use CONST0_RTX and CONSTM1_RTX.
24854         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
24855         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
24856         Use aarch64_simd_imm_zero.
24857         * config/aarch64/aarch64-sve.md: New file.
24858         * config/aarch64/aarch64.md: Include it.
24859         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
24860         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
24861         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
24862         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
24863         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
24864         (sve): New attribute.
24865         (enabled): Disable instructions with the sve attribute unless
24866         TARGET_SVE.
24867         (movqi, movhi): Pass CONST_POLY_INT operaneds through
24868         aarch64_expand_mov_immediate.
24869         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
24870         CNT[BHSD] immediates.
24871         (movti): Split CONST_POLY_INT moves into two halves.
24872         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
24873         Split additions that need a temporary here if the destination
24874         is the stack pointer.
24875         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
24876         (*add<mode>3_poly_1): New instruction.
24877         (set_clobber_cc): New expander.
24879 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24881         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
24882         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
24883         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
24884         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
24885         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
24886         Change innermode from fixed_mode_size to machine_mode.
24887         (simplify_subreg): Update call accordingly.  Handle a constant-sized
24888         subreg of a variable-length CONST_VECTOR.
24890 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24891             Alan Hayward  <alan.hayward@arm.com>
24892             David Sherwood  <david.sherwood@arm.com>
24894         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
24895         (add_offset_to_base): New function, split out from...
24896         (create_mem_ref): ...here.  When handling a scale other than 1,
24897         check first whether the address is valid without the offset.
24898         Add it into the base if so, leaving the index and scale as-is.
24900 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
24902         PR c++/83778
24903         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
24904         fold_for_warn before checking if arg2 is INTEGER_CST.
24906 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
24908         * config/rs6000/predicates.md (load_multiple_operation): Delete.
24909         (store_multiple_operation): Delete.
24910         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
24911         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
24912         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
24913         guarded by TARGET_STRING.
24914         (rs6000_output_load_multiple): Delete.
24915         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
24916         OPTION_MASK_STRING / TARGET_STRING handling.
24917         (print_operand) <'N', 'O'>: Add comment that these are unused now.
24918         (const rs6000_opt_masks) <"string">: Change mask to 0.
24919         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
24920         (MASK_STRING): Delete.
24921         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
24922         parts.  Simplify.
24923         (load_multiple): Delete.
24924         (*ldmsi8): Delete.
24925         (*ldmsi7): Delete.
24926         (*ldmsi6): Delete.
24927         (*ldmsi5): Delete.
24928         (*ldmsi4): Delete.
24929         (*ldmsi3): Delete.
24930         (store_multiple): Delete.
24931         (*stmsi8): Delete.
24932         (*stmsi7): Delete.
24933         (*stmsi6): Delete.
24934         (*stmsi5): Delete.
24935         (*stmsi4): Delete.
24936         (*stmsi3): Delete.
24937         (movmemsi_8reg): Delete.
24938         (corresponding unnamed define_insn): Delete.
24939         (movmemsi_6reg): Delete.
24940         (corresponding unnamed define_insn): Delete.
24941         (movmemsi_4reg): Delete.
24942         (corresponding unnamed define_insn): Delete.
24943         (movmemsi_2reg): Delete.
24944         (corresponding unnamed define_insn): Delete.
24945         (movmemsi_1reg): Delete.
24946         (corresponding unnamed define_insn): Delete.
24947         * config/rs6000/rs6000.opt (mno-string): New.
24948         (mstring): Replace by deprecation warning stub.
24949         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
24951 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
24953         * regrename.c (regrename_do_replace): If replacing the same
24954         reg multiple times, try to reuse last created gen_raw_REG.
24956         PR debug/81155
24957         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
24958         main to workaround a bug in GDB.
24960 2018-01-12  Tom de Vries  <tom@codesourcery.com>
24962         PR target/83737
24963         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
24965 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
24967         PR rtl-optimization/80481
24968         * ira-color.c (get_cap_member): New function.
24969         (allocnos_conflict_by_live_ranges_p): Use it.
24970         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
24971         (setup_slot_coalesced_allocno_live_ranges): Ditto.
24973 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
24975         PR target/83628
24976         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
24977         (*saddl_se_1): Ditto.
24978         (*ssubsi_1): Ditto.
24979         (*ssubl_se_1): Ditto.
24981 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
24983         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
24984         rather than wi::to_widest for DR_INITs.
24985         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
24986         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
24987         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
24988         INTEGER_CSTs.
24989         (vect_analyze_group_access_1): Note that here.
24991 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
24993         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
24994         polynomial type sizes.
24996 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
24998         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
24999         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
25000         (gimple_add_tmp_var): Likewise.
25002 2018-01-12  Martin Liska  <mliska@suse.cz>
25004         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
25005         (gimple_alloc_sizes): Likewise.
25006         (dump_gimple_statistics): Use PRIu64 in printf format.
25007         * gimple.h: Change uint64_t to int.
25009 2018-01-12  Martin Liska  <mliska@suse.cz>
25011         * tree-core.h: Use uint64_t instead of int.
25012         * tree.c (tree_node_counts): Likewise.
25013         (tree_node_sizes): Likewise.
25014         (dump_tree_statistics): Use PRIu64 in printf format.
25016 2018-01-12  Martin Liska  <mliska@suse.cz>
25018         * Makefile.in: As qsort_chk is implemented in vec.c, add
25019         vec.o to linkage of gencfn-macros.
25020         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
25021         passing the info to record_node_allocation_statistics.
25022         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
25023         and pass the info.
25024         * ggc-common.c (struct ggc_usage): Add operator== and use
25025         it in operator< and compare function.
25026         * mem-stats.h (struct mem_usage): Likewise.
25027         * vec.c (struct vec_usage): Remove operator< and compare
25028         function. Can be simply inherited.
25030 2018-01-12  Martin Jambor  <mjambor@suse.cz>
25032         PR target/81616
25033         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
25034         * tree-ssa-math-opts.c: Include domwalk.h.
25035         (convert_mult_to_fma_1): New function.
25036         (fma_transformation_info): New type.
25037         (fma_deferring_state): Likewise.
25038         (cancel_fma_deferring): New function.
25039         (result_of_phi): Likewise.
25040         (last_fma_candidate_feeds_initial_phi): Likewise.
25041         (convert_mult_to_fma): Added deferring logic, split actual
25042         transformation to convert_mult_to_fma_1.
25043         (math_opts_dom_walker): New type.
25044         (math_opts_dom_walker::after_dom_children): New method, body moved
25045         here from pass_optimize_widening_mul::execute, added deferring logic
25046         bits.
25047         (pass_optimize_widening_mul::execute): Moved most of code to
25048         math_opts_dom_walker::after_dom_children.
25049         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
25050         * config/i386/i386.c (ix86_option_override_internal): Added
25051         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
25053 2018-01-12  Richard Biener  <rguenther@suse.de>
25055         PR debug/83157
25056         * dwarf2out.c (gen_variable_die): Do not reset old_die for
25057         inline instance vars.
25059 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
25061         PR target/81819
25062         * config/rx/rx.c (rx_is_restricted_memory_address):
25063         Handle SUBREG case.
25065 2018-01-12  Richard Biener  <rguenther@suse.de>
25067         PR tree-optimization/80846
25068         * target.def (split_reduction): New target hook.
25069         * targhooks.c (default_split_reduction): New function.
25070         * targhooks.h (default_split_reduction): Declare.
25071         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
25072         target requests first reduce vectors by combining low and high
25073         parts.
25074         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
25075         (get_vectype_for_scalar_type_and_size): Export.
25076         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
25077         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
25078         * doc/tm.texi: Regenerate.
25079         * config/i386/i386.c (ix86_split_reduction): Implement
25080         TARGET_VECTORIZE_SPLIT_REDUCTION.
25082 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
25084         PR target/83368
25085         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
25086         in PIC mode except for TARGET_VXWORKS_RTP.
25087         * config/sparc/sparc.c: Include cfgrtl.h.
25088         (TARGET_INIT_PIC_REG): Define.
25089         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
25090         (sparc_pic_register_p): New predicate.
25091         (sparc_legitimate_address_p): Use it.
25092         (sparc_legitimize_pic_address): Likewise.
25093         (sparc_delegitimize_address): Likewise.
25094         (sparc_mode_dependent_address_p): Likewise.
25095         (gen_load_pcrel_sym): Remove 4th parameter.
25096         (load_got_register): Adjust call to above.  Remove obsolete stuff.
25097         (sparc_expand_prologue): Do not call load_got_register here.
25098         (sparc_flat_expand_prologue): Likewise.
25099         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
25100         (sparc_use_pseudo_pic_reg): New function.
25101         (sparc_init_pic_reg): Likewise.
25102         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25103         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
25105 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
25107         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25108         Add item for branch_cost.
25110 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
25112         PR rtl-optimization/83565
25113         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
25114         not extend the result to a larger mode for rotate operations.
25115         (num_sign_bit_copies1): Likewise.
25117 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25119         PR target/40411
25120         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
25121         -symbolic.
25122         Use values-Xc.o for -pedantic.
25123         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
25125 2018-01-12  Martin Liska  <mliska@suse.cz>
25127         PR ipa/83054
25128         * ipa-devirt.c (final_warning_record::grow_type_warnings):
25129         New function.
25130         (possible_polymorphic_call_targets): Use it.
25131         (ipa_devirt): Likewise.
25133 2018-01-12  Martin Liska  <mliska@suse.cz>
25135         * profile-count.h (enum profile_quality): Use 0 as invalid
25136         enum value of profile_quality.
25138 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
25140         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
25141         -mext-string options.
25143 2018-01-12  Richard Biener  <rguenther@suse.de>
25145         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
25146         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
25147         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
25148         Likewise.
25149         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
25151 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
25153         * configure.ac (--with-long-double-format): Add support for the
25154         configuration option to change the default long double format on
25155         PowerPC systems.
25156         * config.gcc (powerpc*-linux*-*): Likewise.
25157         * configure: Regenerate.
25158         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
25159         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
25160         used without modification.
25162 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25164         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
25165         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
25166         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
25167         MISC_BUILTIN_SPEC_BARRIER.
25168         (rs6000_init_builtins): Likewise.
25169         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
25170         enum value.
25171         (speculation_barrier): New define_insn.
25172         * doc/extend.texi: Document __builtin_speculation_barrier.
25174 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
25176         PR target/83203
25177         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
25178         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
25179         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
25180         iterators.
25181         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
25182         integral modes instead of "ss" and "sd".
25183         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
25184         vectors with 32-bit and 64-bit elements.
25185         (vecdupssescalarmodesuffix): New mode attribute.
25186         (vec_dup<mode>): Use it.
25188 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
25190         PR target/83330
25191         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
25192         frame if argument is passed on stack.
25194 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
25196         PR target/82682
25197         * ree.c (combine_reaching_defs): Optimize also
25198         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
25199         reg2=any_extend(exp); reg1=reg2;, formatting fix.
25201 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
25203         PR middle-end/83189
25204         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
25206 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
25208         PR middle-end/83718
25209         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
25210         after they are computed.
25212 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
25214         PR tree-optimization/83695
25215         * gimple-loop-linterchange.cc
25216         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
25217         reset cached scev information after interchange.
25218         (pass_linterchange::execute): Remove call to scev_reset_htab.
25220 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25222         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
25223         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
25224         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
25225         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
25226         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
25227         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
25228         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
25229         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
25230         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
25231         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
25232         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
25233         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
25234         (V_lane_reg): Likewise.
25235         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
25236         New define_expand.
25237         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
25238         (vfmal_lane_low<mode>_intrinsic,
25239         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
25240         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
25241         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
25242         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
25243         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
25244         vfmsl_lane_high<mode>_intrinsic): New define_insns.
25246 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25248         * config/arm/arm-cpus.in (fp16fml): New feature.
25249         (ALL_SIMD): Add fp16fml.
25250         (armv8.2-a): Add fp16fml as an option.
25251         (armv8.3-a): Likewise.
25252         (armv8.4-a): Add fp16fml as part of fp16.
25253         * config/arm/arm.h (TARGET_FP16FML): Define.
25254         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
25255         when appropriate.
25256         * config/arm/arm-modes.def (V2HF): Define.
25257         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
25258         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
25259         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
25260         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
25261         vfmsl_low, vfmsl_high): New set of builtins.
25262         * config/arm/iterators.md (PLUSMINUS): New code iterator.
25263         (vfml_op): New code attribute.
25264         (VFMLHALVES): New int iterator.
25265         (VFML, VFMLSEL): New mode attributes.
25266         (V_reg): Define mapping for V2HF.
25267         (V_hi, V_lo): New mode attributes.
25268         (VF_constraint): Likewise.
25269         (vfml_half, vfml_half_selector): New int attributes.
25270         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
25271         define_expand.
25272         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
25273         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
25274         New define_insn.
25275         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
25276         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
25277         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
25278         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
25279         documentation.
25280         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
25281         Document new effective target and option set.
25283 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25285         * config/arm/arm-cpus.in (armv8_4): New feature.
25286         (ARMv8_4a): New fgroup.
25287         (armv8.4-a): New arch.
25288         * config/arm/arm-tables.opt: Regenerate.
25289         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
25290         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
25291         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
25292         Add matching rules for -march=armv8.4-a and extensions.
25293         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
25295 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
25297         PR target/81821
25298         * config/rx/rx.md (BW): New mode attribute.
25299         (sync_lock_test_and_setsi): Add mode suffix to insn output.
25301 2018-01-11  Richard Biener  <rguenther@suse.de>
25303         PR tree-optimization/83435
25304         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
25305         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
25306         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
25308 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25309             Alan Hayward  <alan.hayward@arm.com>
25310             David Sherwood  <david.sherwood@arm.com>
25312         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
25313         field.
25314         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
25315         (aarch64_print_address_internal): Use it to check for a zero offset.
25317 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25318             Alan Hayward  <alan.hayward@arm.com>
25319             David Sherwood  <david.sherwood@arm.com>
25321         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
25322         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
25323         Return a poly_int64 rather than a HOST_WIDE_INT.
25324         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
25325         rather than a HOST_WIDE_INT.
25326         * config/aarch64/aarch64.h (aarch64_frame): Protect with
25327         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
25328         hard_fp_offset, frame_size, initial_adjust, callee_offset and
25329         final_offset from HOST_WIDE_INT to poly_int64.
25330         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
25331         to_constant when getting the number of units in an Advanced SIMD
25332         mode.
25333         (aarch64_builtin_vectorized_function): Check for a constant number
25334         of units.
25335         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
25336         GET_MODE_SIZE.
25337         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
25338         attribute instead of GET_MODE_NUNITS.
25339         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
25340         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
25341         GET_MODE_SIZE for fixed-size registers.
25342         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
25343         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
25344         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
25345         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
25346         (aarch64_print_operand, aarch64_print_address_internal)
25347         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
25348         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
25349         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
25350         Handle polynomial GET_MODE_SIZE.
25351         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
25352         wider than SImode without modification.
25353         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
25354         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
25355         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
25356         passing and returning SVE modes.
25357         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
25358         rather than GEN_INT.
25359         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
25360         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
25361         (aarch64_allocate_and_probe_stack_space): Likewise.
25362         (aarch64_layout_frame): Cope with polynomial offsets.
25363         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
25364         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
25365         polynomial offsets.
25366         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
25367         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
25368         poly_int64 rather than a HOST_WIDE_INT.
25369         (aarch64_get_separate_components, aarch64_process_components)
25370         (aarch64_expand_prologue, aarch64_expand_epilogue)
25371         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
25372         (aarch64_anchor_offset): New function, split out from...
25373         (aarch64_legitimize_address): ...here.
25374         (aarch64_builtin_vectorization_cost): Handle polynomial
25375         TYPE_VECTOR_SUBPARTS.
25376         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
25377         GET_MODE_NUNITS.
25378         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
25379         number of elements from the PARALLEL rather than the mode.
25380         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
25381         rather than GET_MODE_BITSIZE.
25382         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
25383         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
25384         (aarch64_expand_vec_perm_const_1): Handle polynomial
25385         d->perm.length () and d->perm elements.
25386         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
25387         Apply to_constant to d->perm elements.
25388         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
25389         polynomial CONST_VECTOR_NUNITS.
25390         (aarch64_move_pointer): Take amount as a poly_int64 rather
25391         than an int.
25392         (aarch64_progress_pointer): Avoid temporary variable.
25393         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
25394         the mode attribute instead of GET_MODE.
25396 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25397             Alan Hayward  <alan.hayward@arm.com>
25398             David Sherwood  <david.sherwood@arm.com>
25400         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
25401         x exists before using it.
25402         (aarch64_add_constant_internal): Rename to...
25403         (aarch64_add_offset_1): ...this.  Replace regnum with separate
25404         src and dest rtxes.  Handle the case in which they're different,
25405         including when the offset is zero.  Replace scratchreg with an rtx.
25406         Use 2 additions if there is no spare register into which we can
25407         move a 16-bit constant.
25408         (aarch64_add_constant): Delete.
25409         (aarch64_add_offset): Replace reg with separate src and dest
25410         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
25411         Use aarch64_add_offset_1.
25412         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
25413         an rtx rather than an int.  Take the delta as a poly_int64
25414         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
25415         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
25416         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
25417         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
25418         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
25419         and aarch64_add_sp.
25420         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
25421         aarch64_add_constant.
25423 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25425         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
25426         Use scalar_float_mode.
25428 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25430         * config/aarch64/aarch64-simd.md
25431         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
25432         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
25433         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
25434         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
25435         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
25436         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
25437         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
25438         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
25439         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
25440         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
25442 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
25444         PR target/83514
25445         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
25446         targ_options->x_arm_arch_string is non NULL.
25448 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
25450         * config/aarch64/aarch64.h
25451         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
25453 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
25455         PR target/82096
25456         * expmed.c (emit_store_flag_force): Swap if const op0
25457         and change VOIDmode to mode of op0.
25459 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
25461         PR rtl-optimization/83761
25462         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
25463         than bytes to mode_for_size.
25465 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
25467         PR middle-end/83189
25468         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
25469         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
25470         profile.
25472 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
25474         PR middle-end/83575
25475         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
25476         when in layout mode.
25477         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
25478         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
25479         partition fixup.
25481 2018-01-10  Michael Collison  <michael.collison@arm.com>
25483         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
25484         * config/aarch64/aarch64-option-extension.def: Add
25485         AARCH64_OPT_EXTENSION of 'fp16fml'.
25486         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25487         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
25488         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
25489         * config/aarch64/constraints.md (Ui7): New constraint.
25490         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
25491         (VFMLA_SEL_W): Ditto.
25492         (f16quad): Ditto.
25493         (f16mac1): Ditto.
25494         (VFMLA16_LOW): New int iterator.
25495         (VFMLA16_HIGH): Ditto.
25496         (UNSPEC_FMLAL): New unspec.
25497         (UNSPEC_FMLSL): Ditto.
25498         (UNSPEC_FMLAL2): Ditto.
25499         (UNSPEC_FMLSL2): Ditto.
25500         (f16mac): New code attribute.
25501         * config/aarch64/aarch64-simd-builtins.def
25502         (aarch64_fmlal_lowv2sf): Ditto.
25503         (aarch64_fmlsl_lowv2sf): Ditto.
25504         (aarch64_fmlalq_lowv4sf): Ditto.
25505         (aarch64_fmlslq_lowv4sf): Ditto.
25506         (aarch64_fmlal_highv2sf): Ditto.
25507         (aarch64_fmlsl_highv2sf): Ditto.
25508         (aarch64_fmlalq_highv4sf): Ditto.
25509         (aarch64_fmlslq_highv4sf): Ditto.
25510         (aarch64_fmlal_lane_lowv2sf): Ditto.
25511         (aarch64_fmlsl_lane_lowv2sf): Ditto.
25512         (aarch64_fmlal_laneq_lowv2sf): Ditto.
25513         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
25514         (aarch64_fmlalq_lane_lowv4sf): Ditto.
25515         (aarch64_fmlsl_lane_lowv4sf): Ditto.
25516         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
25517         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
25518         (aarch64_fmlal_lane_highv2sf): Ditto.
25519         (aarch64_fmlsl_lane_highv2sf): Ditto.
25520         (aarch64_fmlal_laneq_highv2sf): Ditto.
25521         (aarch64_fmlsl_laneq_highv2sf): Ditto.
25522         (aarch64_fmlalq_lane_highv4sf): Ditto.
25523         (aarch64_fmlsl_lane_highv4sf): Ditto.
25524         (aarch64_fmlalq_laneq_highv4sf): Ditto.
25525         (aarch64_fmlsl_laneq_highv4sf): Ditto.
25526         * config/aarch64/aarch64-simd.md:
25527         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
25528         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25529         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
25530         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25531         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
25532         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
25533         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
25534         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
25535         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
25536         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
25537         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
25538         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
25539         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
25540         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
25541         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
25542         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
25543         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
25544         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
25545         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
25546         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
25547         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
25548         (vfmlsl_low_u32): Ditto.
25549         (vfmlalq_low_u32): Ditto.
25550         (vfmlslq_low_u32): Ditto.
25551         (vfmlal_high_u32): Ditto.
25552         (vfmlsl_high_u32): Ditto.
25553         (vfmlalq_high_u32): Ditto.
25554         (vfmlslq_high_u32): Ditto.
25555         (vfmlal_lane_low_u32): Ditto.
25556         (vfmlsl_lane_low_u32): Ditto.
25557         (vfmlal_laneq_low_u32): Ditto.
25558         (vfmlsl_laneq_low_u32): Ditto.
25559         (vfmlalq_lane_low_u32): Ditto.
25560         (vfmlslq_lane_low_u32): Ditto.
25561         (vfmlalq_laneq_low_u32): Ditto.
25562         (vfmlslq_laneq_low_u32): Ditto.
25563         (vfmlal_lane_high_u32): Ditto.
25564         (vfmlsl_lane_high_u32): Ditto.
25565         (vfmlal_laneq_high_u32): Ditto.
25566         (vfmlsl_laneq_high_u32): Ditto.
25567         (vfmlalq_lane_high_u32): Ditto.
25568         (vfmlslq_lane_high_u32): Ditto.
25569         (vfmlalq_laneq_high_u32): Ditto.
25570         (vfmlslq_laneq_high_u32): Ditto.
25571         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
25572         (AARCH64_FL_FOR_ARCH8_4): New.
25573         (AARCH64_ISA_F16FML): New ISA flag.
25574         (TARGET_F16FML): New feature flag for fp16fml.
25575         (doc/invoke.texi): Document new fp16fml option.
25577 2018-01-10  Michael Collison  <michael.collison@arm.com>
25579         * config/aarch64/aarch64-builtins.c:
25580         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
25581         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25582         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
25583         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
25584         (AARCH64_ISA_SHA3): New ISA flag.
25585         (TARGET_SHA3): New feature flag for sha3.
25586         * config/aarch64/iterators.md (sha512_op): New int attribute.
25587         (CRYPTO_SHA512): New int iterator.
25588         (UNSPEC_SHA512H): New unspec.
25589         (UNSPEC_SHA512H2): Ditto.
25590         (UNSPEC_SHA512SU0): Ditto.
25591         (UNSPEC_SHA512SU1): Ditto.
25592         * config/aarch64/aarch64-simd-builtins.def
25593         (aarch64_crypto_sha512hqv2di): New builtin.
25594         (aarch64_crypto_sha512h2qv2di): Ditto.
25595         (aarch64_crypto_sha512su0qv2di): Ditto.
25596         (aarch64_crypto_sha512su1qv2di): Ditto.
25597         (aarch64_eor3qv8hi): Ditto.
25598         (aarch64_rax1qv2di): Ditto.
25599         (aarch64_xarqv2di): Ditto.
25600         (aarch64_bcaxqv8hi): Ditto.
25601         * config/aarch64/aarch64-simd.md:
25602         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
25603         (aarch64_crypto_sha512su0qv2di): Ditto.
25604         (aarch64_crypto_sha512su1qv2di): Ditto.
25605         (aarch64_eor3qv8hi): Ditto.
25606         (aarch64_rax1qv2di): Ditto.
25607         (aarch64_xarqv2di): Ditto.
25608         (aarch64_bcaxqv8hi): Ditto.
25609         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
25610         (vsha512h2q_u64): Ditto.
25611         (vsha512su0q_u64): Ditto.
25612         (vsha512su1q_u64): Ditto.
25613         (veor3q_u16): Ditto.
25614         (vrax1q_u64): Ditto.
25615         (vxarq_u64): Ditto.
25616         (vbcaxq_u16): Ditto.
25617         * config/arm/types.md (crypto_sha512): New type attribute.
25618         (crypto_sha3): Ditto.
25619         (doc/invoke.texi): Document new sha3 option.
25621 2018-01-10  Michael Collison  <michael.collison@arm.com>
25623         * config/aarch64/aarch64-builtins.c:
25624         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
25625         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25626         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
25627         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
25628         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
25629         (AARCH64_ISA_SM4): New ISA flag.
25630         (TARGET_SM4): New feature flag for sm4.
25631         * config/aarch64/aarch64-simd-builtins.def
25632         (aarch64_sm3ss1qv4si): Ditto.
25633         (aarch64_sm3tt1aq4si): Ditto.
25634         (aarch64_sm3tt1bq4si): Ditto.
25635         (aarch64_sm3tt2aq4si): Ditto.
25636         (aarch64_sm3tt2bq4si): Ditto.
25637         (aarch64_sm3partw1qv4si): Ditto.
25638         (aarch64_sm3partw2qv4si): Ditto.
25639         (aarch64_sm4eqv4si): Ditto.
25640         (aarch64_sm4ekeyqv4si): Ditto.
25641         * config/aarch64/aarch64-simd.md:
25642         (aarch64_sm3ss1qv4si): Ditto.
25643         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
25644         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
25645         (aarch64_sm4eqv4si): Ditto.
25646         (aarch64_sm4ekeyqv4si): Ditto.
25647         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
25648         (sm3part_op): Ditto.
25649         (CRYPTO_SM3TT): Ditto.
25650         (CRYPTO_SM3PART): Ditto.
25651         (UNSPEC_SM3SS1): New unspec.
25652         (UNSPEC_SM3TT1A): Ditto.
25653         (UNSPEC_SM3TT1B): Ditto.
25654         (UNSPEC_SM3TT2A): Ditto.
25655         (UNSPEC_SM3TT2B): Ditto.
25656         (UNSPEC_SM3PARTW1): Ditto.
25657         (UNSPEC_SM3PARTW2): Ditto.
25658         (UNSPEC_SM4E): Ditto.
25659         (UNSPEC_SM4EKEY): Ditto.
25660         * config/aarch64/constraints.md (Ui2): New constraint.
25661         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
25662         * config/arm/types.md (crypto_sm3): New type attribute.
25663         (crypto_sm4): Ditto.
25664         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
25665         (vsm3tt1aq_u32): Ditto.
25666         (vsm3tt1bq_u32): Ditto.
25667         (vsm3tt2aq_u32): Ditto.
25668         (vsm3tt2bq_u32): Ditto.
25669         (vsm3partw1q_u32): Ditto.
25670         (vsm3partw2q_u32): Ditto.
25671         (vsm4eq_u32): Ditto.
25672         (vsm4ekeyq_u32): Ditto.
25673         (doc/invoke.texi): Document new sm4 option.
25675 2018-01-10  Michael Collison  <michael.collison@arm.com>
25677         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
25678         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
25679         (AARCH64_FL_FOR_ARCH8_4): New.
25680         (AARCH64_FL_V8_4): New flag.
25681         (doc/invoke.texi): Document new armv8.4-a option.
25683 2018-01-10  Michael Collison  <michael.collison@arm.com>
25685         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25686         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
25687         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
25688         * config/aarch64/aarch64-option-extension.def: Add
25689         AARCH64_OPT_EXTENSION of 'sha2'.
25690         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
25691         (crypto): Disable sha2 and aes if crypto disabled.
25692         (crypto): Enable aes and sha2 if enabled.
25693         (simd): Disable sha2 and aes if simd disabled.
25694         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
25695         New flags.
25696         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
25697         (TARGET_SHA2): New feature flag for sha2.
25698         (TARGET_AES): New feature flag for aes.
25699         * config/aarch64/aarch64-simd.md:
25700         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
25701         conditional on TARGET_AES.
25702         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
25703         (aarch64_crypto_sha1hsi): Make pattern conditional
25704         on TARGET_SHA2.
25705         (aarch64_crypto_sha1hv4si): Ditto.
25706         (aarch64_be_crypto_sha1hv4si): Ditto.
25707         (aarch64_crypto_sha1su1v4si): Ditto.
25708         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
25709         (aarch64_crypto_sha1su0v4si): Ditto.
25710         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
25711         (aarch64_crypto_sha256su0v4si): Ditto.
25712         (aarch64_crypto_sha256su1v4si): Ditto.
25713         (doc/invoke.texi): Document new aes and sha2 options.
25715 2018-01-10  Martin Sebor  <msebor@redhat.com>
25717         PR tree-optimization/83781
25718         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
25719         as string arrays.
25721 2018-01-11  Martin Sebor  <msebor@gmail.com>
25722             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
25724         PR tree-optimization/83501
25725         PR tree-optimization/81703
25727         * tree-ssa-strlen.c (get_string_cst): Rename...
25728         (get_string_len): ...to this.  Handle global constants.
25729         (handle_char_store): Adjust.
25731 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
25732             Jim Wilson  <jimw@sifive.com>
25734         * config/riscv/riscv-protos.h (riscv_output_return): New.
25735         * config/riscv/riscv.c (struct machine_function): New naked_p field.
25736         (riscv_attribute_table, riscv_output_return),
25737         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
25738         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
25739         (riscv_compute_frame_info): Only compute frame->mask if not a naked
25740         function.
25741         (riscv_expand_prologue): Add early return for naked function.
25742         (riscv_expand_epilogue): Likewise.
25743         (riscv_function_ok_for_sibcall): Return false for naked function.
25744         (riscv_set_current_function): New.
25745         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
25746         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
25747         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
25748         * doc/extend.texi (RISC-V Function Attributes): New.
25750 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
25752         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
25753         check for 128-bit long double before checking TCmode.
25754         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
25755         128-bit long doubles before checking TFmode or TCmode.
25756         (FLOAT128_IBM_P): Likewise.
25758 2018-01-10  Martin Sebor  <msebor@redhat.com>
25760         PR tree-optimization/83671
25761         * builtins.c (c_strlen): Unconditionally return zero for the empty
25762         string.
25763         Use -Warray-bounds for warnings.
25764         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
25765         for non-constant array indices with COMPONENT_REF, arrays of
25766         arrays, and pointers to arrays.
25767         (gimple_fold_builtin_strlen): Determine and set length range for
25768         non-constant character arrays.
25770 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
25772         PR middle-end/81897
25773         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
25774         empty blocks.
25776 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
25778         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
25780 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
25782         PR target/83399
25783         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
25784         VECTOR_MEM_ALTIVEC_OR_VSX_P.
25785         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
25786         indexed_or_indirect_operand predicate.
25787         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
25788         (*vsx_le_perm_load_v8hi): Likewise.
25789         (*vsx_le_perm_load_v16qi): Likewise.
25790         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
25791         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
25792         (*vsx_le_perm_store_v8hi): Likewise.
25793         (*vsx_le_perm_store_v16qi): Likewise.
25794         (eight unnamed splitters): Likewise.
25796 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
25798         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
25799         * config/rs6000/emmintrin.h: Likewise.
25800         * config/rs6000/mmintrin.h: Likewise.
25801         * config/rs6000/xmmintrin.h: Likewise.
25803 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
25805         PR c++/43486
25806         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
25807         "public_flag".
25808         * tree.c (tree_nop_conversion): Return true for location wrapper
25809         nodes.
25810         (maybe_wrap_with_location): New function.
25811         (selftest::check_strip_nops): New function.
25812         (selftest::test_location_wrappers): New function.
25813         (selftest::tree_c_tests): Call it.
25814         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
25815         (maybe_wrap_with_location): New decl.
25816         (EXPR_LOCATION_WRAPPER_P): New macro.
25817         (location_wrapper_p): New inline function.
25818         (tree_strip_any_location_wrapper): New inline function.
25820 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
25822         PR target/83735
25823         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
25824         stack_realign_offset for the largest alignment of stack slot
25825         actually used.
25826         (ix86_find_max_used_stack_alignment): New function.
25827         (ix86_finalize_stack_frame_flags): Use it.  Set
25828         max_used_stack_alignment if we don't realign stack.
25829         * config/i386/i386.h (machine_function): Add
25830         max_used_stack_alignment.
25832 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
25834         * config/arm/arm.opt (-mbranch-cost): New option.
25835         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
25836         account.
25838 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
25840         PR target/83629
25841         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
25842         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
25844 2018-01-10  Richard Biener  <rguenther@suse.de>
25846         PR debug/83765
25847         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
25848         early out so it also covers the case where we have a non-NULL
25849         origin.
25851 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
25853         PR tree-optimization/83753
25854         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
25855         for non-strided grouped accesses if the number of elements is 1.
25857 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
25859         PR target/81616
25860         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
25861         * i386.h (TARGET_USE_GATHER): Define.
25862         * x86-tune.def (X86_TUNE_USE_GATHER): New.
25864 2018-01-10  Martin Liska  <mliska@suse.cz>
25866         PR bootstrap/82831
25867         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
25868         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
25869         partitioning.
25870         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
25871         CLEANUP_NO_PARTITIONING is not set.
25873 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
25875         * doc/rtl.texi: Remove documentation of (const ...) wrappers
25876         for vectors, as a partial revert of r254296.
25877         * rtl.h (const_vec_p): Delete.
25878         (const_vec_duplicate_p): Don't test for vector CONSTs.
25879         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
25880         * expmed.c (make_tree): Likewise.
25882         Revert:
25883         * common.md (E, F): Use CONSTANT_P instead of checking for
25884         CONST_VECTOR.
25885         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
25886         checking for CONST_VECTOR.
25888 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
25890         PR middle-end/83575
25891         * predict.c (force_edge_cold): Handle in more sane way edges
25892         with no prediction.
25894 2018-01-09  Carl Love  <cel@us.ibm.com>
25896         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
25897         V4SI, V4SF types.
25898         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
25899         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
25900         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
25901         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
25902         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
25903         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
25904         * config/rs6000/rs6000-protos.h: Add extern defition for
25905         rs6000_generate_float2_double_code.
25906         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
25907         function.
25908         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
25909         (float2_v2df): Add define_expand.
25911 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
25913         PR target/83628
25914         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
25915         op_mode in the force_to_mode call.
25917 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
25919         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
25920         instead of checking each element individually.
25921         (aarch64_evpc_uzp): Likewise.
25922         (aarch64_evpc_zip): Likewise.
25923         (aarch64_evpc_ext): Likewise.
25924         (aarch64_evpc_rev): Likewise.
25925         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
25926         instead of checking each element individually.  Return true without
25927         generating rtl if
25928         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
25929         whether all selected elements come from the same input, instead of
25930         checking each element individually.  Remove calls to gen_rtx_REG,
25931         start_sequence and end_sequence and instead assert that no rtl is
25932         generated.
25934 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
25936         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
25937         order of HIGH and CONST checks.
25939 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
25941         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
25942         if the destination isn't an SSA_NAME.
25944 2018-01-09  Richard Biener  <rguenther@suse.de>
25946         PR tree-optimization/83668
25947         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
25948         move prologue...
25949         (canonicalize_loop_form): ... here, renamed from ...
25950         (canonicalize_loop_closed_ssa_form): ... this and amended to
25951         swap successor edges for loop exit blocks to make us use
25952         the RPO order we need for initial schedule generation.
25954 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
25956         PR tree-optimization/64811
25957         * match.pd: When optimizing comparisons with Inf, avoid
25958         introducing or losing exceptions from comparisons with NaN.
25960 2018-01-09  Martin Liska  <mliska@suse.cz>
25962         PR sanitizer/82517
25963         * asan.c (shadow_mem_size): Add gcc_assert.
25965 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
25967         Don't save registers in main().
25969         PR target/83738
25970         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
25971         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
25972         * config/avr/avr.c (avr_set_current_function): Don't error if
25973         naked, OS_task or OS_main are specified at the same time.
25974         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
25975         OS_main.
25976         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
25977         attribute.
25978         * common/config/avr/avr-common.c (avr_option_optimization_table):
25979         Switch on -mmain-is-OS_task for optimizing compilations.
25981 2018-01-09  Richard Biener  <rguenther@suse.de>
25983         PR tree-optimization/83572
25984         * graphite.c: Include cfganal.h.
25985         (graphite_transform_loops): Connect infinite loops to exit
25986         and remove fake edges at the end.
25988 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
25990         * ipa-inline.c (edge_badness): Revert accidental checkin.
25992 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
25994         PR ipa/80763
25995         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
25996         symbols; not inline clones.
25998 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
26000         PR target/83507
26001         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
26002         hard registers.  Formatting fixes.
26004         PR preprocessor/83722
26005         * gcc.c (try_generate_repro): Pass
26006         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
26007         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
26008         do_report_bug.
26010 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
26011             Kito Cheng  <kito.cheng@gmail.com>
26013         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
26014         (riscv_leaf_function_p): Delete.
26015         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
26017 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26019         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
26020         function.
26021         (do_ifelse): New function.
26022         (do_isel): New function.
26023         (do_sub3): New function.
26024         (do_add3): New function.
26025         (do_load_mask_compare): New function.
26026         (do_overlap_load_compare): New function.
26027         (expand_compare_loop): New function.
26028         (expand_block_compare): Call expand_compare_loop() when appropriate.
26029         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
26030         option description.
26031         (-mblock-compare-inline-loop-limit): New option.
26033 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26035         PR target/83677
26036         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
26037         Reverse order of second and third operands in first alternative.
26038         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
26039         of first and second elements in UNSPEC_VPERMR vector.
26040         (altivec_expand_vec_perm_le): Likewise.
26042 2018-01-08  Jeff Law  <law@redhat.com>
26044         PR rtl-optimizatin/81308
26045         * tree-switch-conversion.c (cfg_altered): New file scoped static.
26046         (process_switch): If group_case_labels makes a change, then set
26047         cfg_altered.
26048         (pass_convert_switch::execute): If a switch is converted, then
26049         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
26051         PR rtl-optimization/81308
26052         * recog.c (split_all_insns): Conditionally cleanup the CFG after
26053         splitting insns.
26055 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
26057         PR target/83663 - Revert r255946
26058         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
26059         generation for cases where splatting a value is not useful.
26060         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
26061         across a vec_duplicate and a paradoxical subreg forming a vector
26062         mode to a vec_concat.
26064 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26066         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
26067         -march=armv8.3-a variants.
26068         * config/arm/t-multilib: Likewise.
26069         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
26071 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26073         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
26074         to generate rtl.
26075         (cceq_ior_compare_complement): Give it a name so I can use it, and
26076         change boolean_or_operator predicate to boolean_operator so it can
26077         be used to generate a crand.
26078         (eqne): New code iterator.
26079         (bd/bd_neg): New code_attrs.
26080         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
26081         a single define_insn.
26082         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
26083         decrement (bdnzt/bdnzf/bdzt/bdzf).
26084         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
26085         with the new names of the branch decrement patterns, and added the
26086         names of the branch decrement conditional patterns.
26088 2018-01-08  Richard Biener  <rguenther@suse.de>
26090         PR tree-optimization/83563
26091         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
26092         cache.
26094 2018-01-08  Richard Biener  <rguenther@suse.de>
26096         PR middle-end/83713
26097         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
26099 2018-01-08  Richard Biener  <rguenther@suse.de>
26101         PR tree-optimization/83685
26102         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
26103         references to abnormals.
26105 2018-01-08  Richard Biener  <rguenther@suse.de>
26107         PR lto/83719
26108         * dwarf2out.c (output_indirect_strings): Handle empty
26109         skeleton_debug_str_hash.
26110         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
26112 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
26114         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
26115         (emit_store_direct): Likewise.
26116         (arc_trampoline_adjust_address): Likewise.
26117         (arc_asm_trampoline_template): New function.
26118         (arc_initialize_trampoline): Use asm_trampoline_template.
26119         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
26120         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
26121         * config/arc/arc.md (flush_icache): Delete pattern.
26123 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
26125         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
26126         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
26127         munaligned-access.
26129 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26131         PR target/83681
26132         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
26133         by not USED_FOR_TARGET.
26134         (make_pass_resolve_sw_modes): Likewise.
26136 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26138         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
26139         USED_FOR_TARGET.
26141 2018-01-08  Richard Biener  <rguenther@suse.de>
26143         PR middle-end/83580
26144         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
26146 2018-01-08  Richard Biener  <rguenther@suse.de>
26148         PR middle-end/83517
26149         * match.pd ((t * 2) / 2) -> t): Add missing :c.
26151 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
26153         PR middle-end/81897
26154         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
26155         basic blocks with a small number of successors.
26156         (convert_control_dep_chain_into_preds): Improve handling of
26157         forwarder blocks.
26158         (dump_predicates): Split apart into...
26159         (dump_pred_chain): ...here...
26160         (dump_pred_info): ...and here.
26161         (can_one_predicate_be_invalidated_p): Add debugging printfs.
26162         (can_chain_union_be_invalidated_p): Improve check for invalidation
26163         of paths.
26164         (uninit_uses_cannot_happen): Avoid unnecessary if
26165         convert_control_dep_chain_into_preds yielded nothing.
26167 2018-01-06  Martin Sebor  <msebor@redhat.com>
26169         PR tree-optimization/83640
26170         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
26171         subtracting negative offset from size.
26172         (builtin_access::overlap): Adjust offset bounds of the access to fall
26173         within the size of the object if possible.
26175 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
26177         PR rtl-optimization/83699
26178         * expmed.c (extract_bit_field_1): Restrict the vector usage of
26179         extract_bit_field_as_subreg to cases in which the extracted
26180         value is also a vector.
26182         * lra-constraints.c (process_alt_operands): Test for the equivalence
26183         substitutions when detecting a possible reload cycle.
26185 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
26187         PR debug/83480
26188         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
26189         by default if flag_selective_schedling{,2}.  Formatting fixes.
26191         PR rtl-optimization/83682
26192         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
26193         if it has non-VECTOR_MODE element mode.
26194         (vec_duplicate_p): Likewise.
26196         PR middle-end/83694
26197         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
26198         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
26200 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
26202         PR target/83604
26203         * config/i386/i386-builtin.def
26204         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
26205         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
26206         Require also OPTION_MASK_ISA_AVX512F in addition to
26207         OPTION_MASK_ISA_GFNI.
26208         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
26209         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
26210         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
26211         to OPTION_MASK_ISA_GFNI.
26212         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
26213         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
26214         OPTION_MASK_ISA_AVX512BW.
26215         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
26216         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
26217         addition to OPTION_MASK_ISA_GFNI.
26218         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
26219         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
26220         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
26221         to OPTION_MASK_ISA_GFNI.
26222         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
26223         a requirement for all ISAs rather than any of them with a few
26224         exceptions.
26225         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
26226         processing.
26227         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
26228         bitmasks to be enabled with 3 exceptions, instead of requiring any
26229         enabled ISA with lots of exceptions.
26230         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
26231         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
26232         Change avx512bw in isa attribute to avx512f.
26233         * config/i386/sgxintrin.h: Add license boilerplate.
26234         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
26235         to __AVX512F__ and __AVX512VL to __AVX512VL__.
26236         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
26237         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
26238         defined.
26239         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
26240         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
26241         temporarily sse2 rather than sse if not enabled already.
26243         PR target/83604
26244         * config/i386/sse.md (VI248_VLBW): Rename to ...
26245         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
26246         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
26247         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
26248         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
26249         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
26250         mode iterator instead of VI248_VLBW.
26252 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
26254         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
26255         (record_modified): Skip clobbers; add debug output.
26256         (param_change_prob): Use sreal frequencies.
26258 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
26260         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
26261         punt for user-aligned variables.
26263 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
26265         * tree-chrec.c (chrec_contains_symbols): Return true for
26266         POLY_INT_CST.
26268 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
26270         PR target/82439
26271         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
26272         of (x|y) == x for BICS pattern.
26274 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
26276         PR tree-optimization/83605
26277         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
26278         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
26279         can throw.
26281 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26283         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
26284         * config/epiphany/rtems.h: New file.
26286 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26287             Uros Bizjak  <ubizjak@gmail.com>
26289         PR target/83554
26290         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
26291         QIreg_operand instead of register_operand predicate.
26292         * config/i386/i386.c (ix86_rop_should_change_byte_p,
26293         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
26294         comments instead of -fmitigate[-_]rop.
26296 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26298         PR bootstrap/81926
26299         * cgraphunit.c (symbol_table::compile): Switch to text_section
26300         before calling assembly_start debug hook.
26301         * run-rtl-passes.c (run_rtl_passes): Likewise.
26302         Include output.h.
26304 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26306         * tree-vrp.c (extract_range_from_binary_expr_1): Check
26307         range_int_cst_p rather than !symbolic_range_p before calling
26308         extract_range_from_multiplicative_op_1.
26310 2018-01-04  Jeff Law  <law@redhat.com>
26312         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
26313         redundant test in assertion.
26315 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26317         * doc/rtl.texi: Document machine_mode wrapper classes.
26319 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26321         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
26322         using tree_to_uhwi.
26324 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26326         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
26327         the VEC_PERM_EXPR fold to fail.
26329 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26331         PR debug/83585
26332         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
26333         to switched_sections.
26335 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26337         PR target/83680
26338         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
26339         test for d.testing.
26341 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
26343         PR target/83387
26344         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
26345         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
26347 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26349         PR debug/83666
26350         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
26351         is BLKmode and bitpos not zero or mode change is needed.
26353 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
26355         PR target/83675
26356         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
26357         TARGET_VIS2.
26359 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
26361         PR target/83628
26362         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
26363         instead of MULT rtx.  Update all corresponding splitters.
26364         (*saddl_se): Ditto.
26365         (*ssub<modesuffix>): Ditto.
26366         (*ssubl_se): Ditto.
26367         (*cmp_sadd_di): Update split patterns.
26368         (*cmp_sadd_si): Ditto.
26369         (*cmp_sadd_sidi): Ditto.
26370         (*cmp_ssub_di): Ditto.
26371         (*cmp_ssub_si): Ditto.
26372         (*cmp_ssub_sidi): Ditto.
26373         * config/alpha/predicates.md (const23_operand): New predicate.
26374         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
26375         Look for ASHIFT, not MULT inner operand.
26376         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
26378 2018-01-04  Martin Liska  <mliska@suse.cz>
26380         PR gcov-profile/83669
26381         * gcov.c (output_intermediate_file): Add version to intermediate
26382         gcov file.
26383         * doc/gcov.texi: Document new field 'version' in intermediate
26384         file format. Fix location of '-k' option of gcov command.
26386 2018-01-04  Martin Liska  <mliska@suse.cz>
26388         PR ipa/82352
26389         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
26391 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
26393         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
26395 2018-01-03  Martin Sebor  <msebor@redhat.com>
26397         PR tree-optimization/83655
26398         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
26399         checking calls with invalid arguments.
26401 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26403         * tree-vect-stmts.c (vect_get_store_rhs): New function.
26404         (vectorizable_mask_load_store): Delete.
26405         (vectorizable_call): Return false for masked loads and stores.
26406         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
26407         instead of gimple_assign_rhs1.
26408         (vectorizable_load): Handle IFN_MASK_LOAD.
26409         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
26411 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26413         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
26414         split out from..,
26415         (vectorizable_mask_load_store): ...here.
26416         (vectorizable_load): ...and here.
26418 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26420         * tree-vect-stmts.c (vect_build_all_ones_mask)
26421         (vect_build_zero_merge_argument): New functions, split out from...
26422         (vectorizable_load): ...here.
26424 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26426         * tree-vect-stmts.c (vect_check_store_rhs): New function,
26427         split out from...
26428         (vectorizable_mask_load_store): ...here.
26429         (vectorizable_store): ...and here.
26431 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26433         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
26434         split out from...
26435         (vectorizable_mask_load_store): ...here.
26437 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26439         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
26440         (vect_model_store_cost): Take a vec_load_store_type instead of a
26441         vect_def_type.
26442         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
26443         (vect_model_store_cost): Take a vec_load_store_type instead of a
26444         vect_def_type.
26445         (vectorizable_mask_load_store): Update accordingly.
26446         (vectorizable_store): Likewise.
26447         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
26449 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26451         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
26452         IFN_MASK_LOAD calls here rather than...
26453         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
26455 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26456             Alan Hayward  <alan.hayward@arm.com>
26457             David Sherwood  <david.sherwood@arm.com>
26459         * expmed.c (extract_bit_field_1): For vector extracts,
26460         fall back to extract_bit_field_as_subreg if vec_extract
26461         isn't available.
26463 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26464             Alan Hayward  <alan.hayward@arm.com>
26465             David Sherwood  <david.sherwood@arm.com>
26467         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
26468         they are variable or constant sized.
26469         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
26470         slots for constant-sized data.
26472 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26473             Alan Hayward  <alan.hayward@arm.com>
26474             David Sherwood  <david.sherwood@arm.com>
26476         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
26477         handling COND_EXPRs with boolean comparisons, try to find a better
26478         basis for the mask type than the boolean itself.
26480 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26482         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
26483         is calculated and how it can be overridden.
26484         * genmodes.c (max_bitsize_mode_any_mode): New variable.
26485         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
26486         if defined.
26487         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
26488         if nonzero.
26490 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26491             Alan Hayward  <alan.hayward@arm.com>
26492             David Sherwood  <david.sherwood@arm.com>
26494         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
26495         Remove the mode argument.
26496         (aarch64_simd_valid_immediate): Remove the mode and inverse
26497         arguments.
26498         * config/aarch64/iterators.md (bitsize): New iterator.
26499         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
26500         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
26501         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
26502         aarch64_simd_valid_immediate.
26503         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
26504         (aarch64_reg_or_bic_imm): Likewise.
26505         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
26506         with an insn_type enum and msl with a modifier_type enum.
26507         Replace element_width with a scalar_mode.  Change the shift
26508         to unsigned int.  Add constructors for scalar_float_mode and
26509         scalar_int_mode elements.
26510         (aarch64_vect_float_const_representable_p): Delete.
26511         (aarch64_can_const_movi_rtx_p)
26512         (aarch64_simd_scalar_immediate_valid_for_move)
26513         (aarch64_simd_make_constant): Update call to
26514         aarch64_simd_valid_immediate.
26515         (aarch64_advsimd_valid_immediate_hs): New function.
26516         (aarch64_advsimd_valid_immediate): Likewise.
26517         (aarch64_simd_valid_immediate): Remove mode and inverse
26518         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
26519         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
26520         and aarch64_float_const_representable_p on the result.
26521         (aarch64_output_simd_mov_immediate): Remove mode argument.
26522         Update call to aarch64_simd_valid_immediate and use of
26523         simd_immediate_info.
26524         (aarch64_output_scalar_simd_mov_immediate): Update call
26525         accordingly.
26527 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26528             Alan Hayward  <alan.hayward@arm.com>
26529             David Sherwood  <david.sherwood@arm.com>
26531         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
26532         (mode_nunits): Likewise CONST_MODE_NUNITS.
26533         * machmode.def (ADJUST_NUNITS): Document.
26534         * genmodes.c (mode_data::need_nunits_adj): New field.
26535         (blank_mode): Update accordingly.
26536         (adj_nunits): New variable.
26537         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
26538         parameter.
26539         (emit_mode_size_inline): Set need_bytesize_adj for all modes
26540         listed in adj_nunits.
26541         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
26542         listed in adj_nunits.  Don't emit case statements for such modes.
26543         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
26544         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
26545         nothing if adj_nunits is nonnull.
26546         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
26547         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
26548         (emit_mode_fbit): Update use of print_maybe_const_decl.
26549         (emit_move_size): Likewise.  Treat the array as non-const
26550         if adj_nunits.
26551         (emit_mode_adjustments): Handle adj_nunits.
26553 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26555         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
26556         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
26557         (VECTOR_MODES): Use it.
26558         (make_vector_modes): Take the prefix as an argument.
26560 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26561             Alan Hayward  <alan.hayward@arm.com>
26562             David Sherwood  <david.sherwood@arm.com>
26564         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
26565         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
26566         for MODE_VECTOR_BOOL.
26567         * machmode.def (VECTOR_BOOL_MODE): Document.
26568         * genmodes.c (VECTOR_BOOL_MODE): New macro.
26569         (make_vector_bool_mode): New function.
26570         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
26571         MODE_VECTOR_BOOL.
26572         * lto-streamer-in.c (lto_input_mode_table): Likewise.
26573         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
26574         Likewise.
26575         * stor-layout.c (int_mode_for_mode): Likewise.
26576         * tree.c (build_vector_type_for_mode): Likewise.
26577         * varasm.c (output_constant_pool_2): Likewise.
26578         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
26579         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
26580         for MODE_VECTOR_BOOL.
26581         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
26582         of mode class checks.
26583         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
26584         instead of a list of mode class checks.
26585         (expand_vector_scalar_condition): Likewise.
26586         (type_for_widest_vector_mode): Handle BImode as an inner mode.
26588 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26589             Alan Hayward  <alan.hayward@arm.com>
26590             David Sherwood  <david.sherwood@arm.com>
26592         * machmode.h (mode_size): Change from unsigned short to
26593         poly_uint16_pod.
26594         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
26595         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26596         or if measurement_type is not polynomial.
26597         (fixed_size_mode::includes_p): Check for constant-sized modes.
26598         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
26599         return a poly_uint16 rather than an unsigned short.
26600         (emit_mode_size): Change the type of mode_size from unsigned short
26601         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
26602         (emit_mode_adjustments): Cope with polynomial vector sizes.
26603         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26604         for GET_MODE_SIZE.
26605         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26606         for GET_MODE_SIZE.
26607         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
26608         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
26609         * caller-save.c (setup_save_areas): Likewise.
26610         (replace_reg_with_saved_mem): Likewise.
26611         * calls.c (emit_library_call_value_1): Likewise.
26612         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
26613         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
26614         (gen_lowpart_for_combine): Likewise.
26615         * convert.c (convert_to_integer_1): Likewise.
26616         * cse.c (equiv_constant, cse_insn): Likewise.
26617         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
26618         (cselib_subst_to_values): Likewise.
26619         * dce.c (word_dce_process_block): Likewise.
26620         * df-problems.c (df_word_lr_mark_ref): Likewise.
26621         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
26622         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
26623         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
26624         (rtl_for_decl_location): Likewise.
26625         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
26626         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
26627         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
26628         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
26629         (expand_expr_real_1): Likewise.
26630         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
26631         (pad_below): Likewise.
26632         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26633         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
26634         * ira.c (get_subreg_tracking_sizes): Likewise.
26635         * ira-build.c (ira_create_allocno_objects): Likewise.
26636         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
26637         (ira_sort_regnos_for_alter_reg): Likewise.
26638         * ira-costs.c (record_operand_costs): Likewise.
26639         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
26640         (resolve_simple_move): Likewise.
26641         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
26642         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
26643         (lra_constraints): Likewise.
26644         (CONST_POOL_OK_P): Reject variable-sized modes.
26645         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
26646         (add_pseudo_to_slot, lra_spill): Likewise.
26647         * omp-low.c (omp_clause_aligned_alignment): Likewise.
26648         * optabs-query.c (get_best_extraction_insn): Likewise.
26649         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26650         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
26651         (expand_mult_highpart, valid_multiword_target_p): Likewise.
26652         * recog.c (offsettable_address_addr_space_p): Likewise.
26653         * regcprop.c (maybe_mode_change): Likewise.
26654         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
26655         * regrename.c (build_def_use): Likewise.
26656         * regstat.c (dump_reg_info): Likewise.
26657         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
26658         (find_reloads, find_reloads_subreg_address): Likewise.
26659         * reload1.c (eliminate_regs_1): Likewise.
26660         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
26661         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
26662         (simplify_binary_operation_1, simplify_subreg): Likewise.
26663         * targhooks.c (default_function_arg_padding): Likewise.
26664         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
26665         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
26666         (verify_gimple_assign_ternary): Likewise.
26667         * tree-inline.c (estimate_move_cost): Likewise.
26668         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26669         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
26670         (get_address_cost_ainc): Likewise.
26671         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
26672         (vect_supportable_dr_alignment): Likewise.
26673         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26674         (vectorizable_reduction): Likewise.
26675         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
26676         (vectorizable_operation, vectorizable_load): Likewise.
26677         * tree.c (build_same_sized_truth_vector_type): Likewise.
26678         * valtrack.c (cleanup_auto_inc_dec): Likewise.
26679         * var-tracking.c (emit_note_insn_var_location): Likewise.
26680         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
26681         (ADDR_VEC_ALIGN): Likewise.
26683 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26684             Alan Hayward  <alan.hayward@arm.com>
26685             David Sherwood  <david.sherwood@arm.com>
26687         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
26688         unsigned short.
26689         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26690         or if measurement_type is polynomial.
26691         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
26692         * combine.c (make_extraction): Likewise.
26693         * dse.c (find_shift_sequence): Likewise.
26694         * dwarf2out.c (mem_loc_descriptor): Likewise.
26695         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
26696         (extract_bit_field, extract_low_bits): Likewise.
26697         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
26698         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
26699         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
26700         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
26701         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26702         * reload.c (find_reloads): Likewise.
26703         * reload1.c (alter_reg): Likewise.
26704         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
26705         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
26706         * tree-if-conv.c (predicate_mem_writes): Likewise.
26707         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
26708         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
26709         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
26710         * valtrack.c (dead_debug_insert_temp): Likewise.
26711         * varasm.c (mergeable_constant_section): Likewise.
26712         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
26714 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26715             Alan Hayward  <alan.hayward@arm.com>
26716             David Sherwood  <david.sherwood@arm.com>
26718         * expr.c (expand_assignment): Cope with polynomial mode sizes
26719         when assigning to a CONCAT.
26721 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26722             Alan Hayward  <alan.hayward@arm.com>
26723             David Sherwood  <david.sherwood@arm.com>
26725         * machmode.h (mode_precision): Change from unsigned short to
26726         poly_uint16_pod.
26727         (mode_to_precision): Return a poly_uint16 rather than an unsigned
26728         short.
26729         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
26730         or if measurement_type is not polynomial.
26731         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
26732         in which the mode is already known to be a scalar_int_mode.
26733         * genmodes.c (emit_mode_precision): Change the type of mode_precision
26734         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
26735         initializer.
26736         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26737         for GET_MODE_PRECISION.
26738         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26739         for GET_MODE_PRECISION.
26740         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
26741         as polynomial.
26742         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
26743         (expand_field_assignment, make_extraction): Likewise.
26744         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
26745         (get_last_value): Likewise.
26746         * convert.c (convert_to_integer_1): Likewise.
26747         * cse.c (cse_insn): Likewise.
26748         * expr.c (expand_expr_real_1): Likewise.
26749         * lra-constraints.c (simplify_operand_subreg): Likewise.
26750         * optabs-query.c (can_atomic_load_p): Likewise.
26751         * optabs.c (expand_atomic_load): Likewise.
26752         (expand_atomic_store): Likewise.
26753         * ree.c (combine_reaching_defs): Likewise.
26754         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
26755         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
26756         * tree.h (type_has_mode_precision_p): Likewise.
26757         * ubsan.c (instrument_si_overflow): Likewise.
26759 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26760             Alan Hayward  <alan.hayward@arm.com>
26761             David Sherwood  <david.sherwood@arm.com>
26763         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
26764         polynomial numbers of units.
26765         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
26766         (valid_vector_subparts_p): New function.
26767         (build_vector_type): Remove temporary shim and take the number
26768         of units as a poly_uint64 rather than an int.
26769         (build_opaque_vector_type): Take the number of units as a
26770         poly_uint64 rather than an int.
26771         * tree.c (build_vector_from_ctor): Handle polynomial
26772         TYPE_VECTOR_SUBPARTS.
26773         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
26774         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
26775         (build_vector_from_val): If the number of units is variable,
26776         use build_vec_duplicate_cst for constant operands and
26777         VEC_DUPLICATE_EXPR otherwise.
26778         (make_vector_type): Remove temporary is_constant ().
26779         (build_vector_type, build_opaque_vector_type): Take the number of
26780         units as a poly_uint64 rather than an int.
26781         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
26782         VECTOR_CST_NELTS.
26783         * cfgexpand.c (expand_debug_expr): Likewise.
26784         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
26785         (store_constructor, expand_expr_real_1): Likewise.
26786         (const_scalar_mask_from_tree): Likewise.
26787         * fold-const-call.c (fold_const_reduction): Likewise.
26788         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
26789         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
26790         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
26791         (fold_relational_const): Likewise.
26792         (native_interpret_vector): Likewise.  Change the size from an
26793         int to an unsigned int.
26794         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
26795         TYPE_VECTOR_SUBPARTS.
26796         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
26797         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
26798         duplicating a non-constant operand into a variable-length vector.
26799         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
26800         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
26801         * ipa-icf.c (sem_variable::equals): Likewise.
26802         * match.pd: Likewise.
26803         * omp-simd-clone.c (simd_clone_subparts): Likewise.
26804         * print-tree.c (print_node): Likewise.
26805         * stor-layout.c (layout_type): Likewise.
26806         * targhooks.c (default_builtin_vectorization_cost): Likewise.
26807         * tree-cfg.c (verify_gimple_comparison): Likewise.
26808         (verify_gimple_assign_binary): Likewise.
26809         (verify_gimple_assign_ternary): Likewise.
26810         (verify_gimple_assign_single): Likewise.
26811         * tree-pretty-print.c (dump_generic_node): Likewise.
26812         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26813         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
26814         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
26815         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
26816         (vect_shift_permute_load_chain): Likewise.
26817         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
26818         (expand_vector_condition, optimize_vector_constructor): Likewise.
26819         (lower_vec_perm, get_compute_type): Likewise.
26820         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26821         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
26822         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
26823         (vect_recog_mask_conversion_pattern): Likewise.
26824         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
26825         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
26826         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26827         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
26828         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
26829         (vectorizable_shift, vectorizable_operation, vectorizable_store)
26830         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
26831         (supportable_widening_operation): Likewise.
26832         (supportable_narrowing_operation): Likewise.
26833         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
26834         Likewise.
26835         * varasm.c (output_constant): Likewise.
26837 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26838             Alan Hayward  <alan.hayward@arm.com>
26839             David Sherwood  <david.sherwood@arm.com>
26841         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
26842         so that both the length == 3 and length != 3 cases set up their
26843         own permute vectors.  Add comments explaining why we know the
26844         number of elements is constant.
26845         (vect_permute_load_chain): Likewise.
26847 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26848             Alan Hayward  <alan.hayward@arm.com>
26849             David Sherwood  <david.sherwood@arm.com>
26851         * machmode.h (mode_nunits): Change from unsigned char to
26852         poly_uint16_pod.
26853         (ONLY_FIXED_SIZE_MODES): New macro.
26854         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
26855         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
26856         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
26857         New typedefs.
26858         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
26859         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
26860         or if measurement_type is not polynomial.
26861         * genmodes.c (ZERO_COEFFS): New macro.
26862         (emit_mode_nunits_inline): Make mode_nunits_inline return a
26863         poly_uint16.
26864         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
26865         Use ZERO_COEFFS when emitting initializers.
26866         * data-streamer.h (bp_pack_poly_value): New function.
26867         (bp_unpack_poly_value): Likewise.
26868         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26869         for GET_MODE_NUNITS.
26870         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26871         for GET_MODE_NUNITS.
26872         * tree.c (make_vector_type): Remove temporary shim and make
26873         the real function take the number of units as a poly_uint64
26874         rather than an int.
26875         (build_vector_type_for_mode): Handle polynomial nunits.
26876         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
26877         * emit-rtl.c (const_vec_series_p_1): Likewise.
26878         (gen_rtx_CONST_VECTOR): Likewise.
26879         * fold-const.c (test_vec_duplicate_folding): Likewise.
26880         * genrecog.c (validate_pattern): Likewise.
26881         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
26882         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26883         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
26884         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
26885         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
26886         * rtlanal.c (subreg_get_info): Likewise.
26887         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26888         (vect_grouped_load_supported): Likewise.
26889         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
26890         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
26891         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
26892         (simplify_const_unary_operation, simplify_binary_operation_1)
26893         (simplify_const_binary_operation, simplify_ternary_operation)
26894         (test_vector_ops_duplicate, test_vector_ops): Likewise.
26895         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
26896         instead of CONST_VECTOR_NUNITS.
26897         * varasm.c (output_constant_pool_2): Likewise.
26898         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
26899         explicit-encoded elements in the XVEC for variable-length vectors.
26901 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26903         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
26905 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26906             Alan Hayward  <alan.hayward@arm.com>
26907             David Sherwood  <david.sherwood@arm.com>
26909         * coretypes.h (fixed_size_mode): Declare.
26910         (fixed_size_mode_pod): New typedef.
26911         * builtins.h (target_builtins::x_apply_args_mode)
26912         (target_builtins::x_apply_result_mode): Change type to
26913         fixed_size_mode_pod.
26914         * builtins.c (apply_args_size, apply_result_size, result_vector)
26915         (expand_builtin_apply_args_1, expand_builtin_apply)
26916         (expand_builtin_return): Update accordingly.
26918 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26920         * cse.c (hash_rtx_cb): Hash only the encoded elements.
26921         * cselib.c (cselib_hash_rtx): Likewise.
26922         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
26923         CONST_VECTOR encoding.
26925 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26926             Jeff Law  <law@redhat.com>
26928         PR target/83641
26929         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
26930         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
26931         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
26932         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
26934         PR target/83641
26935         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
26936         explicitly probe *sp in a noreturn function if there were any callee
26937         register saves or frame pointer is needed.
26939 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26941         PR debug/83621
26942         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
26943         BLKmode for ternary, binary or unary expressions.
26945         PR debug/83645
26946         * var-tracking.c (delete_vta_debug_insn): New inline function.
26947         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
26948         insns from get_insns () to NULL instead of each bb separately.
26949         Use delete_vta_debug_insn.  No longer static.
26950         (vt_debug_insns_local, variable_tracking_main_1): Adjust
26951         delete_vta_debug_insns callers.
26952         * rtl.h (delete_vta_debug_insns): Declare.
26953         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
26954         instead of variable_tracking_main.
26956 2018-01-03  Martin Sebor  <msebor@redhat.com>
26958         PR tree-optimization/83603
26959         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
26960         arguments past the endof the argument list in functions declared
26961         without a prototype.
26962         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
26963         Avoid checking when arguments are null.
26965 2018-01-03  Martin Sebor  <msebor@redhat.com>
26967         PR c/83559
26968         * doc/extend.texi (attribute const): Fix a typo.
26969         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
26970         issuing -Wsuggest-attribute for void functions.
26972 2018-01-03  Martin Sebor  <msebor@redhat.com>
26974         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
26975         offset_int::from instead of wide_int::to_shwi.
26976         (maybe_diag_overlap): Remove assertion.
26977         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
26978         * gimple-ssa-sprintf.c (format_directive): Same.
26979         (parse_directive): Same.
26980         (sprintf_dom_walker::compute_format_length): Same.
26981         (try_substitute_return_value): Same.
26983 2018-01-03  Jeff Law  <law@redhat.com>
26985         PR middle-end/83654
26986         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
26987         non-constant residual for zero at runtime and avoid probing in
26988         that case.  Reorganize code for trailing problem to mirror handling
26989         of the residual.
26991 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26993         PR tree-optimization/83501
26994         * tree-ssa-strlen.c (get_string_cst): New.
26995         (handle_char_store): Call get_string_cst.
26997 2018-01-03  Martin Liska  <mliska@suse.cz>
26999         PR tree-optimization/83593
27000         * tree-ssa-strlen.c: Include tree-cfg.h.
27001         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
27002         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
27003         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
27004         to false.
27005         (strlen_dom_walker::before_dom_children): Call
27006         gimple_purge_dead_eh_edges. Dump tranformation with details
27007         dump flags.
27008         (strlen_dom_walker::before_dom_children): Update call by adding
27009         new argument cleanup_eh.
27010         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
27012 2018-01-03  Martin Liska  <mliska@suse.cz>
27014         PR ipa/83549
27015         * cif-code.def (VARIADIC_THUNK): New enum value.
27016         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
27017         thunks.
27019 2018-01-03  Jan Beulich  <jbeulich@suse.com>
27021         * sse.md (mov<mode>_internal): Tighten condition for when to use
27022         vmovdqu<ssescalarsize> for TI and OI modes.
27024 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27026         Update copyright years.
27028 2018-01-03  Martin Liska  <mliska@suse.cz>
27030         PR ipa/83594
27031         * ipa-visibility.c (function_and_variable_visibility): Skip
27032         functions with noipa attribure.
27034 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27036         * gcc.c (process_command): Update copyright notice dates.
27037         * gcov-dump.c (print_version): Ditto.
27038         * gcov.c (print_version): Ditto.
27039         * gcov-tool.c (print_version): Ditto.
27040         * gengtype.c (create_file): Ditto.
27041         * doc/cpp.texi: Bump @copying's copyright year.
27042         * doc/cppinternals.texi: Ditto.
27043         * doc/gcc.texi: Ditto.
27044         * doc/gccint.texi: Ditto.
27045         * doc/gcov.texi: Ditto.
27046         * doc/install.texi: Ditto.
27047         * doc/invoke.texi: Ditto.
27049 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27051         * vector-builder.h (vector_builder::m_full_nelts): Change from
27052         unsigned int to poly_uint64.
27053         (vector_builder::full_nelts): Update prototype accordingly.
27054         (vector_builder::new_vector): Likewise.
27055         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
27056         (vector_builder::operator ==): Likewise.
27057         (vector_builder::finalize): Likewise.
27058         * int-vector-builder.h (int_vector_builder::int_vector_builder):
27059         Take the number of elements as a poly_uint64 rather than an
27060         unsigned int.
27061         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
27062         from unsigned int to poly_uint64.
27063         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
27064         (vec_perm_indices::new_vector): Likewise.
27065         (vec_perm_indices::length): Likewise.
27066         (vec_perm_indices::nelts_per_input): Likewise.
27067         (vec_perm_indices::input_nelts): Likewise.
27068         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
27069         number of elements per input as a poly_uint64 rather than an
27070         unsigned int.  Use the original encoding for variable-length
27071         vectors, rather than clamping each individual element.
27072         For the second and subsequent elements in each pattern,
27073         clamp the step and base before clamping their sum.
27074         (vec_perm_indices::series_p): Handle polynomial element counts.
27075         (vec_perm_indices::all_in_range_p): Likewise.
27076         (vec_perm_indices_to_tree): Likewise.
27077         (vec_perm_indices_to_rtx): Likewise.
27078         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
27079         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
27080         (tree_vector_builder::new_binary_operation): Handle polynomial
27081         element counts.  Return false if we need to know the number
27082         of elements at compile time.
27083         * fold-const.c (fold_vec_perm): Punt if the number of elements
27084         isn't known at compile time.
27086 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27088         * vec-perm-indices.h (vec_perm_builder): Change element type
27089         from HOST_WIDE_INT to poly_int64.
27090         (vec_perm_indices::element_type): Update accordingly.
27091         (vec_perm_indices::clamp): Handle polynomial element_types.
27092         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27093         (vec_perm_indices::all_in_range_p): Likewise.
27094         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
27095         than shwi trees.
27096         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
27097         polynomial vec_perm_indices element types.
27098         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
27099         * fold-const.c (fold_vec_perm): Likewise.
27100         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
27101         * tree-vect-generic.c (lower_vec_perm): Likewise.
27102         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27103         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
27104         element type to HOST_WIDE_INT.
27106 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27107             Alan Hayward  <alan.hayward@arm.com>
27108             David Sherwood  <david.sherwood@arm.com>
27110         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
27111         rather than an int.  Use plus_constant.
27112         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
27113         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
27115 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27116             Alan Hayward  <alan.hayward@arm.com>
27117             David Sherwood  <david.sherwood@arm.com>
27119         * calls.c (emit_call_1, expand_call): Change struct_value_size from
27120         a HOST_WIDE_INT to a poly_int64.
27122 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27123             Alan Hayward  <alan.hayward@arm.com>
27124             David Sherwood  <david.sherwood@arm.com>
27126         * calls.c (load_register_parameters): Cope with polynomial
27127         mode sizes.  Require a constant size for BLKmode parameters
27128         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
27129         forces a parameter to be padded at the lsb end in order to
27130         fill a complete number of words, require the parameter size
27131         to be ordered wrt UNITS_PER_WORD.
27133 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27134             Alan Hayward  <alan.hayward@arm.com>
27135             David Sherwood  <david.sherwood@arm.com>
27137         * reload1.c (spill_stack_slot_width): Change element type
27138         from unsigned int to poly_uint64_pod.
27139         (alter_reg): Treat mode sizes as polynomial.
27141 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27142             Alan Hayward  <alan.hayward@arm.com>
27143             David Sherwood  <david.sherwood@arm.com>
27145         * reload.c (complex_word_subreg_p): New function.
27146         (reload_inner_reg_of_subreg, push_reload): Use it.
27148 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27149             Alan Hayward  <alan.hayward@arm.com>
27150             David Sherwood  <david.sherwood@arm.com>
27152         * lra-constraints.c (process_alt_operands): Reject matched
27153         operands whose sizes aren't ordered.
27154         (match_reload): Refer to this check here.
27156 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27157             Alan Hayward  <alan.hayward@arm.com>
27158             David Sherwood  <david.sherwood@arm.com>
27160         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
27161         that the mode size is in the set {1, 2, 4, 8, 16}.
27163 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27164             Alan Hayward  <alan.hayward@arm.com>
27165             David Sherwood  <david.sherwood@arm.com>
27167         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
27168         Use plus_constant instead of gen_rtx_PLUS.
27170 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27171             Alan Hayward  <alan.hayward@arm.com>
27172             David Sherwood  <david.sherwood@arm.com>
27174         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
27175         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
27176         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
27177         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
27178         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
27179         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
27180         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
27181         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
27182         * config/i386/i386.c (ix86_push_rounding): ...this new function.
27183         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
27184         a poly_int64.
27185         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
27186         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
27187         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
27188         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
27189         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
27190         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
27191         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
27192         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
27193         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
27194         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
27195         function.
27196         * expr.c (emit_move_resolve_push): Treat the input and result
27197         of PUSH_ROUNDING as a poly_int64.
27198         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
27199         (emit_push_insn): Likewise.
27200         * lra-eliminations.c (mark_not_eliminable): Likewise.
27201         * recog.c (push_operand): Likewise.
27202         * reload1.c (elimination_effects): Likewise.
27203         * rtlanal.c (nonzero_bits1): Likewise.
27204         * calls.c (store_one_arg): Likewise.  Require the padding to be
27205         known at compile time.
27207 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27208             Alan Hayward  <alan.hayward@arm.com>
27209             David Sherwood  <david.sherwood@arm.com>
27211         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
27212         Use plus_constant instead of gen_rtx_PLUS.
27214 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27215             Alan Hayward  <alan.hayward@arm.com>
27216             David Sherwood  <david.sherwood@arm.com>
27218         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
27219         rather than an int.
27221 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27222             Alan Hayward  <alan.hayward@arm.com>
27223             David Sherwood  <david.sherwood@arm.com>
27225         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
27226         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
27227         via stack temporaries.  Treat the mode size as polynomial too.
27229 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27230             Alan Hayward  <alan.hayward@arm.com>
27231             David Sherwood  <david.sherwood@arm.com>
27233         * expr.c (expand_expr_real_2): When handling conversions involving
27234         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
27235         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
27236         as a poly_uint64 too.
27238 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27239             Alan Hayward  <alan.hayward@arm.com>
27240             David Sherwood  <david.sherwood@arm.com>
27242         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
27244 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27245             Alan Hayward  <alan.hayward@arm.com>
27246             David Sherwood  <david.sherwood@arm.com>
27248         * combine.c (can_change_dest_mode): Handle polynomial
27249         REGMODE_NATURAL_SIZE.
27250         * expmed.c (store_bit_field_1): Likewise.
27251         * expr.c (store_constructor): Likewise.
27252         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
27253         and polynomial REGMODE_NATURAL_SIZE.
27254         (gen_lowpart_common): Likewise.
27255         * reginfo.c (record_subregs_of_mode): Likewise.
27256         * rtlanal.c (read_modify_subreg_p): Likewise.
27258 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27259             Alan Hayward  <alan.hayward@arm.com>
27260             David Sherwood  <david.sherwood@arm.com>
27262         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
27263         numbers of elements.
27265 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27266             Alan Hayward  <alan.hayward@arm.com>
27267             David Sherwood  <david.sherwood@arm.com>
27269         * match.pd: Cope with polynomial numbers of vector elements.
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         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
27276         in a POINTER_PLUS_EXPR.
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         * omp-simd-clone.c (simd_clone_subparts): New function.
27283         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
27284         (ipa_simd_modify_function_body): Likewise.
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-generic.c (nunits_for_known_piecewise_op): New function.
27291         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
27292         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
27293         (expand_vector_condition, vector_element): Likewise.
27294         (subparts_gt): New function.
27295         (get_compute_type): Use subparts_gt.
27296         (count_type_subparts): Delete.
27297         (expand_vector_operations_1): Use subparts_gt instead of
27298         count_type_subparts.
27300 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27301             Alan Hayward  <alan.hayward@arm.com>
27302             David Sherwood  <david.sherwood@arm.com>
27304         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
27305         (vect_compile_time_alias): ...this new function.  Do the calculation
27306         on poly_ints rather than trees.
27307         (vect_prune_runtime_alias_test_list): Update call accordingly.
27309 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27310             Alan Hayward  <alan.hayward@arm.com>
27311             David Sherwood  <david.sherwood@arm.com>
27313         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
27314         numbers of units.
27315         (vect_schedule_slp_instance): Likewise.
27317 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27318             Alan Hayward  <alan.hayward@arm.com>
27319             David Sherwood  <david.sherwood@arm.com>
27321         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
27322         constant and extern definitions for variable-length vectors.
27323         (vect_get_constant_vectors): Note that the number of units
27324         is known to be constant.
27326 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27327             Alan Hayward  <alan.hayward@arm.com>
27328             David Sherwood  <david.sherwood@arm.com>
27330         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
27331         of units as polynomial.  Choose between WIDE and NARROW based
27332         on multiple_p.
27334 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27335             Alan Hayward  <alan.hayward@arm.com>
27336             David Sherwood  <david.sherwood@arm.com>
27338         * tree-vect-stmts.c (simd_clone_subparts): New function.
27339         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
27341 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27342             Alan Hayward  <alan.hayward@arm.com>
27343             David Sherwood  <david.sherwood@arm.com>
27345         * tree-vect-stmts.c (vectorizable_call): Treat the number of
27346         vectors as polynomial.  Use build_index_vector for
27347         IFN_GOMP_SIMD_LANE.
27349 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27350             Alan Hayward  <alan.hayward@arm.com>
27351             David Sherwood  <david.sherwood@arm.com>
27353         * tree-vect-stmts.c (get_load_store_type): Treat the number of
27354         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
27355         for variable-length vectors.
27356         (vectorizable_mask_load_store): Treat the number of units as
27357         polynomial, asserting that it is constant if the condition has
27358         already been enforced.
27359         (vectorizable_store, vectorizable_load): Likewise.
27361 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27362             Alan Hayward  <alan.hayward@arm.com>
27363             David Sherwood  <david.sherwood@arm.com>
27365         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
27366         of units as polynomial.  Punt if we can't tell at compile time
27367         which vector contains the final result.
27369 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27370             Alan Hayward  <alan.hayward@arm.com>
27371             David Sherwood  <david.sherwood@arm.com>
27373         * tree-vect-loop.c (vectorizable_induction): Treat the number
27374         of units as polynomial.  Punt on SLP inductions.  Use an integer
27375         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
27376         cast of such a series for variable-length floating-point
27377         reductions.
27379 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27380             Alan Hayward  <alan.hayward@arm.com>
27381             David Sherwood  <david.sherwood@arm.com>
27383         * tree.h (build_index_vector): Declare.
27384         * tree.c (build_index_vector): New function.
27385         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
27386         of units as polynomial, forcibly converting it to a constant if
27387         vectorizable_reduction has already enforced the condition.
27388         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
27389         to create a {1,2,3,...} vector.
27390         (vectorizable_reduction): Treat the number of units as polynomial.
27391         Choose vectype_in based on the largest scalar element size rather
27392         than the smallest number of units.  Enforce the restrictions
27393         relied on above.
27395 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27396             Alan Hayward  <alan.hayward@arm.com>
27397             David Sherwood  <david.sherwood@arm.com>
27399         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
27400         number of units as polynomial.
27402 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27403             Alan Hayward  <alan.hayward@arm.com>
27404             David Sherwood  <david.sherwood@arm.com>
27406         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
27407         * target.def (autovectorize_vector_sizes): Return the vector sizes
27408         by pointer, using vector_sizes rather than a bitmask.
27409         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
27410         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
27411         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
27412         Likewise.
27413         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
27414         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
27415         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
27416         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
27417         * omp-general.c (omp_max_vf): Likewise.
27418         * omp-low.c (omp_clause_aligned_alignment): Likewise.
27419         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
27420         * tree-vect-loop.c (vect_analyze_loop): Likewise.
27421         * tree-vect-slp.c (vect_slp_bb): Likewise.
27422         * doc/tm.texi: Regenerate.
27423         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
27424         to a poly_uint64.
27425         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
27426         the vector size as a poly_uint64 rather than an unsigned int.
27427         (current_vector_size): Change from an unsigned int to a poly_uint64.
27428         (get_vectype_for_scalar_type): Update accordingly.
27429         * tree.h (build_truth_vector_type): Take the size and number of
27430         units as a poly_uint64 rather than an unsigned int.
27431         (build_vector_type): Add a temporary overload that takes
27432         the number of units as a poly_uint64 rather than an unsigned int.
27433         * tree.c (make_vector_type): Likewise.
27434         (build_truth_vector_type): Take the number of units as a poly_uint64
27435         rather than an unsigned int.
27437 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27438             Alan Hayward  <alan.hayward@arm.com>
27439             David Sherwood  <david.sherwood@arm.com>
27441         * target.def (get_mask_mode): Take the number of units and length
27442         as poly_uint64s rather than unsigned ints.
27443         * targhooks.h (default_get_mask_mode): Update accordingly.
27444         * targhooks.c (default_get_mask_mode): Likewise.
27445         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
27446         * doc/tm.texi: Regenerate.
27448 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27449             Alan Hayward  <alan.hayward@arm.com>
27450             David Sherwood  <david.sherwood@arm.com>
27452         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
27453         * omp-general.c (omp_max_vf): Likewise.
27454         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
27455         (expand_omp_simd): Handle polynomial safelen.
27456         * omp-low.c (omplow_simd_context): Add a default constructor.
27457         (omplow_simd_context::max_vf): Change from int to poly_uint64.
27458         (lower_rec_simd_input_clauses): Update accordingly.
27459         (lower_rec_input_clauses): Likewise.
27461 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27462             Alan Hayward  <alan.hayward@arm.com>
27463             David Sherwood  <david.sherwood@arm.com>
27465         * tree-vectorizer.h (vect_nunits_for_cost): New function.
27466         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
27467         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
27468         (vect_analyze_slp_cost): Likewise.
27469         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
27470         (vect_model_load_cost): Likewise.
27472 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27473             Alan Hayward  <alan.hayward@arm.com>
27474             David Sherwood  <david.sherwood@arm.com>
27476         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
27477         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
27478         from an unsigned int * to a poly_uint64_pod *.
27479         (calculate_unrolling_factor): New function.
27480         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
27482 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27483             Alan Hayward  <alan.hayward@arm.com>
27484             David Sherwood  <david.sherwood@arm.com>
27486         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
27487         from an unsigned int to a poly_uint64.
27488         (_loop_vec_info::slp_unrolling_factor): Likewise.
27489         (_loop_vec_info::vectorization_factor): Change from an int
27490         to a poly_uint64.
27491         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
27492         (vect_get_num_vectors): New function.
27493         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
27494         (vect_get_num_copies): Use vect_get_num_vectors.
27495         (vect_analyze_data_ref_dependences): Change max_vf from an int *
27496         to an unsigned int *.
27497         (vect_analyze_data_refs): Change min_vf from an int * to a
27498         poly_uint64 *.
27499         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27500         than an unsigned HOST_WIDE_INT.
27501         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
27502         (vect_analyze_data_ref_dependence): Change max_vf from an int *
27503         to an unsigned int *.
27504         (vect_analyze_data_ref_dependences): Likewise.
27505         (vect_compute_data_ref_alignment): Handle polynomial vf.
27506         (vect_enhance_data_refs_alignment): Likewise.
27507         (vect_prune_runtime_alias_test_list): Likewise.
27508         (vect_shift_permute_load_chain): Likewise.
27509         (vect_supportable_dr_alignment): Likewise.
27510         (dependence_distance_ge_vf): Take the vectorization factor as a
27511         poly_uint64 rather than an unsigned HOST_WIDE_INT.
27512         (vect_analyze_data_refs): Change min_vf from an int * to a
27513         poly_uint64 *.
27514         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
27515         vfm1 as a poly_uint64 rather than an int.  Make the same change
27516         for the returned bound_scalar.
27517         (vect_gen_vector_loop_niters): Handle polynomial vf.
27518         (vect_do_peeling): Likewise.  Update call to
27519         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
27520         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
27521         be constant.
27522         * tree-vect-loop.c (vect_determine_vectorization_factor)
27523         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
27524         (vect_get_known_peeling_cost): Likewise.
27525         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
27526         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
27527         (vect_transform_loop): Likewise.  Use the lowest possible VF when
27528         updating the upper bounds of the loop.
27529         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
27530         rather than an int.
27531         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
27532         polynomial unroll factors.
27533         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
27534         (vect_make_slp_decision): Likewise.
27535         (vect_supported_load_permutation_p): Likewise, and polynomial
27536         vf too.
27537         (vect_analyze_slp_cost): Handle polynomial vf.
27538         (vect_slp_analyze_node_operations): Likewise.
27539         (vect_slp_analyze_bb_1): Likewise.
27540         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27541         than an unsigned HOST_WIDE_INT.
27542         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
27543         (vectorizable_load): Handle polynomial vf.
27544         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
27545         a poly_uint64.
27546         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
27548 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27549             Alan Hayward  <alan.hayward@arm.com>
27550             David Sherwood  <david.sherwood@arm.com>
27552         * match.pd: Handle bit operations involving three constants
27553         and try to fold one pair.
27555 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27557         * tree-vect-loop-manip.c: Include gimple-fold.h.
27558         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
27559         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
27560         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
27561         Add a path that uses a step of VF instead of 1, but disable it
27562         for now.
27563         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
27564         and niters_no_overflow parameters.  Update calls to
27565         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
27566         Create a new SSA name if the latter choses to use a ste other
27567         than zero, and return it via niters_vector_mult_vf_var.
27568         * tree-vect-loop.c (vect_transform_loop): Update calls to
27569         vect_do_peeling, vect_gen_vector_loop_niters and
27570         slpeel_make_loop_iterate_ntimes.
27571         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
27572         (vect_gen_vector_loop_niters): Update declarations after above changes.
27574 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
27576         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
27577         128-bit round to integer instructions.
27578         (ceil<mode>2): Likewise.
27579         (btrunc<mode>2): Likewise.
27580         (round<mode>2): Likewise.
27582 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27584         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
27585         unaligned VSX load/store on P8/P9.
27586         (expand_block_clear): Allow the use of unaligned VSX
27587         load/store on P8/P9.
27589 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27591         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
27592         New function.
27593         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
27594         swap associated with both a load and a store.
27596 2018-01-02  Andrew Waterman  <andrew@sifive.com>
27598         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
27599         * config/riscv/riscv.md (clear_cache): Use it.
27601 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
27603         * web.c: Remove out-of-date comment.
27605 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27607         * expr.c (fixup_args_size_notes): Check that any existing
27608         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
27609         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
27610         (emit_single_push_insn): ...here.
27612 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27614         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
27615         (const_vector_encoded_nelts): New function.
27616         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
27617         (const_vector_int_elt, const_vector_elt): Declare.
27618         * emit-rtl.c (const_vector_int_elt_1): New function.
27619         (const_vector_elt): Likewise.
27620         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
27621         of CONST_VECTOR_ELT.
27623 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27625         * expr.c: Include rtx-vector-builder.h.
27626         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
27627         directly on the tree encoding.
27628         (const_vector_from_tree): Likewise.
27629         * optabs.c: Include rtx-vector-builder.h.
27630         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
27631         sequence of "u" values.
27632         * vec-perm-indices.c: Include rtx-vector-builder.h.
27633         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
27634         directly on the vec_perm_indices encoding.
27636 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27638         * doc/rtl.texi (const_vector): Describe new encoding scheme.
27639         * Makefile.in (OBJS): Add rtx-vector-builder.o.
27640         * rtx-vector-builder.h: New file.
27641         * rtx-vector-builder.c: Likewise.
27642         * rtl.h (rtx_def::u2): Add a const_vector field.
27643         (CONST_VECTOR_NPATTERNS): New macro.
27644         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
27645         (CONST_VECTOR_DUPLICATE_P): Likewise.
27646         (CONST_VECTOR_STEPPED_P): Likewise.
27647         (CONST_VECTOR_ENCODED_ELT): Likewise.
27648         (const_vec_duplicate_p): Check for a duplicated vector encoding.
27649         (unwrap_const_vec_duplicate): Likewise.
27650         (const_vec_series_p): Check for a non-duplicated vector encoding.
27651         Say that the function only returns true for integer vectors.
27652         * emit-rtl.c: Include rtx-vector-builder.h.
27653         (gen_const_vec_duplicate_1): Delete.
27654         (gen_const_vector): Call gen_const_vec_duplicate instead of
27655         gen_const_vec_duplicate_1.
27656         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
27657         (gen_const_vec_duplicate): Use rtx_vector_builder.
27658         (gen_const_vec_series): Likewise.
27659         (gen_rtx_CONST_VECTOR): Likewise.
27660         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
27661         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27662         Build a new vector rather than modifying a CONST_VECTOR in-place.
27663         (handle_special_swappables): Update call accordingly.
27664         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
27665         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27666         Build a new vector rather than modifying a CONST_VECTOR in-place.
27667         (handle_special_swappables): Update call accordingly.
27669 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27671         * simplify-rtx.c (simplify_const_binary_operation): Use
27672         CONST_VECTOR_ELT instead of XVECEXP.
27674 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27676         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
27677         the selector elements to be different from the data elements
27678         if the selector is a VECTOR_CST.
27679         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
27680         ssizetype for the selector.
27682 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27684         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
27685         before testing each element individually.
27686         * tree-vect-generic.c (lower_vec_perm): Likewise.
27688 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27690         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
27691         * selftest-run-tests.c (selftest::run_tests): Call it.
27692         * vector-builder.h (vector_builder::operator ==): New function.
27693         (vector_builder::operator !=): Likewise.
27694         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
27695         (vec_perm_indices::all_from_input_p): New function.
27696         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27697         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
27698         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
27699         instead of reading the VECTOR_CST directly.  Detect whether both
27700         vector inputs are the same before constructing the vec_perm_indices,
27701         and update the number of inputs argument accordingly.  Use the
27702         utility functions added above.  Only construct sel2 if we need to.
27704 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27706         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
27707         the broadcast of the low byte.
27708         (expand_mult_highpart): Use an explicit encoding for the permutes.
27709         * optabs-query.c (can_mult_highpart_p): Likewise.
27710         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
27711         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27712         (vectorizable_bswap): Likewise.
27713         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
27714         explicit encoding for the power-of-2 permutes.
27715         (vect_permute_store_chain): Likewise.
27716         (vect_grouped_load_supported): Likewise.
27717         (vect_permute_load_chain): Likewise.
27719 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27721         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
27722         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
27723         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
27724         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27725         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
27726         (vect_gen_perm_mask_any): Likewise.
27728 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27730         * int-vector-builder.h: New file.
27731         * vec-perm-indices.h: Include int-vector-builder.h.
27732         (vec_perm_indices): Redefine as an int_vector_builder.
27733         (auto_vec_perm_indices): Delete.
27734         (vec_perm_builder): Redefine as a stand-alone class.
27735         (vec_perm_indices::vec_perm_indices): New function.
27736         (vec_perm_indices::clamp): Likewise.
27737         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
27738         (vec_perm_indices::new_vector): New function.
27739         (vec_perm_indices::new_expanded_vector): Update for new
27740         vec_perm_indices class.
27741         (vec_perm_indices::rotate_inputs): New function.
27742         (vec_perm_indices::all_in_range_p): Operate directly on the
27743         encoded form, without computing elided elements.
27744         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
27745         encoding.  Update for new vec_perm_indices class.
27746         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
27747         the given vec_perm_builder.
27748         (expand_vec_perm_var): Update vec_perm_builder constructor.
27749         (expand_mult_highpart): Use vec_perm_builder instead of
27750         auto_vec_perm_indices.
27751         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
27752         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
27753         or double series encoding as appropriate.
27754         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
27755         vec_perm_indices instead of auto_vec_perm_indices.
27756         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27757         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27758         (vect_permute_store_chain): Likewise.
27759         (vect_grouped_load_supported): Likewise.
27760         (vect_permute_load_chain): Likewise.
27761         (vect_shift_permute_load_chain): Likewise.
27762         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27763         (vect_transform_slp_perm_load): Likewise.
27764         (vect_schedule_slp_instance): Likewise.
27765         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27766         (vectorizable_mask_load_store): Likewise.
27767         (vectorizable_bswap): Likewise.
27768         (vectorizable_store): Likewise.
27769         (vectorizable_load): Likewise.
27770         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
27771         vec_perm_indices instead of auto_vec_perm_indices.  Use
27772         tree_to_vec_perm_builder to read the vector from a tree.
27773         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
27774         vec_perm_builder instead of a vec_perm_indices.
27775         (have_whole_vector_shift): Use vec_perm_builder and
27776         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
27777         truncation to calc_vec_perm_mask_for_shift.
27778         (vect_create_epilog_for_reduction): Likewise.
27779         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
27780         from auto_vec_perm_indices to vec_perm_indices.
27781         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27782         instead of changing individual elements.
27783         (aarch64_vectorize_vec_perm_const): Use new_vector to install
27784         the vector in d.perm.
27785         * config/arm/arm.c (expand_vec_perm_d::perm): Change
27786         from auto_vec_perm_indices to vec_perm_indices.
27787         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27788         instead of changing individual elements.
27789         (arm_vectorize_vec_perm_const): Use new_vector to install
27790         the vector in d.perm.
27791         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
27792         Update vec_perm_builder constructor.
27793         (rs6000_expand_interleave): Likewise.
27794         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
27795         (rs6000_expand_interleave): Likewise.
27797 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27799         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
27800         to qimode could truncate the indices.
27801         * optabs.c (expand_vec_perm_var): Likewise.
27803 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27805         * Makefile.in (OBJS): Add vec-perm-indices.o.
27806         * vec-perm-indices.h: New file.
27807         * vec-perm-indices.c: Likewise.
27808         * target.h (vec_perm_indices): Replace with a forward class
27809         declaration.
27810         (auto_vec_perm_indices): Move to vec-perm-indices.h.
27811         * optabs.h: Include vec-perm-indices.h.
27812         (expand_vec_perm): Delete.
27813         (selector_fits_mode_p, expand_vec_perm_var): Declare.
27814         (expand_vec_perm_const): Declare.
27815         * target.def (vec_perm_const_ok): Replace with...
27816         (vec_perm_const): ...this new hook.
27817         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
27818         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
27819         * doc/tm.texi: Regenerate.
27820         * optabs.def (vec_perm_const): Delete.
27821         * doc/md.texi (vec_perm_const): Likewise.
27822         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
27823         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
27824         expand_vec_perm for constant permutation vectors.  Assert that
27825         the mode of variable permutation vectors is the integer equivalent
27826         of the mode that is being permuted.
27827         * optabs-query.h (selector_fits_mode_p): Declare.
27828         * optabs-query.c: Include vec-perm-indices.h.
27829         (selector_fits_mode_p): New function.
27830         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
27831         is defined, instead of checking whether the vec_perm_const_optab
27832         exists.  Use targetm.vectorize.vec_perm_const instead of
27833         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
27834         fit in the vector mode before using a variable permute.
27835         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
27836         vec_perm_indices instead of an rtx.
27837         (expand_vec_perm): Replace with...
27838         (expand_vec_perm_const): ...this new function.  Take the selector
27839         as a vec_perm_indices rather than an rtx.  Also take the mode of
27840         the selector.  Update call to shift_amt_for_vec_perm_mask.
27841         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
27842         Use vec_perm_indices::new_expanded_vector to expand the original
27843         selector into bytes.  Check whether the indices fit in the vector
27844         mode before using a variable permute.
27845         (expand_vec_perm_var): Make global.
27846         (expand_mult_highpart): Use expand_vec_perm_const.
27847         * fold-const.c: Includes vec-perm-indices.h.
27848         * tree-ssa-forwprop.c: Likewise.
27849         * tree-vect-data-refs.c: Likewise.
27850         * tree-vect-generic.c: Likewise.
27851         * tree-vect-loop.c: Likewise.
27852         * tree-vect-slp.c: Likewise.
27853         * tree-vect-stmts.c: Likewise.
27854         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
27855         Delete.
27856         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
27857         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
27858         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
27859         (aarch64_vectorize_vec_perm_const): ...this new function.
27860         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27861         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27862         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
27863         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
27864         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27865         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27866         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
27867         into...
27868         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
27869         check for NEON modes.
27870         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
27871         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
27872         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
27873         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
27874         into...
27875         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
27876         the old VEC_PERM_CONST conditions.
27877         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
27878         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
27879         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
27880         (ia64_vectorize_vec_perm_const_ok): Merge into...
27881         (ia64_vectorize_vec_perm_const): ...this new function.
27882         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
27883         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
27884         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
27885         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
27886         * config/mips/mips.c (mips_expand_vec_perm_const)
27887         (mips_vectorize_vec_perm_const_ok): Merge into...
27888         (mips_vectorize_vec_perm_const): ...this new function.
27889         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
27890         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
27891         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
27892         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
27893         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
27894         (rs6000_expand_vec_perm_const): Delete.
27895         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
27896         Delete.
27897         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27898         (altivec_expand_vec_perm_const_le): Take each operand individually.
27899         Operate on constant selectors rather than rtxes.
27900         (altivec_expand_vec_perm_const): Likewise.  Update call to
27901         altivec_expand_vec_perm_const_le.
27902         (rs6000_expand_vec_perm_const): Delete.
27903         (rs6000_vectorize_vec_perm_const_ok): Delete.
27904         (rs6000_vectorize_vec_perm_const): New function.
27905         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27906         an element count and rtx array.
27907         (rs6000_expand_extract_even): Update call accordingly.
27908         (rs6000_expand_interleave): Likewise.
27909         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
27910         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
27911         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
27912         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
27913         (rs6000_expand_vec_perm_const): Delete.
27914         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27915         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27916         (altivec_expand_vec_perm_const_le): Take each operand individually.
27917         Operate on constant selectors rather than rtxes.
27918         (altivec_expand_vec_perm_const): Likewise.  Update call to
27919         altivec_expand_vec_perm_const_le.
27920         (rs6000_expand_vec_perm_const): Delete.
27921         (rs6000_vectorize_vec_perm_const_ok): Delete.
27922         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
27923         reference to the SPE evmerge intructions.
27924         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27925         an element count and rtx array.
27926         (rs6000_expand_extract_even): Update call accordingly.
27927         (rs6000_expand_interleave): Likewise.
27928         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
27929         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
27930         new function.
27931         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27933 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27935         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
27936         vector mode and that that mode matches the mode of the data
27937         being permuted.
27938         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
27939         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
27940         directly using expand_vec_perm_1 when forcing selectors into
27941         registers.
27942         (expand_vec_perm_var): New function, split out from expand_vec_perm.
27944 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27946         * optabs-query.h (can_vec_perm_p): Delete.
27947         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
27948         * optabs-query.c (can_vec_perm_p): Split into...
27949         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
27950         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
27951         particular selector is valid.
27952         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27953         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27954         (vect_grouped_load_supported): Likewise.
27955         (vect_shift_permute_load_chain): Likewise.
27956         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27957         (vect_transform_slp_perm_load): Likewise.
27958         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27959         (vectorizable_bswap): Likewise.
27960         (vect_gen_perm_mask_checked): Likewise.
27961         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
27962         implementations of variable permutation vectors into account
27963         when deciding which selector to use.
27964         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
27965         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
27966         with a false third argument.
27967         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
27968         to test whether the constant selector is valid and can_vec_perm_var_p
27969         to test whether a variable selector is valid.
27971 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27973         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
27974         * optabs-query.c (can_vec_perm_p): Likewise.
27975         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
27976         instead of vec_perm_indices.
27977         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
27978         (vect_gen_perm_mask_checked): Likewise,
27979         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
27980         (vect_gen_perm_mask_checked): Likewise,
27982 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27984         * optabs-query.h (qimode_for_vec_perm): Declare.
27985         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
27986         (qimode_for_vec_perm): ...this new function.
27987         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
27989 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27991         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
27992         does not have a conditional at the top.
27994 2018-01-02  Richard Biener  <rguenther@suse.de>
27996         * ipa-inline.c (big_speedup_p): Fix expression.
27998 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
28000         PR target/81616
28001         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
28002         for generic 4->6.
28004 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
28006         PR target/81616
28007         Generic tuning.
28008         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
28009         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
28010         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
28011         cond_taken_branch_cost 3->4.
28013 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
28015         PR tree-optimization/83581
28016         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
28017         TODO_cleanup_cfg if any changes have been made.
28019         PR middle-end/83608
28020         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
28021         convert_modes if target mode has the right side, but different mode
28022         class.
28024         PR middle-end/83609
28025         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
28026         last argument when extracting from CONCAT.  If either from_real or
28027         from_imag is NULL, use expansion through memory.  If result is not
28028         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
28029         the parts directly to inner mode, if even that fails, use expansion
28030         through memory.
28032         PR middle-end/83623
28033         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
28034         check for bswap in mode rather than HImode and use that in expand_unop
28035         too.
28037 Copyright (C) 2018 Free Software Foundation, Inc.
28039 Copying and distribution of this file, with or without modification,
28040 are permitted in any medium without royalty provided the copyright
28041 notice and this notice are preserved.